@aom-js/router 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +768 -0
- package/README.md +0 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Title = Title;
|
|
4
|
+
exports.Description = Description;
|
|
5
|
+
const common_1 = require("../../common/index.js");
|
|
6
|
+
function Title(value) {
|
|
7
|
+
return common_1.AomApi.combinedDecorator(($) => {
|
|
8
|
+
$.title = value;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function Description(value) {
|
|
12
|
+
return common_1.AomApi.combinedDecorator(($) => {
|
|
13
|
+
$.description = value;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/docs/index.ts"],"names":[],"mappings":";;;;AACA,yCAAsC;AA2BtC,eAAsB,KAAa;IACjC,OAAO,eAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE;QACpC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAUD,qBAA4B,KAAa;IACvC,OAAO,eAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE;QACpC,CAAC,CAAC,WAAW,GAAG,KAAK,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HandlerFunction, HTTPMethods } from "../../common/index.js";
|
|
2
|
+
import { AomApi } from "../../common/index.js";
|
|
3
|
+
export declare function Nextpoint(): ReturnType<typeof AomApi.methodDecorator>;
|
|
4
|
+
export declare function WebSocketPoint(path?: string): ReturnType<typeof AomApi.methodDecorator>;
|
|
5
|
+
export declare function Endpoint(method: HTTPMethods, path?: string): ReturnType<typeof AomApi.methodDecorator>;
|
|
6
|
+
export declare function Get(path?: string): MethodDecorator;
|
|
7
|
+
export declare function Get(path: string, handler: HandlerFunction): ClassDecorator;
|
|
8
|
+
export declare function Post(path?: string): MethodDecorator;
|
|
9
|
+
export declare function Post(path: string, handler: HandlerFunction): ClassDecorator;
|
|
10
|
+
export declare function Patch(path?: string): MethodDecorator;
|
|
11
|
+
export declare function Patch(path: string, handler: HandlerFunction): ClassDecorator;
|
|
12
|
+
export declare function Put(path?: string): MethodDecorator;
|
|
13
|
+
export declare function Put(path: string, handler: HandlerFunction): ClassDecorator;
|
|
14
|
+
export declare function Options(path?: string): MethodDecorator;
|
|
15
|
+
export declare function Options(path: string, handler: HandlerFunction): ClassDecorator;
|
|
16
|
+
export declare function Delete(path?: string): MethodDecorator;
|
|
17
|
+
export declare function Delete(path: string, handler: HandlerFunction): ClassDecorator;
|
|
18
|
+
export declare function All(path?: string): MethodDecorator;
|
|
19
|
+
export declare function All(path: string, handler: HandlerFunction): ClassDecorator;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/endpoints/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAyDtC,wBAAgB,SAAS,IAAI,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CASrE;AAuBD,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAY,GAAG,UAAU,C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,OAAO,EAAE,eAAe,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Nextpoint = Nextpoint;
|
|
37
|
+
exports.WebSocketPoint = WebSocketPoint;
|
|
38
|
+
exports.Endpoint = Endpoint;
|
|
39
|
+
exports.Get = Get;
|
|
40
|
+
exports.Post = Post;
|
|
41
|
+
exports.Patch = Patch;
|
|
42
|
+
exports.Put = Put;
|
|
43
|
+
exports.Options = Options;
|
|
44
|
+
exports.Delete = Delete;
|
|
45
|
+
exports.All = All;
|
|
46
|
+
const constants = __importStar(require("../../constants/index.js"));
|
|
47
|
+
const common_1 = require("../../common/index.js");
|
|
48
|
+
function defineEndpoint(method, path, handler) {
|
|
49
|
+
if (!handler) {
|
|
50
|
+
return Endpoint(method, path);
|
|
51
|
+
}
|
|
52
|
+
return common_1.AomApi.classDecorator(($) => {
|
|
53
|
+
const handlerOrigin = common_1.AomApi.instance(handler);
|
|
54
|
+
if (handlerOrigin.element.isNextpoint) {
|
|
55
|
+
$.element.endpoints.push({ method, prefix: path, $: handlerOrigin });
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
throw new Error(constants.COMMON_ENDPOINT_ERROR);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function Nextpoint() {
|
|
63
|
+
return common_1.AomApi.methodDecorator(($, descriptor) => {
|
|
64
|
+
if ($.element.isMiddleware) {
|
|
65
|
+
throw new Error(constants.NEXPOINT_DEFINE_ERROR);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
$.element.descriptor = descriptor;
|
|
69
|
+
$.element.isNextpoint = true;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function WebSocketPoint(path = "/") {
|
|
74
|
+
return common_1.AomApi.methodDecorator(($, descriptor) => {
|
|
75
|
+
if ($.element.isMiddleware || $.element.isNextpoint) {
|
|
76
|
+
throw new Error(constants.NEXPOINT_DEFINE_ERROR);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
$.element.descriptor = descriptor;
|
|
80
|
+
$.element.isWebsocket = true;
|
|
81
|
+
$._.root.element.websockets.push({ method: "sockets", prefix: path, $ });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function Endpoint(method, path = "/") {
|
|
86
|
+
return common_1.AomApi.methodDecorator(($, descriptor) => {
|
|
87
|
+
if ($.element.isMiddleware || $.element.isWebsocket) {
|
|
88
|
+
throw new Error(constants.ENDPOINT_DEFINE_ERROR);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
$.element.descriptor = descriptor;
|
|
92
|
+
$.element.isEndpoint = true;
|
|
93
|
+
$._.root.element.endpoints.push({ method, prefix: path, $ });
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function Get(path = "/", handler) {
|
|
98
|
+
const method = "get";
|
|
99
|
+
return defineEndpoint(method, path, handler);
|
|
100
|
+
}
|
|
101
|
+
function Post(path = "/", handler) {
|
|
102
|
+
const method = "post";
|
|
103
|
+
return defineEndpoint(method, path, handler);
|
|
104
|
+
}
|
|
105
|
+
function Patch(path = "/", handler) {
|
|
106
|
+
const method = "patch";
|
|
107
|
+
return defineEndpoint(method, path, handler);
|
|
108
|
+
}
|
|
109
|
+
function Put(path = "/", handler) {
|
|
110
|
+
const method = "put";
|
|
111
|
+
return defineEndpoint(method, path, handler);
|
|
112
|
+
}
|
|
113
|
+
function Options(path = "/", handler) {
|
|
114
|
+
const method = "options";
|
|
115
|
+
return defineEndpoint(method, path, handler);
|
|
116
|
+
}
|
|
117
|
+
function Delete(path = "/", handler) {
|
|
118
|
+
const method = "delete";
|
|
119
|
+
return defineEndpoint(method, path, handler);
|
|
120
|
+
}
|
|
121
|
+
function All(path = "/", handler) {
|
|
122
|
+
const method = "all";
|
|
123
|
+
return defineEndpoint(method, path, handler);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/endpoints/index.ts"],"names":[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,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AA0BD,eACE,IAAI,GAAW,GAAG,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAyBD,aACE,IAAI,GAAW,GAAG,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,KAAK,CAAC;IACrB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AA0BD,iBACE,IAAI,GAAW,GAAG,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAyBD,gBACE,IAAI,GAAW,GAAG,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,QAAQ,CAAC;IACxB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AA2BD,aACE,IAAI,GAAW,GAAG,EAClB,OAAyB;IAEzB,MAAM,MAAM,GAAG,KAAK,CAAC;IACrB,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./arguments/index.js";
|
|
2
|
+
export * from "./controllers/index.js";
|
|
3
|
+
export * from "./middlewares/index.js";
|
|
4
|
+
export * from "./endpoints/index.js";
|
|
5
|
+
export * from "./docs/index.js";
|
|
6
|
+
export * from "./openapi/index.js";
|
|
7
|
+
export * from "./references/index.js";
|
|
8
|
+
export * from "./kinds/index.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./arguments/index.js"), exports);
|
|
18
|
+
__exportStar(require("./controllers/index.js"), exports);
|
|
19
|
+
__exportStar(require("./middlewares/index.js"), exports);
|
|
20
|
+
__exportStar(require("./endpoints/index.js"), exports);
|
|
21
|
+
__exportStar(require("./docs/index.js"), exports);
|
|
22
|
+
__exportStar(require("./openapi/index.js"), exports);
|
|
23
|
+
__exportStar(require("./references/index.js"), exports);
|
|
24
|
+
__exportStar(require("./kinds/index.js"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,yCAAuB;AACvB,4CAA0B;AAC1B,+CAA6B;AAC7B,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/kinds/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,aAAa,EAAE,MAAM,cAAc,CAAC;AA+BrD,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,eAAe,CAM/D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CursorKind = CursorKind;
|
|
37
|
+
const constants = __importStar(require("../../constants/index.js"));
|
|
38
|
+
const common_1 = require("../../common/index.js");
|
|
39
|
+
const cursorKinds = Object.values(common_1.AomCursorKind);
|
|
40
|
+
function CursorKind(kind) {
|
|
41
|
+
if (!cursorKinds.includes(kind))
|
|
42
|
+
throw new Error(constants.CURSOR_KIND_DEFINE_ERROR);
|
|
43
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
44
|
+
if ($.element.cursorKind)
|
|
45
|
+
throw new Error(constants.CURSOR_KIND_DEFINE_ERROR);
|
|
46
|
+
$.element.cursorKind = kind;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/kinds/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,SAAS,4CAAwB;AAC7C,yCAAqD;AAErD,MAAM,WAAW,GAAa,MAAM,CAAC,MAAM,CAAC,sBAAa,CAAC,CAAC;AA6B3D,oBAA2B,IAAmB;IAC5C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACrF,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAC9E,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CombinedDecorator, ClassType } from "@aom-js/core";
|
|
2
|
+
import { FwdContainer, HandlerFunction, MarkerHandler, MiddlewareHandler } from "../../common/index.js";
|
|
3
|
+
export declare function Before(...middlewares: Array<MiddlewareHandler | FwdContainer>): CombinedDecorator;
|
|
4
|
+
export declare function After(...middlewares: Array<MiddlewareHandler | FwdContainer>): CombinedDecorator;
|
|
5
|
+
export declare function Middleware(): MethodDecorator;
|
|
6
|
+
export declare function Bridge(prefix: string, nextRoute: ClassType): CombinedDecorator;
|
|
7
|
+
export declare function Marker(): MethodDecorator;
|
|
8
|
+
export declare function UseMarker(handler: MarkerHandler | FwdContainer): MethodDecorator;
|
|
9
|
+
export declare function Next(handler: HandlerFunction | FwdContainer): MethodDecorator;
|
|
10
|
+
export declare function OnInstance(): MethodDecorator;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/middlewares/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAoC,MAAM,cAAc,CAAC;AAG9F,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAmD/F,wBAAgB,MAAM,CAAC,GAAG,WAAW,EAAE,KAAK,CAAC,iBAAiB,GAAG,YAAY,CAAC,GAAG,iBAAiB,CAkBjG;AAwCD,wBAAgB,KAAK,CAAC,GAAG,WAAW,EAAE,KAAK,CAAC,iBAAiB,GAAG,YAAY,CAAC,GAAG,iBAAiB,CAShG;AAsCD,wBAAgB,UAAU,IAAI,eAAe,CAc5C;AAoCD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAW9E;AA+BD,wBAAgB,MAAM,IAAI,eAAe,CAKxC;AA+BD,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,GAAG,eAAe,CAahF;AAgCD,wBAAgB,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,YAAY,GAAG,eAAe,CAY7E;AAyDD,wBAAgB,UAAU,IAAI,eAAe,CAe5C"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Before = Before;
|
|
37
|
+
exports.After = After;
|
|
38
|
+
exports.Middleware = Middleware;
|
|
39
|
+
exports.Bridge = Bridge;
|
|
40
|
+
exports.Marker = Marker;
|
|
41
|
+
exports.UseMarker = UseMarker;
|
|
42
|
+
exports.Next = Next;
|
|
43
|
+
exports.OnInstance = OnInstance;
|
|
44
|
+
const core_1 = require("@aom-js/core");
|
|
45
|
+
const constants = __importStar(require("../../constants/index.js"));
|
|
46
|
+
const common_1 = require("../../common/index.js");
|
|
47
|
+
const common_2 = require("../../common/index.js");
|
|
48
|
+
function checkMiddleware($) {
|
|
49
|
+
if (!$.element.isMiddleware)
|
|
50
|
+
throw new Error(constants.USE_MIDDLEWARE_DEFINE_ERROR);
|
|
51
|
+
return $;
|
|
52
|
+
}
|
|
53
|
+
function Before(...middlewares) {
|
|
54
|
+
return common_2.AomApi.combinedDecorator(($) => {
|
|
55
|
+
$.element.addPreMiddlewares(...middlewares
|
|
56
|
+
.map((middleware) => middleware instanceof common_1.FwdContainer ? middleware.exec() : middleware)
|
|
57
|
+
.map((middleware) => common_2.AomApi.resolveFor(common_2.AomApi.instance(middleware), $._.target))
|
|
58
|
+
.map(checkMiddleware));
|
|
59
|
+
}, core_1.ExecutionPhase.LAST, core_1.InheritPlacement.PREPEND);
|
|
60
|
+
}
|
|
61
|
+
function After(...middlewares) {
|
|
62
|
+
return common_2.AomApi.combinedDecorator(($) => {
|
|
63
|
+
$.element.addPostMiddlewares(...middlewares
|
|
64
|
+
.map((middleware) => (middleware instanceof common_1.FwdContainer ? middleware.exec() : middleware))
|
|
65
|
+
.map((middleware) => common_2.AomApi.resolveFor(common_2.AomApi.instance(middleware), $._.target))
|
|
66
|
+
.map(checkMiddleware));
|
|
67
|
+
}, core_1.ExecutionPhase.LAST);
|
|
68
|
+
}
|
|
69
|
+
function Middleware() {
|
|
70
|
+
return common_2.AomApi.methodDecorator(($, descriptor) => {
|
|
71
|
+
if ($.element.isNextpoint ||
|
|
72
|
+
$.element.isEndpoint ||
|
|
73
|
+
$.element.isWebsocket ||
|
|
74
|
+
$.element.isInstance) {
|
|
75
|
+
throw new Error(constants.MIDDLEWARE_DEFINE_ERROR);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
$.element.descriptor = descriptor;
|
|
79
|
+
$.element.isMiddleware = true;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function Bridge(prefix, nextRoute) {
|
|
84
|
+
return common_2.AomApi.combinedDecorator(($, descriptor) => {
|
|
85
|
+
const next = common_2.AomApi.instance(nextRoute);
|
|
86
|
+
if (descriptor) {
|
|
87
|
+
$.element.descriptor = descriptor;
|
|
88
|
+
next.element.pre_middlewares = [$, ...next.element.pre_middlewares];
|
|
89
|
+
}
|
|
90
|
+
$._.root.element.bridges.push({ prefix, next, $ });
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function Marker() {
|
|
94
|
+
return common_2.AomApi.methodDecorator(($, descriptor) => {
|
|
95
|
+
$.element.isMarker = true;
|
|
96
|
+
$.element.descriptor = descriptor;
|
|
97
|
+
}, core_1.ExecutionPhase.FIRST);
|
|
98
|
+
}
|
|
99
|
+
function UseMarker(handler) {
|
|
100
|
+
return common_2.AomApi.methodDecorator(($, descriptor) => {
|
|
101
|
+
const marker = common_2.AomApi.resolveFor(common_2.AomApi.instance(handler instanceof common_1.FwdContainer ? handler.exec() : handler), $._.target);
|
|
102
|
+
if (marker.element.isMarker) {
|
|
103
|
+
$.element.descriptor = descriptor;
|
|
104
|
+
$.element.markers.push(marker);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
throw new Error(constants.USE_MARKER_DEFINE_ERROR);
|
|
108
|
+
}
|
|
109
|
+
}, core_1.ExecutionPhase.LAST);
|
|
110
|
+
}
|
|
111
|
+
function Next(handler) {
|
|
112
|
+
return common_2.AomApi.methodDecorator(($, descriptor) => {
|
|
113
|
+
const handlerInstance = common_2.AomApi.resolveFor(common_2.AomApi.instance(handler instanceof common_1.FwdContainer ? handler.exec() : handler), $._.target);
|
|
114
|
+
if (handlerInstance.element.isNextpoint) {
|
|
115
|
+
$.element.addNextpoint(handlerInstance);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new Error(constants.USE_NEXT_DEFINE_ERROR);
|
|
119
|
+
}
|
|
120
|
+
}, core_1.ExecutionPhase.LAST);
|
|
121
|
+
}
|
|
122
|
+
function OnInstance() {
|
|
123
|
+
return common_2.AomApi.methodDecorator(($, descriptor) => {
|
|
124
|
+
if ($.element.isNextpoint ||
|
|
125
|
+
$.element.isEndpoint ||
|
|
126
|
+
$.element.isWebsocket ||
|
|
127
|
+
$.element.isMiddleware) {
|
|
128
|
+
throw new Error(constants.ON_INSTANCE_DEFINE_ERROR);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
$.element.descriptor = descriptor;
|
|
132
|
+
$.element.isInstance = true;
|
|
133
|
+
$._.root.element.instanceHooks.push($);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/middlewares/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC;YACxC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,EAAE,qBAAc,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAyDD;IACE,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;QAC9C,IACE,CAAC,CAAC,OAAO,CAAC,WAAW;YACrB,CAAC,CAAC,OAAO,CAAC,UAAU;YACpB,CAAC,CAAC,OAAO,CAAC,WAAW;YACrB,CAAC,CAAC,OAAO,CAAC,YAAY,EACtB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;YAClC,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;YAC5B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AomApi, OpenApiParameterObject, OpenApiPathParameterObject, OpenApiPathParameters, OpenApiRequestBody, OpenApiResponse, OpenApiSecuritySchema } from "../../common/index.js";
|
|
2
|
+
export * from "./tags.js";
|
|
3
|
+
export declare function Security(schema: OpenApiSecuritySchema): ReturnType<typeof AomApi.combinedDecorator>;
|
|
4
|
+
export declare function RequestBody(schema: OpenApiRequestBody): ReturnType<typeof AomApi.methodDecorator>;
|
|
5
|
+
export declare function Responses(...schemas: OpenApiResponse[]): ReturnType<typeof AomApi.methodDecorator>;
|
|
6
|
+
export declare function PathParameters(...schemas: OpenApiPathParameters[]): ReturnType<typeof AomApi.methodDecorator>;
|
|
7
|
+
export declare function QueryParameters(...schemas: OpenApiPathParameterObject[]): ReturnType<typeof AomApi.methodDecorator>;
|
|
8
|
+
export declare function CookieParameters(...schemas: OpenApiPathParameterObject[]): ReturnType<typeof AomApi.methodDecorator>;
|
|
9
|
+
export declare function Parameters(...schemas: OpenApiParameterObject[]): ReturnType<typeof AomApi.methodDecorator>;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/openapi/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EAGtB,MAAM,cAAc,CAAC;AAEtB,cAAc,QAAQ,CAAC;AAyBvB,wBAAgB,QAAQ,CACtB,MAAM,EAAE,qBAAqB,GAC5B,UAAU,CAAC,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAI7C;AA+BD,wBAAgB,WAAW,CAAC,MAAM,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAIjG;AAgCD,wBAAgB,SAAS,CACvB,GAAG,OAAO,EAAE,eAAe,EAAE,GAC5B,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAI3C;AAyBD,wBAAgB,cAAc,CAC5B,GAAG,OAAO,EAAE,qBAAqB,EAAE,GAClC,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAI3C;AAsBD,wBAAgB,eAAe,CAC7B,GAAG,OAAO,EAAE,0BAA0B,EAAE,GACvC,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAI3C;AAsBD,wBAAgB,gBAAgB,CAC9B,GAAG,OAAO,EAAE,0BAA0B,EAAE,GACvC,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAI3C;AAuBD,wBAAgB,UAAU,CACxB,GAAG,OAAO,EAAE,sBAAsB,EAAE,GACnC,UAAU,CAAC,OAAO,MAAM,CAAC,eAAe,CAAC,CAI3C"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Security = Security;
|
|
18
|
+
exports.RequestBody = RequestBody;
|
|
19
|
+
exports.Responses = Responses;
|
|
20
|
+
exports.PathParameters = PathParameters;
|
|
21
|
+
exports.QueryParameters = QueryParameters;
|
|
22
|
+
exports.CookieParameters = CookieParameters;
|
|
23
|
+
exports.Parameters = Parameters;
|
|
24
|
+
const common_1 = require("../../common/index.js");
|
|
25
|
+
__exportStar(require("./tags.js"), exports);
|
|
26
|
+
function Security(schema) {
|
|
27
|
+
return common_1.AomApi.combinedDecorator(($) => {
|
|
28
|
+
$.openApi.security = schema;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function RequestBody(schema) {
|
|
32
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
33
|
+
$.openApi.requestBody = schema;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function Responses(...schemas) {
|
|
37
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
38
|
+
$.openApi.responses.push(...schemas);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function PathParameters(...schemas) {
|
|
42
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
43
|
+
$.openApi.path.push(...schemas);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function QueryParameters(...schemas) {
|
|
47
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
48
|
+
$.openApi.parameters.push(...schemas.map((schema) => ({ ...schema, in: "query" })));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function CookieParameters(...schemas) {
|
|
52
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
53
|
+
$.openApi.parameters.push(...schemas.map((schema) => ({ ...schema, in: "cookie" })));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function Parameters(...schemas) {
|
|
57
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
58
|
+
$.openApi.parameters.push(...schemas);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/openapi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAWsB;AAEtB,yCAAuB;AAyBvB,kBACE,MAA6B;IAE7B,OAAO,eAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE;QACpC,CAAC,CAAC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC;AA+BD,qBAA4B,MAA0B;IACpD,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;IACjC,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C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClassType } from "@aom-js/core";
|
|
2
|
+
export declare function UseTag(constructor: ClassType): MethodDecorator;
|
|
3
|
+
export declare function IgnoreNextTags(): MethodDecorator;
|
|
4
|
+
export declare function MergeNextTags(): MethodDecorator;
|
|
5
|
+
export declare function ReplaceNextTags(): MethodDecorator;
|
|
6
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../../src/decorators/openapi/tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgCzC,wBAAgB,MAAM,CAAC,WAAW,EAAE,SAAS,mBAI5C;AAWD,wBAAgB,cAAc,oBAI7B;AA+BD,wBAAgB,aAAa,oBAI5B;AAWD,wBAAgB,eAAe,oBAI9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UseTag = UseTag;
|
|
4
|
+
exports.IgnoreNextTags = IgnoreNextTags;
|
|
5
|
+
exports.MergeNextTags = MergeNextTags;
|
|
6
|
+
exports.ReplaceNextTags = ReplaceNextTags;
|
|
7
|
+
const common_1 = require("../../common/index.js");
|
|
8
|
+
function UseTag(constructor) {
|
|
9
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
10
|
+
$.openApi.tag.$ = common_1.AomApi.instance(constructor);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function IgnoreNextTags() {
|
|
14
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
15
|
+
$.openApi.tag.rule = common_1.TagsRules.IGNORE;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function MergeNextTags() {
|
|
19
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
20
|
+
$.openApi.tag.rule = common_1.TagsRules.MERGE;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function ReplaceNextTags() {
|
|
24
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
25
|
+
$.openApi.tag.rule = common_1.TagsRules.REPLACE;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../../src/decorators/openapi/tags.ts"],"names":[],"mappings":";;;;;;AACA,yCAAiD;AA+BjD,gBAAuB,WAAsB;IAC3C,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,eAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC;AAWD;IACE,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,kBAAS,CAAC,MAAM,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AA+BD;IACE,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,kBAAS,CAAC,KAAK,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAWD;IACE,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,kBAAS,CAAC,OAAO,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/references/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AA2CzF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAC3D,eAAe,CAIjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelayRefStack = DelayRefStack;
|
|
4
|
+
const common_1 = require("../../common/index.js");
|
|
5
|
+
function DelayRefStack(handler) {
|
|
6
|
+
return common_1.AomApi.methodDecorator(($) => {
|
|
7
|
+
$.delayStack.push(handler);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/references/index.ts"],"names":[],"mappings":";;;AAAA,yCAAyF;AA2CzF,uBACE,OAA4D;IAE5D,OAAO,eAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE;QAClC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
export * from "./decorators/index.js";
|
|
3
|
+
export * from "./specials/index.js";
|
|
4
|
+
export * from "./types/index.js";
|
|
5
|
+
export * from "./classes/index.js";
|
|
6
|
+
export * from "./common/openapi.js";
|
|
7
|
+
export * from "./common/classes.js";
|
|
8
|
+
export * from "./common/types.js";
|
|
9
|
+
export * from "./common/lazy.js";
|
|
10
|
+
export * from "./common/kinds.js";
|
|
11
|
+
export { compilePath } from "./common/path.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|