@skmtc/core 0.0.328 → 0.0.329

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.
@@ -3,12 +3,12 @@ import type { RegisterArgs } from '../context/GenerateContext.js';
3
3
  import type { GeneratorKey } from '../types/GeneratorKeys.js';
4
4
  type ValueBaseArgs = {
5
5
  context: GenerateContext;
6
- generatorKey: GeneratorKey;
6
+ generatorKey?: GeneratorKey;
7
7
  };
8
8
  export declare class ValueBase {
9
9
  context: GenerateContext;
10
10
  skipped: boolean;
11
- generatorKey: GeneratorKey;
11
+ generatorKey: GeneratorKey | undefined;
12
12
  constructor({ context, generatorKey }: ValueBaseArgs);
13
13
  register(args: RegisterArgs): void;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ValueBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ValueBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,qBAAa,SAAS;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAQ;IACxB,YAAY,EAAE,YAAY,CAAA;gBAEd,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,aAAa;IAOpD,QAAQ,CAAC,IAAI,EAAE,YAAY;CAG5B"}
1
+ {"version":3,"file":"ValueBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ValueBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED,qBAAa,SAAS;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAQ;IACxB,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;gBAE1B,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,aAAa;IAOpD,QAAQ,CAAC,IAAI,EAAE,YAAY;CAG5B"}
@@ -31,10 +31,9 @@ const proxyHandler = {
31
31
  return propertyName === 'toString'
32
32
  ? new Proxy(target[propertyName], {
33
33
  apply: (toString, thisArg) => {
34
- if (!target.generatorKey) {
35
- throw new Error('generatorKey is required');
34
+ if (target.generatorKey) {
35
+ target.context.callback(target.generatorKey);
36
36
  }
37
- target.context.callback(target.generatorKey);
38
37
  return toString.apply(thisArg);
39
38
  }
40
39
  })
@@ -49,7 +49,7 @@ export declare const toOperationInsertable: (config: OperationConfig) => {
49
49
  register(args: Partial<import("../context/GenerateContext.js").RegisterArgs>): void;
50
50
  context: GenerateContext;
51
51
  skipped: boolean;
52
- generatorKey: import("../types/GeneratorKeys.js").GeneratorKey;
52
+ generatorKey: import("../types/GeneratorKeys.js").GeneratorKey | undefined;
53
53
  };
54
54
  id: string;
55
55
  entityType: EntityType;
@@ -84,7 +84,7 @@ export declare const toModelInsertable: (config: ModelConfig) => {
84
84
  register(args: Partial<import("../context/GenerateContext.js").RegisterArgs>): void;
85
85
  context: GenerateContext;
86
86
  skipped: boolean;
87
- generatorKey: import("../types/GeneratorKeys.js").GeneratorKey;
87
+ generatorKey: import("../types/GeneratorKeys.js").GeneratorKey | undefined;
88
88
  };
89
89
  id: string;
90
90
  type: "model";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.328",
3
+ "version": "0.0.329",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -3,12 +3,12 @@ import type { RegisterArgs } from '../context/GenerateContext.js';
3
3
  import type { GeneratorKey } from '../types/GeneratorKeys.js';
4
4
  type ValueBaseArgs = {
5
5
  context: GenerateContext;
6
- generatorKey: GeneratorKey;
6
+ generatorKey?: GeneratorKey;
7
7
  };
8
8
  export declare class ValueBase {
9
9
  context: GenerateContext;
10
10
  skipped: boolean;
11
- generatorKey: GeneratorKey;
11
+ generatorKey: GeneratorKey | undefined;
12
12
  constructor({ context, generatorKey }: ValueBaseArgs);
13
13
  register(args: RegisterArgs): void;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ValueBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ValueBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,qBAAa,SAAS;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAQ;IACxB,YAAY,EAAE,YAAY,CAAA;gBAEd,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,aAAa;IAOpD,QAAQ,CAAC,IAAI,EAAE,YAAY;CAG5B"}
1
+ {"version":3,"file":"ValueBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ValueBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED,qBAAa,SAAS;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAQ;IACxB,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;gBAE1B,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,aAAa;IAOpD,QAAQ,CAAC,IAAI,EAAE,YAAY;CAG5B"}
@@ -35,10 +35,9 @@ const proxyHandler = {
35
35
  return propertyName === 'toString'
36
36
  ? new Proxy(target[propertyName], {
37
37
  apply: (toString, thisArg) => {
38
- if (!target.generatorKey) {
39
- throw new Error('generatorKey is required');
38
+ if (target.generatorKey) {
39
+ target.context.callback(target.generatorKey);
40
40
  }
41
- target.context.callback(target.generatorKey);
42
41
  return toString.apply(thisArg);
43
42
  }
44
43
  })
@@ -49,7 +49,7 @@ export declare const toOperationInsertable: (config: OperationConfig) => {
49
49
  register(args: Partial<import("../context/GenerateContext.js").RegisterArgs>): void;
50
50
  context: GenerateContext;
51
51
  skipped: boolean;
52
- generatorKey: import("../types/GeneratorKeys.js").GeneratorKey;
52
+ generatorKey: import("../types/GeneratorKeys.js").GeneratorKey | undefined;
53
53
  };
54
54
  id: string;
55
55
  entityType: EntityType;
@@ -84,7 +84,7 @@ export declare const toModelInsertable: (config: ModelConfig) => {
84
84
  register(args: Partial<import("../context/GenerateContext.js").RegisterArgs>): void;
85
85
  context: GenerateContext;
86
86
  skipped: boolean;
87
- generatorKey: import("../types/GeneratorKeys.js").GeneratorKey;
87
+ generatorKey: import("../types/GeneratorKeys.js").GeneratorKey | undefined;
88
88
  };
89
89
  id: string;
90
90
  type: "model";