PHP 8.2.30
Preview: errors.js Size: 1.07 KB
/home/byroehnu/.trash/node_modules11/@adminjs/express/lib/errors.js

export const MISSING_AUTH_CONFIG_ERROR = 'You must configure either "authenticate" method or assign an auth "provider"';
export const INVALID_AUTH_CONFIG_ERROR = 'You cannot configure both "authenticate" and "provider". "authenticate" will be removed in next major release.';
export class WrongArgumentError extends Error {
    constructor(message) {
        super(message);
        this.name = "WrongArgumentError";
    }
}
export class OldBodyParserUsedError extends Error {
    constructor(message = `
  You probably used old \`body-parser\` middleware, which is not compatible
  with @adminjs/express. In order to make it work you will have to
  1. move body-parser invocation after the AdminJS setup like this:
  
  const adminJs = new AdminJS()
  const router = new buildRouter(adminJs)
  app.use(adminJs.options.rootPath, router)
  
  // body parser goes after the AdminJS router
  app.use(bodyParser())
  
  2. Upgrade body-parser to the latest version and use it like this:
  app.use(bodyParser.json())
  `) {
        super(message);
        this.name = "WrongArgumentError";
    }
}

Directory Contents

Dirs: 1 × Files: 14

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-28 00:29:10
Edit Download
1.51 KB lrw-r--r-- 2026-02-28 00:28:44
Edit Download
2.99 KB lrw-r--r-- 2026-02-28 00:27:30
Edit Download
1.15 KB lrw-r--r-- 2026-02-28 00:28:48
Edit Download
3.08 KB lrw-r--r-- 2026-02-28 00:27:34
Edit Download
76 B lrw-r--r-- 2026-02-28 00:28:52
Edit Download
102 B lrw-r--r-- 2026-02-28 00:27:44
Edit Download
491 B lrw-r--r-- 2026-02-28 00:28:56
Edit Download
1.07 KB lrw-r--r-- 2026-02-28 00:27:48
Edit Download
3.68 KB lrw-r--r-- 2026-02-28 00:28:58
Edit Download
3.41 KB lrw-r--r-- 2026-02-28 00:28:00
Edit Download
172 B lrw-r--r-- 2026-02-28 00:29:00
Edit Download
255 B lrw-r--r-- 2026-02-28 00:28:04
Edit Download
1.17 KB lrw-r--r-- 2026-02-28 00:29:12
Edit Download
11 B lrw-r--r-- 2026-02-28 00:28:24
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).