@adonisjs/core 7.0.0-next.25 → 7.0.0-next.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +61 -0
  2. package/build/{ace-DrvIocZi.js → ace-BtbS16RX.js} +6 -6
  3. package/build/commands/add.js +8 -7
  4. package/build/commands/build.js +3 -3
  5. package/build/commands/commands.json +1 -1
  6. package/build/commands/configure.js +3 -4
  7. package/build/commands/eject.js +3 -3
  8. package/build/commands/env/add.js +3 -3
  9. package/build/commands/generate_key.js +2 -2
  10. package/build/commands/inspect_rcfile.js +1 -1
  11. package/build/commands/list/routes.js +2 -2
  12. package/build/commands/make/command.d.ts +5 -0
  13. package/build/commands/make/command.js +4 -3
  14. package/build/commands/make/controller.d.ts +5 -0
  15. package/build/commands/make/controller.js +4 -3
  16. package/build/commands/make/event.d.ts +5 -0
  17. package/build/commands/make/event.js +4 -3
  18. package/build/commands/make/exception.d.ts +5 -0
  19. package/build/commands/make/exception.js +4 -3
  20. package/build/commands/make/listener.d.ts +5 -0
  21. package/build/commands/make/listener.js +5 -4
  22. package/build/commands/make/middleware.d.ts +5 -0
  23. package/build/commands/make/middleware.js +5 -4
  24. package/build/commands/make/preload.d.ts +5 -0
  25. package/build/commands/make/preload.js +5 -4
  26. package/build/commands/make/provider.d.ts +5 -0
  27. package/build/commands/make/provider.js +5 -4
  28. package/build/commands/make/service.d.ts +5 -0
  29. package/build/commands/make/service.js +4 -3
  30. package/build/commands/make/test.d.ts +5 -0
  31. package/build/commands/make/test.js +4 -3
  32. package/build/commands/make/transformer.d.ts +5 -0
  33. package/build/commands/make/transformer.js +4 -3
  34. package/build/commands/make/validator.d.ts +5 -0
  35. package/build/commands/make/validator.js +4 -3
  36. package/build/commands/make/view.d.ts +5 -0
  37. package/build/commands/make/view.js +4 -3
  38. package/build/commands/repl.js +1 -1
  39. package/build/commands/serve.js +3 -3
  40. package/build/commands/test.js +3 -3
  41. package/build/{config_provider-DWVFHOQX.js → config_provider-CY-xuo2R.js} +1 -3
  42. package/build/{core-BuPP8K6N.js → core-Ckhxy7oM.js} +2 -2
  43. package/build/create_kernel-BCs646Vx.js +3 -0
  44. package/build/{create_kernel-C5k82J0c.js → create_kernel-PIeMK2Fo.js} +1 -1
  45. package/build/debug-DURPi9xn.js +3 -0
  46. package/build/{define_config-t8DrH2OV.js → define_config-BlZ46bUg.js} +3 -2
  47. package/build/{edge-LQdCc1L3.js → edge-D4loPeln.js} +3 -3
  48. package/build/factories/core/ace.js +13 -12
  49. package/build/factories/core/ignitor.js +10 -9
  50. package/build/factories/core/main.js +19 -18
  51. package/build/factories/core/test_utils.js +16 -15
  52. package/build/factories/stubs.d.ts +1 -6
  53. package/build/factories/stubs.js +6 -5
  54. package/build/{ignitor-DAyIsDqZ.js → ignitor-D6oitHT8.js} +6 -6
  55. package/build/index.js +6 -5
  56. package/build/{main-B4VF6my1.js → main-BDp4yNr8.js} +19 -8
  57. package/build/{main-BpYXrgM0.js → main-BIVLvDaW.js} +2 -1
  58. package/build/{main-BBjkufvA.js → main-C4Amt3wT.js} +3 -3
  59. package/build/{main-BCUvPhoe.js → main-DRfo73b5.js} +7 -5
  60. package/build/modules/ace/codemods.d.ts +74 -22
  61. package/build/modules/ace/codemods.js +78 -4
  62. package/build/modules/ace/main.js +1 -1
  63. package/build/modules/bodyparser/bodyparser_middleware.js +1 -1
  64. package/build/modules/bodyparser/main.js +1 -1
  65. package/build/modules/config.js +1 -1
  66. package/build/modules/dumper/main.js +1 -1
  67. package/build/modules/dumper/plugins/edge.js +1 -1
  68. package/build/modules/encryption/main.js +5 -4
  69. package/build/modules/events.js +1 -1
  70. package/build/modules/hash/main.js +3 -2
  71. package/build/modules/http/main.js +1 -1
  72. package/build/modules/http/request_validator.d.ts +2 -1
  73. package/build/modules/logger.js +1 -1
  74. package/build/modules/repl.js +1 -1
  75. package/build/providers/app_provider.js +12 -11
  76. package/build/providers/edge_provider.js +2 -2
  77. package/build/providers/hash_provider.js +3 -2
  78. package/build/providers/repl_provider.js +1 -1
  79. package/build/providers/vinejs_provider.js +5 -2
  80. package/build/src/exceptions.js +1 -1
  81. package/build/src/helpers/main.js +1 -1
  82. package/build/src/helpers/string.js +1 -1
  83. package/build/src/helpers/types.js +1 -1
  84. package/build/src/helpers/verification_token.js +1 -1
  85. package/build/src/test_utils/main.js +7 -6
  86. package/build/src/vine.js +1 -1
  87. package/build/{test_utils-BUSLSCLy.js → test_utils-Ql9I7QAz.js} +3 -3
  88. package/build/toolkit/main.js +1 -1
  89. package/build/{vine-Bt4ymkM0.js → vine-D37x2ex7.js} +1 -0
  90. package/package.json +12 -12
  91. package/build/create_kernel-CSvWA2w2.js +0 -3
  92. /package/build/{bodyparser_middleware-DTW0epKM.js → bodyparser_middleware-BmARtnYe.js} +0 -0
  93. /package/build/{config-Dd2H6-_e.js → config-BEEqDrcn.js} +0 -0
  94. /package/build/{decorate-CJcHOoD-.js → decorate-DM0Sx1ye.js} +0 -0
  95. /package/build/{dumper-BTjb8j4y.js → dumper-DxJ_VRuC.js} +0 -0
  96. /package/build/{events-C4d0OPUI.js → events-BWRc08nG.js} +0 -0
  97. /package/build/{exceptions-D7t_HaaU.js → exceptions-DNMesP42.js} +0 -0
  98. /package/build/{logger-0KKSqgPG.js → logger-DV65GX9N.js} +0 -0
  99. /package/build/{main-BlJhxJJ2.js → main-BWftwyAK.js} +0 -0
  100. /package/build/{main-CoP2zLaT.js → main-C2r_lzz0.js} +0 -0
  101. /package/build/{main-DixtGykP.js → main-DOY5Q8Av.js} +0 -0
  102. /package/build/{repl-GSxgovJQ.js → repl-CwFmzJvr.js} +0 -0
  103. /package/build/{string-Cx6q_win.js → string-CJ7ewUFq.js} +0 -0
  104. /package/build/{utils-CtGytdtt.js → utils-DjXMIVBJ.js} +0 -0
  105. /package/build/{verification_token-DXsW81rl.js → verification_token-DrdoU4RH.js} +0 -0
@@ -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-BlJhxJJ2.js";
3
- import { t as __decorate } from "../../decorate-CJcHOoD-.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 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-BlJhxJJ2.js";
3
- import { t as __decorate } from "../../decorate-CJcHOoD-.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 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 };
@@ -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-BlJhxJJ2.js";
3
- import { t as __decorate } from "../../decorate-CJcHOoD-.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 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-BlJhxJJ2.js";
3
- import { t as __decorate } from "../../decorate-CJcHOoD-.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 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-BlJhxJJ2.js";
3
- import { t as __decorate } from "../../decorate-CJcHOoD-.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 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 };
@@ -1,4 +1,4 @@
1
- import { f as BaseCommand } from "../main-BlJhxJJ2.js";
1
+ import { f as BaseCommand } from "../main-BWftwyAK.js";
2
2
  var ReplCommand = class extends BaseCommand {
3
3
  static commandName = "repl";
4
4
  static description = "Start a new REPL session";
@@ -1,6 +1,6 @@
1
- import { 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";
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";
@@ -1,6 +1,6 @@
1
- import { t as importAssembler } from "../utils-CtGytdtt.js";
2
- import { f as BaseCommand, l as flags, o as args } from "../main-BlJhxJJ2.js";
3
- import { t as __decorate } from "../decorate-CJcHOoD-.js";
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 { debug_default as n, configProvider as t };
13
+ export { configProvider as t };
@@ -1,5 +1,5 @@
1
- import { t as string_default } from "./string-Cx6q_win.js";
2
- import { r as outputTransformerDataObjects } from "./utils-CtGytdtt.js";
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";
@@ -0,0 +1,3 @@
1
+ import "./main-BWftwyAK.js";
2
+ import { t as createAceKernel } from "./create_kernel-PIeMK2Fo.js";
3
+ export { createAceKernel };
@@ -1,4 +1,4 @@
1
- import { d as Kernel, n as HelpCommand, t as FsLoader } from "./main-BlJhxJJ2.js";
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");
@@ -0,0 +1,3 @@
1
+ import { debuglog } from "node:util";
2
+ var debug_default = debuglog("adonisjs:core");
3
+ export { debug_default as t };
@@ -1,5 +1,6 @@
1
- import { n as debug_default, t as configProvider } from "./config_provider-DWVFHOQX.js";
2
- import { n as InvalidArgumentsException } from "./exceptions-D7t_HaaU.js";
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,8 +1,8 @@
1
1
  import { Template } from "edge.js";
2
2
  function pluginEdgeDumper(dumper) {
3
3
  Template.macro("dumper", dumper);
4
- return (edge$1) => {
5
- edge$1.registerTag({
4
+ return (edge) => {
5
+ edge.registerTag({
6
6
  tagName: "dump",
7
7
  block: false,
8
8
  seekable: true,
@@ -13,7 +13,7 @@ function pluginEdgeDumper(dumper) {
13
13
  buffer.outputExpression(`template.dumper.dumpToHtml(${parser.utils.stringify(parsed)}, { cspNonce: state.cspNonce, source: { location: $filename, line: $lineNumber } })`, token.filename, token.loc.start.line, true);
14
14
  }
15
15
  });
16
- edge$1.registerTag({
16
+ edge.registerTag({
17
17
  tagName: "dd",
18
18
  block: false,
19
19
  seekable: true,
@@ -1,16 +1,17 @@
1
1
  import "../../chunk-B88MteZI.js";
2
- import "../../config_provider-DWVFHOQX.js";
3
- import "../../main-BCUvPhoe.js";
2
+ import "../../debug-DURPi9xn.js";
3
+ import "../../main-DRfo73b5.js";
4
4
  import "../../app-B6oge7b3.js";
5
5
  import "../../app-DNvbxVWl.js";
6
- import "../../main-BlJhxJJ2.js";
7
- import "../../logger-0KKSqgPG.js";
8
- import "../../exceptions-D7t_HaaU.js";
9
- import "../../main-B4VF6my1.js";
10
- import "../../define_config-t8DrH2OV.js";
11
- import "../../main-BpYXrgM0.js";
12
- import "../../main-DixtGykP.js";
13
- import "../../ignitor-DAyIsDqZ.js";
14
- import "../../create_kernel-C5k82J0c.js";
15
- import { t as AceFactory } from "../../ace-DrvIocZi.js";
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-BDp4yNr8.js";
11
+ import "../../define_config-BlZ46bUg.js";
12
+ import "../../main-BIVLvDaW.js";
13
+ import "../../main-DOY5Q8Av.js";
14
+ import "../../ignitor-D6oitHT8.js";
15
+ import "../../create_kernel-PIeMK2Fo.js";
16
+ import { t as AceFactory } from "../../ace-BtbS16RX.js";
16
17
  export { AceFactory };
@@ -1,13 +1,14 @@
1
1
  import "../../chunk-B88MteZI.js";
2
- import "../../config_provider-DWVFHOQX.js";
3
- import "../../main-BCUvPhoe.js";
2
+ import "../../debug-DURPi9xn.js";
3
+ import "../../main-DRfo73b5.js";
4
4
  import "../../app-B6oge7b3.js";
5
5
  import "../../app-DNvbxVWl.js";
6
- import "../../logger-0KKSqgPG.js";
7
- import "../../exceptions-D7t_HaaU.js";
8
- import "../../main-B4VF6my1.js";
9
- import "../../define_config-t8DrH2OV.js";
10
- import "../../main-BpYXrgM0.js";
11
- import "../../main-DixtGykP.js";
12
- import { t as IgnitorFactory } from "../../ignitor-DAyIsDqZ.js";
6
+ import "../../config_provider-CY-xuo2R.js";
7
+ import "../../logger-DV65GX9N.js";
8
+ import "../../exceptions-DNMesP42.js";
9
+ import "../../main-BDp4yNr8.js";
10
+ import "../../define_config-BlZ46bUg.js";
11
+ import "../../main-BIVLvDaW.js";
12
+ import "../../main-DOY5Q8Av.js";
13
+ import { t as IgnitorFactory } from "../../ignitor-D6oitHT8.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 "../../config_provider-DWVFHOQX.js";
5
- import "../../main-BCUvPhoe.js";
4
+ import "../../debug-DURPi9xn.js";
5
+ import "../../main-DRfo73b5.js";
6
6
  import "../../app-B6oge7b3.js";
7
7
  import "../../app-DNvbxVWl.js";
8
- import "../../string-Cx6q_win.js";
9
- import "../../utils-CtGytdtt.js";
10
- import "../../core-BuPP8K6N.js";
11
- import "../../main-BlJhxJJ2.js";
12
- import "../../logger-0KKSqgPG.js";
13
- import "../../exceptions-D7t_HaaU.js";
14
- import "../../main-B4VF6my1.js";
15
- import "../../define_config-t8DrH2OV.js";
16
- import "../../main-CoP2zLaT.js";
17
- import "../../main-BpYXrgM0.js";
18
- import "../../main-DixtGykP.js";
19
- import { t as IgnitorFactory } from "../../ignitor-DAyIsDqZ.js";
20
- import "../../create_kernel-C5k82J0c.js";
21
- import { t as AceFactory } from "../../ace-DrvIocZi.js";
22
- import "../../main-BBjkufvA.js";
23
- import { t as TestUtilsFactory } from "../../test_utils-BUSLSCLy.js";
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-BDp4yNr8.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-D6oitHT8.js";
21
+ import "../../create_kernel-PIeMK2Fo.js";
22
+ import { t as AceFactory } from "../../ace-BtbS16RX.js";
23
+ import "../../main-C4Amt3wT.js";
24
+ import { t as TestUtilsFactory } from "../../test_utils-Ql9I7QAz.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 "../../config_provider-DWVFHOQX.js";
5
- import "../../main-BCUvPhoe.js";
4
+ import "../../debug-DURPi9xn.js";
5
+ import "../../main-DRfo73b5.js";
6
6
  import "../../app-B6oge7b3.js";
7
7
  import "../../app-DNvbxVWl.js";
8
- import "../../string-Cx6q_win.js";
9
- import "../../utils-CtGytdtt.js";
10
- import "../../core-BuPP8K6N.js";
11
- import "../../logger-0KKSqgPG.js";
12
- import "../../exceptions-D7t_HaaU.js";
13
- import "../../main-B4VF6my1.js";
14
- import "../../define_config-t8DrH2OV.js";
15
- import "../../main-CoP2zLaT.js";
16
- import "../../main-BpYXrgM0.js";
17
- import "../../main-DixtGykP.js";
18
- import "../../ignitor-DAyIsDqZ.js";
19
- import "../../main-BBjkufvA.js";
20
- import { t as TestUtilsFactory } from "../../test_utils-BUSLSCLy.js";
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-BDp4yNr8.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-D6oitHT8.js";
20
+ import "../../main-C4Amt3wT.js";
21
+ import { t as TestUtilsFactory } from "../../test_utils-Ql9I7QAz.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 {};
@@ -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 "../config_provider-DWVFHOQX.js";
5
- import "../main-BCUvPhoe.js";
4
+ import "../debug-DURPi9xn.js";
5
+ import "../main-DRfo73b5.js";
6
6
  import "../app-B6oge7b3.js";
7
7
  import "../app-DNvbxVWl.js";
8
- import "../string-Cx6q_win.js";
9
- import "../utils-CtGytdtt.js";
10
- import "../core-BuPP8K6N.js";
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-BCUvPhoe.js";
2
- import { t as logger_exports } from "./logger-0KKSqgPG.js";
3
- import { t as main_exports } from "./main-B4VF6my1.js";
4
- import { n as drivers, t as defineConfig } from "./define_config-t8DrH2OV.js";
5
- import { n as defineConfig$1, r as drivers$1 } from "./main-BpYXrgM0.js";
6
- import { t as main_exports$1 } from "./main-DixtGykP.js";
1
+ import { t as Ignitor } from "./main-DRfo73b5.js";
2
+ import { t as logger_exports } from "./logger-DV65GX9N.js";
3
+ import { t as main_exports } from "./main-BDp4yNr8.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 { t as configProvider } from "./config_provider-DWVFHOQX.js";
5
- import { t as Ignitor } from "./main-BCUvPhoe.js";
4
+ import "./debug-DURPi9xn.js";
5
+ import { t as Ignitor } from "./main-DRfo73b5.js";
6
6
  import "./app-B6oge7b3.js";
7
7
  import "./app-DNvbxVWl.js";
8
- import "./string-Cx6q_win.js";
9
- import "./utils-CtGytdtt.js";
10
- import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-BuPP8K6N.js";
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 };
@@ -7,22 +7,33 @@ var RequestValidator = class RequestValidator {
7
7
  }
8
8
  static errorReporter;
9
9
  static messagesProvider;
10
- validateUsing(validator, ...[options]) {
10
+ #requestData() {
11
+ return {
12
+ ...this.#ctx.request.all(),
13
+ params: this.#ctx.request.params(),
14
+ headers: this.#ctx.request.headers(),
15
+ cookies: this.#ctx.request.cookiesList()
16
+ };
17
+ }
18
+ #processValidatorOptions(options) {
11
19
  const validatorOptions = options || {};
12
20
  if (RequestValidator.errorReporter && !validatorOptions.errorReporter) {
13
21
  const errorReporter = RequestValidator.errorReporter(this.#ctx);
14
22
  validatorOptions.errorReporter = () => errorReporter;
15
23
  }
16
24
  if (RequestValidator.messagesProvider && !validatorOptions.messagesProvider) validatorOptions.messagesProvider = RequestValidator.messagesProvider(this.#ctx);
17
- const requestBody = this.#ctx.request.all();
18
- const data = validatorOptions.data || {
19
- ...requestBody,
20
- params: this.#ctx.request.params(),
21
- headers: this.#ctx.request.headers(),
22
- cookies: this.#ctx.request.cookiesList()
23
- };
25
+ return validatorOptions;
26
+ }
27
+ validateUsing(validator, ...[options]) {
28
+ const validatorOptions = this.#processValidatorOptions(options);
29
+ const data = validatorOptions.data || this.#requestData();
24
30
  return validator.validate(data, validatorOptions);
25
31
  }
32
+ async tryValidateUsing(validator, ...[options]) {
33
+ const validatorOptions = this.#processValidatorOptions(options);
34
+ const data = validatorOptions.data || this.#requestData();
35
+ return validator.tryValidate(data, validatorOptions);
36
+ }
26
37
  };
27
38
  var main_exports = /* @__PURE__ */ __exportAll({ RequestValidator: () => RequestValidator });
28
39
  import * as import__adonisjs_http_server from "@adonisjs/http-server";
@@ -1,5 +1,6 @@
1
1
  import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
2
- import { n as debug_default, t as configProvider } from "./config_provider-DWVFHOQX.js";
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,6 +1,6 @@
1
- import { n as debug_default } from "./config_provider-DWVFHOQX.js";
2
- import { t as main_exports } from "./main-B4VF6my1.js";
3
- import { n as Encryption } from "./main-CoP2zLaT.js";
1
+ import { t as debug_default } from "./debug-DURPi9xn.js";
2
+ import { t as main_exports } from "./main-BDp4yNr8.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";
@@ -1,4 +1,4 @@
1
- import { n as debug_default } from "./config_provider-DWVFHOQX.js";
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-CSvWA2w2.js");
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);
@@ -27,14 +27,16 @@ var AceProcess = class {
27
27
  }
28
28
  });
29
29
  await this.#configureCallback(app);
30
+ app.terminating(() => {
31
+ const mainCommand = kernel.getMainCommand();
32
+ if (mainCommand?.staysAlive) process.exitCode = mainCommand.exitCode;
33
+ });
30
34
  await kernel.handle(argv);
31
35
  const mainCommand = kernel.getMainCommand();
32
36
  if (!mainCommand || !mainCommand.staysAlive) {
33
37
  process.exitCode = kernel.exitCode;
34
38
  await app.terminate();
35
- } else app.terminating(() => {
36
- process.exitCode = mainCommand.exitCode;
37
- });
39
+ }
38
40
  }
39
41
  };
40
42
  var TestRunnerProcess = class {