@adonisjs/core 7.0.1 → 7.1.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.
- package/build/ace-DBm6EcQ-.js +37 -0
- package/build/app-BCcG_oDd.js +7 -0
- package/build/app-CAuSGb2P.js +15 -0
- package/build/bodyparser_middleware-H5FArWkI.js +9 -0
- package/build/{chunk-iKc69rpz.js → chunk-Do49iUES.js} +3 -0
- package/build/commands/add.d.ts +1 -0
- package/build/commands/add.js +64 -10
- package/build/commands/build.js +41 -3
- package/build/commands/commands.json +1 -1
- package/build/commands/configure.js +70 -4
- package/build/commands/eject.js +30 -4
- package/build/commands/env/add.js +62 -4
- package/build/commands/generate_key.js +23 -3
- package/build/commands/inspect_rcfile.js +26 -2
- package/build/commands/list/routes.d.ts +5 -0
- package/build/commands/list/routes.js +242 -3
- package/build/commands/make/command.js +33 -4
- package/build/commands/make/controller.js +46 -4
- package/build/commands/make/event.js +36 -4
- package/build/commands/make/exception.js +36 -4
- package/build/commands/make/listener.js +44 -4
- package/build/commands/make/middleware.js +53 -5
- package/build/commands/make/preload.js +55 -5
- package/build/commands/make/provider.js +54 -5
- package/build/commands/make/service.js +29 -4
- package/build/commands/make/test.js +63 -4
- package/build/commands/make/transformer.js +37 -4
- package/build/commands/make/validator.js +44 -4
- package/build/commands/make/view.js +33 -4
- package/build/commands/repl.js +31 -2
- package/build/commands/serve.js +54 -4
- package/build/commands/test.js +69 -4
- package/build/config-Coti2q6R.js +7 -0
- package/build/config_provider-Do9af1ze.js +35 -0
- package/build/container-CGfEwWof.js +7 -0
- package/build/{core-IpCOCkUL.js → core-XjMm_ipu.js} +51 -2
- package/build/create_kernel-BV3swyCg.js +4 -0
- package/build/{create_kernel-B7ILNhuP.js → create_kernel-D38-0Zbt.js} +41 -1
- package/build/debug-DWofTfIX.js +20 -0
- package/build/{decorate-DmrZA614.js → decorate-B9Uz0anB.js} +2 -0
- package/build/{define_config-0oHaj43l.js → define_config--5euEdi8.js} +54 -3
- package/build/dumper-3R77st8F.js +353 -0
- package/build/edge-BG5ZYp6Z.js +57 -0
- package/build/{errors-CrCO-k44.js → errors-BScZTzBu.js} +9 -1
- package/build/events-DlKX1ZdL.js +7 -0
- package/build/exceptions-B2MzIlHY.js +2 -0
- package/build/factories/app.js +1 -0
- package/build/factories/bodyparser.js +1 -0
- package/build/factories/core/ace.js +16 -22
- package/build/factories/core/ignitor.js +13 -73
- package/build/factories/core/main.js +25 -17
- package/build/factories/core/test_utils.js +22 -19
- package/build/factories/encryption.js +1 -0
- package/build/factories/events.js +1 -0
- package/build/factories/hash.js +1 -0
- package/build/factories/http.js +1 -0
- package/build/factories/logger.js +1 -0
- package/build/factories/stubs.js +75 -7
- package/build/ignitor-Kym3gR-I.js +169 -0
- package/build/index.js +11 -8
- package/build/logger-DIdZPHCe.js +43 -0
- package/build/main-B50zECAi.js +121 -0
- package/build/main-CRnMnrH7.js +184 -0
- package/build/{main-kn40V-hF.js → main-CfTiGsiS.js} +2 -0
- package/build/main-Ck0GqLx4.js +117 -0
- package/build/main-CoZI4Ezs.js +2 -0
- package/build/main-D1MSq4Uu.js +435 -0
- package/build/{main--nXd7T-C.js → main-bRYXIHgD.js} +75 -3
- package/build/main-zxNP7iRl.js +7 -0
- package/build/modules/ace/codemods.js +301 -2
- package/build/modules/ace/commands.d.ts +5 -0
- package/build/modules/ace/main.js +2 -1
- package/build/modules/app.js +3 -5
- package/build/modules/bodyparser/bodyparser_middleware.js +2 -2
- package/build/modules/bodyparser/main.js +3 -5
- package/build/modules/config.js +3 -5
- package/build/modules/container.js +3 -5
- package/build/modules/dumper/main.js +29 -2
- package/build/modules/dumper/plugins/edge.js +2 -46
- package/build/modules/encryption/drivers/aes_256_cbc.js +1 -0
- package/build/modules/encryption/drivers/aes_256_gcm.js +1 -0
- package/build/modules/encryption/drivers/aes_siv.js +1 -0
- package/build/modules/encryption/drivers/chacha20_poly1305.js +1 -0
- package/build/modules/encryption/drivers/legacy.js +46 -1
- package/build/modules/encryption/main.js +7 -5
- package/build/modules/env/editor.js +1 -0
- package/build/modules/env/main.js +1 -0
- package/build/modules/events.js +3 -5
- package/build/modules/hash/drivers/argon.js +1 -0
- package/build/modules/hash/drivers/bcrypt.js +1 -0
- package/build/modules/hash/drivers/scrypt.js +1 -0
- package/build/modules/hash/main.js +4 -4
- package/build/modules/hash/phc_formatter.js +1 -0
- package/build/modules/health.js +1 -0
- package/build/modules/http/helpers.js +1 -0
- package/build/modules/http/main.js +2 -2
- package/build/modules/http/url_builder_client.js +1 -0
- package/build/modules/logger.js +3 -13
- package/build/modules/repl.js +3 -5
- package/build/modules/transformers/main.js +1 -0
- package/build/providers/app_provider.js +214 -15
- package/build/providers/edge_provider.js +90 -3
- package/build/providers/hash_provider.js +59 -4
- package/build/providers/repl_provider.js +64 -2
- package/build/providers/vinejs_provider.js +44 -3
- package/build/repl-C02Re0Yd.js +7 -0
- package/build/services/ace.js +11 -1
- package/build/services/app.js +2 -4
- package/build/services/config.js +7 -1
- package/build/services/dumper.js +13 -1
- package/build/services/emitter.js +8 -1
- package/build/services/encryption.js +8 -1
- package/build/services/hash.js +8 -1
- package/build/services/logger.js +8 -1
- package/build/services/repl.js +8 -1
- package/build/services/router.js +8 -1
- package/build/services/server.js +8 -1
- package/build/services/test_utils.js +11 -1
- package/build/services/url_builder.js +8 -1
- package/build/src/cli_formatters/routes_list.d.ts +7 -0
- package/build/src/exceptions.js +2 -1
- package/build/src/helpers/assert.js +1 -0
- package/build/src/helpers/http.js +1 -0
- package/build/src/helpers/is.js +24 -0
- package/build/src/helpers/main.js +2 -1
- package/build/src/helpers/string.js +2 -27
- package/build/src/helpers/types.js +18 -0
- package/build/src/helpers/verification_token.js +2 -45
- package/build/src/test_utils/main.js +9 -7
- package/build/src/types.js +1 -0
- package/build/src/vine.js +2 -32
- package/build/string-8_8He-HH.js +46 -0
- package/build/test_utils-DbJS_uEu.js +32 -0
- package/build/toolkit/main.js +13 -1
- package/build/types/ace.js +1 -0
- package/build/types/app.js +1 -0
- package/build/types/bodyparser.js +1 -0
- package/build/types/common.js +1 -0
- package/build/types/container.js +1 -0
- package/build/types/encryption.js +1 -0
- package/build/types/events.js +1 -0
- package/build/types/hash.js +1 -0
- package/build/types/health.js +1 -0
- package/build/types/helpers.js +1 -0
- package/build/types/http.js +1 -0
- package/build/types/logger.js +1 -0
- package/build/types/repl.js +1 -0
- package/build/types/transformers.js +1 -0
- package/build/utils-CKwka7OL.js +105 -0
- package/build/verification_token-WCrZtUgZ.js +108 -0
- package/build/vine-DkIupA3Z.js +97 -0
- package/package.json +12 -12
- package/build/config_provider-FIAUgvae.js +0 -13
- package/build/create_kernel-BD0Iqi8e.js +0 -3
- package/build/debug-CGQmxzGt.js +0 -3
- package/build/dumper-BBgqFX5a.js +0 -147
- package/build/main-Cxz0TyIw.js +0 -173
- package/build/main-DN2qEEg5.js +0 -41
- package/build/main-DkNgvceD.js +0 -52
- package/build/main-MBAMnmJb.js +0 -81
- package/build/utils-rRkbAPnP.js +0 -42
|
@@ -1,29 +1,84 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import "../debug-
|
|
3
|
-
import { t as configProvider } from "../config_provider-
|
|
4
|
-
import { t as main_exports } from "../main-
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import "../debug-DWofTfIX.js";
|
|
3
|
+
import { t as configProvider } from "../config_provider-Do9af1ze.js";
|
|
4
|
+
import { t as main_exports } from "../main-B50zECAi.js";
|
|
5
5
|
import { RuntimeException } from "@poppinss/utils/exception";
|
|
6
|
+
//#region providers/hash_provider.ts
|
|
7
|
+
/**
|
|
8
|
+
* Registers the passwords hasher with the container
|
|
9
|
+
*
|
|
10
|
+
* This provider sets up password hashing functionality by:
|
|
11
|
+
* - Registering the HashManager with configuration from config/hash.ts
|
|
12
|
+
* - Providing a Hash class that uses the default hasher
|
|
13
|
+
* - Supporting multiple hashing drivers (bcrypt, argon2, etc.)
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const provider = new HashServiceProvider(app)
|
|
17
|
+
* provider.register()
|
|
18
|
+
* const hash = await app.container.make('hash')
|
|
19
|
+
*/
|
|
6
20
|
var HashServiceProvider = class {
|
|
21
|
+
/**
|
|
22
|
+
* Hash service provider constructor
|
|
23
|
+
*
|
|
24
|
+
* @param app - The application service instance
|
|
25
|
+
*/
|
|
7
26
|
constructor(app) {
|
|
8
27
|
this.app = app;
|
|
9
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Registering the hash class to resolve an instance with the
|
|
31
|
+
* default hasher.
|
|
32
|
+
*
|
|
33
|
+
* Creates a singleton binding for the Hash class that resolves
|
|
34
|
+
* the default hasher from the hash manager.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const hash = await container.make(Hash)
|
|
38
|
+
* const hashed = await hash.make('password')
|
|
39
|
+
*/
|
|
10
40
|
registerHash() {
|
|
11
41
|
this.app.container.singleton(main_exports.Hash, async (resolver) => {
|
|
12
42
|
return (await resolver.make("hash")).use();
|
|
13
43
|
});
|
|
14
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Registers the hash manager with the container
|
|
47
|
+
*
|
|
48
|
+
* Creates a singleton binding for 'hash' that instantiates
|
|
49
|
+
* the HashManager with configuration from config/hash.ts file.
|
|
50
|
+
* Throws an error if the configuration is invalid.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* const hashManager = await container.make('hash')
|
|
54
|
+
* const bcryptHasher = hashManager.use('bcrypt')
|
|
55
|
+
*/
|
|
15
56
|
registerHashManager() {
|
|
16
57
|
this.app.container.singleton("hash", async () => {
|
|
17
58
|
const hashConfigProvider = this.app.config.get("hash");
|
|
59
|
+
/**
|
|
60
|
+
* Resolve config from the provider
|
|
61
|
+
*/
|
|
18
62
|
const config = await configProvider.resolve(this.app, hashConfigProvider);
|
|
19
63
|
if (!config) throw new RuntimeException("Invalid \"config/hash.ts\" file. Make sure you are using the \"defineConfig\" method");
|
|
20
64
|
const { HashManager } = await import("../modules/hash/main.js");
|
|
21
65
|
return new HashManager(config);
|
|
22
66
|
});
|
|
23
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Registers bindings
|
|
70
|
+
*
|
|
71
|
+
* Called during the application bootstrap phase to register
|
|
72
|
+
* the hash manager and hash class with the IoC container.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* const provider = new HashServiceProvider(app)
|
|
76
|
+
* provider.register() // Registers hash services
|
|
77
|
+
*/
|
|
24
78
|
register() {
|
|
25
79
|
this.registerHashManager();
|
|
26
80
|
this.registerHash();
|
|
27
81
|
}
|
|
28
82
|
};
|
|
83
|
+
//#endregion
|
|
29
84
|
export { HashServiceProvider as default };
|
|
@@ -1,22 +1,83 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as repl_exports } from "../
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as repl_exports } from "../repl-C02Re0Yd.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { fsImportAll } from "@poppinss/utils/fs";
|
|
6
|
+
//#region providers/repl_provider.ts
|
|
7
|
+
/**
|
|
8
|
+
* Resolves a container binding and sets it on the REPL
|
|
9
|
+
* context
|
|
10
|
+
*
|
|
11
|
+
* This helper function makes a service from the container and
|
|
12
|
+
* adds it to the REPL context with a notification message.
|
|
13
|
+
*
|
|
14
|
+
* @param app - The application service instance
|
|
15
|
+
* @param repl - The REPL instance to add the binding to
|
|
16
|
+
* @param binding - The container binding key to resolve
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* await resolveBindingForRepl(app, repl, 'router')
|
|
20
|
+
* // Now 'router' variable is available in REPL
|
|
21
|
+
*/
|
|
6
22
|
async function resolveBindingForRepl(app, repl, binding) {
|
|
7
23
|
repl.server.context[binding] = await app.container.make(binding);
|
|
8
24
|
repl.notify(`Loaded "${binding}" service. You can access it using the "${repl.colors.underline(binding)}" variable`);
|
|
9
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* REPL Service Provider configures the interactive Node.js REPL
|
|
28
|
+
* for AdonisJS applications
|
|
29
|
+
*
|
|
30
|
+
* This provider sets up:
|
|
31
|
+
* - REPL instance with history file support
|
|
32
|
+
* - Helper methods for importing modules and making container bindings
|
|
33
|
+
* - Quick access methods for loading common services (app, router, etc.)
|
|
34
|
+
* - Utility methods for development and debugging
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const provider = new ReplServiceProvider(app)
|
|
38
|
+
* provider.register()
|
|
39
|
+
* await provider.boot()
|
|
40
|
+
*/
|
|
10
41
|
var ReplServiceProvider = class {
|
|
42
|
+
/**
|
|
43
|
+
* REPL service provider constructor
|
|
44
|
+
*
|
|
45
|
+
* @param app - The application service instance
|
|
46
|
+
*/
|
|
11
47
|
constructor(app) {
|
|
12
48
|
this.app = app;
|
|
13
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Registers the REPL binding
|
|
52
|
+
*
|
|
53
|
+
* Creates a singleton binding for the REPL with history file
|
|
54
|
+
* support in the user's home directory.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const provider = new ReplServiceProvider(app)
|
|
58
|
+
* provider.register()
|
|
59
|
+
* const repl = await app.container.make('repl')
|
|
60
|
+
*/
|
|
14
61
|
register() {
|
|
15
62
|
this.app.container.singleton(repl_exports.Repl, async () => {
|
|
16
63
|
return new repl_exports.Repl({ historyFilePath: join(homedir(), ".adonisjs_v6_repl_history") });
|
|
17
64
|
});
|
|
18
65
|
this.app.container.alias("repl", repl_exports.Repl);
|
|
19
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Registering REPL bindings during provider boot
|
|
69
|
+
*
|
|
70
|
+
* Adds helper methods to the REPL instance including:
|
|
71
|
+
* - importDefault: Import default export from modules
|
|
72
|
+
* - importAll: Import all files from a directory
|
|
73
|
+
* - make: Create instances using container.make
|
|
74
|
+
* - load* methods: Quick access to common services
|
|
75
|
+
* - loadHelpers: Load utility helper functions
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await provider.boot()
|
|
79
|
+
* // REPL now has helper methods available
|
|
80
|
+
*/
|
|
20
81
|
async boot() {
|
|
21
82
|
this.app.container.resolving("repl", (repl) => {
|
|
22
83
|
repl.addMethod("importDefault", (_, modulePath) => {
|
|
@@ -65,4 +126,5 @@ var ReplServiceProvider = class {
|
|
|
65
126
|
});
|
|
66
127
|
}
|
|
67
128
|
};
|
|
129
|
+
//#endregion
|
|
68
130
|
export { ReplServiceProvider as default };
|
|
@@ -1,16 +1,56 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { n as RequestValidator, t as main_exports } from "../main-
|
|
3
|
-
import { VineMultipartFile } from "../
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { n as RequestValidator, t as main_exports } from "../main-Ck0GqLx4.js";
|
|
3
|
+
import { t as VineMultipartFile } from "../vine-DkIupA3Z.js";
|
|
4
4
|
import { Vine } from "@vinejs/vine";
|
|
5
|
+
//#region providers/vinejs_provider.ts
|
|
6
|
+
/**
|
|
7
|
+
* The VineJS service provider integrates VineJS validation
|
|
8
|
+
* library with AdonisJS application environment
|
|
9
|
+
*
|
|
10
|
+
* This provider sets up:
|
|
11
|
+
* - File validation rule for multipart file uploads
|
|
12
|
+
* - Request validation macro for easy validation in HTTP contexts
|
|
13
|
+
* - Extension of VineJS with AdonisJS-specific validation features
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const provider = new VineJSServiceProvider(app)
|
|
17
|
+
* provider.boot()
|
|
18
|
+
* // Now Request has validateUsing method
|
|
19
|
+
*/
|
|
5
20
|
var VineJSServiceProvider = class {
|
|
21
|
+
/**
|
|
22
|
+
* VineJS service provider constructor
|
|
23
|
+
*
|
|
24
|
+
* Sets the usingVineJS flag to true to indicate VineJS is being used.
|
|
25
|
+
*
|
|
26
|
+
* @param app - The application service instance
|
|
27
|
+
*/
|
|
6
28
|
constructor(app) {
|
|
7
29
|
this.app = app;
|
|
8
30
|
this.app.usingVineJS = true;
|
|
9
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Boot the VineJS service provider
|
|
34
|
+
*
|
|
35
|
+
* Extends VineJS with file validation macro and adds validateUsing
|
|
36
|
+
* method to the Request class for easy validation in HTTP contexts.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* provider.boot()
|
|
40
|
+
* // Now vine.file() and request.validateUsing() are available
|
|
41
|
+
*/
|
|
10
42
|
boot() {
|
|
43
|
+
/**
|
|
44
|
+
* The file method is used to validate a field to be a valid
|
|
45
|
+
* multipart file.
|
|
46
|
+
*/
|
|
11
47
|
Vine.macro("file", function(options) {
|
|
12
48
|
return new VineMultipartFile(options);
|
|
13
49
|
});
|
|
50
|
+
/**
|
|
51
|
+
* The validate method can be used to validate the request
|
|
52
|
+
* data for the current request using VineJS validators
|
|
53
|
+
*/
|
|
14
54
|
main_exports.HttpRequest.macro("validateUsing", function(...args) {
|
|
15
55
|
return new RequestValidator(this.ctx).validateUsing(...args);
|
|
16
56
|
});
|
|
@@ -19,4 +59,5 @@ var VineJSServiceProvider = class {
|
|
|
19
59
|
});
|
|
20
60
|
}
|
|
21
61
|
};
|
|
62
|
+
//#endregion
|
|
22
63
|
export { VineJSServiceProvider as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-Do49iUES.js";
|
|
2
|
+
//#region modules/repl.ts
|
|
3
|
+
var repl_exports = /* @__PURE__ */ __exportAll({});
|
|
4
|
+
import * as import__adonisjs_repl from "@adonisjs/repl";
|
|
5
|
+
__reExport(repl_exports, import__adonisjs_repl);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { repl_exports as t };
|
package/build/services/ace.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/ace.ts
|
|
2
4
|
let ace;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the ace kernel
|
|
7
|
+
* from the container.
|
|
8
|
+
*
|
|
9
|
+
* ace service is an instance of the "Kernel" class stored inside
|
|
10
|
+
* the "modules/ace/kernel.ts" file
|
|
11
|
+
*/
|
|
3
12
|
await app.booted(async () => {
|
|
4
13
|
ace = await app.container.make("ace");
|
|
5
14
|
});
|
|
15
|
+
//#endregion
|
|
6
16
|
export { ace as default };
|
package/build/services/app.js
CHANGED
package/build/services/config.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/config.ts
|
|
2
4
|
let config;
|
|
5
|
+
/**
|
|
6
|
+
* The config service uses the config instance from the app service
|
|
7
|
+
*/
|
|
3
8
|
await app.booted(() => {
|
|
4
9
|
config = app.config;
|
|
5
10
|
});
|
|
11
|
+
//#endregion
|
|
6
12
|
export { config as default };
|
package/build/services/dumper.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/dumper.ts
|
|
2
4
|
let dumper;
|
|
5
|
+
/**
|
|
6
|
+
* dumper service is an instance of the "Dumper" class stored inside
|
|
7
|
+
* the "modules/dumper/dumper.ts" file
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
dumper = await app.container.make("dumper");
|
|
5
11
|
});
|
|
12
|
+
/**
|
|
13
|
+
* Dump a value and die. The dumped value will be displayed
|
|
14
|
+
* using the HTML printer during an HTTP request or within
|
|
15
|
+
* the console otherwise.
|
|
16
|
+
*/
|
|
6
17
|
const dd = (value) => {
|
|
7
18
|
dumper.dd(value, 2);
|
|
8
19
|
};
|
|
20
|
+
//#endregion
|
|
9
21
|
export { dd };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/emitter.ts
|
|
2
4
|
let emitter;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the emitter class
|
|
7
|
+
* from the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
emitter = await app.container.make("emitter");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { emitter as default };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/encryption.ts
|
|
2
4
|
let encryption;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the encryption class
|
|
7
|
+
* from the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
encryption = await app.container.make("encryption");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { encryption as default };
|
package/build/services/hash.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/hash.ts
|
|
2
4
|
let hash;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the Hash manager from the
|
|
7
|
+
* container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
hash = await app.container.make("hash");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { hash as default };
|
package/build/services/logger.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/logger.ts
|
|
2
4
|
let logger;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the logger class
|
|
7
|
+
* from the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
logger = await app.container.make("logger");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { logger as default };
|
package/build/services/repl.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/repl.ts
|
|
2
4
|
let repl;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the Repl class from
|
|
7
|
+
* the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
repl = await app.container.make("repl");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { repl as default };
|
package/build/services/router.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/router.ts
|
|
2
4
|
let router;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the router class from
|
|
7
|
+
* the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
router = await app.container.make("router");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { router as default };
|
package/build/services/server.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/server.ts
|
|
2
4
|
let server;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the HTTP server
|
|
7
|
+
* from the container
|
|
8
|
+
*/
|
|
3
9
|
await app.booted(async () => {
|
|
4
10
|
server = await app.container.make("server");
|
|
5
11
|
});
|
|
12
|
+
//#endregion
|
|
6
13
|
export { server as default };
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/test_utils.ts
|
|
2
4
|
let testUtils;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a singleton instance of the TestUtils class
|
|
7
|
+
* from the container.
|
|
8
|
+
*
|
|
9
|
+
* testUtils service is an instance of the "TestUtils" exported from
|
|
10
|
+
* the "src/test_utils/main.ts" file.
|
|
11
|
+
*/
|
|
3
12
|
await app.booted(async () => {
|
|
4
13
|
testUtils = await app.container.make("testUtils");
|
|
5
14
|
});
|
|
15
|
+
//#endregion
|
|
6
16
|
export { testUtils as default };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as app } from "../app-CAuSGb2P.js";
|
|
3
|
+
//#region services/url_builder.ts
|
|
2
4
|
let urlFor;
|
|
3
5
|
let signedUrlFor;
|
|
6
|
+
/**
|
|
7
|
+
* Returns a singleton instance of the router class from
|
|
8
|
+
* the container
|
|
9
|
+
*/
|
|
4
10
|
await app.booted(async () => {
|
|
5
11
|
const router = await app.container.make("router");
|
|
6
12
|
urlFor = router.urlBuilder.urlFor;
|
|
7
13
|
signedUrlFor = router.urlBuilder.signedUrlFor;
|
|
8
14
|
});
|
|
15
|
+
//#endregion
|
|
9
16
|
export { signedUrlFor, urlFor };
|
|
@@ -46,6 +46,13 @@ export declare class RoutesListFormatter {
|
|
|
46
46
|
middleware?: string[];
|
|
47
47
|
ignoreMiddleware?: string[];
|
|
48
48
|
});
|
|
49
|
+
/**
|
|
50
|
+
* Formats routes as JSONL (one JSON object per line). Each line is a
|
|
51
|
+
* self-contained route object with flattened domain, simplified handler,
|
|
52
|
+
* and middleware as a string array. Optimized for machine consumption
|
|
53
|
+
* by AI agents and CLI tools.
|
|
54
|
+
*/
|
|
55
|
+
formatAsJSONL(): Promise<string[]>;
|
|
49
56
|
/**
|
|
50
57
|
* Formats routes as an array of objects. Routes are grouped by
|
|
51
58
|
* domain.
|
package/build/src/exceptions.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { i as createError, n as InvalidArgumentsException, r as RuntimeException, t as Exception } from "../exceptions-B2MzIlHY.js";
|
|
2
3
|
export { Exception, InvalidArgumentsException, RuntimeException, createError };
|
package/build/src/helpers/is.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
1
2
|
import is from "@sindresorhus/is";
|
|
3
|
+
//#region src/helpers/is.ts
|
|
4
|
+
/**
|
|
5
|
+
* Type checking utilities re-exported from @sindresorhus/is. Provides
|
|
6
|
+
* a comprehensive set of type-checking functions with TypeScript type guards.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Basic type checking
|
|
10
|
+
* import { is } from '@adonisjs/core/helpers'
|
|
11
|
+
*
|
|
12
|
+
* if (is.string(value)) {
|
|
13
|
+
* // TypeScript knows value is string
|
|
14
|
+
* console.log(value.toUpperCase())
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Complex type checking
|
|
19
|
+
* import { is } from '@adonisjs/core/helpers'
|
|
20
|
+
*
|
|
21
|
+
* is.array(value) && is.nonEmptyArray(value)
|
|
22
|
+
* is.plainObject(obj) && is.hasProperty(obj, 'name')
|
|
23
|
+
* is.number(num) && is.integer(num) && is.positive(num)
|
|
24
|
+
*/
|
|
2
25
|
var is_default = is;
|
|
26
|
+
//#endregion
|
|
3
27
|
export { is_default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
2
|
+
import { t as VerificationToken } from "../../verification_token-WCrZtUgZ.js";
|
|
2
3
|
import { fsImportAll, fsReadAll } from "@poppinss/utils/fs";
|
|
3
4
|
import base64 from "@poppinss/utils/base64";
|
|
4
5
|
import { MessageBuilder, Secret, compose, defineStaticProperty, safeEqual } from "@poppinss/utils";
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
};
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
2
|
+
import { t as stringHelpers } from "../../string-8_8He-HH.js";
|
|
28
3
|
export { stringHelpers as default };
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
1
2
|
import is from "@sindresorhus/is";
|
|
3
|
+
//#region src/helpers/types.ts
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* Use "is" helpers instead. The types helpers exist for backward compatibility.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Instead of using types helpers (deprecated)
|
|
10
|
+
* types.isString('hello')
|
|
11
|
+
* types.isNumber(42)
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Use the new "is" helpers
|
|
15
|
+
* import { is } from '@adonisjs/core/helpers'
|
|
16
|
+
* is.string('hello')
|
|
17
|
+
* is.number(42)
|
|
18
|
+
*/
|
|
2
19
|
const types = {
|
|
3
20
|
lookup: is,
|
|
4
21
|
isNull: is.null,
|
|
@@ -24,4 +41,5 @@ const types = {
|
|
|
24
41
|
return new RegExp(`^[-+]?([0-9]+)?(\\.[0-9]{${decimalPlaces}})$`).test(value);
|
|
25
42
|
}
|
|
26
43
|
};
|
|
44
|
+
//#endregion
|
|
27
45
|
export { types as default };
|
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
};
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
2
|
+
import { t as VerificationToken } from "../../verification_token-WCrZtUgZ.js";
|
|
46
3
|
export { VerificationToken };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import "../../debug-
|
|
3
|
-
import "../../config_provider-
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../
|
|
6
|
-
import "../../
|
|
7
|
-
import
|
|
1
|
+
import "../../chunk-Do49iUES.js";
|
|
2
|
+
import "../../debug-DWofTfIX.js";
|
|
3
|
+
import "../../config_provider-Do9af1ze.js";
|
|
4
|
+
import "../../exceptions-B2MzIlHY.js";
|
|
5
|
+
import "../../main-Ck0GqLx4.js";
|
|
6
|
+
import "../../errors-BScZTzBu.js";
|
|
7
|
+
import "../../define_config--5euEdi8.js";
|
|
8
|
+
import "../../main-CoZI4Ezs.js";
|
|
9
|
+
import { t as TestUtils } from "../../main-bRYXIHgD.js";
|
|
8
10
|
export { TestUtils };
|
package/build/src/types.js
CHANGED