@adonisjs/core 7.0.0-next.14 → 7.0.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{ace-DDzvaSs_.js → ace-D5GjAyyT.js} +3 -3
- package/build/app-DMrz0ZLL.js +5 -0
- package/build/{chunk-MjwdjG2f.js → chunk-D0OgPoSf.js} +1 -7
- package/build/commands/add.d.ts +4 -3
- package/build/commands/add.js +52 -16
- package/build/commands/build.js +3 -3
- package/build/commands/commands.json +1 -1
- package/build/commands/configure.js +2 -2
- package/build/commands/eject.js +3 -3
- package/build/commands/env/add.js +3 -3
- package/build/commands/generate_key.js +2 -2
- package/build/commands/inspect_rcfile.js +1 -1
- package/build/commands/list/routes.js +2 -2
- package/build/commands/make/command.js +2 -2
- package/build/commands/make/controller.js +2 -2
- package/build/commands/make/event.js +2 -2
- package/build/commands/make/exception.js +2 -2
- package/build/commands/make/listener.js +2 -2
- package/build/commands/make/middleware.js +3 -3
- package/build/commands/make/preload.js +3 -3
- package/build/commands/make/provider.js +3 -3
- package/build/commands/make/service.js +2 -2
- package/build/commands/make/test.js +2 -2
- package/build/commands/make/transformer.js +2 -2
- package/build/commands/make/validator.js +2 -2
- package/build/commands/make/view.js +2 -2
- package/build/commands/repl.js +1 -1
- package/build/commands/serve.js +3 -3
- package/build/commands/test.js +3 -3
- package/build/config-BCTXw_bK.js +5 -0
- package/build/{config_provider-CY-xuo2R.js → config_provider-DWVFHOQX.js} +3 -1
- package/build/container-Cgqjy9Cf.js +5 -0
- package/build/{core-CffBtWJW.js → core-C10-w2En.js} +39 -13
- package/build/create_kernel-Cn8zVtvt.js +3 -0
- package/build/{create_kernel-B7zWS8Zz.js → create_kernel-Cpqqa931.js} +1 -1
- package/build/define_config-BvoRgVYO.js +62 -0
- package/build/{dumper-C_sMcyFb.js → dumper-DX0_GFDa.js} +1 -1
- package/build/events-COq2WUF0.js +5 -0
- package/build/exceptions-DNMesP42.js +2 -0
- package/build/factories/core/ace.js +14 -13
- package/build/factories/core/ignitor.js +11 -10
- package/build/factories/core/main.js +21 -19
- package/build/factories/core/test_utils.js +18 -16
- package/build/factories/encryption.d.ts +1 -1
- package/build/factories/encryption.js +1 -1
- package/build/factories/stubs.js +8 -9
- package/build/{ignitor-Dil-rtCo.js → ignitor-pig7YqKm.js} +16 -8
- package/build/index.d.ts +1 -1
- package/build/index.js +8 -9
- package/build/{logger-Dha-0hp1.js → logger-pAx4u8AE.js} +3 -3
- package/build/main-Bfnr5tAw.js +2 -0
- package/build/main-CrS2YPbo.js +5 -0
- package/build/{main-2-nm3TiB.js → main-DURmA2iP.js} +4 -3
- package/build/{main-BrJQ1VAM.js → main-Ds47YsLG.js} +4 -5
- package/build/{main-BTUXw6He.js → main-GsybXyWG.js} +3 -3
- package/build/{main-CFmDHDls.js → main-SJINoEC5.js} +5 -10
- package/build/main-cAeS97DQ.js +5 -0
- package/build/modules/ace/codemods.js +1 -1
- package/build/modules/ace/main.js +1 -1
- package/build/modules/app.js +2 -2
- package/build/modules/bodyparser/bodyparser_middleware.js +1 -1
- package/build/modules/bodyparser/main.js +2 -2
- package/build/modules/config.js +2 -2
- package/build/modules/container.js +2 -2
- package/build/modules/dumper/main.js +2 -2
- package/build/modules/dumper/plugins/edge.js +1 -1
- package/build/modules/encryption/define_config.d.ts +127 -0
- package/build/modules/encryption/drivers/aes_256_cbc.d.ts +20 -0
- package/build/modules/encryption/drivers/aes_256_cbc.js +2 -0
- package/build/modules/encryption/drivers/aes_256_gcm.d.ts +21 -0
- package/build/modules/encryption/drivers/aes_256_gcm.js +2 -0
- package/build/modules/encryption/drivers/chacha20_poly1305.d.ts +21 -0
- package/build/modules/encryption/drivers/chacha20_poly1305.js +2 -0
- package/build/modules/encryption/main.d.ts +85 -0
- package/build/modules/encryption/main.js +5 -0
- package/build/modules/events.js +2 -2
- package/build/modules/hash/main.js +3 -4
- package/build/modules/http/main.js +2 -2
- package/build/modules/http/request_validator.d.ts +1 -3
- package/build/modules/logger.js +2 -2
- package/build/modules/repl.js +2 -2
- package/build/modules/transformers/main.js +2 -2
- package/build/providers/app_provider.d.ts +5 -4
- package/build/providers/app_provider.js +24 -16
- package/build/providers/edge_provider.js +3 -3
- package/build/providers/hash_provider.js +3 -4
- package/build/providers/repl_provider.js +7 -2
- package/build/providers/vinejs_provider.js +4 -5
- package/build/repl-CzHJfqZU.js +5 -0
- package/build/services/url_builder.d.ts +3 -3
- package/build/src/assembler_hooks/index_entities.d.ts +29 -1
- package/build/src/debug.d.ts +1 -1
- package/build/src/exceptions.js +1 -1
- package/build/src/helpers/main.js +1 -1
- package/build/src/helpers/string.js +1 -1
- package/build/src/helpers/verification_token.js +1 -1
- package/build/src/test_utils/main.js +7 -4
- package/build/src/types.d.ts +44 -99
- package/build/src/vine.js +1 -1
- package/build/{test_utils-c_TEaEHW.js → test_utils-74h6e0yB.js} +3 -3
- package/build/toolkit/main.js +1 -1
- package/build/types/encryption.d.ts +65 -1
- package/build/types/encryption.js +0 -1
- package/build/{utils-Dpa3iJz-.js → utils-CtGytdtt.js} +1 -0
- package/package.json +44 -42
- package/build/app-BK0PN3li.js +0 -5
- package/build/config-B2S2xfmN.js +0 -5
- package/build/container-ClFvcykQ.js +0 -5
- package/build/create_kernel-CsTq0pWc.js +0 -3
- package/build/debug-DURPi9xn.js +0 -3
- package/build/encryption-D2HGu0bU.js +0 -5
- package/build/events-B8hK42QT.js +0 -5
- package/build/main-D5xz2ZN1.js +0 -5
- package/build/main-q9TMzWUj.js +0 -5
- package/build/modules/encryption.d.ts +0 -18
- package/build/modules/encryption.js +0 -4
- package/build/repl-CumYg2V_.js +0 -5
- /package/build/{bodyparser_middleware-DTW0epKM.js → bodyparser_middleware-BmARtnYe.js} +0 -0
- /package/build/{decorate-DM0Sx1ye.js → decorate-CJcHOoD-.js} +0 -0
- /package/build/{edge-LQdCc1L3.js → edge-BVYR-Vjr.js} +0 -0
- /package/build/{main-BWftwyAK.js → main-BlJhxJJ2.js} +0 -0
- /package/build/{string-CJ7ewUFq.js → string-Cx6q_win.js} +0 -0
- /package/build/{verification_token-DXsW81rl.js → verification_token-DrdoU4RH.js} +0 -0
- /package/build/{vine-Bt4ymkM0.js → vine-DGint2rk.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import { n as errors_exports, t as Dumper } from "../../dumper-
|
|
1
|
+
import "../../chunk-D0OgPoSf.js";
|
|
2
|
+
import { n as errors_exports, t as Dumper } from "../../dumper-DX0_GFDa.js";
|
|
3
3
|
function defineConfig(dumperConfig) {
|
|
4
4
|
return dumperConfig;
|
|
5
5
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as pluginEdgeDumper } from "../../../edge-
|
|
1
|
+
import { t as pluginEdgeDumper } from "../../../edge-BVYR-Vjr.js";
|
|
2
2
|
export { pluginEdgeDumper };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { type ConfigProvider } from '../../src/types.ts';
|
|
2
|
+
import { type EncryptionConfig, type AES256CBCDriverConfig, type AES256GCMDriverConfig, type ChaCha20Poly1305DriverConfig } from '../../types/encryption.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Resolved configuration from the config provider that will be
|
|
5
|
+
* accepted by the encryption manager.
|
|
6
|
+
*
|
|
7
|
+
* This type unwraps ConfigProvider types to their resolved values,
|
|
8
|
+
* ensuring all encryptors in the list are concrete EncryptionConfig
|
|
9
|
+
* objects rather than providers.
|
|
10
|
+
*
|
|
11
|
+
* @template KnownEncryptors - Record of encryptor names to their configurations
|
|
12
|
+
*/
|
|
13
|
+
type ResolvedConfig<KnownEncryptors extends Record<string, EncryptionConfig | ConfigProvider<EncryptionConfig>>> = {
|
|
14
|
+
/**
|
|
15
|
+
* The default encryptor name to use when no specific
|
|
16
|
+
* encryptor is requested
|
|
17
|
+
*/
|
|
18
|
+
default?: keyof KnownEncryptors;
|
|
19
|
+
/**
|
|
20
|
+
* Map of encryptor names to their resolved configurations.
|
|
21
|
+
* ConfigProvider types are unwrapped to their underlying
|
|
22
|
+
* EncryptionConfig values.
|
|
23
|
+
*/
|
|
24
|
+
list: {
|
|
25
|
+
[K in keyof KnownEncryptors]: KnownEncryptors[K] extends ConfigProvider<infer A> ? A : KnownEncryptors[K];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Defines the encryption configuration for the application.
|
|
30
|
+
*
|
|
31
|
+
* This function creates a configuration provider that lazily resolves
|
|
32
|
+
* encryption drivers. It validates that the default encryptor (if specified)
|
|
33
|
+
* exists in the list and resolves any ConfigProvider instances to their
|
|
34
|
+
* concrete values.
|
|
35
|
+
*
|
|
36
|
+
* @template KnownEncryptors - Record of encryptor names to their configurations
|
|
37
|
+
*
|
|
38
|
+
* @param config - The encryption configuration object
|
|
39
|
+
* @param config.default - Optional default encryptor name
|
|
40
|
+
* @param config.list - Map of encryptor names to their configurations or providers
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const encryptionConfig = defineConfig({
|
|
45
|
+
* default: 'app',
|
|
46
|
+
* list: {
|
|
47
|
+
* app: drivers.aes256gcm({
|
|
48
|
+
* id: 'app',
|
|
49
|
+
* keys: [env.get('APP_KEY')]
|
|
50
|
+
* }),
|
|
51
|
+
* backup: drivers.chacha20({
|
|
52
|
+
* id: 'backup',
|
|
53
|
+
* keys: [env.get('BACKUP_KEY')]
|
|
54
|
+
* })
|
|
55
|
+
* }
|
|
56
|
+
* })
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function defineConfig<KnownEncryptors extends Record<string, EncryptionConfig | ConfigProvider<EncryptionConfig>>>(config: {
|
|
60
|
+
default?: keyof KnownEncryptors;
|
|
61
|
+
list: KnownEncryptors;
|
|
62
|
+
}): ConfigProvider<ResolvedConfig<KnownEncryptors>>;
|
|
63
|
+
/**
|
|
64
|
+
* Collection of encryption driver factory functions.
|
|
65
|
+
*
|
|
66
|
+
* Each driver factory creates a ConfigProvider that lazily imports
|
|
67
|
+
* and configures the corresponding encryption driver. This allows
|
|
68
|
+
* for efficient code splitting and on-demand loading of encryption
|
|
69
|
+
* algorithms.
|
|
70
|
+
*/
|
|
71
|
+
export declare const drivers: {
|
|
72
|
+
/**
|
|
73
|
+
* Creates a ChaCha20-Poly1305 encryption driver configuration.
|
|
74
|
+
*
|
|
75
|
+
* ChaCha20-Poly1305 is a modern authenticated encryption algorithm
|
|
76
|
+
* that provides excellent performance on systems without AES hardware
|
|
77
|
+
* acceleration.
|
|
78
|
+
*
|
|
79
|
+
* @param config - The ChaCha20-Poly1305 driver configuration
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* drivers.chacha20({
|
|
84
|
+
* id: 'app',
|
|
85
|
+
* keys: [env.get('APP_KEY')]
|
|
86
|
+
* })
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
chacha20: (config: ChaCha20Poly1305DriverConfig) => ConfigProvider<EncryptionConfig>;
|
|
90
|
+
/**
|
|
91
|
+
* Creates an AES-256-CBC encryption driver configuration.
|
|
92
|
+
*
|
|
93
|
+
* AES-256-CBC is a widely-supported block cipher mode. However,
|
|
94
|
+
* consider using AES-256-GCM for new applications as it provides
|
|
95
|
+
* authenticated encryption.
|
|
96
|
+
*
|
|
97
|
+
* @param config - The AES-256-CBC driver configuration
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* drivers.aes256cbc({
|
|
102
|
+
* id: 'legacy',
|
|
103
|
+
* keys: [env.get('LEGACY_KEY')]
|
|
104
|
+
* })
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
aes256cbc: (config: AES256CBCDriverConfig) => ConfigProvider<EncryptionConfig>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates an AES-256-GCM encryption driver configuration.
|
|
110
|
+
*
|
|
111
|
+
* AES-256-GCM is an authenticated encryption algorithm that provides
|
|
112
|
+
* both confidentiality and integrity. It offers excellent performance
|
|
113
|
+
* on systems with AES hardware acceleration.
|
|
114
|
+
*
|
|
115
|
+
* @param config - The AES-256-GCM driver configuration
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* drivers.aes256gcm({
|
|
120
|
+
* id: 'app',
|
|
121
|
+
* keys: [env.get('APP_KEY')]
|
|
122
|
+
* })
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
aes256gcm: (config: AES256GCMDriverConfig) => ConfigProvider<EncryptionConfig>;
|
|
126
|
+
};
|
|
127
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AES-256-CBC encryption driver implementation.
|
|
3
|
+
*
|
|
4
|
+
* This driver provides encryption and decryption using the AES-256-CBC
|
|
5
|
+
* (Advanced Encryption Standard with 256-bit key in Cipher Block Chaining mode)
|
|
6
|
+
* algorithm. While widely supported, AES-256-CBC does not provide authenticated
|
|
7
|
+
* encryption. Consider using AES-256-GCM for new applications.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const driver = new AES256CBC({
|
|
12
|
+
* id: 'app',
|
|
13
|
+
* key: 'your-256-bit-key-here'
|
|
14
|
+
* })
|
|
15
|
+
*
|
|
16
|
+
* const encrypted = driver.encrypt('sensitive data')
|
|
17
|
+
* const decrypted = driver.decrypt(encrypted)
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export { AES256CBC } from '@boringnode/encryption/drivers/aes_256_cbc';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AES-256-GCM encryption driver implementation.
|
|
3
|
+
*
|
|
4
|
+
* This driver provides authenticated encryption and decryption using the
|
|
5
|
+
* AES-256-GCM (Advanced Encryption Standard with 256-bit key in Galois/Counter Mode)
|
|
6
|
+
* algorithm. GCM mode provides both confidentiality and authenticity, making it
|
|
7
|
+
* the recommended choice for modern applications. It offers excellent performance
|
|
8
|
+
* on systems with AES hardware acceleration.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const driver = new AES256GCM({
|
|
13
|
+
* id: 'app',
|
|
14
|
+
* key: 'your-256-bit-key-here'
|
|
15
|
+
* })
|
|
16
|
+
*
|
|
17
|
+
* const encrypted = driver.encrypt('sensitive data')
|
|
18
|
+
* const decrypted = driver.decrypt(encrypted)
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export { AES256GCM } from '@boringnode/encryption/drivers/aes_256_gcm';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChaCha20-Poly1305 encryption driver implementation.
|
|
3
|
+
*
|
|
4
|
+
* This driver provides authenticated encryption and decryption using the
|
|
5
|
+
* ChaCha20-Poly1305 algorithm. ChaCha20 is a modern stream cipher that
|
|
6
|
+
* provides excellent performance on systems without AES hardware acceleration.
|
|
7
|
+
* Combined with Poly1305 for authentication, it offers both confidentiality
|
|
8
|
+
* and authenticity.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const driver = new ChaCha20Poly1305({
|
|
13
|
+
* id: 'app',
|
|
14
|
+
* key: 'your-256-bit-key-here'
|
|
15
|
+
* })
|
|
16
|
+
*
|
|
17
|
+
* const encrypted = driver.encrypt('sensitive data')
|
|
18
|
+
* const decrypted = driver.decrypt(encrypted)
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export { ChaCha20Poly1305 } from '@boringnode/encryption/drivers/chacha20_poly1305';
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
* Defines the encryption configuration for the application.
|
|
73
|
+
*
|
|
74
|
+
* @see {defineConfig} in define_config.ts for detailed documentation
|
|
75
|
+
*/
|
|
76
|
+
export { defineConfig } from './define_config.ts';
|
|
77
|
+
/**
|
|
78
|
+
* Collection of built-in encryption driver factory functions.
|
|
79
|
+
*
|
|
80
|
+
* Includes factories for ChaCha20-Poly1305, AES-256-CBC, and
|
|
81
|
+
* AES-256-GCM encryption algorithms.
|
|
82
|
+
*
|
|
83
|
+
* @see {drivers} in define_config.ts for detailed documentation
|
|
84
|
+
*/
|
|
85
|
+
export { drivers } from './define_config.ts';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "../../config_provider-DWVFHOQX.js";
|
|
2
|
+
import "../../exceptions-DNMesP42.js";
|
|
3
|
+
import { n as drivers, t as defineConfig } from "../../define_config-BvoRgVYO.js";
|
|
4
|
+
import { i as Hmac, n as Encryption, r as EncryptionManager, t as BaseDriver } from "../../main-Bfnr5tAw.js";
|
|
5
|
+
export { BaseDriver, Encryption, EncryptionManager, Hmac, defineConfig, drivers };
|
package/build/modules/events.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import "../../
|
|
3
|
-
import "../../
|
|
4
|
-
import { n as defineConfig, r as drivers } from "../../main-BrJQ1VAM.js";
|
|
1
|
+
import "../../chunk-D0OgPoSf.js";
|
|
2
|
+
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
+
import { n as defineConfig, r as drivers } from "../../main-Ds47YsLG.js";
|
|
5
4
|
export * from "@adonisjs/hash";
|
|
6
5
|
export { defineConfig, drivers };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import { n as RequestValidator } from "../../main-
|
|
1
|
+
import "../../chunk-D0OgPoSf.js";
|
|
2
|
+
import { n as RequestValidator } from "../../main-SJINoEC5.js";
|
|
3
3
|
export * from "@adonisjs/http-server";
|
|
4
4
|
export { RequestValidator };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { 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
|
|
20
|
+
constructor(ctx: HttpContext);
|
|
23
21
|
/**
|
|
24
22
|
* The error reporter method returns the error reporter
|
|
25
23
|
* to use for reporting errors.
|
package/build/modules/logger.js
CHANGED
package/build/modules/repl.js
CHANGED
|
@@ -116,14 +116,15 @@ export default class AppServiceProvider {
|
|
|
116
116
|
*/
|
|
117
117
|
protected registerEmitter(): void;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Registers the encryption service with the container
|
|
120
120
|
*
|
|
121
|
-
* Creates
|
|
122
|
-
* the
|
|
121
|
+
* Creates singleton bindings for both the encryption manager and
|
|
122
|
+
* the default encryption instance. Resolves configuration from
|
|
123
|
+
* config/encryption.ts file.
|
|
123
124
|
*
|
|
124
125
|
* @example
|
|
125
126
|
* const encryption = await container.make('encryption')
|
|
126
|
-
* const encrypted = encryption.encrypt('
|
|
127
|
+
* const encrypted = encryption.encrypt('secret-data')
|
|
127
128
|
*/
|
|
128
129
|
protected registerEncryption(): void;
|
|
129
130
|
/**
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as events_exports } from "../events-
|
|
6
|
-
import { t as logger_exports } from "../logger-
|
|
7
|
-
import { t as Dumper } from "../dumper-
|
|
8
|
-
import { t as main_exports } from "../main-
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
import "../chunk-D0OgPoSf.js";
|
|
2
|
+
import { t as configProvider } from "../config_provider-DWVFHOQX.js";
|
|
3
|
+
import { t as app_exports } from "../app-DMrz0ZLL.js";
|
|
4
|
+
import { t as config_exports } from "../config-BCTXw_bK.js";
|
|
5
|
+
import { t as events_exports } from "../events-COq2WUF0.js";
|
|
6
|
+
import { t as logger_exports } from "../logger-pAx4u8AE.js";
|
|
7
|
+
import { t as Dumper } from "../dumper-DX0_GFDa.js";
|
|
8
|
+
import { t as main_exports } from "../main-SJINoEC5.js";
|
|
9
|
+
import { r as RuntimeException } from "../exceptions-DNMesP42.js";
|
|
10
|
+
import "../define_config-BvoRgVYO.js";
|
|
11
|
+
import { n as Encryption } from "../main-Bfnr5tAw.js";
|
|
12
|
+
import { t as main_exports$1 } from "../main-cAeS97DQ.js";
|
|
13
|
+
import { t as bodyparser_middleware_default } from "../bodyparser_middleware-BmARtnYe.js";
|
|
11
14
|
import { dirname } from "node:path";
|
|
12
15
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
13
16
|
var AppServiceProvider = class {
|
|
@@ -22,7 +25,7 @@ var AppServiceProvider = class {
|
|
|
22
25
|
}
|
|
23
26
|
registerAce() {
|
|
24
27
|
this.app.container.singleton("ace", async () => {
|
|
25
|
-
const { createAceKernel } = await import("../create_kernel-
|
|
28
|
+
const { createAceKernel } = await import("../create_kernel-Cn8zVtvt.js");
|
|
26
29
|
return createAceKernel(this.app);
|
|
27
30
|
});
|
|
28
31
|
}
|
|
@@ -52,15 +55,20 @@ var AppServiceProvider = class {
|
|
|
52
55
|
this.app.container.alias("emitter", events_exports.Emitter);
|
|
53
56
|
}
|
|
54
57
|
registerEncryption() {
|
|
55
|
-
this.app.container.singleton(
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
+
this.app.container.singleton("encryption", async () => {
|
|
59
|
+
const encryptionConfigProvider = this.app.config.get("encryption");
|
|
60
|
+
const config = await configProvider.resolve(this.app, encryptionConfigProvider);
|
|
61
|
+
if (!config) throw new RuntimeException("Invalid \"config/encryption.ts\" file. Make sure you are using the \"defineConfig\" method");
|
|
62
|
+
const { EncryptionManager } = await import("../modules/encryption/main.js");
|
|
63
|
+
return new EncryptionManager(config);
|
|
64
|
+
});
|
|
65
|
+
this.app.container.singleton(Encryption, async (resolver) => {
|
|
66
|
+
return (await resolver.make("encryption")).use();
|
|
58
67
|
});
|
|
59
|
-
this.app.container.alias("encryption", encryption_exports.Encryption);
|
|
60
68
|
}
|
|
61
69
|
registerServer() {
|
|
62
70
|
this.app.container.singleton(main_exports.Server, async (resolver) => {
|
|
63
|
-
const encryption = await resolver.make(
|
|
71
|
+
const encryption = await resolver.make(Encryption);
|
|
64
72
|
const emitter = await resolver.make("emitter");
|
|
65
73
|
const logger = await resolver.make("logger");
|
|
66
74
|
const config = this.app.config.get("app.http");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as main_exports } from "../main-
|
|
3
|
-
import { t as pluginEdgeDumper } from "../edge-
|
|
1
|
+
import "../chunk-D0OgPoSf.js";
|
|
2
|
+
import { t as main_exports } from "../main-SJINoEC5.js";
|
|
3
|
+
import { t as pluginEdgeDumper } from "../edge-BVYR-Vjr.js";
|
|
4
4
|
import edge from "edge.js";
|
|
5
5
|
var EdgeServiceProvider = class {
|
|
6
6
|
constructor(app) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import "../
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as main_exports } from "../main-BrJQ1VAM.js";
|
|
1
|
+
import "../chunk-D0OgPoSf.js";
|
|
2
|
+
import { t as configProvider } from "../config_provider-DWVFHOQX.js";
|
|
3
|
+
import { t as main_exports } from "../main-Ds47YsLG.js";
|
|
5
4
|
import { RuntimeException } from "@poppinss/utils/exception";
|
|
6
5
|
var HashServiceProvider = class {
|
|
7
6
|
constructor(app) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as repl_exports } from "../repl-
|
|
1
|
+
import "../chunk-D0OgPoSf.js";
|
|
2
|
+
import { t as repl_exports } from "../repl-CzHJfqZU.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { fsImportAll } from "@poppinss/utils/fs";
|
|
@@ -57,6 +57,11 @@ var ReplServiceProvider = class {
|
|
|
57
57
|
};
|
|
58
58
|
repl.notify(`Loaded "helpers" module. You can access it using the "${repl.colors.underline("helpers")}" variable`);
|
|
59
59
|
}, { description: "Load \"helpers\" module in the REPL context" });
|
|
60
|
+
repl.addMethod("loadUrlBuilder", async () => {
|
|
61
|
+
const router = await this.app.container.make("router");
|
|
62
|
+
repl.server.context.urlBuilder = router.urlBuilder;
|
|
63
|
+
repl.notify(`Loaded "urlBuilder" service. You can access it using the "${repl.colors.underline("urlBuilder")}" variable`);
|
|
64
|
+
}, { description: "Load \"urlBuilder\" service in the REPL context" });
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
67
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { n as RequestValidator, t as main_exports } from "../main-
|
|
3
|
-
import { t as VineMultipartFile } from "../vine-
|
|
1
|
+
import "../chunk-D0OgPoSf.js";
|
|
2
|
+
import { n as RequestValidator, t as main_exports } from "../main-SJINoEC5.js";
|
|
3
|
+
import { t as VineMultipartFile } from "../vine-DGint2rk.js";
|
|
4
4
|
import { Vine } from "@vinejs/vine";
|
|
5
5
|
var VineJSServiceProvider = class {
|
|
6
6
|
constructor(app) {
|
|
@@ -8,12 +8,11 @@ var VineJSServiceProvider = class {
|
|
|
8
8
|
this.app.usingVineJS = true;
|
|
9
9
|
}
|
|
10
10
|
boot() {
|
|
11
|
-
const experimentalFlags = this.app.experimentalFlags;
|
|
12
11
|
Vine.macro("file", function(options) {
|
|
13
12
|
return new VineMultipartFile(options);
|
|
14
13
|
});
|
|
15
14
|
main_exports.HttpRequest.macro("validateUsing", function(...args) {
|
|
16
|
-
return new RequestValidator(this.ctx
|
|
15
|
+
return new RequestValidator(this.ctx).validateUsing(...args);
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare let urlFor:
|
|
3
|
-
declare let signedUrlFor:
|
|
1
|
+
import type { UrlBuilderSignedUrlFor, UrlBuilderUrlFor } from '../src/types.ts';
|
|
2
|
+
declare let urlFor: UrlBuilderUrlFor;
|
|
3
|
+
declare let signedUrlFor: UrlBuilderSignedUrlFor;
|
|
4
4
|
export { urlFor, signedUrlFor };
|
|
@@ -33,5 +33,33 @@ import { type IndexEntitiesConfig } from '../types.ts';
|
|
|
33
33
|
* })
|
|
34
34
|
*/
|
|
35
35
|
export declare function indexEntities(entities?: IndexEntitiesConfig): {
|
|
36
|
-
run(_: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler,
|
|
36
|
+
run(_: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, __: import("@poppinss/hooks").default<{
|
|
37
|
+
init: [[parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, hooks: import("@poppinss/hooks").default</*elided*/ any>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator], [parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, hooks: import("@poppinss/hooks").default</*elided*/ any>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator]];
|
|
38
|
+
fileChanged: [[relativePath: string, absolutePath: string, info: {
|
|
39
|
+
source: "hot-hook" | "watcher";
|
|
40
|
+
hotReloaded: boolean;
|
|
41
|
+
fullReload: boolean;
|
|
42
|
+
}, parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, info: {
|
|
43
|
+
source: "hot-hook" | "watcher";
|
|
44
|
+
hotReloaded: boolean;
|
|
45
|
+
fullReload: boolean;
|
|
46
|
+
}, parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
47
|
+
fileAdded: [[relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
48
|
+
fileRemoved: [[relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
49
|
+
devServerStarting: [[server: import("@adonisjs/assembler").DevServer], [server: import("@adonisjs/assembler").DevServer]];
|
|
50
|
+
devServerStarted: [[server: import("@adonisjs/assembler").DevServer, info: {
|
|
51
|
+
port: number;
|
|
52
|
+
host: string;
|
|
53
|
+
}, uiInstructions: import("@poppinss/cliui").Instructions], [server: import("@adonisjs/assembler").DevServer, info: {
|
|
54
|
+
port: number;
|
|
55
|
+
host: string;
|
|
56
|
+
}, uiInstructions: import("@poppinss/cliui").Instructions]];
|
|
57
|
+
buildStarting: [[server: import("@adonisjs/assembler").Bundler], [server: import("@adonisjs/assembler").Bundler]];
|
|
58
|
+
buildFinished: [[server: import("@adonisjs/assembler").Bundler, uiInstructions: import("@poppinss/cliui").Instructions], [server: import("@adonisjs/assembler").Bundler, uiInstructions: import("@poppinss/cliui").Instructions]];
|
|
59
|
+
testsStarting: [[server: import("@adonisjs/assembler").TestRunner], [server: import("@adonisjs/assembler").TestRunner]];
|
|
60
|
+
testsFinished: [[server: import("@adonisjs/assembler").TestRunner], [server: import("@adonisjs/assembler").TestRunner]];
|
|
61
|
+
routesCommitted: [[parent: import("@adonisjs/assembler").DevServer, routes: Record<string, import("@adonisjs/assembler/types").RoutesListItem[]>], [parent: import("@adonisjs/assembler").DevServer, routes: Record<string, import("@adonisjs/assembler/types").RoutesListItem[]>]];
|
|
62
|
+
routesScanning: [[parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner], [parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner]];
|
|
63
|
+
routesScanned: [[parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner], [parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner]];
|
|
64
|
+
}>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator): void;
|
|
37
65
|
};
|
package/build/src/debug.d.ts
CHANGED
package/build/src/exceptions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as createError, n as InvalidArgumentsException, r as RuntimeException, t as Exception } from "../exceptions-DNMesP42.js";
|
|
2
2
|
export { Exception, InvalidArgumentsException, RuntimeException, createError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VerificationToken } from "../../verification_token-
|
|
1
|
+
import { t as VerificationToken } from "../../verification_token-DrdoU4RH.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,2 @@
|
|
|
1
|
-
import { t as string_default } from "../../string-
|
|
1
|
+
import { t as string_default } from "../../string-Cx6q_win.js";
|
|
2
2
|
export { string_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VerificationToken } from "../../verification_token-
|
|
1
|
+
import { t as VerificationToken } from "../../verification_token-DrdoU4RH.js";
|
|
2
2
|
export { VerificationToken };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import "../../
|
|
3
|
-
import "../../main-
|
|
4
|
-
import
|
|
1
|
+
import "../../chunk-D0OgPoSf.js";
|
|
2
|
+
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
+
import "../../main-SJINoEC5.js";
|
|
4
|
+
import "../../exceptions-DNMesP42.js";
|
|
5
|
+
import "../../define_config-BvoRgVYO.js";
|
|
6
|
+
import "../../main-Bfnr5tAw.js";
|
|
7
|
+
import { t as TestUtils } from "../../main-DURmA2iP.js";
|
|
5
8
|
export { TestUtils };
|