@adonisjs/core 7.0.1 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/build/ace-DBm6EcQ-.js +37 -0
  2. package/build/app-BCcG_oDd.js +7 -0
  3. package/build/app-CAuSGb2P.js +15 -0
  4. package/build/bodyparser_middleware-H5FArWkI.js +9 -0
  5. package/build/{chunk-iKc69rpz.js → chunk-Do49iUES.js} +3 -0
  6. package/build/commands/add.d.ts +1 -0
  7. package/build/commands/add.js +64 -10
  8. package/build/commands/build.js +41 -3
  9. package/build/commands/commands.json +1 -1
  10. package/build/commands/configure.js +70 -4
  11. package/build/commands/eject.js +30 -4
  12. package/build/commands/env/add.js +62 -4
  13. package/build/commands/generate_key.js +23 -3
  14. package/build/commands/inspect_rcfile.js +26 -2
  15. package/build/commands/list/routes.d.ts +5 -0
  16. package/build/commands/list/routes.js +242 -3
  17. package/build/commands/make/command.js +33 -4
  18. package/build/commands/make/controller.js +46 -4
  19. package/build/commands/make/event.js +36 -4
  20. package/build/commands/make/exception.js +36 -4
  21. package/build/commands/make/listener.js +44 -4
  22. package/build/commands/make/middleware.js +53 -5
  23. package/build/commands/make/preload.js +55 -5
  24. package/build/commands/make/provider.js +54 -5
  25. package/build/commands/make/service.js +29 -4
  26. package/build/commands/make/test.js +63 -4
  27. package/build/commands/make/transformer.js +37 -4
  28. package/build/commands/make/validator.js +44 -4
  29. package/build/commands/make/view.js +33 -4
  30. package/build/commands/repl.js +31 -2
  31. package/build/commands/serve.js +54 -4
  32. package/build/commands/test.js +69 -4
  33. package/build/config-Coti2q6R.js +7 -0
  34. package/build/config_provider-Do9af1ze.js +35 -0
  35. package/build/container-CGfEwWof.js +7 -0
  36. package/build/{core-IpCOCkUL.js → core-XjMm_ipu.js} +51 -2
  37. package/build/create_kernel-BV3swyCg.js +4 -0
  38. package/build/{create_kernel-B7ILNhuP.js → create_kernel-D38-0Zbt.js} +41 -1
  39. package/build/debug-DWofTfIX.js +20 -0
  40. package/build/{decorate-DmrZA614.js → decorate-B9Uz0anB.js} +2 -0
  41. package/build/{define_config-0oHaj43l.js → define_config--5euEdi8.js} +54 -3
  42. package/build/dumper-3R77st8F.js +353 -0
  43. package/build/edge-BG5ZYp6Z.js +57 -0
  44. package/build/{errors-CrCO-k44.js → errors-BScZTzBu.js} +9 -1
  45. package/build/events-DlKX1ZdL.js +7 -0
  46. package/build/exceptions-B2MzIlHY.js +2 -0
  47. package/build/factories/app.js +1 -0
  48. package/build/factories/bodyparser.js +1 -0
  49. package/build/factories/core/ace.js +16 -22
  50. package/build/factories/core/ignitor.js +13 -73
  51. package/build/factories/core/main.js +25 -17
  52. package/build/factories/core/test_utils.js +22 -19
  53. package/build/factories/encryption.js +1 -0
  54. package/build/factories/events.js +1 -0
  55. package/build/factories/hash.js +1 -0
  56. package/build/factories/http.js +1 -0
  57. package/build/factories/logger.js +1 -0
  58. package/build/factories/stubs.js +75 -7
  59. package/build/ignitor-Kym3gR-I.js +169 -0
  60. package/build/index.js +11 -8
  61. package/build/logger-DIdZPHCe.js +43 -0
  62. package/build/main-B50zECAi.js +121 -0
  63. package/build/main-CRnMnrH7.js +184 -0
  64. package/build/{main-kn40V-hF.js → main-CfTiGsiS.js} +2 -0
  65. package/build/main-Ck0GqLx4.js +117 -0
  66. package/build/main-CoZI4Ezs.js +2 -0
  67. package/build/main-D1MSq4Uu.js +435 -0
  68. package/build/{main--nXd7T-C.js → main-bRYXIHgD.js} +75 -3
  69. package/build/main-zxNP7iRl.js +7 -0
  70. package/build/modules/ace/codemods.js +301 -2
  71. package/build/modules/ace/commands.d.ts +5 -0
  72. package/build/modules/ace/main.js +2 -1
  73. package/build/modules/app.js +3 -5
  74. package/build/modules/bodyparser/bodyparser_middleware.js +2 -2
  75. package/build/modules/bodyparser/main.js +3 -5
  76. package/build/modules/config.js +3 -5
  77. package/build/modules/container.js +3 -5
  78. package/build/modules/dumper/main.js +29 -2
  79. package/build/modules/dumper/plugins/edge.js +2 -46
  80. package/build/modules/encryption/drivers/aes_256_cbc.js +1 -0
  81. package/build/modules/encryption/drivers/aes_256_gcm.js +1 -0
  82. package/build/modules/encryption/drivers/aes_siv.js +1 -0
  83. package/build/modules/encryption/drivers/chacha20_poly1305.js +1 -0
  84. package/build/modules/encryption/drivers/legacy.js +46 -1
  85. package/build/modules/encryption/main.js +7 -5
  86. package/build/modules/env/editor.js +1 -0
  87. package/build/modules/env/main.js +1 -0
  88. package/build/modules/events.js +3 -5
  89. package/build/modules/hash/drivers/argon.js +1 -0
  90. package/build/modules/hash/drivers/bcrypt.js +1 -0
  91. package/build/modules/hash/drivers/scrypt.js +1 -0
  92. package/build/modules/hash/main.js +4 -4
  93. package/build/modules/hash/phc_formatter.js +1 -0
  94. package/build/modules/health.js +1 -0
  95. package/build/modules/http/helpers.js +1 -0
  96. package/build/modules/http/main.js +2 -2
  97. package/build/modules/http/url_builder_client.js +1 -0
  98. package/build/modules/logger.js +3 -13
  99. package/build/modules/repl.js +3 -5
  100. package/build/modules/transformers/main.js +1 -0
  101. package/build/providers/app_provider.js +214 -15
  102. package/build/providers/edge_provider.js +90 -3
  103. package/build/providers/hash_provider.js +59 -4
  104. package/build/providers/repl_provider.js +64 -2
  105. package/build/providers/vinejs_provider.js +44 -3
  106. package/build/repl-C02Re0Yd.js +7 -0
  107. package/build/services/ace.js +11 -1
  108. package/build/services/app.js +2 -4
  109. package/build/services/config.js +7 -1
  110. package/build/services/dumper.js +13 -1
  111. package/build/services/emitter.js +8 -1
  112. package/build/services/encryption.js +8 -1
  113. package/build/services/hash.js +8 -1
  114. package/build/services/logger.js +8 -1
  115. package/build/services/repl.js +8 -1
  116. package/build/services/router.js +8 -1
  117. package/build/services/server.js +8 -1
  118. package/build/services/test_utils.js +11 -1
  119. package/build/services/url_builder.js +8 -1
  120. package/build/src/cli_formatters/routes_list.d.ts +7 -0
  121. package/build/src/exceptions.js +2 -1
  122. package/build/src/helpers/assert.js +1 -0
  123. package/build/src/helpers/http.js +1 -0
  124. package/build/src/helpers/is.js +24 -0
  125. package/build/src/helpers/main.js +2 -1
  126. package/build/src/helpers/string.js +2 -27
  127. package/build/src/helpers/types.js +18 -0
  128. package/build/src/helpers/verification_token.js +2 -45
  129. package/build/src/test_utils/main.js +9 -7
  130. package/build/src/types.js +1 -0
  131. package/build/src/vine.js +2 -32
  132. package/build/string-8_8He-HH.js +46 -0
  133. package/build/test_utils-DbJS_uEu.js +32 -0
  134. package/build/toolkit/main.js +13 -1
  135. package/build/types/ace.js +1 -0
  136. package/build/types/app.js +1 -0
  137. package/build/types/bodyparser.js +1 -0
  138. package/build/types/common.js +1 -0
  139. package/build/types/container.js +1 -0
  140. package/build/types/encryption.js +1 -0
  141. package/build/types/events.js +1 -0
  142. package/build/types/hash.js +1 -0
  143. package/build/types/health.js +1 -0
  144. package/build/types/helpers.js +1 -0
  145. package/build/types/http.js +1 -0
  146. package/build/types/logger.js +1 -0
  147. package/build/types/repl.js +1 -0
  148. package/build/types/transformers.js +1 -0
  149. package/build/utils-CKwka7OL.js +105 -0
  150. package/build/verification_token-WCrZtUgZ.js +108 -0
  151. package/build/vine-DkIupA3Z.js +97 -0
  152. package/package.json +12 -12
  153. package/build/config_provider-FIAUgvae.js +0 -13
  154. package/build/create_kernel-BD0Iqi8e.js +0 -3
  155. package/build/debug-CGQmxzGt.js +0 -3
  156. package/build/dumper-BBgqFX5a.js +0 -147
  157. package/build/main-Cxz0TyIw.js +0 -173
  158. package/build/main-DN2qEEg5.js +0 -41
  159. package/build/main-DkNgvceD.js +0 -52
  160. package/build/main-MBAMnmJb.js +0 -81
  161. package/build/utils-rRkbAPnP.js +0 -42
@@ -0,0 +1,37 @@
1
+ import { t as Ignitor } from "./main-D1MSq4Uu.js";
2
+ import { t as IgnitorFactory } from "./ignitor-Kym3gR-I.js";
3
+ import { t as createAceKernel } from "./create_kernel-D38-0Zbt.js";
4
+ //#region factories/core/ace.ts
5
+ /**
6
+ * Factory for creating and configuring Ace command kernel instances.
7
+ * This factory provides a convenient way to create Ace kernels either from
8
+ * an existing Ignitor instance or by creating a new one from scratch.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // Create from URL
13
+ * const aceFactory = new AceFactory()
14
+ * const kernel = await aceFactory.make(new URL('../', import.meta.url))
15
+ *
16
+ * // Create from existing ignitor
17
+ * const ignitor = new Ignitor(appRoot)
18
+ * const kernel = await aceFactory.make(ignitor)
19
+ *
20
+ * // Run commands
21
+ * await kernel.handle(['make:controller', 'UserController'])
22
+ * ```
23
+ */
24
+ var AceFactory = class {
25
+ async make(ignitorOrAppRoot, options) {
26
+ if (ignitorOrAppRoot instanceof Ignitor) {
27
+ const app = ignitorOrAppRoot.createApp("console");
28
+ await app.init();
29
+ return createAceKernel(app);
30
+ }
31
+ const app = new IgnitorFactory().withCoreConfig().withCoreProviders().create(ignitorOrAppRoot, options).createApp("console");
32
+ await app.init();
33
+ return createAceKernel(app);
34
+ }
35
+ };
36
+ //#endregion
37
+ export { AceFactory as t };
@@ -0,0 +1,7 @@
1
+ import { n as __reExport, t as __exportAll } from "./chunk-Do49iUES.js";
2
+ //#region modules/app.ts
3
+ var app_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_application from "@adonisjs/application";
5
+ __reExport(app_exports, import__adonisjs_application);
6
+ //#endregion
7
+ export { app_exports as t };
@@ -0,0 +1,15 @@
1
+ //#region services/app.ts
2
+ let app;
3
+ /**
4
+ * Set the application instance the app service should
5
+ * be using. Other services relies on the same app
6
+ * instance as well.
7
+ *
8
+ * app service is an instance of the "Application" exported from
9
+ * the "modules/app.ts" file.
10
+ */
11
+ function setApp(appService) {
12
+ app = appService;
13
+ }
14
+ //#endregion
15
+ export { setApp as n, app as t };
@@ -0,0 +1,9 @@
1
+ import { BodyParserMiddleware } from "@adonisjs/bodyparser/bodyparser_middleware";
2
+ //#region modules/bodyparser/bodyparser_middleware.ts
3
+ /**
4
+ * Default export allows lazy importing middleware with
5
+ * destructuring the named exports
6
+ */
7
+ var bodyparser_middleware_default = BodyParserMiddleware;
8
+ //#endregion
9
+ export { bodyparser_middleware_default as t };
@@ -1,7 +1,9 @@
1
1
  import "node:module";
2
+ Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __exportAll = (all, no_symbols) => {
7
9
  let target = {};
@@ -23,4 +25,5 @@ var __copyProps = (to, from, except, desc) => {
23
25
  return to;
24
26
  };
25
27
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
28
+ //#endregion
26
29
  export { __reExport as n, __exportAll as t };
@@ -24,6 +24,7 @@ export default class Add extends BaseCommand {
24
24
  * The command description
25
25
  */
26
26
  static description: string;
27
+ static help: string[];
27
28
  /**
28
29
  * Command options configuration
29
30
  */
@@ -1,21 +1,62 @@
1
- import "../chunk-iKc69rpz.js";
2
- import "../main-kn40V-hF.js";
3
- import "../debug-CGQmxzGt.js";
4
- import "../main-Cxz0TyIw.js";
5
- import "../config_provider-FIAUgvae.js";
6
- import "../utils-rRkbAPnP.js";
7
- import { n as prettyPrintError } from "../core-IpCOCkUL.js";
8
- import { f as BaseCommand, l as flags, o as args } from "../main-MBAMnmJb.js";
9
- import { t as __decorate } from "../decorate-DmrZA614.js";
1
+ import "../chunk-Do49iUES.js";
2
+ import "../main-CfTiGsiS.js";
3
+ import "../container-CGfEwWof.js";
4
+ import "../debug-DWofTfIX.js";
5
+ import "../main-D1MSq4Uu.js";
6
+ import "../app-CAuSGb2P.js";
7
+ import "../app-BCcG_oDd.js";
8
+ import "../config_provider-Do9af1ze.js";
9
+ import "../string-8_8He-HH.js";
10
+ import "../utils-CKwka7OL.js";
11
+ import { n as prettyPrintError } from "../core-XjMm_ipu.js";
12
+ import { f as BaseCommand, l as flags, o as args } from "../main-CRnMnrH7.js";
13
+ import { t as __decorate } from "../decorate-B9Uz0anB.js";
14
+ //#region commands/add.ts
15
+ /**
16
+ * The install command is used to `npm install` and `node ace configure` one or more packages
17
+ * in one go.
18
+ *
19
+ * @example
20
+ * ```
21
+ * ace add @adonisjs/lucid
22
+ * ace add @adonisjs/lucid @adonisjs/auth @adonisjs/session
23
+ * ace add @adonisjs/session --dev
24
+ * ace add vinejs --force
25
+ * ace add edge --package-manager=pnpm
26
+ * ```
27
+ */
10
28
  var Add = class extends BaseCommand {
29
+ /**
30
+ * The command name
31
+ */
11
32
  static commandName = "add";
12
- static description = "Install and configure one or more packages";
33
+ /**
34
+ * The command description
35
+ */
36
+ static description = "Install and configure one or more AdonisJS packages. Runs npm install followed by the package configure hook";
37
+ static help = [
38
+ "Use this command instead of manually running npm install + configure separately.",
39
+ "Accepts shorthand names: \"vinejs\" for @vinejs/vine, \"edge\" for edge.js.",
40
+ "```",
41
+ "{{ binaryName }} add @adonisjs/lucid",
42
+ "{{ binaryName }} add @adonisjs/auth @adonisjs/session",
43
+ "```"
44
+ ];
45
+ /**
46
+ * Command options configuration
47
+ */
13
48
  static options = { allowUnknownFlags: true };
49
+ /**
50
+ * Resolve the npm package name from the user-provided name
51
+ */
14
52
  #resolveNpmPackageName(name) {
15
53
  if (name === "vinejs") return "@vinejs/vine";
16
54
  if (name === "edge") return "edge.js";
17
55
  return name;
18
56
  }
57
+ /**
58
+ * Configure the package by delegating the work to the `node ace configure` command
59
+ */
19
60
  async #configurePackage(packageName) {
20
61
  const flagValueArray = this.parsed.unknownFlags.filter((flag) => !!this.parsed.flags[flag]).map((flag) => [`--${flag}`, this.parsed.flags[flag].toString()]);
21
62
  const configureArgs = [
@@ -26,17 +67,26 @@ var Add = class extends BaseCommand {
26
67
  ].filter(Boolean);
27
68
  return await this.kernel.exec("configure", configureArgs);
28
69
  }
70
+ /**
71
+ * Run method is invoked by ace automatically
72
+ */
29
73
  async run() {
30
74
  const packages = this.names.map((name) => ({
31
75
  name,
32
76
  npmName: this.#resolveNpmPackageName(name)
33
77
  }));
78
+ /**
79
+ * Install all packages
80
+ */
34
81
  const codemods = await this.createCodemods();
35
82
  codemods.verboseInstallOutput = !!this.verbose;
36
83
  if (!await codemods.installPackages(packages.map((pkg) => ({
37
84
  name: pkg.npmName,
38
85
  isDevDependency: !!this.dev
39
86
  })), this.packageManager)) return;
87
+ /**
88
+ * Configure each package sequentially
89
+ */
40
90
  const succeeded = [];
41
91
  const failed = [];
42
92
  for (const pkg of packages) {
@@ -47,6 +97,9 @@ var Add = class extends BaseCommand {
47
97
  error
48
98
  });
49
99
  }
100
+ /**
101
+ * Report results
102
+ */
50
103
  if (succeeded.length > 0) {
51
104
  const names = succeeded.map((name) => this.colors.green(name)).join(", ");
52
105
  this.logger.success(`Installed and configured ${names}`);
@@ -71,4 +124,5 @@ __decorate([flags.boolean({
71
124
  alias: "D"
72
125
  })], Add.prototype, "dev", void 0);
73
126
  __decorate([flags.boolean({ description: "Forcefully overwrite existing files" })], Add.prototype, "force", void 0);
127
+ //#endregion
74
128
  export { Add as default };
@@ -1,9 +1,31 @@
1
- import { n as importTypeScript, t as importAssembler } from "../utils-rRkbAPnP.js";
2
- import { f as BaseCommand, l as flags } from "../main-MBAMnmJb.js";
3
- import { t as __decorate } from "../decorate-DmrZA614.js";
1
+ import "../chunk-Do49iUES.js";
2
+ import { n as importTypeScript, t as importAssembler } from "../utils-CKwka7OL.js";
3
+ import { f as BaseCommand, l as flags } from "../main-CRnMnrH7.js";
4
+ import { t as __decorate } from "../decorate-B9Uz0anB.js";
5
+ //#region commands/build.ts
6
+ /**
7
+ * Create the production build by compiling TypeScript source and the
8
+ * frontend assets
9
+ *
10
+ * @example
11
+ * ```
12
+ * ace build
13
+ * ace build --ignore-ts-errors
14
+ * ace build --package-manager=pnpm
15
+ * ```
16
+ */
4
17
  var Build = class extends BaseCommand {
18
+ /**
19
+ * The command name
20
+ */
5
21
  static commandName = "build";
22
+ /**
23
+ * The command description
24
+ */
6
25
  static description = "Build application for production by compiling frontend assets and TypeScript source to JavaScript";
26
+ /**
27
+ * Help text for the command
28
+ */
7
29
  static help = [
8
30
  "Create the production build using the following command.",
9
31
  "```",
@@ -16,6 +38,11 @@ var Build = class extends BaseCommand {
16
38
  "{{ binaryName }} build --assets-args=\"--debug --base=/public\"",
17
39
  "```"
18
40
  ];
41
+ /**
42
+ * Log a development dependency is missing
43
+ *
44
+ * @param dependency - The name of the missing dependency
45
+ */
19
46
  #logMissingDevelopmentDependency(dependency) {
20
47
  this.logger.error([
21
48
  `Cannot find package "${dependency}"`,
@@ -25,6 +52,9 @@ var Build = class extends BaseCommand {
25
52
  "If you are using the build command inside a CI or with a deployment platform, make sure the NODE_ENV is set to \"development\""
26
53
  ].join("\n"));
27
54
  }
55
+ /**
56
+ * Build application
57
+ */
28
58
  async run() {
29
59
  const assembler = await importAssembler(this.app);
30
60
  if (!assembler) {
@@ -42,11 +72,19 @@ var Build = class extends BaseCommand {
42
72
  metaFiles: this.app.rcFile.metaFiles,
43
73
  hooks: this.app.rcFile.hooks
44
74
  });
75
+ /**
76
+ * Share command logger with assembler, so that CLI flags like --no-ansi has
77
+ * similar impact for assembler logs as well.
78
+ */
45
79
  bundler.ui.logger = this.logger;
80
+ /**
81
+ * Bundle project for production
82
+ */
46
83
  const stopOnError = this.ignoreTsErrors === true ? false : true;
47
84
  if (!await bundler.bundle(stopOnError, this.packageManager)) this.exitCode = 1;
48
85
  }
49
86
  };
50
87
  __decorate([flags.boolean({ description: "Ignore TypeScript errors and continue with the build process" })], Build.prototype, "ignoreTsErrors", void 0);
51
88
  __decorate([flags.string({ description: "Define the package manager to copy the appropriate lock file" })], Build.prototype, "packageManager", void 0);
89
+ //#endregion
52
90
  export { Build as default };
@@ -1 +1 @@
1
- {"commands":[{"commandName":"add","description":"Install and configure one or more packages","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager you want to use"},{"name":"dev","flagName":"dev","required":false,"type":"boolean","description":"Should we install the package as a dev dependency","alias":"D"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files"}],"args":[{"name":"names","argumentName":"names","required":true,"description":"Package names to install and configure","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"add.js"},{"commandName":"build","description":"Build application for production by compiling frontend assets and TypeScript source to JavaScript","help":["Create the production build using the following command.","```","{{ binaryName }} build","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} build --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"ignoreTsErrors","flagName":"ignore-ts-errors","required":false,"type":"boolean","description":"Ignore TypeScript errors and continue with the build process"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager to copy the appropriate lock file"}],"args":[],"options":{},"filePath":"build.js"},{"commandName":"configure","description":"Configure a package after it has been installed","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode","alias":"v"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files","alias":"f"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"configure.js"},{"commandName":"eject","description":"Eject scaffolding stubs to your application root","help":"","namespace":null,"aliases":[],"flags":[{"name":"pkg","flagName":"pkg","required":false,"type":"string","description":"Mention package name for searching stubs","default":"@adonisjs/core"}],"args":[{"name":"stubPath","argumentName":"stub-path","required":true,"description":"Path to the stubs directory or a single stub file","type":"string"}],"options":{},"filePath":"eject.js"},{"commandName":"env:add","description":"Add a new environment variable","help":"","namespace":"env","aliases":[],"flags":[{"name":"type","flagName":"type","required":false,"type":"string","description":"Type of the variable"},{"name":"enumValues","flagName":"enum-values","required":false,"type":"array","description":"Allowed values for the enum type in a comma-separated list","default":[""]}],"args":[{"name":"name","argumentName":"name","required":false,"description":"Variable name. Will be converted to screaming snake case","type":"string"},{"name":"value","argumentName":"value","required":false,"description":"Variable value","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"env/add.js"},{"commandName":"generate:key","description":"Generate a cryptographically secure random application key","help":"","namespace":"generate","aliases":[],"flags":[{"name":"show","flagName":"show","required":false,"type":"boolean","description":"Display the key on the terminal, instead of writing it to .env file"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Force update .env file in production environment"}],"args":[],"options":{},"filePath":"generate_key.js"},{"commandName":"inspect:rcfile","description":"Inspect the RC file with its default values","help":"","namespace":"inspect","aliases":[],"flags":[],"args":[],"options":{},"filePath":"inspect_rcfile.js"},{"commandName":"list:routes","description":"List application routes. This command will boot the application in the console environment","help":"","namespace":"list","aliases":[],"flags":[{"name":"middleware","flagName":"middleware","required":false,"type":"array","description":"View routes that includes all the mentioned middleware names. Use * to see routes that are using one or more middleware"},{"name":"ignoreMiddleware","flagName":"ignore-middleware","required":false,"type":"array","description":"View routes that does not include all the mentioned middleware names. Use * to see routes that are using zero middleware"},{"name":"json","flagName":"json","required":false,"type":"boolean","description":"Get routes list as a JSON string"},{"name":"table","flagName":"table","required":false,"type":"boolean","description":"View list of routes as a table"}],"args":[{"name":"match","argumentName":"match","required":false,"description":"Find routes matching the given keyword. Route name, pattern and controller name will be searched against the keyword","type":"string"}],"options":{"startApp":true},"filePath":"list/routes.js"},{"commandName":"make:command","description":"Create a new ace command class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the command","type":"string"}],"options":{},"filePath":"make/command.js"},{"commandName":"make:controller","description":"Create a new HTTP controller class","help":"","namespace":"make","aliases":[],"flags":[{"name":"singular","flagName":"singular","required":false,"type":"boolean","description":"Generate controller in singular form","alias":"s"},{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Generate resourceful controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller without the \"edit\" and the \"create\" methods","alias":"a"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"The name of the controller","type":"string"},{"name":"actions","argumentName":"actions","required":false,"description":"Create controller with custom method names","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"make/controller.js"},{"commandName":"make:event","description":"Create a new event class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/event.js"},{"commandName":"make:exception","description":"Create a new custom exception class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the exception","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/exception.js"},{"commandName":"make:listener","description":"Create a new event listener class","help":"","namespace":"make","aliases":[],"flags":[{"name":"event","flagName":"event","required":false,"type":"string","description":"Generate an event class alongside the listener","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event listener","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/listener.js"},{"commandName":"make:middleware","description":"Create a new middleware class for HTTP requests","help":"","namespace":"make","aliases":[],"flags":[{"name":"stack","flagName":"stack","required":false,"type":"string","description":"The stack in which to register the middleware","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the middleware","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/middleware.js"},{"commandName":"make:preload","description":"Create a new preload file inside the start directory","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the preload file inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the preload file's environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the preload file","type":"string"}],"options":{},"filePath":"make/preload.js"},{"commandName":"make:provider","description":"Create a new service provider class","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the provider inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the provider environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the provider","type":"string"}],"options":{},"filePath":"make/provider.js"},{"commandName":"make:service","description":"Create a new service class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the service","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/service.js"},{"commandName":"make:test","description":"Create a new Japa test file","help":"","namespace":"make","aliases":[],"flags":[{"name":"suite","flagName":"suite","required":false,"type":"string","description":"The suite for which to create the test file","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.js"},{"commandName":"make:transformer","description":"Create a new transformer class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Entity name for which to generate the transformer","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/transformer.js"},{"commandName":"make:validator","description":"Create a new file to define VineJS validators","help":"","namespace":"make","aliases":[],"flags":[{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Create a file with pre-defined validators for create and update actions"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the validator file","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/validator.js"},{"commandName":"make:view","description":"Create a new Edge.js template file","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the template","type":"string"}],"options":{},"filePath":"make/view.js"},{"commandName":"repl","description":"Start a new REPL session","help":"","namespace":null,"aliases":[],"flags":[],"args":[],"options":{"startApp":true,"staysAlive":true},"filePath":"repl.js"},{"commandName":"serve","description":"Start the development HTTP server along with the file watcher to perform restarts on file change","help":["Start the development server with file watcher using the following command.","```","{{ binaryName }} serve --watch","```","","You can also start the server with HMR support using the following command.","```","{{ binaryName }} serve --hmr","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} serve --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"hmr","flagName":"hmr","required":false,"type":"boolean","description":"Start the server with HMR support"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and restart the HTTP server on file change","alias":"w"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes","alias":"p"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[],"options":{"staysAlive":true},"filePath":"serve.js"},{"commandName":"test","description":"Run tests along with the file watcher to re-run tests on file change","help":"","namespace":null,"aliases":[],"flags":[{"name":"files","flagName":"files","required":false,"type":"array","description":"Filter tests by the filename"},{"name":"tags","flagName":"tags","required":false,"type":"array","description":"Filter tests by tags"},{"name":"groups","flagName":"groups","required":false,"type":"array","description":"Filter tests by parent group title"},{"name":"tests","flagName":"tests","required":false,"type":"array","description":"Filter tests by test title"},{"name":"reporters","flagName":"reporters","required":false,"type":"array","description":"Activate one or more test reporters"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and re-run tests on file change"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes"},{"name":"timeout","flagName":"timeout","required":false,"type":"number","description":"Define default timeout for all tests"},{"name":"retries","flagName":"retries","required":false,"type":"number","description":"Define default retries for all tests"},{"name":"failed","flagName":"failed","required":false,"type":"boolean","description":"Execute tests failed during the last run"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[{"name":"suites","argumentName":"suites","required":false,"description":"Mention suite names to run tests for selected suites","type":"spread"}],"options":{"allowUnknownFlags":true,"staysAlive":true},"filePath":"test.js"}],"version":1}
1
+ {"commands":[{"commandName":"add","description":"Install and configure one or more AdonisJS packages. Runs npm install followed by the package configure hook","help":["Use this command instead of manually running npm install + configure separately.","Accepts shorthand names: \"vinejs\" for @vinejs/vine, \"edge\" for edge.js.","```","{{ binaryName }} add @adonisjs/lucid","{{ binaryName }} add @adonisjs/auth @adonisjs/session","```"],"namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager you want to use"},{"name":"dev","flagName":"dev","required":false,"type":"boolean","description":"Should we install the package as a dev dependency","alias":"D"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files"}],"args":[{"name":"names","argumentName":"names","required":true,"description":"Package names to install and configure","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"add.js"},{"commandName":"build","description":"Build application for production by compiling frontend assets and TypeScript source to JavaScript","help":["Create the production build using the following command.","```","{{ binaryName }} build","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} build --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"ignoreTsErrors","flagName":"ignore-ts-errors","required":false,"type":"boolean","description":"Ignore TypeScript errors and continue with the build process"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager to copy the appropriate lock file"}],"args":[],"options":{},"filePath":"build.js"},{"commandName":"configure","description":"Run the configure hook of an already-installed package. Use \"add\" command instead to both install and configure in one step","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode","alias":"v"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files","alias":"f"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"configure.js"},{"commandName":"eject","description":"Copy scaffolding stubs from a package to your application for customization. Stubs are templates used by make:* commands","help":"","namespace":null,"aliases":[],"flags":[{"name":"pkg","flagName":"pkg","required":false,"type":"string","description":"Mention package name for searching stubs","default":"@adonisjs/core"}],"args":[{"name":"stubPath","argumentName":"stub-path","required":true,"description":"Path to the stubs directory or a single stub file","type":"string"}],"options":{},"filePath":"eject.js"},{"commandName":"env:add","description":"Add a new environment variable to .env, .env.example, and its validation rule to start/env.ts","help":"","namespace":"env","aliases":[],"flags":[{"name":"type","flagName":"type","required":false,"type":"string","description":"Type of the variable"},{"name":"enumValues","flagName":"enum-values","required":false,"type":"array","description":"Allowed values for the enum type in a comma-separated list","default":[""]}],"args":[{"name":"name","argumentName":"name","required":false,"description":"Variable name. Will be converted to screaming snake case","type":"string"},{"name":"value","argumentName":"value","required":false,"description":"Variable value","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"env/add.js"},{"commandName":"generate:key","description":"Generate a cryptographically secure APP_KEY and write it to the .env file. Use --show to print without writing","help":"","namespace":"generate","aliases":[],"flags":[{"name":"show","flagName":"show","required":false,"type":"boolean","description":"Display the key on the terminal, instead of writing it to .env file"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Force update .env file in production environment"}],"args":[],"options":{},"filePath":"generate_key.js"},{"commandName":"inspect:rcfile","description":"Display the resolved adonisrc.ts configuration as JSON, including providers, preloads, commands, and meta files","help":"","namespace":"inspect","aliases":[],"flags":[],"args":[],"options":{},"filePath":"inspect_rcfile.js"},{"commandName":"list:routes","description":"List all registered routes with their HTTP methods, URL patterns, handlers, and middleware","help":"","namespace":"list","aliases":[],"flags":[{"name":"middleware","flagName":"middleware","required":false,"type":"array","description":"View routes that includes all the mentioned middleware names. Use * to see routes that are using one or more middleware"},{"name":"ignoreMiddleware","flagName":"ignore-middleware","required":false,"type":"array","description":"View routes that does not include all the mentioned middleware names. Use * to see routes that are using zero middleware"},{"name":"json","flagName":"json","required":false,"type":"boolean","description":"Get routes list as a JSON string"},{"name":"table","flagName":"table","required":false,"type":"boolean","description":"View list of routes as a table"},{"name":"jsonl","flagName":"jsonl","required":false,"type":"boolean","description":"Get routes as JSONL, one JSON object per line (optimized for AI agents)"}],"args":[{"name":"match","argumentName":"match","required":false,"description":"Find routes matching the given keyword. Route name, pattern and controller name will be searched against the keyword","type":"string"}],"options":{"startApp":true},"filePath":"list/routes.js"},{"commandName":"make:command","description":"Create a new Ace CLI command class in commands/","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the command","type":"string"}],"options":{},"filePath":"make/command.js"},{"commandName":"make:controller","description":"Create a new HTTP controller class in app/controllers. Use --resource for CRUD methods or --api for API-only CRUD (no create/edit)","help":"","namespace":"make","aliases":[],"flags":[{"name":"singular","flagName":"singular","required":false,"type":"boolean","description":"Generate controller in singular form","alias":"s"},{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Generate resourceful controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller without the \"edit\" and the \"create\" methods","alias":"a"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"The name of the controller","type":"string"},{"name":"actions","argumentName":"actions","required":false,"description":"Create controller with custom method names","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"make/controller.js"},{"commandName":"make:event","description":"Create a new event class in app/events. Events are dispatched via emitter and handled by listeners","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/event.js"},{"commandName":"make:exception","description":"Create a new custom exception class in app/exceptions with handle and report methods","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the exception","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/exception.js"},{"commandName":"make:listener","description":"Create a new event listener class in app/listeners. Use --event to also generate the event class and bind them together","help":"","namespace":"make","aliases":[],"flags":[{"name":"event","flagName":"event","required":false,"type":"string","description":"Generate an event class alongside the listener","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event listener","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/listener.js"},{"commandName":"make:middleware","description":"Create a new middleware class in app/middleware and register it in start/kernel.ts under the chosen stack (server, router, or named)","help":"","namespace":"make","aliases":[],"flags":[{"name":"stack","flagName":"stack","required":false,"type":"string","description":"The stack in which to register the middleware","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the middleware","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/middleware.js"},{"commandName":"make:preload","description":"Create a new preload file in start/ and optionally register it in adonisrc.ts. Preload files run during app boot","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the preload file inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the preload file's environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the preload file","type":"string"}],"options":{},"filePath":"make/preload.js"},{"commandName":"make:provider","description":"Create a new service provider in providers/ and optionally register it in adonisrc.ts. Providers register IoC container bindings","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the provider inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the provider environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the provider","type":"string"}],"options":{},"filePath":"make/provider.js"},{"commandName":"make:service","description":"Create a new service class in app/services. Services encapsulate reusable business logic outside of controllers","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the service","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/service.js"},{"commandName":"make:test","description":"Create a new Japa test file in tests/. Use --suite to specify the test suite (unit, functional, etc.)","help":"","namespace":"make","aliases":[],"flags":[{"name":"suite","flagName":"suite","required":false,"type":"string","description":"The suite for which to create the test file","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.js"},{"commandName":"make:transformer","description":"Create a new transformer class in app/transformers for serializing data in API responses","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Entity name for which to generate the transformer","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/transformer.js"},{"commandName":"make:validator","description":"Create a new VineJS validator file in app/validators. Use --resource to generate both create and update validation schemas","help":"","namespace":"make","aliases":[],"flags":[{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Create a file with pre-defined validators for create and update actions"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the validator file","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/validator.js"},{"commandName":"make:view","description":"Create a new Edge.js template file in resources/views","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the template","type":"string"}],"options":{},"filePath":"make/view.js"},{"commandName":"repl","description":"Start an interactive REPL session with the application booted and IoC container available","help":"","namespace":null,"aliases":[],"flags":[],"args":[],"options":{"startApp":true,"staysAlive":true},"filePath":"repl.js"},{"commandName":"serve","description":"Start the development HTTP server. Use --watch for auto-restart on file change or --hmr for hot module replacement","help":["Start the development server with file watcher using the following command.","```","{{ binaryName }} serve --watch","```","","You can also start the server with HMR support using the following command.","```","{{ binaryName }} serve --hmr","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} serve --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"hmr","flagName":"hmr","required":false,"type":"boolean","description":"Start the server with HMR support"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and restart the HTTP server on file change","alias":"w"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes","alias":"p"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[],"options":{"staysAlive":true},"filePath":"serve.js"},{"commandName":"test","description":"Run tests using Japa test runner. Supports filtering by suite, file, tag, and group. Use --watch for re-runs on file change","help":"","namespace":null,"aliases":[],"flags":[{"name":"files","flagName":"files","required":false,"type":"array","description":"Filter tests by the filename"},{"name":"tags","flagName":"tags","required":false,"type":"array","description":"Filter tests by tags"},{"name":"groups","flagName":"groups","required":false,"type":"array","description":"Filter tests by parent group title"},{"name":"tests","flagName":"tests","required":false,"type":"array","description":"Filter tests by test title"},{"name":"reporters","flagName":"reporters","required":false,"type":"array","description":"Activate one or more test reporters"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and re-run tests on file change"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes"},{"name":"timeout","flagName":"timeout","required":false,"type":"number","description":"Define default timeout for all tests"},{"name":"retries","flagName":"retries","required":false,"type":"number","description":"Define default retries for all tests"},{"name":"failed","flagName":"failed","required":false,"type":"boolean","description":"Execute tests failed during the last run"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[{"name":"suites","argumentName":"suites","required":false,"description":"Mention suite names to run tests for selected suites","type":"spread"}],"options":{"allowUnknownFlags":true,"staysAlive":true},"filePath":"test.js"}],"version":1}
@@ -1,17 +1,56 @@
1
- import { t as stubsRoot } from "../main-kn40V-hF.js";
2
- import { f as BaseCommand, l as flags, o as args } from "../main-MBAMnmJb.js";
3
- import { t as __decorate } from "../decorate-DmrZA614.js";
1
+ import "../chunk-Do49iUES.js";
2
+ import { t as stubsRoot } from "../main-CfTiGsiS.js";
3
+ import { f as BaseCommand, l as flags, o as args } from "../main-CRnMnrH7.js";
4
+ import { t as __decorate } from "../decorate-B9Uz0anB.js";
4
5
  import { RuntimeException } from "@poppinss/utils/exception";
6
+ //#region commands/configure.ts
7
+ /**
8
+ * Command to configure packages after installation by running their configuration hooks.
9
+ * Supports built-in configurations for VineJS, Edge, and health checks, or can execute
10
+ * custom configure functions exported by packages.
11
+ *
12
+ * @example
13
+ * ```
14
+ * ace configure @adonisjs/lucid
15
+ * ace configure vinejs
16
+ * ace configure edge
17
+ * ace configure health_checks
18
+ * ace configure @adonisjs/auth --force --verbose
19
+ * ```
20
+ */
5
21
  var Configure = class extends BaseCommand {
22
+ /**
23
+ * The command name
24
+ */
6
25
  static commandName = "configure";
7
- static description = "Configure a package after it has been installed";
26
+ /**
27
+ * The command description
28
+ */
29
+ static description = "Run the configure hook of an already-installed package. Use \"add\" command instead to both install and configure in one step";
30
+ /**
31
+ * Command options configuration.
32
+ * Allows unknown flags to be passed to package configure functions.
33
+ */
8
34
  static options = { allowUnknownFlags: true };
35
+ /**
36
+ * Expose all flags from the protected property "parsed" for access by package configure functions
37
+ */
9
38
  get parsedFlags() {
10
39
  return this.parsed.flags;
11
40
  }
41
+ /**
42
+ * Expose all arguments from the protected property "parsed" for access by package configure functions
43
+ */
12
44
  get parsedArgs() {
13
45
  return this.parsed._;
14
46
  }
47
+ /**
48
+ * Import and return the main exports of a package.
49
+ * Returns null if the package is not found, rethrows other errors.
50
+ *
51
+ * @param packageName - The name of the package to import
52
+ * @returns The package exports or null if not found
53
+ */
15
54
  async #getPackageSource(packageName) {
16
55
  try {
17
56
  return await this.app.import(packageName);
@@ -20,17 +59,26 @@ var Configure = class extends BaseCommand {
20
59
  throw error;
21
60
  }
22
61
  }
62
+ /**
63
+ * Configure VineJS validation library by registering its provider in the RC file
64
+ */
23
65
  async #configureVineJS() {
24
66
  await (await this.createCodemods()).updateRcFile((rcFile) => {
25
67
  rcFile.addProvider("@adonisjs/core/providers/vinejs_provider");
26
68
  });
27
69
  }
70
+ /**
71
+ * Configure Edge template engine by registering its provider and adding view meta files
72
+ */
28
73
  async #configureEdge() {
29
74
  await (await this.createCodemods()).updateRcFile((rcFile) => {
30
75
  rcFile.addProvider("@adonisjs/core/providers/edge_provider");
31
76
  rcFile.addMetaFile("resources/views/**/*.edge", false);
32
77
  });
33
78
  }
79
+ /**
80
+ * Configure health checks feature by generating the main health file and controller
81
+ */
34
82
  async #configureHealthChecks() {
35
83
  const codemods = await this.createCodemods();
36
84
  await codemods.makeUsingStub(stubsRoot, "make/health/main.stub", {
@@ -42,12 +90,20 @@ var Configure = class extends BaseCommand {
42
90
  entity: this.app.generators.createEntity("health_checks")
43
91
  });
44
92
  }
93
+ /**
94
+ * Create a codemods instance configured with command options.
95
+ * Sets overwrite and verbose flags based on command arguments.
96
+ */
45
97
  async createCodemods() {
46
98
  const codemods = await super.createCodemods();
47
99
  codemods.overwriteExisting = this.force === true;
48
100
  codemods.verboseInstallOutput = this.verbose === true;
49
101
  return codemods;
50
102
  }
103
+ /**
104
+ * Execute the configure command. Handles built-in configurations for VineJS, Edge,
105
+ * and health checks, or imports and executes the configure function from the specified package.
106
+ */
51
107
  async run() {
52
108
  if (this.name === "vinejs") return this.#configureVineJS();
53
109
  if (this.name === "edge") return this.#configureEdge();
@@ -58,11 +114,20 @@ var Configure = class extends BaseCommand {
58
114
  this.exitCode = 1;
59
115
  return;
60
116
  }
117
+ /**
118
+ * Warn, there are not instructions to run
119
+ */
61
120
  if (!packageExports.configure) {
62
121
  this.logger.warning(`Cannot configure module "${this.name}". The module does not export the configure hook`);
63
122
  return;
64
123
  }
124
+ /**
125
+ * Set stubsRoot property when package exports it
126
+ */
65
127
  if (packageExports.stubsRoot) this.stubsRoot = packageExports.stubsRoot;
128
+ /**
129
+ * Run instructions
130
+ */
66
131
  try {
67
132
  await packageExports.configure(this);
68
133
  } catch (error) {
@@ -79,4 +144,5 @@ __decorate([flags.boolean({
79
144
  description: "Forcefully overwrite existing files",
80
145
  alias: "f"
81
146
  })], Configure.prototype, "force", void 0);
147
+ //#endregion
82
148
  export { Configure as default };
@@ -1,9 +1,34 @@
1
- import stringHelpers from "../src/helpers/string.js";
2
- import { f as BaseCommand, l as flags, o as args } from "../main-MBAMnmJb.js";
3
- import { t as __decorate } from "../decorate-DmrZA614.js";
1
+ import "../chunk-Do49iUES.js";
2
+ import { t as stringHelpers } from "../string-8_8He-HH.js";
3
+ import { f as BaseCommand, l as flags, o as args } from "../main-CRnMnrH7.js";
4
+ import { t as __decorate } from "../decorate-B9Uz0anB.js";
5
+ //#region commands/eject.ts
6
+ /**
7
+ * Command to eject scaffolding stubs from packages to your application root.
8
+ * This allows you to customize templates used by make commands and other
9
+ * code generation features by copying them to your local application.
10
+ *
11
+ * @example
12
+ * ```
13
+ * ace eject make/controller
14
+ * ace eject make/controller --pkg=@adonisjs/lucid
15
+ * ace eject stubs/
16
+ * ```
17
+ */
4
18
  var Eject = class extends BaseCommand {
19
+ /**
20
+ * The command name
21
+ */
5
22
  static commandName = "eject";
6
- static description = "Eject scaffolding stubs to your application root";
23
+ /**
24
+ * The command description
25
+ */
26
+ static description = "Copy scaffolding stubs from a package to your application for customization. Stubs are templates used by make:* commands";
27
+ /**
28
+ * Execute the command to eject stubs from the specified package.
29
+ * Copies the stubs to the application root and logs success messages
30
+ * for each ejected file.
31
+ */
7
32
  async run() {
8
33
  (await (await this.app.stubs.create()).copy(this.stubPath, { pkg: this.pkg })).forEach((stubPath) => {
9
34
  this.logger.success(`eject ${stringHelpers.toUnixSlash(this.app.relativePath(stubPath))}`);
@@ -15,4 +40,5 @@ __decorate([flags.string({
15
40
  description: "Mention package name for searching stubs",
16
41
  default: "@adonisjs/core"
17
42
  })], Eject.prototype, "pkg", void 0);
43
+ //#endregion
18
44
  export { Eject as default };