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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.213",
2
+ "version": "1.0.215",
3
3
  "name": "xdbc",
4
4
  "main": "dist/bundle.js",
5
5
  "types": "dist/DBC.d.ts",
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)) {
@@ -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
@@ -48,7 +48,7 @@ export class EQ extends DBC {
48
48
  dbc: string | undefined = undefined,
49
49
  ): (
50
50
  target: object,
51
- methodName: string | symbol,
51
+ methodName: string | symbol | undefined,
52
52
  parameterIndex: number,
53
53
  ) => void {
54
54
  return DBC.createPRE(
@@ -49,7 +49,7 @@ export class HasAttribute extends DBC {
49
49
  dbc = "WaXCode.DBC",
50
50
  ): (
51
51
  target: object,
52
- methodName: string | symbol,
52
+ methodName: string | symbol | undefined,
53
53
  parameterIndex: number,
54
54
  ) => void {
55
55
  return DBC.createPRE(
package/src/DBC/IF.ts CHANGED
@@ -69,7 +69,7 @@ export class IF extends DBC {
69
69
  dbc: string | undefined = undefined,
70
70
  ): (
71
71
  target: object,
72
- methodName: string | symbol,
72
+ methodName: string | symbol | undefined,
73
73
  parameterIndex: number,
74
74
  ) => void {
75
75
  return DBC.createPRE(
@@ -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];
@@ -68,7 +68,7 @@ export class JSON_OP extends DBC {
68
68
  dbc = "WaXCode.DBC",
69
69
  ): (
70
70
  target: object,
71
- methodName: string | symbol,
71
+ methodName: string | symbol | undefined,
72
72
  parameterIndex: number,
73
73
  ) => void {
74
74
  return DBC.createPRE(
@@ -49,7 +49,7 @@ export class JSON_Parse extends DBC {
49
49
  dbc: string | undefined = undefined,
50
50
  ): (
51
51
  target: object,
52
- methodName: string | symbol,
52
+ methodName: string | symbol | undefined,
53
53
  parameterIndex: number,
54
54
  ) => void {
55
55
  return DBC.createPRE(
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);
@@ -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(