xdbc 1.0.213 → 1.0.215
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/DBC/AE.d.ts +1 -1
- package/dist/DBC/COMPARISON/GREATER.d.ts +1 -1
- package/dist/DBC/COMPARISON/GREATER_OR_EQUAL.d.ts +1 -1
- package/dist/DBC/COMPARISON/LESS.d.ts +1 -1
- package/dist/DBC/COMPARISON/LESS_OR_EQUAL.d.ts +1 -1
- package/dist/DBC/COMPARISON.d.ts +1 -1
- package/dist/DBC/DEFINED.d.ts +1 -1
- package/dist/DBC/EQ/DIFFERENT.d.ts +1 -1
- package/dist/DBC/EQ.d.ts +1 -1
- package/dist/DBC/HasAttribute.d.ts +1 -1
- package/dist/DBC/IF.d.ts +1 -1
- package/dist/DBC/INSTANCE.d.ts +1 -1
- package/dist/DBC/JSON.OP.d.ts +1 -1
- package/dist/DBC/JSON.Parse.d.ts +1 -1
- package/dist/DBC/OR.d.ts +1 -1
- package/dist/DBC/REGEX.d.ts +1 -1
- package/dist/DBC/TYPE.d.ts +1 -1
- package/dist/DBC/UNDEFINED.d.ts +1 -1
- package/dist/DBC/ZOD.d.ts +1 -1
- package/dist/DBC.d.ts +4 -3
- package/dist/bundle.js +2 -2
- package/package.json +1 -1
- package/src/DBC/AE.ts +2 -2
- package/src/DBC/DEFINED.ts +1 -1
- package/src/DBC/EQ.ts +1 -1
- package/src/DBC/HasAttribute.ts +1 -1
- package/src/DBC/IF.ts +1 -1
- package/src/DBC/INSTANCE.ts +1 -1
- package/src/DBC/JSON.OP.ts +1 -1
- package/src/DBC/JSON.Parse.ts +1 -1
- package/src/DBC/OR.ts +2 -2
- package/src/DBC/REGEX.ts +2 -2
- package/src/DBC/TYPE.ts +1 -1
- package/src/DBC/UNDEFINED.ts +1 -1
- package/src/DBC/ZOD.ts +1 -1
- package/src/DBC.ts +7 -5
package/package.json
CHANGED
package/src/DBC/AE.ts
CHANGED
|
@@ -100,7 +100,7 @@ export class AE extends DBC {
|
|
|
100
100
|
dbc: string | undefined = undefined,
|
|
101
101
|
): (
|
|
102
102
|
target: object,
|
|
103
|
-
methodName: string | symbol,
|
|
103
|
+
methodName: string | symbol | undefined,
|
|
104
104
|
parameterIndex: number,
|
|
105
105
|
) => void {
|
|
106
106
|
return DBC.decPrecondition(
|
|
@@ -108,7 +108,7 @@ export class AE extends DBC {
|
|
|
108
108
|
// biome-ignore lint/suspicious/noExplicitAny: Must match DBC.decPrecondition signature
|
|
109
109
|
value: any,
|
|
110
110
|
target: object,
|
|
111
|
-
methodName: string | symbol,
|
|
111
|
+
methodName: string | symbol | undefined,
|
|
112
112
|
parameterIndex: number,
|
|
113
113
|
) => {
|
|
114
114
|
if (Array.isArray(realConditions)) {
|
package/src/DBC/DEFINED.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class DEFINED extends DBC {
|
|
|
35
35
|
dbc: string | undefined = undefined,
|
|
36
36
|
): (
|
|
37
37
|
target: object,
|
|
38
|
-
methodName: string | symbol,
|
|
38
|
+
methodName: string | symbol | undefined,
|
|
39
39
|
parameterIndex: number,
|
|
40
40
|
) => void {
|
|
41
41
|
return DBC.createPRE(DEFINED.checkAlgorithm, [], dbc, path, hint);
|
package/src/DBC/EQ.ts
CHANGED
package/src/DBC/HasAttribute.ts
CHANGED
package/src/DBC/IF.ts
CHANGED
package/src/DBC/INSTANCE.ts
CHANGED
|
@@ -47,7 +47,7 @@ export class INSTANCE extends DBC {
|
|
|
47
47
|
dbc: string | undefined = undefined,
|
|
48
48
|
): (
|
|
49
49
|
target: object,
|
|
50
|
-
methodName: string | symbol,
|
|
50
|
+
methodName: string | symbol | undefined,
|
|
51
51
|
parameterIndex: number,
|
|
52
52
|
) => void {
|
|
53
53
|
const refs = Array.isArray(reference) ? reference : [reference];
|
package/src/DBC/JSON.OP.ts
CHANGED
package/src/DBC/JSON.Parse.ts
CHANGED
package/src/DBC/OR.ts
CHANGED
|
@@ -70,7 +70,7 @@ export class OR extends DBC {
|
|
|
70
70
|
dbc: string | undefined = undefined,
|
|
71
71
|
): (
|
|
72
72
|
target: object,
|
|
73
|
-
methodName: string | symbol,
|
|
73
|
+
methodName: string | symbol | undefined,
|
|
74
74
|
parameterIndex: number,
|
|
75
75
|
) => void {
|
|
76
76
|
return DBC.decPrecondition(
|
|
@@ -162,7 +162,7 @@ export class OR extends DBC {
|
|
|
162
162
|
): CANDIDATE {
|
|
163
163
|
const result = OR.checkAlgorithm(conditions, toCheck);
|
|
164
164
|
|
|
165
|
-
if (result) {
|
|
165
|
+
if (result === true) {
|
|
166
166
|
return toCheck as CANDIDATE;
|
|
167
167
|
}
|
|
168
168
|
throw new DBC.Infringement(
|
package/src/DBC/REGEX.ts
CHANGED
|
@@ -83,7 +83,7 @@ export class REGEX extends DBC {
|
|
|
83
83
|
dbc: string | undefined = undefined,
|
|
84
84
|
): (
|
|
85
85
|
target: object,
|
|
86
|
-
methodName: string | symbol,
|
|
86
|
+
methodName: string | symbol | undefined,
|
|
87
87
|
parameterIndex: number,
|
|
88
88
|
) => void {
|
|
89
89
|
return DBC.createPRE(REGEX.checkAlgorithm, [expression], dbc, path, hint);
|
|
@@ -160,7 +160,7 @@ export class REGEX extends DBC {
|
|
|
160
160
|
): CANDIDATE {
|
|
161
161
|
const result = REGEX.checkAlgorithm(toCheck, expression);
|
|
162
162
|
|
|
163
|
-
if (result) {
|
|
163
|
+
if (result === true) {
|
|
164
164
|
return toCheck;
|
|
165
165
|
}
|
|
166
166
|
throw new DBC.Infringement(
|
package/src/DBC/TYPE.ts
CHANGED
|
@@ -50,7 +50,7 @@ export class TYPE extends DBC {
|
|
|
50
50
|
dbc: string | undefined = undefined,
|
|
51
51
|
): (
|
|
52
52
|
target: object,
|
|
53
|
-
methodName: string | symbol,
|
|
53
|
+
methodName: string | symbol | undefined,
|
|
54
54
|
parameterIndex: number,
|
|
55
55
|
) => void {
|
|
56
56
|
return DBC.createPRE(TYPE.checkAlgorithm, [type], dbc, path, hint);
|
package/src/DBC/UNDEFINED.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class UNDEFINED extends DBC {
|
|
|
35
35
|
dbc: string | undefined = undefined,
|
|
36
36
|
): (
|
|
37
37
|
target: object,
|
|
38
|
-
methodName: string | symbol,
|
|
38
|
+
methodName: string | symbol | undefined,
|
|
39
39
|
parameterIndex: number,
|
|
40
40
|
) => void {
|
|
41
41
|
return DBC.createPRE(UNDEFINED.checkAlgorithm, [], dbc, path, hint);
|
package/src/DBC/ZOD.ts
CHANGED
|
@@ -42,7 +42,7 @@ export class ZOD extends DBC {
|
|
|
42
42
|
dbc = "WaXCode.DBC",
|
|
43
43
|
): (
|
|
44
44
|
target: object,
|
|
45
|
-
methodName: string | symbol,
|
|
45
|
+
methodName: string | symbol | undefined,
|
|
46
46
|
parameterIndex: number,
|
|
47
47
|
) => void {
|
|
48
48
|
return DBC.createPRE(ZOD.checkAlgorithm, [schema], dbc, path);
|
package/src/DBC.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class DBC {
|
|
|
52
52
|
*/
|
|
53
53
|
private static getRequestKey(
|
|
54
54
|
target: object,
|
|
55
|
-
methodName: string | symbol,
|
|
55
|
+
methodName: string | symbol | undefined,
|
|
56
56
|
): string {
|
|
57
57
|
const className =
|
|
58
58
|
typeof target === "function"
|
|
@@ -72,7 +72,7 @@ export class DBC {
|
|
|
72
72
|
* @param receptor The method the requested parameter-value shall be passed to when it becomes available. */
|
|
73
73
|
protected static requestParamValue(
|
|
74
74
|
target: object,
|
|
75
|
-
methodName: string | symbol,
|
|
75
|
+
methodName: string | symbol | undefined,
|
|
76
76
|
index: number,
|
|
77
77
|
// biome-ignore lint/suspicious/noExplicitAny: Gotta be any since parameter-values may be undefined.
|
|
78
78
|
receptor: (value: any) => undefined,
|
|
@@ -119,6 +119,8 @@ export class DBC {
|
|
|
119
119
|
public static ParamvalueProvider(target: object, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
120
120
|
// biome-ignore lint/suspicious/noExplicitAny: Must handle both method and class decorator signatures
|
|
121
121
|
public static ParamvalueProvider<T extends new (...args: any[]) => any>(constructor: T): T;
|
|
122
|
+
// biome-ignore lint/suspicious/noExplicitAny: Must accept abstract class constructors
|
|
123
|
+
public static ParamvalueProvider<T extends abstract new (...args: any[]) => any>(constructor: T): T;
|
|
122
124
|
// biome-ignore lint/suspicious/noExplicitAny: Must handle both method and class decorator signatures
|
|
123
125
|
public static ParamvalueProvider(...args: any[]): any {
|
|
124
126
|
if (args.length === 1 && typeof args[0] === "function") {
|
|
@@ -400,7 +402,7 @@ export class DBC {
|
|
|
400
402
|
check: (
|
|
401
403
|
value: unknown,
|
|
402
404
|
target: object,
|
|
403
|
-
methodName: string | symbol,
|
|
405
|
+
methodName: string | symbol | undefined,
|
|
404
406
|
parameterIndex: number,
|
|
405
407
|
) => boolean | string,
|
|
406
408
|
dbc: string | undefined = undefined,
|
|
@@ -408,14 +410,14 @@ export class DBC {
|
|
|
408
410
|
hint: string | undefined = undefined,
|
|
409
411
|
): (
|
|
410
412
|
target: object,
|
|
411
|
-
methodName: string | symbol,
|
|
413
|
+
methodName: string | symbol | undefined,
|
|
412
414
|
parameterIndex: number,
|
|
413
415
|
) => void {
|
|
414
416
|
const paths = path ? path.replace(/ /g, "").split("::") : [undefined];
|
|
415
417
|
let dbcInstance: DBC | undefined;
|
|
416
418
|
return (
|
|
417
419
|
target: object,
|
|
418
|
-
methodName: string | symbol,
|
|
420
|
+
methodName: string | symbol | undefined,
|
|
419
421
|
parameterIndex: number,
|
|
420
422
|
): void => {
|
|
421
423
|
DBC.requestParamValue(
|