@aom-js/router 0.0.0-stage → 0.1.1
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/dist/cjs/classes/index.d.ts +3 -0
- package/dist/cjs/classes/index.d.ts.map +1 -0
- package/dist/cjs/classes/index.js +19 -0
- package/dist/cjs/classes/index.js.map +1 -0
- package/dist/cjs/classes/openapi.d.ts +21 -0
- package/dist/cjs/classes/openapi.d.ts.map +1 -0
- package/dist/cjs/classes/openapi.js +188 -0
- package/dist/cjs/classes/openapi.js.map +1 -0
- package/dist/cjs/classes/router.d.ts +17 -0
- package/dist/cjs/classes/router.d.ts.map +1 -0
- package/dist/cjs/classes/router.js +84 -0
- package/dist/cjs/classes/router.js.map +1 -0
- package/dist/cjs/common/api.d.ts +95 -0
- package/dist/cjs/common/api.d.ts.map +1 -0
- package/dist/cjs/common/api.js +113 -0
- package/dist/cjs/common/api.js.map +1 -0
- package/dist/cjs/common/classes.d.ts +7 -0
- package/dist/cjs/common/classes.d.ts.map +1 -0
- package/dist/cjs/common/classes.js +12 -0
- package/dist/cjs/common/classes.js.map +1 -0
- package/dist/cjs/common/context.d.ts +28 -0
- package/dist/cjs/common/context.d.ts.map +1 -0
- package/dist/cjs/common/context.js +142 -0
- package/dist/cjs/common/context.js.map +1 -0
- package/dist/cjs/common/cursor.d.ts +55 -0
- package/dist/cjs/common/cursor.d.ts.map +1 -0
- package/dist/cjs/common/cursor.js +170 -0
- package/dist/cjs/common/cursor.js.map +1 -0
- package/dist/cjs/common/index.d.ts +7 -0
- package/dist/cjs/common/index.d.ts.map +1 -0
- package/dist/cjs/common/index.js +23 -0
- package/dist/cjs/common/index.js.map +1 -0
- package/dist/cjs/common/kinds.d.ts +44 -0
- package/dist/cjs/common/kinds.d.ts.map +1 -0
- package/dist/cjs/common/kinds.js +51 -0
- package/dist/cjs/common/kinds.js.map +1 -0
- package/dist/cjs/common/lazy.d.ts +7 -0
- package/dist/cjs/common/lazy.d.ts.map +1 -0
- package/dist/cjs/common/lazy.js +14 -0
- package/dist/cjs/common/lazy.js.map +1 -0
- package/dist/cjs/common/openapi.d.ts +45 -0
- package/dist/cjs/common/openapi.d.ts.map +1 -0
- package/dist/cjs/common/openapi.js +3 -0
- package/dist/cjs/common/openapi.js.map +1 -0
- package/dist/cjs/common/path.d.ts +6 -0
- package/dist/cjs/common/path.d.ts.map +1 -0
- package/dist/cjs/common/path.js +17 -0
- package/dist/cjs/common/path.js.map +1 -0
- package/dist/cjs/common/references.d.ts +18 -0
- package/dist/cjs/common/references.d.ts.map +1 -0
- package/dist/cjs/common/references.js +31 -0
- package/dist/cjs/common/references.js.map +1 -0
- package/dist/cjs/common/route.d.ts +33 -0
- package/dist/cjs/common/route.d.ts.map +1 -0
- package/dist/cjs/common/route.js +78 -0
- package/dist/cjs/common/route.js.map +1 -0
- package/dist/cjs/common/types.d.ts +8 -0
- package/dist/cjs/common/types.d.ts.map +1 -0
- package/dist/cjs/common/types.js +3 -0
- package/dist/cjs/common/types.js.map +1 -0
- package/dist/cjs/constants/errors.d.ts +21 -0
- package/dist/cjs/constants/errors.d.ts.map +1 -0
- package/dist/cjs/constants/errors.js +24 -0
- package/dist/cjs/constants/errors.js.map +1 -0
- package/dist/cjs/constants/index.d.ts +2 -0
- package/dist/cjs/constants/index.d.ts.map +1 -0
- package/dist/cjs/constants/index.js +18 -0
- package/dist/cjs/constants/index.js.map +1 -0
- package/dist/cjs/decorators/arguments/index.d.ts +22 -0
- package/dist/cjs/decorators/arguments/index.d.ts.map +1 -0
- package/dist/cjs/decorators/arguments/index.js +188 -0
- package/dist/cjs/decorators/arguments/index.js.map +1 -0
- package/dist/cjs/decorators/controllers/index.d.ts +2 -0
- package/dist/cjs/decorators/controllers/index.d.ts.map +1 -0
- package/dist/cjs/decorators/controllers/index.js +21 -0
- package/dist/cjs/decorators/controllers/index.js.map +1 -0
- package/dist/cjs/decorators/docs/index.d.ts +4 -0
- package/dist/cjs/decorators/docs/index.d.ts.map +1 -0
- package/dist/cjs/decorators/docs/index.js +16 -0
- package/dist/cjs/decorators/docs/index.js.map +1 -0
- package/dist/cjs/decorators/endpoints/index.d.ts +20 -0
- package/dist/cjs/decorators/endpoints/index.d.ts.map +1 -0
- package/dist/cjs/decorators/endpoints/index.js +125 -0
- package/dist/cjs/decorators/endpoints/index.js.map +1 -0
- package/dist/cjs/decorators/index.d.ts +9 -0
- package/dist/cjs/decorators/index.d.ts.map +1 -0
- package/dist/cjs/decorators/index.js +25 -0
- package/dist/cjs/decorators/index.js.map +1 -0
- package/dist/cjs/decorators/kinds/index.d.ts +3 -0
- package/dist/cjs/decorators/kinds/index.d.ts.map +1 -0
- package/dist/cjs/decorators/kinds/index.js +49 -0
- package/dist/cjs/decorators/kinds/index.js.map +1 -0
- package/dist/cjs/decorators/middlewares/index.d.ts +11 -0
- package/dist/cjs/decorators/middlewares/index.d.ts.map +1 -0
- package/dist/cjs/decorators/middlewares/index.js +137 -0
- package/dist/cjs/decorators/middlewares/index.js.map +1 -0
- package/dist/cjs/decorators/openapi/index.d.ts +10 -0
- package/dist/cjs/decorators/openapi/index.d.ts.map +1 -0
- package/dist/cjs/decorators/openapi/index.js +61 -0
- package/dist/cjs/decorators/openapi/index.js.map +1 -0
- package/dist/cjs/decorators/openapi/tags.d.ts +6 -0
- package/dist/cjs/decorators/openapi/tags.d.ts.map +1 -0
- package/dist/cjs/decorators/openapi/tags.js +28 -0
- package/dist/cjs/decorators/openapi/tags.js.map +1 -0
- package/dist/cjs/decorators/references/index.d.ts +3 -0
- package/dist/cjs/decorators/references/index.d.ts.map +1 -0
- package/dist/cjs/decorators/references/index.js +10 -0
- package/dist/cjs/decorators/references/index.js.map +1 -0
- package/dist/cjs/index.d.ts +12 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/specials/index.d.ts +2 -0
- package/dist/cjs/specials/index.d.ts.map +1 -0
- package/dist/cjs/specials/index.js +18 -0
- package/dist/cjs/specials/index.js.map +1 -0
- package/dist/cjs/specials/references.d.ts +5 -0
- package/dist/cjs/specials/references.d.ts.map +1 -0
- package/dist/cjs/specials/references.js +16 -0
- package/dist/cjs/specials/references.js.map +1 -0
- package/dist/cjs/testing/chain.d.ts +31 -0
- package/dist/cjs/testing/chain.d.ts.map +1 -0
- package/dist/cjs/testing/chain.js +110 -0
- package/dist/cjs/testing/chain.js.map +1 -0
- package/dist/cjs/testing/decorators.d.ts +23 -0
- package/dist/cjs/testing/decorators.d.ts.map +1 -0
- package/dist/cjs/testing/decorators.js +52 -0
- package/dist/cjs/testing/decorators.js.map +1 -0
- package/dist/cjs/testing/index.d.ts +7 -0
- package/dist/cjs/testing/index.d.ts.map +1 -0
- package/dist/cjs/testing/index.js +27 -0
- package/dist/cjs/testing/index.js.map +1 -0
- package/dist/cjs/testing/report.d.ts +24 -0
- package/dist/cjs/testing/report.d.ts.map +1 -0
- package/dist/cjs/testing/report.js +53 -0
- package/dist/cjs/testing/report.js.map +1 -0
- package/dist/cjs/testing/runner.d.ts +23 -0
- package/dist/cjs/testing/runner.d.ts.map +1 -0
- package/dist/cjs/testing/runner.js +295 -0
- package/dist/cjs/testing/runner.js.map +1 -0
- package/dist/cjs/types/index.d.ts +16 -0
- package/dist/cjs/types/index.d.ts.map +1 -0
- package/dist/cjs/types/index.js +3 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/mjs/classes/index.d.ts +3 -0
- package/dist/mjs/classes/index.d.ts.map +1 -0
- package/dist/mjs/classes/index.js +3 -0
- package/dist/mjs/classes/index.js.map +1 -0
- package/dist/mjs/classes/openapi.d.ts +21 -0
- package/dist/mjs/classes/openapi.d.ts.map +1 -0
- package/dist/mjs/classes/openapi.js +151 -0
- package/dist/mjs/classes/openapi.js.map +1 -0
- package/dist/mjs/classes/router.d.ts +17 -0
- package/dist/mjs/classes/router.d.ts.map +1 -0
- package/dist/mjs/classes/router.js +47 -0
- package/dist/mjs/classes/router.js.map +1 -0
- package/dist/mjs/common/api.d.ts +95 -0
- package/dist/mjs/common/api.d.ts.map +1 -0
- package/dist/mjs/common/api.js +109 -0
- package/dist/mjs/common/api.js.map +1 -0
- package/dist/mjs/common/classes.d.ts +7 -0
- package/dist/mjs/common/classes.d.ts.map +1 -0
- package/dist/mjs/common/classes.js +4 -0
- package/dist/mjs/common/classes.js.map +1 -0
- package/dist/mjs/common/context.d.ts +28 -0
- package/dist/mjs/common/context.d.ts.map +1 -0
- package/dist/mjs/common/context.js +104 -0
- package/dist/mjs/common/context.js.map +1 -0
- package/dist/mjs/common/cursor.d.ts +55 -0
- package/dist/mjs/common/cursor.d.ts.map +1 -0
- package/dist/mjs/common/cursor.js +132 -0
- package/dist/mjs/common/cursor.js.map +1 -0
- package/dist/mjs/common/index.d.ts +7 -0
- package/dist/mjs/common/index.d.ts.map +1 -0
- package/dist/mjs/common/index.js +7 -0
- package/dist/mjs/common/index.js.map +1 -0
- package/dist/mjs/common/kinds.d.ts +44 -0
- package/dist/mjs/common/kinds.d.ts.map +1 -0
- package/dist/mjs/common/kinds.js +48 -0
- package/dist/mjs/common/kinds.js.map +1 -0
- package/dist/mjs/common/lazy.d.ts +7 -0
- package/dist/mjs/common/lazy.d.ts.map +1 -0
- package/dist/mjs/common/lazy.js +9 -0
- package/dist/mjs/common/lazy.js.map +1 -0
- package/dist/mjs/common/openapi.d.ts +45 -0
- package/dist/mjs/common/openapi.d.ts.map +1 -0
- package/dist/mjs/common/openapi.js +2 -0
- package/dist/mjs/common/openapi.js.map +1 -0
- package/dist/mjs/common/path.d.ts +6 -0
- package/dist/mjs/common/path.d.ts.map +1 -0
- package/dist/mjs/common/path.js +13 -0
- package/dist/mjs/common/path.js.map +1 -0
- package/dist/mjs/common/references.d.ts +18 -0
- package/dist/mjs/common/references.d.ts.map +1 -0
- package/dist/mjs/common/references.js +24 -0
- package/dist/mjs/common/references.js.map +1 -0
- package/dist/mjs/common/route.d.ts +33 -0
- package/dist/mjs/common/route.d.ts.map +1 -0
- package/dist/mjs/common/route.js +73 -0
- package/dist/mjs/common/route.js.map +1 -0
- package/dist/mjs/common/types.d.ts +8 -0
- package/dist/mjs/common/types.d.ts.map +1 -0
- package/dist/mjs/common/types.js +2 -0
- package/dist/mjs/common/types.js.map +1 -0
- package/dist/mjs/constants/errors.d.ts +21 -0
- package/dist/mjs/constants/errors.d.ts.map +1 -0
- package/dist/mjs/constants/errors.js +21 -0
- package/dist/mjs/constants/errors.js.map +1 -0
- package/dist/mjs/constants/index.d.ts +2 -0
- package/dist/mjs/constants/index.d.ts.map +1 -0
- package/dist/mjs/constants/index.js +2 -0
- package/dist/mjs/constants/index.js.map +1 -0
- package/dist/mjs/decorators/arguments/index.d.ts +22 -0
- package/dist/mjs/decorators/arguments/index.d.ts.map +1 -0
- package/dist/mjs/decorators/arguments/index.js +136 -0
- package/dist/mjs/decorators/arguments/index.js.map +1 -0
- package/dist/mjs/decorators/controllers/index.d.ts +2 -0
- package/dist/mjs/decorators/controllers/index.d.ts.map +1 -0
- package/dist/mjs/decorators/controllers/index.js +18 -0
- package/dist/mjs/decorators/controllers/index.js.map +1 -0
- package/dist/mjs/decorators/docs/index.d.ts +4 -0
- package/dist/mjs/decorators/docs/index.d.ts.map +1 -0
- package/dist/mjs/decorators/docs/index.js +12 -0
- package/dist/mjs/decorators/docs/index.js.map +1 -0
- package/dist/mjs/decorators/endpoints/index.d.ts +20 -0
- package/dist/mjs/decorators/endpoints/index.d.ts.map +1 -0
- package/dist/mjs/decorators/endpoints/index.js +80 -0
- package/dist/mjs/decorators/endpoints/index.js.map +1 -0
- package/dist/mjs/decorators/index.d.ts +9 -0
- package/dist/mjs/decorators/index.d.ts.map +1 -0
- package/dist/mjs/decorators/index.js +9 -0
- package/dist/mjs/decorators/index.js.map +1 -0
- package/dist/mjs/decorators/kinds/index.d.ts +3 -0
- package/dist/mjs/decorators/kinds/index.d.ts.map +1 -0
- package/dist/mjs/decorators/kinds/index.js +13 -0
- package/dist/mjs/decorators/kinds/index.js.map +1 -0
- package/dist/mjs/decorators/middlewares/index.d.ts +11 -0
- package/dist/mjs/decorators/middlewares/index.d.ts.map +1 -0
- package/dist/mjs/decorators/middlewares/index.js +94 -0
- package/dist/mjs/decorators/middlewares/index.js.map +1 -0
- package/dist/mjs/decorators/openapi/index.d.ts +10 -0
- package/dist/mjs/decorators/openapi/index.d.ts.map +1 -0
- package/dist/mjs/decorators/openapi/index.js +38 -0
- package/dist/mjs/decorators/openapi/index.js.map +1 -0
- package/dist/mjs/decorators/openapi/tags.d.ts +6 -0
- package/dist/mjs/decorators/openapi/tags.d.ts.map +1 -0
- package/dist/mjs/decorators/openapi/tags.js +22 -0
- package/dist/mjs/decorators/openapi/tags.js.map +1 -0
- package/dist/mjs/decorators/references/index.d.ts +3 -0
- package/dist/mjs/decorators/references/index.d.ts.map +1 -0
- package/dist/mjs/decorators/references/index.js +7 -0
- package/dist/mjs/decorators/references/index.js.map +1 -0
- package/dist/mjs/index.d.ts +12 -0
- package/dist/mjs/index.d.ts.map +1 -0
- package/dist/mjs/index.js +12 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/specials/index.d.ts +2 -0
- package/dist/mjs/specials/index.d.ts.map +1 -0
- package/dist/mjs/specials/index.js +2 -0
- package/dist/mjs/specials/index.js.map +1 -0
- package/dist/mjs/specials/references.d.ts +5 -0
- package/dist/mjs/specials/references.d.ts.map +1 -0
- package/dist/mjs/specials/references.js +11 -0
- package/dist/mjs/specials/references.js.map +1 -0
- package/dist/mjs/testing/chain.d.ts +31 -0
- package/dist/mjs/testing/chain.d.ts.map +1 -0
- package/dist/mjs/testing/chain.js +99 -0
- package/dist/mjs/testing/chain.js.map +1 -0
- package/dist/mjs/testing/decorators.d.ts +23 -0
- package/dist/mjs/testing/decorators.d.ts.map +1 -0
- package/dist/mjs/testing/decorators.js +42 -0
- package/dist/mjs/testing/decorators.js.map +1 -0
- package/dist/mjs/testing/index.d.ts +7 -0
- package/dist/mjs/testing/index.d.ts.map +1 -0
- package/dist/mjs/testing/index.js +6 -0
- package/dist/mjs/testing/index.js.map +1 -0
- package/dist/mjs/testing/report.d.ts +24 -0
- package/dist/mjs/testing/report.d.ts.map +1 -0
- package/dist/mjs/testing/report.js +49 -0
- package/dist/mjs/testing/report.js.map +1 -0
- package/dist/mjs/testing/runner.d.ts +23 -0
- package/dist/mjs/testing/runner.d.ts.map +1 -0
- package/dist/mjs/testing/runner.js +289 -0
- package/dist/mjs/testing/runner.js.map +1 -0
- package/dist/mjs/types/index.d.ts +16 -0
- package/dist/mjs/types/index.d.ts.map +1 -0
- package/dist/mjs/types/index.js +2 -0
- package/dist/mjs/types/index.js.map +1 -0
- package/dist/types/classes/index.d.ts +2 -0
- package/dist/types/classes/openapi.d.ts +20 -0
- package/dist/types/classes/router.d.ts +16 -0
- package/dist/types/common/api.d.ts +94 -0
- package/dist/types/common/classes.d.ts +6 -0
- package/dist/types/common/context.d.ts +27 -0
- package/dist/types/common/cursor.d.ts +54 -0
- package/dist/types/common/index.d.ts +6 -0
- package/dist/types/common/kinds.d.ts +43 -0
- package/dist/types/common/lazy.d.ts +6 -0
- package/dist/types/common/openapi.d.ts +44 -0
- package/dist/types/common/path.d.ts +5 -0
- package/dist/types/common/references.d.ts +17 -0
- package/dist/types/common/route.d.ts +32 -0
- package/dist/types/common/types.d.ts +7 -0
- package/dist/types/constants/errors.d.ts +20 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/decorators/arguments/index.d.ts +21 -0
- package/dist/types/decorators/controllers/index.d.ts +1 -0
- package/dist/types/decorators/docs/index.d.ts +3 -0
- package/dist/types/decorators/endpoints/index.d.ts +19 -0
- package/dist/types/decorators/index.d.ts +8 -0
- package/dist/types/decorators/kinds/index.d.ts +2 -0
- package/dist/types/decorators/middlewares/index.d.ts +10 -0
- package/dist/types/decorators/openapi/index.d.ts +9 -0
- package/dist/types/decorators/openapi/tags.d.ts +5 -0
- package/dist/types/decorators/references/index.d.ts +2 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/specials/index.d.ts +1 -0
- package/dist/types/specials/references.d.ts +4 -0
- package/dist/types/testing/chain.d.ts +30 -0
- package/dist/types/testing/decorators.d.ts +22 -0
- package/dist/types/testing/index.d.ts +6 -0
- package/dist/types/testing/report.d.ts +23 -0
- package/dist/types/testing/runner.d.ts +22 -0
- package/dist/types/types/index.d.ts +15 -0
- package/package.json +66 -3
- package/readme.md +9 -0
- package/README.md +0 -3
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum AomCursorKind {
|
|
2
|
+
Handler = "handler",
|
|
3
|
+
Checkpoint = "checkpoint",
|
|
4
|
+
Transport = "transport",
|
|
5
|
+
Filter = "filter",
|
|
6
|
+
Value = "value",
|
|
7
|
+
Collector = "collector",
|
|
8
|
+
Pager = "pager",
|
|
9
|
+
Response = "response",
|
|
10
|
+
Input = "input",
|
|
11
|
+
Meta = "meta",
|
|
12
|
+
Step = "step"
|
|
13
|
+
}
|
|
14
|
+
export declare enum AomParameterKind {
|
|
15
|
+
This = "this",
|
|
16
|
+
State = "state",
|
|
17
|
+
Run = "run",
|
|
18
|
+
Values = "values",
|
|
19
|
+
Cursor = "cursor",
|
|
20
|
+
Route = "route",
|
|
21
|
+
Ctx = "ctx",
|
|
22
|
+
Req = "req",
|
|
23
|
+
Res = "res",
|
|
24
|
+
Err = "err",
|
|
25
|
+
Other = "other"
|
|
26
|
+
}
|
|
27
|
+
export declare enum AomValuesSource {
|
|
28
|
+
Query = "query",
|
|
29
|
+
Body = "body",
|
|
30
|
+
Params = "params",
|
|
31
|
+
Headers = "headers",
|
|
32
|
+
Cookies = "cookies",
|
|
33
|
+
Session = "session",
|
|
34
|
+
Files = "files"
|
|
35
|
+
}
|
|
36
|
+
export declare enum AomViaKind {
|
|
37
|
+
Endpoint = "endpoint",
|
|
38
|
+
Before = "before",
|
|
39
|
+
After = "after",
|
|
40
|
+
Next = "next",
|
|
41
|
+
ClassBefore = "class-before",
|
|
42
|
+
ClassAfter = "class-after"
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../src/common/kinds.ts"],"names":[],"mappings":"AAUA,oBAAY,aAAa;IAEvB,OAAO,YAAY;IAEnB,UAAU,eAAe;IAEzB,SAAS,cAAc;IAEvB,MAAM,WAAW;IAEjB,KAAK,UAAU;IAEf,SAAS,cAAc;IAEvB,KAAK,UAAU;IAEf,QAAQ,aAAa;IAErB,KAAK,UAAU;IAEf,IAAI,SAAS;IAEb,IAAI,SAAS;CACd;AAGD,oBAAY,gBAAgB;IAE1B,IAAI,SAAS;IAEb,KAAK,UAAU;IAEf,GAAG,QAAQ;IAEX,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IAEX,KAAK,UAAU;CAChB;AAGD,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAGD,oBAAY,UAAU;IAEpB,QAAQ,aAAa;IAErB,MAAM,WAAW;IAEjB,KAAK,UAAU;IAEf,IAAI,SAAS;IAEb,WAAW,iBAAiB;IAE5B,UAAU,gBAAgB;CAC3B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export var AomCursorKind;
|
|
2
|
+
(function (AomCursorKind) {
|
|
3
|
+
AomCursorKind["Handler"] = "handler";
|
|
4
|
+
AomCursorKind["Checkpoint"] = "checkpoint";
|
|
5
|
+
AomCursorKind["Transport"] = "transport";
|
|
6
|
+
AomCursorKind["Filter"] = "filter";
|
|
7
|
+
AomCursorKind["Value"] = "value";
|
|
8
|
+
AomCursorKind["Collector"] = "collector";
|
|
9
|
+
AomCursorKind["Pager"] = "pager";
|
|
10
|
+
AomCursorKind["Response"] = "response";
|
|
11
|
+
AomCursorKind["Input"] = "input";
|
|
12
|
+
AomCursorKind["Meta"] = "meta";
|
|
13
|
+
AomCursorKind["Step"] = "step";
|
|
14
|
+
})(AomCursorKind || (AomCursorKind = {}));
|
|
15
|
+
export var AomParameterKind;
|
|
16
|
+
(function (AomParameterKind) {
|
|
17
|
+
AomParameterKind["This"] = "this";
|
|
18
|
+
AomParameterKind["State"] = "state";
|
|
19
|
+
AomParameterKind["Run"] = "run";
|
|
20
|
+
AomParameterKind["Values"] = "values";
|
|
21
|
+
AomParameterKind["Cursor"] = "cursor";
|
|
22
|
+
AomParameterKind["Route"] = "route";
|
|
23
|
+
AomParameterKind["Ctx"] = "ctx";
|
|
24
|
+
AomParameterKind["Req"] = "req";
|
|
25
|
+
AomParameterKind["Res"] = "res";
|
|
26
|
+
AomParameterKind["Err"] = "err";
|
|
27
|
+
AomParameterKind["Other"] = "other";
|
|
28
|
+
})(AomParameterKind || (AomParameterKind = {}));
|
|
29
|
+
export var AomValuesSource;
|
|
30
|
+
(function (AomValuesSource) {
|
|
31
|
+
AomValuesSource["Query"] = "query";
|
|
32
|
+
AomValuesSource["Body"] = "body";
|
|
33
|
+
AomValuesSource["Params"] = "params";
|
|
34
|
+
AomValuesSource["Headers"] = "headers";
|
|
35
|
+
AomValuesSource["Cookies"] = "cookies";
|
|
36
|
+
AomValuesSource["Session"] = "session";
|
|
37
|
+
AomValuesSource["Files"] = "files";
|
|
38
|
+
})(AomValuesSource || (AomValuesSource = {}));
|
|
39
|
+
export var AomViaKind;
|
|
40
|
+
(function (AomViaKind) {
|
|
41
|
+
AomViaKind["Endpoint"] = "endpoint";
|
|
42
|
+
AomViaKind["Before"] = "before";
|
|
43
|
+
AomViaKind["After"] = "after";
|
|
44
|
+
AomViaKind["Next"] = "next";
|
|
45
|
+
AomViaKind["ClassBefore"] = "class-before";
|
|
46
|
+
AomViaKind["ClassAfter"] = "class-after";
|
|
47
|
+
})(AomViaKind || (AomViaKind = {}));
|
|
48
|
+
//# sourceMappingURL=kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.js","sourceRoot":"","sources":["../../../src/common/kinds.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,aAuBX;AAvBD,WAAY,aAAa;IAEvB,oCAAmB,CAAA;IAEnB,0CAAyB,CAAA;IAEzB,wCAAuB,CAAA;IAEvB,kCAAiB,CAAA;IAEjB,gCAAe,CAAA;IAEf,wCAAuB,CAAA;IAEvB,gCAAe,CAAA;IAEf,sCAAqB,CAAA;IAErB,gCAAe,CAAA;IAEf,8BAAa,CAAA;IAEb,8BAAa,CAAA;AACf,CAAC,EAvBW,aAAa,KAAb,aAAa,QAuBxB;AAGD,MAAM,CAAN,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAE1B,iCAAa,CAAA;IAEb,mCAAe,CAAA;IAEf,+BAAW,CAAA;IAEX,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;IAEX,mCAAe,CAAA;AACjB,CAAC,EAjBW,gBAAgB,KAAhB,gBAAgB,QAiB3B;AAGD,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACjB,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAGD,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IAEpB,mCAAqB,CAAA;IAErB,+BAAiB,CAAA;IAEjB,6BAAe,CAAA;IAEf,2BAAa,CAAA;IAEb,0CAA4B,CAAA;IAE5B,wCAA0B,CAAA;AAC5B,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class LazyValue<T = any> {
|
|
2
|
+
readonly factory: () => T | Promise<T>;
|
|
3
|
+
constructor(factory: () => T | Promise<T>);
|
|
4
|
+
}
|
|
5
|
+
export declare function lazy<T>(factory: () => T | Promise<T>): LazyValue<T>;
|
|
6
|
+
export type Lazy<T> = T | LazyValue<T>;
|
|
7
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/common/lazy.ts"],"names":[],"mappings":"AAeA,qBAAa,SAAS,CAAC,CAAC,GAAG,GAAG;IAChB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAAlD,YAAqB,OAAO,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAI;CACvD;AA8BD,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAEnE;AAOD,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.js","sourceRoot":"","sources":["../../../src/common/lazy.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,SAAS;IACpB,YAAqB,OAA6B;uBAA7B,OAAO;IAAyB,CAAC;CACvD;AA8BD,MAAM,UAAU,IAAI,CAAI,OAA6B;IACnD,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ClassType } from "@aom-js/core";
|
|
2
|
+
import { ParameterLocation, SchemaObjectValue, SecuritySchemeObject } from "openapi3-ts/oas32";
|
|
3
|
+
import { RouteRefContainer, ThisRefContainer } from "./references.js";
|
|
4
|
+
export declare type OpenApiPossibleSchema = OpenApiSchemaObject | ClassType | ThisRefContainer | RouteRefContainer | any;
|
|
5
|
+
export declare type OpenApiSchemaObject = Omit<SchemaObjectValue, "type"> & {
|
|
6
|
+
type?: SchemaObjectValue["type"] | string;
|
|
7
|
+
};
|
|
8
|
+
export declare type OpenApiSecuritySchema = Omit<SecuritySchemeObject, "type"> & {
|
|
9
|
+
type?: SecuritySchemeObject["type"] | string;
|
|
10
|
+
};
|
|
11
|
+
export declare interface OpenApiParameterObject {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
in: ParameterLocation;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
schema: OpenApiPossibleSchema;
|
|
17
|
+
}
|
|
18
|
+
export declare interface OpenApiResponseBase {
|
|
19
|
+
status: number;
|
|
20
|
+
description: string;
|
|
21
|
+
contentType?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare interface OpenApiDataResponse extends OpenApiResponseBase {
|
|
24
|
+
schema: OpenApiPossibleSchema;
|
|
25
|
+
isArray?: boolean;
|
|
26
|
+
events?: never;
|
|
27
|
+
}
|
|
28
|
+
export declare interface OpenApiEventsResponse extends OpenApiResponseBase {
|
|
29
|
+
events: Record<string, OpenApiPossibleSchema>;
|
|
30
|
+
schema?: never;
|
|
31
|
+
isArray?: never;
|
|
32
|
+
}
|
|
33
|
+
export declare type OpenApiResponse = OpenApiDataResponse | OpenApiEventsResponse;
|
|
34
|
+
export declare interface OpenApiRequestBody {
|
|
35
|
+
description?: string;
|
|
36
|
+
contentType?: string;
|
|
37
|
+
schema: OpenApiPossibleSchema;
|
|
38
|
+
}
|
|
39
|
+
export declare type OpenApiPathParameterObject = Omit<OpenApiParameterObject, "in"> & {
|
|
40
|
+
in?: OpenApiParameterObject["in"];
|
|
41
|
+
};
|
|
42
|
+
export declare type OpenApiPathParameters = {
|
|
43
|
+
[parameter: string]: OpenApiPathParameterObject;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/common/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/F,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQnE,MAAM,CAAC,OAAO,MAAM,qBAAqB,GACvC,mBAAmB,GAAG,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,GAAG,CAAC;AAI/E,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG;IAC1E,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC3C,CAAC;AAGF,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG;IAC/E,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC9C,CAAC;AAGF,MAAM,CAAC,OAAO,WAAW,sBAAsB;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,iBAAiB,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAGD,MAAM,CAAC,OAAO,WAAW,mBAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,MAAM,CAAC,OAAO,WAAW,mBAAoB,SAAQ,mBAAmB;IACtE,MAAM,EAAE,qBAAqB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAQD,MAAM,CAAC,OAAO,WAAW,qBAAsB,SAAQ,mBAAmB;IACxE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAOD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAGlF,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAID,MAAM,CAAC,OAAO,MAAM,0BAA0B,GAAG,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,GAAG;IACpF,EAAE,CAAC,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAOF,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IAC1C,CAAC,SAAS,EAAE,MAAM,GAAG,0BAA0B,CAAC;CACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../../src/common/openapi.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/common/path.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,QAA+B,CAAC;AAmBvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAWnF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const PATH_PARAM = /:([^/()]+)(?:\(([^)]+)\))?/;
|
|
2
|
+
const PATH_TOKEN = new RegExp(`${PATH_PARAM.source}|${/[.*+?^${}()|[\]\\]/.source}`, "g");
|
|
3
|
+
export function compilePath(path) {
|
|
4
|
+
const paramNames = [];
|
|
5
|
+
const pattern = path.replace(PATH_TOKEN, (whole, name, validator) => {
|
|
6
|
+
if (name === undefined)
|
|
7
|
+
return `\\${whole}`;
|
|
8
|
+
paramNames.push(name);
|
|
9
|
+
return `(${validator ?? "[^/]+"})`;
|
|
10
|
+
});
|
|
11
|
+
return { pattern: new RegExp(`^${pattern}$`), paramNames };
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/common/path.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,IAAI,oBAAoB,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;AAgB1F,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAa,EAAE,SAAkB,EAAE,EAAE;QAEpF,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,KAAK,KAAK,EAAE,CAAC;QAE5C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,SAAS,IAAI,OAAO,GAAG,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,UAAU,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClassType } from "@aom-js/core";
|
|
2
|
+
import { ContainerFunction, FwdFunction, RefFunction } from "./types.js";
|
|
3
|
+
export declare class RefContainer {
|
|
4
|
+
protected fn: ContainerFunction;
|
|
5
|
+
constructor(fn?: RefFunction);
|
|
6
|
+
exec(constructor: ClassType): any;
|
|
7
|
+
static default: RefFunction;
|
|
8
|
+
}
|
|
9
|
+
export declare class FwdContainer extends RefContainer {
|
|
10
|
+
constructor(fn?: FwdFunction);
|
|
11
|
+
exec(): any;
|
|
12
|
+
static default: FwdFunction;
|
|
13
|
+
}
|
|
14
|
+
export declare class ThisRefContainer extends RefContainer {
|
|
15
|
+
}
|
|
16
|
+
export declare class RouteRefContainer extends RefContainer {
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/common/references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAWtE,qBAAa,YAAY;IACvB,SAAS,CAAC,EAAE,EAAE,iBAAiB,CAAC;IAChC,YAAY,EAAE,GAAE,WAAkC,EAEjD;IAED,IAAI,CAAC,WAAW,EAAE,SAAS,OAE1B;IAED,MAAM,CAAC,OAAO,EAAE,WAAW,CAA2C;CACvE;AAUD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,YAAY,EAAE,GAAE,WAAkC,EAGjD;IAED,IAAI,QAEH;IAED,MAAM,CAAC,OAAO,EAAE,WAAW,CAAwB;CACpD;AASD,qBAAa,gBAAiB,SAAQ,YAAY;CAAG;AASrD,qBAAa,iBAAkB,SAAQ,YAAY;CAAG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class RefContainer {
|
|
2
|
+
constructor(fn = RefContainer.default) {
|
|
3
|
+
this.fn = fn;
|
|
4
|
+
}
|
|
5
|
+
exec(constructor) {
|
|
6
|
+
return Reflect.apply(this.fn, constructor, [constructor]);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
RefContainer.default = (constructor) => constructor;
|
|
10
|
+
export class FwdContainer extends RefContainer {
|
|
11
|
+
constructor(fn = FwdContainer.default) {
|
|
12
|
+
super(fn);
|
|
13
|
+
this.fn = fn;
|
|
14
|
+
}
|
|
15
|
+
exec() {
|
|
16
|
+
return Reflect.apply(this.fn, undefined, []);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
FwdContainer.default = () => new Function();
|
|
20
|
+
export class ThisRefContainer extends RefContainer {
|
|
21
|
+
}
|
|
22
|
+
export class RouteRefContainer extends RefContainer {
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=references.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.js","sourceRoot":"","sources":["../../../src/common/references.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,YAAY;IAEvB,YAAY,EAAE,GAAgB,YAAY,CAAC,OAAO;QAChD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,IAAI,CAAC,WAAsB;QACzB,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;CAGF;AADQ,oBAAO,GAAgB,CAAC,WAAsB,EAAE,EAAE,CAAC,WAAW,CAAC;AAWxE,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,YAAY,EAAE,GAAgB,YAAY,CAAC,OAAO;QAChD,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,IAAI;QACF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;CAGF;AADQ,oBAAO,GAAgB,GAAG,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;AAUrD,MAAM,OAAO,gBAAiB,SAAQ,YAAY;CAAG;AASrD,MAAM,OAAO,iBAAkB,SAAQ,YAAY;CAAG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { HTTPMethods } from "./types.js";
|
|
2
|
+
import type { HttpContextValues } from "../types/index.js";
|
|
3
|
+
import type { Router } from "../classes/index.js";
|
|
4
|
+
import { AomCursor, type AomCursorJSON } from "./cursor.js";
|
|
5
|
+
import type { AomEndpoint } from "./api.js";
|
|
6
|
+
export declare type MarkerType = Record<string, any>;
|
|
7
|
+
export declare type MarkerHandler = (route: AomRoute, cursor: AomCursor) => void | unknown;
|
|
8
|
+
export declare interface AomRouteJSON {
|
|
9
|
+
method: string;
|
|
10
|
+
path: string;
|
|
11
|
+
markers: Record<string, {
|
|
12
|
+
accessPoints: string[];
|
|
13
|
+
accessTypes?: string[];
|
|
14
|
+
extra?: Record<string, Array<{
|
|
15
|
+
ident: string;
|
|
16
|
+
accessTypes: string[];
|
|
17
|
+
}>>;
|
|
18
|
+
}>;
|
|
19
|
+
steps: AomCursorJSON[];
|
|
20
|
+
}
|
|
21
|
+
export declare function plain(cursors: AomCursor[], into?: AomCursor[]): AomCursor[];
|
|
22
|
+
export declare class AomRoute {
|
|
23
|
+
router: Router;
|
|
24
|
+
endpoint: AomEndpoint;
|
|
25
|
+
path: string;
|
|
26
|
+
method: HTTPMethods;
|
|
27
|
+
markers: MarkerType;
|
|
28
|
+
cursors: AomCursor[];
|
|
29
|
+
constructor(router: Router, prefix: string, endpoint: AomEndpoint, cursors: AomCursor[]);
|
|
30
|
+
apply(context: HttpContextValues): any;
|
|
31
|
+
toJSON(): AomRouteJSON;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":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AGzB,OAAO,EAAE,SAAS,EAAE,CAAM;IAE1B,YAAY,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EA6BtF;IAyBD,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAErC;IAMD,MAAM,IAAI,YAAY,CA4BrB;CACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { resolve, join } from "node:path";
|
|
2
|
+
import { AomCursor } from "./cursor.js";
|
|
3
|
+
import { RxContext } from "./context.js";
|
|
4
|
+
import { AomViaKind } from "./kinds.js";
|
|
5
|
+
function placed(cursor, via, viaGroup) {
|
|
6
|
+
cursor.via = via;
|
|
7
|
+
if (viaGroup)
|
|
8
|
+
cursor.viaGroup = viaGroup;
|
|
9
|
+
return cursor;
|
|
10
|
+
}
|
|
11
|
+
export function plain(cursors, into = []) {
|
|
12
|
+
cursors.forEach((cursor) => {
|
|
13
|
+
plain(cursor.$.element.pre_middlewares.map((middleware) => placed(new AomCursor(middleware, cursor.$, cursor.prefix, cursor.endpoint), AomViaKind.Before)), into);
|
|
14
|
+
into.push(cursor);
|
|
15
|
+
plain(cursor.$.element.post_middlewares.map((middleware) => placed(new AomCursor(middleware, cursor.$, cursor.prefix, cursor.endpoint), AomViaKind.After)), into);
|
|
16
|
+
if (cursor.$.element.nextpoint) {
|
|
17
|
+
plain([
|
|
18
|
+
placed(new AomCursor(cursor.$.element.nextpoint, cursor.$, cursor.prefix, cursor.endpoint), AomViaKind.Next, cursor.$.toString()),
|
|
19
|
+
], into);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return into;
|
|
23
|
+
}
|
|
24
|
+
export class AomRoute {
|
|
25
|
+
constructor(router, prefix, endpoint, cursors) {
|
|
26
|
+
this.markers = {};
|
|
27
|
+
this.cursors = [];
|
|
28
|
+
this.router = router;
|
|
29
|
+
this.path = resolve(join(prefix, endpoint.prefix));
|
|
30
|
+
this.method = endpoint.method;
|
|
31
|
+
this.endpoint = endpoint;
|
|
32
|
+
this.cursors = plain([
|
|
33
|
+
...cursors.map((cursor) => placed(new AomCursor(cursor.$, cursor.origin, cursor.prefix, endpoint), cursor.via)),
|
|
34
|
+
placed(new AomCursor(endpoint.$, endpoint.$, this.path, endpoint), AomViaKind.Endpoint),
|
|
35
|
+
]);
|
|
36
|
+
this.cursors.forEach((cursor, index) => {
|
|
37
|
+
cursor.$.element.markers.forEach((marker) => {
|
|
38
|
+
Reflect.apply(marker.element.descriptor.value, marker._.target, [this, cursor]);
|
|
39
|
+
});
|
|
40
|
+
cursor.index = index;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
apply(context) {
|
|
44
|
+
return new RxContext(context, this).run(this.cursors);
|
|
45
|
+
}
|
|
46
|
+
toJSON() {
|
|
47
|
+
const markers = {};
|
|
48
|
+
Object.entries(this.markers).forEach(([name, marker]) => {
|
|
49
|
+
const points = Array.isArray(marker?.accessPoints)
|
|
50
|
+
? marker.accessPoints
|
|
51
|
+
: [];
|
|
52
|
+
const projection = { accessPoints: points.map(({ ident }) => ident) };
|
|
53
|
+
if (Array.isArray(marker?.accessTypes))
|
|
54
|
+
projection.accessTypes = [...marker.accessTypes];
|
|
55
|
+
const layered = points.filter(({ extra }) => extra?.length);
|
|
56
|
+
if (layered.length) {
|
|
57
|
+
projection.extra = Object.fromEntries(layered.map(({ ident, extra = [] }) => [
|
|
58
|
+
ident,
|
|
59
|
+
extra.map((layer) => ({ ident: layer.ident, accessTypes: [...layer.accessTypes] })),
|
|
60
|
+
]));
|
|
61
|
+
}
|
|
62
|
+
markers[name] = projection;
|
|
63
|
+
});
|
|
64
|
+
const created = new Set();
|
|
65
|
+
return {
|
|
66
|
+
method: this.method,
|
|
67
|
+
path: this.path,
|
|
68
|
+
markers,
|
|
69
|
+
steps: this.cursors.map((cursor) => cursor.toJSON(created)),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
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,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,CACnC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC;oBACrC,KAAK;oBACL,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;iBACpF,CAAC,CACH,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,GAAG,EAAW,CAAC;QACnC,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO;YACP,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAC5D,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClassType } from "@aom-js/core";
|
|
2
|
+
export declare type HTTPMethods = "get" | "post" | "put" | "patch" | "delete" | "options" | "all" | "sockets";
|
|
3
|
+
export declare type HandlerFunction = (...args: any[]) => any;
|
|
4
|
+
export declare type MiddlewareHandler = HandlerFunction;
|
|
5
|
+
export declare type FwdFunction = () => HandlerFunction | ClassType;
|
|
6
|
+
export declare type RefFunction = (constructor: ClassType) => any;
|
|
7
|
+
export declare type ContainerFunction = FwdFunction | RefFunction;
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,MAAM,CAAC,OAAO,MAAM,WAAW,GAC7B,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAO9E,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAG9D,MAAM,CAAC,OAAO,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAGxD,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG,MAAM,eAAe,GAAG,SAAS,CAAC;AAMpE,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,SAAS,KAAK,GAAG,CAAC;AAGlE,MAAM,CAAC,OAAO,MAAM,iBAAiB,GAAG,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const CONSTRUCTOR_TYPE_ERROR = "CONSTRUCTOR_TYPE_ERROR";
|
|
2
|
+
export declare const ERROR_CONSTRUCTOR_ERROR = "ERROR_CONSTRUCTOR_ERROR";
|
|
3
|
+
export declare const PARAMETER_HANDLER_ERROR = "PARAMETER_HANDLER_ERROR";
|
|
4
|
+
export declare const CONSTRUCTOR_PROPERTY_TYPE_ERROR = "CONSTRUCTOR_PROPERTY_TYPE_ERROR";
|
|
5
|
+
export declare const COMMON_ENDPOINT_ERROR = "COMMON_ENDPOINT_ERROR";
|
|
6
|
+
export declare const ENDPOINT_DEFINE_ERROR = "ENDPOINT_DEFINE_ERROR";
|
|
7
|
+
export declare const NEXPOINT_DEFINE_ERROR = "NEXPOINT_DEFINE_ERROR";
|
|
8
|
+
export declare const WEBSOCKET_DEFINE_ERROR = "WEBSOCKET_DEFINE_ERROR";
|
|
9
|
+
export declare const MIDDLEWARE_DEFINE_ERROR = "MIDDLEWARE_DEFINE_ERROR";
|
|
10
|
+
export declare const ON_INSTANCE_DEFINE_ERROR = "ON_INSTANCE_DEFINE_ERROR";
|
|
11
|
+
export declare const USE_NEXT_DEFINE_ERROR = "USE_NEXT_DEFINE_ERROR";
|
|
12
|
+
export declare const USE_MARKER_DEFINE_ERROR = "USE_MARKER_DEFINE_ERROR";
|
|
13
|
+
export declare const USE_MIDDLEWARE_DEFINE_ERROR = "USE_MIDDLEWARE_DEFINE_ERROR";
|
|
14
|
+
export declare const CURSOR_KIND_DEFINE_ERROR = "CURSOR_KIND_DEFINE_ERROR";
|
|
15
|
+
export declare const RESPONSE_EVENTS_DEFINE_ERROR = "RESPONSE_EVENTS_DEFINE_ERROR";
|
|
16
|
+
export declare const ROUTE_REF_DELAY_ERROR = "ROUTE_REF_DELAY_ERROR";
|
|
17
|
+
export declare const ROUTE_OF_NOT_FOUND_ERROR = "ROUTE_OF_NOT_FOUND_ERROR";
|
|
18
|
+
export declare const ROUTE_OF_AMBIGUOUS_ERROR = "ROUTE_OF_AMBIGUOUS_ERROR";
|
|
19
|
+
export declare const CIRCULAR_INSTANCE_ERROR = "CIRCULAR_INSTANCE_ERROR";
|
|
20
|
+
export declare const CURSOR_NOT_EXECUTABLE_ERROR = "CURSOR_NOT_EXECUTABLE_ERROR";
|
|
21
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/constants/errors.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,+BAA+B,oCAAoC,CAAC;AAEjF,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAG7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAGnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAGzE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAGnE,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAG3E,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAO7D,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAMnE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAUnE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAUjE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const CONSTRUCTOR_TYPE_ERROR = "CONSTRUCTOR_TYPE_ERROR";
|
|
2
|
+
export const ERROR_CONSTRUCTOR_ERROR = "ERROR_CONSTRUCTOR_ERROR";
|
|
3
|
+
export const PARAMETER_HANDLER_ERROR = "PARAMETER_HANDLER_ERROR";
|
|
4
|
+
export const CONSTRUCTOR_PROPERTY_TYPE_ERROR = "CONSTRUCTOR_PROPERTY_TYPE_ERROR";
|
|
5
|
+
export const COMMON_ENDPOINT_ERROR = "COMMON_ENDPOINT_ERROR";
|
|
6
|
+
export const ENDPOINT_DEFINE_ERROR = "ENDPOINT_DEFINE_ERROR";
|
|
7
|
+
export const NEXPOINT_DEFINE_ERROR = "NEXPOINT_DEFINE_ERROR";
|
|
8
|
+
export const WEBSOCKET_DEFINE_ERROR = "WEBSOCKET_DEFINE_ERROR";
|
|
9
|
+
export const MIDDLEWARE_DEFINE_ERROR = "MIDDLEWARE_DEFINE_ERROR";
|
|
10
|
+
export const ON_INSTANCE_DEFINE_ERROR = "ON_INSTANCE_DEFINE_ERROR";
|
|
11
|
+
export const USE_NEXT_DEFINE_ERROR = "USE_NEXT_DEFINE_ERROR";
|
|
12
|
+
export const USE_MARKER_DEFINE_ERROR = "USE_MARKER_DEFINE_ERROR";
|
|
13
|
+
export const USE_MIDDLEWARE_DEFINE_ERROR = "USE_MIDDLEWARE_DEFINE_ERROR";
|
|
14
|
+
export const CURSOR_KIND_DEFINE_ERROR = "CURSOR_KIND_DEFINE_ERROR";
|
|
15
|
+
export const RESPONSE_EVENTS_DEFINE_ERROR = "RESPONSE_EVENTS_DEFINE_ERROR";
|
|
16
|
+
export const ROUTE_REF_DELAY_ERROR = "ROUTE_REF_DELAY_ERROR";
|
|
17
|
+
export const ROUTE_OF_NOT_FOUND_ERROR = "ROUTE_OF_NOT_FOUND_ERROR";
|
|
18
|
+
export const ROUTE_OF_AMBIGUOUS_ERROR = "ROUTE_OF_AMBIGUOUS_ERROR";
|
|
19
|
+
export const CIRCULAR_INSTANCE_ERROR = "CIRCULAR_INSTANCE_ERROR";
|
|
20
|
+
export const CURSOR_NOT_EXECUTABLE_ERROR = "CURSOR_NOT_EXECUTABLE_ERROR";
|
|
21
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/constants/errors.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAG7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAGnE,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAGzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAGnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAG3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAO7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAMnE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAUnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAUjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ClassConstructor } from "@aom-js/core";
|
|
2
|
+
import { ArgumentsDecoratorHandler, type AomParameterDescriptor } from "../../common/index.js";
|
|
3
|
+
import type { FwdContainer, ThisRefContainer, RouteRefContainer } from "../../common/index.js";
|
|
4
|
+
import { AomApi } from "../../common/index.js";
|
|
5
|
+
export declare function Args(handler?: ArgumentsDecoratorHandler, descriptor?: AomParameterDescriptor): ReturnType<typeof AomApi.parameterDecorator>;
|
|
6
|
+
export declare function Query(queryHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
|
|
7
|
+
export declare function Body(bodyHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
|
|
8
|
+
export declare function Params(paramsHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
|
|
9
|
+
export declare function Cookies(paramsHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
|
|
10
|
+
export declare function Session(sessionName?: string): ReturnType<typeof Args>;
|
|
11
|
+
export declare function Files(fileName?: string): ReturnType<typeof Args>;
|
|
12
|
+
export declare function Headers(headerHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
|
|
13
|
+
export declare function Run(): ReturnType<typeof Args>;
|
|
14
|
+
export declare function Ctx(): ParameterDecorator;
|
|
15
|
+
export declare function Err(ErrorConstructor?: ClassConstructor): ReturnType<typeof Args>;
|
|
16
|
+
export declare function Req(): ParameterDecorator;
|
|
17
|
+
export declare function Res(): ParameterDecorator;
|
|
18
|
+
export declare function Cursor(): ReturnType<typeof Args>;
|
|
19
|
+
export declare function Route(): ReturnType<typeof Args>;
|
|
20
|
+
export declare function State(constructor?: ClassConstructor): ReturnType<typeof Args>;
|
|
21
|
+
export declare function This(constructor?: ClassConstructor | FwdContainer | RouteRefContainer | ThisRefContainer): ReturnType<typeof Args>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/arguments/index.ts"],"names":[],"mappings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