@skmtc/core 0.57.0 → 0.58.0

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.
@@ -98,8 +98,6 @@ export type CreateAndRegisterDefinition<Schema extends SchemaType> = {
98
98
  destinationPath: string;
99
99
  /** Function to transform the schema into a generated value */
100
100
  schemaToValueFn: SchemaToValueFn;
101
- /** The ref of the model whose value tree holds the schema */
102
- rootRef?: RefParts;
103
101
  /** Whether to exclude this definition from exports */
104
102
  noExport?: boolean;
105
103
  };
@@ -764,7 +764,6 @@ export class GenerateContext {
764
764
  context: this,
765
765
  projection,
766
766
  ref,
767
- rootRef: ref,
768
767
  ...toInsertOptions(rest)
769
768
  });
770
769
  return new Inserted({ settings, definition });
@@ -15,7 +15,6 @@ type CreateModelArgs<V extends GeneratedValue, EnrichmentType, ProjectionOptions
15
15
  projection: ModelProjection<V, EnrichmentType, ProjectionOptions>;
16
16
  /** The model's ref; an `OasRef` fits it. */
17
17
  ref: RefParts;
18
- rootRef?: RefParts;
19
18
  } & InsertModelOptions<ProjectionOptions>;
20
19
  /**
21
20
  * Driver for the model insertion lifecycle.
@@ -33,7 +32,6 @@ export declare class ModelDriver<V extends GeneratedValue, EnrichmentType, Proje
33
32
  settings: ContentSettings<EnrichmentType>;
34
33
  destinationPath?: string;
35
34
  definition: GeneratedDefinition<V>;
36
- rootRef?: RefParts;
37
35
  noExport: boolean;
38
36
  variant: string;
39
37
  /** The caller's options, as passed to `insertModel`. */
@@ -57,12 +57,6 @@ export class ModelDriver {
57
57
  writable: true,
58
58
  value: void 0
59
59
  });
60
- Object.defineProperty(this, "rootRef", {
61
- enumerable: true,
62
- configurable: true,
63
- writable: true,
64
- value: void 0
65
- });
66
60
  Object.defineProperty(this, "noExport", {
67
61
  enumerable: true,
68
62
  configurable: true,
@@ -82,12 +76,11 @@ export class ModelDriver {
82
76
  writable: true,
83
77
  value: void 0
84
78
  });
85
- const { context, projection, ref, destinationPath, rootRef, noExport = false, variant = DEFAULT_VARIANT } = args;
79
+ const { context, projection, ref, destinationPath, noExport = false, variant = DEFAULT_VARIANT } = args;
86
80
  this.context = context;
87
81
  this.projection = projection;
88
82
  this.ref = ref;
89
83
  this.destinationPath = destinationPath;
90
- this.rootRef = rootRef;
91
84
  this.noExport = noExport;
92
85
  this.variant = variant;
93
86
  this.options = readProjectionOptions(args);
@@ -158,7 +151,6 @@ export class ModelDriver {
158
151
  context: this.context,
159
152
  settings: this.settings,
160
153
  destinationPath: this.settings.exportPath,
161
- rootRef: this.rootRef,
162
154
  options: this.options
163
155
  }));
164
156
  const definition = this.projection.lang.toDefinition({
@@ -20,7 +20,6 @@ export type ModelProjectionConstructorArgs<EnrichmentType = undefined, Projectio
20
20
  ref: RefParts;
21
21
  settings: ContentSettings<EnrichmentType>;
22
22
  destinationPath: string;
23
- rootRef?: RefParts;
24
23
  } & ProjectionOptionsArg<ProjectionOptions>;
25
24
  export type WithTransformModel = {
26
25
  transformModel: (ref: RefParts) => void;
@@ -104,7 +103,7 @@ export type ToModelExportPathArgs<EnrichmentType = undefined, ProjectionOptions
104
103
  export type ModelProjection<V extends GeneratedValue, EnrichmentType = undefined, ProjectionOptions = undefined> = {
105
104
  prototype: V;
106
105
  } & {
107
- new ({ context, ref, settings, destinationPath, rootRef, options }: ModelProjectionConstructorArgs<EnrichmentType, ProjectionOptions>): V;
106
+ new ({ context, ref, settings, destinationPath, options }: ModelProjectionConstructorArgs<EnrichmentType, ProjectionOptions>): V;
108
107
  id: string;
109
108
  type: 'model';
110
109
  /**
@@ -7,7 +7,6 @@ import type { GenerateContextType } from '../context/generateTypes.js';
7
7
  import type { CustomValue } from '../dsl/CustomValue.js';
8
8
  import type { OasVoid } from '../oas/void/Void.js';
9
9
  import type { GeneratorKey } from '../dsl/GeneratorKeys.js';
10
- import type { RefParts } from '../helpers/refFns.js';
11
10
  /**
12
11
  * Union type representing all possible type system values in the SKMTC code generation system.
13
12
  *
@@ -554,8 +553,6 @@ export type TypeSystemArgs<Schema extends SchemaType> = {
554
553
  destinationPath: string;
555
554
  /** The schema to transform */
556
555
  schema: Schema;
557
- /** The ref of the model whose value tree holds the schema */
558
- rootRef?: RefParts;
559
556
  /** Whether the schema field is required */
560
557
  required: boolean | undefined;
561
558
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Skmtc is a declarative code generation framework",
5
5
  "keywords": [
6
6
  "openapi",
@@ -98,8 +98,6 @@ export type CreateAndRegisterDefinition<Schema extends SchemaType> = {
98
98
  destinationPath: string;
99
99
  /** Function to transform the schema into a generated value */
100
100
  schemaToValueFn: SchemaToValueFn;
101
- /** The ref of the model whose value tree holds the schema */
102
- rootRef?: RefParts;
103
101
  /** Whether to exclude this definition from exports */
104
102
  noExport?: boolean;
105
103
  };
@@ -774,7 +774,6 @@ class GenerateContext {
774
774
  context: this,
775
775
  projection,
776
776
  ref,
777
- rootRef: ref,
778
777
  ...(0, InsertOptions_js_1.toInsertOptions)(rest)
779
778
  });
780
779
  return new Inserted_js_1.Inserted({ settings, definition });
@@ -15,7 +15,6 @@ type CreateModelArgs<V extends GeneratedValue, EnrichmentType, ProjectionOptions
15
15
  projection: ModelProjection<V, EnrichmentType, ProjectionOptions>;
16
16
  /** The model's ref; an `OasRef` fits it. */
17
17
  ref: RefParts;
18
- rootRef?: RefParts;
19
18
  } & InsertModelOptions<ProjectionOptions>;
20
19
  /**
21
20
  * Driver for the model insertion lifecycle.
@@ -33,7 +32,6 @@ export declare class ModelDriver<V extends GeneratedValue, EnrichmentType, Proje
33
32
  settings: ContentSettings<EnrichmentType>;
34
33
  destinationPath?: string;
35
34
  definition: GeneratedDefinition<V>;
36
- rootRef?: RefParts;
37
35
  noExport: boolean;
38
36
  variant: string;
39
37
  /** The caller's options, as passed to `insertModel`. */
@@ -63,12 +63,6 @@ class ModelDriver {
63
63
  writable: true,
64
64
  value: void 0
65
65
  });
66
- Object.defineProperty(this, "rootRef", {
67
- enumerable: true,
68
- configurable: true,
69
- writable: true,
70
- value: void 0
71
- });
72
66
  Object.defineProperty(this, "noExport", {
73
67
  enumerable: true,
74
68
  configurable: true,
@@ -88,12 +82,11 @@ class ModelDriver {
88
82
  writable: true,
89
83
  value: void 0
90
84
  });
91
- const { context, projection, ref, destinationPath, rootRef, noExport = false, variant = Variant_js_1.DEFAULT_VARIANT } = args;
85
+ const { context, projection, ref, destinationPath, noExport = false, variant = Variant_js_1.DEFAULT_VARIANT } = args;
92
86
  this.context = context;
93
87
  this.projection = projection;
94
88
  this.ref = ref;
95
89
  this.destinationPath = destinationPath;
96
- this.rootRef = rootRef;
97
90
  this.noExport = noExport;
98
91
  this.variant = variant;
99
92
  this.options = (0, ProjectionOptions_js_1.readProjectionOptions)(args);
@@ -164,7 +157,6 @@ class ModelDriver {
164
157
  context: this.context,
165
158
  settings: this.settings,
166
159
  destinationPath: this.settings.exportPath,
167
- rootRef: this.rootRef,
168
160
  options: this.options
169
161
  }));
170
162
  const definition = this.projection.lang.toDefinition({
@@ -20,7 +20,6 @@ export type ModelProjectionConstructorArgs<EnrichmentType = undefined, Projectio
20
20
  ref: RefParts;
21
21
  settings: ContentSettings<EnrichmentType>;
22
22
  destinationPath: string;
23
- rootRef?: RefParts;
24
23
  } & ProjectionOptionsArg<ProjectionOptions>;
25
24
  export type WithTransformModel = {
26
25
  transformModel: (ref: RefParts) => void;
@@ -104,7 +103,7 @@ export type ToModelExportPathArgs<EnrichmentType = undefined, ProjectionOptions
104
103
  export type ModelProjection<V extends GeneratedValue, EnrichmentType = undefined, ProjectionOptions = undefined> = {
105
104
  prototype: V;
106
105
  } & {
107
- new ({ context, ref, settings, destinationPath, rootRef, options }: ModelProjectionConstructorArgs<EnrichmentType, ProjectionOptions>): V;
106
+ new ({ context, ref, settings, destinationPath, options }: ModelProjectionConstructorArgs<EnrichmentType, ProjectionOptions>): V;
108
107
  id: string;
109
108
  type: 'model';
110
109
  /**
@@ -7,7 +7,6 @@ import type { GenerateContextType } from '../context/generateTypes.js';
7
7
  import type { CustomValue } from '../dsl/CustomValue.js';
8
8
  import type { OasVoid } from '../oas/void/Void.js';
9
9
  import type { GeneratorKey } from '../dsl/GeneratorKeys.js';
10
- import type { RefParts } from '../helpers/refFns.js';
11
10
  /**
12
11
  * Union type representing all possible type system values in the SKMTC code generation system.
13
12
  *
@@ -554,8 +553,6 @@ export type TypeSystemArgs<Schema extends SchemaType> = {
554
553
  destinationPath: string;
555
554
  /** The schema to transform */
556
555
  schema: Schema;
557
- /** The ref of the model whose value tree holds the schema */
558
- rootRef?: RefParts;
559
556
  /** Whether the schema field is required */
560
557
  required: boolean | undefined;
561
558
  };