@adonisjs/core 7.0.0 → 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.d.ts +1 -1
- package/build/modules/ace/codemods.js +303 -8
- 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,23 +1,76 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as main_exports } from "../main-
|
|
3
|
-
import { pluginEdgeDumper } from "../
|
|
1
|
+
import "../chunk-Do49iUES.js";
|
|
2
|
+
import { t as main_exports } from "../main-Ck0GqLx4.js";
|
|
3
|
+
import { t as pluginEdgeDumper } from "../edge-BG5ZYp6Z.js";
|
|
4
4
|
import edge from "edge.js";
|
|
5
|
+
//#region providers/edge_provider.ts
|
|
6
|
+
/**
|
|
7
|
+
* The Edge service provider configures Edge to work within
|
|
8
|
+
* an AdonisJS application environment
|
|
9
|
+
*
|
|
10
|
+
* This provider integrates EdgeJS template engine with AdonisJS by:
|
|
11
|
+
* - Mounting the views directory
|
|
12
|
+
* - Configuring template caching for production
|
|
13
|
+
* - Adding global helpers for route generation
|
|
14
|
+
* - Creating isolated renderer instances for HTTP contexts
|
|
15
|
+
* - Adding render macro to BriskRoute for template rendering
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const provider = new EdgeServiceProvider(app)
|
|
19
|
+
* await provider.boot()
|
|
20
|
+
*/
|
|
5
21
|
var EdgeServiceProvider = class {
|
|
22
|
+
/**
|
|
23
|
+
* Edge service provider constructor
|
|
24
|
+
*
|
|
25
|
+
* Sets the usingEdgeJS flag to true to indicate EdgeJS is being used.
|
|
26
|
+
*
|
|
27
|
+
* @param app - The application service instance
|
|
28
|
+
*/
|
|
6
29
|
constructor(app) {
|
|
7
30
|
this.app = app;
|
|
8
31
|
this.app.usingEdgeJS = true;
|
|
9
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Bridge AdonisJS and Edge
|
|
35
|
+
*
|
|
36
|
+
* Configures EdgeJS integration by:
|
|
37
|
+
* - Setting up template mounting and caching
|
|
38
|
+
* - Defining global helpers (route, signedRoute, app, config)
|
|
39
|
+
* - Adding view getter to HttpContext for isolated rendering
|
|
40
|
+
* - Adding render macro to BriskRoute
|
|
41
|
+
* - Registering dumper plugin
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await provider.boot()
|
|
45
|
+
* // Now edge templates can use {{ route('home') }} helper
|
|
46
|
+
*/
|
|
10
47
|
async boot() {
|
|
11
48
|
const app = this.app;
|
|
12
49
|
const qs = new main_exports.Qs(app.config.get("app.http.qs", {}));
|
|
13
50
|
const router = await this.app.container.make("router");
|
|
14
51
|
const dumper = await this.app.container.make("dumper");
|
|
52
|
+
/**
|
|
53
|
+
* Resolves configuration values for Edge templates
|
|
54
|
+
*
|
|
55
|
+
* Provides access to application configuration within templates.
|
|
56
|
+
* Includes a 'has' method to check for config key existence.
|
|
57
|
+
*
|
|
58
|
+
* @param key - The configuration key to retrieve
|
|
59
|
+
* @param defaultValue - Optional default value if key doesn't exist
|
|
60
|
+
*/
|
|
15
61
|
function edgeConfigResolver(key, defaultValue) {
|
|
16
62
|
return app.config.get(key, defaultValue);
|
|
17
63
|
}
|
|
18
64
|
edgeConfigResolver.has = function(key) {
|
|
19
65
|
return app.config.has(key);
|
|
20
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* Generates client-side route definitions for frontend use
|
|
69
|
+
*
|
|
70
|
+
* Transforms router definitions into a serializable format that
|
|
71
|
+
* can be used in client-side JavaScript for route generation.
|
|
72
|
+
* Only includes named routes.
|
|
73
|
+
*/
|
|
21
74
|
function clientRoutes() {
|
|
22
75
|
const routes = router.toJSON();
|
|
23
76
|
return Object.keys(routes).reduce((result, domain) => {
|
|
@@ -35,8 +88,18 @@ var EdgeServiceProvider = class {
|
|
|
35
88
|
return result;
|
|
36
89
|
}, {});
|
|
37
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Mount the default disk
|
|
93
|
+
*/
|
|
38
94
|
edge.mount(app.viewsPath());
|
|
95
|
+
/**
|
|
96
|
+
* Cache templates in production
|
|
97
|
+
*/
|
|
39
98
|
edge.configure({ cache: app.inProduction });
|
|
99
|
+
/**
|
|
100
|
+
* Define Edge global helpers
|
|
101
|
+
* @deprecated
|
|
102
|
+
*/
|
|
40
103
|
edge.global("route", function(...args) {
|
|
41
104
|
return router.makeUrl(...args);
|
|
42
105
|
});
|
|
@@ -51,19 +114,35 @@ var EdgeServiceProvider = class {
|
|
|
51
114
|
edge.global("routesJSON", function() {
|
|
52
115
|
return JSON.stringify(clientRoutes());
|
|
53
116
|
});
|
|
117
|
+
/**
|
|
118
|
+
* Route helpers
|
|
119
|
+
*/
|
|
54
120
|
edge.global("urlFor", function(...args) {
|
|
55
121
|
return router.urlBuilder.urlFor(...args);
|
|
56
122
|
});
|
|
57
123
|
edge.global("signedUrlFor", function(...args) {
|
|
58
124
|
return router.urlBuilder.signedUrlFor(...args);
|
|
59
125
|
});
|
|
126
|
+
/**
|
|
127
|
+
* Sharing qs parser with templates
|
|
128
|
+
*/
|
|
60
129
|
edge.global("qs", qs);
|
|
61
130
|
edge.global("formAttributes", function(route, params, options) {
|
|
62
131
|
const matchingRoute = router.findOrFail(route);
|
|
132
|
+
/**
|
|
133
|
+
* Normalize method and keep a reference to the original method
|
|
134
|
+
*/
|
|
63
135
|
options = options ?? {};
|
|
64
136
|
let method = matchingRoute.methods[0].toUpperCase();
|
|
65
137
|
const original = method;
|
|
138
|
+
/**
|
|
139
|
+
* In case of HEAD, we must use the GET method
|
|
140
|
+
*/
|
|
66
141
|
if (method === "HEAD") method = "GET";
|
|
142
|
+
/**
|
|
143
|
+
* If method if not GET and POST, then use the querystring _method
|
|
144
|
+
* to and force update the method to "POST"
|
|
145
|
+
*/
|
|
67
146
|
if (method !== "GET" && method !== "POST") {
|
|
68
147
|
method = "POST";
|
|
69
148
|
options = {
|
|
@@ -80,9 +159,16 @@ var EdgeServiceProvider = class {
|
|
|
80
159
|
method
|
|
81
160
|
};
|
|
82
161
|
});
|
|
162
|
+
/**
|
|
163
|
+
* Creating a isolated instance of edge renderer
|
|
164
|
+
*/
|
|
83
165
|
main_exports.HttpContext.getter("view", function() {
|
|
84
166
|
return edge.createRenderer().share({ request: this.request });
|
|
85
167
|
}, true);
|
|
168
|
+
/**
|
|
169
|
+
* Adding brisk route to render templates without an
|
|
170
|
+
* explicit handler
|
|
171
|
+
*/
|
|
86
172
|
main_exports.BriskRoute.macro("render", function(template, data) {
|
|
87
173
|
function rendersTemplate({ view }) {
|
|
88
174
|
return view.render(template, data);
|
|
@@ -96,4 +182,5 @@ var EdgeServiceProvider = class {
|
|
|
96
182
|
edge.use(pluginEdgeDumper(dumper));
|
|
97
183
|
}
|
|
98
184
|
};
|
|
185
|
+
//#endregion
|
|
99
186
|
export { EdgeServiceProvider as default };
|
|
@@ -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 };
|