@adonisjs/core 7.0.0-next.25 → 7.0.0-next.26
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.
- package/build/{ace-DrvIocZi.js → ace-BfYSDoPf.js} +3 -3
- package/build/commands/add.js +8 -7
- package/build/commands/build.js +3 -3
- package/build/commands/commands.json +1 -1
- package/build/commands/configure.js +3 -4
- package/build/commands/eject.js +3 -3
- package/build/commands/env/add.js +3 -3
- package/build/commands/generate_key.js +2 -2
- package/build/commands/inspect_rcfile.js +1 -1
- package/build/commands/list/routes.js +2 -2
- package/build/commands/make/command.d.ts +5 -0
- package/build/commands/make/command.js +4 -3
- package/build/commands/make/controller.d.ts +5 -0
- package/build/commands/make/controller.js +4 -3
- package/build/commands/make/event.d.ts +5 -0
- package/build/commands/make/event.js +4 -3
- package/build/commands/make/exception.d.ts +5 -0
- package/build/commands/make/exception.js +4 -3
- package/build/commands/make/listener.d.ts +5 -0
- package/build/commands/make/listener.js +5 -4
- package/build/commands/make/middleware.d.ts +5 -0
- package/build/commands/make/middleware.js +5 -4
- package/build/commands/make/preload.d.ts +5 -0
- package/build/commands/make/preload.js +5 -4
- package/build/commands/make/provider.d.ts +5 -0
- package/build/commands/make/provider.js +5 -4
- package/build/commands/make/service.d.ts +5 -0
- package/build/commands/make/service.js +4 -3
- package/build/commands/make/test.d.ts +5 -0
- package/build/commands/make/test.js +4 -3
- package/build/commands/make/transformer.d.ts +5 -0
- package/build/commands/make/transformer.js +4 -3
- package/build/commands/make/validator.d.ts +5 -0
- package/build/commands/make/validator.js +4 -3
- package/build/commands/make/view.d.ts +5 -0
- package/build/commands/make/view.js +4 -3
- package/build/commands/repl.js +1 -1
- package/build/commands/serve.js +3 -3
- package/build/commands/test.js +3 -3
- package/build/{config_provider-DWVFHOQX.js → config_provider-CY-xuo2R.js} +1 -3
- package/build/{core-BuPP8K6N.js → core-Ckhxy7oM.js} +2 -2
- package/build/create_kernel-BCs646Vx.js +3 -0
- package/build/{create_kernel-C5k82J0c.js → create_kernel-PIeMK2Fo.js} +1 -1
- package/build/debug-DURPi9xn.js +3 -0
- package/build/{define_config-t8DrH2OV.js → define_config-BlZ46bUg.js} +3 -2
- package/build/factories/core/ace.js +13 -12
- package/build/factories/core/ignitor.js +10 -9
- package/build/factories/core/main.js +19 -18
- package/build/factories/core/test_utils.js +16 -15
- package/build/factories/stubs.d.ts +1 -6
- package/build/factories/stubs.js +6 -5
- package/build/{ignitor-DAyIsDqZ.js → ignitor-B5akJVlQ.js} +6 -6
- package/build/index.js +6 -5
- package/build/{main-BpYXrgM0.js → main-BIVLvDaW.js} +2 -1
- package/build/{main-BCUvPhoe.js → main-DIF5Sg8W.js} +2 -2
- package/build/{main-BBjkufvA.js → main-DjlqWWRt.js} +3 -3
- package/build/modules/ace/codemods.d.ts +74 -22
- package/build/modules/ace/codemods.js +78 -3
- package/build/modules/ace/main.js +1 -1
- package/build/modules/bodyparser/bodyparser_middleware.js +1 -1
- package/build/modules/bodyparser/main.js +1 -1
- package/build/modules/config.js +1 -1
- package/build/modules/dumper/main.js +1 -1
- package/build/modules/dumper/plugins/edge.js +1 -1
- package/build/modules/encryption/main.js +5 -4
- package/build/modules/events.js +1 -1
- package/build/modules/hash/main.js +3 -2
- package/build/modules/http/main.js +1 -1
- package/build/modules/logger.js +1 -1
- package/build/modules/repl.js +1 -1
- package/build/providers/app_provider.js +12 -11
- package/build/providers/edge_provider.js +2 -2
- package/build/providers/hash_provider.js +3 -2
- package/build/providers/repl_provider.js +1 -1
- package/build/providers/vinejs_provider.js +2 -2
- package/build/src/exceptions.js +1 -1
- package/build/src/helpers/main.js +1 -1
- package/build/src/helpers/string.js +1 -1
- package/build/src/helpers/verification_token.js +1 -1
- package/build/src/test_utils/main.js +7 -6
- package/build/src/vine.js +1 -1
- package/build/{test_utils-BUSLSCLy.js → test_utils-JjctlaE3.js} +3 -3
- package/build/toolkit/main.js +1 -1
- package/build/{vine-Bt4ymkM0.js → vine-D37x2ex7.js} +1 -0
- package/package.json +3 -3
- package/build/create_kernel-CSvWA2w2.js +0 -3
- /package/build/{bodyparser_middleware-DTW0epKM.js → bodyparser_middleware-BmARtnYe.js} +0 -0
- /package/build/{config-Dd2H6-_e.js → config-BEEqDrcn.js} +0 -0
- /package/build/{decorate-CJcHOoD-.js → decorate-DM0Sx1ye.js} +0 -0
- /package/build/{dumper-BTjb8j4y.js → dumper-DxJ_VRuC.js} +0 -0
- /package/build/{edge-LQdCc1L3.js → edge-BVYR-Vjr.js} +0 -0
- /package/build/{events-C4d0OPUI.js → events-BWRc08nG.js} +0 -0
- /package/build/{exceptions-D7t_HaaU.js → exceptions-DNMesP42.js} +0 -0
- /package/build/{logger-0KKSqgPG.js → logger-DV65GX9N.js} +0 -0
- /package/build/{main-BlJhxJJ2.js → main-BWftwyAK.js} +0 -0
- /package/build/{main-CoP2zLaT.js → main-C2r_lzz0.js} +0 -0
- /package/build/{main-B4VF6my1.js → main-DNokQ-c9.js} +0 -0
- /package/build/{main-DixtGykP.js → main-DOY5Q8Av.js} +0 -0
- /package/build/{repl-GSxgovJQ.js → repl-CwFmzJvr.js} +0 -0
- /package/build/{string-Cx6q_win.js → string-CJ7ewUFq.js} +0 -0
- /package/build/{utils-CtGytdtt.js → utils-DjXMIVBJ.js} +0 -0
- /package/build/{verification_token-DXsW81rl.js → verification_token-DrdoU4RH.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-
|
|
2
|
-
import { t as IgnitorFactory } from "./ignitor-
|
|
3
|
-
import { t as createAceKernel } from "./create_kernel-
|
|
1
|
+
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
2
|
+
import { t as IgnitorFactory } from "./ignitor-B5akJVlQ.js";
|
|
3
|
+
import { t as createAceKernel } from "./create_kernel-PIeMK2Fo.js";
|
|
4
4
|
var AceFactory = class {
|
|
5
5
|
async make(ignitorOrAppRoot, options) {
|
|
6
6
|
if (ignitorOrAppRoot instanceof Ignitor) {
|
package/build/commands/add.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "../chunk-B88MteZI.js";
|
|
2
2
|
import "../main-kn40V-hF.js";
|
|
3
3
|
import "../container-uxa8LpGI.js";
|
|
4
|
-
import "../
|
|
5
|
-
import "../main-
|
|
4
|
+
import "../debug-DURPi9xn.js";
|
|
5
|
+
import "../main-DIF5Sg8W.js";
|
|
6
6
|
import "../app-B6oge7b3.js";
|
|
7
7
|
import "../app-DNvbxVWl.js";
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import "../config_provider-CY-xuo2R.js";
|
|
9
|
+
import "../string-CJ7ewUFq.js";
|
|
10
|
+
import "../utils-DjXMIVBJ.js";
|
|
11
|
+
import { n as prettyPrintError } from "../core-Ckhxy7oM.js";
|
|
12
|
+
import { f as BaseCommand, l as flags, o as args } from "../main-BWftwyAK.js";
|
|
13
|
+
import { t as __decorate } from "../decorate-DM0Sx1ye.js";
|
|
13
14
|
var Add = class extends BaseCommand {
|
|
14
15
|
static commandName = "add";
|
|
15
16
|
static description = "Install and configure one or more packages";
|
package/build/commands/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as importTypeScript, t as importAssembler } from "../utils-
|
|
2
|
-
import { f as BaseCommand, l as flags } from "../main-
|
|
3
|
-
import { t as __decorate } from "../decorate-
|
|
1
|
+
import { n as importTypeScript, t as importAssembler } from "../utils-DjXMIVBJ.js";
|
|
2
|
+
import { f as BaseCommand, l as flags } from "../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../decorate-DM0Sx1ye.js";
|
|
4
4
|
var Build = class extends BaseCommand {
|
|
5
5
|
static commandName = "build";
|
|
6
6
|
static description = "Build application for production by compiling frontend assets and TypeScript source to JavaScript";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"commands":[{"commandName":"add","description":"Install and configure one or more packages","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager you want to use"},{"name":"dev","flagName":"dev","required":false,"type":"boolean","description":"Should we install the package as a dev dependency","alias":"D"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files"}],"args":[{"name":"names","argumentName":"names","required":true,"description":"Package names to install and configure","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"add.js"},{"commandName":"build","description":"Build application for production by compiling frontend assets and TypeScript source to JavaScript","help":["Create the production build using the following command.","```","{{ binaryName }} build","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} build --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"ignoreTsErrors","flagName":"ignore-ts-errors","required":false,"type":"boolean","description":"Ignore TypeScript errors and continue with the build process"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager to copy the appropriate lock file"}],"args":[],"options":{},"filePath":"build.js"},{"commandName":"configure","description":"Configure a package after it has been installed","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode","alias":"v"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files","alias":"f"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"configure.js"},{"commandName":"eject","description":"Eject scaffolding stubs to your application root","help":"","namespace":null,"aliases":[],"flags":[{"name":"pkg","flagName":"pkg","required":false,"type":"string","description":"Mention package name for searching stubs","default":"@adonisjs/core"}],"args":[{"name":"stubPath","argumentName":"stub-path","required":true,"description":"Path to the stubs directory or a single stub file","type":"string"}],"options":{},"filePath":"eject.js"},{"commandName":"env:add","description":"Add a new environment variable","help":"","namespace":"env","aliases":[],"flags":[{"name":"type","flagName":"type","required":false,"type":"string","description":"Type of the variable"},{"name":"enumValues","flagName":"enum-values","required":false,"type":"array","description":"Allowed values for the enum type in a comma-separated list","default":[""]}],"args":[{"name":"name","argumentName":"name","required":false,"description":"Variable name. Will be converted to screaming snake case","type":"string"},{"name":"value","argumentName":"value","required":false,"description":"Variable value","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"env/add.js"},{"commandName":"generate:key","description":"Generate a cryptographically secure random application key","help":"","namespace":"generate","aliases":[],"flags":[{"name":"show","flagName":"show","required":false,"type":"boolean","description":"Display the key on the terminal, instead of writing it to .env file"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Force update .env file in production environment"}],"args":[],"options":{},"filePath":"generate_key.js"},{"commandName":"inspect:rcfile","description":"Inspect the RC file with its default values","help":"","namespace":"inspect","aliases":[],"flags":[],"args":[],"options":{},"filePath":"inspect_rcfile.js"},{"commandName":"list:routes","description":"List application routes. This command will boot the application in the console environment","help":"","namespace":"list","aliases":[],"flags":[{"name":"middleware","flagName":"middleware","required":false,"type":"array","description":"View routes that includes all the mentioned middleware names. Use * to see routes that are using one or more middleware"},{"name":"ignoreMiddleware","flagName":"ignore-middleware","required":false,"type":"array","description":"View routes that does not include all the mentioned middleware names. Use * to see routes that are using zero middleware"},{"name":"json","flagName":"json","required":false,"type":"boolean","description":"Get routes list as a JSON string"},{"name":"table","flagName":"table","required":false,"type":"boolean","description":"View list of routes as a table"}],"args":[{"name":"match","argumentName":"match","required":false,"description":"Find routes matching the given keyword. Route name, pattern and controller name will be searched against the keyword","type":"string"}],"options":{"startApp":true},"filePath":"list/routes.js"},{"commandName":"make:command","description":"Create a new ace command class","help":"","namespace":"make","aliases":[],"flags":[],"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:transformer","description":"Create a new transformer class","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Entity name for which to generate the transformer","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/transformer.js"},{"commandName":"make:validator","description":"Create a new file to define VineJS validators","help":"","namespace":"make","aliases":[],"flags":[{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Create a file with pre-defined validators for create and update actions"}],"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
|
+
{"commands":[{"commandName":"add","description":"Install and configure one or more packages","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager you want to use"},{"name":"dev","flagName":"dev","required":false,"type":"boolean","description":"Should we install the package as a dev dependency","alias":"D"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files"}],"args":[{"name":"names","argumentName":"names","required":true,"description":"Package names to install and configure","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"add.js"},{"commandName":"build","description":"Build application for production by compiling frontend assets and TypeScript source to JavaScript","help":["Create the production build using the following command.","```","{{ binaryName }} build","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} build --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"ignoreTsErrors","flagName":"ignore-ts-errors","required":false,"type":"boolean","description":"Ignore TypeScript errors and continue with the build process"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager to copy the appropriate lock file"}],"args":[],"options":{},"filePath":"build.js"},{"commandName":"configure","description":"Configure a package after it has been installed","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode","alias":"v"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files","alias":"f"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"configure.js"},{"commandName":"eject","description":"Eject scaffolding stubs to your application root","help":"","namespace":null,"aliases":[],"flags":[{"name":"pkg","flagName":"pkg","required":false,"type":"string","description":"Mention package name for searching stubs","default":"@adonisjs/core"}],"args":[{"name":"stubPath","argumentName":"stub-path","required":true,"description":"Path to the stubs directory or a single stub file","type":"string"}],"options":{},"filePath":"eject.js"},{"commandName":"env:add","description":"Add a new environment variable","help":"","namespace":"env","aliases":[],"flags":[{"name":"type","flagName":"type","required":false,"type":"string","description":"Type of the variable"},{"name":"enumValues","flagName":"enum-values","required":false,"type":"array","description":"Allowed values for the enum type in a comma-separated list","default":[""]}],"args":[{"name":"name","argumentName":"name","required":false,"description":"Variable name. Will be converted to screaming snake case","type":"string"},{"name":"value","argumentName":"value","required":false,"description":"Variable value","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"env/add.js"},{"commandName":"generate:key","description":"Generate a cryptographically secure random application key","help":"","namespace":"generate","aliases":[],"flags":[{"name":"show","flagName":"show","required":false,"type":"boolean","description":"Display the key on the terminal, instead of writing it to .env file"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Force update .env file in production environment"}],"args":[],"options":{},"filePath":"generate_key.js"},{"commandName":"inspect:rcfile","description":"Inspect the RC file with its default values","help":"","namespace":"inspect","aliases":[],"flags":[],"args":[],"options":{},"filePath":"inspect_rcfile.js"},{"commandName":"list:routes","description":"List application routes. This command will boot the application in the console environment","help":"","namespace":"list","aliases":[],"flags":[{"name":"middleware","flagName":"middleware","required":false,"type":"array","description":"View routes that includes all the mentioned middleware names. Use * to see routes that are using one or more middleware"},{"name":"ignoreMiddleware","flagName":"ignore-middleware","required":false,"type":"array","description":"View routes that does not include all the mentioned middleware names. Use * to see routes that are using zero middleware"},{"name":"json","flagName":"json","required":false,"type":"boolean","description":"Get routes list as a JSON string"},{"name":"table","flagName":"table","required":false,"type":"boolean","description":"View list of routes as a table"}],"args":[{"name":"match","argumentName":"match","required":false,"description":"Find routes matching the given keyword. Route name, pattern and controller name will be searched against the keyword","type":"string"}],"options":{"startApp":true},"filePath":"list/routes.js"},{"commandName":"make:command","description":"Create a new ace command class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the command","type":"string"}],"options":{},"filePath":"make/command.js"},{"commandName":"make:controller","description":"Create a new HTTP controller class","help":"","namespace":"make","aliases":[],"flags":[{"name":"singular","flagName":"singular","required":false,"type":"boolean","description":"Generate controller in singular form","alias":"s"},{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Generate resourceful controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller without the \"edit\" and the \"create\" methods","alias":"a"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"The name of the controller","type":"string"},{"name":"actions","argumentName":"actions","required":false,"description":"Create controller with custom method names","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"make/controller.js"},{"commandName":"make:event","description":"Create a new event class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/event.js"},{"commandName":"make:exception","description":"Create a new custom exception class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the exception","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/exception.js"},{"commandName":"make:listener","description":"Create a new event listener class","help":"","namespace":"make","aliases":[],"flags":[{"name":"event","flagName":"event","required":false,"type":"string","description":"Generate an event class alongside the listener","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event listener","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/listener.js"},{"commandName":"make:middleware","description":"Create a new middleware class for HTTP requests","help":"","namespace":"make","aliases":[],"flags":[{"name":"stack","flagName":"stack","required":false,"type":"string","description":"The stack in which to register the middleware","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the middleware","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/middleware.js"},{"commandName":"make:preload","description":"Create a new preload file inside the start directory","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the preload file inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the preload file's environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the preload file","type":"string"}],"options":{},"filePath":"make/preload.js"},{"commandName":"make:provider","description":"Create a new service provider class","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the provider inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the provider environment. Accepted values are \"web,console,test,repl\"","alias":"e"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the provider","type":"string"}],"options":{},"filePath":"make/provider.js"},{"commandName":"make:service","description":"Create a new service class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the service","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/service.js"},{"commandName":"make:test","description":"Create a new Japa test file","help":"","namespace":"make","aliases":[],"flags":[{"name":"suite","flagName":"suite","required":false,"type":"string","description":"The suite for which to create the test file","alias":"s"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.js"},{"commandName":"make:transformer","description":"Create a new transformer class","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Entity name for which to generate the transformer","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/transformer.js"},{"commandName":"make:validator","description":"Create a new file to define VineJS validators","help":"","namespace":"make","aliases":[],"flags":[{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Create a file with pre-defined validators for create and update actions"},{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the validator file","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/validator.js"},{"commandName":"make:view","description":"Create a new Edge.js template file","help":"","namespace":"make","aliases":[],"flags":[{"name":"contentsFrom","flagName":"contents-from","required":false,"type":"string","description":"Use the contents of the given file as the generated output"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the template","type":"string"}],"options":{},"filePath":"make/view.js"},{"commandName":"repl","description":"Start a new REPL session","help":"","namespace":null,"aliases":[],"flags":[],"args":[],"options":{"startApp":true,"staysAlive":true},"filePath":"repl.js"},{"commandName":"serve","description":"Start the development HTTP server along with the file watcher to perform restarts on file change","help":["Start the development server with file watcher using the following command.","```","{{ binaryName }} serve --watch","```","","You can also start the server with HMR support using the following command.","```","{{ binaryName }} serve --hmr","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} serve --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"hmr","flagName":"hmr","required":false,"type":"boolean","description":"Start the server with HMR support"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and restart the HTTP server on file change","alias":"w"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes","alias":"p"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[],"options":{"staysAlive":true},"filePath":"serve.js"},{"commandName":"test","description":"Run tests along with the file watcher to re-run tests on file change","help":"","namespace":null,"aliases":[],"flags":[{"name":"files","flagName":"files","required":false,"type":"array","description":"Filter tests by the filename"},{"name":"tags","flagName":"tags","required":false,"type":"array","description":"Filter tests by tags"},{"name":"groups","flagName":"groups","required":false,"type":"array","description":"Filter tests by parent group title"},{"name":"tests","flagName":"tests","required":false,"type":"array","description":"Filter tests by test title"},{"name":"reporters","flagName":"reporters","required":false,"type":"array","description":"Activate one or more test reporters"},{"name":"watch","flagName":"watch","required":false,"type":"boolean","description":"Watch filesystem and re-run tests on file change"},{"name":"poll","flagName":"poll","required":false,"type":"boolean","description":"Use polling to detect filesystem changes"},{"name":"timeout","flagName":"timeout","required":false,"type":"number","description":"Define default timeout for all tests"},{"name":"retries","flagName":"retries","required":false,"type":"number","description":"Define default retries for all tests"},{"name":"failed","flagName":"failed","required":false,"type":"boolean","description":"Execute tests failed during the last run"},{"name":"clear","flagName":"clear","required":false,"type":"boolean","description":"Clear the terminal for new logs after file change","showNegatedVariantInHelp":true,"default":true}],"args":[{"name":"suites","argumentName":"suites","required":false,"description":"Mention suite names to run tests for selected suites","type":"spread"}],"options":{"allowUnknownFlags":true,"staysAlive":true},"filePath":"test.js"}],"version":1}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../main-
|
|
3
|
-
import { t as __decorate } from "../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../decorate-DM0Sx1ye.js";
|
|
4
4
|
import { RuntimeException } from "@poppinss/utils/exception";
|
|
5
5
|
var Configure = class extends BaseCommand {
|
|
6
6
|
static commandName = "configure";
|
|
@@ -59,8 +59,7 @@ var Configure = class extends BaseCommand {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (!packageExports.configure) {
|
|
62
|
-
this.logger.
|
|
63
|
-
this.exitCode = 1;
|
|
62
|
+
this.logger.warning(`Cannot configure module "${this.name}". The module does not export the configure hook`);
|
|
64
63
|
return;
|
|
65
64
|
}
|
|
66
65
|
if (packageExports.stubsRoot) this.stubsRoot = packageExports.stubsRoot;
|
package/build/commands/eject.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as string_default } from "../string-
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../main-
|
|
3
|
-
import { t as __decorate } from "../decorate-
|
|
1
|
+
import { t as string_default } from "../string-CJ7ewUFq.js";
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../decorate-DM0Sx1ye.js";
|
|
4
4
|
var Eject = class extends BaseCommand {
|
|
5
5
|
static commandName = "eject";
|
|
6
6
|
static description = "Eject scaffolding stubs to your application root";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as string_default } from "../../string-
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as string_default } from "../../string-CJ7ewUFq.js";
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
const ALLOWED_TYPES = [
|
|
5
5
|
"string",
|
|
6
6
|
"boolean",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BaseCommand, l as flags } from "../main-
|
|
2
|
-
import { t as __decorate } from "../decorate-
|
|
1
|
+
import { f as BaseCommand, l as flags } from "../main-BWftwyAK.js";
|
|
2
|
+
import { t as __decorate } from "../decorate-DM0Sx1ye.js";
|
|
3
3
|
import string from "@poppinss/utils/string";
|
|
4
4
|
import { EnvEditor } from "@adonisjs/env/editor";
|
|
5
5
|
var GenerateKey = class extends BaseCommand {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as BaseCommand } from "../main-
|
|
1
|
+
import { f as BaseCommand } from "../main-BWftwyAK.js";
|
|
2
2
|
var InspectRCFile = class extends BaseCommand {
|
|
3
3
|
static commandName = "inspect:rcfile";
|
|
4
4
|
static description = "Inspect the RC file with its default values";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BaseCommand, l as flags, o as args, s as cliHelpers } from "../../main-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { f as BaseCommand, l as flags, o as args, s as cliHelpers } from "../../main-BWftwyAK.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
3
3
|
import stringWidth from "string-width";
|
|
4
4
|
import { middlewareInfo, routeInfo } from "@adonisjs/http-server/helpers";
|
|
5
5
|
var RoutesListFormatter = class {
|
|
@@ -25,6 +25,11 @@ export default class MakeCommand extends BaseCommand {
|
|
|
25
25
|
* Name of the command class to create
|
|
26
26
|
*/
|
|
27
27
|
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Read the contents from this file (if the flag exists) and use
|
|
30
|
+
* it as the raw contents
|
|
31
|
+
*/
|
|
32
|
+
contentsFrom: string;
|
|
28
33
|
/**
|
|
29
34
|
* The stub template file to use for generating the command class
|
|
30
35
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeCommand = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:command";
|
|
6
6
|
static description = "Create a new ace command class";
|
|
@@ -9,8 +9,9 @@ var MakeCommand = class extends BaseCommand {
|
|
|
9
9
|
await (await this.createCodemods()).makeUsingStub(stubsRoot, this.stubPath, {
|
|
10
10
|
flags: this.parsed.flags,
|
|
11
11
|
entity: this.app.generators.createEntity(this.name)
|
|
12
|
-
});
|
|
12
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
__decorate([args.string({ description: "Name of the command" })], MakeCommand.prototype, "name", void 0);
|
|
16
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeCommand.prototype, "contentsFrom", void 0);
|
|
16
17
|
export { MakeCommand as default };
|
|
@@ -45,6 +45,11 @@ export default class MakeController extends BaseCommand {
|
|
|
45
45
|
* Generate resourceful controller without the "edit" and the "create" methods
|
|
46
46
|
*/
|
|
47
47
|
api: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Read the contents from this file (if the flag exists) and use
|
|
50
|
+
* it as the raw contents
|
|
51
|
+
*/
|
|
52
|
+
contentsFrom: string;
|
|
48
53
|
/**
|
|
49
54
|
* The stub to use for generating the controller
|
|
50
55
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
import string from "@poppinss/utils/string";
|
|
5
5
|
var MakeController = class extends BaseCommand {
|
|
6
6
|
static commandName = "make:controller";
|
|
@@ -21,7 +21,7 @@ var MakeController = class extends BaseCommand {
|
|
|
21
21
|
actions: this.actions?.map((action) => string.camelCase(action)),
|
|
22
22
|
entity: this.app.generators.createEntity(this.name),
|
|
23
23
|
singular: this.singular
|
|
24
|
-
});
|
|
24
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
__decorate([args.string({ description: "The name of the controller" })], MakeController.prototype, "name", void 0);
|
|
@@ -41,4 +41,5 @@ __decorate([flags.boolean({
|
|
|
41
41
|
description: "Generate resourceful controller without the \"edit\" and the \"create\" methods",
|
|
42
42
|
alias: "a"
|
|
43
43
|
})], MakeController.prototype, "api", void 0);
|
|
44
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeController.prototype, "contentsFrom", void 0);
|
|
44
45
|
export { MakeController as default };
|
|
@@ -30,6 +30,11 @@ export default class MakeEvent extends BaseCommand {
|
|
|
30
30
|
* Name of the event class to create
|
|
31
31
|
*/
|
|
32
32
|
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Read the contents from this file (if the flag exists) and use
|
|
35
|
+
* it as the raw contents
|
|
36
|
+
*/
|
|
37
|
+
contentsFrom: string;
|
|
33
38
|
/**
|
|
34
39
|
* The stub template file to use for generating the event class
|
|
35
40
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeEvent = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:event";
|
|
6
6
|
static description = "Create a new event class";
|
|
@@ -10,8 +10,9 @@ var MakeEvent = class extends BaseCommand {
|
|
|
10
10
|
await (await this.createCodemods()).makeUsingStub(stubsRoot, this.stubPath, {
|
|
11
11
|
flags: this.parsed.flags,
|
|
12
12
|
entity: this.app.generators.createEntity(this.name)
|
|
13
|
-
});
|
|
13
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
__decorate([args.string({ description: "Name of the event" })], MakeEvent.prototype, "name", void 0);
|
|
17
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeEvent.prototype, "contentsFrom", void 0);
|
|
17
18
|
export { MakeEvent as default };
|
|
@@ -30,6 +30,11 @@ export default class MakeException extends BaseCommand {
|
|
|
30
30
|
* Name of the exception class to create
|
|
31
31
|
*/
|
|
32
32
|
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Read the contents from this file (if the flag exists) and use
|
|
35
|
+
* it as the raw contents
|
|
36
|
+
*/
|
|
37
|
+
contentsFrom: string;
|
|
33
38
|
/**
|
|
34
39
|
* The stub template file to use for generating the exception class
|
|
35
40
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeException = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:exception";
|
|
6
6
|
static description = "Create a new custom exception class";
|
|
@@ -10,8 +10,9 @@ var MakeException = class extends BaseCommand {
|
|
|
10
10
|
await (await this.createCodemods()).makeUsingStub(stubsRoot, this.stubPath, {
|
|
11
11
|
flags: this.parsed.flags,
|
|
12
12
|
entity: this.app.generators.createEntity(this.name)
|
|
13
|
-
});
|
|
13
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
__decorate([args.string({ description: "Name of the exception" })], MakeException.prototype, "name", void 0);
|
|
17
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeException.prototype, "contentsFrom", void 0);
|
|
17
18
|
export { MakeException as default };
|
|
@@ -34,6 +34,11 @@ export default class MakeListener extends BaseCommand {
|
|
|
34
34
|
* Generate an event class alongside the listener and bind them together
|
|
35
35
|
*/
|
|
36
36
|
event: string;
|
|
37
|
+
/**
|
|
38
|
+
* Read the contents from this file (if the flag exists) and use
|
|
39
|
+
* it as the raw contents
|
|
40
|
+
*/
|
|
41
|
+
contentsFrom: string;
|
|
37
42
|
/**
|
|
38
43
|
* The stub template file to use for generating the event listener
|
|
39
44
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeListener = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:listener";
|
|
6
6
|
static description = "Create a new event listener class";
|
|
@@ -19,14 +19,14 @@ var MakeListener = class extends BaseCommand {
|
|
|
19
19
|
event: eventEntity,
|
|
20
20
|
flags: this.parsed.flags,
|
|
21
21
|
entity: this.app.generators.createEntity(this.name)
|
|
22
|
-
});
|
|
22
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
23
23
|
}
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
await codemods.makeUsingStub(stubsRoot, this.stubPath, {
|
|
27
27
|
flags: this.parsed.flags,
|
|
28
28
|
entity: this.app.generators.createEntity(this.name)
|
|
29
|
-
});
|
|
29
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
__decorate([args.string({ description: "Name of the event listener" })], MakeListener.prototype, "name", void 0);
|
|
@@ -34,4 +34,5 @@ __decorate([flags.string({
|
|
|
34
34
|
description: "Generate an event class alongside the listener",
|
|
35
35
|
alias: "e"
|
|
36
36
|
})], MakeListener.prototype, "event", void 0);
|
|
37
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeListener.prototype, "contentsFrom", void 0);
|
|
37
38
|
export { MakeListener as default };
|
|
@@ -33,6 +33,11 @@ export default class MakeMiddleware extends BaseCommand {
|
|
|
33
33
|
* The stack in which to register the middleware
|
|
34
34
|
*/
|
|
35
35
|
stack?: 'server' | 'named' | 'router';
|
|
36
|
+
/**
|
|
37
|
+
* Read the contents from this file (if the flag exists) and use
|
|
38
|
+
* it as the raw contents
|
|
39
|
+
*/
|
|
40
|
+
contentsFrom: string;
|
|
36
41
|
/**
|
|
37
42
|
* The stub to use for generating the middleware
|
|
38
43
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { t as string_default } from "../../string-
|
|
3
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
4
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { t as string_default } from "../../string-CJ7ewUFq.js";
|
|
3
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
4
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
5
5
|
import string from "@poppinss/utils/string";
|
|
6
6
|
import { basename, extname, relative } from "node:path";
|
|
7
7
|
var MakeMiddleware = class extends BaseCommand {
|
|
@@ -25,7 +25,7 @@ var MakeMiddleware = class extends BaseCommand {
|
|
|
25
25
|
const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
|
|
26
26
|
flags: this.parsed.flags,
|
|
27
27
|
entity: this.app.generators.createEntity(this.name)
|
|
28
|
-
});
|
|
28
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
29
29
|
const middlewareRelativePath = string_default.toUnixSlash(relative(this.app.middlewarePath(), destination).replace(extname(destination), ""));
|
|
30
30
|
const name = string.camelCase(basename(middlewareRelativePath).replace(/_middleware$/, ""));
|
|
31
31
|
await codemods.registerMiddleware(this.stack, [{
|
|
@@ -39,4 +39,5 @@ __decorate([flags.string({
|
|
|
39
39
|
description: "The stack in which to register the middleware",
|
|
40
40
|
alias: "s"
|
|
41
41
|
})], MakeMiddleware.prototype, "stack", void 0);
|
|
42
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeMiddleware.prototype, "contentsFrom", void 0);
|
|
42
43
|
export { MakeMiddleware as default };
|
|
@@ -37,6 +37,11 @@ export default class MakePreload extends BaseCommand {
|
|
|
37
37
|
* Application environments where the preload file should be loaded
|
|
38
38
|
*/
|
|
39
39
|
environments?: AllowedAppEnvironments;
|
|
40
|
+
/**
|
|
41
|
+
* Read the contents from this file (if the flag exists) and use
|
|
42
|
+
* it as the raw contents
|
|
43
|
+
*/
|
|
44
|
+
contentsFrom: string;
|
|
40
45
|
/**
|
|
41
46
|
* The stub template file to use for generating the preload file
|
|
42
47
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { t as string_default } from "../../string-
|
|
3
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
4
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { t as string_default } from "../../string-CJ7ewUFq.js";
|
|
3
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
4
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
5
5
|
import { extname, relative } from "node:path";
|
|
6
6
|
const ALLOWED_ENVIRONMENTS = [
|
|
7
7
|
"web",
|
|
@@ -27,7 +27,7 @@ var MakePreload = class extends BaseCommand {
|
|
|
27
27
|
const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
|
|
28
28
|
flags: this.parsed.flags,
|
|
29
29
|
entity: this.app.generators.createEntity(this.name)
|
|
30
|
-
});
|
|
30
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
31
31
|
if (!this.register) return;
|
|
32
32
|
const preloadFileRelativePath = string_default.toUnixSlash(relative(this.app.startPath(), destination).replace(extname(destination), ""));
|
|
33
33
|
await codemods.updateRcFile((rcFile) => {
|
|
@@ -45,4 +45,5 @@ __decorate([flags.array({
|
|
|
45
45
|
description: `Define the preload file's environment. Accepted values are "${ALLOWED_ENVIRONMENTS}"`,
|
|
46
46
|
alias: "e"
|
|
47
47
|
})], MakePreload.prototype, "environments", void 0);
|
|
48
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakePreload.prototype, "contentsFrom", void 0);
|
|
48
49
|
export { MakePreload as default };
|
|
@@ -36,6 +36,11 @@ export default class MakeProvider extends BaseCommand {
|
|
|
36
36
|
* Application environments where the provider should be loaded
|
|
37
37
|
*/
|
|
38
38
|
environments?: AllowedAppEnvironments;
|
|
39
|
+
/**
|
|
40
|
+
* Read the contents from this file (if the flag exists) and use
|
|
41
|
+
* it as the raw contents
|
|
42
|
+
*/
|
|
43
|
+
contentsFrom: string;
|
|
39
44
|
/**
|
|
40
45
|
* The stub template file to use for generating the provider class
|
|
41
46
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { t as string_default } from "../../string-
|
|
3
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
4
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { t as string_default } from "../../string-CJ7ewUFq.js";
|
|
3
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
4
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
5
5
|
import { extname, relative } from "node:path";
|
|
6
6
|
const ALLOWED_ENVIRONMENTS = [
|
|
7
7
|
"web",
|
|
@@ -27,7 +27,7 @@ var MakeProvider = class extends BaseCommand {
|
|
|
27
27
|
const { destination } = await codemods.makeUsingStub(stubsRoot, this.stubPath, {
|
|
28
28
|
flags: this.parsed.flags,
|
|
29
29
|
entity: this.app.generators.createEntity(this.name)
|
|
30
|
-
});
|
|
30
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
31
31
|
if (!this.register) return;
|
|
32
32
|
const providerRelativePath = string_default.toUnixSlash(relative(this.app.providersPath(), destination).replace(extname(destination), ""));
|
|
33
33
|
await codemods.updateRcFile((rcFile) => {
|
|
@@ -45,4 +45,5 @@ __decorate([flags.array({
|
|
|
45
45
|
description: `Define the provider environment. Accepted values are "${ALLOWED_ENVIRONMENTS}"`,
|
|
46
46
|
alias: "e"
|
|
47
47
|
})], MakeProvider.prototype, "environments", void 0);
|
|
48
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeProvider.prototype, "contentsFrom", void 0);
|
|
48
49
|
export { MakeProvider as default };
|
|
@@ -27,6 +27,11 @@ export default class MakeService extends BaseCommand {
|
|
|
27
27
|
* Name of the service
|
|
28
28
|
*/
|
|
29
29
|
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Read the contents from this file (if the flag exists) and use
|
|
32
|
+
* it as the raw contents
|
|
33
|
+
*/
|
|
34
|
+
contentsFrom: string;
|
|
30
35
|
/**
|
|
31
36
|
* The stub to use for generating the service class
|
|
32
37
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeService = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:service";
|
|
6
6
|
static description = "Create a new service class";
|
|
@@ -10,8 +10,9 @@ var MakeService = class extends BaseCommand {
|
|
|
10
10
|
await (await this.createCodemods()).makeUsingStub(stubsRoot, this.stubPath, {
|
|
11
11
|
flags: this.parsed.flags,
|
|
12
12
|
entity: this.app.generators.createEntity(this.name)
|
|
13
|
-
});
|
|
13
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
__decorate([args.string({ description: "Name of the service" })], MakeService.prototype, "name", void 0);
|
|
17
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeService.prototype, "contentsFrom", void 0);
|
|
17
18
|
export { MakeService as default };
|
|
@@ -29,6 +29,11 @@ export default class MakeTest extends BaseCommand {
|
|
|
29
29
|
* Test suite name where the test file should be created
|
|
30
30
|
*/
|
|
31
31
|
suite?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Read the contents from this file (if the flag exists) and use
|
|
34
|
+
* it as the raw contents
|
|
35
|
+
*/
|
|
36
|
+
contentsFrom: string;
|
|
32
37
|
/**
|
|
33
38
|
* The stub template file to use for generating the test file
|
|
34
39
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as stubsRoot } from "../../main-kn40V-hF.js";
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../../main-
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
2
|
+
import { f as BaseCommand, l as flags, o as args } from "../../main-BWftwyAK.js";
|
|
3
|
+
import { t as __decorate } from "../../decorate-DM0Sx1ye.js";
|
|
4
4
|
var MakeTest = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:test";
|
|
6
6
|
static description = "Create a new Japa test file";
|
|
@@ -37,7 +37,7 @@ var MakeTest = class extends BaseCommand {
|
|
|
37
37
|
flags: this.parsed.flags,
|
|
38
38
|
entity: this.app.generators.createEntity(this.name),
|
|
39
39
|
suite: { directory: await this.#getSuiteDirectory(suite.directories) }
|
|
40
|
-
});
|
|
40
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
__decorate([args.string({ description: "Name of the test file" })], MakeTest.prototype, "name", void 0);
|
|
@@ -45,4 +45,5 @@ __decorate([flags.string({
|
|
|
45
45
|
description: "The suite for which to create the test file",
|
|
46
46
|
alias: "s"
|
|
47
47
|
})], MakeTest.prototype, "suite", void 0);
|
|
48
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeTest.prototype, "contentsFrom", void 0);
|
|
48
49
|
export { MakeTest as default };
|