@adonisjs/core 6.1.5-34 → 6.1.5-35

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.
@@ -1 +1 @@
1
- {"commands":[{"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/eject.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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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 controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller with 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":{},"filePath":"make/controller.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/event.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/exception.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/listener.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/middleware.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/make/middleware.js"},{"commandName":"make:preload","description":"Create a new preload file inside the start directory","help":"","namespace":"make","aliases":[],"flags":[{"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/make/preload.js"},{"commandName":"make:provider","description":"Create a new service provider class","help":"","namespace":"make","aliases":[],"flags":[{"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/service.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/validator.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","```","","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":"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/test.js"}],"version":1}
1
+ {"commands":[{"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/eject.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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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 controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller with 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":{},"filePath":"make/controller.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/event.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/exception.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/listener.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/middleware.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/service.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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":{},"filePath":"make/validator.js","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","```","","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":"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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/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","absoluteFilePath":"/Users/virk/code/adonisjs/core/core/build/commands/test.js"}],"version":1}
@@ -39,10 +39,6 @@ export default class Configure extends BaseCommand {
39
39
  * Creates codemods as per configure command options
40
40
  */
41
41
  createCodemods(): Promise<import("../modules/ace/codemods.js").Codemods>;
42
- /**
43
- * Publish a stub file to the user project
44
- */
45
- publishStub(stubPath: string, stubData?: Record<string, any>): Promise<void>;
46
42
  /**
47
43
  * Run method is invoked by ace automatically
48
44
  */
@@ -12,7 +12,6 @@ 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 { args, BaseCommand, flags } from '../modules/ace/main.js';
17
16
  /**
18
17
  * The configure command is used to configure packages after installation
@@ -79,26 +78,6 @@ export default class Configure extends BaseCommand {
79
78
  codemods.verboseInstallOutput = this.verbose === true;
80
79
  return codemods;
81
80
  }
82
- /**
83
- * Publish a stub file to the user project
84
- */
85
- async publishStub(stubPath, stubData) {
86
- const stubs = await this.app.stubs.create();
87
- const stub = await stubs.build(stubPath, {
88
- source: this.stubsRoot,
89
- });
90
- const output = await stub.generate(Object.assign({
91
- force: this.force,
92
- }, stubData));
93
- /**
94
- * Log message
95
- */
96
- const entityFileName = slash(this.app.relativePath(output.destination));
97
- if (output.status === 'skipped') {
98
- return this.logger.action(`create ${entityFileName}`).skipped(output.skipReason);
99
- }
100
- this.logger.action(`create ${entityFileName}`).succeeded();
101
- }
102
81
  /**
103
82
  * Run method is invoked by ace automatically
104
83
  */
@@ -13,7 +13,7 @@ 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 { basename, extname } from 'node:path';
16
+ import { basename, extname, relative } from 'node:path';
17
17
  import { stubsRoot } from '../../stubs/main.js';
18
18
  import { args, BaseCommand, flags } from '../../modules/ace/main.js';
19
19
  /**
@@ -48,20 +48,27 @@ export default class MakeMiddleware extends BaseCommand {
48
48
  * Create middleware
49
49
  */
50
50
  const codemods = await this.createCodemods();
51
- const { relativeFileName } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
51
+ const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
52
52
  flags: this.parsed.flags,
53
53
  entity: this.app.generators.createEntity(this.name),
54
54
  });
55
+ /**
56
+ * Creative relative path for the middleware file from
57
+ * the "./app/middleware" directory
58
+ */
59
+ const middlewareRelativePath = relative(this.app.middlewarePath(), destination).replace(extname(destination), '');
60
+ /**
61
+ * Take the middleware relative path, remove `_middleware` prefix from it
62
+ * and convert everything to camelcase
63
+ */
64
+ const name = string.camelCase(basename(middlewareRelativePath).replace(/_middleware$/, ''));
55
65
  /**
56
66
  * Register middleware
57
67
  */
58
- const middlewareFileName = basename(relativeFileName).replace(extname(relativeFileName), '');
59
- const importPath = `#middleware/${middlewareFileName}`;
60
- const namedReference = string.camelCase(middlewareFileName.replace(/_middleware$/, ''));
61
68
  await codemods.registerMiddleware(this.stack, [
62
69
  {
63
- name: namedReference,
64
- path: importPath,
70
+ name: name,
71
+ path: `#middleware/${middlewareRelativePath}`,
65
72
  },
66
73
  ]);
67
74
  }
@@ -9,6 +9,7 @@ export default class MakePreload extends BaseCommand {
9
9
  static commandName: string;
10
10
  static description: string;
11
11
  name: string;
12
+ register?: boolean;
12
13
  environments?: AllowedAppEnvironments;
13
14
  /**
14
15
  * The stub to use for generating the preload file
@@ -12,6 +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 { extname, relative } from 'node:path';
15
16
  import { stubsRoot } from '../../stubs/main.js';
16
17
  import { args, flags, BaseCommand } from '../../modules/ace/main.js';
17
18
  const ALLOWED_ENVIRONMENTS = ['web', 'console', 'test', 'repl'];
@@ -45,29 +46,45 @@ export default class MakePreload extends BaseCommand {
45
46
  this.logger.error(`Invalid environment(s) "${this.environments}". Only "${ALLOWED_ENVIRONMENTS}" are allowed`);
46
47
  return;
47
48
  }
49
+ /**
50
+ * Display prompt to know if we should register the preload
51
+ * file inside the ".adonisrc.ts" file.
52
+ */
53
+ if (this.register === undefined) {
54
+ this.register = await this.prompt.confirm('Do you want to register the preload file in .adonisrc.ts file?');
55
+ }
48
56
  const codemods = await this.createCodemods();
49
- const output = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
57
+ const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
50
58
  flags: this.parsed.flags,
51
59
  entity: this.app.generators.createEntity(this.name),
52
60
  });
53
61
  /**
54
- * Registering the preload file with the `adonisrc.ts` file. We register
55
- * the relative path, since we cannot be sure about aliases to exist.
62
+ * Do not register when prompt has been denied or "--no-register"
63
+ * flag was used
56
64
  */
57
- try {
58
- const preloadImportPath = `./${output.relativeFileName.replace(/(\.js|\.ts)$/, '')}.js`;
59
- await codemods.updateRcFile((rcFile) => {
60
- rcFile.addPreloadFile(preloadImportPath, this.environments);
61
- });
62
- }
63
- catch (_) {
64
- this.logger.warning('Unable to register preload file inside the adonisrc.ts file. Make sure to manually register it');
65
+ if (!this.register) {
66
+ return;
65
67
  }
68
+ /**
69
+ * Creative relative path for the preload file from
70
+ * the "./start" directory
71
+ */
72
+ const preloadFileRelativePath = relative(this.app.startPath(), destination).replace(extname(destination), '');
73
+ await codemods.updateRcFile((rcFile) => {
74
+ rcFile.addPreloadFile(`#start/${preloadFileRelativePath}`, this.environments);
75
+ });
66
76
  }
67
77
  }
68
78
  __decorate([
69
79
  args.string({ description: 'Name of the preload file' })
70
80
  ], MakePreload.prototype, "name", void 0);
81
+ __decorate([
82
+ flags.boolean({
83
+ description: 'Auto register the preload file inside the .adonisrc.ts file',
84
+ showNegatedVariantInHelp: true,
85
+ alias: 'r',
86
+ })
87
+ ], MakePreload.prototype, "register", void 0);
71
88
  __decorate([
72
89
  flags.array({
73
90
  description: `Define the preload file's environment. Accepted values are "${ALLOWED_ENVIRONMENTS}"`,
@@ -9,6 +9,7 @@ export default class MakeProvider extends BaseCommand {
9
9
  static commandName: string;
10
10
  static description: string;
11
11
  name: string;
12
+ register?: boolean;
12
13
  environments?: AllowedAppEnvironments;
13
14
  /**
14
15
  * The stub to use for generating the provider class
@@ -12,6 +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 { extname, relative } from 'node:path';
15
16
  import { stubsRoot } from '../../stubs/main.js';
16
17
  import { args, BaseCommand, flags } from '../../modules/ace/main.js';
17
18
  const ALLOWED_ENVIRONMENTS = ['web', 'console', 'test', 'repl'];
@@ -42,29 +43,45 @@ export default class MakeProvider extends BaseCommand {
42
43
  this.logger.error(`Invalid environment(s) "${this.environments}". Only "${ALLOWED_ENVIRONMENTS}" are allowed`);
43
44
  return;
44
45
  }
46
+ /**
47
+ * Display prompt to know if we should register the provider
48
+ * file inside the ".adonisrc.ts" file.
49
+ */
50
+ if (this.register === undefined) {
51
+ this.register = await this.prompt.confirm('Do you want to register the provider in .adonisrc.ts file?');
52
+ }
45
53
  const codemods = await this.createCodemods();
46
- const output = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
54
+ const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
47
55
  flags: this.parsed.flags,
48
56
  entity: this.app.generators.createEntity(this.name),
49
57
  });
50
58
  /**
51
- * Registering the provider with the `adonisrc.js` file. We register
52
- * the relative path, since we cannot be sure about aliases to exist.
59
+ * Do not register when prompt has been denied or "--no-register"
60
+ * flag was used
53
61
  */
54
- try {
55
- const providerImportPath = `./${output.relativeFileName.replace(/(\.js|\.ts)$/, '')}.js`;
56
- await codemods.updateRcFile((rcFile) => {
57
- rcFile.addProvider(providerImportPath, this.environments);
58
- });
59
- }
60
- catch (_) {
61
- this.logger.warning('Unable to register provider inside the adonisrc.ts file. Make sure to manually register it');
62
+ if (!this.register) {
63
+ return;
62
64
  }
65
+ /**
66
+ * Creative relative path for the provider file from
67
+ * the "./start" directory
68
+ */
69
+ const providerRelativePath = relative(this.app.providersPath(), destination).replace(extname(destination), '');
70
+ await codemods.updateRcFile((rcFile) => {
71
+ rcFile.addProvider(`#providers/${providerRelativePath}`, this.environments);
72
+ });
63
73
  }
64
74
  }
65
75
  __decorate([
66
76
  args.string({ description: 'Name of the provider' })
67
77
  ], MakeProvider.prototype, "name", void 0);
78
+ __decorate([
79
+ flags.boolean({
80
+ description: 'Auto register the provider inside the .adonisrc.ts file',
81
+ showNegatedVariantInHelp: true,
82
+ alias: 'r',
83
+ })
84
+ ], MakeProvider.prototype, "register", void 0);
68
85
  __decorate([
69
86
  flags.array({
70
87
  description: `Define the provider environment. Accepted values are "${ALLOWED_ENVIRONMENTS}"`,
@@ -2,7 +2,7 @@
2
2
  import { EventEmitter } from 'node:events';
3
3
  import type { Logger } from '@poppinss/cliui';
4
4
  import type { CodeTransformer } from '@adonisjs/assembler/code_transformer';
5
- import type { MiddlewareNode, EnvValidationNode } from '@adonisjs/assembler/types';
5
+ import type { MiddlewareNode, EnvValidationNode, BouncerPolicyNode } from '@adonisjs/assembler/types';
6
6
  import type { Application } from '../app.js';
7
7
  /**
8
8
  * Codemods to modify AdonisJS source files. The codemod APIs relies on
@@ -33,6 +33,12 @@ export declare class Codemods extends EventEmitter {
33
33
  * Define validations for the environment variables
34
34
  */
35
35
  registerMiddleware(stack: 'server' | 'router' | 'named', middleware: MiddlewareNode[]): Promise<void>;
36
+ /**
37
+ * Register bouncer policies to the list of policies
38
+ * collection exported from the "app/policies/main.ts"
39
+ * file.
40
+ */
41
+ registerPolicies(policies: BouncerPolicyNode[]): Promise<void>;
36
42
  /**
37
43
  * Update RCFile
38
44
  */
@@ -56,10 +62,10 @@ export declare class Codemods extends EventEmitter {
56
62
  skipReason: null;
57
63
  } | {
58
64
  relativeFileName: string;
65
+ contents: string;
59
66
  /**
60
67
  * Reference to AdonisJS application
61
68
  */
62
- contents: string;
63
69
  destination: any;
64
70
  attributes: Record<string, any>;
65
71
  status: "skipped";
@@ -128,6 +128,28 @@ export class Codemods extends EventEmitter {
128
128
  action.failed(error.message);
129
129
  }
130
130
  }
131
+ /**
132
+ * Register bouncer policies to the list of policies
133
+ * collection exported from the "app/policies/main.ts"
134
+ * file.
135
+ */
136
+ async registerPolicies(policies) {
137
+ await this.#importAssembler();
138
+ if (!this.#codeTransformer) {
139
+ this.#cliLogger.warning('Cannot update "app/policies/main.ts" file. Install "@adonisjs/assembler" to modify source files');
140
+ return;
141
+ }
142
+ const transformer = new this.#codeTransformer.CodeTransformer(this.#app.appRoot);
143
+ const action = this.#cliLogger.action('update app/policies/main.ts file');
144
+ try {
145
+ await transformer.addPolicies(policies);
146
+ action.succeeded();
147
+ }
148
+ catch (error) {
149
+ this.emit('error', error);
150
+ action.failed(error.message);
151
+ }
152
+ }
131
153
  /**
132
154
  * Update RCFile
133
155
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/core",
3
3
  "description": "Core of AdonisJS",
4
- "version": "6.1.5-34",
4
+ "version": "6.1.5-35",
5
5
  "engines": {
6
6
  "node": ">=18.16.0"
7
7
  },