@tstdl/base 0.78.0-beta15 → 0.78.0-beta16
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/package.json +2 -2
- package/reflection/decorator-data.js +1 -1
- package/reflection/decorator-data.js.map +1 -1
- package/reflection/decorators.d.ts +2 -2
- package/reflection/decorators.js +7 -7
- package/reflection/decorators.js.map +1 -1
- package/reflection/registry.d.ts +8 -8
- package/reflection/registry.js +1 -1
- package/reflection/registry.js.map +1 -1
- package/reflection/types.d.ts +3 -2
- package/reflection/utils.d.ts +7 -2
- package/reflection/utils.js +38 -12
- package/reflection/utils.js.map +1 -1
- package/schema/schema.d.ts +1 -5
- package/schema/schema.js +26 -61
- package/schema/schema.js.map +1 -1
- package/schema/types.d.ts +1 -0
- package/schema/types.js +8 -3
- package/schema/types.js.map +1 -1
- package/schema/utils/schema.d.ts +3 -0
- package/schema/utils/schema.js +43 -1
- package/schema/utils/schema.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.78.0-
|
|
3
|
+
"version": "0.78.0-beta16",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@elastic/elasticsearch": "^8.2",
|
|
41
41
|
"@koa/router": "^12.0",
|
|
42
|
-
"@tstdl/angular": "^0.11.0-
|
|
42
|
+
"@tstdl/angular": "^0.11.0-beta16",
|
|
43
43
|
"chroma-js": "^2.4",
|
|
44
44
|
"got": "^12.3",
|
|
45
45
|
"handlebars": "^4.7",
|
|
@@ -46,7 +46,7 @@ function getDecoratorData(target, propertyKey, descriptorOrParameterIndex) {
|
|
|
46
46
|
}
|
|
47
47
|
else if ((0, type_guards_1.isDefined)(propertyKey) && (0, type_guards_1.isNumber)(descriptorOrParameterIndex)) {
|
|
48
48
|
return {
|
|
49
|
-
type: 'parameter',
|
|
49
|
+
type: 'method-parameter',
|
|
50
50
|
constructor,
|
|
51
51
|
prototype,
|
|
52
52
|
static: isStatic,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-data.js","sourceRoot":"","sources":["../../source/reflection/decorator-data.ts"],"names":[],"mappings":";;;AAAA,sDAA6F;AAE7F,mCAAyC;AAEzC,kDAAkD;AAClD,SAAgB,gBAAgB,CAAC,MAAc,EAAE,WAA6B,EAAE,0BAAwD;IACtI,MAAM,WAAW,GAAG,IAAA,sBAAc,EAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;IACxC,MAAM,QAAQ,GAAG,OAAO,MAAM,IAAI,UAAU,CAAC;IAE7C,IAAI,IAAA,yBAAW,EAAC,WAAW,CAAC,IAAI,IAAA,yBAAW,EAAC,0BAA0B,CAAC,EAAE;QACvE,OAAO;YACL,IAAI,EAAE,OAAO;YACb,WAAW;YACX,SAAS;SACV,CAAC;KACH;SACI,IAAI,IAAA,uBAAS,EAAC,WAAW,CAAC,IAAI,IAAA,yBAAW,EAAC,0BAA0B,CAAC,EAAE;QAC1E,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,WAAW;YACX,SAAS;YACT,MAAM,EAAE,QAAQ;YAChB,WAAW;SACZ,CAAC;KACH;SACI,IAAI,IAAA,uBAAS,EAAC,WAAW,CAAC,IAAI,IAAA,sBAAQ,EAAC,0BAA0B,CAAC,IAAI,CAAC,IAAA,wBAAU,EAAC,0BAA0B,CAAC,GAAG,IAAI,0BAA0B,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,wDAAwD;QACnN,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,WAAW;YACX,SAAS;YACT,MAAM,EAAE,QAAQ;YAChB,WAAW;YACX,UAAU,EAAE,0BAA0B;SACvC,CAAC;KACH;SACI,IAAI,IAAA,uB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B,CAAC,GAAG,IAAI,0BAA0B,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,wDAAwD;QACnN,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,WAAW;YACX,SAAS;YACT,MAAM,EAAE,QAAQ;YAChB,WAAW;YACX,UAAU,EAAE,0BAA0B;SACvC,CAAC;KACH;SACI,IAAI,IAAA,uBAAS,EAAC,WAAW,CAAC,IAAI,IAAA,sBAAQ,EAAC,0BAA0B,CAAC,IAAI,IAAA,wBAAU,EAAC,0BAA0B,CAAC,KAAK,CAAC,EAAE;QACvH,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,WAAW;YACX,SAAS;YACT,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,WAAW;YACtB,UAAU,EAAE,0BAA0B;SACvC,CAAC;KACH;SACI,IAAI,IAAA,uBAAS,EAAC,WAAW,CAAC,IAAI,IAAA,sBAAQ,EAAC,0BAA0B,CAAC,EAAE;QACvE,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,WAAW;YACX,SAAS;YACT,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,0BAA0B;SAClC,CAAC;KACH;SACI,IAAI,IAAA,sBAAQ,EAAC,0BAA0B,CAAC,EAAE;QAC7C,OAAO;YACL,IAAI,EAAE,uBAAuB;YAC7B,WAAW;YACX,SAAS;YACT,KAAK,EAAE,0BAA0B;SAClC,CAAC;KACH;IAED,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AA7DD,4CA6DC"}
|
|
@@ -9,6 +9,6 @@ export declare function Property(options?: SpecificCreateDecoratorOptions<'prope
|
|
|
9
9
|
export declare function Accessor(options?: SpecificCreateDecoratorOptions<'accessor'>): MethodDecorator;
|
|
10
10
|
export declare function PropertyOrAccessor(options?: SpecificCreateDecoratorOptions<'property' | 'accessor'>): Decorator<'property' | 'accessor'>;
|
|
11
11
|
export declare function Method(options?: SpecificCreateDecoratorOptions<'method'>): MethodDecorator;
|
|
12
|
-
export declare function Parameter(options?: SpecificCreateDecoratorOptions<'parameter'>): ParameterDecorator;
|
|
13
|
-
export declare function ConstructorParameter(options?: SpecificCreateDecoratorOptions<'constructorParameter'>): ParameterDecorator;
|
|
14
12
|
export declare function MethodParameter(options?: SpecificCreateDecoratorOptions<'methodParameter'>): ParameterDecorator;
|
|
13
|
+
export declare function ConstructorParameter(options?: SpecificCreateDecoratorOptions<'constructorParameter'>): ParameterDecorator;
|
|
14
|
+
export declare function Parameter(options?: SpecificCreateDecoratorOptions<'parameter'>): ParameterDecorator;
|
package/reflection/decorators.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.Parameter = exports.ConstructorParameter = exports.MethodParameter = exports.Method = exports.PropertyOrAccessor = exports.Accessor = exports.Property = exports.Class = exports.Decorate = void 0;
|
|
5
5
|
const noop_1 = require("../utils/noop");
|
|
6
6
|
require("reflect-metadata");
|
|
7
7
|
const utils_1 = require("./utils");
|
|
@@ -38,16 +38,16 @@ function Method(options) {
|
|
|
38
38
|
return (0, utils_1.createMethodDecorator)(options);
|
|
39
39
|
}
|
|
40
40
|
exports.Method = Method;
|
|
41
|
-
function
|
|
42
|
-
return (0, utils_1.
|
|
41
|
+
function MethodParameter(options) {
|
|
42
|
+
return (0, utils_1.createMethodParameterDecorator)(options);
|
|
43
43
|
}
|
|
44
|
-
exports.
|
|
44
|
+
exports.MethodParameter = MethodParameter;
|
|
45
45
|
function ConstructorParameter(options) {
|
|
46
46
|
return (0, utils_1.createConstructorParameterDecorator)(options);
|
|
47
47
|
}
|
|
48
48
|
exports.ConstructorParameter = ConstructorParameter;
|
|
49
|
-
function
|
|
50
|
-
return (0, utils_1.
|
|
49
|
+
function Parameter(options) {
|
|
50
|
+
return (0, utils_1.createParameterDecorator)(options);
|
|
51
51
|
}
|
|
52
|
-
exports.
|
|
52
|
+
exports.Parameter = Parameter;
|
|
53
53
|
//# sourceMappingURL=decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../source/reflection/decorators.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAEzD,wCAAoC;AACpC,4BAA0B;AAG1B,mCAA2Q;AAE3Q,SAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,KAA8D,EAAE;IAC5G,OAAO,IAAA,uBAAe,EACpB;QACE,GAAG,OAAO;QACV,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,oBAAoB,EAAE,IAAI;KAC3B,EACD,OAAO,IAAI,WAAI,CAChB,CAAC;AACJ,CAAC;AAdD,4BAcC;AAED,SAAgB,KAAK,CAAC,OAAiD;IACrE,OAAO,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAFD,sBAEC;AAED,SAAgB,QAAQ,CAAC,OAAoD;IAC3E,OAAO,IAAA,+BAAuB,EAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAFD,4BAEC;AAED,SAAgB,QAAQ,CAAC,OAAoD;IAC3E,OAAO,IAAA,+BAAuB,EAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAFD,4BAEC;AAED,SAAgB,kBAAkB,CAAC,OAAiE;IAClG,OAAO,IAAA,yCAAiC,EAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAFD,gDAEC;AAED,SAAgB,MAAM,CAAC,OAAkD;IACvE,OAAO,IAAA,6BAAqB,EAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC;AAED,SAAgB,
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","s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AS,CAAC,OAAqD;IAC7E,OAAO,IAAA,gCAAwB,EAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAFD,8BAEC"}
|
package/reflection/registry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbstractConstructor
|
|
1
|
+
import type { AbstractConstructor } from "../types";
|
|
2
2
|
import { ReflectionDataMap } from './reflection-data-map';
|
|
3
3
|
import type { DecoratorData } from './types';
|
|
4
4
|
export declare type ReflectionMetadata = TypeMetadata | PropertyMetadata | MethodMetadata | ConstructorParameterMetadata | MethodParameterMetadata;
|
|
@@ -20,22 +20,22 @@ export declare type TypeMetadata = MetadataBase<'type'> & {
|
|
|
20
20
|
};
|
|
21
21
|
export declare type PropertyMetadata = MetadataBase<'property'> & {
|
|
22
22
|
key: string | symbol;
|
|
23
|
-
type:
|
|
23
|
+
type: AbstractConstructor;
|
|
24
24
|
isAccessor: boolean;
|
|
25
25
|
data: ReflectionDataMap;
|
|
26
26
|
};
|
|
27
27
|
export declare type MethodMetadata = MetadataBase<'method'> & {
|
|
28
28
|
parameters: MethodParameterMetadata[];
|
|
29
|
-
returnType:
|
|
29
|
+
returnType: AbstractConstructor | undefined;
|
|
30
30
|
data: ReflectionDataMap;
|
|
31
31
|
};
|
|
32
32
|
export declare type ConstructorParameterMetadata = MetadataBase<'constructor-parameter'> & {
|
|
33
|
-
type:
|
|
33
|
+
type: AbstractConstructor | undefined;
|
|
34
34
|
index: number;
|
|
35
35
|
data: ReflectionDataMap;
|
|
36
36
|
};
|
|
37
37
|
export declare type MethodParameterMetadata = MetadataBase<'method-parameter'> & {
|
|
38
|
-
type:
|
|
38
|
+
type: AbstractConstructor;
|
|
39
39
|
index: number;
|
|
40
40
|
data: ReflectionDataMap;
|
|
41
41
|
};
|
|
@@ -43,8 +43,8 @@ export declare type ParameterMetadata = ConstructorParameterMetadata | MethodPar
|
|
|
43
43
|
export declare class ReflectionRegistry {
|
|
44
44
|
private readonly metadataMap;
|
|
45
45
|
constructor();
|
|
46
|
-
hasType(type:
|
|
47
|
-
getMetadata(type:
|
|
46
|
+
hasType(type: AbstractConstructor): boolean;
|
|
47
|
+
getMetadata(type: AbstractConstructor): TypeMetadata;
|
|
48
48
|
register(target: object, propertyKey?: string | symbol, descriptorOrParameterIndex?: PropertyDescriptor | number): DecoratorData;
|
|
49
49
|
registerDecoratorData(data: DecoratorData): ReflectionMetadata;
|
|
50
50
|
/**
|
|
@@ -52,7 +52,7 @@ export declare class ReflectionRegistry {
|
|
|
52
52
|
* However, this should not be necessary since WeakRefs are used.
|
|
53
53
|
* @param type Type to unregister
|
|
54
54
|
*/
|
|
55
|
-
unregister(type:
|
|
55
|
+
unregister(type: AbstractConstructor): void;
|
|
56
56
|
private initializeType;
|
|
57
57
|
}
|
|
58
58
|
export declare const reflectionRegistry: ReflectionRegistry;
|
package/reflection/registry.js
CHANGED
|
@@ -41,7 +41,7 @@ class ReflectionRegistry {
|
|
|
41
41
|
else if (data.type == 'method') {
|
|
42
42
|
return (data.static ? metadata.staticMethods : metadata.methods).get(data.methodKey);
|
|
43
43
|
}
|
|
44
|
-
else if (data.type == 'parameter') {
|
|
44
|
+
else if (data.type == 'method-parameter') {
|
|
45
45
|
return (data.static ? metadata.staticMethods : metadata.methods).get(data.methodKey);
|
|
46
46
|
}
|
|
47
47
|
else if (data.type == 'constructor-parameter') { // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../source/reflection/registry.ts"],"names":[],"mappings":";;;AAEA,sDAAiD;AACjD,iEAA2E;AAC3E,oDAAqF;AACrF,sDAAkD;AAClD,qDAAoD;AACpD,+DAA0D;AAuD1D,MAAa,kBAAkB;IAG7B;QACE,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../source/re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AAI,EAAE,IAAI,uCAAiB,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,uCAAiB,EAAE,EAAE,CAAC;gBACzP,CAAC,CAAC;aACH;YACD,IAAI,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,uCAAiB,EAAE,EAAE;YACpD,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF;AAjHD,gDAiHC;AAEY,QAAA,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
package/reflection/types.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import type { Constructor, Record } from "../types";
|
|
|
2
2
|
import type { UnionToIntersection } from 'type-fest';
|
|
3
3
|
import type { ConstructorParameterMetadata, MethodMetadata, MethodParameterMetadata, ParameterMetadata, PropertyMetadata, TypeMetadata } from './registry';
|
|
4
4
|
export declare type DecoratorType = 'class' | 'property' | 'accessor' | 'method' | 'parameter' | 'methodParameter' | 'constructorParameter';
|
|
5
|
-
export declare type DecoratorHandler<T extends DecoratorType = DecoratorType> = (data: DecoratorData<T>, metadata: DecoratorMetadata<T
|
|
5
|
+
export declare type DecoratorHandler<T extends DecoratorType = DecoratorType> = (data: DecoratorData<T>, metadata: DecoratorMetadata<T>, originalArguments: Parameters<DecoratorUnion<T>>) => DecoratorHandlerReturnType<T>;
|
|
6
6
|
export declare type DecoratorHandlerReturnType<T extends DecoratorType = DecoratorType> = DecoratorOptionsTypeMap<DecoratorHandlerReturnTypeMap, T>;
|
|
7
7
|
export declare type Decorator<T extends DecoratorType = DecoratorType> = DecoratorOptionsTypeMapIntersection<DecoratorMap, T>;
|
|
8
8
|
export declare type DecoratorUnion<T extends DecoratorType = DecoratorType> = DecoratorOptionsTypeMap<DecoratorMap, T>;
|
|
9
9
|
export declare type DecoratorData<T extends DecoratorType = DecoratorType> = DecoratorOptionsTypeMap<DecoratorDataMap, T>;
|
|
10
10
|
export declare type DecoratorMetadata<T extends DecoratorType = DecoratorType> = DecoratorOptionsTypeMap<DecoratorMetadataMap, T>;
|
|
11
|
+
export declare type CombinedDecoratorParameters = [target: object, propertyKey?: string | symbol, descriptorOrParameterIndex?: PropertyDescriptor | number];
|
|
11
12
|
export declare type DecoratorTypeMap<T extends Record<DecoratorType> = Record<DecoratorType>> = T;
|
|
12
13
|
export declare type DecoratorOptionsTypeMap<T extends DecoratorTypeMap, U extends DecoratorType> = {
|
|
13
14
|
[D in U]: T[D];
|
|
@@ -70,7 +71,7 @@ export declare type MethodDecoratorData = DecoratorDataBase<'method'> & {
|
|
|
70
71
|
methodKey: string | symbol;
|
|
71
72
|
descriptor: PropertyDescriptor;
|
|
72
73
|
};
|
|
73
|
-
export declare type MethodParameterDecoratorData = DecoratorDataBase<'parameter'> & {
|
|
74
|
+
export declare type MethodParameterDecoratorData = DecoratorDataBase<'method-parameter'> & {
|
|
74
75
|
static: boolean;
|
|
75
76
|
methodKey: string | symbol;
|
|
76
77
|
index: number;
|
package/reflection/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Constructor, OneOrMany, PropertiesOfType, Record, TypedOmit } from "../types";
|
|
2
|
-
import type { Decorator, DecoratorHandler, DecoratorType, DecoratorUnion } from './types';
|
|
2
|
+
import type { CombinedDecoratorParameters, Decorator, DecoratorData, DecoratorHandler, DecoratorMetadata, DecoratorType, DecoratorUnion } from './types';
|
|
3
3
|
export declare type CreateDecoratorTypeOptions = {
|
|
4
4
|
[P in DecoratorType]?: boolean;
|
|
5
5
|
};
|
|
@@ -14,6 +14,9 @@ export declare type SpecificCreateDecoratorOptions<T extends DecoratorType> = Ty
|
|
|
14
14
|
handler?: DecoratorHandler<T>;
|
|
15
15
|
include?: OneOrMany<DecoratorUnion<T>>;
|
|
16
16
|
};
|
|
17
|
+
export declare type WrapDecoratorOptions = CreateDecoratorOptions & {
|
|
18
|
+
handler?: (data: DecoratorData, metadata: DecoratorMetadata, originalArguments: CombinedDecoratorParameters) => void;
|
|
19
|
+
};
|
|
17
20
|
declare type CreateDecoratorType<T extends CreateDecoratorOptions> = Extract<PropertiesOfType<T, true>, DecoratorType>;
|
|
18
21
|
export declare function createDecorator<T extends CreateDecoratorTypeOptions & CreateDecoratorOptions>(options: T, handler?: DecoratorHandler<CreateDecoratorType<T>>): Decorator<CreateDecoratorType<T>>;
|
|
19
22
|
export declare function createClassDecorator(options?: SpecificCreateDecoratorOptions<'class'>): ClassDecorator;
|
|
@@ -21,9 +24,11 @@ export declare function createPropertyDecorator(options?: SpecificCreateDecorato
|
|
|
21
24
|
export declare function createAccessorDecorator(options?: SpecificCreateDecoratorOptions<'accessor'>): MethodDecorator;
|
|
22
25
|
export declare function createPropertyOrAccessorDecorator(options?: SpecificCreateDecoratorOptions<'property' | 'accessor'>): Decorator<'property' | 'accessor'>;
|
|
23
26
|
export declare function createMethodDecorator(options?: SpecificCreateDecoratorOptions<'method'>): MethodDecorator;
|
|
24
|
-
export declare function createParameterDecorator(options?: SpecificCreateDecoratorOptions<'parameter'>): ParameterDecorator;
|
|
25
27
|
export declare function createMethodParameterDecorator(options?: SpecificCreateDecoratorOptions<'methodParameter'>): ParameterDecorator;
|
|
26
28
|
export declare function createConstructorParameterDecorator(options?: SpecificCreateDecoratorOptions<'constructorParameter'>): ParameterDecorator;
|
|
29
|
+
export declare function createParameterDecorator(options?: SpecificCreateDecoratorOptions<'parameter'>): ParameterDecorator;
|
|
30
|
+
export declare function wrapDecoratorFactory<T extends (...args: any[]) => DecoratorUnion>(decoratorFactory: T, options?: WrapDecoratorOptions): T;
|
|
31
|
+
export declare function wrapDecorator<T extends DecoratorUnion>(decorator: T, options?: WrapDecoratorOptions): T;
|
|
27
32
|
export declare function getConstructor<T extends Constructor = Constructor>(constructorOrTarget: object): T;
|
|
28
33
|
export declare function getTypeInfoString(type: Constructor): string;
|
|
29
34
|
export declare function printType(type: Constructor): void;
|
package/reflection/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.printType = exports.getTypeInfoString = exports.getConstructor = exports.
|
|
3
|
+
exports.printType = exports.getTypeInfoString = exports.getConstructor = exports.wrapDecorator = exports.wrapDecoratorFactory = exports.createParameterDecorator = exports.createConstructorParameterDecorator = exports.createMethodParameterDecorator = exports.createMethodDecorator = exports.createPropertyOrAccessorDecorator = exports.createAccessorDecorator = exports.createPropertyDecorator = exports.createClassDecorator = exports.createDecorator = void 0;
|
|
4
4
|
const array_1 = require("../utils/array/array");
|
|
5
5
|
const noop_1 = require("../utils/noop");
|
|
6
6
|
const type_guards_1 = require("../utils/type-guards");
|
|
@@ -9,21 +9,23 @@ const registry_1 = require("./registry");
|
|
|
9
9
|
// eslint-disable-next-line max-lines-per-function
|
|
10
10
|
function createDecorator(options, handler = noop_1.noop) {
|
|
11
11
|
// eslint-disable-next-line max-statements, max-lines-per-function
|
|
12
|
-
function decoratorWrapper(
|
|
13
|
-
const data = (0, decorator_data_1.getDecoratorData)(
|
|
14
|
-
const optionsType = (data.type == 'constructor-parameter') ? 'constructorParameter'
|
|
12
|
+
function decoratorWrapper(...args) {
|
|
13
|
+
const data = (0, decorator_data_1.getDecoratorData)(...args);
|
|
14
|
+
const optionsType = (data.type == 'constructor-parameter') ? 'constructorParameter'
|
|
15
|
+
: (data.type == 'method-parameter') ? 'methodParameter'
|
|
16
|
+
: data.type;
|
|
15
17
|
const valid = (options[optionsType] == true)
|
|
16
|
-
|| (optionsType == '
|
|
17
|
-
|| (
|
|
18
|
+
|| (optionsType == 'methodParameter' && ((options.methodParameter == true) || (options.parameter == true)))
|
|
19
|
+
|| (optionsType == 'constructorParameter' && ((options.constructorParameter == true) || (options.parameter == true)));
|
|
18
20
|
(0, type_guards_1.assert)(valid, () => `Decorator cannot be used for ${data.type}.`);
|
|
19
21
|
const metadata = registry_1.reflectionRegistry.registerDecoratorData(data);
|
|
20
22
|
if ((0, type_guards_1.isDefined)(options.data)) {
|
|
21
23
|
metadata.data.setMany(options.data, options.mergeData);
|
|
22
24
|
}
|
|
23
|
-
const result = handler(data, metadata);
|
|
25
|
+
const result = handler(data, metadata, args);
|
|
24
26
|
if ((0, type_guards_1.isDefined)(options.include)) {
|
|
25
27
|
for (const include of (0, array_1.toArray)(options.include)) {
|
|
26
|
-
include(
|
|
28
|
+
include(...args); // eslint-disable-line @typescript-eslint/no-unsafe-argument
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
return result;
|
|
@@ -51,10 +53,6 @@ function createMethodDecorator(options = {}) {
|
|
|
51
53
|
return createDecorator({ ...options, method: true }, options.handler);
|
|
52
54
|
}
|
|
53
55
|
exports.createMethodDecorator = createMethodDecorator;
|
|
54
|
-
function createParameterDecorator(options = {}) {
|
|
55
|
-
return createDecorator({ ...options, parameter: true }, options.handler);
|
|
56
|
-
}
|
|
57
|
-
exports.createParameterDecorator = createParameterDecorator;
|
|
58
56
|
function createMethodParameterDecorator(options = {}) {
|
|
59
57
|
return createDecorator({ ...options, methodParameter: true }, options.handler);
|
|
60
58
|
}
|
|
@@ -63,6 +61,34 @@ function createConstructorParameterDecorator(options = {}) {
|
|
|
63
61
|
return createDecorator({ ...options, constructorParameter: true }, options.handler);
|
|
64
62
|
}
|
|
65
63
|
exports.createConstructorParameterDecorator = createConstructorParameterDecorator;
|
|
64
|
+
function createParameterDecorator(options = {}) {
|
|
65
|
+
return createDecorator({ ...options, parameter: true }, options.handler);
|
|
66
|
+
}
|
|
67
|
+
exports.createParameterDecorator = createParameterDecorator;
|
|
68
|
+
function wrapDecoratorFactory(decoratorFactory, options) {
|
|
69
|
+
function wrappedDecoratorFactory(...args) {
|
|
70
|
+
const decorator = decoratorFactory(...args);
|
|
71
|
+
return wrapDecorator(decorator, options);
|
|
72
|
+
}
|
|
73
|
+
return wrappedDecoratorFactory;
|
|
74
|
+
}
|
|
75
|
+
exports.wrapDecoratorFactory = wrapDecoratorFactory;
|
|
76
|
+
function wrapDecorator(decorator, options) {
|
|
77
|
+
const wrappedDecorator = createDecorator({
|
|
78
|
+
class: true,
|
|
79
|
+
property: true,
|
|
80
|
+
method: true,
|
|
81
|
+
parameter: true,
|
|
82
|
+
methodParameter: true,
|
|
83
|
+
constructorParameter: true,
|
|
84
|
+
...options
|
|
85
|
+
}, (data, metadata, args) => {
|
|
86
|
+
options?.handler?.(data, metadata, args);
|
|
87
|
+
return decorator(...args); // eslint-disable-line @typescript-eslint/no-unsafe-argument
|
|
88
|
+
});
|
|
89
|
+
return wrappedDecorator;
|
|
90
|
+
}
|
|
91
|
+
exports.wrapDecorator = wrapDecorator;
|
|
66
92
|
function getConstructor(constructorOrTarget) {
|
|
67
93
|
return (0, type_guards_1.isFunction)(constructorOrTarget)
|
|
68
94
|
? constructorOrTarget
|
package/reflection/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../source/reflection/utils.ts"],"names":[],"mappings":";;;AACA,gDAA8C;AAC9C,wCAAoC;AACpC,sDAA8E;AAC9E,qDAAoD;AACpD,yCAAgD;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../source/reflection/utils.ts"],"names":[],"mappings":";;;AACA,gDAA8C;AAC9C,wCAAoC;AACpC,sDAA8E;AAC9E,qDAAoD;AACpD,yCAAgD;AA0BhD,kDAAkD;AAClD,SAAgB,eAAe,CAAgE,OAAU,EAAE,UAAoD,WAAI;IACjK,kEAAkE;IAClE,SAAS,gBAAgB,CAAC,GAAG,IAAiC;QAC5D,MAAM,IAAI,GAAG,IAAA,iCAAgB,EAAC,GAAG,IAAI,CAAC,CAAC;QACvC,MAAM,WAAW,GACf,CAAC,IAAI,CAAC,IAAI,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,sBAAsB;YAC7D,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAC,iBAAiB;gBACrD,CAAC,CAAC,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AG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QAChE,KAAK,CAAC,IAAI,CAAC,KAAK,WAAW,KAAK,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/D;IAED,KAAK,MAAM,CAAC,GAAG,EAAE,cAAc,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE;QACpD,MAAM,WAAW,GAAG,IAAA,sBAAQ,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QAChE,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChG,KAAK,CAAC,IAAI,CAAC,KAAK,WAAW,IAAI,UAAU,MAAM,cAAc,CAAC,UAAU,EAAE,IAAI,IAAI,MAAM,EAAE,CAAC,CAAC;KAC7F;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AA/BD,8CA+BC;AAED,SAAgB,SAAS,CAAC,IAAiB;IACzC,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iCAAiC;AACtD,CAAC;AAHD,8BAGC"}
|
package/schema/schema.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { JsonPath } from "../json-path";
|
|
2
|
-
import
|
|
3
|
-
import type { NormalizedObjectSchema, NormalizedTypeSchema, NormalizedValueSchema, ObjectSchema, SchemaTestOptions, SchemaTestResult, SchemaValueCoercer, TypeSchema, ValueSchema, ValueType } from './types';
|
|
2
|
+
import { NormalizedObjectSchema, NormalizedTypeSchema, NormalizedValueSchema, ObjectSchema, SchemaTestOptions, SchemaTestResult, SchemaValueCoercer, TypeSchema, ValueSchema, ValueType } from './types';
|
|
4
3
|
export declare type Schema<T = any, O = T> = ObjectSchema<T, O> | ValueSchema<T, O> | TypeSchema<O>;
|
|
5
4
|
export declare type SchemaTestable<T = any, O = T> = Schema<T, O> | ValueType<O>;
|
|
6
5
|
export declare type NormalizedSchema<T = any, O = T> = NormalizedObjectSchema<T, O> | NormalizedValueSchema<T, O> | NormalizedTypeSchema<O>;
|
|
7
|
-
export declare const getSchemaFromReflection: typeof _getObjectSchemaFromReflection;
|
|
8
6
|
export declare const Schema: {
|
|
9
7
|
registerDefaultCoercer(coercer: SchemaValueCoercer): void;
|
|
10
8
|
test<T, O>(schemaOrValueType: SchemaTestable<T, O>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<O>;
|
|
@@ -16,5 +14,3 @@ export declare const Schema: {
|
|
|
16
14
|
*/
|
|
17
15
|
testWithFastError<T_3, O_3 = T_3>(schema: Schema<T_3, O_3>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<O_3>;
|
|
18
16
|
};
|
|
19
|
-
declare function _getObjectSchemaFromReflection<T>(type: AbstractConstructor<T>): ObjectSchema<T> | null;
|
|
20
|
-
export {};
|
package/schema/schema.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Schema =
|
|
3
|
+
exports.Schema = void 0;
|
|
4
4
|
const json_path_1 = require("../json-path");
|
|
5
|
-
const reflection_1 = require("../reflection");
|
|
6
5
|
const array_1 = require("../utils/array/array");
|
|
7
|
-
const function_1 = require("../utils/function");
|
|
8
6
|
const noop_1 = require("../utils/noop");
|
|
9
7
|
const object_1 = require("../utils/object/object");
|
|
10
8
|
const set_1 = require("../utils/set");
|
|
@@ -18,7 +16,6 @@ const uint8_array_coercer_1 = require("./coercers/uint8-array.coercer");
|
|
|
18
16
|
const schema_error_1 = require("./schema.error");
|
|
19
17
|
const types_1 = require("./types");
|
|
20
18
|
const utils_1 = require("./utils");
|
|
21
|
-
exports.getSchemaFromReflection = (0, function_1.memoizeSingle)(_getObjectSchemaFromReflection);
|
|
22
19
|
const defaultCoercers = new Map();
|
|
23
20
|
let initialize = () => {
|
|
24
21
|
exports.Schema.registerDefaultCoercer(number_coercer_1.numberCoercer);
|
|
@@ -45,7 +42,7 @@ exports.Schema = {
|
|
|
45
42
|
if (result.valid) {
|
|
46
43
|
return result;
|
|
47
44
|
}
|
|
48
|
-
return { valid: false, error: new schema_error_1.SchemaError(result.error.message, { ...result.error, fast: false }
|
|
45
|
+
return { valid: false, error: new schema_error_1.SchemaError(result.error.message, { ...result.error, fast: false }) };
|
|
49
46
|
},
|
|
50
47
|
validate(schemaOrValueType, value, options) {
|
|
51
48
|
const schema = (0, types_1.valueTypeOrSchemaToSchema)(schemaOrValueType);
|
|
@@ -84,7 +81,7 @@ function testType(schema, value, options = {}, path = json_path_1.JsonPath.ROOT)
|
|
|
84
81
|
if ((value instanceof resolvedValueType) || ((0, utils_1.getValueType)(value) == resolvedValueType)) {
|
|
85
82
|
return { valid: true, value: value };
|
|
86
83
|
}
|
|
87
|
-
const objectSchema = (0,
|
|
84
|
+
const objectSchema = (0, utils_1.getSchemaFromReflection)(resolvedValueType);
|
|
88
85
|
if ((0, type_guards_1.isNotNull)(objectSchema)) {
|
|
89
86
|
return testObject(objectSchema, value, options, path);
|
|
90
87
|
}
|
|
@@ -117,19 +114,11 @@ function testObject(objectSchema, value, options = {}, path = json_path_1.JsonPa
|
|
|
117
114
|
}
|
|
118
115
|
if (schema.allowUnknownProperties.size > 0) {
|
|
119
116
|
for (const key of unknownValuePropertyKeys) {
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (!propertyResult.valid && !mask) {
|
|
124
|
-
errors.push(propertyResult.error);
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
resultValue[key] = propertyResult.value;
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
if (errors.length > 0) {
|
|
131
|
-
return { valid: false, error: (errors.length == 1) ? errors[0] : new schema_error_1.SchemaError('Value did not match any allowed schemas.', { inner: errors, path }) };
|
|
117
|
+
const propertyResult = exports.Schema.testWithFastError((0, types_1.valueSchema)([...schema.allowUnknownProperties]), value[key], options, path.add(key));
|
|
118
|
+
if (!propertyResult.valid && !mask) {
|
|
119
|
+
return propertyResult;
|
|
132
120
|
}
|
|
121
|
+
resultValue[key] = propertyResult.value;
|
|
133
122
|
}
|
|
134
123
|
}
|
|
135
124
|
const testResultValue = (0, type_guards_1.isUndefined)(schema.factory) ? resultValue : (0, type_guards_1.isDefined)(schema.factory.type) ? resultValue : schema.factory.builder(resultValue);
|
|
@@ -186,27 +175,24 @@ function testValue(schema, value, options = {}, path = json_path_1.JsonPath.ROOT
|
|
|
186
175
|
...((valueSchema.coerce || options.coerce == true) ? (defaultCoercers.get(valueType) ?? []) : [])
|
|
187
176
|
];
|
|
188
177
|
const errors = [];
|
|
178
|
+
let success = false;
|
|
189
179
|
for (const coercer of coercers) {
|
|
190
180
|
const coerceResult = coercer.coerce(resultValue, path, context);
|
|
191
181
|
if (!coerceResult.success) {
|
|
192
182
|
errors.push(coerceResult.error);
|
|
193
183
|
continue;
|
|
194
184
|
}
|
|
185
|
+
success = true;
|
|
195
186
|
updateCurrentState(coerceResult.value);
|
|
196
187
|
break;
|
|
197
188
|
}
|
|
198
|
-
if (errors.length > 0) {
|
|
189
|
+
if (!success && (errors.length > 0)) {
|
|
199
190
|
return { valid: false, error: (errors.length == 1) ? errors[0] : new schema_error_1.SchemaError('Value could not be coerced.', { inner: errors, path }) };
|
|
200
191
|
}
|
|
201
192
|
}
|
|
202
193
|
if (!valueTestResult.valid) {
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
? expectedNames[0]
|
|
206
|
-
: `[${expectedNames.join(', ')}]`;
|
|
207
|
-
const expects = valueSchema.valueConstraints.map((constraint) => constraint.expects);
|
|
208
|
-
const expectsString = (expects.length > 0) ? ` (${expects.join(', ')})` : '';
|
|
209
|
-
return { valid: false, error: schema_error_1.SchemaError.expectedButGot(`${expectedTypeString}${expectsString}`, valueType, path, { inner: valueTestResult.error }) };
|
|
194
|
+
const expectsString = getExpectString(schema);
|
|
195
|
+
return { valid: false, error: schema_error_1.SchemaError.expectedButGot(expectsString, valueType, path) };
|
|
210
196
|
}
|
|
211
197
|
if (valueSchema.transformers.length > 0) {
|
|
212
198
|
let transformedValue = resultValue;
|
|
@@ -242,41 +228,20 @@ function isValidValue(validSchemas, value, options, path) {
|
|
|
242
228
|
}
|
|
243
229
|
errors.push(result.error);
|
|
244
230
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
const metadata = reflection_1.reflectionRegistry.getMetadata(type);
|
|
249
|
-
if (!metadata.registered) {
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
const typeData = metadata.data.tryGet('schema');
|
|
253
|
-
const properties = {};
|
|
254
|
-
for (const [key, propertyMetadata] of metadata.properties) {
|
|
255
|
-
const reflectionData = propertyMetadata.data.tryGet('schema');
|
|
256
|
-
const itemType = ((0, type_guards_1.isDefined)(reflectionData) && (0, type_guards_1.isDefined)(reflectionData.type)) ? reflectionData.type : undefined;
|
|
257
|
-
const array = reflectionData?.array == true;
|
|
258
|
-
if (array && ((0, type_guards_1.isUndefined)(itemType) || ((0, type_guards_1.isArray)(itemType) && (itemType.length == 0)))) {
|
|
259
|
-
throw new Error(`Item type missing on type ${type.name} at property "${String(key)}"`);
|
|
260
|
-
}
|
|
261
|
-
properties[key] = {
|
|
262
|
-
schema: (0, types_1.valueTypesOrSchemasToSchemas)(itemType ?? propertyMetadata.type),
|
|
263
|
-
array,
|
|
264
|
-
optional: reflectionData?.optional,
|
|
265
|
-
nullable: reflectionData?.nullable,
|
|
266
|
-
coerce: reflectionData?.coerce,
|
|
267
|
-
coercers: reflectionData?.coercers,
|
|
268
|
-
transformers: reflectionData?.transformers,
|
|
269
|
-
arrayConstraints: reflectionData?.arrayConstraints,
|
|
270
|
-
valueConstraints: reflectionData?.valueConstraints
|
|
271
|
-
};
|
|
231
|
+
const expectStrings = [];
|
|
232
|
+
for (const schema of validSchemas) {
|
|
233
|
+
getExpectString(schema);
|
|
272
234
|
}
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
235
|
+
const expectString = expectStrings.join('\n');
|
|
236
|
+
return { valid: false, error: schema_error_1.SchemaError.expectedButGot(expectString, (0, utils_1.getValueType)(value), path) };
|
|
237
|
+
}
|
|
238
|
+
function getExpectString(schema) {
|
|
239
|
+
const expectedNames = (0, utils_1.getSchemaTypeNames)(schema);
|
|
240
|
+
const expectedTypeString = (expectedNames.length == 1)
|
|
241
|
+
? expectedNames[0]
|
|
242
|
+
: `[${expectedNames.join(', ')}]`;
|
|
243
|
+
const expects = (0, types_1.isValueSchema)(schema) ? (0, array_1.toArray)(schema.valueConstraints ?? []).map((constraint) => constraint.expects) : [];
|
|
244
|
+
const expectsString = (expects.length > 0) ? ` (${expects.join(', ')})` : '';
|
|
245
|
+
return `${expectedTypeString}${expectsString}`;
|
|
281
246
|
}
|
|
282
247
|
//# sourceMappingURL=schema.js.map
|
package/schema/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../source/schema/schema.ts"],"names":[],"mappings":";;;AAAA,4CAAuC;AACvC,8CAAkD;AAElD,gDAA8C;AAC9C,gDAAiD;AACjD,wCAAoC;AACpC,mDAAmD;AACnD,sCAA6C;AAC7C,sDAAqG;AACrG,gEAA4D;AAC5D,0DAAsD;AACtD,8DAA0D;AAC1D,8DAA0D;AAC1D,8DAA0D;AAC1D,wEAAmE;AAEnE,iDAA6C;AAE7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BAAkB,GAAG,CAAC,aAAa,CAAC,MAAM,IAAI,CAAC,CAAC;QACpD,CAAC,CAAC,aAAa,CAAC,CAAC,CAAE;QACnB,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAA,qBAAa,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,eAAO,EAAC,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5H,MAAM,aAAa,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7E,OAAO,GAAG,kBAAkB,GAAG,aAAa,EAAE,CAAC;AACjD,CAAC"}
|
package/schema/types.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ export declare type TransformResult<T> = {
|
|
|
150
150
|
value?: undefined;
|
|
151
151
|
error: SchemaError;
|
|
152
152
|
};
|
|
153
|
+
export declare function objectSchemaProperties<T>(properties: ObjectSchemaProperties<T>): ObjectSchemaProperties<T>;
|
|
153
154
|
export declare function objectSchema<T, O = T>(schema: ObjectSchema<T, O>): ObjectSchema<T, O>;
|
|
154
155
|
export declare function valueSchema<T, O = T>(schema: OneOrMany<Schema<T, O>>, options?: TypedOmit<ValueSchema<T, O>, 'schema'>): ValueSchema<T, O>;
|
|
155
156
|
export declare function typeSchema<T>(type: ValueType<T>): TypeSchema<NormalizeValueType<T>>;
|
package/schema/types.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.valueTypeOrSchemaToSchema = exports.valueTypesOrSchemasToSchemas = exports.resolveValueType = exports.resolveValueTypes = exports.isDeferredValueType = exports.isTypeSchema = exports.isValueSchema = exports.isObjectSchema = exports.isSchema = exports.typeSchema = exports.valueSchema = exports.objectSchema = exports.SchemaValueCoercer = exports.SchemaValueTransformer = exports.SchemaValueConstraint = exports.SchemaArrayConstraint = exports.primitiveConstructorSet = exports.primitiveConstructors = void 0;
|
|
4
|
+
exports.valueTypeOrSchemaToSchema = exports.valueTypesOrSchemasToSchemas = exports.resolveValueType = exports.resolveValueTypes = exports.isDeferredValueType = exports.isTypeSchema = exports.isValueSchema = exports.isObjectSchema = exports.isSchema = exports.typeSchema = exports.valueSchema = exports.objectSchema = exports.objectSchemaProperties = exports.SchemaValueCoercer = exports.SchemaValueTransformer = exports.SchemaValueConstraint = exports.SchemaArrayConstraint = exports.primitiveConstructorSet = exports.primitiveConstructors = void 0;
|
|
5
|
+
const object_1 = require("../utils/object/object");
|
|
5
6
|
const type_guards_1 = require("../utils/type-guards");
|
|
6
7
|
exports.primitiveConstructors = [String, Number, Boolean, Symbol, BigInt, Function, 'undefined', 'null'];
|
|
7
8
|
exports.primitiveConstructorSet = new Set(exports.primitiveConstructors);
|
|
@@ -17,12 +18,16 @@ exports.SchemaValueTransformer = SchemaValueTransformer;
|
|
|
17
18
|
class SchemaValueCoercer {
|
|
18
19
|
}
|
|
19
20
|
exports.SchemaValueCoercer = SchemaValueCoercer;
|
|
21
|
+
function objectSchemaProperties(properties) {
|
|
22
|
+
return (0, object_1.filterObject)(properties, type_guards_1.isDefined);
|
|
23
|
+
}
|
|
24
|
+
exports.objectSchemaProperties = objectSchemaProperties;
|
|
20
25
|
function objectSchema(schema) {
|
|
21
|
-
return schema;
|
|
26
|
+
return (0, object_1.filterObject)(schema, type_guards_1.isDefined);
|
|
22
27
|
}
|
|
23
28
|
exports.objectSchema = objectSchema;
|
|
24
29
|
function valueSchema(schema, options) {
|
|
25
|
-
return { schema, ...options };
|
|
30
|
+
return (0, object_1.filterObject)({ schema, ...options }, type_guards_1.isDefined);
|
|
26
31
|
}
|
|
27
32
|
exports.valueSchema = valueSchema;
|
|
28
33
|
function typeSchema(type) {
|
package/schema/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../source/schema/types.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD,sDAA+E;AAgHlE,QAAA,qBAAqB,GAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAwC,EAAE,MAAwC,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAClL,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC,6BAAqB,CAAC,CAAC;AAEtE,MAAsB,qBAAqB;CAE1C;AAFD,sDAEC;AAID,MAAsB,qBAAqB;CAK1C;AALD,sDAKC;AAED,MAAsB,sBAAsB;CAK3C;AALD,wDAKC;AAED,MAAsB,kBAAkB;CAKvC;AALD,gDAKC;AAgCD,SAAgB,YAAY,CAAW,MAA0B;IAC/D,OAAO,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../source/schema/types.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD,mDAAqD;AACrD,sDAA+E;AAgHlE,QAAA,qBAAqB,GAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAwC,EAAE,MAAwC,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAClL,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC,6BAAqB,CAAC,CAAC;AAEtE,MAAsB,qBAAqB;CAE1C;AAFD,sDAEC;AAID,MAAsB,qBAAqB;CAK1C;AALD,sDAKC;AAED,MAAsB,sBAAsB;CAK3C;AALD,wDAKC;AAED,MAAsB,kBAAkB;CAKvC;AALD,gDAKC;AAgCD,SAAgB,sBAAsB,CAAI,UAAqC;IAC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B,CAAC,IAAI,IAAI,KAAK,CAAC,CACnB,CAAC;AACN,CAAC;AAdD,oCAcC;AAED,SAAgB,mBAAmB,CAAI,KAAmB;IACxD,OAAO,IAAA,sBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,wBAAU,EAAE,KAA2B,CAAC,QAAQ,CAAC,CAAC;AAC9E,CAAC;AAFD,kDAEC;AAED,SAAgB,iBAAiB,CAAI,UAAmC;IACtE,IAAI,IAAA,qBAAO,EAAC,UAAU,CAAC,EAAE;QACvB,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;KACxE;IAED,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAND,8CAMC;AAED,SAAgB,gBAAgB,CAAI,SAAuB;IACzD,OAAO,mBAAmB,CAAC,SAAS,CAAC;QACnC,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACxC,CAAC,CAAC,SAAiC,CAAC;AACxC,CAAC;AAJD,4CAIC;AAED,SAAgB,4BAA4B,CAAO,mBAA2D;IAC5G,IAAI,IAAA,qBAAO,EAAC,mBAAmB,CAAC,EAAE;QAChC,OAAO,mBAAmB,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;KAC3D;IAED,OAAO,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;AACxD,CAAC;AAND,oEAMC;AAED,SAAgB,yBAAyB,CAAO,iBAA8C;IAC5F,IAAI,QAAQ,CAAO,iBAAiB,CAAC,EAAE;QACrC,OAAO,iBAAiB,CAAC;KAC1B;IAED,OAAO,UAAU,CAAC,iBAAiB,CAAkB,CAAC;AACxD,CAAC;AAND,8DAMC"}
|
package/schema/utils/schema.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AbstractConstructor } from "../../types";
|
|
1
2
|
import type { NormalizedSchema, Schema } from '../schema';
|
|
2
3
|
import type { NormalizedObjectSchema, NormalizedTypeSchema, NormalizedValueSchema, ObjectSchema, TypeSchema, ValueSchema } from '../types';
|
|
3
4
|
export declare const normalizeSchema: typeof _normalizeSchema;
|
|
@@ -5,9 +6,11 @@ export declare const normalizeObjectSchema: typeof _normalizeObjectSchema;
|
|
|
5
6
|
export declare const normalizeValueSchema: typeof _normalizeValueSchema;
|
|
6
7
|
export declare const normalizeTypeSchema: typeof _normalizeTypeSchema;
|
|
7
8
|
export declare const getArrayItemSchema: typeof _getArrayItemSchema;
|
|
9
|
+
export declare const getSchemaFromReflection: typeof _getObjectSchemaFromReflection;
|
|
8
10
|
declare function _normalizeSchema<T, O>(schema: Schema<T, O>): NormalizedSchema<T, O>;
|
|
9
11
|
declare function _normalizeObjectSchema<T, O>(schema: ObjectSchema<T, O>): NormalizedObjectSchema<T, O>;
|
|
10
12
|
declare function _normalizeValueSchema<T, O>(schema: ValueSchema<T, O>): NormalizedValueSchema<T, O>;
|
|
11
13
|
declare function _normalizeTypeSchema<T>(schema: TypeSchema<T>): NormalizedTypeSchema<T>;
|
|
12
14
|
declare function _getArrayItemSchema<T, O>(schema: ValueSchema<T, O>): ValueSchema<T, O>;
|
|
15
|
+
declare function _getObjectSchemaFromReflection<T>(type: AbstractConstructor<T>): ObjectSchema<T> | null;
|
|
13
16
|
export {};
|
package/schema/utils/schema.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getArrayItemSchema = exports.normalizeTypeSchema = exports.normalizeValueSchema = exports.normalizeObjectSchema = exports.normalizeSchema = void 0;
|
|
3
|
+
exports.getSchemaFromReflection = exports.getArrayItemSchema = exports.normalizeTypeSchema = exports.normalizeValueSchema = exports.normalizeObjectSchema = exports.normalizeSchema = void 0;
|
|
4
|
+
const registry_1 = require("../../reflection/registry");
|
|
4
5
|
const array_1 = require("../../utils/array/array");
|
|
5
6
|
const memoize_1 = require("../../utils/function/memoize");
|
|
6
7
|
const object_1 = require("../../utils/object/object");
|
|
7
8
|
const type_guards_1 = require("../../utils/type-guards");
|
|
9
|
+
const assign_1 = require("../schemas/assign");
|
|
8
10
|
const types_1 = require("../types");
|
|
9
11
|
exports.normalizeSchema = (0, memoize_1.memoizeSingle)(_normalizeSchema, { weak: true });
|
|
10
12
|
exports.normalizeObjectSchema = (0, memoize_1.memoizeSingle)(_normalizeObjectSchema, { weak: true });
|
|
11
13
|
exports.normalizeValueSchema = (0, memoize_1.memoizeSingle)(_normalizeValueSchema, { weak: true });
|
|
12
14
|
exports.normalizeTypeSchema = (0, memoize_1.memoizeSingle)(_normalizeTypeSchema, { weak: true });
|
|
13
15
|
exports.getArrayItemSchema = (0, memoize_1.memoizeSingle)(_getArrayItemSchema, { weak: true });
|
|
16
|
+
exports.getSchemaFromReflection = (0, memoize_1.memoizeSingle)(_getObjectSchemaFromReflection, { weak: true });
|
|
14
17
|
function _normalizeSchema(schema) {
|
|
15
18
|
if ((0, types_1.isObjectSchema)(schema)) {
|
|
16
19
|
return (0, exports.normalizeObjectSchema)(schema);
|
|
@@ -71,4 +74,43 @@ function _getArrayItemSchema(schema) {
|
|
|
71
74
|
};
|
|
72
75
|
return itemSchema;
|
|
73
76
|
}
|
|
77
|
+
function _getObjectSchemaFromReflection(type) {
|
|
78
|
+
const metadata = registry_1.reflectionRegistry.getMetadata(type);
|
|
79
|
+
if (!metadata.registered) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const typeData = metadata.data.tryGet('schema');
|
|
83
|
+
const properties = {};
|
|
84
|
+
for (const [key, propertyMetadata] of metadata.properties) {
|
|
85
|
+
const reflectionData = propertyMetadata.data.tryGet('schema');
|
|
86
|
+
const itemType = ((0, type_guards_1.isDefined)(reflectionData) && (0, type_guards_1.isDefined)(reflectionData.type)) ? reflectionData.type : undefined;
|
|
87
|
+
const array = (reflectionData?.array == true) ? true : undefined;
|
|
88
|
+
if (array && ((0, type_guards_1.isUndefined)(itemType) || ((0, type_guards_1.isArray)(itemType) && (itemType.length == 0)))) {
|
|
89
|
+
throw new Error(`Item type missing on type ${type.name} at property "${String(key)}"`);
|
|
90
|
+
}
|
|
91
|
+
properties[key] = (0, types_1.valueSchema)((0, types_1.valueTypesOrSchemasToSchemas)(itemType ?? propertyMetadata.type), {
|
|
92
|
+
array,
|
|
93
|
+
optional: reflectionData?.optional,
|
|
94
|
+
nullable: reflectionData?.nullable,
|
|
95
|
+
coerce: reflectionData?.coerce,
|
|
96
|
+
coercers: reflectionData?.coercers,
|
|
97
|
+
transformers: reflectionData?.transformers,
|
|
98
|
+
arrayConstraints: reflectionData?.arrayConstraints,
|
|
99
|
+
valueConstraints: reflectionData?.valueConstraints
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const schema = (0, types_1.objectSchema)({
|
|
103
|
+
sourceType: type,
|
|
104
|
+
factory: (0, type_guards_1.isDefined)(typeData?.factory) ? { builder: typeData.factory } : { type: type },
|
|
105
|
+
properties,
|
|
106
|
+
mask: typeData?.mask,
|
|
107
|
+
allowUnknownProperties: ((0, type_guards_1.isUndefined)(typeData?.allowUnknownProperties) || ((0, type_guards_1.isArray)(typeData?.allowUnknownProperties) && (typeData?.allowUnknownProperties.length == 0))) ? undefined : typeData?.allowUnknownProperties
|
|
108
|
+
});
|
|
109
|
+
const prototype = Reflect.getPrototypeOf(type);
|
|
110
|
+
if ((0, type_guards_1.isNotNull)(prototype) && registry_1.reflectionRegistry.hasType(prototype)) {
|
|
111
|
+
const parentSchema = (0, exports.getSchemaFromReflection)(prototype);
|
|
112
|
+
return (0, assign_1.assign)(parentSchema, schema);
|
|
113
|
+
}
|
|
114
|
+
return schema;
|
|
115
|
+
}
|
|
74
116
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../source/schema/utils/schema.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAC9C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