@mxpicture/gcp-functions-common 0.2.69 → 0.2.71
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/annotation/anno.head.d.ts +7 -0
- package/dist/annotation/anno.head.d.ts.map +1 -0
- package/dist/annotation/anno.head.js +34 -0
- package/dist/annotation/anno.head.js.map +1 -0
- package/dist/annotation/anno.property.d.ts +4 -0
- package/dist/annotation/anno.property.d.ts.map +1 -0
- package/dist/annotation/anno.property.js +14 -0
- package/dist/annotation/anno.property.js.map +1 -0
- package/dist/annotation/index.d.ts +3 -0
- package/dist/annotation/index.d.ts.map +1 -0
- package/dist/annotation/index.js +4 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/decorator/DecoArray.d.ts +22 -0
- package/dist/decorator/DecoArray.d.ts.map +1 -0
- package/dist/decorator/DecoArray.js +41 -0
- package/dist/decorator/DecoArray.js.map +1 -0
- package/dist/decorator/DecoBoolean.d.ts +11 -0
- package/dist/decorator/DecoBoolean.d.ts.map +1 -0
- package/dist/decorator/DecoBoolean.js +13 -0
- package/dist/decorator/DecoBoolean.js.map +1 -0
- package/dist/decorator/DecoDate.d.ts +12 -0
- package/dist/decorator/DecoDate.d.ts.map +1 -0
- package/dist/decorator/DecoDate.js +13 -0
- package/dist/decorator/DecoDate.js.map +1 -0
- package/dist/decorator/DecoNumber.d.ts +23 -0
- package/dist/decorator/DecoNumber.d.ts.map +1 -0
- package/dist/decorator/DecoNumber.js +37 -0
- package/dist/decorator/DecoNumber.js.map +1 -0
- package/dist/decorator/DecoObject.d.ts +11 -0
- package/dist/decorator/DecoObject.d.ts.map +1 -0
- package/dist/decorator/DecoObject.js +9 -0
- package/dist/decorator/DecoObject.js.map +1 -0
- package/dist/decorator/DecoProperty.d.ts +27 -0
- package/dist/decorator/DecoProperty.d.ts.map +1 -0
- package/dist/decorator/DecoProperty.js +68 -0
- package/dist/decorator/DecoProperty.js.map +1 -0
- package/dist/decorator/DecoString.d.ts +21 -0
- package/dist/decorator/DecoString.d.ts.map +1 -0
- package/dist/decorator/DecoString.js +33 -0
- package/dist/decorator/DecoString.js.map +1 -0
- package/dist/decorator/Decorator.d.ts +33 -0
- package/dist/decorator/Decorator.d.ts.map +1 -0
- package/dist/decorator/Decorator.js +73 -0
- package/dist/decorator/Decorator.js.map +1 -0
- package/dist/decorator/deco.cast.d.ts +9 -0
- package/dist/decorator/deco.cast.d.ts.map +1 -0
- package/dist/decorator/deco.cast.js +13 -0
- package/dist/decorator/deco.cast.js.map +1 -0
- package/dist/decorator/deco.enum.d.ts +50 -0
- package/dist/decorator/deco.enum.d.ts.map +1 -0
- package/dist/decorator/deco.enum.js +73 -0
- package/dist/decorator/deco.enum.js.map +1 -0
- package/dist/decorator/deco.names.d.ts +20 -0
- package/dist/decorator/deco.names.d.ts.map +1 -0
- package/dist/decorator/deco.names.js +20 -0
- package/dist/decorator/deco.names.js.map +1 -0
- package/dist/decorator/deco.paths.d.ts +7 -0
- package/dist/decorator/deco.paths.d.ts.map +1 -0
- package/dist/decorator/deco.paths.js +14 -0
- package/dist/decorator/deco.paths.js.map +1 -0
- package/dist/decorator/deco.properties.d.ts +9 -0
- package/dist/decorator/deco.properties.d.ts.map +1 -0
- package/dist/decorator/deco.properties.js +43 -0
- package/dist/decorator/deco.properties.js.map +1 -0
- package/dist/decorator/deco.routes.d.ts +4 -0
- package/dist/decorator/deco.routes.d.ts.map +1 -0
- package/dist/decorator/deco.routes.js +22 -0
- package/dist/decorator/deco.routes.js.map +1 -0
- package/dist/decorator/index.d.ts +15 -0
- package/dist/decorator/index.d.ts.map +1 -0
- package/dist/decorator/index.js +16 -0
- package/dist/decorator/index.js.map +1 -0
- package/dist/helper/helper.annotation.d.ts +3 -8
- package/dist/helper/helper.annotation.d.ts.map +1 -1
- package/dist/helper/helper.annotation.js +3 -40
- package/dist/helper/helper.annotation.js.map +1 -1
- package/dist/helper/helper.document.d.ts +1 -2
- package/dist/helper/helper.document.d.ts.map +1 -1
- package/dist/helper/helper.document.js +0 -1
- package/dist/helper/helper.document.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/types.annotation.d.ts +14 -17
- package/dist/types/types.annotation.d.ts.map +1 -1
- package/dist/types/types.annotation.js +1 -46
- package/dist/types/types.annotation.js.map +1 -1
- package/dist/types/types.deco.common.d.ts +21 -0
- package/dist/types/types.deco.common.d.ts.map +1 -0
- package/dist/types/types.deco.common.js +2 -0
- package/dist/types/types.deco.common.js.map +1 -0
- package/dist/types/types.deco.property.d.ts +62 -0
- package/dist/types/types.deco.property.d.ts.map +1 -0
- package/dist/types/types.deco.property.js +2 -0
- package/dist/types/types.deco.property.js.map +1 -0
- package/dist/types/types.document.d.ts +0 -1
- package/dist/types/types.document.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/meta/index.d.ts +0 -4
- package/dist/meta/index.d.ts.map +0 -1
- package/dist/meta/index.js +0 -5
- package/dist/meta/index.js.map +0 -1
- package/dist/meta/meta.enum.d.ts +0 -104
- package/dist/meta/meta.enum.d.ts.map +0 -1
- package/dist/meta/meta.enum.js +0 -132
- package/dist/meta/meta.enum.js.map +0 -1
- package/dist/meta/meta.main.d.ts +0 -44
- package/dist/meta/meta.main.d.ts.map +0 -1
- package/dist/meta/meta.main.js +0 -60
- package/dist/meta/meta.main.js.map +0 -1
- package/dist/meta/meta.properties.d.ts +0 -80
- package/dist/meta/meta.properties.d.ts.map +0 -1
- package/dist/meta/meta.properties.js +0 -91
- package/dist/meta/meta.properties.js.map +0 -1
- package/dist/types/types.meta.d.ts +0 -143
- package/dist/types/types.meta.d.ts.map +0 -1
- package/dist/types/types.meta.js +0 -43
- package/dist/types/types.meta.js.map +0 -1
|
@@ -1,47 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { MetaPropertyDecorator, stripMetaPropertyDataWoType, } from "../meta/meta.properties.js";
|
|
3
|
-
import { withoutBaseIgnoreValues, withoutTypeIgnoreValues, } from "./types.meta.js";
|
|
4
|
-
const annotationsRoute = {
|
|
5
|
-
name: undefined,
|
|
6
|
-
requestType: undefined,
|
|
7
|
-
responseType: undefined,
|
|
8
|
-
};
|
|
9
|
-
const annotationsRouteKeys = Object.keys(annotationsRoute);
|
|
10
|
-
export const stripAnnotationsRoute = (route) => stripObject(route, annotationsRouteKeys);
|
|
11
|
-
export const stripAnnotationsProperty = (prop) => {
|
|
12
|
-
const decorators = Object.values(MetaPropertyDecorator);
|
|
13
|
-
const result = {
|
|
14
|
-
...stripMetaPropertyDataWoType(prop),
|
|
15
|
-
propertyRef: prop.propertyRef,
|
|
16
|
-
subHeader: prop.subHeader,
|
|
17
|
-
subHeaderName: prop.subHeaderName,
|
|
18
|
-
};
|
|
19
|
-
const ignores = [...withoutBaseIgnoreValues, ...withoutTypeIgnoreValues];
|
|
20
|
-
for (const [key, params] of Object.entries(result))
|
|
21
|
-
if (decorators.find((d) => d === key))
|
|
22
|
-
for (const metaKey of Object.keys(params))
|
|
23
|
-
if (ignores.includes(metaKey))
|
|
24
|
-
delete params[metaKey];
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
const annotationsHeader = {
|
|
28
|
-
title: undefined,
|
|
29
|
-
properties: undefined,
|
|
30
|
-
routes: undefined,
|
|
31
|
-
};
|
|
32
|
-
const annotationsHeaderKeys = Object.keys(annotationsHeader);
|
|
33
|
-
export const stripAnnotationsHeader = (header, deepStrip = false) => {
|
|
34
|
-
if (deepStrip) {
|
|
35
|
-
header.routes = header.routes.map(stripAnnotationsRoute);
|
|
36
|
-
header.properties = header.properties.map(stripAnnotationsProperty);
|
|
37
|
-
}
|
|
38
|
-
return stripObject(header, annotationsHeaderKeys);
|
|
39
|
-
};
|
|
40
|
-
const annotationsError = {
|
|
41
|
-
propertyKey: undefined,
|
|
42
|
-
title: undefined,
|
|
43
|
-
error: undefined,
|
|
44
|
-
};
|
|
45
|
-
const annotationsErrorKeys = Object.keys(annotationsError);
|
|
46
|
-
export const stripAnnotationsError = (error) => stripObject(error, annotationsErrorKeys);
|
|
1
|
+
export {};
|
|
47
2
|
//# sourceMappingURL=types.annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.annotation.js","sourceRoot":"","sources":["../../src/types/types.annotation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.annotation.js","sourceRoot":"","sources":["../../src/types/types.annotation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Decorator } from "../decorator/Decorator.js";
|
|
2
|
+
export type DecoParamsKind<T> = {
|
|
3
|
+
facet?: T;
|
|
4
|
+
item?: T;
|
|
5
|
+
} | T;
|
|
6
|
+
export interface DecoFile {
|
|
7
|
+
templateFilePath: string;
|
|
8
|
+
templateRepoFilePath: string;
|
|
9
|
+
decorators: Decorator[];
|
|
10
|
+
}
|
|
11
|
+
export interface DecoRouteParams {
|
|
12
|
+
requestType: string;
|
|
13
|
+
responseType: string;
|
|
14
|
+
}
|
|
15
|
+
export type DecoRoutes = Record<string, DecoRouteParams>;
|
|
16
|
+
export interface DecoImport {
|
|
17
|
+
props: string[];
|
|
18
|
+
path: string;
|
|
19
|
+
isType?: boolean;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.deco.common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.deco.common.d.ts","sourceRoot":"","sources":["../../src/types/types.deco.common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,MAAM,cAAc,CAAC,CAAC,IACxB;IACE,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,GACD,CAAC,CAAC;AAGN,MAAM,WAAW,QAAQ;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.deco.common.js","sourceRoot":"","sources":["../../src/types/types.deco.common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { DecoPropertyType, DecoDateFormat } from "../decorator/deco.enum.js";
|
|
2
|
+
import type { Decorator } from "../decorator/Decorator.js";
|
|
3
|
+
import type { DecoParamsKind } from "./types.deco.common.js";
|
|
4
|
+
export interface DecoPropertyBase {
|
|
5
|
+
type: DecoPropertyType;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface DecoPropertyCommon {
|
|
9
|
+
title?: DecoParamsKind<string>;
|
|
10
|
+
description?: DecoParamsKind<string>;
|
|
11
|
+
optional?: boolean;
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
sortable?: boolean;
|
|
14
|
+
filterable?: boolean;
|
|
15
|
+
hidden?: DecoParamsKind<boolean>;
|
|
16
|
+
width?: string;
|
|
17
|
+
depandPopin?: boolean;
|
|
18
|
+
order?: DecoParamsKind<number>;
|
|
19
|
+
}
|
|
20
|
+
export interface DecoPropertyRaw<T extends DecoPropertyBase> {
|
|
21
|
+
common: DecoPropertyCommon;
|
|
22
|
+
data: T;
|
|
23
|
+
}
|
|
24
|
+
export interface DecoNumberOptions extends DecoPropertyBase {
|
|
25
|
+
type: DecoPropertyType.number;
|
|
26
|
+
default?: number;
|
|
27
|
+
min?: number;
|
|
28
|
+
minInclusive?: boolean;
|
|
29
|
+
max?: number;
|
|
30
|
+
maxInclusive?: boolean;
|
|
31
|
+
multipleOf?: number;
|
|
32
|
+
fractionDigits?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface DecoStringOptions extends DecoPropertyBase {
|
|
35
|
+
type: DecoPropertyType.string;
|
|
36
|
+
default?: string;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
exactLength?: number;
|
|
40
|
+
regex?: string;
|
|
41
|
+
isKey?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface DecoArrayOptions extends DecoPropertyBase {
|
|
44
|
+
type: DecoPropertyType.array;
|
|
45
|
+
sub: Decorator;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
exactLength?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface DecoObjectOptions extends DecoPropertyBase {
|
|
51
|
+
type: DecoPropertyType.object;
|
|
52
|
+
sub: Decorator;
|
|
53
|
+
}
|
|
54
|
+
export interface DecoDateOptions extends DecoPropertyBase {
|
|
55
|
+
type: DecoPropertyType.date;
|
|
56
|
+
dateFormat: DecoDateFormat;
|
|
57
|
+
}
|
|
58
|
+
export interface DecoBooleanOptions extends DecoPropertyBase {
|
|
59
|
+
type: DecoPropertyType.boolean;
|
|
60
|
+
default?: boolean;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.deco.property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.deco.property.d.ts","sourceRoot":"","sources":["../../src/types/types.deco.property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC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AAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAC7B,GAAG,EAAE,SAAS,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,SAAS,CAAC;CAChB;AAGD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAGD,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.deco.property.js","sourceRoot":"","sources":["../../src/types/types.deco.property.ts"],"names":[],"mappings":""}
|
|
@@ -12,5 +12,4 @@ export interface DocumentAdmin {
|
|
|
12
12
|
export type DocumentKeyAdmin = DocumentKey & DocumentAdmin;
|
|
13
13
|
export type WithKey<DTO extends DocumentData> = DocumentKey & DocumentAdmin & DTO;
|
|
14
14
|
export type WithoutKey<DTO extends DocumentData> = Omit<DTO, keyof DocumentKeyAdmin>;
|
|
15
|
-
export type CallbackAble<T extends DocumentData> = T | (() => T) | (() => Promise<T>);
|
|
16
15
|
//# sourceMappingURL=types.document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.document.d.ts","sourceRoot":"","sources":["../../src/types/types.document.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,CAAC;AAE3D,MAAM,MAAM,OAAO,CAAC,GAAG,SAAS,YAAY,IAAI,WAAW,GACzD,aAAa,GACb,GAAG,CAAC;AAEN,MAAM,MAAM,UAAU,CAAC,GAAG,SAAS,YAAY,IAAI,IAAI,CACrD,GAAG,EACH,MAAM,gBAAgB,CACvB,CAAC
|
|
1
|
+
{"version":3,"file":"types.document.d.ts","sourceRoot":"","sources":["../../src/types/types.document.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,CAAC;AAE3D,MAAM,MAAM,OAAO,CAAC,GAAG,SAAS,YAAY,IAAI,WAAW,GACzD,aAAa,GACb,GAAG,CAAC;AAEN,MAAM,MAAM,UAAU,CAAC,GAAG,SAAS,YAAY,IAAI,IAAI,CACrD,GAAG,EACH,MAAM,gBAAgB,CACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/gcp-functions-common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.71",
|
|
4
4
|
"description": "Utils for google cloud functions, publishing both CommonJS and ESM builds",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
"url": "git+https://github.com/MXPicture/npm-gcp-functions.git"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
|
+
"./annotation": "./dist/annotation/index.js",
|
|
14
|
+
"./package.json": "./package.json",
|
|
13
15
|
"./config": "./dist/config/index.js",
|
|
16
|
+
"./decorator": "./dist/decorator/index.js",
|
|
14
17
|
"./helper": "./dist/helper/index.js",
|
|
15
|
-
"./meta": "./dist/meta/index.js",
|
|
16
18
|
"./path": "./dist/path/index.js",
|
|
17
|
-
"./types": "./dist/types/index.js"
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
+
"./types": "./dist/types/index.js"
|
|
19
20
|
},
|
|
20
21
|
"files": [
|
|
21
22
|
"dist"
|
package/dist/meta/index.d.ts
DELETED
package/dist/meta/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/meta/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
package/dist/meta/index.js
DELETED
package/dist/meta/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/meta/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
package/dist/meta/meta.enum.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export declare enum MetaFileType {
|
|
2
|
-
doc = "doc",
|
|
3
|
-
template = "template",
|
|
4
|
-
routes = "routes",
|
|
5
|
-
backend = "backend",
|
|
6
|
-
frontend = "frontend",
|
|
7
|
-
zod = "zod",
|
|
8
|
-
annotations = "annotations"
|
|
9
|
-
}
|
|
10
|
-
export declare const guardMetaFileType: (type: string | undefined) => MetaFileType | undefined;
|
|
11
|
-
export declare enum MetaFileExtension {
|
|
12
|
-
ts = "ts",
|
|
13
|
-
json = "json"
|
|
14
|
-
}
|
|
15
|
-
export declare const guardMetaFileExtension: (ext: string | undefined) => MetaFileExtension | undefined;
|
|
16
|
-
export declare enum MetaTargetType {
|
|
17
|
-
common = "common",
|
|
18
|
-
frontend = "frontend",
|
|
19
|
-
backend = "backend"
|
|
20
|
-
}
|
|
21
|
-
export declare const guardMetaTargetType: (type: string | undefined) => MetaTargetType | undefined;
|
|
22
|
-
export declare enum MetaPropertyType {
|
|
23
|
-
string = "string",
|
|
24
|
-
number = "number",
|
|
25
|
-
boolean = "boolean",
|
|
26
|
-
date = "date",
|
|
27
|
-
array = "array",
|
|
28
|
-
object = "object",
|
|
29
|
-
key = "key",
|
|
30
|
-
createTime = "createTime",
|
|
31
|
-
updateTime = "updateTime"
|
|
32
|
-
}
|
|
33
|
-
export declare enum MetaHeadType {
|
|
34
|
-
interface = "interface",
|
|
35
|
-
mainInterface = "mainInterface"
|
|
36
|
-
}
|
|
37
|
-
export declare enum MetaPropertyArrayType {
|
|
38
|
-
string = "string",
|
|
39
|
-
number = "number",
|
|
40
|
-
boolean = "boolean",
|
|
41
|
-
date = "date",
|
|
42
|
-
object = "object"
|
|
43
|
-
}
|
|
44
|
-
export declare enum MetaNumberFormat {
|
|
45
|
-
int32 = "int32",
|
|
46
|
-
uint32 = "uint32",
|
|
47
|
-
float32 = "float32",
|
|
48
|
-
float64 = "float64",
|
|
49
|
-
safeint = "safeint"
|
|
50
|
-
}
|
|
51
|
-
export declare enum MetaDateFormat {
|
|
52
|
-
timestamp = "timestamp",
|
|
53
|
-
time = "time",
|
|
54
|
-
date = "date"
|
|
55
|
-
}
|
|
56
|
-
export declare enum MetaStringFormat {
|
|
57
|
-
email = "email",
|
|
58
|
-
url = "url",
|
|
59
|
-
emoji = "emoji",
|
|
60
|
-
uuid = "uuid",
|
|
61
|
-
guid = "guid",
|
|
62
|
-
nanoid = "nanoid",
|
|
63
|
-
cuid = "cuid",
|
|
64
|
-
cuid2 = "cuid2",
|
|
65
|
-
ulid = "ulid",
|
|
66
|
-
xid = "xid",
|
|
67
|
-
ksuid = "ksuid",
|
|
68
|
-
datetime = "datetime",
|
|
69
|
-
date = "date",
|
|
70
|
-
time = "time",
|
|
71
|
-
duration = "duration",
|
|
72
|
-
ipv4 = "ipv4",
|
|
73
|
-
ipv6 = "ipv6",
|
|
74
|
-
cidrv4 = "cidrv4",
|
|
75
|
-
cidrv6 = "cidrv6",
|
|
76
|
-
base64 = "base64",
|
|
77
|
-
base64url = "base64url",
|
|
78
|
-
json_string = "json_string",
|
|
79
|
-
e164 = "e164",
|
|
80
|
-
lowercase = "lowercase",
|
|
81
|
-
uppercase = "uppercase",
|
|
82
|
-
regex = "regex",
|
|
83
|
-
jwt = "jwt",
|
|
84
|
-
starts_with = "starts_with",
|
|
85
|
-
ends_with = "ends_with",
|
|
86
|
-
includes = "includes"
|
|
87
|
-
}
|
|
88
|
-
export declare enum MetaFacetItemType {
|
|
89
|
-
facet = "facet",
|
|
90
|
-
lineItem = "lineItem"
|
|
91
|
-
}
|
|
92
|
-
export declare const metaFacetItemTypes: MetaFacetItemType[];
|
|
93
|
-
export declare enum CrudRouteName {
|
|
94
|
-
create = "create",
|
|
95
|
-
update = "update",
|
|
96
|
-
delete = "delete",
|
|
97
|
-
get = "get",
|
|
98
|
-
query = "query",
|
|
99
|
-
count = "count",
|
|
100
|
-
exists = "exists"
|
|
101
|
-
}
|
|
102
|
-
export declare const isCrudRoute: (routeName: string) => boolean;
|
|
103
|
-
export declare const hasCrudRoute: (routeNames: string[]) => boolean;
|
|
104
|
-
//# sourceMappingURL=meta.enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.enum.d.ts","sourceRoot":"","sources":["../../src/meta/meta.enum.ts"],"names":[],"mappings":"AACA,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,WAAW,gBAAgB;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,GAAG,SAAS,KACvB,YAAY,GAAG,SAGH,CAAC;AAGhB,oBAAY,iBAAiB;IAC3B,EAAE,OAAO;IACT,IAAI,SAAS;CACd;AAED,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,GAAG,SAAS,KACtB,iBAAiB,GAAG,SAGR,CAAC;AAGhB,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,GAAG,SAAS,KACvB,cAAc,GAAG,SAGL,CAAC;AAGhB,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,UAAU,eAAe;CAC1B;AAGD,oBAAY,YAAY;IACtB,SAAS,cAAc;IACvB,aAAa,kBAAkB;CAChC;AAGD,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAGD,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAGD,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAGD,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,kBAAkB,qBAAmC,CAAC;AAGnE,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,KAAG,OACa,CAAC;AAE9D,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,EAAE,KAAG,OACM,CAAC"}
|
package/dist/meta/meta.enum.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// ----- MetaFileType --------------------------------------
|
|
2
|
-
export var MetaFileType;
|
|
3
|
-
(function (MetaFileType) {
|
|
4
|
-
MetaFileType["doc"] = "doc";
|
|
5
|
-
MetaFileType["template"] = "template";
|
|
6
|
-
MetaFileType["routes"] = "routes";
|
|
7
|
-
MetaFileType["backend"] = "backend";
|
|
8
|
-
MetaFileType["frontend"] = "frontend";
|
|
9
|
-
MetaFileType["zod"] = "zod";
|
|
10
|
-
MetaFileType["annotations"] = "annotations";
|
|
11
|
-
})(MetaFileType || (MetaFileType = {}));
|
|
12
|
-
export const guardMetaFileType = (type) => type && Object.values(MetaFileType).filter((t) => t === type)
|
|
13
|
-
? type
|
|
14
|
-
: undefined;
|
|
15
|
-
// ----- MetaFileExtension --------------------------------------
|
|
16
|
-
export var MetaFileExtension;
|
|
17
|
-
(function (MetaFileExtension) {
|
|
18
|
-
MetaFileExtension["ts"] = "ts";
|
|
19
|
-
MetaFileExtension["json"] = "json";
|
|
20
|
-
})(MetaFileExtension || (MetaFileExtension = {}));
|
|
21
|
-
export const guardMetaFileExtension = (ext) => ext && Object.values(MetaFileExtension).filter((e) => e === ext)
|
|
22
|
-
? ext
|
|
23
|
-
: undefined;
|
|
24
|
-
// ----- MetaTargetType --------------------------------------
|
|
25
|
-
export var MetaTargetType;
|
|
26
|
-
(function (MetaTargetType) {
|
|
27
|
-
MetaTargetType["common"] = "common";
|
|
28
|
-
MetaTargetType["frontend"] = "frontend";
|
|
29
|
-
MetaTargetType["backend"] = "backend";
|
|
30
|
-
})(MetaTargetType || (MetaTargetType = {}));
|
|
31
|
-
export const guardMetaTargetType = (type) => type && Object.values(MetaTargetType).filter((t) => t === type)
|
|
32
|
-
? type
|
|
33
|
-
: undefined;
|
|
34
|
-
// ----- MetaPropertyType --------------------------------------
|
|
35
|
-
export var MetaPropertyType;
|
|
36
|
-
(function (MetaPropertyType) {
|
|
37
|
-
MetaPropertyType["string"] = "string";
|
|
38
|
-
MetaPropertyType["number"] = "number";
|
|
39
|
-
MetaPropertyType["boolean"] = "boolean";
|
|
40
|
-
MetaPropertyType["date"] = "date";
|
|
41
|
-
MetaPropertyType["array"] = "array";
|
|
42
|
-
MetaPropertyType["object"] = "object";
|
|
43
|
-
MetaPropertyType["key"] = "key";
|
|
44
|
-
MetaPropertyType["createTime"] = "createTime";
|
|
45
|
-
MetaPropertyType["updateTime"] = "updateTime";
|
|
46
|
-
})(MetaPropertyType || (MetaPropertyType = {}));
|
|
47
|
-
// ----- MetaHeadType --------------------------------------
|
|
48
|
-
export var MetaHeadType;
|
|
49
|
-
(function (MetaHeadType) {
|
|
50
|
-
MetaHeadType["interface"] = "interface";
|
|
51
|
-
MetaHeadType["mainInterface"] = "mainInterface";
|
|
52
|
-
})(MetaHeadType || (MetaHeadType = {}));
|
|
53
|
-
// ----- MetaPropertyArrayType --------------------------------------
|
|
54
|
-
export var MetaPropertyArrayType;
|
|
55
|
-
(function (MetaPropertyArrayType) {
|
|
56
|
-
MetaPropertyArrayType["string"] = "string";
|
|
57
|
-
MetaPropertyArrayType["number"] = "number";
|
|
58
|
-
MetaPropertyArrayType["boolean"] = "boolean";
|
|
59
|
-
MetaPropertyArrayType["date"] = "date";
|
|
60
|
-
MetaPropertyArrayType["object"] = "object";
|
|
61
|
-
})(MetaPropertyArrayType || (MetaPropertyArrayType = {}));
|
|
62
|
-
// ----- MetaNumberFormat --------------------------------------
|
|
63
|
-
export var MetaNumberFormat;
|
|
64
|
-
(function (MetaNumberFormat) {
|
|
65
|
-
MetaNumberFormat["int32"] = "int32";
|
|
66
|
-
MetaNumberFormat["uint32"] = "uint32";
|
|
67
|
-
MetaNumberFormat["float32"] = "float32";
|
|
68
|
-
MetaNumberFormat["float64"] = "float64";
|
|
69
|
-
MetaNumberFormat["safeint"] = "safeint";
|
|
70
|
-
})(MetaNumberFormat || (MetaNumberFormat = {}));
|
|
71
|
-
// ----- MetaDateFormat --------------------------------------
|
|
72
|
-
export var MetaDateFormat;
|
|
73
|
-
(function (MetaDateFormat) {
|
|
74
|
-
MetaDateFormat["timestamp"] = "timestamp";
|
|
75
|
-
MetaDateFormat["time"] = "time";
|
|
76
|
-
MetaDateFormat["date"] = "date";
|
|
77
|
-
})(MetaDateFormat || (MetaDateFormat = {}));
|
|
78
|
-
// ----- MetaStringFormat --------------------------------------
|
|
79
|
-
export var MetaStringFormat;
|
|
80
|
-
(function (MetaStringFormat) {
|
|
81
|
-
MetaStringFormat["email"] = "email";
|
|
82
|
-
MetaStringFormat["url"] = "url";
|
|
83
|
-
MetaStringFormat["emoji"] = "emoji";
|
|
84
|
-
MetaStringFormat["uuid"] = "uuid";
|
|
85
|
-
MetaStringFormat["guid"] = "guid";
|
|
86
|
-
MetaStringFormat["nanoid"] = "nanoid";
|
|
87
|
-
MetaStringFormat["cuid"] = "cuid";
|
|
88
|
-
MetaStringFormat["cuid2"] = "cuid2";
|
|
89
|
-
MetaStringFormat["ulid"] = "ulid";
|
|
90
|
-
MetaStringFormat["xid"] = "xid";
|
|
91
|
-
MetaStringFormat["ksuid"] = "ksuid";
|
|
92
|
-
MetaStringFormat["datetime"] = "datetime";
|
|
93
|
-
MetaStringFormat["date"] = "date";
|
|
94
|
-
MetaStringFormat["time"] = "time";
|
|
95
|
-
MetaStringFormat["duration"] = "duration";
|
|
96
|
-
MetaStringFormat["ipv4"] = "ipv4";
|
|
97
|
-
MetaStringFormat["ipv6"] = "ipv6";
|
|
98
|
-
MetaStringFormat["cidrv4"] = "cidrv4";
|
|
99
|
-
MetaStringFormat["cidrv6"] = "cidrv6";
|
|
100
|
-
MetaStringFormat["base64"] = "base64";
|
|
101
|
-
MetaStringFormat["base64url"] = "base64url";
|
|
102
|
-
MetaStringFormat["json_string"] = "json_string";
|
|
103
|
-
MetaStringFormat["e164"] = "e164";
|
|
104
|
-
MetaStringFormat["lowercase"] = "lowercase";
|
|
105
|
-
MetaStringFormat["uppercase"] = "uppercase";
|
|
106
|
-
MetaStringFormat["regex"] = "regex";
|
|
107
|
-
MetaStringFormat["jwt"] = "jwt";
|
|
108
|
-
MetaStringFormat["starts_with"] = "starts_with";
|
|
109
|
-
MetaStringFormat["ends_with"] = "ends_with";
|
|
110
|
-
MetaStringFormat["includes"] = "includes";
|
|
111
|
-
})(MetaStringFormat || (MetaStringFormat = {}));
|
|
112
|
-
// ----- MetaFacetItemType --------------------------------------
|
|
113
|
-
export var MetaFacetItemType;
|
|
114
|
-
(function (MetaFacetItemType) {
|
|
115
|
-
MetaFacetItemType["facet"] = "facet";
|
|
116
|
-
MetaFacetItemType["lineItem"] = "lineItem";
|
|
117
|
-
})(MetaFacetItemType || (MetaFacetItemType = {}));
|
|
118
|
-
export const metaFacetItemTypes = Object.values(MetaFacetItemType);
|
|
119
|
-
// ----- CrudRouteName --------------------------------------
|
|
120
|
-
export var CrudRouteName;
|
|
121
|
-
(function (CrudRouteName) {
|
|
122
|
-
CrudRouteName["create"] = "create";
|
|
123
|
-
CrudRouteName["update"] = "update";
|
|
124
|
-
CrudRouteName["delete"] = "delete";
|
|
125
|
-
CrudRouteName["get"] = "get";
|
|
126
|
-
CrudRouteName["query"] = "query";
|
|
127
|
-
CrudRouteName["count"] = "count";
|
|
128
|
-
CrudRouteName["exists"] = "exists";
|
|
129
|
-
})(CrudRouteName || (CrudRouteName = {}));
|
|
130
|
-
export const isCrudRoute = (routeName) => !!Object.values(CrudRouteName).find((r) => r === routeName);
|
|
131
|
-
export const hasCrudRoute = (routeNames) => !!routeNames.find((routeName) => isCrudRoute(routeName));
|
|
132
|
-
//# sourceMappingURL=meta.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.enum.js","sourceRoot":"","sources":["../../src/meta/meta.enum.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;IACX,2CAA2B,CAAA;AAC7B,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAAwB,EACE,EAAE,CAC5B,IAAI,IAAI,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,2CAAuB,CAAA;IACvB,+CAA2B,CAAA;IAC3B,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EA/BW,gBAAgB,KAAhB,gBAAgB,QA+B3B;AAED,iEAAiE;AACjE,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEnE,6DAA6D;AAC7D,MAAM,CAAN,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;AACnB,CAAC,EARW,aAAa,KAAb,aAAa,QAQxB;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAW,EAAE,CACxD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAoB,EAAW,EAAE,CAC5D,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
package/dist/meta/meta.main.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { AnnotationsProperty, AnnotationsRoute, AnnotationsHeader } from "../types/types.annotation.js";
|
|
2
|
-
import { MetaHeadBaseOptions, MetaInterfaceOptions, MetaHeadInterfaceOptions, WithoutBase, MetaRouteParams, MetaImport, MetaNames } from "../types/types.meta.js";
|
|
3
|
-
import { MetaHeadType, MetaPropertyType } from "./meta.enum.js";
|
|
4
|
-
import { MetaPropertyData } from "./meta.properties.js";
|
|
5
|
-
export type MetaHeadDecoratorMap<DEF = any> = Record<MetaHeadDecorator, DEF>;
|
|
6
|
-
export type WithMainDecoratorMap<T, R extends MetaHeadDecoratorMap<T>> = R;
|
|
7
|
-
export declare enum MetaHeadDecorator {
|
|
8
|
-
MetaInterface = "MetaInterface",
|
|
9
|
-
MetaHeadInterface = "MetaHeadInterface"
|
|
10
|
-
}
|
|
11
|
-
export declare const metaMainOptionsMap: MetaHeadOptionsMap;
|
|
12
|
-
export type MetaHeadOptionsMap = WithMainDecoratorMap<MetaHeadType, {
|
|
13
|
-
[MetaHeadDecorator.MetaInterface]: MetaHeadType.interface;
|
|
14
|
-
[MetaHeadDecorator.MetaHeadInterface]: MetaHeadType.mainInterface;
|
|
15
|
-
}>;
|
|
16
|
-
export type MetaHeadOptionsBase = WithMainDecoratorMap<MetaHeadBaseOptions, {
|
|
17
|
-
[MetaHeadDecorator.MetaInterface]: MetaInterfaceOptions;
|
|
18
|
-
[MetaHeadDecorator.MetaHeadInterface]: MetaHeadInterfaceOptions;
|
|
19
|
-
}>;
|
|
20
|
-
export type MetaHeadOptions = Partial<WithMainDecoratorMap<WithoutBase<MetaHeadBaseOptions>, {
|
|
21
|
-
[MetaHeadDecorator.MetaInterface]: WithoutBase<MetaHeadOptionsBase[MetaHeadDecorator.MetaInterface]>;
|
|
22
|
-
[MetaHeadDecorator.MetaHeadInterface]: WithoutBase<MetaHeadOptionsBase[MetaHeadDecorator.MetaHeadInterface]>;
|
|
23
|
-
}>>;
|
|
24
|
-
export type MetaRoutes = Record<string, MetaRouteParams>;
|
|
25
|
-
export interface MetaHeadData {
|
|
26
|
-
templateName: string;
|
|
27
|
-
namespace?: string;
|
|
28
|
-
title: string;
|
|
29
|
-
inputFilePath: string;
|
|
30
|
-
repoInputFilePath: string;
|
|
31
|
-
properties: MetaPropertyData[];
|
|
32
|
-
routes: MetaRoutes;
|
|
33
|
-
additionalImports?: MetaImport[];
|
|
34
|
-
}
|
|
35
|
-
export interface MetaRunHeader {
|
|
36
|
-
names: MetaNames;
|
|
37
|
-
headerData: MetaHeadData;
|
|
38
|
-
}
|
|
39
|
-
export type MetaRunHeaders = Record<string, MetaRunHeader>;
|
|
40
|
-
export declare const mapAnnotationsHeader: (data: MetaHeadData, allHeaders: MetaRunHeaders) => AnnotationsHeader;
|
|
41
|
-
export declare const mapAnnotationsRoutes: (routes: MetaRoutes) => AnnotationsRoute[];
|
|
42
|
-
export declare const mapAnnotationsProperty: (prop: MetaPropertyData, allHeaders: MetaRunHeaders) => AnnotationsProperty;
|
|
43
|
-
export declare const extractAnnotationsPaths: (properties: AnnotationsProperty[], ...types: MetaPropertyType[]) => string[];
|
|
44
|
-
//# sourceMappingURL=meta.main.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.main.d.ts","sourceRoot":"","sources":["../../src/meta/meta.main.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,UAAU,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAyB,MAAM,sBAAsB,CAAC;AAG/E,MAAM,MAAM,oBAAoB,CAAC,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,oBAAoB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nB,iBAAiB,CAAC,EAAE,UAAU,EAAE,CAAC;CAClC;AACD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,YAAY,CAAC;CAC1B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAC/B,MAAM,YAAY,EAClB,YAAY,cAAc,KACzB,iBAOC,CAAC;AAEL,eAAO,MAAM,oBAAoB,GAAI,QAAQ,UAAU,KAAG,gBAAgB,EAMvE,CAAC;AAEJ,eAAO,MAAM,sBAAsB,GACjC,MAAM,gBAAgB,EACtB,YAAY,cAAc,KACzB,mBA0BF,CAAC;AA0BF,eAAO,MAAM,uBAAuB,GAClC,YAAY,mBAAmB,EAAE,EACjC,GAAG,OAAO,gBAAgB,EAAE,aACwB,CAAC"}
|
package/dist/meta/meta.main.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { stripAnnotationsHeader, stripAnnotationsRoute, stripAnnotationsProperty, } from "../types/types.annotation.js";
|
|
2
|
-
import { MetaHeadType, MetaPropertyType } from "./meta.enum.js";
|
|
3
|
-
import { MetaPropertyDecorator } from "./meta.properties.js";
|
|
4
|
-
export var MetaHeadDecorator;
|
|
5
|
-
(function (MetaHeadDecorator) {
|
|
6
|
-
MetaHeadDecorator["MetaInterface"] = "MetaInterface";
|
|
7
|
-
MetaHeadDecorator["MetaHeadInterface"] = "MetaHeadInterface";
|
|
8
|
-
})(MetaHeadDecorator || (MetaHeadDecorator = {}));
|
|
9
|
-
export const metaMainOptionsMap = {
|
|
10
|
-
[MetaHeadDecorator.MetaInterface]: MetaHeadType.interface,
|
|
11
|
-
[MetaHeadDecorator.MetaHeadInterface]: MetaHeadType.mainInterface,
|
|
12
|
-
};
|
|
13
|
-
export const mapAnnotationsHeader = (data, allHeaders) => stripAnnotationsHeader({
|
|
14
|
-
...data,
|
|
15
|
-
routes: mapAnnotationsRoutes(data.routes),
|
|
16
|
-
properties: data.properties.map((prop) => mapAnnotationsProperty(prop, allHeaders)),
|
|
17
|
-
});
|
|
18
|
-
export const mapAnnotationsRoutes = (routes) => Object.entries(routes).map(([name, params]) => stripAnnotationsRoute({
|
|
19
|
-
...params,
|
|
20
|
-
name,
|
|
21
|
-
}));
|
|
22
|
-
export const mapAnnotationsProperty = (prop, allHeaders) => {
|
|
23
|
-
const decorators = Object.values(MetaPropertyDecorator);
|
|
24
|
-
let propertyRef = null;
|
|
25
|
-
// find ref/decorator
|
|
26
|
-
for (const decorator of decorators) {
|
|
27
|
-
if (decorator in prop && !!prop[decorator]) {
|
|
28
|
-
propertyRef = decorator;
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (!propertyRef)
|
|
33
|
-
throw new Error(`No property ref / decorator found in ${prop.propertyKey}`);
|
|
34
|
-
let subHeaderName;
|
|
35
|
-
if (prop.type === MetaPropertyType.object)
|
|
36
|
-
subHeaderName = allHeaders[prop.propertyType]?.names.annotations;
|
|
37
|
-
return stripAnnotationsProperty({
|
|
38
|
-
...prop,
|
|
39
|
-
subHeaderName: subHeaderName,
|
|
40
|
-
subHeader: undefined,
|
|
41
|
-
propertyRef,
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
const _extractAnnotationsPaths = (types, properties, path) => {
|
|
45
|
-
const paths = [];
|
|
46
|
-
for (const prop of properties) {
|
|
47
|
-
const propPath = path ? `${path}/${prop.propertyKey}` : prop.propertyKey;
|
|
48
|
-
if (types.includes(prop.type)) {
|
|
49
|
-
paths.push(propPath);
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
if (prop.type === MetaPropertyType.object && prop.subHeader) {
|
|
53
|
-
paths.push(..._extractAnnotationsPaths(types, prop.subHeader.properties, propPath));
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return paths;
|
|
58
|
-
};
|
|
59
|
-
export const extractAnnotationsPaths = (properties, ...types) => _extractAnnotationsPaths(types, properties, null);
|
|
60
|
-
//# sourceMappingURL=meta.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.main.js","sourceRoot":"","sources":["../../src/meta/meta.main.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,GAIzB,MAAM,8BAA8B,CAAC;AAUtC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAoB,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAM/E,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,4DAAuC,CAAA;AACzC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,SAAS;IACzD,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,aAAa;CAClE,CAAC;AAmDF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAkB,EAClB,UAA0B,EACP,EAAE,CACrB,sBAAsB,CAAC;IACrB,GAAG,IAAI;IACP,MAAM,EAAE,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvC,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,CACzC;CACF,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAkB,EAAsB,EAAE,CAC7E,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAC5C,qBAAqB,CAAC;IACpB,GA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