@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
|
@@ -31,6 +31,11 @@ export default class MakeTransformer extends BaseCommand {
|
|
|
31
31
|
* Name of the entity for which to generate the transformer
|
|
32
32
|
*/
|
|
33
33
|
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Read the contents from this file (if the flag exists) and use
|
|
36
|
+
* it as the raw contents
|
|
37
|
+
*/
|
|
38
|
+
contentsFrom: string;
|
|
34
39
|
/**
|
|
35
40
|
* The stub template file to use for generating the transformer class
|
|
36
41
|
*/
|
|
@@ -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 MakeTransformer = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:transformer";
|
|
6
6
|
static description = "Create a new transformer class";
|
|
@@ -11,8 +11,9 @@ var MakeTransformer = class extends BaseCommand {
|
|
|
11
11
|
flags: this.parsed.flags,
|
|
12
12
|
entity: this.app.generators.createEntity(this.name),
|
|
13
13
|
model: this.app.generators.createEntity(this.name)
|
|
14
|
-
});
|
|
14
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
__decorate([args.string({ description: "Entity name for which to generate the transformer" })], MakeTransformer.prototype, "name", void 0);
|
|
18
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeTransformer.prototype, "contentsFrom", void 0);
|
|
18
19
|
export { MakeTransformer as default };
|
|
@@ -35,6 +35,11 @@ export default class MakeValidator extends BaseCommand {
|
|
|
35
35
|
* Generate a resource validator with create and update schemas
|
|
36
36
|
*/
|
|
37
37
|
resource: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Read the contents from this file (if the flag exists) and use
|
|
40
|
+
* it as the raw contents
|
|
41
|
+
*/
|
|
42
|
+
contentsFrom: string;
|
|
38
43
|
/**
|
|
39
44
|
* The stub template file to use for generating the validator
|
|
40
45
|
*/
|
|
@@ -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 MakeValidator = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:validator";
|
|
6
6
|
static description = "Create a new file to define VineJS validators";
|
|
@@ -13,9 +13,10 @@ var MakeValidator = class extends BaseCommand {
|
|
|
13
13
|
await (await this.createCodemods()).makeUsingStub(stubsRoot, this.stubPath, {
|
|
14
14
|
flags: this.parsed.flags,
|
|
15
15
|
entity: this.app.generators.createEntity(this.name)
|
|
16
|
-
});
|
|
16
|
+
}, { contentsFromFile: this.contentsFrom });
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
__decorate([args.string({ description: "Name of the validator file" })], MakeValidator.prototype, "name", void 0);
|
|
20
20
|
__decorate([flags.boolean({ description: "Create a file with pre-defined validators for create and update actions" })], MakeValidator.prototype, "resource", void 0);
|
|
21
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeValidator.prototype, "contentsFrom", void 0);
|
|
21
22
|
export { MakeValidator as default };
|
|
@@ -25,6 +25,11 @@ export default class MakeView extends BaseCommand {
|
|
|
25
25
|
* Name of the template file 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 Edge template
|
|
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 MakeView = class extends BaseCommand {
|
|
5
5
|
static commandName = "make:view";
|
|
6
6
|
static description = "Create a new Edge.js template file";
|
|
@@ -9,8 +9,9 @@ var MakeView = 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 template" })], MakeView.prototype, "name", void 0);
|
|
16
|
+
__decorate([flags.string({ description: "Use the contents of the given file as the generated output" })], MakeView.prototype, "contentsFrom", void 0);
|
|
16
17
|
export { MakeView as default };
|
package/build/commands/repl.js
CHANGED
package/build/commands/serve.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as importAssembler } from "../utils-
|
|
2
|
-
import { f as BaseCommand, l as flags } from "../main-
|
|
3
|
-
import { t as __decorate } from "../decorate-
|
|
1
|
+
import { 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 Serve = class extends BaseCommand {
|
|
5
5
|
static commandName = "serve";
|
|
6
6
|
static description = "Start the development HTTP server along with the file watcher to perform restarts on file change";
|
package/build/commands/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as importAssembler } from "../utils-
|
|
2
|
-
import { f as BaseCommand, l as flags, o as args } from "../main-
|
|
3
|
-
import { t as __decorate } from "../decorate-
|
|
1
|
+
import { t as importAssembler } from "../utils-DjXMIVBJ.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 Test = class extends BaseCommand {
|
|
5
5
|
static commandName = "test";
|
|
6
6
|
static description = "Run tests along with the file watcher to re-run tests on file change";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { debuglog } from "node:util";
|
|
2
|
-
var debug_default = debuglog("adonisjs:core");
|
|
3
1
|
const configProvider = {
|
|
4
2
|
create(resolver) {
|
|
5
3
|
return {
|
|
@@ -12,4 +10,4 @@ const configProvider = {
|
|
|
12
10
|
return null;
|
|
13
11
|
}
|
|
14
12
|
};
|
|
15
|
-
export {
|
|
13
|
+
export { configProvider as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as string_default } from "./string-
|
|
2
|
-
import { r as outputTransformerDataObjects } from "./utils-
|
|
1
|
+
import { t as string_default } from "./string-CJ7ewUFq.js";
|
|
2
|
+
import { r as outputTransformerDataObjects } from "./utils-DjXMIVBJ.js";
|
|
3
3
|
import { errors } from "@adonisjs/ace";
|
|
4
4
|
import { errors as errors$1 } from "@adonisjs/env";
|
|
5
5
|
import { errors as errors$2 } from "@adonisjs/application";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as Kernel, n as HelpCommand, t as FsLoader } from "./main-
|
|
1
|
+
import { d as Kernel, n as HelpCommand, t as FsLoader } from "./main-BWftwyAK.js";
|
|
2
2
|
function createAceKernel(app, commandName) {
|
|
3
3
|
const kernel = new Kernel(app);
|
|
4
4
|
kernel.info.set("binary", "node ace");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as debug_default } from "./debug-DURPi9xn.js";
|
|
2
|
+
import { t as configProvider } from "./config_provider-CY-xuo2R.js";
|
|
3
|
+
import { n as InvalidArgumentsException } from "./exceptions-DNMesP42.js";
|
|
3
4
|
function defineConfig(config) {
|
|
4
5
|
if (!config.list) throw new InvalidArgumentsException("Missing \"list\" property in encryption config");
|
|
5
6
|
if (config.default && !config.list[config.default]) throw new InvalidArgumentsException(`Missing "list.${String(config.default)}" in encryption config. It is referenced by the "default" property`);
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import "../../chunk-B88MteZI.js";
|
|
2
|
-
import "../../
|
|
3
|
-
import "../../main-
|
|
2
|
+
import "../../debug-DURPi9xn.js";
|
|
3
|
+
import "../../main-DIF5Sg8W.js";
|
|
4
4
|
import "../../app-B6oge7b3.js";
|
|
5
5
|
import "../../app-DNvbxVWl.js";
|
|
6
|
-
import "../../
|
|
7
|
-
import "../../
|
|
8
|
-
import "../../
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../
|
|
11
|
-
import "../../
|
|
12
|
-
import "../../main-
|
|
13
|
-
import "../../
|
|
14
|
-
import "../../
|
|
15
|
-
import
|
|
6
|
+
import "../../config_provider-CY-xuo2R.js";
|
|
7
|
+
import "../../main-BWftwyAK.js";
|
|
8
|
+
import "../../logger-DV65GX9N.js";
|
|
9
|
+
import "../../exceptions-DNMesP42.js";
|
|
10
|
+
import "../../main-DNokQ-c9.js";
|
|
11
|
+
import "../../define_config-BlZ46bUg.js";
|
|
12
|
+
import "../../main-BIVLvDaW.js";
|
|
13
|
+
import "../../main-DOY5Q8Av.js";
|
|
14
|
+
import "../../ignitor-B5akJVlQ.js";
|
|
15
|
+
import "../../create_kernel-PIeMK2Fo.js";
|
|
16
|
+
import { t as AceFactory } from "../../ace-BfYSDoPf.js";
|
|
16
17
|
export { AceFactory };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "../../chunk-B88MteZI.js";
|
|
2
|
-
import "../../
|
|
3
|
-
import "../../main-
|
|
2
|
+
import "../../debug-DURPi9xn.js";
|
|
3
|
+
import "../../main-DIF5Sg8W.js";
|
|
4
4
|
import "../../app-B6oge7b3.js";
|
|
5
5
|
import "../../app-DNvbxVWl.js";
|
|
6
|
-
import "../../
|
|
7
|
-
import "../../
|
|
8
|
-
import "../../
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../
|
|
11
|
-
import "../../main-
|
|
12
|
-
import
|
|
6
|
+
import "../../config_provider-CY-xuo2R.js";
|
|
7
|
+
import "../../logger-DV65GX9N.js";
|
|
8
|
+
import "../../exceptions-DNMesP42.js";
|
|
9
|
+
import "../../main-DNokQ-c9.js";
|
|
10
|
+
import "../../define_config-BlZ46bUg.js";
|
|
11
|
+
import "../../main-BIVLvDaW.js";
|
|
12
|
+
import "../../main-DOY5Q8Av.js";
|
|
13
|
+
import { t as IgnitorFactory } from "../../ignitor-B5akJVlQ.js";
|
|
13
14
|
export { IgnitorFactory };
|
|
@@ -1,24 +1,25 @@
|
|
|
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 "../../
|
|
13
|
-
import "../../
|
|
14
|
-
import "../../
|
|
15
|
-
import "../../
|
|
16
|
-
import "../../
|
|
17
|
-
import "../../main-
|
|
18
|
-
import "../../main-
|
|
19
|
-
import
|
|
20
|
-
import "../../
|
|
21
|
-
import
|
|
22
|
-
import "../../
|
|
23
|
-
import
|
|
8
|
+
import "../../config_provider-CY-xuo2R.js";
|
|
9
|
+
import "../../string-CJ7ewUFq.js";
|
|
10
|
+
import "../../utils-DjXMIVBJ.js";
|
|
11
|
+
import "../../core-Ckhxy7oM.js";
|
|
12
|
+
import "../../main-BWftwyAK.js";
|
|
13
|
+
import "../../logger-DV65GX9N.js";
|
|
14
|
+
import "../../exceptions-DNMesP42.js";
|
|
15
|
+
import "../../main-DNokQ-c9.js";
|
|
16
|
+
import "../../define_config-BlZ46bUg.js";
|
|
17
|
+
import "../../main-C2r_lzz0.js";
|
|
18
|
+
import "../../main-BIVLvDaW.js";
|
|
19
|
+
import "../../main-DOY5Q8Av.js";
|
|
20
|
+
import { t as IgnitorFactory } from "../../ignitor-B5akJVlQ.js";
|
|
21
|
+
import "../../create_kernel-PIeMK2Fo.js";
|
|
22
|
+
import { t as AceFactory } from "../../ace-BfYSDoPf.js";
|
|
23
|
+
import "../../main-DjlqWWRt.js";
|
|
24
|
+
import { t as TestUtilsFactory } from "../../test_utils-JjctlaE3.js";
|
|
24
25
|
export { AceFactory, IgnitorFactory, TestUtilsFactory };
|
|
@@ -1,21 +1,22 @@
|
|
|
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 "../../
|
|
13
|
-
import "../../
|
|
14
|
-
import "../../
|
|
15
|
-
import "../../
|
|
16
|
-
import "../../main-
|
|
17
|
-
import "../../main-
|
|
18
|
-
import "../../
|
|
19
|
-
import "../../
|
|
20
|
-
import
|
|
8
|
+
import "../../config_provider-CY-xuo2R.js";
|
|
9
|
+
import "../../string-CJ7ewUFq.js";
|
|
10
|
+
import "../../utils-DjXMIVBJ.js";
|
|
11
|
+
import "../../core-Ckhxy7oM.js";
|
|
12
|
+
import "../../logger-DV65GX9N.js";
|
|
13
|
+
import "../../exceptions-DNMesP42.js";
|
|
14
|
+
import "../../main-DNokQ-c9.js";
|
|
15
|
+
import "../../define_config-BlZ46bUg.js";
|
|
16
|
+
import "../../main-C2r_lzz0.js";
|
|
17
|
+
import "../../main-BIVLvDaW.js";
|
|
18
|
+
import "../../main-DOY5Q8Av.js";
|
|
19
|
+
import "../../ignitor-B5akJVlQ.js";
|
|
20
|
+
import "../../main-DjlqWWRt.js";
|
|
21
|
+
import { t as TestUtilsFactory } from "../../test_utils-JjctlaE3.js";
|
|
21
22
|
export { TestUtilsFactory };
|
|
@@ -64,11 +64,6 @@ export declare class StubsFactory {
|
|
|
64
64
|
* console.log(preparedStub.contents)
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
prepare(stubPath: string, data: Record<string, any>): Promise<
|
|
68
|
-
contents: string;
|
|
69
|
-
destination: any;
|
|
70
|
-
force: any;
|
|
71
|
-
attributes: Record<string, any>;
|
|
72
|
-
}>;
|
|
67
|
+
prepare(stubPath: string, data: Record<string, any>): Promise<import("@adonisjs/application/types").PreparedStub>;
|
|
73
68
|
}
|
|
74
69
|
export {};
|
package/build/factories/stubs.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "../chunk-B88MteZI.js";
|
|
2
2
|
import { t as stubsRoot } from "../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 "../
|
|
8
|
+
import "../config_provider-CY-xuo2R.js";
|
|
9
|
+
import "../string-CJ7ewUFq.js";
|
|
10
|
+
import "../utils-DjXMIVBJ.js";
|
|
11
|
+
import "../core-Ckhxy7oM.js";
|
|
11
12
|
import { AppFactory } from "@adonisjs/application/factories";
|
|
12
13
|
var StubsFactory = class {
|
|
13
14
|
#parameters = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-
|
|
2
|
-
import { t as logger_exports } from "./logger-
|
|
3
|
-
import { t as main_exports } from "./main-
|
|
4
|
-
import { n as drivers, t as defineConfig } from "./define_config-
|
|
5
|
-
import { n as defineConfig$1, r as drivers$1 } from "./main-
|
|
6
|
-
import { t as main_exports$1 } from "./main-
|
|
1
|
+
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
2
|
+
import { t as logger_exports } from "./logger-DV65GX9N.js";
|
|
3
|
+
import { t as main_exports } from "./main-DNokQ-c9.js";
|
|
4
|
+
import { n as drivers, t as defineConfig } from "./define_config-BlZ46bUg.js";
|
|
5
|
+
import { n as defineConfig$1, r as drivers$1 } from "./main-BIVLvDaW.js";
|
|
6
|
+
import { t as main_exports$1 } from "./main-DOY5Q8Av.js";
|
|
7
7
|
var IgnitorFactory = class {
|
|
8
8
|
#preloadActions = [];
|
|
9
9
|
#parameters = {};
|
package/build/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "./chunk-B88MteZI.js";
|
|
2
2
|
import { t as stubsRoot } from "./main-kn40V-hF.js";
|
|
3
3
|
import { t as container_exports } from "./container-uxa8LpGI.js";
|
|
4
|
-
import
|
|
5
|
-
import { t as Ignitor } from "./main-
|
|
4
|
+
import "./debug-DURPi9xn.js";
|
|
5
|
+
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
6
6
|
import "./app-B6oge7b3.js";
|
|
7
7
|
import "./app-DNvbxVWl.js";
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
8
|
+
import { t as configProvider } from "./config_provider-CY-xuo2R.js";
|
|
9
|
+
import "./string-CJ7ewUFq.js";
|
|
10
|
+
import "./utils-DjXMIVBJ.js";
|
|
11
|
+
import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-Ckhxy7oM.js";
|
|
11
12
|
var inject = container_exports.inject;
|
|
12
13
|
export { Ignitor, configProvider, errors, indexEntities, inject, prettyPrintError, stubsRoot };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as debug_default } from "./debug-DURPi9xn.js";
|
|
3
|
+
import { t as configProvider } from "./config_provider-CY-xuo2R.js";
|
|
3
4
|
import { InvalidArgumentsException } from "@poppinss/utils/exception";
|
|
4
5
|
function defineConfig(config) {
|
|
5
6
|
if (!config.list) throw new InvalidArgumentsException("Missing \"list\" property in hash config");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as debug_default } from "./debug-DURPi9xn.js";
|
|
2
2
|
import { n as setApp } from "./app-B6oge7b3.js";
|
|
3
3
|
import { t as app_exports } from "./app-DNvbxVWl.js";
|
|
4
4
|
import { createServer } from "node:http";
|
|
@@ -15,7 +15,7 @@ var AceProcess = class {
|
|
|
15
15
|
async handle(argv) {
|
|
16
16
|
const app = this.#ignitor.createApp("console");
|
|
17
17
|
await app.init();
|
|
18
|
-
const { createAceKernel } = await import("./create_kernel-
|
|
18
|
+
const { createAceKernel } = await import("./create_kernel-BCs646Vx.js");
|
|
19
19
|
const commandName = argv[argv.findIndex((value) => !value.startsWith("-"))];
|
|
20
20
|
const kernel = createAceKernel(app, commandName);
|
|
21
21
|
app.container.bindValue("ace", kernel);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as main_exports } from "./main-
|
|
3
|
-
import { n as Encryption } from "./main-
|
|
1
|
+
import { t as debug_default } from "./debug-DURPi9xn.js";
|
|
2
|
+
import { t as main_exports } from "./main-DNokQ-c9.js";
|
|
3
|
+
import { n as Encryption } from "./main-C2r_lzz0.js";
|
|
4
4
|
import { IncomingMessage, ServerResponse, createServer } from "node:http";
|
|
5
5
|
import { Socket } from "node:net";
|
|
6
6
|
import Macroable from "@poppinss/macroable";
|
|
@@ -3,6 +3,7 @@ import type { UIPrimitives } from '@adonisjs/ace/types';
|
|
|
3
3
|
import type { CodeTransformer } from '@adonisjs/assembler/code_transformer';
|
|
4
4
|
import type { MiddlewareNode, EnvValidationNode, BouncerPolicyNode, SupportedPackageManager } from '@adonisjs/assembler/types';
|
|
5
5
|
import type { Application } from '../app.ts';
|
|
6
|
+
import { type GeneratedStub } from '../../types/app.ts';
|
|
6
7
|
/**
|
|
7
8
|
* Codemods class for programmatically modifying AdonisJS source files.
|
|
8
9
|
* This class provides APIs to modify configuration files, register middleware,
|
|
@@ -172,6 +173,76 @@ export declare class Codemods extends EventEmitter {
|
|
|
172
173
|
* ```
|
|
173
174
|
*/
|
|
174
175
|
registerJapaPlugin(...params: Parameters<CodeTransformer['addJapaPlugin']>): Promise<void>;
|
|
176
|
+
/**
|
|
177
|
+
* Add a new validator file to the validators directory.
|
|
178
|
+
* This method creates a new validator file with the provided definition.
|
|
179
|
+
*
|
|
180
|
+
* @param params - Parameters for adding the validator
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```ts
|
|
184
|
+
* await codemods.addValidator({
|
|
185
|
+
* validatorFileName: 'create_user',
|
|
186
|
+
* exportName: 'createUserValidator',
|
|
187
|
+
* contents: 'export const createUserValidator = vine.compile(...)'
|
|
188
|
+
* })
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
addValidator(...params: Parameters<CodeTransformer['addValidator']>): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Add a new rate limiter file to the limiters directory.
|
|
194
|
+
* This method creates a new limiter file with the provided definition.
|
|
195
|
+
*
|
|
196
|
+
* @param params - Parameters for adding the limiter
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```ts
|
|
200
|
+
* await codemods.addLimiter({
|
|
201
|
+
* limiterFileName: 'api_throttle',
|
|
202
|
+
* exportName: 'apiThrottleLimiter',
|
|
203
|
+
* contents: 'export const apiThrottleLimiter = limiter.define(...)'
|
|
204
|
+
* })
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
addLimiter(...params: Parameters<CodeTransformer['addLimiter']>): Promise<void>;
|
|
208
|
+
/**
|
|
209
|
+
* Add mixins to a model class.
|
|
210
|
+
* This method adds mixin calls to the specified model file.
|
|
211
|
+
*
|
|
212
|
+
* @param params - Parameters for adding model mixins (modelFileName, mixins array)
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* await codemods.addModelMixins('user', [
|
|
217
|
+
* {
|
|
218
|
+
* name: 'SoftDeletes',
|
|
219
|
+
* importPath: '@adonisjs/lucid/mixins/soft_deletes',
|
|
220
|
+
* importType: 'named'
|
|
221
|
+
* }
|
|
222
|
+
* ])
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
addModelMixins(...params: Parameters<CodeTransformer['addModelMixins']>): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Add a new method to an existing controller class.
|
|
228
|
+
* This method injects a new method into the specified controller file.
|
|
229
|
+
*
|
|
230
|
+
* @param params - Parameters for adding the controller method
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```ts
|
|
234
|
+
* await codemods.addControllerMethod({
|
|
235
|
+
* controllerFileName: 'users_controller',
|
|
236
|
+
* className: 'UsersController',
|
|
237
|
+
* name: 'destroy',
|
|
238
|
+
* contents: 'async destroy({ params, response }: HttpContext) { ... }',
|
|
239
|
+
* imports: [
|
|
240
|
+
* { isType: false, isNamed: true, name: 'HttpContext', path: '@adonisjs/core/http' }
|
|
241
|
+
* ]
|
|
242
|
+
* })
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
addControllerMethod(...params: Parameters<CodeTransformer['addControllerMethod']>): Promise<void>;
|
|
175
246
|
/**
|
|
176
247
|
* Generate a file using a stub template
|
|
177
248
|
*
|
|
@@ -192,28 +263,9 @@ export declare class Codemods extends EventEmitter {
|
|
|
192
263
|
* )
|
|
193
264
|
* ```
|
|
194
265
|
*/
|
|
195
|
-
makeUsingStub(stubsRoot: string, stubPath: string, stubState: Record<string, any
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
destination: any;
|
|
199
|
-
attributes: Record<string, any>;
|
|
200
|
-
status: "created";
|
|
201
|
-
skipReason: null;
|
|
202
|
-
} | {
|
|
203
|
-
relativeFileName: string;
|
|
204
|
-
contents: string;
|
|
205
|
-
destination: any;
|
|
206
|
-
attributes: Record<string, any>;
|
|
207
|
-
status: "force_created";
|
|
208
|
-
skipReason: null;
|
|
209
|
-
} | {
|
|
210
|
-
relativeFileName: string;
|
|
211
|
-
contents: string;
|
|
212
|
-
destination: any;
|
|
213
|
-
attributes: Record<string, any>;
|
|
214
|
-
status: "skipped";
|
|
215
|
-
skipReason: string;
|
|
216
|
-
}>;
|
|
266
|
+
makeUsingStub(stubsRoot: string, stubPath: string, stubState: Record<string, any>, options?: {
|
|
267
|
+
contentsFromFile?: string;
|
|
268
|
+
}): Promise<GeneratedStub>;
|
|
217
269
|
/**
|
|
218
270
|
* Install packages using the detected or specified package manager.
|
|
219
271
|
* Automatically detects npm, yarn, or pnpm and installs dependencies accordingly.
|