@adonisjs/core 6.19.0 → 7.0.0-next.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 (171) hide show
  1. package/build/commands/add.d.ts +4 -5
  2. package/build/commands/add.js +7 -60
  3. package/build/commands/build.d.ts +1 -3
  4. package/build/commands/build.js +4 -36
  5. package/build/commands/commands.json +1 -1
  6. package/build/commands/configure.d.ts +3 -3
  7. package/build/commands/configure.js +3 -3
  8. package/build/commands/eject.d.ts +1 -1
  9. package/build/commands/eject.js +3 -3
  10. package/build/commands/env/add.d.ts +2 -2
  11. package/build/commands/env/add.js +2 -2
  12. package/build/commands/generate_key.d.ts +1 -1
  13. package/build/commands/generate_key.js +1 -1
  14. package/build/commands/inspect_rcfile.d.ts +1 -1
  15. package/build/commands/inspect_rcfile.js +1 -1
  16. package/build/commands/list/routes.d.ts +2 -2
  17. package/build/commands/list/routes.js +2 -2
  18. package/build/commands/make/command.d.ts +1 -1
  19. package/build/commands/make/command.js +3 -3
  20. package/build/commands/make/controller.d.ts +2 -2
  21. package/build/commands/make/controller.js +2 -2
  22. package/build/commands/make/event.d.ts +2 -2
  23. package/build/commands/make/event.js +2 -2
  24. package/build/commands/make/exception.d.ts +2 -2
  25. package/build/commands/make/exception.js +2 -2
  26. package/build/commands/make/listener.d.ts +2 -2
  27. package/build/commands/make/listener.js +2 -2
  28. package/build/commands/make/middleware.d.ts +2 -2
  29. package/build/commands/make/middleware.js +4 -4
  30. package/build/commands/make/preload.d.ts +1 -1
  31. package/build/commands/make/preload.js +4 -4
  32. package/build/commands/make/provider.d.ts +1 -1
  33. package/build/commands/make/provider.js +4 -4
  34. package/build/commands/make/service.d.ts +2 -2
  35. package/build/commands/make/service.js +2 -2
  36. package/build/commands/make/test.d.ts +1 -1
  37. package/build/commands/make/test.js +2 -2
  38. package/build/commands/make/validator.d.ts +2 -2
  39. package/build/commands/make/validator.js +2 -2
  40. package/build/commands/make/view.d.ts +1 -1
  41. package/build/commands/make/view.js +2 -2
  42. package/build/commands/repl.d.ts +2 -2
  43. package/build/commands/repl.js +1 -1
  44. package/build/commands/serve.d.ts +2 -4
  45. package/build/commands/serve.js +11 -43
  46. package/build/commands/test.d.ts +2 -4
  47. package/build/commands/test.js +4 -32
  48. package/build/factories/core/ace.d.ts +31 -4
  49. package/build/factories/core/ace.js +20 -4
  50. package/build/factories/core/ignitor.d.ts +80 -9
  51. package/build/factories/core/ignitor.js +84 -13
  52. package/build/factories/core/main.d.ts +3 -3
  53. package/build/factories/core/main.js +3 -3
  54. package/build/factories/core/test_utils.d.ts +32 -4
  55. package/build/factories/core/test_utils.js +21 -4
  56. package/build/factories/stubs.d.ts +54 -5
  57. package/build/factories/stubs.js +55 -6
  58. package/build/index.d.ts +5 -4
  59. package/build/index.js +13 -9
  60. package/build/modules/ace/codemods.d.ts +71 -11
  61. package/build/modules/ace/codemods.js +90 -22
  62. package/build/modules/ace/commands.d.ts +49 -13
  63. package/build/modules/ace/commands.js +48 -10
  64. package/build/modules/ace/create_kernel.d.ts +19 -8
  65. package/build/modules/ace/create_kernel.js +19 -8
  66. package/build/modules/ace/kernel.d.ts +18 -4
  67. package/build/modules/ace/kernel.js +17 -3
  68. package/build/modules/ace/main.d.ts +3 -3
  69. package/build/modules/ace/main.js +3 -3
  70. package/build/modules/dumper/define_config.d.ts +25 -4
  71. package/build/modules/dumper/define_config.js +23 -2
  72. package/build/modules/dumper/dumper.d.ts +82 -12
  73. package/build/modules/dumper/dumper.js +82 -12
  74. package/build/modules/dumper/errors.d.ts +31 -10
  75. package/build/modules/dumper/errors.js +28 -7
  76. package/build/modules/dumper/main.d.ts +3 -3
  77. package/build/modules/dumper/main.js +3 -3
  78. package/build/modules/dumper/plugins/edge.d.ts +1 -1
  79. package/build/modules/hash/define_config.d.ts +53 -8
  80. package/build/modules/hash/define_config.js +51 -6
  81. package/build/modules/hash/main.d.ts +1 -1
  82. package/build/modules/hash/main.js +1 -1
  83. package/build/modules/http/main.d.ts +1 -1
  84. package/build/modules/http/main.js +1 -1
  85. package/build/modules/http/request_validator.d.ts +36 -9
  86. package/build/modules/http/request_validator.js +32 -5
  87. package/build/modules/transformers/main.d.ts +1 -0
  88. package/build/modules/transformers/main.js +9 -0
  89. package/build/providers/app_provider.d.ts +173 -1
  90. package/build/providers/app_provider.js +204 -8
  91. package/build/providers/edge_provider.d.ts +31 -2
  92. package/build/providers/edge_provider.js +31 -2
  93. package/build/providers/hash_provider.d.ts +38 -1
  94. package/build/providers/hash_provider.js +40 -3
  95. package/build/providers/repl_provider.d.ts +40 -1
  96. package/build/providers/repl_provider.js +52 -2
  97. package/build/providers/vinejs_provider.d.ts +32 -5
  98. package/build/providers/vinejs_provider.js +31 -4
  99. package/build/services/ace.d.ts +1 -1
  100. package/build/services/ace.js +1 -1
  101. package/build/services/app.d.ts +1 -1
  102. package/build/services/config.d.ts +1 -1
  103. package/build/services/config.js +1 -1
  104. package/build/services/dumper.js +1 -1
  105. package/build/services/emitter.d.ts +1 -1
  106. package/build/services/emitter.js +1 -1
  107. package/build/services/encryption.d.ts +1 -1
  108. package/build/services/encryption.js +1 -1
  109. package/build/services/hash.d.ts +1 -1
  110. package/build/services/hash.js +1 -1
  111. package/build/services/logger.d.ts +1 -1
  112. package/build/services/logger.js +1 -1
  113. package/build/services/repl.d.ts +1 -1
  114. package/build/services/repl.js +1 -1
  115. package/build/services/router.d.ts +1 -1
  116. package/build/services/router.js +1 -1
  117. package/build/services/server.d.ts +1 -1
  118. package/build/services/server.js +1 -1
  119. package/build/services/test_utils.d.ts +1 -1
  120. package/build/services/test_utils.js +1 -1
  121. package/build/services/url_builder.d.ts +4 -0
  122. package/build/services/url_builder.js +21 -0
  123. package/build/src/assembler_hooks/index_entities.d.ts +51 -0
  124. package/build/src/assembler_hooks/index_entities.js +96 -0
  125. package/build/src/cli_formatters/routes_list.d.ts +24 -12
  126. package/build/src/cli_formatters/routes_list.js +43 -46
  127. package/build/src/config_provider.d.ts +48 -3
  128. package/build/src/config_provider.js +47 -2
  129. package/build/src/debug.d.ts +15 -0
  130. package/build/src/debug.js +15 -0
  131. package/build/src/exceptions.d.ts +41 -1
  132. package/build/src/exceptions.js +41 -1
  133. package/build/src/helpers/assert.d.ts +47 -1
  134. package/build/src/helpers/assert.js +47 -1
  135. package/build/src/helpers/is.d.ts +21 -0
  136. package/build/src/helpers/is.js +21 -0
  137. package/build/src/helpers/main.d.ts +48 -5
  138. package/build/src/helpers/main.js +48 -5
  139. package/build/src/helpers/string.d.ts +89 -9
  140. package/build/src/helpers/string.js +15 -2
  141. package/build/src/helpers/types.d.ts +96 -2
  142. package/build/src/helpers/types.js +96 -2
  143. package/build/src/helpers/verification_token.d.ts +22 -1
  144. package/build/src/helpers/verification_token.js +24 -2
  145. package/build/src/ignitor/ace.d.ts +23 -3
  146. package/build/src/ignitor/ace.js +21 -1
  147. package/build/src/ignitor/http.d.ts +16 -3
  148. package/build/src/ignitor/http.js +16 -3
  149. package/build/src/ignitor/main.d.ts +29 -6
  150. package/build/src/ignitor/main.js +30 -7
  151. package/build/src/ignitor/test.d.ts +26 -3
  152. package/build/src/ignitor/test.js +24 -1
  153. package/build/src/test_utils/http.d.ts +19 -3
  154. package/build/src/test_utils/http.js +24 -3
  155. package/build/src/test_utils/main.d.ts +22 -4
  156. package/build/src/test_utils/main.js +21 -3
  157. package/build/src/types.d.ts +277 -26
  158. package/build/src/utils.d.ts +34 -0
  159. package/build/src/utils.js +49 -0
  160. package/build/src/vine.d.ts +24 -1
  161. package/build/src/vine.js +27 -1
  162. package/build/stubs/main.js +1 -2
  163. package/build/toolkit/main.js +1 -1
  164. package/build/types/helpers.d.ts +2 -1
  165. package/build/types/transformers.d.ts +1 -0
  166. package/build/types/transformers.js +9 -0
  167. package/package.json +51 -50
  168. package/build/src/helpers/parse_binding_reference.d.ts +0 -45
  169. package/build/src/helpers/parse_binding_reference.js +0 -83
  170. package/build/src/internal_helpers.d.ts +0 -15
  171. package/build/src/internal_helpers.js +0 -63
@@ -1,6 +1,6 @@
1
- import { CommandOptions } from '../types/ace.js';
2
- import { BaseCommand } from '../modules/ace/main.js';
3
- declare const KNOWN_PACKAGE_MANAGERS: readonly ["npm", "pnpm", "bun", "yarn", "yarn@berry", "pnpm@6"];
1
+ import { type CommandOptions } from '../types/ace.ts';
2
+ import { BaseCommand } from '../modules/ace/main.ts';
3
+ import { type SupportedPackageManager } from '@adonisjs/assembler/types';
4
4
  /**
5
5
  * The install command is used to `npm install` and `node ace configure` a new package
6
6
  * in one go.
@@ -12,7 +12,7 @@ export default class Add extends BaseCommand {
12
12
  static options: CommandOptions;
13
13
  name: string;
14
14
  verbose?: boolean;
15
- packageManager?: (typeof KNOWN_PACKAGE_MANAGERS)[number];
15
+ packageManager?: SupportedPackageManager;
16
16
  dev?: boolean;
17
17
  force?: boolean;
18
18
  /**
@@ -20,4 +20,3 @@ export default class Add extends BaseCommand {
20
20
  */
21
21
  run(): Promise<void>;
22
22
  }
23
- export {};
@@ -12,9 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { detectPackageManager, installPackage } from '@antfu/install-pkg';
16
- import { args, BaseCommand, flags } from '../modules/ace/main.js';
17
- const KNOWN_PACKAGE_MANAGERS = ['npm', 'pnpm', 'bun', 'yarn', 'yarn@berry', 'pnpm@6'];
15
+ import { args, BaseCommand, flags } from "../modules/ace/main.js";
18
16
  /**
19
17
  * The install command is used to `npm install` and `node ace configure` a new package
20
18
  * in one go.
@@ -25,16 +23,6 @@ export default class Add extends BaseCommand {
25
23
  static options = {
26
24
  allowUnknownFlags: true,
27
25
  };
28
- /**
29
- * Detect the package manager to use
30
- */
31
- async #getPackageManager() {
32
- const packageManager = this.packageManager || (await detectPackageManager(this.app.makePath())) || 'npm';
33
- if (KNOWN_PACKAGE_MANAGERS.some((knownPackageManager) => knownPackageManager === packageManager)) {
34
- return packageManager;
35
- }
36
- throw new Error('Invalid package manager. Must be one of npm, pnpm, bun or yarn');
37
- }
38
26
  /**
39
27
  * Configure the package by delegating the work to the `node ace configure` command
40
28
  */
@@ -53,40 +41,10 @@ export default class Add extends BaseCommand {
53
41
  ].filter(Boolean);
54
42
  return await this.kernel.exec('configure', configureArgs);
55
43
  }
56
- /**
57
- * Install the package using the selected package manager
58
- */
59
- async #installPackage(npmPackageName) {
60
- const colors = this.colors;
61
- const spinner = this.logger
62
- .await(`installing ${colors.green(this.name)} using ${colors.grey(this.packageManager)}`)
63
- .start();
64
- spinner.start();
65
- try {
66
- await installPackage(npmPackageName, {
67
- dev: this.dev,
68
- silent: this.verbose === true ? false : true,
69
- cwd: this.app.makePath(),
70
- packageManager: this.packageManager,
71
- });
72
- spinner.update('package installed successfully');
73
- spinner.stop();
74
- return true;
75
- }
76
- catch (error) {
77
- spinner.update('unable to install the package');
78
- spinner.stop();
79
- this.logger.fatal(error);
80
- this.exitCode = 1;
81
- return false;
82
- }
83
- }
84
44
  /**
85
45
  * Run method is invoked by ace automatically
86
46
  */
87
47
  async run() {
88
- const colors = this.colors;
89
- this.packageManager = await this.#getPackageManager();
90
48
  /**
91
49
  * Handle special packages to configure
92
50
  */
@@ -97,23 +55,12 @@ export default class Add extends BaseCommand {
97
55
  else if (this.name === 'edge') {
98
56
  npmPackageName = 'edge.js';
99
57
  }
100
- /**
101
- * Prompt the user to confirm the installation
102
- */
103
- const cmd = colors.grey(`${this.packageManager} add ${this.dev ? '-D ' : ''}${this.name}`);
104
- this.logger.info(`Installing the package using the following command : ${cmd}`);
105
- const shouldInstall = await this.prompt.confirm('Continue ?', {
106
- name: 'install',
107
- default: true,
108
- });
109
- if (!shouldInstall) {
110
- this.logger.info('Installation cancelled');
111
- return;
112
- }
113
58
  /**
114
59
  * Install package
115
60
  */
116
- const pkgWasInstalled = await this.#installPackage(npmPackageName);
61
+ const codemods = await this.createCodemods();
62
+ codemods.verboseInstallOutput = !!this.verbose;
63
+ const pkgWasInstalled = await codemods.installPackages([{ name: npmPackageName, isDevDependency: !!this.dev }], this.packageManager);
117
64
  if (!pkgWasInstalled) {
118
65
  return;
119
66
  }
@@ -123,10 +70,10 @@ export default class Add extends BaseCommand {
123
70
  const { exitCode } = await this.#configurePackage();
124
71
  this.exitCode = exitCode;
125
72
  if (exitCode === 0) {
126
- this.logger.success(`Installed and configured ${colors.green(this.name)}`);
73
+ this.logger.success(`Installed and configured ${this.colors.green(this.name)}`);
127
74
  }
128
75
  else {
129
- this.logger.fatal(`Unable to configure ${colors.green(this.name)}`);
76
+ this.logger.fatal(`Unable to configure ${this.colors.green(this.name)}`);
130
77
  }
131
78
  }
132
79
  }
@@ -137,7 +84,7 @@ __decorate([
137
84
  flags.boolean({ description: 'Display logs in verbose mode' })
138
85
  ], Add.prototype, "verbose", void 0);
139
86
  __decorate([
140
- flags.string({ description: 'Select the package manager you want to use' })
87
+ flags.string({ description: 'Define the package manager you want to use' })
141
88
  ], Add.prototype, "packageManager", void 0);
142
89
  __decorate([
143
90
  flags.boolean({ description: 'Should we install the package as a dev dependency', alias: 'D' })
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from '../modules/ace/main.js';
1
+ import { BaseCommand } from '../modules/ace/main.ts';
2
2
  /**
3
3
  * Create the production build by compiling TypeScript source and the
4
4
  * frontend assets
@@ -10,8 +10,6 @@ export default class Build extends BaseCommand {
10
10
  static help: string[];
11
11
  ignoreTsErrors?: boolean;
12
12
  packageManager?: 'npm' | 'pnpm' | 'yarn' | 'yarn@berry' | 'bun';
13
- assets?: boolean;
14
- assetsArgs?: string[];
15
13
  /**
16
14
  * Build application
17
15
  */
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { BaseCommand, flags } from '../modules/ace/main.js';
16
- import { detectAssetsBundler, importAssembler, importTypeScript } from '../src/internal_helpers.js';
15
+ import { BaseCommand, flags } from "../modules/ace/main.js";
16
+ import { importAssembler, importTypeScript } from "../src/utils.js";
17
17
  /**
18
18
  * Create the production build by compiling TypeScript source and the
19
19
  * frontend assets
@@ -45,22 +45,6 @@ export default class Build extends BaseCommand {
45
45
  'If you are using the build command inside a CI or with a deployment platform, make sure the NODE_ENV is set to "development"',
46
46
  ].join('\n'));
47
47
  }
48
- /**
49
- * Returns the assets bundler config
50
- */
51
- async #getAssetsBundlerConfig() {
52
- const assetsBundler = await detectAssetsBundler(this.app);
53
- return assetsBundler
54
- ? {
55
- enabled: this.assets === false ? false : true,
56
- driver: assetsBundler.name,
57
- cmd: assetsBundler.build.command,
58
- args: (assetsBundler.build.args || []).concat(this.assetsArgs || []),
59
- }
60
- : {
61
- enabled: false,
62
- };
63
- }
64
48
  /**
65
49
  * Build application
66
50
  */
@@ -78,18 +62,14 @@ export default class Build extends BaseCommand {
78
62
  return;
79
63
  }
80
64
  const bundler = new assembler.Bundler(this.app.appRoot, ts, {
81
- assets: await this.#getAssetsBundlerConfig(),
82
65
  metaFiles: this.app.rcFile.metaFiles,
83
- hooks: {
84
- onBuildStarting: this.app.rcFile.hooks?.onBuildStarting,
85
- onBuildCompleted: this.app.rcFile.hooks?.onBuildCompleted,
86
- },
66
+ hooks: this.app.rcFile.hooks,
87
67
  });
88
68
  /**
89
69
  * Share command logger with assembler, so that CLI flags like --no-ansi has
90
70
  * similar impact for assembler logs as well.
91
71
  */
92
- bundler.setLogger(this.logger);
72
+ bundler.ui.logger = this.logger;
93
73
  /**
94
74
  * Bundle project for production
95
75
  */
@@ -108,15 +88,3 @@ __decorate([
108
88
  description: 'Define the package manager to copy the appropriate lock file',
109
89
  })
110
90
  ], Build.prototype, "packageManager", void 0);
111
- __decorate([
112
- flags.boolean({
113
- description: 'Build frontend assets',
114
- showNegatedVariantInHelp: true,
115
- default: true,
116
- })
117
- ], Build.prototype, "assets", void 0);
118
- __decorate([
119
- flags.array({
120
- description: 'Define CLI arguments to pass to the assets bundler',
121
- })
122
- ], Build.prototype, "assetsArgs", void 0);
@@ -1 +1 @@
1
- {"commands":[{"commandName":"add","description":"Install and configure a package","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":"Select 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":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"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"},{"name":"assets","flagName":"assets","required":false,"type":"boolean","description":"Build frontend assets","showNegatedVariantInHelp":true,"default":true},{"name":"assetsArgs","flagName":"assets-args","required":false,"type":"array","description":"Define CLI arguments to pass to the assets bundler"}],"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":[],"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"}],"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":[],"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":[],"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"}],"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"}],"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"}],"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"}],"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":[],"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"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.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"}],"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":[],"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},{"name":"assets","flagName":"assets","required":false,"type":"boolean","description":"Start assets bundler dev server","showNegatedVariantInHelp":true,"default":true},{"name":"assetsArgs","flagName":"assets-args","required":false,"type":"array","description":"Define CLI arguments to pass to the assets bundler"}],"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},{"name":"assets","flagName":"assets","required":false,"type":"boolean","description":"Start assets bundler dev server.","showNegatedVariantInHelp":true,"default":true},{"name":"assetsArgs","flagName":"assets-args","required":false,"type":"array","description":"Define CLI arguments to pass to the assets bundler"}],"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 a package","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":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"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":[],"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"}],"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":[],"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":[],"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"}],"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"}],"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"}],"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"}],"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":[],"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"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.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"}],"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":[],"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,5 +1,5 @@
1
- import type { CommandOptions } from '../types/ace.js';
2
- import { BaseCommand } from '../modules/ace/main.js';
1
+ import type { CommandOptions } from '../types/ace.ts';
2
+ import { BaseCommand } from '../modules/ace/main.ts';
3
3
  /**
4
4
  * The configure command is used to configure packages after installation
5
5
  */
@@ -38,7 +38,7 @@ export default class Configure extends BaseCommand {
38
38
  /**
39
39
  * Creates codemods as per configure command options
40
40
  */
41
- createCodemods(): Promise<import("../modules/ace/codemods.js").Codemods>;
41
+ createCodemods(): Promise<import("../modules/ace/codemods.ts").Codemods>;
42
42
  /**
43
43
  * Run method is invoked by ace automatically
44
44
  */
@@ -12,9 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { stubsRoot } from '../stubs/main.js';
16
- import { args, BaseCommand, flags } from '../modules/ace/main.js';
17
- import { RuntimeException } from '@poppinss/utils';
15
+ import { RuntimeException } from '@poppinss/utils/exception';
16
+ import { stubsRoot } from "../stubs/main.js";
17
+ import { args, BaseCommand, flags } from "../modules/ace/main.js";
18
18
  /**
19
19
  * The configure command is used to configure packages after installation
20
20
  */
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from '../modules/ace/main.js';
1
+ import { BaseCommand } from '../modules/ace/main.ts';
2
2
  /**
3
3
  * The eject command is used to eject templates to the user
4
4
  * application codebase for customizing them
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { slash } from '@poppinss/utils';
16
- import { args, BaseCommand, flags } from '../modules/ace/main.js';
15
+ import { args, BaseCommand, flags } from "../modules/ace/main.js";
16
+ import stringHelpers from "../src/helpers/string.js";
17
17
  /**
18
18
  * The eject command is used to eject templates to the user
19
19
  * application codebase for customizing them
@@ -27,7 +27,7 @@ export default class Eject extends BaseCommand {
27
27
  pkg: this.pkg,
28
28
  });
29
29
  copied.forEach((stubPath) => {
30
- this.logger.success(`eject ${slash(this.app.relativePath(stubPath))}`);
30
+ this.logger.success(`eject ${stringHelpers.toUnixSlash(this.app.relativePath(stubPath))}`);
31
31
  });
32
32
  }
33
33
  }
@@ -1,5 +1,5 @@
1
- import { CommandOptions } from '../../types/ace.js';
2
- import { BaseCommand } from '../../modules/ace/main.js';
1
+ import { type CommandOptions } from '../../types/ace.ts';
2
+ import { BaseCommand } from '../../modules/ace/main.ts';
3
3
  declare const ALLOWED_TYPES: readonly ["string", "boolean", "number", "enum"];
4
4
  type AllowedTypes = (typeof ALLOWED_TYPES)[number];
5
5
  /**
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import stringHelpers from '../../src/helpers/string.js';
16
- import { args, BaseCommand, flags } from '../../modules/ace/main.js';
15
+ import stringHelpers from "../../src/helpers/string.js";
16
+ import { args, BaseCommand, flags } from "../../modules/ace/main.js";
17
17
  const ALLOWED_TYPES = ['string', 'boolean', 'number', 'enum'];
18
18
  /**
19
19
  * The env:add command is used to add a new environment variable to the
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from '../modules/ace/main.js';
1
+ import { BaseCommand } from '../modules/ace/main.ts';
2
2
  /**
3
3
  * The generate key command is used to generate the app key
4
4
  * and write it inside the .env file.
@@ -14,7 +14,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
14
14
  };
15
15
  import string from '@poppinss/utils/string';
16
16
  import { EnvEditor } from '@adonisjs/env/editor';
17
- import { BaseCommand, flags } from '../modules/ace/main.js';
17
+ import { BaseCommand, flags } from "../modules/ace/main.js";
18
18
  /**
19
19
  * The generate key command is used to generate the app key
20
20
  * and write it inside the .env file.
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from '../modules/ace/main.js';
1
+ import { BaseCommand } from '../modules/ace/main.ts';
2
2
  /**
3
3
  * Prints the RcFile file contents to the terminal
4
4
  */
@@ -6,7 +6,7 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
- import { BaseCommand } from '../modules/ace/main.js';
9
+ import { BaseCommand } from "../modules/ace/main.js";
10
10
  /**
11
11
  * Prints the RcFile file contents to the terminal
12
12
  */
@@ -1,5 +1,5 @@
1
- import type { CommandOptions } from '../../types/ace.js';
2
- import { BaseCommand } from '../../modules/ace/main.js';
1
+ import type { CommandOptions } from '../../types/ace.ts';
2
+ import { BaseCommand } from '../../modules/ace/main.ts';
3
3
  /**
4
4
  * The list routes command is used to view the list of registered routes
5
5
  */
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { args, BaseCommand, flags } from '../../modules/ace/main.js';
16
- import { RoutesListFormatter } from '../../src/cli_formatters/routes_list.js';
15
+ import { args, BaseCommand, flags } from "../../modules/ace/main.js";
16
+ import { RoutesListFormatter } from "../../src/cli_formatters/routes_list.js";
17
17
  /**
18
18
  * The list routes command is used to view the list of registered routes
19
19
  */
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
1
+ import { BaseCommand } from '../../modules/ace/main.ts';
2
2
  /**
3
3
  * Make a new ace command
4
4
  */
@@ -12,9 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { stubsRoot } from '../../stubs/main.js';
16
- import { args } from '../../modules/ace/main.js';
17
- import { BaseCommand } from '../../modules/ace/main.js';
15
+ import { stubsRoot } from "../../stubs/main.js";
16
+ import { args } from "../../modules/ace/main.js";
17
+ import { BaseCommand } from "../../modules/ace/main.js";
18
18
  /**
19
19
  * Make a new ace command
20
20
  */
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import { CommandOptions } from '../../types/ace.js';
1
+ import { BaseCommand } from '../../modules/ace/main.ts';
2
+ import { type CommandOptions } from '../../types/ace.ts';
3
3
  /**
4
4
  * The make controller command to create an HTTP controller
5
5
  */
@@ -13,8 +13,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
15
  import string from '@poppinss/utils/string';
16
- import { stubsRoot } from '../../stubs/main.js';
17
- import { args, flags, BaseCommand } from '../../modules/ace/main.js';
16
+ import { stubsRoot } from "../../stubs/main.js";
17
+ import { args, flags, BaseCommand } from "../../modules/ace/main.js";
18
18
  /**
19
19
  * The make controller command to create an HTTP controller
20
20
  */
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import { CommandOptions } from '../../types/ace.js';
1
+ import { BaseCommand } from '../../modules/ace/main.ts';
2
+ import { type CommandOptions } from '../../types/ace.ts';
3
3
  /**
4
4
  * The make event command to create a class based event
5
5
  */
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { stubsRoot } from '../../stubs/main.js';
16
- import { args, BaseCommand } from '../../modules/ace/main.js';
15
+ import { stubsRoot } from "../../stubs/main.js";
16
+ import { args, BaseCommand } from "../../modules/ace/main.js";
17
17
  /**
18
18
  * The make event command to create a class based event
19
19
  */
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import { CommandOptions } from '../../types/ace.js';
1
+ import { BaseCommand } from '../../modules/ace/main.ts';
2
+ import { type CommandOptions } from '../../types/ace.ts';
3
3
  /**
4
4
  * Make a new exception class
5
5
  */
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { stubsRoot } from '../../stubs/main.js';
16
- import { args, BaseCommand } from '../../modules/ace/main.js';
15
+ import { stubsRoot } from "../../stubs/main.js";
16
+ import { args, BaseCommand } from "../../modules/ace/main.js";
17
17
  /**
18
18
  * Make a new exception class
19
19
  */
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import { CommandOptions } from '../../types/ace.js';
1
+ import { BaseCommand } from '../../modules/ace/main.ts';
2
+ import { type CommandOptions } from '../../types/ace.ts';
3
3
  /**
4
4
  * The make listener command to create a class based event
5
5
  * listener
@@ -12,8 +12,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { stubsRoot } from '../../stubs/main.js';
16
- import { args, flags, BaseCommand } from '../../modules/ace/main.js';
15
+ import { stubsRoot } from "../../stubs/main.js";
16
+ import { args, flags, BaseCommand } from "../../modules/ace/main.js";
17
17
  /**
18
18
  * The make listener command to create a class based event
19
19
  * listener
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import { CommandOptions } from '../../types/ace.js';
1
+ import { type CommandOptions } from '../../types/ace.ts';
2
+ import { BaseCommand } from '../../modules/ace/main.ts';
3
3
  /**
4
4
  * The make middleware command to create a new middleware
5
5
  * class.
@@ -12,11 +12,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { slash } from '@poppinss/utils';
16
15
  import string from '@poppinss/utils/string';
17
16
  import { basename, extname, relative } from 'node:path';
18
- import { stubsRoot } from '../../stubs/main.js';
19
- import { args, BaseCommand, flags } from '../../modules/ace/main.js';
17
+ import { stubsRoot } from "../../stubs/main.js";
18
+ import stringHelpers from "../../src/helpers/string.js";
19
+ import { args, BaseCommand, flags } from "../../modules/ace/main.js";
20
20
  /**
21
21
  * The make middleware command to create a new middleware
22
22
  * class.
@@ -60,7 +60,7 @@ export default class MakeMiddleware extends BaseCommand {
60
60
  * Creative relative path for the middleware file from
61
61
  * the "./app/middleware" directory
62
62
  */
63
- const middlewareRelativePath = slash(relative(this.app.middlewarePath(), destination).replace(extname(destination), ''));
63
+ const middlewareRelativePath = stringHelpers.toUnixSlash(relative(this.app.middlewarePath(), destination).replace(extname(destination), ''));
64
64
  /**
65
65
  * Take the middleware relative path, remove `_middleware` prefix from it
66
66
  * and convert everything to camelcase