@adonisjs/core 7.0.0-next.26 → 7.0.0-next.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/build/{chunk-B88MteZI.js → chunk-iKc69rpz.js} +2 -2
- package/build/commands/add.js +8 -12
- package/build/commands/build.js +3 -3
- package/build/commands/configure.js +2 -2
- package/build/commands/eject.js +4 -4
- package/build/commands/env/add.js +5 -5
- 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 +4 -4
- package/build/commands/make/preload.js +4 -4
- package/build/commands/make/provider.js +4 -4
- 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/{core-Ckhxy7oM.js → core-CvwBnUuy.js} +3 -3
- package/build/{create_kernel-PIeMK2Fo.js → create_kernel-BFf40UqW.js} +1 -1
- package/build/create_kernel-kceIXCLj.js +3 -0
- package/build/{define_config-BlZ46bUg.js → define_config-C9vVaMH2.js} +3 -3
- package/build/{dumper-DxJ_VRuC.js → dumper-BBgqFX5a.js} +1 -1
- package/build/factories/core/ace.js +22 -16
- package/build/factories/core/ignitor.js +73 -13
- package/build/factories/core/main.js +15 -23
- package/build/factories/core/test_utils.js +17 -20
- package/build/factories/stubs.js +6 -10
- package/build/index.js +7 -10
- package/build/{main-BIVLvDaW.js → main-BAQrymbz.js} +3 -3
- package/build/{main-DjlqWWRt.js → main-CGF65fuX.js} +3 -3
- package/build/{main-DNokQ-c9.js → main-DN2qEEg5.js} +20 -9
- package/build/{main-DIF5Sg8W.js → main-zQdklBGW.js} +9 -7
- package/build/modules/ace/codemods.js +3 -4
- package/build/modules/ace/main.js +1 -1
- package/build/modules/app.js +5 -3
- package/build/modules/bodyparser/bodyparser_middleware.js +2 -1
- package/build/modules/bodyparser/main.js +5 -3
- package/build/modules/config.js +5 -3
- package/build/modules/container.js +5 -3
- package/build/modules/dumper/main.js +2 -2
- package/build/modules/dumper/plugins/edge.js +46 -1
- package/build/modules/encryption/main.js +4 -5
- package/build/modules/events.js +5 -3
- package/build/modules/hash/main.js +4 -4
- package/build/modules/http/main.js +2 -2
- package/build/modules/http/request_validator.d.ts +2 -1
- package/build/modules/logger.js +13 -3
- package/build/modules/repl.js +5 -3
- package/build/providers/app_provider.js +14 -14
- package/build/providers/edge_provider.js +3 -3
- package/build/providers/hash_provider.js +4 -4
- package/build/providers/repl_provider.js +2 -2
- package/build/providers/vinejs_provider.js +6 -3
- package/build/services/ace.js +1 -1
- package/build/services/app.js +4 -1
- package/build/services/config.js +1 -1
- package/build/services/dumper.js +1 -1
- package/build/services/emitter.js +1 -1
- package/build/services/encryption.js +1 -1
- package/build/services/hash.js +1 -1
- package/build/services/logger.js +1 -1
- package/build/services/repl.js +1 -1
- package/build/services/router.js +1 -1
- package/build/services/server.js +1 -1
- package/build/services/test_utils.js +1 -1
- package/build/services/url_builder.js +1 -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 +28 -2
- package/build/src/helpers/types.js +3 -3
- package/build/src/helpers/verification_token.js +45 -1
- package/build/src/test_utils/main.js +6 -8
- package/build/src/vine.js +32 -1
- package/build/toolkit/main.js +1 -1
- package/package.json +12 -12
- package/build/ace-BfYSDoPf.js +0 -16
- package/build/app-B6oge7b3.js +0 -5
- package/build/app-DNvbxVWl.js +0 -5
- package/build/bodyparser_middleware-BmARtnYe.js +0 -3
- package/build/config-BEEqDrcn.js +0 -5
- package/build/container-uxa8LpGI.js +0 -5
- package/build/create_kernel-BCs646Vx.js +0 -3
- package/build/edge-BVYR-Vjr.js +0 -47
- package/build/events-BWRc08nG.js +0 -5
- package/build/exceptions-DNMesP42.js +0 -2
- package/build/ignitor-B5akJVlQ.js +0 -71
- package/build/logger-DV65GX9N.js +0 -13
- package/build/main-C2r_lzz0.js +0 -2
- package/build/main-DOY5Q8Av.js +0 -5
- package/build/repl-CwFmzJvr.js +0 -5
- package/build/string-CJ7ewUFq.js +0 -28
- package/build/test_utils-JjctlaE3.js +0 -10
- package/build/verification_token-DrdoU4RH.js +0 -46
- package/build/vine-D37x2ex7.js +0 -33
- /package/build/{config_provider-CY-xuo2R.js → config_provider-FIAUgvae.js} +0 -0
- /package/build/{debug-DURPi9xn.js → debug-CGQmxzGt.js} +0 -0
- /package/build/{decorate-DM0Sx1ye.js → decorate-DmrZA614.js} +0 -0
- /package/build/{main-BWftwyAK.js → main-MBAMnmJb.js} +0 -0
- /package/build/{utils-DjXMIVBJ.js → utils-CcS9NOK_.js} +0 -0
package/build/src/exceptions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Exception, InvalidArgumentsException, RuntimeException, createError } from "@poppinss/utils/exception";
|
|
2
2
|
export { Exception, InvalidArgumentsException, RuntimeException, createError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VerificationToken } from "./verification_token.js";
|
|
2
2
|
import { fsImportAll, fsReadAll } from "@poppinss/utils/fs";
|
|
3
3
|
import base64 from "@poppinss/utils/base64";
|
|
4
4
|
import { MessageBuilder, Secret, compose, defineStaticProperty, safeEqual } from "@poppinss/utils";
|
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import prettyHrTime from "pretty-hrtime";
|
|
2
|
+
import string from "@poppinss/utils/string";
|
|
3
|
+
import he from "he";
|
|
4
|
+
import StringBuilder from "@poppinss/utils/string_builder";
|
|
5
|
+
const stringHelpers = {
|
|
6
|
+
...string,
|
|
7
|
+
toSentence: string.sentence,
|
|
8
|
+
ordinalize: string.ordinal,
|
|
9
|
+
generateRandom: string.random,
|
|
10
|
+
create(value) {
|
|
11
|
+
return new StringBuilder(value);
|
|
12
|
+
},
|
|
13
|
+
prettyHrTime(time, options) {
|
|
14
|
+
return prettyHrTime(time, options);
|
|
15
|
+
},
|
|
16
|
+
isEmpty(value) {
|
|
17
|
+
return value.trim().length === 0;
|
|
18
|
+
},
|
|
19
|
+
escapeHTML(value, options) {
|
|
20
|
+
value = he.escape(value);
|
|
21
|
+
if (options && options.encodeSymbols) value = this.encodeSymbols(value, { allowUnsafeSymbols: true });
|
|
22
|
+
return value;
|
|
23
|
+
},
|
|
24
|
+
encodeSymbols(value, options) {
|
|
25
|
+
return he.encode(value, options);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export { stringHelpers as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import is from "@sindresorhus/is";
|
|
2
|
-
|
|
2
|
+
const types = {
|
|
3
3
|
lookup: is,
|
|
4
4
|
isNull: is.null,
|
|
5
5
|
isBoolean: is.boolean,
|
|
@@ -21,7 +21,7 @@ var types_default = {
|
|
|
21
21
|
isDecimal(value, options) {
|
|
22
22
|
if (typeof value === "number") value = value.toString();
|
|
23
23
|
const decimalPlaces = options && options.decimalPlaces || "1,";
|
|
24
|
-
return
|
|
24
|
+
return new RegExp(`^[-+]?([0-9]+)?(\\.[0-9]{${decimalPlaces}})$`).test(value);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
export {
|
|
27
|
+
export { types as default };
|
|
@@ -1,2 +1,46 @@
|
|
|
1
|
-
import
|
|
1
|
+
import string from "@poppinss/utils/string";
|
|
2
|
+
import base64 from "@poppinss/utils/base64";
|
|
3
|
+
import { Secret, safeEqual } from "@poppinss/utils";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
var VerificationToken = class {
|
|
6
|
+
static decode(value) {
|
|
7
|
+
if (typeof value !== "string") return null;
|
|
8
|
+
if (!value) return null;
|
|
9
|
+
const [identifier, ...tokenValue] = value.split(".");
|
|
10
|
+
if (!identifier || tokenValue.length === 0) return null;
|
|
11
|
+
const decodedIdentifier = base64.urlDecode(identifier);
|
|
12
|
+
const decodedSecret = base64.urlDecode(tokenValue.join("."));
|
|
13
|
+
if (!decodedIdentifier || !decodedSecret) return null;
|
|
14
|
+
return {
|
|
15
|
+
identifier: decodedIdentifier,
|
|
16
|
+
secret: new Secret(decodedSecret)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static createTransientToken(userId, size, expiresIn) {
|
|
20
|
+
const expiresAt = /* @__PURE__ */ new Date();
|
|
21
|
+
expiresAt.setSeconds(expiresAt.getSeconds() + string.seconds.parse(expiresIn));
|
|
22
|
+
return {
|
|
23
|
+
userId,
|
|
24
|
+
expiresAt,
|
|
25
|
+
...this.seed(size)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static seed(size) {
|
|
29
|
+
const secret = new Secret(string.random(size));
|
|
30
|
+
return {
|
|
31
|
+
secret,
|
|
32
|
+
hash: createHash("sha256").update(secret.release()).digest("hex")
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
computeValue(secret) {
|
|
36
|
+
this.value = new Secret(`${base64.urlEncode(String(this.identifier))}.${base64.urlEncode(secret.release())}`);
|
|
37
|
+
}
|
|
38
|
+
isExpired() {
|
|
39
|
+
return this.expiresAt < /* @__PURE__ */ new Date();
|
|
40
|
+
}
|
|
41
|
+
verify(secret) {
|
|
42
|
+
const newHash = createHash("sha256").update(secret.release()).digest("hex");
|
|
43
|
+
return safeEqual(this.hash, newHash);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
2
46
|
export { VerificationToken };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import "../../debug-
|
|
3
|
-
import "../../config_provider-
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../
|
|
6
|
-
import "../../
|
|
7
|
-
import "../../main-C2r_lzz0.js";
|
|
8
|
-
import { t as TestUtils } from "../../main-DjlqWWRt.js";
|
|
1
|
+
import "../../chunk-iKc69rpz.js";
|
|
2
|
+
import "../../debug-CGQmxzGt.js";
|
|
3
|
+
import "../../config_provider-FIAUgvae.js";
|
|
4
|
+
import "../../main-DN2qEEg5.js";
|
|
5
|
+
import "../../define_config-C9vVaMH2.js";
|
|
6
|
+
import { t as TestUtils } from "../../main-CGF65fuX.js";
|
|
9
7
|
export { TestUtils };
|
package/build/src/vine.js
CHANGED
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import vine, { BaseLiteralType, symbols } from "@vinejs/vine";
|
|
2
|
+
const MULTIPART_FILE = symbols.SUBTYPE ?? Symbol.for("subtype");
|
|
3
|
+
function isBodyParserFile(file) {
|
|
4
|
+
return !!(file && typeof file === "object" && "isMultipartFile" in file);
|
|
5
|
+
}
|
|
6
|
+
const isMultipartFile = vine.createRule((file, options, field) => {
|
|
7
|
+
if (!field.isDefined) return false;
|
|
8
|
+
if (!isBodyParserFile(file)) {
|
|
9
|
+
field.report("The {{ field }} must be a file", "file", field);
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
const validationOptions = typeof options === "function" ? options(field) : options;
|
|
13
|
+
if (file.sizeLimit === void 0 && validationOptions.size) file.sizeLimit = validationOptions.size;
|
|
14
|
+
if (file.allowedExtensions === void 0 && validationOptions.extnames) file.allowedExtensions = validationOptions.extnames;
|
|
15
|
+
file.validate();
|
|
16
|
+
file.errors.forEach((error) => {
|
|
17
|
+
field.report(error.message, `file.${error.type}`, field, validationOptions);
|
|
18
|
+
});
|
|
19
|
+
return file.isValid;
|
|
20
|
+
});
|
|
21
|
+
var VineMultipartFile = class VineMultipartFile extends BaseLiteralType {
|
|
22
|
+
#validationOptions;
|
|
23
|
+
[MULTIPART_FILE] = "multipartFile";
|
|
24
|
+
constructor(validationOptions, options, validations) {
|
|
25
|
+
super(options, validations || []);
|
|
26
|
+
this.#validationOptions = validationOptions;
|
|
27
|
+
this.dataTypeValidator = isMultipartFile(validationOptions || {});
|
|
28
|
+
}
|
|
29
|
+
clone() {
|
|
30
|
+
return new VineMultipartFile(this.#validationOptions, this.cloneOptions(), this.cloneValidations());
|
|
31
|
+
}
|
|
32
|
+
};
|
|
2
33
|
export { VineMultipartFile };
|
package/build/toolkit/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as __decorate } from "../decorate-
|
|
2
|
+
import { t as __decorate } from "../decorate-DmrZA614.js";
|
|
3
3
|
import { BaseCommand, HelpCommand, IndexGenerator, Kernel, ListLoader, args } from "@adonisjs/ace";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
var IndexCommand = class extends BaseCommand {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/core",
|
|
3
3
|
"description": "Core of AdonisJS",
|
|
4
|
-
"version": "7.0.0-next.
|
|
4
|
+
"version": "7.0.0-next.28",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
7
7
|
},
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"index:commands": "node --import=@poppinss/ts-exec toolkit/main.js index build/commands"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@adonisjs/assembler": "^8.0.0-next.
|
|
83
|
+
"@adonisjs/assembler": "^8.0.0-next.32",
|
|
84
84
|
"@adonisjs/eslint-config": "^3.0.0-next.9",
|
|
85
85
|
"@adonisjs/prettier-config": "^1.4.5",
|
|
86
86
|
"@adonisjs/tsconfig": "^2.0.0-next.3",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@japa/file-system": "^3.0.0",
|
|
90
90
|
"@japa/runner": "^5.3.0",
|
|
91
91
|
"@japa/snapshot": "^2.0.10",
|
|
92
|
-
"@poppinss/ts-exec": "^1.4.
|
|
92
|
+
"@poppinss/ts-exec": "^1.4.3",
|
|
93
93
|
"@release-it/conventional-changelog": "^10.0.4",
|
|
94
|
-
"@types/node": "
|
|
94
|
+
"@types/node": "~24.10.11",
|
|
95
95
|
"@types/pretty-hrtime": "^1.0.3",
|
|
96
96
|
"@types/sinon": "^21.0.0",
|
|
97
97
|
"@types/supertest": "^6.0.3",
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
"execa": "^9.6.1",
|
|
109
109
|
"get-port": "^7.1.0",
|
|
110
110
|
"pino-pretty": "^13.1.3",
|
|
111
|
-
"prettier": "^3.8.
|
|
112
|
-
"release-it": "^19.2.
|
|
111
|
+
"prettier": "^3.8.1",
|
|
112
|
+
"release-it": "^19.2.4",
|
|
113
113
|
"sinon": "^21.0.1",
|
|
114
114
|
"supertest": "^7.2.2",
|
|
115
115
|
"test-console": "^2.0.0",
|
|
116
116
|
"timekeeper": "^2.3.1",
|
|
117
|
-
"tsdown": "^0.
|
|
117
|
+
"tsdown": "^0.20.3",
|
|
118
118
|
"typedoc": "^0.28.16",
|
|
119
119
|
"typescript": "^5.9.3",
|
|
120
120
|
"youch": "^4.1.0-beta.13"
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@adonisjs/ace": "^14.0.1-next.4",
|
|
124
124
|
"@adonisjs/application": "^9.0.0-next.15",
|
|
125
|
-
"@adonisjs/bodyparser": "^11.0.0-next.
|
|
125
|
+
"@adonisjs/bodyparser": "^11.0.0-next.9",
|
|
126
126
|
"@adonisjs/config": "^6.1.0-next.0",
|
|
127
127
|
"@adonisjs/env": "^7.0.0-next.3",
|
|
128
128
|
"@adonisjs/events": "^10.1.0-next.4",
|
|
@@ -130,20 +130,20 @@
|
|
|
130
130
|
"@adonisjs/hash": "^10.0.0-next.2",
|
|
131
131
|
"@adonisjs/health": "^3.1.0-next.1",
|
|
132
132
|
"@adonisjs/http-server": "^8.0.0-next.18",
|
|
133
|
-
"@adonisjs/http-transformers": "^2.1.
|
|
133
|
+
"@adonisjs/http-transformers": "^2.1.1",
|
|
134
134
|
"@adonisjs/logger": "^7.1.0-next.3",
|
|
135
|
-
"@adonisjs/repl": "^5.0.0-next.
|
|
135
|
+
"@adonisjs/repl": "^5.0.0-next.2",
|
|
136
136
|
"@boringnode/encryption": "^0.2.5",
|
|
137
137
|
"@poppinss/colors": "^4.1.6",
|
|
138
138
|
"@poppinss/dumper": "^0.7.0",
|
|
139
139
|
"@poppinss/macroable": "^1.1.0",
|
|
140
|
-
"@poppinss/utils": "^7.0.0-next.
|
|
140
|
+
"@poppinss/utils": "^7.0.0-next.7",
|
|
141
141
|
"@sindresorhus/is": "^7.2.0",
|
|
142
142
|
"@types/he": "^1.2.3",
|
|
143
143
|
"error-stack-parser-es": "^1.0.5",
|
|
144
144
|
"he": "^1.2.0",
|
|
145
145
|
"pretty-hrtime": "^1.0.3",
|
|
146
|
-
"string-width": "^8.1.
|
|
146
|
+
"string-width": "^8.1.1"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
149
|
"@adonisjs/assembler": "^8.0.0-next.23",
|
package/build/ace-BfYSDoPf.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
2
|
-
import { t as IgnitorFactory } from "./ignitor-B5akJVlQ.js";
|
|
3
|
-
import { t as createAceKernel } from "./create_kernel-PIeMK2Fo.js";
|
|
4
|
-
var AceFactory = class {
|
|
5
|
-
async make(ignitorOrAppRoot, options) {
|
|
6
|
-
if (ignitorOrAppRoot instanceof Ignitor) {
|
|
7
|
-
const app$1 = ignitorOrAppRoot.createApp("console");
|
|
8
|
-
await app$1.init();
|
|
9
|
-
return createAceKernel(app$1);
|
|
10
|
-
}
|
|
11
|
-
const app = new IgnitorFactory().withCoreConfig().withCoreProviders().create(ignitorOrAppRoot, options).createApp("console");
|
|
12
|
-
await app.init();
|
|
13
|
-
return createAceKernel(app);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
export { AceFactory as t };
|
package/build/app-B6oge7b3.js
DELETED
package/build/app-DNvbxVWl.js
DELETED
package/build/config-BEEqDrcn.js
DELETED
package/build/edge-BVYR-Vjr.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Template } from "edge.js";
|
|
2
|
-
function pluginEdgeDumper(dumper) {
|
|
3
|
-
Template.macro("dumper", dumper);
|
|
4
|
-
return (edge$1) => {
|
|
5
|
-
edge$1.registerTag({
|
|
6
|
-
tagName: "dump",
|
|
7
|
-
block: false,
|
|
8
|
-
seekable: true,
|
|
9
|
-
noNewLine: true,
|
|
10
|
-
compile(parser, buffer, token) {
|
|
11
|
-
const parsed = parser.utils.transformAst(parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename), token.filename, parser);
|
|
12
|
-
buffer.writeExpression(`template.stacks.pushOnceTo('dumper', 'dumper_globals', template.dumper.getHeadElements(state.cspNonce))`, token.filename, token.loc.start.line);
|
|
13
|
-
buffer.outputExpression(`template.dumper.dumpToHtml(${parser.utils.stringify(parsed)}, { cspNonce: state.cspNonce, source: { location: $filename, line: $lineNumber } })`, token.filename, token.loc.start.line, true);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
edge$1.registerTag({
|
|
17
|
-
tagName: "dd",
|
|
18
|
-
block: false,
|
|
19
|
-
seekable: true,
|
|
20
|
-
noNewLine: true,
|
|
21
|
-
compile(parser, buffer, token) {
|
|
22
|
-
const parsed = parser.utils.transformAst(parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename), token.filename, parser);
|
|
23
|
-
const ddStatement = [
|
|
24
|
-
"try {",
|
|
25
|
-
` template.dumper.dd(${parser.utils.stringify(parsed)})`,
|
|
26
|
-
"} catch (error) {",
|
|
27
|
-
` if (error.code === 'E_DUMP_DIE_EXCEPTION') {`,
|
|
28
|
-
" const edgeError = template.createError(error.message, $filename, $lineNumber)",
|
|
29
|
-
" error.fileName = $filename",
|
|
30
|
-
" error.lineNumber = $lineNumber",
|
|
31
|
-
" edgeError.handle = function (_, ctx) {",
|
|
32
|
-
" return error.handle(error, ctx)",
|
|
33
|
-
" }",
|
|
34
|
-
" edgeError.report = function () {",
|
|
35
|
-
" return error.report(error)",
|
|
36
|
-
" }",
|
|
37
|
-
" throw edgeError",
|
|
38
|
-
" }",
|
|
39
|
-
" throw error",
|
|
40
|
-
"}"
|
|
41
|
-
].join("\n");
|
|
42
|
-
buffer.writeStatement(ddStatement, token.filename, token.loc.start.line);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export { pluginEdgeDumper as t };
|
package/build/events-BWRc08nG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { Exception as Exception$1, InvalidArgumentsException as InvalidArgumentsException$1, RuntimeException as RuntimeException$1, createError } from "@poppinss/utils/exception";
|
|
2
|
-
export { createError as i, InvalidArgumentsException$1 as n, RuntimeException$1 as r, Exception$1 as t };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
2
|
-
import { t as logger_exports } from "./logger-DV65GX9N.js";
|
|
3
|
-
import { t as main_exports } from "./main-DNokQ-c9.js";
|
|
4
|
-
import { n as drivers, t as defineConfig } from "./define_config-BlZ46bUg.js";
|
|
5
|
-
import { n as defineConfig$1, r as drivers$1 } from "./main-BIVLvDaW.js";
|
|
6
|
-
import { t as main_exports$1 } from "./main-DOY5Q8Av.js";
|
|
7
|
-
var IgnitorFactory = class {
|
|
8
|
-
#preloadActions = [];
|
|
9
|
-
#parameters = {};
|
|
10
|
-
#loadCoreProviders = false;
|
|
11
|
-
preload(action) {
|
|
12
|
-
this.#preloadActions.push(action);
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
#mergeCoreProviders(providers) {
|
|
16
|
-
return [
|
|
17
|
-
() => import("@adonisjs/core/providers/app_provider"),
|
|
18
|
-
() => import("@adonisjs/core/providers/hash_provider"),
|
|
19
|
-
() => import("@adonisjs/core/providers/repl_provider")
|
|
20
|
-
].concat(providers || []);
|
|
21
|
-
}
|
|
22
|
-
merge(params) {
|
|
23
|
-
if (params.config) this.#parameters.config = Object.assign(this.#parameters.config || {}, params.config);
|
|
24
|
-
if (params.rcFileContents) this.#parameters.rcFileContents = Object.assign(this.#parameters.rcFileContents || {}, params.rcFileContents);
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
withCoreProviders() {
|
|
28
|
-
this.#loadCoreProviders = true;
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
withCoreConfig() {
|
|
32
|
-
this.merge({ config: {
|
|
33
|
-
app: {
|
|
34
|
-
appUrl: "http://localhost:3333",
|
|
35
|
-
http: (0, main_exports.defineConfig)({})
|
|
36
|
-
},
|
|
37
|
-
validator: {},
|
|
38
|
-
encryption: defineConfig({
|
|
39
|
-
default: "gcm",
|
|
40
|
-
list: { gcm: drivers.aes256gcm({
|
|
41
|
-
id: "gcm",
|
|
42
|
-
keys: ["averylongrandomsecretkey"]
|
|
43
|
-
}) }
|
|
44
|
-
}),
|
|
45
|
-
bodyparser: (0, main_exports$1.defineConfig)({}),
|
|
46
|
-
hash: defineConfig$1({
|
|
47
|
-
default: "scrypt",
|
|
48
|
-
list: { scrypt: drivers$1.scrypt({}) }
|
|
49
|
-
}),
|
|
50
|
-
logger: (0, logger_exports.defineConfig)({
|
|
51
|
-
default: "app",
|
|
52
|
-
loggers: { app: {} }
|
|
53
|
-
})
|
|
54
|
-
} });
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
create(appRoot, options) {
|
|
58
|
-
return new Ignitor(appRoot, options).tap((app) => {
|
|
59
|
-
app.booted(async () => {
|
|
60
|
-
for (let action of this.#preloadActions) await action(app);
|
|
61
|
-
});
|
|
62
|
-
if (this.#loadCoreProviders) {
|
|
63
|
-
this.#parameters.rcFileContents = this.#parameters.rcFileContents || {};
|
|
64
|
-
this.#parameters.rcFileContents.providers = this.#mergeCoreProviders(this.#parameters.rcFileContents.providers);
|
|
65
|
-
}
|
|
66
|
-
this.#parameters.rcFileContents && app.rcContents(this.#parameters.rcFileContents);
|
|
67
|
-
this.#parameters.config && app.useConfig(this.#parameters.config);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
export { IgnitorFactory as t };
|
package/build/logger-DV65GX9N.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
|
-
import { destination } from "@adonisjs/logger";
|
|
3
|
-
var logger_exports = /* @__PURE__ */ __exportAll({ syncDestination: () => syncDestination });
|
|
4
|
-
import * as import__adonisjs_logger from "@adonisjs/logger";
|
|
5
|
-
__reExport(logger_exports, import__adonisjs_logger);
|
|
6
|
-
async function syncDestination(options) {
|
|
7
|
-
const { default: pinoPretty, isColorSupported } = await import("pino-pretty");
|
|
8
|
-
return isColorSupported ? pinoPretty({
|
|
9
|
-
...options,
|
|
10
|
-
sync: true
|
|
11
|
-
}) : destination(1);
|
|
12
|
-
}
|
|
13
|
-
export { syncDestination as n, logger_exports as t };
|
package/build/main-C2r_lzz0.js
DELETED
package/build/main-DOY5Q8Av.js
DELETED
package/build/repl-CwFmzJvr.js
DELETED
package/build/string-CJ7ewUFq.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import prettyHrTime from "pretty-hrtime";
|
|
2
|
-
import string from "@poppinss/utils/string";
|
|
3
|
-
import he from "he";
|
|
4
|
-
import StringBuilder from "@poppinss/utils/string_builder";
|
|
5
|
-
var string_default = {
|
|
6
|
-
...string,
|
|
7
|
-
toSentence: string.sentence,
|
|
8
|
-
ordinalize: string.ordinal,
|
|
9
|
-
generateRandom: string.random,
|
|
10
|
-
create(value) {
|
|
11
|
-
return new StringBuilder(value);
|
|
12
|
-
},
|
|
13
|
-
prettyHrTime(time, options) {
|
|
14
|
-
return prettyHrTime(time, options);
|
|
15
|
-
},
|
|
16
|
-
isEmpty(value) {
|
|
17
|
-
return value.trim().length === 0;
|
|
18
|
-
},
|
|
19
|
-
escapeHTML(value, options) {
|
|
20
|
-
value = he.escape(value);
|
|
21
|
-
if (options && options.encodeSymbols) value = this.encodeSymbols(value, { allowUnsafeSymbols: true });
|
|
22
|
-
return value;
|
|
23
|
-
},
|
|
24
|
-
encodeSymbols(value, options) {
|
|
25
|
-
return he.encode(value, options);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
export { string_default as t };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-DIF5Sg8W.js";
|
|
2
|
-
import { t as IgnitorFactory } from "./ignitor-B5akJVlQ.js";
|
|
3
|
-
import { t as TestUtils } from "./main-DjlqWWRt.js";
|
|
4
|
-
var TestUtilsFactory = class {
|
|
5
|
-
create(ignitorOrAppRoot, options) {
|
|
6
|
-
if (ignitorOrAppRoot instanceof Ignitor) return new TestUtils(ignitorOrAppRoot.createApp("test"));
|
|
7
|
-
return new TestUtils(new IgnitorFactory().withCoreConfig().withCoreProviders().create(ignitorOrAppRoot, options).createApp("console"));
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export { TestUtilsFactory as t };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import string from "@poppinss/utils/string";
|
|
2
|
-
import base64 from "@poppinss/utils/base64";
|
|
3
|
-
import { Secret, safeEqual } from "@poppinss/utils";
|
|
4
|
-
import { createHash } from "node:crypto";
|
|
5
|
-
var VerificationToken = class {
|
|
6
|
-
static decode(value) {
|
|
7
|
-
if (typeof value !== "string") return null;
|
|
8
|
-
if (!value) return null;
|
|
9
|
-
const [identifier, ...tokenValue] = value.split(".");
|
|
10
|
-
if (!identifier || tokenValue.length === 0) return null;
|
|
11
|
-
const decodedIdentifier = base64.urlDecode(identifier);
|
|
12
|
-
const decodedSecret = base64.urlDecode(tokenValue.join("."));
|
|
13
|
-
if (!decodedIdentifier || !decodedSecret) return null;
|
|
14
|
-
return {
|
|
15
|
-
identifier: decodedIdentifier,
|
|
16
|
-
secret: new Secret(decodedSecret)
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static createTransientToken(userId, size, expiresIn) {
|
|
20
|
-
const expiresAt = /* @__PURE__ */ new Date();
|
|
21
|
-
expiresAt.setSeconds(expiresAt.getSeconds() + string.seconds.parse(expiresIn));
|
|
22
|
-
return {
|
|
23
|
-
userId,
|
|
24
|
-
expiresAt,
|
|
25
|
-
...this.seed(size)
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
static seed(size) {
|
|
29
|
-
const secret = new Secret(string.random(size));
|
|
30
|
-
return {
|
|
31
|
-
secret,
|
|
32
|
-
hash: createHash("sha256").update(secret.release()).digest("hex")
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
computeValue(secret) {
|
|
36
|
-
this.value = new Secret(`${base64.urlEncode(String(this.identifier))}.${base64.urlEncode(secret.release())}`);
|
|
37
|
-
}
|
|
38
|
-
isExpired() {
|
|
39
|
-
return this.expiresAt < /* @__PURE__ */ new Date();
|
|
40
|
-
}
|
|
41
|
-
verify(secret) {
|
|
42
|
-
const newHash = createHash("sha256").update(secret.release()).digest("hex");
|
|
43
|
-
return safeEqual(this.hash, newHash);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export { VerificationToken as t };
|
package/build/vine-D37x2ex7.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import vine, { BaseLiteralType, symbols } from "@vinejs/vine";
|
|
2
|
-
const MULTIPART_FILE = symbols.SUBTYPE ?? Symbol.for("subtype");
|
|
3
|
-
function isBodyParserFile(file) {
|
|
4
|
-
return !!(file && typeof file === "object" && "isMultipartFile" in file);
|
|
5
|
-
}
|
|
6
|
-
const isMultipartFile = vine.createRule((file, options, field) => {
|
|
7
|
-
if (!field.isDefined) return false;
|
|
8
|
-
if (!isBodyParserFile(file)) {
|
|
9
|
-
field.report("The {{ field }} must be a file", "file", field);
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
const validationOptions = typeof options === "function" ? options(field) : options;
|
|
13
|
-
if (file.sizeLimit === void 0 && validationOptions.size) file.sizeLimit = validationOptions.size;
|
|
14
|
-
if (file.allowedExtensions === void 0 && validationOptions.extnames) file.allowedExtensions = validationOptions.extnames;
|
|
15
|
-
file.validate();
|
|
16
|
-
file.errors.forEach((error) => {
|
|
17
|
-
field.report(error.message, `file.${error.type}`, field, validationOptions);
|
|
18
|
-
});
|
|
19
|
-
return file.isValid;
|
|
20
|
-
});
|
|
21
|
-
var VineMultipartFile = class VineMultipartFile extends BaseLiteralType {
|
|
22
|
-
#validationOptions;
|
|
23
|
-
[MULTIPART_FILE] = "multipartFile";
|
|
24
|
-
constructor(validationOptions, options, validations) {
|
|
25
|
-
super(options, validations || []);
|
|
26
|
-
this.#validationOptions = validationOptions;
|
|
27
|
-
this.dataTypeValidator = isMultipartFile(validationOptions || {});
|
|
28
|
-
}
|
|
29
|
-
clone() {
|
|
30
|
-
return new VineMultipartFile(this.#validationOptions, this.cloneOptions(), this.cloneValidations());
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export { VineMultipartFile as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|