@adonisjs/core 7.0.0-next.2 → 7.0.0-next.20
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-sWl9sgM1.js +16 -0
- package/build/app-B6oge7b3.js +5 -0
- package/build/app-DNvbxVWl.js +5 -0
- package/build/bodyparser_middleware-BmARtnYe.js +3 -0
- package/build/chunk-B88MteZI.js +26 -0
- package/build/commands/add.d.ts +4 -3
- package/build/commands/add.js +76 -110
- package/build/commands/build.js +51 -107
- package/build/commands/commands.json +1 -1
- package/build/commands/configure.js +82 -177
- package/build/commands/eject.js +17 -60
- package/build/commands/env/add.js +55 -134
- package/build/commands/generate_key.js +22 -66
- package/build/commands/inspect_rcfile.js +27 -55
- package/build/commands/list/routes.js +246 -116
- package/build/commands/make/command.js +15 -57
- package/build/commands/make/controller.js +43 -120
- package/build/commands/make/event.js +16 -62
- package/build/commands/make/exception.js +16 -62
- package/build/commands/make/listener.js +36 -93
- package/build/commands/make/middleware.js +41 -101
- package/build/commands/make/preload.js +47 -113
- package/build/commands/make/provider.js +47 -112
- package/build/commands/make/service.js +16 -55
- package/build/commands/make/test.js +47 -132
- package/build/commands/make/transformer.js +17 -64
- package/build/commands/make/validator.js +20 -80
- package/build/commands/make/view.js +15 -56
- package/build/commands/repl.js +17 -50
- package/build/commands/serve.js +80 -156
- package/build/commands/test.js +92 -208
- package/build/config-Dd2H6-_e.js +5 -0
- package/build/config_provider-DWVFHOQX.js +15 -0
- package/build/container-uxa8LpGI.js +5 -0
- package/build/core-BuPP8K6N.js +140 -0
- package/build/create_kernel-Cn8zVtvt.js +3 -0
- package/build/create_kernel-Cpqqa931.js +38 -0
- package/build/decorate-CJcHOoD-.js +7 -0
- package/build/define_config-CoWy5lbf.js +62 -0
- package/build/dumper-BTjb8j4y.js +147 -0
- package/build/edge-BVYR-Vjr.js +47 -0
- package/build/events-C4d0OPUI.js +5 -0
- package/build/exceptions-DNMesP42.js +2 -0
- package/build/factories/app.js +2 -9
- package/build/factories/bodyparser.js +2 -9
- package/build/factories/core/ace.js +16 -46
- package/build/factories/core/ignitor.js +13 -180
- package/build/factories/core/main.js +24 -11
- package/build/factories/core/test_utils.js +21 -43
- package/build/factories/encryption.d.ts +1 -1
- package/build/factories/encryption.js +2 -9
- package/build/factories/events.js +2 -9
- package/build/factories/hash.js +2 -9
- package/build/factories/http.js +2 -9
- package/build/factories/logger.js +2 -9
- package/build/factories/stubs.js +27 -91
- package/build/ignitor-BrmVPN5N.js +71 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +12 -46
- package/build/logger-0KKSqgPG.js +13 -0
- package/build/main-BU8NWUEG.js +73 -0
- package/build/main-Bfnr5tAw.js +2 -0
- package/build/main-BlJhxJJ2.js +81 -0
- package/build/main-C4B2SPOT.js +5 -0
- package/build/main-CZZ21eXm.js +171 -0
- package/build/main-D-WhqOOn.js +51 -0
- package/build/main-DOY5Q8Av.js +5 -0
- package/build/main-kn40V-hF.js +2 -0
- package/build/main-nojlltNo.js +30 -0
- package/build/{stubs/make → make}/health/controller.stub +5 -2
- package/build/modules/ace/codemods.d.ts +109 -14
- package/build/modules/ace/codemods.js +222 -382
- package/build/modules/ace/main.d.ts +30 -0
- package/build/modules/ace/main.js +2 -11
- package/build/modules/app.d.ts +17 -0
- package/build/modules/app.js +4 -9
- package/build/modules/bodyparser/bodyparser_middleware.js +2 -14
- package/build/modules/bodyparser/main.js +4 -9
- package/build/modules/config.d.ts +17 -0
- package/build/modules/config.js +4 -9
- package/build/modules/container.js +4 -9
- package/build/modules/dumper/dumper.d.ts +5 -0
- package/build/modules/dumper/main.d.ts +21 -0
- package/build/modules/dumper/main.js +6 -11
- package/build/modules/dumper/plugins/edge.js +2 -62
- package/build/modules/encryption/define_config.d.ts +128 -0
- package/build/modules/encryption/drivers/aes_256_cbc.d.ts +20 -0
- package/build/modules/encryption/drivers/aes_256_cbc.js +2 -0
- package/build/modules/encryption/drivers/aes_256_gcm.d.ts +21 -0
- package/build/modules/encryption/drivers/aes_256_gcm.js +2 -0
- package/build/modules/encryption/drivers/chacha20_poly1305.d.ts +21 -0
- package/build/modules/encryption/drivers/chacha20_poly1305.js +2 -0
- package/build/modules/encryption/main.d.ts +85 -0
- package/build/modules/encryption/main.js +5 -0
- package/build/modules/env/editor.js +2 -9
- package/build/modules/env/main.d.ts +19 -0
- package/build/modules/env/main.js +2 -9
- package/build/modules/events.js +4 -9
- package/build/modules/hash/drivers/argon.js +2 -9
- package/build/modules/hash/drivers/bcrypt.d.ts +11 -0
- package/build/modules/hash/drivers/bcrypt.js +2 -9
- package/build/modules/hash/drivers/scrypt.js +2 -9
- package/build/modules/hash/main.d.ts +18 -0
- package/build/modules/hash/main.js +5 -10
- package/build/modules/hash/phc_formatter.js +2 -9
- package/build/modules/health.js +2 -9
- package/build/modules/http/main.js +4 -15
- package/build/modules/http/request_validator.d.ts +1 -3
- package/build/modules/http/url_builder_client.d.ts +1 -0
- package/build/modules/http/url_builder_client.js +2 -0
- package/build/modules/logger.d.ts +30 -0
- package/build/modules/logger.js +4 -9
- package/build/modules/repl.js +4 -9
- package/build/modules/transformers/main.js +4 -9
- package/build/providers/app_provider.d.ts +14 -25
- package/build/providers/app_provider.js +155 -363
- package/build/providers/edge_provider.js +97 -114
- package/build/providers/hash_provider.js +28 -91
- package/build/providers/repl_provider.js +66 -152
- package/build/providers/vinejs_provider.d.ts +1 -1
- package/build/providers/vinejs_provider.js +19 -66
- package/build/repl-GSxgovJQ.js +5 -0
- package/build/services/ace.js +2 -17
- package/build/services/app.js +2 -21
- package/build/services/config.js +2 -13
- package/build/services/dumper.js +5 -21
- package/build/services/emitter.js +2 -14
- package/build/services/encryption.js +2 -14
- package/build/services/hash.js +2 -14
- package/build/services/logger.js +2 -14
- package/build/services/repl.js +2 -14
- package/build/services/router.js +2 -14
- package/build/services/server.js +2 -14
- package/build/services/test_utils.js +2 -17
- package/build/services/url_builder.d.ts +3 -3
- package/build/services/url_builder.js +5 -17
- package/build/src/assembler_hooks/index_entities.d.ts +29 -1
- package/build/src/debug.d.ts +1 -1
- package/build/src/exceptions.js +2 -49
- package/build/src/helpers/assert.js +2 -55
- package/build/src/helpers/http.d.ts +20 -0
- package/build/src/helpers/http.js +2 -0
- package/build/src/helpers/is.js +3 -31
- package/build/src/helpers/main.d.ts +1 -5
- package/build/src/helpers/main.js +5 -56
- package/build/src/helpers/string.js +2 -60
- package/build/src/helpers/types.js +26 -135
- package/build/src/helpers/verification_token.js +2 -120
- package/build/src/test_utils/main.js +8 -77
- package/build/src/types.d.ts +53 -99
- package/build/src/types.js +0 -8
- package/build/src/utils.d.ts +1 -1
- package/build/src/vine.js +2 -97
- package/build/string-Cx6q_win.js +28 -0
- package/build/test_utils-hkQDmNpX.js +10 -0
- package/build/toolkit/main.js +19 -21
- package/build/types/ace.js +2 -9
- package/build/types/app.js +2 -9
- package/build/types/bodyparser.js +2 -9
- package/build/types/common.js +2 -9
- package/build/types/container.js +2 -9
- package/build/types/encryption.d.ts +39 -1
- package/build/types/encryption.js +1 -9
- package/build/types/events.js +2 -9
- package/build/types/hash.js +2 -9
- package/build/types/health.js +2 -9
- package/build/types/helpers.d.ts +20 -0
- package/build/types/helpers.js +0 -8
- package/build/types/http.js +2 -9
- package/build/types/logger.js +2 -9
- package/build/types/repl.js +2 -9
- package/build/types/transformers.js +2 -9
- package/build/utils-CtGytdtt.js +42 -0
- package/build/verification_token-DrdoU4RH.js +46 -0
- package/build/vine-DGint2rk.js +32 -0
- package/package.json +113 -60
- package/build/modules/ace/commands.js +0 -157
- package/build/modules/ace/create_kernel.js +0 -91
- package/build/modules/ace/kernel.js +0 -40
- package/build/modules/dumper/define_config.js +0 -36
- package/build/modules/dumper/dumper.js +0 -256
- package/build/modules/dumper/errors.js +0 -119
- package/build/modules/encryption.d.ts +0 -1
- package/build/modules/encryption.js +0 -9
- package/build/modules/hash/define_config.js +0 -125
- package/build/modules/http/request_validator.js +0 -100
- package/build/src/assembler_hooks/index_entities.js +0 -107
- package/build/src/cli_formatters/routes_list.js +0 -381
- package/build/src/config_provider.js +0 -71
- package/build/src/debug.js +0 -25
- package/build/src/ignitor/ace.js +0 -102
- package/build/src/ignitor/http.js +0 -146
- package/build/src/ignitor/main.js +0 -124
- package/build/src/ignitor/test.js +0 -66
- package/build/src/test_utils/http.js +0 -82
- package/build/src/utils.js +0 -104
- package/build/stubs/main.js +0 -9
- package/build/toolkit/commands/index_commands.js +0 -30
- /package/build/{stubs/make → make}/command/main.stub +0 -0
- /package/build/{stubs/make → make}/controller/actions.stub +0 -0
- /package/build/{stubs/make → make}/controller/api.stub +0 -0
- /package/build/{stubs/make → make}/controller/main.stub +0 -0
- /package/build/{stubs/make → make}/controller/resource.stub +0 -0
- /package/build/{stubs/make → make}/event/main.stub +0 -0
- /package/build/{stubs/make → make}/exception/main.stub +0 -0
- /package/build/{stubs/make → make}/health/main.stub +0 -0
- /package/build/{stubs/make → make}/listener/for_event.stub +0 -0
- /package/build/{stubs/make → make}/listener/main.stub +0 -0
- /package/build/{stubs/make → make}/middleware/main.stub +0 -0
- /package/build/{stubs/make → make}/preload/main.stub +0 -0
- /package/build/{stubs/make → make}/provider/main.stub +0 -0
- /package/build/{stubs/make → make}/service/main.stub +0 -0
- /package/build/{stubs/make → make}/test/main.stub +0 -0
- /package/build/{stubs/make → make}/transformer/main.stub +0 -0
- /package/build/{stubs/make → make}/validator/main.stub +0 -0
- /package/build/{stubs/make → make}/validator/resource.stub +0 -0
- /package/build/{stubs/make → make}/view/main.stub +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as Ignitor } from "./main-CZZ21eXm.js";
|
|
2
|
+
import { t as IgnitorFactory } from "./ignitor-BrmVPN5N.js";
|
|
3
|
+
import { t as createAceKernel } from "./create_kernel-Cpqqa931.js";
|
|
4
|
+
var AceFactory = class {
|
|
5
|
+
async make(ignitorOrAppRoot, options) {
|
|
6
|
+
if (ignitorOrAppRoot instanceof Ignitor) {
|
|
7
|
+
const app$1 = ignitorOrAppRoot.createApp("console");
|
|
8
|
+
await app$1.init();
|
|
9
|
+
return createAceKernel(app$1);
|
|
10
|
+
}
|
|
11
|
+
const app = new IgnitorFactory().withCoreConfig().withCoreProviders().create(ignitorOrAppRoot, options).createApp("console");
|
|
12
|
+
await app.init();
|
|
13
|
+
return createAceKernel(app);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export { AceFactory as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __exportAll = (all, symbols) => {
|
|
7
|
+
let target = {};
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
|
+
key = keys[i];
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: ((k) => from[k]).bind(null, key),
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
+
export { __reExport as n, __exportAll as t };
|
package/build/commands/add.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { type CommandOptions } from '../types/ace.ts';
|
|
|
2
2
|
import { BaseCommand } from '../modules/ace/main.ts';
|
|
3
3
|
import { type SupportedPackageManager } from '@adonisjs/assembler/types';
|
|
4
4
|
/**
|
|
5
|
-
* The install command is used to `npm install` and `node ace configure`
|
|
5
|
+
* The install command is used to `npm install` and `node ace configure` one or more packages
|
|
6
6
|
* in one go.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```
|
|
10
10
|
* ace add @adonisjs/lucid
|
|
11
|
+
* ace add @adonisjs/lucid @adonisjs/auth @adonisjs/session
|
|
11
12
|
* ace add @adonisjs/session --dev
|
|
12
13
|
* ace add vinejs --force
|
|
13
14
|
* ace add edge --package-manager=pnpm
|
|
@@ -28,9 +29,9 @@ export default class Add extends BaseCommand {
|
|
|
28
29
|
*/
|
|
29
30
|
static options: CommandOptions;
|
|
30
31
|
/**
|
|
31
|
-
* Package
|
|
32
|
+
* Package names to install and configure
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
names: string[];
|
|
34
35
|
/**
|
|
35
36
|
* Display logs in verbose mode
|
|
36
37
|
*/
|
package/build/commands/add.js
CHANGED
|
@@ -1,111 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
|
+
import "../main-kn40V-hF.js";
|
|
3
|
+
import "../container-uxa8LpGI.js";
|
|
4
|
+
import "../config_provider-DWVFHOQX.js";
|
|
5
|
+
import "../main-CZZ21eXm.js";
|
|
6
|
+
import "../app-B6oge7b3.js";
|
|
7
|
+
import "../app-DNvbxVWl.js";
|
|
8
|
+
import "../string-Cx6q_win.js";
|
|
9
|
+
import "../utils-CtGytdtt.js";
|
|
10
|
+
import { n as prettyPrintError } from "../core-BuPP8K6N.js";
|
|
11
|
+
import { f as BaseCommand, l as flags, o as args } from "../main-BlJhxJJ2.js";
|
|
12
|
+
import { t as __decorate } from "../decorate-CJcHOoD-.js";
|
|
13
|
+
var Add = class extends BaseCommand {
|
|
14
|
+
static commandName = "add";
|
|
15
|
+
static description = "Install and configure one or more packages";
|
|
16
|
+
static options = { allowUnknownFlags: true };
|
|
17
|
+
#resolveNpmPackageName(name) {
|
|
18
|
+
if (name === "vinejs") return "@vinejs/vine";
|
|
19
|
+
if (name === "edge") return "edge.js";
|
|
20
|
+
return name;
|
|
21
|
+
}
|
|
22
|
+
async #configurePackage(packageName) {
|
|
23
|
+
const flagValueArray = this.parsed.unknownFlags.filter((flag) => !!this.parsed.flags[flag]).map((flag) => [`--${flag}`, this.parsed.flags[flag].toString()]);
|
|
24
|
+
const configureArgs = [
|
|
25
|
+
packageName,
|
|
26
|
+
this.force ? "--force" : void 0,
|
|
27
|
+
this.verbose ? "--verbose" : void 0,
|
|
28
|
+
...flagValueArray.flat()
|
|
29
|
+
].filter(Boolean);
|
|
30
|
+
return await this.kernel.exec("configure", configureArgs);
|
|
31
|
+
}
|
|
32
|
+
async run() {
|
|
33
|
+
const packages = this.names.map((name) => ({
|
|
34
|
+
name,
|
|
35
|
+
npmName: this.#resolveNpmPackageName(name)
|
|
36
|
+
}));
|
|
37
|
+
const codemods = await this.createCodemods();
|
|
38
|
+
codemods.verboseInstallOutput = !!this.verbose;
|
|
39
|
+
if (!await codemods.installPackages(packages.map((pkg) => ({
|
|
40
|
+
name: pkg.npmName,
|
|
41
|
+
isDevDependency: !!this.dev
|
|
42
|
+
})), this.packageManager)) return;
|
|
43
|
+
const succeeded = [];
|
|
44
|
+
const failed = [];
|
|
45
|
+
for (const pkg of packages) {
|
|
46
|
+
const { exitCode, error } = await this.#configurePackage(pkg.name);
|
|
47
|
+
if (exitCode === 0) succeeded.push(pkg.name);
|
|
48
|
+
else failed.push({
|
|
49
|
+
name: pkg.name,
|
|
50
|
+
error
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (succeeded.length > 0) {
|
|
54
|
+
const names = succeeded.map((name) => this.colors.green(name)).join(", ");
|
|
55
|
+
this.logger.success(`Installed and configured ${names}`);
|
|
56
|
+
}
|
|
57
|
+
if (failed.length > 0) {
|
|
58
|
+
this.exitCode = 1;
|
|
59
|
+
for (const pkg of failed) {
|
|
60
|
+
this.logger.error(`Unable to configure ${this.colors.green(pkg.name)}`);
|
|
61
|
+
if (pkg.error) await prettyPrintError(pkg.error.cause || pkg.error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
14
65
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
export default class Add extends BaseCommand {
|
|
29
|
-
/**
|
|
30
|
-
* The command name
|
|
31
|
-
*/
|
|
32
|
-
static commandName = 'add';
|
|
33
|
-
/**
|
|
34
|
-
* The command description
|
|
35
|
-
*/
|
|
36
|
-
static description = 'Install and configure a package';
|
|
37
|
-
/**
|
|
38
|
-
* Command options configuration
|
|
39
|
-
*/
|
|
40
|
-
static options = {
|
|
41
|
-
allowUnknownFlags: true,
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Configure the package by delegating the work to the `node ace configure` command
|
|
45
|
-
*/
|
|
46
|
-
async #configurePackage() {
|
|
47
|
-
/**
|
|
48
|
-
* Sending unknown flags to the configure command
|
|
49
|
-
*/
|
|
50
|
-
const flagValueArray = this.parsed.unknownFlags
|
|
51
|
-
.filter((flag) => !!this.parsed.flags[flag])
|
|
52
|
-
.map((flag) => [`--${flag}`, this.parsed.flags[flag].toString()]);
|
|
53
|
-
const configureArgs = [
|
|
54
|
-
this.name,
|
|
55
|
-
this.force ? '--force' : undefined,
|
|
56
|
-
this.verbose ? '--verbose' : undefined,
|
|
57
|
-
...flagValueArray.flat(),
|
|
58
|
-
].filter(Boolean);
|
|
59
|
-
return await this.kernel.exec('configure', configureArgs);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Run method is invoked by ace automatically
|
|
63
|
-
*/
|
|
64
|
-
async run() {
|
|
65
|
-
/**
|
|
66
|
-
* Handle special packages to configure
|
|
67
|
-
*/
|
|
68
|
-
let npmPackageName = this.name;
|
|
69
|
-
if (this.name === 'vinejs') {
|
|
70
|
-
npmPackageName = '@vinejs/vine';
|
|
71
|
-
}
|
|
72
|
-
else if (this.name === 'edge') {
|
|
73
|
-
npmPackageName = 'edge.js';
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Install package
|
|
77
|
-
*/
|
|
78
|
-
const codemods = await this.createCodemods();
|
|
79
|
-
codemods.verboseInstallOutput = !!this.verbose;
|
|
80
|
-
const pkgWasInstalled = await codemods.installPackages([{ name: npmPackageName, isDevDependency: !!this.dev }], this.packageManager);
|
|
81
|
-
if (!pkgWasInstalled) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Configure package
|
|
86
|
-
*/
|
|
87
|
-
const { exitCode } = await this.#configurePackage();
|
|
88
|
-
this.exitCode = exitCode;
|
|
89
|
-
if (exitCode === 0) {
|
|
90
|
-
this.logger.success(`Installed and configured ${this.colors.green(this.name)}`);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
this.logger.fatal(`Unable to configure ${this.colors.green(this.name)}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
__decorate([
|
|
98
|
-
args.string({ description: 'Package name' })
|
|
99
|
-
], Add.prototype, "name", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
flags.boolean({ description: 'Display logs in verbose mode' })
|
|
102
|
-
], Add.prototype, "verbose", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
flags.string({ description: 'Define the package manager you want to use' })
|
|
105
|
-
], Add.prototype, "packageManager", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
flags.boolean({ description: 'Should we install the package as a dev dependency', alias: 'D' })
|
|
108
|
-
], Add.prototype, "dev", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
flags.boolean({ description: 'Forcefully overwrite existing files' })
|
|
111
|
-
], Add.prototype, "force", void 0);
|
|
66
|
+
__decorate([args.spread({
|
|
67
|
+
description: "Package names to install and configure",
|
|
68
|
+
required: true
|
|
69
|
+
})], Add.prototype, "names", void 0);
|
|
70
|
+
__decorate([flags.boolean({ description: "Display logs in verbose mode" })], Add.prototype, "verbose", void 0);
|
|
71
|
+
__decorate([flags.string({ description: "Define the package manager you want to use" })], Add.prototype, "packageManager", void 0);
|
|
72
|
+
__decorate([flags.boolean({
|
|
73
|
+
description: "Should we install the package as a dev dependency",
|
|
74
|
+
alias: "D"
|
|
75
|
+
})], Add.prototype, "dev", void 0);
|
|
76
|
+
__decorate([flags.boolean({ description: "Forcefully overwrite existing files" })], Add.prototype, "force", void 0);
|
|
77
|
+
export { Add as default };
|
package/build/commands/build.js
CHANGED
|
@@ -1,108 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { n as importTypeScript, t as importAssembler } from "../utils-CtGytdtt.js";
|
|
2
|
+
import { f as BaseCommand, l as flags } from "../main-BlJhxJJ2.js";
|
|
3
|
+
import { t as __decorate } from "../decorate-CJcHOoD-.js";
|
|
4
|
+
var Build = class extends BaseCommand {
|
|
5
|
+
static commandName = "build";
|
|
6
|
+
static description = "Build application for production by compiling frontend assets and TypeScript source to JavaScript";
|
|
7
|
+
static help = [
|
|
8
|
+
"Create the production build using the following command.",
|
|
9
|
+
"```",
|
|
10
|
+
"{{ binaryName }} build",
|
|
11
|
+
"```",
|
|
12
|
+
"",
|
|
13
|
+
"The assets bundler dev server runs automatically after detecting vite config or webpack config files",
|
|
14
|
+
"You may pass vite CLI args using the --assets-args command line flag.",
|
|
15
|
+
"```",
|
|
16
|
+
"{{ binaryName }} build --assets-args=\"--debug --base=/public\"",
|
|
17
|
+
"```"
|
|
18
|
+
];
|
|
19
|
+
#logMissingDevelopmentDependency(dependency) {
|
|
20
|
+
this.logger.error([
|
|
21
|
+
`Cannot find package "${dependency}"`,
|
|
22
|
+
"",
|
|
23
|
+
`The "${dependency}" package is a development dependency and therefore you should use the build command with development dependencies installed.`,
|
|
24
|
+
"",
|
|
25
|
+
"If you are using the build command inside a CI or with a deployment platform, make sure the NODE_ENV is set to \"development\""
|
|
26
|
+
].join("\n"));
|
|
27
|
+
}
|
|
28
|
+
async run() {
|
|
29
|
+
const assembler = await importAssembler(this.app);
|
|
30
|
+
if (!assembler) {
|
|
31
|
+
this.#logMissingDevelopmentDependency("@adonisjs/assembler");
|
|
32
|
+
this.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const ts = await importTypeScript(this.app);
|
|
36
|
+
if (!ts) {
|
|
37
|
+
this.#logMissingDevelopmentDependency("typescript");
|
|
38
|
+
this.exitCode = 1;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const bundler = new assembler.Bundler(this.app.appRoot, ts, {
|
|
42
|
+
metaFiles: this.app.rcFile.metaFiles,
|
|
43
|
+
hooks: this.app.rcFile.hooks
|
|
44
|
+
});
|
|
45
|
+
bundler.ui.logger = this.logger;
|
|
46
|
+
const stopOnError = this.ignoreTsErrors === true ? false : true;
|
|
47
|
+
if (!await bundler.bundle(stopOnError, this.packageManager)) this.exitCode = 1;
|
|
48
|
+
}
|
|
14
49
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* Create the production build by compiling TypeScript source and the
|
|
19
|
-
* frontend assets
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```
|
|
23
|
-
* ace build
|
|
24
|
-
* ace build --ignore-ts-errors
|
|
25
|
-
* ace build --package-manager=pnpm
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export default class Build extends BaseCommand {
|
|
29
|
-
/**
|
|
30
|
-
* The command name
|
|
31
|
-
*/
|
|
32
|
-
static commandName = 'build';
|
|
33
|
-
/**
|
|
34
|
-
* The command description
|
|
35
|
-
*/
|
|
36
|
-
static description = 'Build application for production by compiling frontend assets and TypeScript source to JavaScript';
|
|
37
|
-
/**
|
|
38
|
-
* Help text for the command
|
|
39
|
-
*/
|
|
40
|
-
static help = [
|
|
41
|
-
'Create the production build using the following command.',
|
|
42
|
-
'```',
|
|
43
|
-
'{{ binaryName }} build',
|
|
44
|
-
'```',
|
|
45
|
-
'',
|
|
46
|
-
'The assets bundler dev server runs automatically after detecting vite config or webpack config files',
|
|
47
|
-
'You may pass vite CLI args using the --assets-args command line flag.',
|
|
48
|
-
'```',
|
|
49
|
-
'{{ binaryName }} build --assets-args="--debug --base=/public"',
|
|
50
|
-
'```',
|
|
51
|
-
];
|
|
52
|
-
/**
|
|
53
|
-
* Log a development dependency is missing
|
|
54
|
-
*
|
|
55
|
-
* @param dependency - The name of the missing dependency
|
|
56
|
-
*/
|
|
57
|
-
#logMissingDevelopmentDependency(dependency) {
|
|
58
|
-
this.logger.error([
|
|
59
|
-
`Cannot find package "${dependency}"`,
|
|
60
|
-
'',
|
|
61
|
-
`The "${dependency}" package is a development dependency and therefore you should use the build command with development dependencies installed.`,
|
|
62
|
-
'',
|
|
63
|
-
'If you are using the build command inside a CI or with a deployment platform, make sure the NODE_ENV is set to "development"',
|
|
64
|
-
].join('\n'));
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Build application
|
|
68
|
-
*/
|
|
69
|
-
async run() {
|
|
70
|
-
const assembler = await importAssembler(this.app);
|
|
71
|
-
if (!assembler) {
|
|
72
|
-
this.#logMissingDevelopmentDependency('@adonisjs/assembler');
|
|
73
|
-
this.exitCode = 1;
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const ts = await importTypeScript(this.app);
|
|
77
|
-
if (!ts) {
|
|
78
|
-
this.#logMissingDevelopmentDependency('typescript');
|
|
79
|
-
this.exitCode = 1;
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const bundler = new assembler.Bundler(this.app.appRoot, ts, {
|
|
83
|
-
metaFiles: this.app.rcFile.metaFiles,
|
|
84
|
-
hooks: this.app.rcFile.hooks,
|
|
85
|
-
});
|
|
86
|
-
/**
|
|
87
|
-
* Share command logger with assembler, so that CLI flags like --no-ansi has
|
|
88
|
-
* similar impact for assembler logs as well.
|
|
89
|
-
*/
|
|
90
|
-
bundler.ui.logger = this.logger;
|
|
91
|
-
/**
|
|
92
|
-
* Bundle project for production
|
|
93
|
-
*/
|
|
94
|
-
const stopOnError = this.ignoreTsErrors === true ? false : true;
|
|
95
|
-
const builtSuccessfully = await bundler.bundle(stopOnError, this.packageManager);
|
|
96
|
-
if (!builtSuccessfully) {
|
|
97
|
-
this.exitCode = 1;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
__decorate([
|
|
102
|
-
flags.boolean({ description: 'Ignore TypeScript errors and continue with the build process' })
|
|
103
|
-
], Build.prototype, "ignoreTsErrors", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
flags.string({
|
|
106
|
-
description: 'Define the package manager to copy the appropriate lock file',
|
|
107
|
-
})
|
|
108
|
-
], Build.prototype, "packageManager", void 0);
|
|
50
|
+
__decorate([flags.boolean({ description: "Ignore TypeScript errors and continue with the build process" })], Build.prototype, "ignoreTsErrors", void 0);
|
|
51
|
+
__decorate([flags.string({ description: "Define the package manager to copy the appropriate lock file" })], Build.prototype, "packageManager", void 0);
|
|
52
|
+
export { Build as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"commands":[{"commandName":"add","description":"Install and configure a package","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager you want to use"},{"name":"dev","flagName":"dev","required":false,"type":"boolean","description":"Should we install the package as a dev dependency","alias":"D"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"add.js"},{"commandName":"build","description":"Build application for production by compiling frontend assets and TypeScript source to JavaScript","help":["Create the production build using the following command.","```","{{ binaryName }} build","```","","The assets bundler dev server runs automatically after detecting vite config or webpack config files","You may pass vite CLI args using the --assets-args command line flag.","```","{{ binaryName }} build --assets-args=\"--debug --base=/public\"","```"],"namespace":null,"aliases":[],"flags":[{"name":"ignoreTsErrors","flagName":"ignore-ts-errors","required":false,"type":"boolean","description":"Ignore TypeScript errors and continue with the build process"},{"name":"packageManager","flagName":"package-manager","required":false,"type":"string","description":"Define the package manager to copy the appropriate lock file"}],"args":[],"options":{},"filePath":"build.js"},{"commandName":"configure","description":"Configure a package after it has been installed","help":"","namespace":null,"aliases":[],"flags":[{"name":"verbose","flagName":"verbose","required":false,"type":"boolean","description":"Display logs in verbose mode","alias":"v"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Forcefully overwrite existing files","alias":"f"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Package name","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"configure.js"},{"commandName":"eject","description":"Eject scaffolding stubs to your application root","help":"","namespace":null,"aliases":[],"flags":[{"name":"pkg","flagName":"pkg","required":false,"type":"string","description":"Mention package name for searching stubs","default":"@adonisjs/core"}],"args":[{"name":"stubPath","argumentName":"stub-path","required":true,"description":"Path to the stubs directory or a single stub file","type":"string"}],"options":{},"filePath":"eject.js"},{"commandName":"env:add","description":"Add a new environment variable","help":"","namespace":"env","aliases":[],"flags":[{"name":"type","flagName":"type","required":false,"type":"string","description":"Type of the variable"},{"name":"enumValues","flagName":"enum-values","required":false,"type":"array","description":"Allowed values for the enum type in a comma-separated list","default":[""]}],"args":[{"name":"name","argumentName":"name","required":false,"description":"Variable name. Will be converted to screaming snake case","type":"string"},{"name":"value","argumentName":"value","required":false,"description":"Variable value","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"env/add.js"},{"commandName":"generate:key","description":"Generate a cryptographically secure random application key","help":"","namespace":"generate","aliases":[],"flags":[{"name":"show","flagName":"show","required":false,"type":"boolean","description":"Display the key on the terminal, instead of writing it to .env file"},{"name":"force","flagName":"force","required":false,"type":"boolean","description":"Force update .env file in production environment"}],"args":[],"options":{},"filePath":"generate_key.js"},{"commandName":"inspect:rcfile","description":"Inspect the RC file with its default values","help":"","namespace":"inspect","aliases":[],"flags":[],"args":[],"options":{},"filePath":"inspect_rcfile.js"},{"commandName":"list:routes","description":"List application routes. This command will boot the application in the console environment","help":"","namespace":"list","aliases":[],"flags":[{"name":"middleware","flagName":"middleware","required":false,"type":"array","description":"View routes that includes all the mentioned middleware names. Use * to see routes that are using one or more middleware"},{"name":"ignoreMiddleware","flagName":"ignore-middleware","required":false,"type":"array","description":"View routes that does not include all the mentioned middleware names. Use * to see routes that are using zero middleware"},{"name":"json","flagName":"json","required":false,"type":"boolean","description":"Get routes list as a JSON string"},{"name":"table","flagName":"table","required":false,"type":"boolean","description":"View list of routes as a table"}],"args":[{"name":"match","argumentName":"match","required":false,"description":"Find routes matching the given keyword. Route name, pattern and controller name will be searched against the keyword","type":"string"}],"options":{"startApp":true},"filePath":"list/routes.js"},{"commandName":"make:command","description":"Create a new ace command class","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the command","type":"string"}],"options":{},"filePath":"make/command.js"},{"commandName":"make:controller","description":"Create a new HTTP controller class","help":"","namespace":"make","aliases":[],"flags":[{"name":"singular","flagName":"singular","required":false,"type":"boolean","description":"Generate controller in singular form","alias":"s"},{"name":"resource","flagName":"resource","required":false,"type":"boolean","description":"Generate resourceful controller with methods to perform CRUD actions on a resource","alias":"r"},{"name":"api","flagName":"api","required":false,"type":"boolean","description":"Generate resourceful controller without the \"edit\" and the \"create\" methods","alias":"a"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"The name of the controller","type":"string"},{"name":"actions","argumentName":"actions","required":false,"description":"Create controller with custom method names","type":"spread"}],"options":{"allowUnknownFlags":true},"filePath":"make/controller.js"},{"commandName":"make:event","description":"Create a new event class","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/event.js"},{"commandName":"make:exception","description":"Create a new custom exception class","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the exception","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/exception.js"},{"commandName":"make:listener","description":"Create a new event listener class","help":"","namespace":"make","aliases":[],"flags":[{"name":"event","flagName":"event","required":false,"type":"string","description":"Generate an event class alongside the listener","alias":"e"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the event listener","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/listener.js"},{"commandName":"make:middleware","description":"Create a new middleware class for HTTP requests","help":"","namespace":"make","aliases":[],"flags":[{"name":"stack","flagName":"stack","required":false,"type":"string","description":"The stack in which to register the middleware","alias":"s"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the middleware","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/middleware.js"},{"commandName":"make:preload","description":"Create a new preload file inside the start directory","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the preload file inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the preload file's environment. Accepted values are \"web,console,test,repl\"","alias":"e"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the preload file","type":"string"}],"options":{},"filePath":"make/preload.js"},{"commandName":"make:provider","description":"Create a new service provider class","help":"","namespace":"make","aliases":[],"flags":[{"name":"register","flagName":"register","required":false,"type":"boolean","description":"Auto register the provider inside the .adonisrc.ts file","showNegatedVariantInHelp":true,"alias":"r"},{"name":"environments","flagName":"environments","required":false,"type":"array","description":"Define the provider environment. Accepted values are \"web,console,test,repl\"","alias":"e"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the provider","type":"string"}],"options":{},"filePath":"make/provider.js"},{"commandName":"make:service","description":"Create a new service class","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the service","type":"string"}],"options":{"allowUnknownFlags":true},"filePath":"make/service.js"},{"commandName":"make:test","description":"Create a new Japa test file","help":"","namespace":"make","aliases":[],"flags":[{"name":"suite","flagName":"suite","required":false,"type":"string","description":"The suite for which to create the test file","alias":"s"}],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the test file","type":"string"}],"options":{},"filePath":"make/test.js"},{"commandName":"make: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":[],"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}
|