@adonisjs/core 7.0.0-next.15 → 7.0.0-next.17
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-CYvqhV0y.js → ace-B_ca3iIq.js} +2 -2
- package/build/app-DNvbxVWl.js +5 -0
- package/build/{chunk-MjwdjG2f.js → chunk-B88MteZI.js} +3 -9
- package/build/commands/add.js +5 -5
- package/build/config-Dd2H6-_e.js +5 -0
- package/build/container-uxa8LpGI.js +5 -0
- package/build/{core-BuRVIObK.js → core-C10-w2En.js} +3 -3
- package/build/{dumper-D29dE_xc.js → dumper-BTjb8j4y.js} +2 -2
- package/build/events-C4d0OPUI.js +5 -0
- package/build/factories/core/ace.js +9 -9
- package/build/factories/core/ignitor.js +8 -8
- package/build/factories/core/main.js +13 -13
- package/build/factories/core/test_utils.js +12 -12
- package/build/factories/stubs.js +5 -5
- package/build/{ignitor-BAHDhsmQ.js → ignitor-v-SSJ4yf.js} +10 -10
- package/build/index.js +5 -5
- package/build/{logger-C2asB8px.js → logger-0KKSqgPG.js} +4 -4
- package/build/{main-TtUIT86D.js → main-BU8NWUEG.js} +1 -1
- package/build/main-C4B2SPOT.js +5 -0
- package/build/{main-B3Y59dQ2.js → main-CZZ21eXm.js} +1 -1
- package/build/{main-BPDqyZic.js → main-D-WhqOOn.js} +4 -4
- package/build/main-DOY5Q8Av.js +5 -0
- package/build/{main-BA5_XHM0.js → main-nojlltNo.js} +4 -4
- package/build/modules/app.js +2 -2
- package/build/modules/bodyparser/main.js +2 -2
- package/build/modules/config.js +2 -2
- package/build/modules/container.js +2 -2
- package/build/modules/dumper/main.js +2 -2
- package/build/modules/encryption/define_config.d.ts +2 -2
- package/build/modules/events.js +2 -2
- package/build/modules/hash/main.js +2 -2
- package/build/modules/http/main.js +2 -2
- package/build/modules/logger.js +2 -2
- package/build/modules/repl.js +2 -2
- package/build/modules/transformers/main.js +2 -2
- package/build/providers/app_provider.js +8 -8
- package/build/providers/edge_provider.js +2 -2
- package/build/providers/hash_provider.js +2 -2
- package/build/providers/repl_provider.js +7 -2
- package/build/providers/vinejs_provider.js +2 -2
- package/build/repl-GSxgovJQ.js +5 -0
- package/build/services/url_builder.d.ts +3 -3
- package/build/src/assembler_hooks/index_entities.d.ts +29 -1
- package/build/src/test_utils/main.js +3 -3
- package/build/src/types.d.ts +27 -139
- package/build/{test_utils-DCaos98d.js → test_utils-Bzh73-NG.js} +3 -3
- package/build/types/encryption.d.ts +26 -0
- package/package.json +9 -9
- package/build/app-BK0PN3li.js +0 -5
- package/build/config-BwupGyeJ.js +0 -5
- package/build/container-ClFvcykQ.js +0 -5
- package/build/events-BW2flEef.js +0 -5
- package/build/main-CP75MhEW.js +0 -5
- package/build/main-OHZwVYZ4.js +0 -5
- package/build/repl-BF2TbFoO.js +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-
|
|
2
|
-
import { t as IgnitorFactory } from "./ignitor-
|
|
1
|
+
import { t as Ignitor } from "./main-CZZ21eXm.js";
|
|
2
|
+
import { t as IgnitorFactory } from "./ignitor-v-SSJ4yf.js";
|
|
3
3
|
import { t as createAceKernel } from "./create_kernel-Cpqqa931.js";
|
|
4
4
|
var AceFactory = class {
|
|
5
5
|
async make(ignitorOrAppRoot, options) {
|
|
@@ -3,7 +3,7 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var
|
|
6
|
+
var __exportAll = (all, symbols) => {
|
|
7
7
|
let target = {};
|
|
8
8
|
for (var name in all) __defProp(target, name, {
|
|
9
9
|
get: all[name],
|
|
@@ -22,11 +22,5 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
22
22
|
}
|
|
23
23
|
return to;
|
|
24
24
|
};
|
|
25
|
-
var __reExport = (target, mod, secondTarget,
|
|
26
|
-
|
|
27
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
28
|
-
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
29
|
-
}
|
|
30
|
-
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
31
|
-
};
|
|
32
|
-
export { __reExport as n, __export as t };
|
|
25
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
+
export { __reExport as n, __exportAll as t };
|
package/build/commands/add.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
2
|
import "../main-kn40V-hF.js";
|
|
3
|
-
import "../container-
|
|
3
|
+
import "../container-uxa8LpGI.js";
|
|
4
4
|
import "../config_provider-DWVFHOQX.js";
|
|
5
|
-
import "../main-
|
|
5
|
+
import "../main-CZZ21eXm.js";
|
|
6
6
|
import "../app-B6oge7b3.js";
|
|
7
|
-
import "../app-
|
|
7
|
+
import "../app-DNvbxVWl.js";
|
|
8
8
|
import "../string-Cx6q_win.js";
|
|
9
9
|
import "../utils-CtGytdtt.js";
|
|
10
|
-
import { n as prettyPrintError } from "../core-
|
|
10
|
+
import { n as prettyPrintError } from "../core-C10-w2En.js";
|
|
11
11
|
import { f as BaseCommand, l as flags, o as args } from "../main-BlJhxJJ2.js";
|
|
12
12
|
import { t as __decorate } from "../decorate-CJcHOoD-.js";
|
|
13
13
|
var Add = class extends BaseCommand {
|
|
@@ -41,7 +41,7 @@ function indexEntities(entities = {}) {
|
|
|
41
41
|
output: ".adonisjs/client/manifest.d.ts",
|
|
42
42
|
include: entities.manifest?.include ?? ["auth.ts"]
|
|
43
43
|
};
|
|
44
|
-
return { run(_, indexGenerator) {
|
|
44
|
+
return { run(_, __, indexGenerator) {
|
|
45
45
|
if (events.enabled) indexGenerator.add("events", {
|
|
46
46
|
source: events.source,
|
|
47
47
|
disableLazyImports: true,
|
|
@@ -74,7 +74,7 @@ function indexEntities(entities = {}) {
|
|
|
74
74
|
if (transformers.enabled) indexGenerator.add("transformers", {
|
|
75
75
|
source: transformers.source,
|
|
76
76
|
glob: transformers.glob,
|
|
77
|
-
as(vfs, buffer,
|
|
77
|
+
as(vfs, buffer, ___, helpers) {
|
|
78
78
|
outputTransformerDataObjects(vfs.asTree({
|
|
79
79
|
transformKey(key) {
|
|
80
80
|
let segments = key.split("/");
|
|
@@ -95,7 +95,7 @@ function indexEntities(entities = {}) {
|
|
|
95
95
|
if (!manifest.include?.length) return true;
|
|
96
96
|
return !!manifest.include.find((include) => filePath.endsWith(include));
|
|
97
97
|
},
|
|
98
|
-
as(vfs, buffer,
|
|
98
|
+
as(vfs, buffer, ___, helpers) {
|
|
99
99
|
const configFilesList = vfs.asList();
|
|
100
100
|
buffer.write(`/// <reference path="../../adonisrc.ts" />`);
|
|
101
101
|
Object.values(configFilesList).forEach((value) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
2
|
import { inspect } from "node:util";
|
|
3
3
|
import { Exception } from "@poppinss/utils/exception";
|
|
4
4
|
import useColors from "@poppinss/colors";
|
|
5
5
|
import { dump } from "@poppinss/dumper/console";
|
|
6
6
|
import { createScript, createStyleSheet, dump as dump$1 } from "@poppinss/dumper/html";
|
|
7
7
|
import { parse } from "error-stack-parser-es";
|
|
8
|
-
var errors_exports = /* @__PURE__ */
|
|
8
|
+
var errors_exports = /* @__PURE__ */ __exportAll({ E_DUMP_DIE_EXCEPTION: () => E_DUMP_DIE_EXCEPTION });
|
|
9
9
|
var DumpDieException = class extends Exception {
|
|
10
10
|
static status = 500;
|
|
11
11
|
static code = "E_DUMP_DIE_EXCEPTION";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
-
import "../../main-
|
|
3
|
+
import "../../main-CZZ21eXm.js";
|
|
4
4
|
import "../../app-B6oge7b3.js";
|
|
5
|
-
import "../../app-
|
|
5
|
+
import "../../app-DNvbxVWl.js";
|
|
6
6
|
import "../../main-BlJhxJJ2.js";
|
|
7
|
-
import "../../logger-
|
|
8
|
-
import "../../main-
|
|
7
|
+
import "../../logger-0KKSqgPG.js";
|
|
8
|
+
import "../../main-nojlltNo.js";
|
|
9
9
|
import "../../exceptions-DNMesP42.js";
|
|
10
10
|
import "../../define_config-BvoRgVYO.js";
|
|
11
|
-
import "../../main-
|
|
12
|
-
import "../../main-
|
|
13
|
-
import "../../ignitor-
|
|
11
|
+
import "../../main-D-WhqOOn.js";
|
|
12
|
+
import "../../main-DOY5Q8Av.js";
|
|
13
|
+
import "../../ignitor-v-SSJ4yf.js";
|
|
14
14
|
import "../../create_kernel-Cpqqa931.js";
|
|
15
|
-
import { t as AceFactory } from "../../ace-
|
|
15
|
+
import { t as AceFactory } from "../../ace-B_ca3iIq.js";
|
|
16
16
|
export { AceFactory };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
-
import "../../main-
|
|
3
|
+
import "../../main-CZZ21eXm.js";
|
|
4
4
|
import "../../app-B6oge7b3.js";
|
|
5
|
-
import "../../app-
|
|
6
|
-
import "../../logger-
|
|
7
|
-
import "../../main-
|
|
5
|
+
import "../../app-DNvbxVWl.js";
|
|
6
|
+
import "../../logger-0KKSqgPG.js";
|
|
7
|
+
import "../../main-nojlltNo.js";
|
|
8
8
|
import "../../exceptions-DNMesP42.js";
|
|
9
9
|
import "../../define_config-BvoRgVYO.js";
|
|
10
|
-
import "../../main-
|
|
11
|
-
import "../../main-
|
|
12
|
-
import { t as IgnitorFactory } from "../../ignitor-
|
|
10
|
+
import "../../main-D-WhqOOn.js";
|
|
11
|
+
import "../../main-DOY5Q8Av.js";
|
|
12
|
+
import { t as IgnitorFactory } from "../../ignitor-v-SSJ4yf.js";
|
|
13
13
|
export { IgnitorFactory };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../main-kn40V-hF.js";
|
|
3
|
-
import "../../container-
|
|
3
|
+
import "../../container-uxa8LpGI.js";
|
|
4
4
|
import "../../config_provider-DWVFHOQX.js";
|
|
5
|
-
import "../../main-
|
|
5
|
+
import "../../main-CZZ21eXm.js";
|
|
6
6
|
import "../../app-B6oge7b3.js";
|
|
7
|
-
import "../../app-
|
|
7
|
+
import "../../app-DNvbxVWl.js";
|
|
8
8
|
import "../../string-Cx6q_win.js";
|
|
9
9
|
import "../../utils-CtGytdtt.js";
|
|
10
|
-
import "../../core-
|
|
10
|
+
import "../../core-C10-w2En.js";
|
|
11
11
|
import "../../main-BlJhxJJ2.js";
|
|
12
|
-
import "../../logger-
|
|
13
|
-
import "../../main-
|
|
12
|
+
import "../../logger-0KKSqgPG.js";
|
|
13
|
+
import "../../main-nojlltNo.js";
|
|
14
14
|
import "../../exceptions-DNMesP42.js";
|
|
15
15
|
import "../../define_config-BvoRgVYO.js";
|
|
16
16
|
import "../../main-Bfnr5tAw.js";
|
|
17
|
-
import "../../main-
|
|
18
|
-
import "../../main-
|
|
19
|
-
import { t as IgnitorFactory } from "../../ignitor-
|
|
17
|
+
import "../../main-D-WhqOOn.js";
|
|
18
|
+
import "../../main-DOY5Q8Av.js";
|
|
19
|
+
import { t as IgnitorFactory } from "../../ignitor-v-SSJ4yf.js";
|
|
20
20
|
import "../../create_kernel-Cpqqa931.js";
|
|
21
|
-
import { t as AceFactory } from "../../ace-
|
|
22
|
-
import "../../main-
|
|
23
|
-
import { t as TestUtilsFactory } from "../../test_utils-
|
|
21
|
+
import { t as AceFactory } from "../../ace-B_ca3iIq.js";
|
|
22
|
+
import "../../main-BU8NWUEG.js";
|
|
23
|
+
import { t as TestUtilsFactory } from "../../test_utils-Bzh73-NG.js";
|
|
24
24
|
export { AceFactory, IgnitorFactory, TestUtilsFactory };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../main-kn40V-hF.js";
|
|
3
|
-
import "../../container-
|
|
3
|
+
import "../../container-uxa8LpGI.js";
|
|
4
4
|
import "../../config_provider-DWVFHOQX.js";
|
|
5
|
-
import "../../main-
|
|
5
|
+
import "../../main-CZZ21eXm.js";
|
|
6
6
|
import "../../app-B6oge7b3.js";
|
|
7
|
-
import "../../app-
|
|
7
|
+
import "../../app-DNvbxVWl.js";
|
|
8
8
|
import "../../string-Cx6q_win.js";
|
|
9
9
|
import "../../utils-CtGytdtt.js";
|
|
10
|
-
import "../../core-
|
|
11
|
-
import "../../logger-
|
|
12
|
-
import "../../main-
|
|
10
|
+
import "../../core-C10-w2En.js";
|
|
11
|
+
import "../../logger-0KKSqgPG.js";
|
|
12
|
+
import "../../main-nojlltNo.js";
|
|
13
13
|
import "../../exceptions-DNMesP42.js";
|
|
14
14
|
import "../../define_config-BvoRgVYO.js";
|
|
15
15
|
import "../../main-Bfnr5tAw.js";
|
|
16
|
-
import "../../main-
|
|
17
|
-
import "../../main-
|
|
18
|
-
import "../../ignitor-
|
|
19
|
-
import "../../main-
|
|
20
|
-
import { t as TestUtilsFactory } from "../../test_utils-
|
|
16
|
+
import "../../main-D-WhqOOn.js";
|
|
17
|
+
import "../../main-DOY5Q8Av.js";
|
|
18
|
+
import "../../ignitor-v-SSJ4yf.js";
|
|
19
|
+
import "../../main-BU8NWUEG.js";
|
|
20
|
+
import { t as TestUtilsFactory } from "../../test_utils-Bzh73-NG.js";
|
|
21
21
|
export { TestUtilsFactory };
|
package/build/factories/stubs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
2
|
import { t as stubsRoot } from "../main-kn40V-hF.js";
|
|
3
|
-
import "../container-
|
|
3
|
+
import "../container-uxa8LpGI.js";
|
|
4
4
|
import "../config_provider-DWVFHOQX.js";
|
|
5
|
-
import "../main-
|
|
5
|
+
import "../main-CZZ21eXm.js";
|
|
6
6
|
import "../app-B6oge7b3.js";
|
|
7
|
-
import "../app-
|
|
7
|
+
import "../app-DNvbxVWl.js";
|
|
8
8
|
import "../string-Cx6q_win.js";
|
|
9
9
|
import "../utils-CtGytdtt.js";
|
|
10
|
-
import "../core-
|
|
10
|
+
import "../core-C10-w2En.js";
|
|
11
11
|
import { AppFactory } from "@adonisjs/application/factories";
|
|
12
12
|
var StubsFactory = class {
|
|
13
13
|
#parameters = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-
|
|
2
|
-
import { t as logger_exports } from "./logger-
|
|
3
|
-
import { t as main_exports } from "./main-
|
|
4
|
-
import { n as drivers
|
|
5
|
-
import { n as defineConfig, r as drivers } from "./main-
|
|
6
|
-
import { t as main_exports$1 } from "./main-
|
|
1
|
+
import { t as Ignitor } from "./main-CZZ21eXm.js";
|
|
2
|
+
import { t as logger_exports } from "./logger-0KKSqgPG.js";
|
|
3
|
+
import { t as main_exports } from "./main-nojlltNo.js";
|
|
4
|
+
import { n as drivers, t as defineConfig } from "./define_config-BvoRgVYO.js";
|
|
5
|
+
import { n as defineConfig$1, r as drivers$1 } from "./main-D-WhqOOn.js";
|
|
6
|
+
import { t as main_exports$1 } from "./main-DOY5Q8Av.js";
|
|
7
7
|
var IgnitorFactory = class {
|
|
8
8
|
#preloadActions = [];
|
|
9
9
|
#parameters = {};
|
|
@@ -35,17 +35,17 @@ var IgnitorFactory = class {
|
|
|
35
35
|
http: (0, main_exports.defineConfig)({})
|
|
36
36
|
},
|
|
37
37
|
validator: {},
|
|
38
|
-
encryption: defineConfig
|
|
38
|
+
encryption: defineConfig({
|
|
39
39
|
default: "gcm",
|
|
40
|
-
list: { gcm: drivers
|
|
40
|
+
list: { gcm: drivers.aes256gcm({
|
|
41
41
|
id: "gcm",
|
|
42
42
|
keys: ["averylongrandomsecretkey"]
|
|
43
43
|
}) }
|
|
44
44
|
}),
|
|
45
45
|
bodyparser: (0, main_exports$1.defineConfig)({}),
|
|
46
|
-
hash: defineConfig({
|
|
46
|
+
hash: defineConfig$1({
|
|
47
47
|
default: "scrypt",
|
|
48
|
-
list: { scrypt: drivers.scrypt({}) }
|
|
48
|
+
list: { scrypt: drivers$1.scrypt({}) }
|
|
49
49
|
}),
|
|
50
50
|
logger: (0, logger_exports.defineConfig)({
|
|
51
51
|
default: "app",
|
package/build/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-B88MteZI.js";
|
|
2
2
|
import { t as stubsRoot } from "./main-kn40V-hF.js";
|
|
3
|
-
import { t as container_exports } from "./container-
|
|
3
|
+
import { t as container_exports } from "./container-uxa8LpGI.js";
|
|
4
4
|
import { t as configProvider } from "./config_provider-DWVFHOQX.js";
|
|
5
|
-
import { t as Ignitor } from "./main-
|
|
5
|
+
import { t as Ignitor } from "./main-CZZ21eXm.js";
|
|
6
6
|
import "./app-B6oge7b3.js";
|
|
7
|
-
import "./app-
|
|
7
|
+
import "./app-DNvbxVWl.js";
|
|
8
8
|
import "./string-Cx6q_win.js";
|
|
9
9
|
import "./utils-CtGytdtt.js";
|
|
10
|
-
import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-
|
|
10
|
+
import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-C10-w2En.js";
|
|
11
11
|
var inject = container_exports.inject;
|
|
12
12
|
export { Ignitor, configProvider, errors, indexEntities, inject, prettyPrintError, stubsRoot };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __reExport, t as
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
2
|
import { destination } from "@adonisjs/logger";
|
|
3
|
-
var logger_exports = /* @__PURE__ */
|
|
4
|
-
import * as
|
|
5
|
-
__reExport(logger_exports,
|
|
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
6
|
async function syncDestination(options) {
|
|
7
7
|
const { default: pinoPretty, isColorSupported } = await import("pino-pretty");
|
|
8
8
|
return isColorSupported ? pinoPretty({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as debug_default } from "./config_provider-DWVFHOQX.js";
|
|
2
|
-
import { t as main_exports } from "./main-
|
|
2
|
+
import { t as main_exports } from "./main-nojlltNo.js";
|
|
3
3
|
import { n as Encryption } from "./main-Bfnr5tAw.js";
|
|
4
4
|
import { IncomingMessage, ServerResponse, createServer } from "node:http";
|
|
5
5
|
import { Socket } from "node:net";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as debug_default } from "./config_provider-DWVFHOQX.js";
|
|
2
2
|
import { n as setApp } from "./app-B6oge7b3.js";
|
|
3
|
-
import { t as app_exports } from "./app-
|
|
3
|
+
import { t as app_exports } from "./app-DNvbxVWl.js";
|
|
4
4
|
import { createServer } from "node:http";
|
|
5
5
|
var AceProcess = class {
|
|
6
6
|
#ignitor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as __reExport, t as
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
2
|
import { n as debug_default, t as configProvider } from "./config_provider-DWVFHOQX.js";
|
|
3
3
|
import { InvalidArgumentsException } from "@poppinss/utils/exception";
|
|
4
4
|
function defineConfig(config) {
|
|
@@ -42,10 +42,10 @@ const drivers = {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
var main_exports = /* @__PURE__ */
|
|
45
|
+
var main_exports = /* @__PURE__ */ __exportAll({
|
|
46
46
|
defineConfig: () => defineConfig,
|
|
47
47
|
drivers: () => drivers
|
|
48
48
|
});
|
|
49
|
-
import * as
|
|
50
|
-
__reExport(main_exports,
|
|
49
|
+
import * as import__adonisjs_hash from "@adonisjs/hash";
|
|
50
|
+
__reExport(main_exports, import__adonisjs_hash);
|
|
51
51
|
export { defineConfig as n, drivers as r, main_exports as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as __reExport, t as
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-B88MteZI.js";
|
|
2
2
|
import "@adonisjs/bodyparser";
|
|
3
3
|
var RequestValidator = class RequestValidator {
|
|
4
4
|
#ctx;
|
|
@@ -24,7 +24,7 @@ var RequestValidator = class RequestValidator {
|
|
|
24
24
|
return validator.validate(data, validatorOptions);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
var main_exports = /* @__PURE__ */
|
|
28
|
-
import * as
|
|
29
|
-
__reExport(main_exports,
|
|
27
|
+
var main_exports = /* @__PURE__ */ __exportAll({ RequestValidator: () => RequestValidator });
|
|
28
|
+
import * as import__adonisjs_http_server from "@adonisjs/http-server";
|
|
29
|
+
__reExport(main_exports, import__adonisjs_http_server);
|
|
30
30
|
export { RequestValidator as n, main_exports as t };
|
package/build/modules/app.js
CHANGED
package/build/modules/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import { n as errors_exports, t as Dumper } from "../../dumper-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
|
+
import { n as errors_exports, t as Dumper } from "../../dumper-BTjb8j4y.js";
|
|
3
3
|
function defineConfig(dumperConfig) {
|
|
4
4
|
return dumperConfig;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type AES256CBCDriverConfig, type AES256GCMDriverConfig, type ChaCha20Poly1305DriverConfig } from '../../types/encryption.ts';
|
|
1
|
+
import { type ConfigProvider } from '../../src/types.ts';
|
|
2
|
+
import { type EncryptionConfig, type AES256CBCDriverConfig, type AES256GCMDriverConfig, type ChaCha20Poly1305DriverConfig } from '../../types/encryption.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Resolved configuration from the config provider that will be
|
|
5
5
|
* accepted by the encryption manager.
|
package/build/modules/events.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
-
import { n as defineConfig, r as drivers } from "../../main-
|
|
3
|
+
import { n as defineConfig, r as drivers } from "../../main-D-WhqOOn.js";
|
|
4
4
|
export * from "@adonisjs/hash";
|
|
5
5
|
export { defineConfig, drivers };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import { n as RequestValidator } from "../../main-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
|
+
import { n as RequestValidator } from "../../main-nojlltNo.js";
|
|
3
3
|
export * from "@adonisjs/http-server";
|
|
4
4
|
export { RequestValidator };
|
package/build/modules/logger.js
CHANGED
package/build/modules/repl.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
2
|
import { t as configProvider } from "../config_provider-DWVFHOQX.js";
|
|
3
|
-
import { t as app_exports } from "../app-
|
|
4
|
-
import { t as config_exports } from "../config-
|
|
5
|
-
import { t as events_exports } from "../events-
|
|
6
|
-
import { t as logger_exports } from "../logger-
|
|
7
|
-
import { t as Dumper } from "../dumper-
|
|
8
|
-
import { t as main_exports } from "../main-
|
|
3
|
+
import { t as app_exports } from "../app-DNvbxVWl.js";
|
|
4
|
+
import { t as config_exports } from "../config-Dd2H6-_e.js";
|
|
5
|
+
import { t as events_exports } from "../events-C4d0OPUI.js";
|
|
6
|
+
import { t as logger_exports } from "../logger-0KKSqgPG.js";
|
|
7
|
+
import { t as Dumper } from "../dumper-BTjb8j4y.js";
|
|
8
|
+
import { t as main_exports } from "../main-nojlltNo.js";
|
|
9
9
|
import { r as RuntimeException } from "../exceptions-DNMesP42.js";
|
|
10
10
|
import "../define_config-BvoRgVYO.js";
|
|
11
11
|
import { n as Encryption } from "../main-Bfnr5tAw.js";
|
|
12
|
-
import { t as main_exports$1 } from "../main-
|
|
12
|
+
import { t as main_exports$1 } from "../main-C4B2SPOT.js";
|
|
13
13
|
import { t as bodyparser_middleware_default } from "../bodyparser_middleware-BmARtnYe.js";
|
|
14
14
|
import { dirname } from "node:path";
|
|
15
15
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as main_exports } from "../main-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
|
+
import { t as main_exports } from "../main-nojlltNo.js";
|
|
3
3
|
import { t as pluginEdgeDumper } from "../edge-BVYR-Vjr.js";
|
|
4
4
|
import edge from "edge.js";
|
|
5
5
|
var EdgeServiceProvider = class {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
2
|
import { t as configProvider } from "../config_provider-DWVFHOQX.js";
|
|
3
|
-
import { t as main_exports } from "../main-
|
|
3
|
+
import { t as main_exports } from "../main-D-WhqOOn.js";
|
|
4
4
|
import { RuntimeException } from "@poppinss/utils/exception";
|
|
5
5
|
var HashServiceProvider = class {
|
|
6
6
|
constructor(app) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { t as repl_exports } from "../repl-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
|
+
import { t as repl_exports } from "../repl-GSxgovJQ.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { fsImportAll } from "@poppinss/utils/fs";
|
|
@@ -57,6 +57,11 @@ var ReplServiceProvider = class {
|
|
|
57
57
|
};
|
|
58
58
|
repl.notify(`Loaded "helpers" module. You can access it using the "${repl.colors.underline("helpers")}" variable`);
|
|
59
59
|
}, { description: "Load \"helpers\" module in the REPL context" });
|
|
60
|
+
repl.addMethod("loadUrlBuilder", async () => {
|
|
61
|
+
const router = await this.app.container.make("router");
|
|
62
|
+
repl.server.context.urlBuilder = router.urlBuilder;
|
|
63
|
+
repl.notify(`Loaded "urlBuilder" service. You can access it using the "${repl.colors.underline("urlBuilder")}" variable`);
|
|
64
|
+
}, { description: "Load \"urlBuilder\" service in the REPL context" });
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
67
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import { n as RequestValidator, t as main_exports } from "../main-
|
|
1
|
+
import "../chunk-B88MteZI.js";
|
|
2
|
+
import { n as RequestValidator, t as main_exports } from "../main-nojlltNo.js";
|
|
3
3
|
import { t as VineMultipartFile } from "../vine-DGint2rk.js";
|
|
4
4
|
import { Vine } from "@vinejs/vine";
|
|
5
5
|
var VineJSServiceProvider = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare let urlFor:
|
|
3
|
-
declare let signedUrlFor:
|
|
1
|
+
import type { UrlBuilderSignedUrlFor, UrlBuilderUrlFor } from '../src/types.ts';
|
|
2
|
+
declare let urlFor: UrlBuilderUrlFor;
|
|
3
|
+
declare let signedUrlFor: UrlBuilderSignedUrlFor;
|
|
4
4
|
export { urlFor, signedUrlFor };
|
|
@@ -33,5 +33,33 @@ import { type IndexEntitiesConfig } from '../types.ts';
|
|
|
33
33
|
* })
|
|
34
34
|
*/
|
|
35
35
|
export declare function indexEntities(entities?: IndexEntitiesConfig): {
|
|
36
|
-
run(_: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler,
|
|
36
|
+
run(_: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, __: import("@poppinss/hooks").default<{
|
|
37
|
+
init: [[parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, hooks: import("@poppinss/hooks").default</*elided*/ any>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator], [parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner | import("@adonisjs/assembler").Bundler, hooks: import("@poppinss/hooks").default</*elided*/ any>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator]];
|
|
38
|
+
fileChanged: [[relativePath: string, absolutePath: string, info: {
|
|
39
|
+
source: "hot-hook" | "watcher";
|
|
40
|
+
hotReloaded: boolean;
|
|
41
|
+
fullReload: boolean;
|
|
42
|
+
}, parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, info: {
|
|
43
|
+
source: "hot-hook" | "watcher";
|
|
44
|
+
hotReloaded: boolean;
|
|
45
|
+
fullReload: boolean;
|
|
46
|
+
}, parent: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
47
|
+
fileAdded: [[relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
48
|
+
fileRemoved: [[relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner], [relativePath: string, absolutePath: string, server: import("@adonisjs/assembler").DevServer | import("@adonisjs/assembler").TestRunner]];
|
|
49
|
+
devServerStarting: [[server: import("@adonisjs/assembler").DevServer], [server: import("@adonisjs/assembler").DevServer]];
|
|
50
|
+
devServerStarted: [[server: import("@adonisjs/assembler").DevServer, info: {
|
|
51
|
+
port: number;
|
|
52
|
+
host: string;
|
|
53
|
+
}, uiInstructions: import("@poppinss/cliui").Instructions], [server: import("@adonisjs/assembler").DevServer, info: {
|
|
54
|
+
port: number;
|
|
55
|
+
host: string;
|
|
56
|
+
}, uiInstructions: import("@poppinss/cliui").Instructions]];
|
|
57
|
+
buildStarting: [[server: import("@adonisjs/assembler").Bundler], [server: import("@adonisjs/assembler").Bundler]];
|
|
58
|
+
buildFinished: [[server: import("@adonisjs/assembler").Bundler, uiInstructions: import("@poppinss/cliui").Instructions], [server: import("@adonisjs/assembler").Bundler, uiInstructions: import("@poppinss/cliui").Instructions]];
|
|
59
|
+
testsStarting: [[server: import("@adonisjs/assembler").TestRunner], [server: import("@adonisjs/assembler").TestRunner]];
|
|
60
|
+
testsFinished: [[server: import("@adonisjs/assembler").TestRunner], [server: import("@adonisjs/assembler").TestRunner]];
|
|
61
|
+
routesCommitted: [[parent: import("@adonisjs/assembler").DevServer, routes: Record<string, import("@adonisjs/assembler/types").RoutesListItem[]>], [parent: import("@adonisjs/assembler").DevServer, routes: Record<string, import("@adonisjs/assembler/types").RoutesListItem[]>]];
|
|
62
|
+
routesScanning: [[parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner], [parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner]];
|
|
63
|
+
routesScanned: [[parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner], [parent: import("@adonisjs/assembler").DevServer, routesScanner: import("@adonisjs/assembler/routes_scanner").RoutesScanner]];
|
|
64
|
+
}>, indexGenerator: import("@adonisjs/assembler/index_generator").IndexGenerator): void;
|
|
37
65
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-B88MteZI.js";
|
|
2
2
|
import "../../config_provider-DWVFHOQX.js";
|
|
3
|
-
import "../../main-
|
|
3
|
+
import "../../main-nojlltNo.js";
|
|
4
4
|
import "../../exceptions-DNMesP42.js";
|
|
5
5
|
import "../../define_config-BvoRgVYO.js";
|
|
6
6
|
import "../../main-Bfnr5tAw.js";
|
|
7
|
-
import { t as TestUtils } from "../../main-
|
|
7
|
+
import { t as TestUtils } from "../../main-BU8NWUEG.js";
|
|
8
8
|
export { TestUtils };
|
package/build/src/types.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ import type { LoggerManager } from '../modules/logger.ts';
|
|
|
10
10
|
import type { HashManager } from '../modules/hash/main.ts';
|
|
11
11
|
import type { ManagerDriverFactory } from '../types/hash.ts';
|
|
12
12
|
import type { Router, Server } from '../modules/http/main.ts';
|
|
13
|
+
import { type EncryptionConfig } from '../types/encryption.ts';
|
|
13
14
|
import type { EncryptionManager } from '../modules/encryption/main.ts';
|
|
14
15
|
import type { ContainerResolveEventData } from '../types/container.ts';
|
|
15
16
|
import type { LoggerConfig, LoggerManagerConfig } from '../types/logger.ts';
|
|
16
|
-
import { type EncryptionDriverContract } from '../types/encryption.ts';
|
|
17
17
|
/**
|
|
18
18
|
* A config provider waits for the application to get booted
|
|
19
19
|
* and then resolves the config. It receives an instance
|
|
@@ -120,6 +120,30 @@ export interface HashersList {
|
|
|
120
120
|
export type InferHashers<T extends ConfigProvider<{
|
|
121
121
|
list: Record<string, ManagerDriverFactory>;
|
|
122
122
|
}>> = Awaited<ReturnType<T['resolver']>>['list'];
|
|
123
|
+
/**
|
|
124
|
+
* A list of known encryptors inferred from the user config.
|
|
125
|
+
* This interface should be extended in user code to register
|
|
126
|
+
* custom encryptors.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* // Extending EncryptorsList in user code
|
|
130
|
+
* declare module '@adonisjs/core' {
|
|
131
|
+
* interface EncryptorsList {
|
|
132
|
+
* default: EncryptionConfig
|
|
133
|
+
* secondary: EncryptionConfig
|
|
134
|
+
* }
|
|
135
|
+
* }
|
|
136
|
+
*/
|
|
137
|
+
export interface EncryptorsList {
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Utility type to infer encryptors configurations from a config provider.
|
|
141
|
+
*
|
|
142
|
+
* @template T - The config provider type that resolves to an object with a 'list' property
|
|
143
|
+
*/
|
|
144
|
+
export type InferEncryptors<T extends ConfigProvider<{
|
|
145
|
+
list: Record<string, EncryptionConfig>;
|
|
146
|
+
}>> = Awaited<ReturnType<T['resolver']>>['list'];
|
|
123
147
|
/**
|
|
124
148
|
* ----------------------------------------------------------------
|
|
125
149
|
* Container services
|
|
@@ -133,105 +157,25 @@ export type InferHashers<T extends ConfigProvider<{
|
|
|
133
157
|
* Application service is a singleton resolved from
|
|
134
158
|
* the container. It provides access to the core application
|
|
135
159
|
* instance with all registered bindings.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* // Accessing application service in a controller
|
|
139
|
-
* export default class HomeController {
|
|
140
|
-
* async index({ app }: { app: ApplicationService }) {
|
|
141
|
-
* const version = app.version
|
|
142
|
-
* const env = app.env.get('NODE_ENV')
|
|
143
|
-
* }
|
|
144
|
-
* }
|
|
145
160
|
*/
|
|
146
161
|
export interface ApplicationService extends Application<ContainerBindings extends Record<any, any> ? ContainerBindings : never> {
|
|
147
162
|
}
|
|
148
163
|
/**
|
|
149
164
|
* Logger service is a singleton logger instance registered
|
|
150
165
|
* to the container. It provides access to configured loggers.
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* // Using logger service in a controller
|
|
154
|
-
* export default class UserController {
|
|
155
|
-
* async store({ logger }: { logger: LoggerService }) {
|
|
156
|
-
* logger.info('Creating new user')
|
|
157
|
-
* logger.use('file').error('Failed to create user')
|
|
158
|
-
* }
|
|
159
|
-
* }
|
|
160
166
|
*/
|
|
161
167
|
export interface LoggerService extends LoggerManager<LoggersList extends Record<string, LoggerConfig> ? LoggersList : never> {
|
|
162
168
|
}
|
|
163
169
|
/**
|
|
164
170
|
* Emitter service is a singleton emitter instance registered
|
|
165
171
|
* to the container. It provides type-safe event emission and listening.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* // Using emitter service to emit events
|
|
169
|
-
* export default class UserController {
|
|
170
|
-
* async store({ emitter }: { emitter: EmitterService }) {
|
|
171
|
-
* const user = await User.create(data)
|
|
172
|
-
* emitter.emit('user:created', { user })
|
|
173
|
-
* }
|
|
174
|
-
* }
|
|
175
172
|
*/
|
|
176
173
|
export interface EmitterService extends Emitter<EventsList> {
|
|
177
174
|
}
|
|
178
|
-
/**
|
|
179
|
-
* A list of known encryptors inferred from the user config.
|
|
180
|
-
* This interface should be extended in user code to register
|
|
181
|
-
* custom encryptors.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* // Extending EncryptorsList in user code
|
|
185
|
-
* declare module '@adonisjs/core' {
|
|
186
|
-
* interface EncryptorsList {
|
|
187
|
-
* default: EncryptionConfig
|
|
188
|
-
* secondary: EncryptionConfig
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
*/
|
|
192
|
-
export interface EncryptorsList {
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Configuration object for encryption drivers. Defines how encryption
|
|
196
|
-
* and decryption should be performed with support for key rotation.
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* const config: EncryptionConfig = {
|
|
200
|
-
* driver: (key) => new SecureEncryptor(key),
|
|
201
|
-
* keys: [
|
|
202
|
-
* 'new-encryption-key', // Used for encryption
|
|
203
|
-
* 'old-encryption-key' // Used only for decryption
|
|
204
|
-
* ]
|
|
205
|
-
* }
|
|
206
|
-
*/
|
|
207
|
-
export interface EncryptionConfig {
|
|
208
|
-
/**
|
|
209
|
-
* Factory function that creates a driver instance for a given key
|
|
210
|
-
* @param key - The encryption key to use
|
|
211
|
-
*/
|
|
212
|
-
driver: (key: string) => EncryptionDriverContract;
|
|
213
|
-
/**
|
|
214
|
-
* List of keys to use for encryption/decryption.
|
|
215
|
-
* The first key is used for encryption, all keys are tried for decryption.
|
|
216
|
-
*/
|
|
217
|
-
keys: string[];
|
|
218
|
-
}
|
|
219
175
|
/**
|
|
220
176
|
* Encryption service is a singleton instance of the EncryptionManager
|
|
221
177
|
* registered in the container. It provides encryption and decryption
|
|
222
178
|
* functionality with support for multiple encryptors.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
* // Using encryption service in a controller
|
|
226
|
-
* export default class TokenController {
|
|
227
|
-
* async generate({ encryption }: { encryption: EncryptionService }) {
|
|
228
|
-
* const encrypted = encryption.encrypt('sensitive-data')
|
|
229
|
-
* const decrypted = encryption.decrypt(encrypted)
|
|
230
|
-
*
|
|
231
|
-
* // Using a specific encryptor
|
|
232
|
-
* const secondaryEncrypted = encryption.use('secondary').encrypt('data')
|
|
233
|
-
* }
|
|
234
|
-
* }
|
|
235
179
|
*/
|
|
236
180
|
export interface EncryptionService extends EncryptionManager<EncryptorsList extends Record<string, EncryptionConfig> ? EncryptorsList : never> {
|
|
237
181
|
}
|
|
@@ -239,15 +183,6 @@ export interface EncryptionService extends EncryptionManager<EncryptorsList exte
|
|
|
239
183
|
* Http server service added to the container as a singleton.
|
|
240
184
|
* It provides access to the HTTP server instance for handling
|
|
241
185
|
* requests and responses.
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* // Accessing server service in middleware
|
|
245
|
-
* export default class CustomMiddleware {
|
|
246
|
-
* async handle({ server }: { server: HttpServerService }, next: NextFn) {
|
|
247
|
-
* console.log('Server listening on:', server.getPort())
|
|
248
|
-
* return next()
|
|
249
|
-
* }
|
|
250
|
-
* }
|
|
251
186
|
*/
|
|
252
187
|
export interface HttpServerService extends Server {
|
|
253
188
|
}
|
|
@@ -255,14 +190,6 @@ export interface HttpServerService extends Server {
|
|
|
255
190
|
* Http router service added to the container as a singleton.
|
|
256
191
|
* It provides access to the application's router for defining
|
|
257
192
|
* and managing routes.
|
|
258
|
-
*
|
|
259
|
-
* @example
|
|
260
|
-
* // Using router service to define routes programmatically
|
|
261
|
-
* export default class RouteProvider {
|
|
262
|
-
* boot({ router }: { router: HttpRouterService }) {
|
|
263
|
-
* router.get('/api/health', () => ({ status: 'ok' }))
|
|
264
|
-
* }
|
|
265
|
-
* }
|
|
266
193
|
*/
|
|
267
194
|
export interface HttpRouterService extends Router {
|
|
268
195
|
}
|
|
@@ -270,49 +197,20 @@ export interface HttpRouterService extends Router {
|
|
|
270
197
|
* Url builder service offers a type-safe API for creating URLs
|
|
271
198
|
* for pre-registered routes. It ensures type safety when building
|
|
272
199
|
* URLs with parameters.
|
|
273
|
-
*
|
|
274
|
-
* @example
|
|
275
|
-
* // Using URL builder service
|
|
276
|
-
* export default class PostController {
|
|
277
|
-
* async show({ urlBuilder }: { urlBuilder: UrlBuilderService }) {
|
|
278
|
-
* const postUrl = urlBuilder.make('posts.show', { id: 1 })
|
|
279
|
-
* const userUrl = urlBuilder.make('users.profile', { username: 'john' })
|
|
280
|
-
* }
|
|
281
|
-
* }
|
|
282
200
|
*/
|
|
283
|
-
export interface
|
|
201
|
+
export interface UrlBuilderUrlFor extends UrlFor<RoutesList extends LookupList ? RoutesList : never, URLOptions> {
|
|
284
202
|
}
|
|
285
203
|
/**
|
|
286
204
|
* Url builder service offers a type-safe API for creating signed URLs
|
|
287
205
|
* for pre-registered routes. Signed URLs include a signature that prevents
|
|
288
206
|
* tampering and can have expiration times.
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* // Using signed URL builder service
|
|
292
|
-
* export default class FileController {
|
|
293
|
-
* async getDownloadUrl({ signedUrlBuilder }: { signedUrlBuilder: SignedUrlBuilderService }) {
|
|
294
|
-
* const signedUrl = signedUrlBuilder.make('files.download',
|
|
295
|
-
* { id: 1 },
|
|
296
|
-
* { expiresIn: '1h' }
|
|
297
|
-
* )
|
|
298
|
-
* }
|
|
299
|
-
* }
|
|
300
207
|
*/
|
|
301
|
-
export interface
|
|
208
|
+
export interface UrlBuilderSignedUrlFor extends UrlFor<RoutesList extends LookupList ? RoutesList : never, SignedURLOptions> {
|
|
302
209
|
}
|
|
303
210
|
/**
|
|
304
211
|
* Hash service is a singleton instance of the HashManager
|
|
305
212
|
* registered in the container. It provides password hashing
|
|
306
213
|
* and verification functionality.
|
|
307
|
-
*
|
|
308
|
-
* @example
|
|
309
|
-
* // Using hash service for password management
|
|
310
|
-
* export default class AuthController {
|
|
311
|
-
* async register({ hash }: { hash: HashService }) {
|
|
312
|
-
* const hashedPassword = await hash.make('user-password')
|
|
313
|
-
* const isValid = await hash.verify(hashedPassword, 'user-password')
|
|
314
|
-
* }
|
|
315
|
-
* }
|
|
316
214
|
*/
|
|
317
215
|
export interface HashService extends HashManager<HashersList extends Record<string, ManagerDriverFactory> ? HashersList : never> {
|
|
318
216
|
}
|
|
@@ -320,16 +218,6 @@ export interface HashService extends HashManager<HashersList extends Record<stri
|
|
|
320
218
|
* A list of known container bindings. This interface defines
|
|
321
219
|
* all the services that are registered in the IoC container
|
|
322
220
|
* and available for dependency injection.
|
|
323
|
-
*
|
|
324
|
-
* @example
|
|
325
|
-
* // Accessing container bindings in a service
|
|
326
|
-
* export default class UserService {
|
|
327
|
-
* constructor(
|
|
328
|
-
* private logger: LoggerService,
|
|
329
|
-
* private hash: HashService,
|
|
330
|
-
* private emitter: EmitterService
|
|
331
|
-
* ) {}
|
|
332
|
-
* }
|
|
333
221
|
*/
|
|
334
222
|
export interface ContainerBindings {
|
|
335
223
|
/** Ace command-line kernel */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Ignitor } from "./main-
|
|
2
|
-
import { t as IgnitorFactory } from "./ignitor-
|
|
3
|
-
import { t as TestUtils } from "./main-
|
|
1
|
+
import { t as Ignitor } from "./main-CZZ21eXm.js";
|
|
2
|
+
import { t as IgnitorFactory } from "./ignitor-v-SSJ4yf.js";
|
|
3
|
+
import { t as TestUtils } from "./main-BU8NWUEG.js";
|
|
4
4
|
var TestUtilsFactory = class {
|
|
5
5
|
create(ignitorOrAppRoot, options) {
|
|
6
6
|
if (ignitorOrAppRoot instanceof Ignitor) return new TestUtils(ignitorOrAppRoot.createApp("test"));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EncryptionDriverContract } from '@boringnode/encryption/types';
|
|
1
2
|
/**
|
|
2
3
|
* Contract that all encryption drivers must implement.
|
|
3
4
|
*
|
|
@@ -37,3 +38,28 @@ export type { AES256GCMDriverConfig } from '@boringnode/encryption/drivers/aes_2
|
|
|
37
38
|
* for decryption (allowing for key rotation).
|
|
38
39
|
*/
|
|
39
40
|
export type { ChaCha20Poly1305DriverConfig } from '@boringnode/encryption/drivers/chacha20_poly1305';
|
|
41
|
+
/**
|
|
42
|
+
* Configuration object for encryption drivers. Defines how encryption
|
|
43
|
+
* and decryption should be performed with support for key rotation.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const config: EncryptionConfig = {
|
|
47
|
+
* driver: (key) => new SecureEncryptor(key),
|
|
48
|
+
* keys: [
|
|
49
|
+
* 'new-encryption-key', // Used for encryption
|
|
50
|
+
* 'old-encryption-key' // Used only for decryption
|
|
51
|
+
* ]
|
|
52
|
+
* }
|
|
53
|
+
*/
|
|
54
|
+
export interface EncryptionConfig {
|
|
55
|
+
/**
|
|
56
|
+
* Factory function that creates a driver instance for a given key
|
|
57
|
+
* @param key - The encryption key to use
|
|
58
|
+
*/
|
|
59
|
+
driver: (key: string) => EncryptionDriverContract;
|
|
60
|
+
/**
|
|
61
|
+
* List of keys to use for encryption/decryption.
|
|
62
|
+
* The first key is used for encryption, all keys are tried for decryption.
|
|
63
|
+
*/
|
|
64
|
+
keys: string[];
|
|
65
|
+
}
|
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.17",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
7
7
|
},
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"@japa/runner": "^5.0.0",
|
|
91
91
|
"@japa/snapshot": "^2.0.10",
|
|
92
92
|
"@poppinss/ts-exec": "^1.4.1",
|
|
93
|
-
"@release-it/conventional-changelog": "^10.0.
|
|
94
|
-
"@types/node": "^25.0.
|
|
93
|
+
"@release-it/conventional-changelog": "^10.0.4",
|
|
94
|
+
"@types/node": "^25.0.3",
|
|
95
95
|
"@types/pretty-hrtime": "^1.0.3",
|
|
96
96
|
"@types/sinon": "^21.0.0",
|
|
97
97
|
"@types/supertest": "^6.0.3",
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
"get-port": "^7.1.0",
|
|
110
110
|
"pino-pretty": "^13.1.3",
|
|
111
111
|
"prettier": "^3.7.4",
|
|
112
|
-
"release-it": "^19.
|
|
113
|
-
"sinon": "^21.0.
|
|
112
|
+
"release-it": "^19.2.2",
|
|
113
|
+
"sinon": "^21.0.1",
|
|
114
114
|
"supertest": "^7.1.4",
|
|
115
115
|
"test-console": "^2.0.0",
|
|
116
116
|
"timekeeper": "^2.3.1",
|
|
117
|
-
"tsdown": "^0.
|
|
117
|
+
"tsdown": "^0.18.3",
|
|
118
118
|
"typedoc": "^0.28.15",
|
|
119
119
|
"typescript": "^5.9.3",
|
|
120
120
|
"youch": "^4.1.0-beta.13"
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
"@adonisjs/fold": "^11.0.0-next.3",
|
|
130
130
|
"@adonisjs/hash": "^10.0.0-next.2",
|
|
131
131
|
"@adonisjs/health": "^3.1.0-next.1",
|
|
132
|
-
"@adonisjs/http-server": "^8.0.0-next.
|
|
133
|
-
"@adonisjs/http-transformers": "^1.6.
|
|
132
|
+
"@adonisjs/http-server": "^8.0.0-next.16",
|
|
133
|
+
"@adonisjs/http-transformers": "^1.6.2",
|
|
134
134
|
"@adonisjs/logger": "^7.1.0-next.3",
|
|
135
135
|
"@adonisjs/repl": "^5.0.0-next.1",
|
|
136
136
|
"@boringnode/encryption": "^0.2.2",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@poppinss/dumper": "^0.7.0",
|
|
139
139
|
"@poppinss/macroable": "^1.1.0",
|
|
140
140
|
"@poppinss/utils": "^7.0.0-next.4",
|
|
141
|
-
"@sindresorhus/is": "^7.
|
|
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",
|
package/build/app-BK0PN3li.js
DELETED
package/build/config-BwupGyeJ.js
DELETED
package/build/events-BW2flEef.js
DELETED
package/build/main-CP75MhEW.js
DELETED
package/build/main-OHZwVYZ4.js
DELETED