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

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 (107) hide show
  1. package/build/{chunk-B88MteZI.js → chunk-iKc69rpz.js} +2 -2
  2. package/build/commands/add.js +8 -12
  3. package/build/commands/build.js +3 -3
  4. package/build/commands/configure.js +2 -2
  5. package/build/commands/eject.js +4 -4
  6. package/build/commands/env/add.js +5 -5
  7. package/build/commands/generate_key.js +2 -2
  8. package/build/commands/inspect_rcfile.js +1 -1
  9. package/build/commands/list/routes.js +2 -2
  10. package/build/commands/make/command.js +2 -2
  11. package/build/commands/make/controller.js +2 -2
  12. package/build/commands/make/event.js +2 -2
  13. package/build/commands/make/exception.js +2 -2
  14. package/build/commands/make/listener.js +2 -2
  15. package/build/commands/make/middleware.js +4 -4
  16. package/build/commands/make/preload.js +4 -4
  17. package/build/commands/make/provider.js +4 -4
  18. package/build/commands/make/service.js +2 -2
  19. package/build/commands/make/test.js +2 -2
  20. package/build/commands/make/transformer.js +2 -2
  21. package/build/commands/make/validator.js +2 -2
  22. package/build/commands/make/view.js +2 -2
  23. package/build/commands/repl.js +1 -1
  24. package/build/commands/serve.js +3 -3
  25. package/build/commands/test.js +3 -3
  26. package/build/{core-Ckhxy7oM.js → core-CvwBnUuy.js} +3 -3
  27. package/build/{create_kernel-PIeMK2Fo.js → create_kernel-BFf40UqW.js} +1 -1
  28. package/build/create_kernel-kceIXCLj.js +3 -0
  29. package/build/{define_config-BlZ46bUg.js → define_config-C9vVaMH2.js} +3 -3
  30. package/build/{dumper-DxJ_VRuC.js → dumper-BBgqFX5a.js} +1 -1
  31. package/build/factories/core/ace.js +22 -16
  32. package/build/factories/core/ignitor.js +73 -13
  33. package/build/factories/core/main.js +15 -23
  34. package/build/factories/core/test_utils.js +17 -20
  35. package/build/factories/stubs.js +6 -10
  36. package/build/index.js +7 -10
  37. package/build/{main-BIVLvDaW.js → main-BAQrymbz.js} +3 -3
  38. package/build/{main-C4Amt3wT.js → main-CGF65fuX.js} +3 -3
  39. package/build/{main-BDp4yNr8.js → main-DN2qEEg5.js} +1 -1
  40. package/build/{main-DRfo73b5.js → main-zQdklBGW.js} +4 -4
  41. package/build/modules/ace/codemods.js +3 -3
  42. package/build/modules/ace/main.js +1 -1
  43. package/build/modules/app.js +5 -3
  44. package/build/modules/bodyparser/bodyparser_middleware.js +2 -1
  45. package/build/modules/bodyparser/main.js +5 -3
  46. package/build/modules/config.js +5 -3
  47. package/build/modules/container.js +5 -3
  48. package/build/modules/dumper/main.js +2 -2
  49. package/build/modules/dumper/plugins/edge.js +46 -1
  50. package/build/modules/encryption/main.js +4 -5
  51. package/build/modules/events.js +5 -3
  52. package/build/modules/hash/main.js +4 -4
  53. package/build/modules/http/main.js +2 -2
  54. package/build/modules/logger.js +13 -3
  55. package/build/modules/repl.js +5 -3
  56. package/build/providers/app_provider.js +14 -14
  57. package/build/providers/edge_provider.js +3 -3
  58. package/build/providers/hash_provider.js +4 -4
  59. package/build/providers/repl_provider.js +2 -2
  60. package/build/providers/vinejs_provider.js +3 -3
  61. package/build/services/ace.js +1 -1
  62. package/build/services/app.js +4 -1
  63. package/build/services/config.js +1 -1
  64. package/build/services/dumper.js +1 -1
  65. package/build/services/emitter.js +1 -1
  66. package/build/services/encryption.js +1 -1
  67. package/build/services/hash.js +1 -1
  68. package/build/services/logger.js +1 -1
  69. package/build/services/repl.js +1 -1
  70. package/build/services/router.js +1 -1
  71. package/build/services/server.js +1 -1
  72. package/build/services/test_utils.js +1 -1
  73. package/build/services/url_builder.js +1 -1
  74. package/build/src/debug.d.ts +1 -1
  75. package/build/src/exceptions.js +1 -1
  76. package/build/src/helpers/main.js +1 -1
  77. package/build/src/helpers/string.js +28 -2
  78. package/build/src/helpers/types.js +2 -2
  79. package/build/src/helpers/verification_token.js +45 -1
  80. package/build/src/test_utils/main.js +6 -8
  81. package/build/src/vine.js +32 -1
  82. package/build/toolkit/main.js +1 -1
  83. package/package.json +6 -6
  84. package/build/ace-BtbS16RX.js +0 -16
  85. package/build/app-B6oge7b3.js +0 -5
  86. package/build/app-DNvbxVWl.js +0 -5
  87. package/build/bodyparser_middleware-BmARtnYe.js +0 -3
  88. package/build/config-BEEqDrcn.js +0 -5
  89. package/build/container-uxa8LpGI.js +0 -5
  90. package/build/create_kernel-BCs646Vx.js +0 -3
  91. package/build/edge-D4loPeln.js +0 -47
  92. package/build/events-BWRc08nG.js +0 -5
  93. package/build/exceptions-DNMesP42.js +0 -2
  94. package/build/ignitor-D6oitHT8.js +0 -71
  95. package/build/logger-DV65GX9N.js +0 -13
  96. package/build/main-C2r_lzz0.js +0 -2
  97. package/build/main-DOY5Q8Av.js +0 -5
  98. package/build/repl-CwFmzJvr.js +0 -5
  99. package/build/string-CJ7ewUFq.js +0 -28
  100. package/build/test_utils-Ql9I7QAz.js +0 -10
  101. package/build/verification_token-DrdoU4RH.js +0 -46
  102. package/build/vine-D37x2ex7.js +0 -33
  103. /package/build/{config_provider-CY-xuo2R.js → config_provider-FIAUgvae.js} +0 -0
  104. /package/build/{debug-DURPi9xn.js → debug-CGQmxzGt.js} +0 -0
  105. /package/build/{decorate-DM0Sx1ye.js → decorate-DmrZA614.js} +0 -0
  106. /package/build/{main-BWftwyAK.js → main-MBAMnmJb.js} +0 -0
  107. /package/build/{utils-DjXMIVBJ.js → utils-CcS9NOK_.js} +0 -0
package/build/index.js CHANGED
@@ -1,13 +1,10 @@
1
- import "./chunk-B88MteZI.js";
1
+ import "./chunk-iKc69rpz.js";
2
2
  import { t as stubsRoot } from "./main-kn40V-hF.js";
3
- import { t as container_exports } from "./container-uxa8LpGI.js";
4
- import "./debug-DURPi9xn.js";
5
- import { t as Ignitor } from "./main-DRfo73b5.js";
6
- import "./app-B6oge7b3.js";
7
- import "./app-DNvbxVWl.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";
3
+ import { t as container_exports } from "./modules/container.js";
4
+ import "./debug-CGQmxzGt.js";
5
+ import { t as Ignitor } from "./main-zQdklBGW.js";
6
+ import { t as configProvider } from "./config_provider-FIAUgvae.js";
7
+ import "./utils-CcS9NOK_.js";
8
+ import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-CvwBnUuy.js";
12
9
  var inject = container_exports.inject;
13
10
  export { Ignitor, configProvider, errors, indexEntities, inject, prettyPrintError, stubsRoot };
@@ -1,6 +1,6 @@
1
- import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
2
- import { t as debug_default } from "./debug-DURPi9xn.js";
3
- import { t as configProvider } from "./config_provider-CY-xuo2R.js";
1
+ import { n as __reExport, t as __exportAll } from "./chunk-iKc69rpz.js";
2
+ import { t as debug_default } from "./debug-CGQmxzGt.js";
3
+ import { t as configProvider } from "./config_provider-FIAUgvae.js";
4
4
  import { InvalidArgumentsException } from "@poppinss/utils/exception";
5
5
  function defineConfig(config) {
6
6
  if (!config.list) throw new InvalidArgumentsException("Missing \"list\" property in hash config");
@@ -1,6 +1,6 @@
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";
1
+ import { t as debug_default } from "./debug-CGQmxzGt.js";
2
+ import { t as main_exports } from "./main-DN2qEEg5.js";
3
+ import { Encryption } from "./modules/encryption/main.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 __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
1
+ import { n as __reExport, t as __exportAll } from "./chunk-iKc69rpz.js";
2
2
  import "@adonisjs/bodyparser";
3
3
  var RequestValidator = class RequestValidator {
4
4
  #ctx;
@@ -1,6 +1,6 @@
1
- import { t as debug_default } from "./debug-DURPi9xn.js";
2
- import { n as setApp } from "./app-B6oge7b3.js";
3
- import { t as app_exports } from "./app-DNvbxVWl.js";
1
+ import { t as debug_default } from "./debug-CGQmxzGt.js";
2
+ import { setApp } from "./services/app.js";
3
+ import { t as app_exports } from "./modules/app.js";
4
4
  import { createServer } from "node:http";
5
5
  var AceProcess = class {
6
6
  #ignitor;
@@ -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-BCs646Vx.js");
18
+ const { createAceKernel } = await import("./create_kernel-kceIXCLj.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,5 +1,5 @@
1
- import { t as debug_default } from "../../debug-DURPi9xn.js";
2
- import { t as string_default } from "../../string-CJ7ewUFq.js";
1
+ import { t as debug_default } from "../../debug-CGQmxzGt.js";
2
+ import stringHelpers from "../../src/helpers/string.js";
3
3
  import { EnvEditor } from "@adonisjs/env/editor";
4
4
  import { isAbsolute } from "node:path";
5
5
  import { readFile } from "node:fs/promises";
@@ -222,7 +222,7 @@ var Codemods = class extends EventEmitter {
222
222
  ...stubState
223
223
  });
224
224
  debug_default("generating file %O", output);
225
- const entityFileName = string_default.toUnixSlash(this.#app.relativePath(output.destination));
225
+ const entityFileName = stringHelpers.toUnixSlash(this.#app.relativePath(output.destination));
226
226
  const result = {
227
227
  ...output,
228
228
  relativeFileName: entityFileName
@@ -1,2 +1,2 @@
1
- import { a as Parser, c as errors, d as Kernel, f as BaseCommand, i as ListLoader, l as flags, n as HelpCommand, o as args, p as ListCommand, r as IndexGenerator, s as cliHelpers, t as FsLoader, u as tracingChannels } from "../../main-BWftwyAK.js";
1
+ import { a as Parser, c as errors, d as Kernel, f as BaseCommand, i as ListLoader, l as flags, n as HelpCommand, o as args, p as ListCommand, r as IndexGenerator, s as cliHelpers, t as FsLoader, u as tracingChannels } from "../../main-MBAMnmJb.js";
2
2
  export { BaseCommand, FsLoader, HelpCommand, IndexGenerator, Kernel, ListCommand, ListLoader, Parser, args, cliHelpers, errors, flags, tracingChannels };
@@ -1,4 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../app-DNvbxVWl.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/application";
4
- export {};
3
+ var app_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_application from "@adonisjs/application";
5
+ __reExport(app_exports, import__adonisjs_application);
6
+ export { app_exports as t };
@@ -1,2 +1,3 @@
1
- import { t as bodyparser_middleware_default } from "../../bodyparser_middleware-BmARtnYe.js";
1
+ import { BodyParserMiddleware } from "@adonisjs/bodyparser/bodyparser_middleware";
2
+ var bodyparser_middleware_default = BodyParserMiddleware;
2
3
  export { bodyparser_middleware_default as default };
@@ -1,4 +1,6 @@
1
- import "../../chunk-B88MteZI.js";
2
- import "../../main-DOY5Q8Av.js";
1
+ import { n as __reExport, t as __exportAll } from "../../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/bodyparser";
4
- export {};
3
+ var main_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_bodyparser from "@adonisjs/bodyparser";
5
+ __reExport(main_exports, import__adonisjs_bodyparser);
6
+ export { main_exports as t };
@@ -1,4 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../config-BEEqDrcn.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/config";
4
- export {};
3
+ var config_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_config from "@adonisjs/config";
5
+ __reExport(config_exports, import__adonisjs_config);
6
+ export { config_exports as t };
@@ -1,4 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../container-uxa8LpGI.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/fold";
4
- export {};
3
+ var container_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_fold from "@adonisjs/fold";
5
+ __reExport(container_exports, import__adonisjs_fold);
6
+ export { container_exports as t };
@@ -1,5 +1,5 @@
1
- import "../../chunk-B88MteZI.js";
2
- import { n as errors_exports, t as Dumper } from "../../dumper-DxJ_VRuC.js";
1
+ import "../../chunk-iKc69rpz.js";
2
+ import { n as errors_exports, t as Dumper } from "../../dumper-BBgqFX5a.js";
3
3
  function defineConfig(dumperConfig) {
4
4
  return dumperConfig;
5
5
  }
@@ -1,2 +1,47 @@
1
- import { t as pluginEdgeDumper } from "../../../edge-D4loPeln.js";
1
+ import { Template } from "edge.js";
2
+ function pluginEdgeDumper(dumper) {
3
+ Template.macro("dumper", dumper);
4
+ return (edge) => {
5
+ edge.registerTag({
6
+ tagName: "dump",
7
+ block: false,
8
+ seekable: true,
9
+ noNewLine: true,
10
+ compile(parser, buffer, token) {
11
+ const parsed = parser.utils.transformAst(parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename), token.filename, parser);
12
+ buffer.writeExpression(`template.stacks.pushOnceTo('dumper', 'dumper_globals', template.dumper.getHeadElements(state.cspNonce))`, token.filename, token.loc.start.line);
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
+ }
15
+ });
16
+ edge.registerTag({
17
+ tagName: "dd",
18
+ block: false,
19
+ seekable: true,
20
+ noNewLine: true,
21
+ compile(parser, buffer, token) {
22
+ const parsed = parser.utils.transformAst(parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename), token.filename, parser);
23
+ const ddStatement = [
24
+ "try {",
25
+ ` template.dumper.dd(${parser.utils.stringify(parsed)})`,
26
+ "} catch (error) {",
27
+ ` if (error.code === 'E_DUMP_DIE_EXCEPTION') {`,
28
+ " const edgeError = template.createError(error.message, $filename, $lineNumber)",
29
+ " error.fileName = $filename",
30
+ " error.lineNumber = $lineNumber",
31
+ " edgeError.handle = function (_, ctx) {",
32
+ " return error.handle(error, ctx)",
33
+ " }",
34
+ " edgeError.report = function () {",
35
+ " return error.report(error)",
36
+ " }",
37
+ " throw edgeError",
38
+ " }",
39
+ " throw error",
40
+ "}"
41
+ ].join("\n");
42
+ buffer.writeStatement(ddStatement, token.filename, token.loc.start.line);
43
+ }
44
+ });
45
+ };
46
+ }
2
47
  export { pluginEdgeDumper };
@@ -1,6 +1,5 @@
1
- import "../../debug-DURPi9xn.js";
2
- import "../../config_provider-CY-xuo2R.js";
3
- import "../../exceptions-DNMesP42.js";
4
- import { n as drivers, t as defineConfig } from "../../define_config-BlZ46bUg.js";
5
- import { i as Hmac, n as Encryption, r as EncryptionManager, t as BaseDriver } from "../../main-C2r_lzz0.js";
1
+ import "../../debug-CGQmxzGt.js";
2
+ import "../../config_provider-FIAUgvae.js";
3
+ import { n as drivers, t as defineConfig } from "../../define_config-C9vVaMH2.js";
4
+ import { BaseDriver, Encryption, EncryptionManager, Hmac } from "@boringnode/encryption";
6
5
  export { BaseDriver, Encryption, EncryptionManager, Hmac, defineConfig, drivers };
@@ -1,4 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../events-BWRc08nG.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/events";
4
- export {};
3
+ var events_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_events from "@adonisjs/events";
5
+ __reExport(events_exports, import__adonisjs_events);
6
+ export { events_exports as t };
@@ -1,6 +1,6 @@
1
- import "../../chunk-B88MteZI.js";
2
- import "../../debug-DURPi9xn.js";
3
- import "../../config_provider-CY-xuo2R.js";
4
- import { n as defineConfig, r as drivers } from "../../main-BIVLvDaW.js";
1
+ import "../../chunk-iKc69rpz.js";
2
+ import "../../debug-CGQmxzGt.js";
3
+ import "../../config_provider-FIAUgvae.js";
4
+ import { n as defineConfig, r as drivers } from "../../main-BAQrymbz.js";
5
5
  export * from "@adonisjs/hash";
6
6
  export { defineConfig, drivers };
@@ -1,4 +1,4 @@
1
- import "../../chunk-B88MteZI.js";
2
- import { n as RequestValidator } from "../../main-BDp4yNr8.js";
1
+ import "../../chunk-iKc69rpz.js";
2
+ import { n as RequestValidator } from "../../main-DN2qEEg5.js";
3
3
  export * from "@adonisjs/http-server";
4
4
  export { RequestValidator };
@@ -1,4 +1,14 @@
1
- import "../chunk-B88MteZI.js";
2
- import { n as syncDestination } from "../logger-DV65GX9N.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
2
+ import { destination } from "@adonisjs/logger";
3
3
  export * from "@adonisjs/logger";
4
- export { syncDestination };
4
+ var logger_exports = /* @__PURE__ */ __exportAll({ syncDestination: () => syncDestination });
5
+ import * as import__adonisjs_logger from "@adonisjs/logger";
6
+ __reExport(logger_exports, import__adonisjs_logger);
7
+ async function syncDestination(options) {
8
+ const { default: pinoPretty, isColorSupported } = await import("pino-pretty");
9
+ return isColorSupported ? pinoPretty({
10
+ ...options,
11
+ sync: true
12
+ }) : destination(1);
13
+ }
14
+ export { syncDestination, logger_exports as t };
@@ -1,4 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../repl-CwFmzJvr.js";
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
3
2
  export * from "@adonisjs/repl";
4
- export {};
3
+ var repl_exports = /* @__PURE__ */ __exportAll({});
4
+ import * as import__adonisjs_repl from "@adonisjs/repl";
5
+ __reExport(repl_exports, import__adonisjs_repl);
6
+ export { repl_exports as t };
@@ -1,16 +1,16 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../debug-DURPi9xn.js";
3
- import { t as app_exports } from "../app-DNvbxVWl.js";
4
- import { t as configProvider } from "../config_provider-CY-xuo2R.js";
5
- import { t as config_exports } from "../config-BEEqDrcn.js";
6
- import { t as events_exports } from "../events-BWRc08nG.js";
7
- import { t as logger_exports } from "../logger-DV65GX9N.js";
8
- import { t as Dumper } from "../dumper-DxJ_VRuC.js";
9
- import { r as RuntimeException } from "../exceptions-DNMesP42.js";
10
- import { t as main_exports } from "../main-BDp4yNr8.js";
11
- import "../define_config-BlZ46bUg.js";
12
- import { n as Encryption } from "../main-C2r_lzz0.js";
13
- import { t as bodyparser_middleware_default } from "../bodyparser_middleware-BmARtnYe.js";
1
+ import "../chunk-iKc69rpz.js";
2
+ import "../debug-CGQmxzGt.js";
3
+ import { t as app_exports } from "../modules/app.js";
4
+ import { t as configProvider } from "../config_provider-FIAUgvae.js";
5
+ import { t as config_exports } from "../modules/config.js";
6
+ import { t as events_exports } from "../modules/events.js";
7
+ import { t as logger_exports } from "../modules/logger.js";
8
+ import { t as Dumper } from "../dumper-BBgqFX5a.js";
9
+ import { RuntimeException } from "../src/exceptions.js";
10
+ import { t as main_exports } from "../main-DN2qEEg5.js";
11
+ import "../define_config-C9vVaMH2.js";
12
+ import { Encryption } from "../modules/encryption/main.js";
13
+ import bodyparser_middleware_default from "../modules/bodyparser/bodyparser_middleware.js";
14
14
  import { dirname } from "node:path";
15
15
  import { mkdir, writeFile } from "node:fs/promises";
16
16
  var AppServiceProvider = class {
@@ -25,7 +25,7 @@ var AppServiceProvider = class {
25
25
  }
26
26
  registerAce() {
27
27
  this.app.container.singleton("ace", async () => {
28
- const { createAceKernel } = await import("../create_kernel-BCs646Vx.js");
28
+ const { createAceKernel } = await import("../create_kernel-kceIXCLj.js");
29
29
  return createAceKernel(this.app);
30
30
  });
31
31
  }
@@ -1,6 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import { t as main_exports } from "../main-BDp4yNr8.js";
3
- import { t as pluginEdgeDumper } from "../edge-D4loPeln.js";
1
+ import "../chunk-iKc69rpz.js";
2
+ import { t as main_exports } from "../main-DN2qEEg5.js";
3
+ import { pluginEdgeDumper } from "../modules/dumper/plugins/edge.js";
4
4
  import edge from "edge.js";
5
5
  var EdgeServiceProvider = class {
6
6
  constructor(app) {
@@ -1,7 +1,7 @@
1
- import "../chunk-B88MteZI.js";
2
- import "../debug-DURPi9xn.js";
3
- import { t as configProvider } from "../config_provider-CY-xuo2R.js";
4
- import { t as main_exports } from "../main-BIVLvDaW.js";
1
+ import "../chunk-iKc69rpz.js";
2
+ import "../debug-CGQmxzGt.js";
3
+ import { t as configProvider } from "../config_provider-FIAUgvae.js";
4
+ import { t as main_exports } from "../main-BAQrymbz.js";
5
5
  import { RuntimeException } from "@poppinss/utils/exception";
6
6
  var HashServiceProvider = class {
7
7
  constructor(app) {
@@ -1,5 +1,5 @@
1
- import "../chunk-B88MteZI.js";
2
- import { t as repl_exports } from "../repl-CwFmzJvr.js";
1
+ import "../chunk-iKc69rpz.js";
2
+ import { t as repl_exports } from "../modules/repl.js";
3
3
  import { join } from "node:path";
4
4
  import { homedir } from "node:os";
5
5
  import { fsImportAll } from "@poppinss/utils/fs";
@@ -1,6 +1,6 @@
1
- import "../chunk-B88MteZI.js";
2
- import { n as RequestValidator, t as main_exports } from "../main-BDp4yNr8.js";
3
- import { t as VineMultipartFile } from "../vine-D37x2ex7.js";
1
+ import "../chunk-iKc69rpz.js";
2
+ import { n as RequestValidator, t as main_exports } from "../main-DN2qEEg5.js";
3
+ import { VineMultipartFile } from "../src/vine.js";
4
4
  import { Vine } from "@vinejs/vine";
5
5
  var VineJSServiceProvider = class {
6
6
  constructor(app) {
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let ace;
3
3
  await app.booted(async () => {
4
4
  ace = await app.container.make("ace");
@@ -1,2 +1,5 @@
1
- import { n as setApp, t as app } from "../app-B6oge7b3.js";
1
+ let app;
2
+ function setApp(appService) {
3
+ app = appService;
4
+ }
2
5
  export { app as default, setApp };
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let config;
3
3
  await app.booted(() => {
4
4
  config = app.config;
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let dumper;
3
3
  await app.booted(async () => {
4
4
  dumper = await app.container.make("dumper");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let emitter;
3
3
  await app.booted(async () => {
4
4
  emitter = await app.container.make("emitter");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let encryption;
3
3
  await app.booted(async () => {
4
4
  encryption = await app.container.make("encryption");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let hash;
3
3
  await app.booted(async () => {
4
4
  hash = await app.container.make("hash");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let logger;
3
3
  await app.booted(async () => {
4
4
  logger = await app.container.make("logger");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let repl;
3
3
  await app.booted(async () => {
4
4
  repl = await app.container.make("repl");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let router;
3
3
  await app.booted(async () => {
4
4
  router = await app.container.make("router");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let server;
3
3
  await app.booted(async () => {
4
4
  server = await app.container.make("server");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let testUtils;
3
3
  await app.booted(async () => {
4
4
  testUtils = await app.container.make("testUtils");
@@ -1,4 +1,4 @@
1
- import { t as app } from "../app-B6oge7b3.js";
1
+ import app from "./app.js";
2
2
  let urlFor;
3
3
  let signedUrlFor;
4
4
  await app.booted(async () => {
@@ -13,5 +13,5 @@
13
13
  * debug('Application started')
14
14
  * debug('Processing request: %s', req.url)
15
15
  */
16
- declare const _default: import("node:util").DebugLogger;
16
+ declare const _default: import("util").DebugLogger;
17
17
  export default _default;
@@ -1,2 +1,2 @@
1
- import { i as createError, n as InvalidArgumentsException, r as RuntimeException, t as Exception } from "../exceptions-DNMesP42.js";
1
+ import { Exception, InvalidArgumentsException, RuntimeException, createError } from "@poppinss/utils/exception";
2
2
  export { Exception, InvalidArgumentsException, RuntimeException, createError };
@@ -1,4 +1,4 @@
1
- import { t as VerificationToken } from "../../verification_token-DrdoU4RH.js";
1
+ import { VerificationToken } from "./verification_token.js";
2
2
  import { fsImportAll, fsReadAll } from "@poppinss/utils/fs";
3
3
  import base64 from "@poppinss/utils/base64";
4
4
  import { MessageBuilder, Secret, compose, defineStaticProperty, safeEqual } from "@poppinss/utils";
@@ -1,2 +1,28 @@
1
- import { t as string_default } from "../../string-CJ7ewUFq.js";
2
- export { string_default as default };
1
+ import prettyHrTime from "pretty-hrtime";
2
+ import string from "@poppinss/utils/string";
3
+ import he from "he";
4
+ import StringBuilder from "@poppinss/utils/string_builder";
5
+ const stringHelpers = {
6
+ ...string,
7
+ toSentence: string.sentence,
8
+ ordinalize: string.ordinal,
9
+ generateRandom: string.random,
10
+ create(value) {
11
+ return new StringBuilder(value);
12
+ },
13
+ prettyHrTime(time, options) {
14
+ return prettyHrTime(time, options);
15
+ },
16
+ isEmpty(value) {
17
+ return value.trim().length === 0;
18
+ },
19
+ escapeHTML(value, options) {
20
+ value = he.escape(value);
21
+ if (options && options.encodeSymbols) value = this.encodeSymbols(value, { allowUnsafeSymbols: true });
22
+ return value;
23
+ },
24
+ encodeSymbols(value, options) {
25
+ return he.encode(value, options);
26
+ }
27
+ };
28
+ export { stringHelpers as default };
@@ -1,5 +1,5 @@
1
1
  import is from "@sindresorhus/is";
2
- var types_default = {
2
+ const types = {
3
3
  lookup: is,
4
4
  isNull: is.null,
5
5
  isBoolean: is.boolean,
@@ -24,4 +24,4 @@ var types_default = {
24
24
  return new RegExp(`^[-+]?([0-9]+)?(\\.[0-9]{${decimalPlaces}})$`).test(value);
25
25
  }
26
26
  };
27
- export { types_default as default };
27
+ export { types as default };
@@ -1,2 +1,46 @@
1
- import { t as VerificationToken } from "../../verification_token-DrdoU4RH.js";
1
+ import string from "@poppinss/utils/string";
2
+ import base64 from "@poppinss/utils/base64";
3
+ import { Secret, safeEqual } from "@poppinss/utils";
4
+ import { createHash } from "node:crypto";
5
+ var VerificationToken = class {
6
+ static decode(value) {
7
+ if (typeof value !== "string") return null;
8
+ if (!value) return null;
9
+ const [identifier, ...tokenValue] = value.split(".");
10
+ if (!identifier || tokenValue.length === 0) return null;
11
+ const decodedIdentifier = base64.urlDecode(identifier);
12
+ const decodedSecret = base64.urlDecode(tokenValue.join("."));
13
+ if (!decodedIdentifier || !decodedSecret) return null;
14
+ return {
15
+ identifier: decodedIdentifier,
16
+ secret: new Secret(decodedSecret)
17
+ };
18
+ }
19
+ static createTransientToken(userId, size, expiresIn) {
20
+ const expiresAt = /* @__PURE__ */ new Date();
21
+ expiresAt.setSeconds(expiresAt.getSeconds() + string.seconds.parse(expiresIn));
22
+ return {
23
+ userId,
24
+ expiresAt,
25
+ ...this.seed(size)
26
+ };
27
+ }
28
+ static seed(size) {
29
+ const secret = new Secret(string.random(size));
30
+ return {
31
+ secret,
32
+ hash: createHash("sha256").update(secret.release()).digest("hex")
33
+ };
34
+ }
35
+ computeValue(secret) {
36
+ this.value = new Secret(`${base64.urlEncode(String(this.identifier))}.${base64.urlEncode(secret.release())}`);
37
+ }
38
+ isExpired() {
39
+ return this.expiresAt < /* @__PURE__ */ new Date();
40
+ }
41
+ verify(secret) {
42
+ const newHash = createHash("sha256").update(secret.release()).digest("hex");
43
+ return safeEqual(this.hash, newHash);
44
+ }
45
+ };
2
46
  export { VerificationToken };
@@ -1,9 +1,7 @@
1
- import "../../chunk-B88MteZI.js";
2
- import "../../debug-DURPi9xn.js";
3
- import "../../config_provider-CY-xuo2R.js";
4
- import "../../exceptions-DNMesP42.js";
5
- import "../../main-BDp4yNr8.js";
6
- import "../../define_config-BlZ46bUg.js";
7
- import "../../main-C2r_lzz0.js";
8
- import { t as TestUtils } from "../../main-C4Amt3wT.js";
1
+ import "../../chunk-iKc69rpz.js";
2
+ import "../../debug-CGQmxzGt.js";
3
+ import "../../config_provider-FIAUgvae.js";
4
+ import "../../main-DN2qEEg5.js";
5
+ import "../../define_config-C9vVaMH2.js";
6
+ import { t as TestUtils } from "../../main-CGF65fuX.js";
9
7
  export { TestUtils };
package/build/src/vine.js CHANGED
@@ -1,2 +1,33 @@
1
- import { t as VineMultipartFile } from "../vine-D37x2ex7.js";
1
+ import vine, { BaseLiteralType, symbols } from "@vinejs/vine";
2
+ const MULTIPART_FILE = symbols.SUBTYPE ?? Symbol.for("subtype");
3
+ function isBodyParserFile(file) {
4
+ return !!(file && typeof file === "object" && "isMultipartFile" in file);
5
+ }
6
+ const isMultipartFile = vine.createRule((file, options, field) => {
7
+ if (!field.isDefined) return false;
8
+ if (!isBodyParserFile(file)) {
9
+ field.report("The {{ field }} must be a file", "file", field);
10
+ return false;
11
+ }
12
+ const validationOptions = typeof options === "function" ? options(field) : options;
13
+ if (file.sizeLimit === void 0 && validationOptions.size) file.sizeLimit = validationOptions.size;
14
+ if (file.allowedExtensions === void 0 && validationOptions.extnames) file.allowedExtensions = validationOptions.extnames;
15
+ file.validate();
16
+ file.errors.forEach((error) => {
17
+ field.report(error.message, `file.${error.type}`, field, validationOptions);
18
+ });
19
+ return file.isValid;
20
+ });
21
+ var VineMultipartFile = class VineMultipartFile extends BaseLiteralType {
22
+ #validationOptions;
23
+ [MULTIPART_FILE] = "multipartFile";
24
+ constructor(validationOptions, options, validations) {
25
+ super(options, validations || []);
26
+ this.#validationOptions = validationOptions;
27
+ this.dataTypeValidator = isMultipartFile(validationOptions || {});
28
+ }
29
+ clone() {
30
+ return new VineMultipartFile(this.#validationOptions, this.cloneOptions(), this.cloneValidations());
31
+ }
32
+ };
2
33
  export { VineMultipartFile };