@adonisjs/core 7.0.0-next.9 → 7.0.0

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 (210) hide show
  1. package/README.md +62 -1
  2. package/build/chunk-iKc69rpz.js +26 -0
  3. package/build/commands/add.d.ts +4 -3
  4. package/build/commands/add.js +73 -110
  5. package/build/commands/build.js +51 -107
  6. package/build/commands/commands.json +1 -1
  7. package/build/commands/configure.js +81 -177
  8. package/build/commands/eject.js +17 -60
  9. package/build/commands/env/add.js +55 -134
  10. package/build/commands/generate_key.js +22 -66
  11. package/build/commands/inspect_rcfile.js +27 -55
  12. package/build/commands/list/routes.js +246 -116
  13. package/build/commands/make/command.d.ts +5 -0
  14. package/build/commands/make/command.js +16 -57
  15. package/build/commands/make/controller.d.ts +5 -0
  16. package/build/commands/make/controller.js +44 -120
  17. package/build/commands/make/event.d.ts +5 -0
  18. package/build/commands/make/event.js +17 -62
  19. package/build/commands/make/exception.d.ts +5 -0
  20. package/build/commands/make/exception.js +17 -62
  21. package/build/commands/make/listener.d.ts +5 -0
  22. package/build/commands/make/listener.js +37 -93
  23. package/build/commands/make/middleware.d.ts +5 -0
  24. package/build/commands/make/middleware.js +42 -101
  25. package/build/commands/make/preload.d.ts +5 -0
  26. package/build/commands/make/preload.js +48 -113
  27. package/build/commands/make/provider.d.ts +5 -0
  28. package/build/commands/make/provider.js +48 -112
  29. package/build/commands/make/service.d.ts +5 -0
  30. package/build/commands/make/service.js +17 -55
  31. package/build/commands/make/test.d.ts +5 -0
  32. package/build/commands/make/test.js +48 -132
  33. package/build/commands/make/transformer.d.ts +5 -0
  34. package/build/commands/make/transformer.js +18 -64
  35. package/build/commands/make/validator.d.ts +5 -0
  36. package/build/commands/make/validator.js +21 -80
  37. package/build/commands/make/view.d.ts +5 -0
  38. package/build/commands/make/view.js +16 -56
  39. package/build/commands/repl.js +17 -50
  40. package/build/commands/serve.js +80 -150
  41. package/build/commands/test.js +92 -202
  42. package/build/config_provider-FIAUgvae.js +13 -0
  43. package/build/core-IpCOCkUL.js +146 -0
  44. package/build/create_kernel-B7ILNhuP.js +38 -0
  45. package/build/create_kernel-BD0Iqi8e.js +3 -0
  46. package/build/debug-CGQmxzGt.js +3 -0
  47. package/build/decorate-DmrZA614.js +7 -0
  48. package/build/define_config-0oHaj43l.js +86 -0
  49. package/build/dumper-BBgqFX5a.js +147 -0
  50. package/build/errors-CrCO-k44.js +8 -0
  51. package/build/factories/app.js +2 -9
  52. package/build/factories/bodyparser.js +2 -9
  53. package/build/factories/core/ace.js +22 -45
  54. package/build/factories/core/ignitor.js +74 -180
  55. package/build/factories/core/main.js +18 -11
  56. package/build/factories/core/test_utils.js +19 -42
  57. package/build/factories/encryption.d.ts +1 -1
  58. package/build/factories/encryption.js +2 -9
  59. package/build/factories/events.js +2 -9
  60. package/build/factories/hash.js +2 -9
  61. package/build/factories/http.js +2 -9
  62. package/build/factories/logger.js +2 -9
  63. package/build/factories/stubs.d.ts +1 -6
  64. package/build/factories/stubs.js +24 -91
  65. package/build/index.d.ts +1 -1
  66. package/build/index.js +10 -46
  67. package/build/main--nXd7T-C.js +73 -0
  68. package/build/main-Cxz0TyIw.js +173 -0
  69. package/build/main-DN2qEEg5.js +41 -0
  70. package/build/main-DkNgvceD.js +52 -0
  71. package/build/main-MBAMnmJb.js +81 -0
  72. package/build/main-kn40V-hF.js +2 -0
  73. package/build/{stubs/make → make}/health/controller.stub +5 -2
  74. package/build/modules/ace/codemods.d.ts +74 -22
  75. package/build/modules/ace/codemods.js +295 -476
  76. package/build/modules/ace/main.js +2 -41
  77. package/build/modules/app.js +6 -26
  78. package/build/modules/bodyparser/bodyparser_middleware.js +3 -14
  79. package/build/modules/bodyparser/main.js +6 -9
  80. package/build/modules/config.js +6 -26
  81. package/build/modules/container.js +6 -9
  82. package/build/modules/dumper/main.js +6 -32
  83. package/build/modules/dumper/plugins/edge.js +46 -61
  84. package/build/modules/encryption/define_config.d.ts +161 -0
  85. package/build/modules/encryption/drivers/aes_256_cbc.d.ts +20 -0
  86. package/build/modules/encryption/drivers/aes_256_cbc.js +2 -0
  87. package/build/modules/encryption/drivers/aes_256_gcm.d.ts +21 -0
  88. package/build/modules/encryption/drivers/aes_256_gcm.js +2 -0
  89. package/build/modules/encryption/drivers/aes_siv.d.ts +19 -0
  90. package/build/modules/encryption/drivers/aes_siv.js +2 -0
  91. package/build/modules/encryption/drivers/chacha20_poly1305.d.ts +21 -0
  92. package/build/modules/encryption/drivers/chacha20_poly1305.js +2 -0
  93. package/build/modules/encryption/drivers/legacy.d.ts +84 -0
  94. package/build/modules/encryption/drivers/legacy.js +57 -0
  95. package/build/modules/encryption/errors.d.ts +16 -0
  96. package/build/modules/encryption/main.d.ts +89 -0
  97. package/build/modules/encryption/main.js +6 -0
  98. package/build/modules/env/editor.js +2 -9
  99. package/build/modules/env/main.js +2 -28
  100. package/build/modules/events.js +6 -9
  101. package/build/modules/hash/drivers/argon.js +2 -9
  102. package/build/modules/hash/drivers/bcrypt.js +2 -20
  103. package/build/modules/hash/drivers/scrypt.js +2 -9
  104. package/build/modules/hash/main.js +6 -28
  105. package/build/modules/hash/phc_formatter.js +2 -9
  106. package/build/modules/health.js +2 -9
  107. package/build/modules/http/helpers.d.ts +1 -0
  108. package/build/modules/http/helpers.js +2 -0
  109. package/build/modules/http/main.js +4 -15
  110. package/build/modules/http/request_validator.d.ts +3 -4
  111. package/build/modules/http/url_builder_client.js +2 -9
  112. package/build/modules/logger.d.ts +30 -0
  113. package/build/modules/logger.js +14 -9
  114. package/build/modules/repl.js +6 -9
  115. package/build/modules/transformers/main.js +2 -9
  116. package/build/providers/app_provider.d.ts +5 -13
  117. package/build/providers/app_provider.js +153 -359
  118. package/build/providers/edge_provider.js +98 -164
  119. package/build/providers/hash_provider.js +29 -91
  120. package/build/providers/repl_provider.js +66 -152
  121. package/build/providers/vinejs_provider.d.ts +1 -1
  122. package/build/providers/vinejs_provider.js +21 -65
  123. package/build/services/ace.js +1 -16
  124. package/build/services/app.js +3 -19
  125. package/build/services/config.js +1 -12
  126. package/build/services/dumper.js +4 -20
  127. package/build/services/emitter.js +1 -13
  128. package/build/services/encryption.js +1 -13
  129. package/build/services/hash.js +1 -13
  130. package/build/services/logger.js +1 -13
  131. package/build/services/repl.js +1 -13
  132. package/build/services/router.js +1 -13
  133. package/build/services/server.js +1 -13
  134. package/build/services/test_utils.js +1 -16
  135. package/build/services/url_builder.d.ts +3 -3
  136. package/build/services/url_builder.js +4 -16
  137. package/build/src/assembler_hooks/index_entities.d.ts +34 -1
  138. package/build/src/debug.d.ts +1 -1
  139. package/build/src/exceptions.js +2 -49
  140. package/build/src/helpers/assert.js +2 -55
  141. package/build/src/helpers/http.js +2 -28
  142. package/build/src/helpers/is.js +3 -31
  143. package/build/src/helpers/main.js +5 -52
  144. package/build/src/helpers/string.js +26 -76
  145. package/build/src/helpers/types.js +25 -134
  146. package/build/src/helpers/verification_token.js +46 -120
  147. package/build/src/test_utils/main.js +8 -77
  148. package/build/src/types.d.ts +53 -99
  149. package/build/src/types.js +0 -8
  150. package/build/src/utils.d.ts +1 -1
  151. package/build/src/vine.js +29 -101
  152. package/build/toolkit/main.js +19 -21
  153. package/build/types/ace.js +2 -9
  154. package/build/types/app.js +2 -9
  155. package/build/types/bodyparser.js +2 -9
  156. package/build/types/common.js +2 -9
  157. package/build/types/container.js +2 -9
  158. package/build/types/encryption.d.ts +53 -1
  159. package/build/types/encryption.js +1 -9
  160. package/build/types/events.js +2 -9
  161. package/build/types/hash.js +2 -9
  162. package/build/types/health.js +2 -9
  163. package/build/types/helpers.js +0 -8
  164. package/build/types/http.js +2 -9
  165. package/build/types/logger.js +2 -9
  166. package/build/types/repl.js +2 -9
  167. package/build/types/transformers.js +2 -9
  168. package/build/utils-rRkbAPnP.js +42 -0
  169. package/package.json +117 -62
  170. package/build/modules/ace/commands.js +0 -157
  171. package/build/modules/ace/create_kernel.js +0 -91
  172. package/build/modules/ace/kernel.js +0 -40
  173. package/build/modules/dumper/define_config.js +0 -36
  174. package/build/modules/dumper/dumper.js +0 -266
  175. package/build/modules/dumper/errors.js +0 -119
  176. package/build/modules/encryption.d.ts +0 -18
  177. package/build/modules/encryption.js +0 -26
  178. package/build/modules/hash/define_config.js +0 -125
  179. package/build/modules/http/request_validator.js +0 -100
  180. package/build/src/assembler_hooks/index_entities.js +0 -112
  181. package/build/src/cli_formatters/routes_list.js +0 -397
  182. package/build/src/config_provider.js +0 -71
  183. package/build/src/debug.js +0 -25
  184. package/build/src/ignitor/ace.js +0 -102
  185. package/build/src/ignitor/http.js +0 -159
  186. package/build/src/ignitor/main.js +0 -124
  187. package/build/src/ignitor/test.js +0 -66
  188. package/build/src/test_utils/http.js +0 -82
  189. package/build/src/utils.js +0 -114
  190. package/build/stubs/main.js +0 -9
  191. package/build/toolkit/commands/index_commands.js +0 -30
  192. /package/build/{stubs/make → make}/command/main.stub +0 -0
  193. /package/build/{stubs/make → make}/controller/actions.stub +0 -0
  194. /package/build/{stubs/make → make}/controller/api.stub +0 -0
  195. /package/build/{stubs/make → make}/controller/main.stub +0 -0
  196. /package/build/{stubs/make → make}/controller/resource.stub +0 -0
  197. /package/build/{stubs/make → make}/event/main.stub +0 -0
  198. /package/build/{stubs/make → make}/exception/main.stub +0 -0
  199. /package/build/{stubs/make → make}/health/main.stub +0 -0
  200. /package/build/{stubs/make → make}/listener/for_event.stub +0 -0
  201. /package/build/{stubs/make → make}/listener/main.stub +0 -0
  202. /package/build/{stubs/make → make}/middleware/main.stub +0 -0
  203. /package/build/{stubs/make → make}/preload/main.stub +0 -0
  204. /package/build/{stubs/make → make}/provider/main.stub +0 -0
  205. /package/build/{stubs/make → make}/service/main.stub +0 -0
  206. /package/build/{stubs/make → make}/test/main.stub +0 -0
  207. /package/build/{stubs/make → make}/transformer/main.stub +0 -0
  208. /package/build/{stubs/make → make}/validator/main.stub +0 -0
  209. /package/build/{stubs/make → make}/validator/resource.stub +0 -0
  210. /package/build/{stubs/make → make}/view/main.stub +0 -0
@@ -0,0 +1,57 @@
1
+ import { t as E_BLIND_INDEX_NOT_SUPPORTED } from "../../../errors-CrCO-k44.js";
2
+ import { BaseDriver, Hmac, base64UrlDecode, base64UrlEncode, errors } from "@boringnode/encryption";
3
+ import { MessageBuilder } from "@poppinss/utils";
4
+ import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
5
+ function legacy(config) {
6
+ return {
7
+ driver: (key) => new Legacy({ key }),
8
+ keys: config.keys
9
+ };
10
+ }
11
+ var Legacy = class extends BaseDriver {
12
+ constructor(config) {
13
+ super(config);
14
+ if (this.cryptoKey.length < 16) throw new errors.E_INSECURE_ENCRYPTER_KEY();
15
+ }
16
+ encrypt(payload, expiresInOrOptions, purpose) {
17
+ let expiresIn;
18
+ let actualPurpose;
19
+ if (typeof expiresInOrOptions === "object" && expiresInOrOptions !== null) {
20
+ expiresIn = expiresInOrOptions.expiresIn;
21
+ actualPurpose = expiresInOrOptions.purpose;
22
+ } else {
23
+ expiresIn = expiresInOrOptions;
24
+ actualPurpose = purpose;
25
+ }
26
+ const iv = randomBytes(16);
27
+ const cipher = createCipheriv("aes-256-cbc", this.cryptoKey.subarray(0, 32), iv);
28
+ const plainText = new MessageBuilder().build(payload, expiresIn, actualPurpose);
29
+ const macPayload = `${base64UrlEncode(Buffer.concat([cipher.update(plainText), cipher.final()]))}${this.separator}${base64UrlEncode(iv)}`;
30
+ const hmac = new Hmac(this.cryptoKey).generate(macPayload);
31
+ return this.computeReturns([macPayload, hmac]);
32
+ }
33
+ decrypt(value, purpose) {
34
+ if (typeof value !== "string") return null;
35
+ const [cipherEncoded, ivEncoded, macEncoded] = value.split(this.separator);
36
+ if (!cipherEncoded || !ivEncoded || !macEncoded) return null;
37
+ const cipherText = base64UrlDecode(cipherEncoded);
38
+ if (!cipherText) return null;
39
+ const iv = base64UrlDecode(ivEncoded);
40
+ if (!iv) return null;
41
+ if (!new Hmac(this.cryptoKey).compare(`${cipherEncoded}${this.separator}${ivEncoded}`, macEncoded)) return null;
42
+ try {
43
+ const decipher = createDecipheriv("aes-256-cbc", this.cryptoKey.subarray(0, 32), iv);
44
+ const plainTextBuffer = Buffer.concat([decipher.update(cipherText), decipher.final()]);
45
+ return new MessageBuilder().verify(plainTextBuffer, purpose);
46
+ } catch {
47
+ return null;
48
+ }
49
+ }
50
+ blindIndex(_payload, _purpose) {
51
+ throw new E_BLIND_INDEX_NOT_SUPPORTED(["legacy"]);
52
+ }
53
+ blindIndexes(_payload, _purpose) {
54
+ throw new E_BLIND_INDEX_NOT_SUPPORTED(["legacy"]);
55
+ }
56
+ };
57
+ export { Legacy, legacy };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Raised when attempting to compute blind indexes using the legacy driver.
3
+ */
4
+ export declare const E_BLIND_INDEX_NOT_SUPPORTED: new (args: [string], options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
5
+ /**
6
+ * Encryption errors exposed by this package.
7
+ */
8
+ export declare const errors: {
9
+ E_BLIND_INDEX_NOT_SUPPORTED: new (args: [string], options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
10
+ E_BLIND_INDEX_PURPOSE_REQUIRED: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
11
+ E_DETERMINISTIC_DRIVER_EXPIRES_IN_NOT_SUPPORTED: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
12
+ E_INSECURE_ENCRYPTER_KEY: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
13
+ E_INVALID_ENCRYPTER_ID: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
14
+ E_MISSING_ENCRYPTER_ID: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
15
+ E_MISSING_ENCRYPTER_KEY: new (args?: any, options?: ErrorOptions) => import("../../src/exceptions.ts").Exception;
16
+ };
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Main encryption class for encrypting and decrypting values.
3
+ *
4
+ * Provides methods to encrypt strings and objects with optional purpose
5
+ * binding, decrypt values, and manage encryption keys.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const encryption = new Encryption({ key: 'secret-key' })
10
+ * const encrypted = encryption.encrypt('sensitive data')
11
+ * const decrypted = encryption.decrypt(encrypted)
12
+ * ```
13
+ */
14
+ export { Encryption } from '@boringnode/encryption';
15
+ /**
16
+ * Manager class for handling multiple encryption instances.
17
+ *
18
+ * Allows you to configure and manage multiple encryption drivers,
19
+ * switch between them, and use different encryption keys for
20
+ * different purposes.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const manager = new EncryptionManager({
25
+ * default: 'app',
26
+ * list: {
27
+ * app: {
28
+ * driver: (key) => new AES256GCM({ key }),
29
+ * keys: ['app-key']
30
+ * }
31
+ * }
32
+ * })
33
+ * const encryptor = manager.use('app')
34
+ * ```
35
+ */
36
+ export { EncryptionManager } from '@boringnode/encryption';
37
+ /**
38
+ * HMAC (Hash-based Message Authentication Code) class for creating
39
+ * and verifying message authentication codes.
40
+ *
41
+ * Provides methods to generate cryptographic hashes with a secret key
42
+ * and verify them to ensure data integrity and authenticity.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const hmac = new Hmac('secret-key')
47
+ * const signature = hmac.generate('message')
48
+ * const isValid = hmac.verify('message', signature)
49
+ * ```
50
+ */
51
+ export { Hmac } from '@boringnode/encryption';
52
+ /**
53
+ * Base class for implementing custom encryption drivers.
54
+ *
55
+ * Extend this class to create custom encryption implementations
56
+ * that can be used with the EncryptionManager.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * class CustomDriver extends BaseDriver {
61
+ * encrypt(value: string) {
62
+ * // Custom encryption logic
63
+ * }
64
+ * decrypt(payload: string) {
65
+ * // Custom decryption logic
66
+ * }
67
+ * }
68
+ * ```
69
+ */
70
+ export { BaseDriver } from '@boringnode/encryption';
71
+ /**
72
+ * Encryption module specific exceptions.
73
+ */
74
+ export { errors } from './errors.ts';
75
+ /**
76
+ * Defines the encryption configuration for the application.
77
+ *
78
+ * @see {defineConfig} in define_config.ts for detailed documentation
79
+ */
80
+ export { defineConfig } from './define_config.ts';
81
+ /**
82
+ * Collection of built-in encryption driver factory functions.
83
+ *
84
+ * Includes factories for ChaCha20-Poly1305, AES-256-CBC,
85
+ * AES-256-GCM, and AES-SIV encryption algorithms.
86
+ *
87
+ * @see {drivers} in define_config.ts for detailed documentation
88
+ */
89
+ export { drivers } from './define_config.ts';
@@ -0,0 +1,6 @@
1
+ import "../../debug-CGQmxzGt.js";
2
+ import "../../config_provider-FIAUgvae.js";
3
+ import { n as errors } from "../../errors-CrCO-k44.js";
4
+ import { n as drivers, t as defineConfig } from "../../define_config-0oHaj43l.js";
5
+ import { BaseDriver, Encryption, EncryptionManager, Hmac } from "@boringnode/encryption";
6
+ export { BaseDriver, Encryption, EncryptionManager, Hmac, defineConfig, drivers, errors };
@@ -1,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/env/editor';
1
+ export * from "@adonisjs/env/editor";
2
+ export {};
@@ -1,28 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- /**
10
- * Environment module re-exports all functionality from @adonisjs/env.
11
- * This includes the Env class, validation schemas, and utilities for managing
12
- * environment variables with type safety and validation.
13
- *
14
- * @example
15
- * // Import the Env class and validation
16
- * import { Env } from '@adonisjs/core/env'
17
- *
18
- * const env = await Env.create(new URL('../', import.meta.url), {
19
- * NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
20
- * PORT: Env.schema.number(),
21
- * HOST: Env.schema.string({ format: 'host' })
22
- * })
23
- *
24
- * @example
25
- * // Import environment types and utilities
26
- * import type { EnvParser, EnvEditor } from '@adonisjs/core/env'
27
- */
28
- export * from '@adonisjs/env';
1
+ export * from "@adonisjs/env";
2
+ export {};
@@ -1,9 +1,6 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/events';
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
2
+ export * from "@adonisjs/events";
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,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/hash/drivers/argon';
1
+ export * from "@adonisjs/hash/drivers/argon";
2
+ export {};
@@ -1,20 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- /**
10
- * Bcrypt hash driver re-exports from @adonisjs/hash.
11
- * Provides bcrypt password hashing functionality with configurable rounds.
12
- *
13
- * @example
14
- * import { Bcrypt } from '@adonisjs/core/hash/drivers/bcrypt'
15
- *
16
- * const bcrypt = new Bcrypt({ rounds: 12 })
17
- * const hashed = await bcrypt.make('password')
18
- * const isValid = await bcrypt.verify(hashed, 'password')
19
- */
20
- export * from '@adonisjs/hash/drivers/bcrypt';
1
+ export * from "@adonisjs/hash/drivers/bcrypt";
2
+ export {};
@@ -1,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/hash/drivers/scrypt';
1
+ export * from "@adonisjs/hash/drivers/scrypt";
2
+ export {};
@@ -1,28 +1,6 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- /**
10
- * Hash module provides password hashing functionality with multiple driver support.
11
- * Re-exports all functionality from @adonisjs/hash along with configuration utilities.
12
- *
13
- * @example
14
- * // Import the Hash manager and drivers
15
- * import { HashManager, Hash } from '@adonisjs/core/hash'
16
- *
17
- * const manager = new HashManager(config)
18
- * const hasher = manager.use('scrypt')
19
- * const hashed = await hasher.make('password')
20
- * const verified = await hasher.verify(hashed, 'password')
21
- *
22
- * @example
23
- * // Import configuration and driver types
24
- * import { defineConfig, drivers } from '@adonisjs/core/hash'
25
- * import type { HashConfig, ScryptConfig } from '@adonisjs/core/types/hash'
26
- */
27
- export * from '@adonisjs/hash';
28
- export { defineConfig, drivers } from "./define_config.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-DkNgvceD.js";
5
+ export * from "@adonisjs/hash";
6
+ export { defineConfig, drivers };
@@ -1,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/hash/phc_formatter';
1
+ export * from "@adonisjs/hash/phc_formatter";
2
+ export {};
@@ -1,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/health';
1
+ export * from "@adonisjs/health";
2
+ export {};
@@ -0,0 +1 @@
1
+ export * from '@adonisjs/http-server/helpers';
@@ -0,0 +1,2 @@
1
+ export * from "@adonisjs/http-server/helpers";
2
+ export {};
@@ -1,15 +1,4 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- /**
10
- * Bodyparser import is needed to merge types of Request
11
- * class augmented by the bodyparser package
12
- */
13
- import '@adonisjs/bodyparser';
14
- export * from '@adonisjs/http-server';
15
- export { RequestValidator } from "./request_validator.js";
1
+ import "../../chunk-iKc69rpz.js";
2
+ import { n as RequestValidator } from "../../main-DN2qEEg5.js";
3
+ export * from "@adonisjs/http-server";
4
+ export { RequestValidator };
@@ -1,8 +1,6 @@
1
- import type { VineValidator } from '@vinejs/vine';
1
+ import type { ValidationError, VineValidator } from '@vinejs/vine';
2
2
  import type { Infer, SchemaTypes, ErrorReporterContract, MessagesProviderContact } from '@vinejs/vine/types';
3
3
  import type { HttpContext } from './main.ts';
4
- import type { FeatureFlags } from '../app.ts';
5
- import type { ExperimentalFlagsList } from '../../types/app.ts';
6
4
  import type { RequestValidationOptions } from '../../types/http.ts';
7
5
  /**
8
6
  * Request validator for validating HTTP request data using VineJS validators.
@@ -19,7 +17,7 @@ import type { RequestValidationOptions } from '../../types/http.ts';
19
17
  */
20
18
  export declare class RequestValidator {
21
19
  #private;
22
- constructor(ctx: HttpContext, experimentalFlags?: FeatureFlags<ExperimentalFlagsList>);
20
+ constructor(ctx: HttpContext);
23
21
  /**
24
22
  * The error reporter method returns the error reporter
25
23
  * to use for reporting errors.
@@ -60,4 +58,5 @@ export declare class RequestValidator {
60
58
  * ```
61
59
  */
62
60
  validateUsing<Schema extends SchemaTypes, MetaData extends undefined | Record<string, any>>(validator: VineValidator<Schema, MetaData>, ...[options]: [undefined] extends MetaData ? [options?: RequestValidationOptions<MetaData> | undefined] : [options: RequestValidationOptions<MetaData>]): Promise<Infer<Schema>>;
61
+ tryValidateUsing<Schema extends SchemaTypes, MetaData extends undefined | Record<string, any>>(validator: VineValidator<Schema, MetaData>, ...[options]: [undefined] extends MetaData ? [options?: RequestValidationOptions<MetaData> | undefined] : [options: RequestValidationOptions<MetaData>]): Promise<[ValidationError, null] | [null, Infer<Schema>]>;
63
62
  }
@@ -1,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/http-server/client/url_builder';
1
+ export * from "@adonisjs/http-server/client/url_builder";
2
+ export {};
@@ -1 +1,31 @@
1
+ import { type LoggerConfig, type PrettyTargetOptions } from '@adonisjs/logger/types';
1
2
  export * from '@adonisjs/logger';
3
+ /**
4
+ * Creates a synchronous Pino Pretty stream for formatted log output.
5
+ *
6
+ * This function is specifically designed for testing and development environments
7
+ * where synchronous log output is preferred. By default, Pino uses asynchronous
8
+ * logging which can make it difficult to correlate logs with specific actions
9
+ * during debugging or testing.
10
+ *
11
+ * @param options - Configuration options for the pretty printer
12
+ *
13
+ * @example
14
+ * const loggerConfig = defineConfig({
15
+ * default: 'app',
16
+ * loggers: {
17
+ * app: {
18
+ * enabled: true,
19
+ * name: env.get('APP_NAME'),
20
+ * level: env.get('LOG_LEVEL'),
21
+ * desination: !app.inProduction && (await syncDestination()),
22
+ * transport: {
23
+ * targets: [targets.file({ destination: 1 })],
24
+ * },
25
+ * },
26
+ * }
27
+ * })
28
+ *
29
+ * @returns A promise that resolves to a PrettyStream instance
30
+ */
31
+ export declare function syncDestination(options?: PrettyTargetOptions): Promise<LoggerConfig['desination']>;
@@ -1,9 +1,14 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/logger';
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
2
+ import { destination } from "@adonisjs/logger";
3
+ export * from "@adonisjs/logger";
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,9 +1,6 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/repl';
1
+ import { n as __reExport, t as __exportAll } from "../chunk-iKc69rpz.js";
2
+ export * from "@adonisjs/repl";
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,9 +1,2 @@
1
- /*
2
- * @adonisjs/core
3
- *
4
- * (c) AdonisJS
5
- *
6
- * For the full copyright and license information, please view the LICENSE
7
- * file that was distributed with this source code.
8
- */
9
- export * from '@adonisjs/http-transformers';
1
+ export * from "@adonisjs/http-transformers";
2
+ export {};
@@ -1,14 +1,5 @@
1
1
  import { Router } from '../modules/http/main.ts';
2
- import { type SerializeFn } from '../types/transformers.ts';
3
2
  import type { ApplicationService } from '../src/types.ts';
4
- /**
5
- * Extend HTTP request class with the transform method
6
- */
7
- declare module '@adonisjs/core/http' {
8
- interface HttpContext {
9
- serialize: SerializeFn;
10
- }
11
- }
12
3
  /**
13
4
  * The Application Service provider registers all the baseline
14
5
  * features required to run the framework.
@@ -116,14 +107,15 @@ export default class AppServiceProvider {
116
107
  */
117
108
  protected registerEmitter(): void;
118
109
  /**
119
- * Register the encryption service to the container
110
+ * Registers the encryption service with the container
120
111
  *
121
- * Creates a singleton binding for the encryption service using
122
- * the app key from configuration for encryption/decryption operations.
112
+ * Creates singleton bindings for both the encryption manager and
113
+ * the default encryption instance. Resolves configuration from
114
+ * config/encryption.ts file.
123
115
  *
124
116
  * @example
125
117
  * const encryption = await container.make('encryption')
126
- * const encrypted = encryption.encrypt('sensitive data')
118
+ * const encrypted = encryption.encrypt('secret-data')
127
119
  */
128
120
  protected registerEncryption(): void;
129
121
  /**