@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,44 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./errors.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Controller(): ClassDecorator;
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
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";
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
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>;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./references.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FwdContainer, FwdFunction, RefFunction, RouteRefContainer, ThisRefContainer } from "../common/index.js";
|
|
2
|
+
export declare function FwdRef(fn: FwdFunction): FwdContainer;
|
|
3
|
+
export declare function ThisRef(fn?: RefFunction): ThisRefContainer;
|
|
4
|
+
export declare function RouteRef(fn?: RefFunction): RouteRefContainer;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AomCursor } from "../common/cursor.js";
|
|
2
|
+
import type { AomCursorKind } from "../common/kinds.js";
|
|
3
|
+
import type { AomRoute } from "../common/route.js";
|
|
4
|
+
import type { Router } from "../classes/index.js";
|
|
5
|
+
export declare const routeName: ({ method, path }: {
|
|
6
|
+
method: string;
|
|
7
|
+
path: string;
|
|
8
|
+
}) => string;
|
|
9
|
+
export declare function parentsOf(cursors: AomCursor[]): number[];
|
|
10
|
+
export declare function sharedEndpoints(router: Router): string[];
|
|
11
|
+
export declare function accessIdents(router: Router): Map<string, Set<unknown>>;
|
|
12
|
+
export declare const identCollisions: (router: Router) => string[];
|
|
13
|
+
export declare function serializationErrors(router: Router): string[];
|
|
14
|
+
export declare function constructorThisRefs(router: Router): {
|
|
15
|
+
inspected: number;
|
|
16
|
+
found: string[];
|
|
17
|
+
};
|
|
18
|
+
export interface RepeatOptions {
|
|
19
|
+
kindOf: (cursor: AomCursor) => AomCursorKind;
|
|
20
|
+
writes: (cursor: AomCursor) => boolean;
|
|
21
|
+
harmless: AomCursorKind[];
|
|
22
|
+
}
|
|
23
|
+
export type RepeatBranch = "kind" | "next-group" | "after-handler";
|
|
24
|
+
export interface Repeat {
|
|
25
|
+
step: AomCursor["$"]["_"];
|
|
26
|
+
i: number;
|
|
27
|
+
earlier: number[];
|
|
28
|
+
branch?: RepeatBranch;
|
|
29
|
+
}
|
|
30
|
+
export declare function repeatsOf(route: AomRoute, { kindOf, writes, harmless }: RepeatOptions): Repeat[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ClassConstructor } from "@aom-js/core";
|
|
2
|
+
import type { AomRoute } from "../common/route.js";
|
|
3
|
+
import type { HandlerFunction } from "../common/types.js";
|
|
4
|
+
import type { HttpContextValues } from "../types/index.js";
|
|
5
|
+
export type RouteOutcome = "ok" | number | "any";
|
|
6
|
+
export declare const probeMeta: WeakMap<HandlerFunction, {
|
|
7
|
+
title: string;
|
|
8
|
+
input?: Partial<HttpContextValues>;
|
|
9
|
+
route: RouteOutcome;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function Probe(title: string, input?: Partial<HttpContextValues>, expect?: {
|
|
12
|
+
route?: RouteOutcome;
|
|
13
|
+
}): MethodDecorator;
|
|
14
|
+
export declare function Observe<T extends object>(target: ClassConstructor<T>): ParameterDecorator;
|
|
15
|
+
export declare const Report: () => ParameterDecorator;
|
|
16
|
+
export type RouteMatch = {
|
|
17
|
+
match: (route: AomRoute) => boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const endpointOf: (tester: object) => HandlerFunction | undefined;
|
|
20
|
+
export declare const matchOf: (tester: object) => ((route: AomRoute) => boolean) | undefined;
|
|
21
|
+
export declare const isTester: (cls: object) => boolean;
|
|
22
|
+
export declare function Tester(target: HandlerFunction | RouteMatch): ClassDecorator;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
export { Observe, Probe, Report, Tester, isTester, type RouteMatch, type RouteOutcome } from "./decorators.js";
|
|
3
|
+
export { TesterReport, type CheckResult } from "./report.js";
|
|
4
|
+
export { routesOf, runAcross, runProbes, runSteps, type AcrossOptions, type RunOptions } from "./runner.js";
|
|
5
|
+
export type { CreatedRecord } from "../common/context.js";
|
|
6
|
+
export { accessIdents, constructorThisRefs, identCollisions, parentsOf, repeatsOf, type Repeat, type RepeatBranch, type RepeatOptions, routeName, serializationErrors, sharedEndpoints, } from "./chain.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CreatedRecord } from "../common/context.js";
|
|
2
|
+
export type CheckResult = {
|
|
3
|
+
probe: string;
|
|
4
|
+
check: string;
|
|
5
|
+
ok: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
route?: string;
|
|
8
|
+
set?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class TesterReport {
|
|
11
|
+
readonly results: CheckResult[];
|
|
12
|
+
routeError?: unknown;
|
|
13
|
+
created?: CreatedRecord[];
|
|
14
|
+
probe: string;
|
|
15
|
+
route: string;
|
|
16
|
+
set: string;
|
|
17
|
+
private counter;
|
|
18
|
+
get checks(): number;
|
|
19
|
+
get failures(): CheckResult[];
|
|
20
|
+
check(name: string, assertion: boolean | (() => void)): this;
|
|
21
|
+
violation(probe: string, what: string, error: string): void;
|
|
22
|
+
private where;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ClassConstructor } from "@aom-js/core";
|
|
2
|
+
import type { Router } from "../classes/index.js";
|
|
3
|
+
import { AomCursor } from "../common/cursor.js";
|
|
4
|
+
import { type AomRoute } from "../common/route.js";
|
|
5
|
+
import type { HandlerFunction } from "../common/types.js";
|
|
6
|
+
import type { HttpContextValues } from "../types/index.js";
|
|
7
|
+
import { TesterReport } from "./report.js";
|
|
8
|
+
export type RunOptions = {
|
|
9
|
+
values?: Partial<HttpContextValues>;
|
|
10
|
+
cursors?: HandlerFunction[];
|
|
11
|
+
preset?: Array<[ClassConstructor<object>, object]>;
|
|
12
|
+
};
|
|
13
|
+
export declare function runProbes(tester: object, router: Router, options?: RunOptions): Promise<TesterReport>;
|
|
14
|
+
export declare function routesOf(tester: object, routers: Router | Router[]): AomRoute[];
|
|
15
|
+
export type AcrossOptions = {
|
|
16
|
+
values: (route: AomRoute) => Partial<HttpContextValues> | Partial<HttpContextValues>[] | undefined;
|
|
17
|
+
steps?: (route: AomRoute) => AomCursor[];
|
|
18
|
+
preset?: RunOptions["preset"];
|
|
19
|
+
skip?: Map<HandlerFunction, string>;
|
|
20
|
+
};
|
|
21
|
+
export declare function runAcross(tester: object, routers: Router | Router[], options: AcrossOptions): Promise<TesterReport>;
|
|
22
|
+
export declare function runSteps(route: AomRoute, values?: Partial<HttpContextValues>, steps?: AomCursor[]): Promise<unknown>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HandlerFunction } from "../common/types.js";
|
|
2
|
+
import { Lazy } from "../common/lazy.js";
|
|
3
|
+
export declare type RunFunction = (...middlewares: HandlerFunction[]) => Promise<any>;
|
|
4
|
+
export declare interface HttpContextValues {
|
|
5
|
+
ctx: any;
|
|
6
|
+
req: any;
|
|
7
|
+
res: any;
|
|
8
|
+
body: any;
|
|
9
|
+
files: any;
|
|
10
|
+
query: Lazy<Record<string, string | string[]>>;
|
|
11
|
+
params: Lazy<Record<string, string>>;
|
|
12
|
+
cookies: Lazy<Record<string, string>>;
|
|
13
|
+
headers: Lazy<Record<string, string | string[]>>;
|
|
14
|
+
session: Lazy<Record<string, any>>;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "0.1.0",
|
|
2
3
|
"name": "@aom-js/router",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"description": "`@aom` meta-framework router code",
|
|
5
|
+
"homepage": "https://github.com/aom-js/main#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/aom-js/main/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/aom-js/main.git",
|
|
12
|
+
"directory": "packages/router"
|
|
13
|
+
},
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"author": "Grigory B. Kholstinnikov (scarych)",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@aom-js/core": "0.1.0",
|
|
18
|
+
"@aom-js/schemer": "0.1.0",
|
|
19
|
+
"openapi3-ts": "^4.6.1",
|
|
20
|
+
"reflect-metadata": "^0.2.2",
|
|
21
|
+
"rxjs": "^7.8.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^26.1.2",
|
|
25
|
+
"tslib": "^2.8.1",
|
|
26
|
+
"typescript": "^7.0.2"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/cjs/index.js",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/types/index.d.ts",
|
|
33
|
+
"default": "./dist/mjs/index.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/cjs/index.d.ts",
|
|
37
|
+
"default": "./dist/cjs/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"./testing": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/types/testing/index.d.ts",
|
|
43
|
+
"default": "./dist/mjs/testing/index.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/cjs/testing/index.d.ts",
|
|
47
|
+
"default": "./dist/cjs/testing/index.js"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"type": "module",
|
|
55
|
+
"module": "./dist/mjs/index.js",
|
|
56
|
+
"types": "./dist/types/index.d.ts",
|
|
57
|
+
"files": [
|
|
58
|
+
"./dist/cjs",
|
|
59
|
+
"./dist/mjs",
|
|
60
|
+
"./dist/types"
|
|
61
|
+
],
|
|
62
|
+
"scripts": {
|
|
63
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
64
|
+
"clean": "rm -rf dist/",
|
|
65
|
+
"prebuild": "rm -rf dist/",
|
|
66
|
+
"build": "tsc --project tsconfig.build.json && tsc --project tsconfig.build.mjs.json && tsc --project tsconfig.build.types.json && node ../../scripts/post-build.js",
|
|
67
|
+
"prepare": ""
|
|
68
|
+
}
|
|
6
69
|
}
|