@skmtc/core 0.0.932 → 0.0.933
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/esm/context/GenerateContext.d.ts +5 -158
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/RenderContext.d.ts +1 -1
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/types.d.ts +179 -0
- package/esm/context/types.d.ts.map +1 -1
- package/esm/dsl/ContentBase.d.ts +2 -2
- package/esm/dsl/ContentBase.d.ts.map +1 -1
- package/esm/dsl/Definition.d.ts +1 -1
- package/esm/dsl/Definition.d.ts.map +1 -1
- package/esm/{types → dsl}/GeneratedValue.d.ts +2 -2
- package/esm/dsl/GeneratedValue.d.ts.map +1 -0
- package/esm/dsl/GeneratedValueList.d.ts +1 -1
- package/esm/dsl/GeneratedValueList.d.ts.map +1 -1
- package/{script/types → esm/dsl}/GeneratorKeys.d.ts +3 -3
- package/esm/dsl/GeneratorKeys.d.ts.map +1 -0
- package/esm/{types → dsl}/GeneratorKeys.js +2 -4
- package/esm/dsl/Inserted.d.ts +1 -1
- package/esm/dsl/Inserted.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.d.ts +4 -3
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.d.ts +2 -2
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +1 -1
- package/esm/dsl/model/toModelBase.d.ts +3 -3
- package/esm/dsl/model/toModelBase.js +1 -1
- package/esm/dsl/operation/OperationBase.d.ts +4 -3
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.d.ts +2 -2
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +1 -1
- package/esm/dsl/operation/toOperationBase.d.ts +5 -5
- package/esm/dsl/operation/toOperationBase.js +1 -1
- package/esm/mod.d.ts +2 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -2
- package/esm/types/CustomValue.d.ts +1 -1
- package/esm/types/CustomValue.d.ts.map +1 -1
- package/esm/types/TypeSystem.d.ts +1 -1
- package/esm/types/TypeSystem.d.ts.map +1 -1
- package/esm/typescript/ReactRouterPathParams.d.ts +1 -1
- package/esm/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/package.json +3 -3
- package/script/context/GenerateContext.d.ts +5 -158
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/RenderContext.d.ts +1 -1
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/types.d.ts +179 -0
- package/script/context/types.d.ts.map +1 -1
- package/script/dsl/ContentBase.d.ts +2 -2
- package/script/dsl/ContentBase.d.ts.map +1 -1
- package/script/dsl/Definition.d.ts +1 -1
- package/script/dsl/Definition.d.ts.map +1 -1
- package/script/{types → dsl}/GeneratedValue.d.ts +2 -2
- package/script/dsl/GeneratedValue.d.ts.map +1 -0
- package/script/dsl/GeneratedValueList.d.ts +1 -1
- package/script/dsl/GeneratedValueList.d.ts.map +1 -1
- package/{esm/types → script/dsl}/GeneratorKeys.d.ts +3 -3
- package/script/dsl/GeneratorKeys.d.ts.map +1 -0
- package/script/{types → dsl}/GeneratorKeys.js +2 -4
- package/script/dsl/Inserted.d.ts +1 -1
- package/script/dsl/Inserted.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.d.ts +4 -3
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.d.ts +2 -2
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +1 -1
- package/script/dsl/model/toModelBase.d.ts +3 -3
- package/script/dsl/model/toModelBase.js +1 -1
- package/script/dsl/operation/OperationBase.d.ts +4 -3
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.d.ts +2 -2
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +1 -1
- package/script/dsl/operation/toOperationBase.d.ts +5 -5
- package/script/dsl/operation/toOperationBase.js +1 -1
- package/script/mod.d.ts +2 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +2 -2
- package/script/types/CustomValue.d.ts +1 -1
- package/script/types/CustomValue.d.ts.map +1 -1
- package/script/types/TypeSystem.d.ts +1 -1
- package/script/types/TypeSystem.d.ts.map +1 -1
- package/script/typescript/ReactRouterPathParams.d.ts +1 -1
- package/script/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/esm/types/GeneratedValue.d.ts.map +0 -1
- package/esm/types/GeneratorKeys.d.ts.map +0 -1
- package/script/types/GeneratedValue.d.ts.map +0 -1
- package/script/types/GeneratorKeys.d.ts.map +0 -1
- /package/esm/{types → dsl}/GeneratedValue.js +0 -0
- /package/script/{types → dsl}/GeneratedValue.js +0 -0
|
@@ -3,12 +3,13 @@ import { Definition } from '../dsl/Definition.js';
|
|
|
3
3
|
import type { OasDocument } from '../oas/document/Document.js';
|
|
4
4
|
import type { OasSchema } from '../oas/schema/Schema.js';
|
|
5
5
|
import type { OasRef } from '../oas/ref/Ref.js';
|
|
6
|
+
import type { BuildModelSettingsArgs, DefineAndRegisterArgs, GenerateContextType, GenerateResult, InsertModelOptions, InsertNormalisedModelArgs, InsertNormalisedModelOptions, InsertNormalisedModelReturn, InsertOperationOptions, PickArgs, RegisterArgs, RegisterJsonArgs, ToOperationSettingsArgs } from './types.js';
|
|
6
7
|
import type { ClientSettings } from '../types/Settings.js';
|
|
7
8
|
import type { Method } from '../types/Method.js';
|
|
8
9
|
import type { OperationInsertable } from '../dsl/operation/types.js';
|
|
9
10
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
10
11
|
import type { ModelInsertable } from '../dsl/model/types.js';
|
|
11
|
-
import type { GenerationType, GeneratedValue } from '../
|
|
12
|
+
import type { GenerationType, GeneratedValue } from '../dsl/GeneratedValue.js';
|
|
12
13
|
import { ContentSettings } from '../dsl/ContentSettings.js';
|
|
13
14
|
import type { RefName } from '../types/RefName.js';
|
|
14
15
|
import type * as log from '../deps/jsr.io/@std/log/0.224.14/mod.js';
|
|
@@ -16,12 +17,10 @@ import type { Logger } from '../types/Logger.js';
|
|
|
16
17
|
import type { ResultType } from '../types/Results.js';
|
|
17
18
|
import type { StackTrail } from './StackTrail.js';
|
|
18
19
|
import type { Identifier } from '../dsl/Identifier.js';
|
|
19
|
-
import type {
|
|
20
|
+
import type { SchemaToValueFn, SchemaType } from '../types/TypeSystem.js';
|
|
20
21
|
import { Inserted } from '../dsl/Inserted.js';
|
|
21
|
-
import { File } from '../dsl/File.js';
|
|
22
|
-
import { JsonFile } from '../dsl/JsonFile.js';
|
|
23
22
|
import type { GeneratorsMapContainer } from '../types/GeneratorType.js';
|
|
24
|
-
import type { OperationSource, ModelSource
|
|
23
|
+
import type { OperationSource, ModelSource } from '../types/Preview.js';
|
|
25
24
|
import type { OasVoid } from '../oas/void/Void.js';
|
|
26
25
|
type ConstructorArgs = {
|
|
27
26
|
oasDocument: OasDocument;
|
|
@@ -31,30 +30,6 @@ type ConstructorArgs = {
|
|
|
31
30
|
captureCurrentResult: (result: ResultType) => void;
|
|
32
31
|
toGeneratorConfigMap: <EnrichmentType = undefined>() => GeneratorsMapContainer<EnrichmentType>;
|
|
33
32
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Arguments for picking a specific export from a generator module.
|
|
36
|
-
*
|
|
37
|
-
* Used to select and configure specific exports from generator modules
|
|
38
|
-
* during the artifact generation process.
|
|
39
|
-
*/
|
|
40
|
-
export type PickArgs = {
|
|
41
|
-
/** The name of the export to pick from the generator module */
|
|
42
|
-
name: string;
|
|
43
|
-
/** The file path where the export should be made available */
|
|
44
|
-
exportPath: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Arguments for registering a JSON file in the generation context.
|
|
48
|
-
*
|
|
49
|
-
* Used to register JSON configuration files, manifests, or other JSON
|
|
50
|
-
* data that should be included in the generated output artifacts.
|
|
51
|
-
*/
|
|
52
|
-
export type RegisterJsonArgs = {
|
|
53
|
-
/** The destination file path where the JSON should be written */
|
|
54
|
-
destinationPath: string;
|
|
55
|
-
/** The JSON object to write to the file */
|
|
56
|
-
json: Record<string, unknown>;
|
|
57
|
-
};
|
|
58
33
|
/**
|
|
59
34
|
* Arguments for applying package imports to a generated file.
|
|
60
35
|
*
|
|
@@ -81,22 +56,6 @@ export type BaseRegisterArgs = {
|
|
|
81
56
|
/** Definition objects to include in the generated content */
|
|
82
57
|
definitions?: (Definition | undefined)[];
|
|
83
58
|
};
|
|
84
|
-
/**
|
|
85
|
-
* Arguments for registering generated content with a specific destination.
|
|
86
|
-
*
|
|
87
|
-
* Extends BaseRegisterArgs to include a destination path, allowing content
|
|
88
|
-
* to be registered and associated with a specific output file location.
|
|
89
|
-
*/
|
|
90
|
-
export type RegisterArgs = {
|
|
91
|
-
/** Import statements to include, organized by module path */
|
|
92
|
-
imports?: Record<string, ImportNameArg[]>;
|
|
93
|
-
/** Re-export statements to include, organized by module path */
|
|
94
|
-
reExports?: Record<string, Identifier[]>;
|
|
95
|
-
/** Definition objects to include in the generated content */
|
|
96
|
-
definitions?: (Definition | undefined)[];
|
|
97
|
-
/** The destination file path where the content should be registered */
|
|
98
|
-
destinationPath: string;
|
|
99
|
-
};
|
|
100
59
|
/**
|
|
101
60
|
* Arguments for creating and registering a definition from a schema.
|
|
102
61
|
*
|
|
@@ -119,24 +78,6 @@ export type CreateAndRegisterDefinition<Schema extends SchemaType> = {
|
|
|
119
78
|
/** Whether to exclude this definition from exports */
|
|
120
79
|
noExport?: boolean;
|
|
121
80
|
};
|
|
122
|
-
/**
|
|
123
|
-
* Arguments for defining and registering a value in the generation context.
|
|
124
|
-
*
|
|
125
|
-
* Used to create definitions from pre-generated values and register them
|
|
126
|
-
* in the generation context for inclusion in output files.
|
|
127
|
-
*
|
|
128
|
-
* @template V - The generated value type extending GeneratedValue
|
|
129
|
-
*/
|
|
130
|
-
export type DefineAndRegisterArgs<V extends GeneratedValue> = {
|
|
131
|
-
/** The identifier for the definition */
|
|
132
|
-
identifier: Identifier;
|
|
133
|
-
/** The generated value to define */
|
|
134
|
-
value: V;
|
|
135
|
-
/** The destination file path where the definition should be registered */
|
|
136
|
-
destinationPath: string;
|
|
137
|
-
/** Whether to exclude this definition from exports */
|
|
138
|
-
noExport?: boolean;
|
|
139
|
-
};
|
|
140
81
|
/**
|
|
141
82
|
* Arguments for retrieving operation-specific settings.
|
|
142
83
|
*
|
|
@@ -177,75 +118,6 @@ export type ToModelSettingsArgs = {
|
|
|
177
118
|
/** The reference name of the model */
|
|
178
119
|
refName: RefName;
|
|
179
120
|
};
|
|
180
|
-
/**
|
|
181
|
-
* Options for inserting an operation into the generation context.
|
|
182
|
-
*
|
|
183
|
-
* Configures how an OpenAPI operation should be processed and
|
|
184
|
-
* included in the generated code output.
|
|
185
|
-
*
|
|
186
|
-
* @template T - The generation type extending GenerationType
|
|
187
|
-
*/
|
|
188
|
-
export type InsertOperationOptions<T extends GenerationType> = {
|
|
189
|
-
/** Whether to exclude this operation from exports */
|
|
190
|
-
noExport?: boolean;
|
|
191
|
-
/** The type of generation to apply */
|
|
192
|
-
generation?: T;
|
|
193
|
-
/** Custom destination path for the operation */
|
|
194
|
-
destinationPath?: string;
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Arguments for inserting a normalized model into the generation context.
|
|
198
|
-
*
|
|
199
|
-
* Used to process and register OpenAPI schema objects as normalized
|
|
200
|
-
* model definitions with fallback naming when schema names are unavailable.
|
|
201
|
-
*
|
|
202
|
-
* @template Schema - The schema type (OasSchema, OasRef, or OasVoid)
|
|
203
|
-
*/
|
|
204
|
-
export type InsertNormalisedModelArgs<Schema extends OasSchema | OasRef<'schema'> | OasVoid> = {
|
|
205
|
-
/** Fallback name to use if the schema doesn't have a name */
|
|
206
|
-
fallbackName: string;
|
|
207
|
-
/** The OpenAPI schema to normalize and insert */
|
|
208
|
-
schema: Schema;
|
|
209
|
-
/** The destination file path for the model */
|
|
210
|
-
destinationPath: string;
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Options for inserting a normalized model.
|
|
214
|
-
*
|
|
215
|
-
* Configures how a normalized model should be processed and
|
|
216
|
-
* included in the generated code output.
|
|
217
|
-
*/
|
|
218
|
-
export type InsertNormalisedModelOptions = {
|
|
219
|
-
/** Whether to exclude this model from exports */
|
|
220
|
-
noExport?: boolean;
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Return type for inserting a normalized model.
|
|
224
|
-
*
|
|
225
|
-
* Provides type-safe return values based on the schema type being processed.
|
|
226
|
-
* Returns different Definition types depending on whether the schema is a
|
|
227
|
-
* reference or a concrete schema.
|
|
228
|
-
*
|
|
229
|
-
* @template V - The generated value type
|
|
230
|
-
* @template Schema - The schema type being processed
|
|
231
|
-
*/
|
|
232
|
-
export type InsertNormalisedModelReturn<V extends GeneratedValue, Schema extends OasSchema | OasRef<'schema'> | OasVoid> = Schema extends OasRef<'schema'> ? Definition<V> : Definition<TypeSystemOutput<SchemaToNonRef<Schema>['type']>>;
|
|
233
|
-
/**
|
|
234
|
-
* Options for inserting a model into the generation context.
|
|
235
|
-
*
|
|
236
|
-
* Configures how a model should be processed and included in
|
|
237
|
-
* the generated code output.
|
|
238
|
-
*
|
|
239
|
-
* @template T - The generation type extending GenerationType
|
|
240
|
-
*/
|
|
241
|
-
export type InsertModelOptions<T extends GenerationType> = {
|
|
242
|
-
/** Whether to exclude this model from exports */
|
|
243
|
-
noExport?: boolean;
|
|
244
|
-
/** The type of generation to apply */
|
|
245
|
-
generation?: T;
|
|
246
|
-
/** Custom destination path for the model */
|
|
247
|
-
destinationPath?: string;
|
|
248
|
-
};
|
|
249
121
|
/**
|
|
250
122
|
* Return type for insert operations in the generation context.
|
|
251
123
|
*
|
|
@@ -257,31 +129,6 @@ export type InsertModelOptions<T extends GenerationType> = {
|
|
|
257
129
|
* @template EnrichmentType - The enrichment data type
|
|
258
130
|
*/
|
|
259
131
|
export type InsertReturn<V extends GeneratedValue, T extends GenerationType, EnrichmentType> = Inserted<V, T, EnrichmentType>;
|
|
260
|
-
/**
|
|
261
|
-
* Arguments for generating operation content settings.
|
|
262
|
-
*
|
|
263
|
-
* @template V - The value type for the operation
|
|
264
|
-
* @template EnrichmentType - Optional enrichment type for the operation
|
|
265
|
-
*/
|
|
266
|
-
export type ToOperationSettingsArgs<V, EnrichmentType = undefined> = {
|
|
267
|
-
operation: OasOperation;
|
|
268
|
-
insertable: OperationInsertable<V, EnrichmentType>;
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* Arguments for building model content settings.
|
|
272
|
-
*
|
|
273
|
-
* @template V - The value type for the model
|
|
274
|
-
* @template EnrichmentType - Optional enrichment type for the model
|
|
275
|
-
*/
|
|
276
|
-
export type BuildModelSettingsArgs<V, EnrichmentType = undefined> = {
|
|
277
|
-
refName: RefName;
|
|
278
|
-
insertable: ModelInsertable<V, EnrichmentType>;
|
|
279
|
-
};
|
|
280
|
-
type GenerateResult = {
|
|
281
|
-
files: Map<string, File | JsonFile>;
|
|
282
|
-
previews: Record<string, Record<string, Preview>>;
|
|
283
|
-
mappings: Record<string, Record<string, Mapping>>;
|
|
284
|
-
};
|
|
285
132
|
/**
|
|
286
133
|
* The generation context for the second phase of the SKMTC transformation pipeline.
|
|
287
134
|
*
|
|
@@ -325,7 +172,7 @@ type GenerateResult = {
|
|
|
325
172
|
* }
|
|
326
173
|
* ```
|
|
327
174
|
*/
|
|
328
|
-
export declare class GenerateContext {
|
|
175
|
+
export declare class GenerateContext implements GenerateContextType {
|
|
329
176
|
#private;
|
|
330
177
|
/** The parsed OpenAPI document being processed */
|
|
331
178
|
oasDocument: OasDocument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aA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,EACxC,OAAO,EACP,UAAU,EACX,EAAE,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC;IAuB9E;;;;;OAKG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAYzF;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAOvE;AAED,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,YAAY,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,4BAG/B,qBAAqB,KAAG,eAKzB,CAAA;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,0BAA0B,iBAAiB,KAAG,WAI1E,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PrettierConfigType } from '../types/PrettierConfig.js';
|
|
2
2
|
import type { FilesRenderResult, RenderResult } from './types.js';
|
|
3
3
|
import type { Definition } from '../dsl/Definition.js';
|
|
4
|
-
import type { PickArgs } from './
|
|
4
|
+
import type { PickArgs } from './types.js';
|
|
5
5
|
import type { ResultType } from '../types/Results.js';
|
|
6
6
|
import type { StackTrail } from './StackTrail.js';
|
|
7
7
|
import type * as log from '../deps/jsr.io/@std/log/0.224.14/mod.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderContext.d.ts","sourceRoot":"","sources":["../../src/context/RenderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE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EAAE,SAAS,CAAC;IAavC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,OAAO,IAAI,iBAAiB;IAqC5B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAIvC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ;IAU1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAO7D"}
|
package/esm/context/types.d.ts
CHANGED
|
@@ -2,6 +2,38 @@ import type { ManifestEntry } from '../types/Manifest.js';
|
|
|
2
2
|
import type { Mapping, Preview } from '../types/Preview.js';
|
|
3
3
|
import type { ResultsItem } from '../types/Results.js';
|
|
4
4
|
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types';
|
|
5
|
+
import type { JsonFile } from '../dsl/JsonFile.js';
|
|
6
|
+
import type { GeneratedValue, GenerationType } from '../dsl/GeneratedValue.js';
|
|
7
|
+
import type { Definition } from '../dsl/Definition.js';
|
|
8
|
+
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
9
|
+
import type { OperationInsertable } from '../dsl/operation/types.js';
|
|
10
|
+
import type { Inserted } from '../dsl/Inserted.js';
|
|
11
|
+
import type { OasSchema } from '../oas/schema/Schema.js';
|
|
12
|
+
import type { OasRef } from '../oas/ref/Ref.js';
|
|
13
|
+
import type { OasVoid } from '../oas/void/Void.js';
|
|
14
|
+
import type { ModelInsertable } from '../dsl/model/types.js';
|
|
15
|
+
import type { Identifier } from '../dsl/Identifier.js';
|
|
16
|
+
import type { ImportNameArg } from '../dsl/Import.js';
|
|
17
|
+
import type { ContentSettings } from '../dsl/ContentSettings.js';
|
|
18
|
+
import type { RefName } from '../types/RefName.js';
|
|
19
|
+
import type { SchemaToNonRef, TypeSystemOutput } from '../types/TypeSystem.js';
|
|
20
|
+
import type { File } from '../dsl/File.js';
|
|
21
|
+
/**
|
|
22
|
+
* Options for inserting an operation into the generation context.
|
|
23
|
+
*
|
|
24
|
+
* Configures how an OpenAPI operation should be processed and
|
|
25
|
+
* included in the generated code output.
|
|
26
|
+
*
|
|
27
|
+
* @template T - The generation type extending GenerationType
|
|
28
|
+
*/
|
|
29
|
+
export type InsertOperationOptions<T extends GenerationType> = {
|
|
30
|
+
/** Whether to exclude this operation from exports */
|
|
31
|
+
noExport?: boolean;
|
|
32
|
+
/** The type of generation to apply */
|
|
33
|
+
generation?: T;
|
|
34
|
+
/** Custom destination path for the operation */
|
|
35
|
+
destinationPath?: string;
|
|
36
|
+
};
|
|
5
37
|
/**
|
|
6
38
|
* Type representing the three phases of the SKMTC pipeline.
|
|
7
39
|
*/
|
|
@@ -45,4 +77,151 @@ export type AnyOasDocument = OpenAPIV2.Document | OpenAPIV3.Document | OpenAPIV3
|
|
|
45
77
|
* Types of issues that can be encountered during OpenAPI schema parsing.
|
|
46
78
|
*/
|
|
47
79
|
export type IssueType = 'UNEXPECTED_PROPERTY' | 'MISSING_OBJECT_TYPE' | 'MISSING_STRING_TYPE' | 'MISSING_ARRAY_TYPE' | 'MISSING_BOOLEAN_TYPE' | 'INVALID_EXAMPLE' | 'INVALID_ENUM' | 'INVALID_DEFAULT' | 'INVALID_NULLABLE' | 'UNEXPECTED_FORMAT' | 'INVALID_RESPONSE' | 'INVALID_FORMAT' | 'INVALID_OPERATION' | 'INVALID_SCHEMA' | 'INVALID_PARAMETER' | 'INVALID_DEPENDENCY_REF';
|
|
80
|
+
export type GenerateResult = {
|
|
81
|
+
files: Map<string, File | JsonFile>;
|
|
82
|
+
previews: Record<string, Record<string, Preview>>;
|
|
83
|
+
mappings: Record<string, Record<string, Mapping>>;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Arguments for registering a JSON file in the generation context.
|
|
87
|
+
*
|
|
88
|
+
* Used to register JSON configuration files, manifests, or other JSON
|
|
89
|
+
* data that should be included in the generated output artifacts.
|
|
90
|
+
*/
|
|
91
|
+
export type RegisterJsonArgs = {
|
|
92
|
+
/** The destination file path where the JSON should be written */
|
|
93
|
+
destinationPath: string;
|
|
94
|
+
/** The JSON object to write to the file */
|
|
95
|
+
json: Record<string, unknown>;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Arguments for defining and registering a value in the generation context.
|
|
99
|
+
*
|
|
100
|
+
* Used to create definitions from pre-generated values and register them
|
|
101
|
+
* in the generation context for inclusion in output files.
|
|
102
|
+
*
|
|
103
|
+
* @template V - The generated value type extending GeneratedValue
|
|
104
|
+
*/
|
|
105
|
+
export type DefineAndRegisterArgs<V extends GeneratedValue> = {
|
|
106
|
+
/** The identifier for the definition */
|
|
107
|
+
identifier: Identifier;
|
|
108
|
+
/** The generated value to define */
|
|
109
|
+
value: V;
|
|
110
|
+
/** The destination file path where the definition should be registered */
|
|
111
|
+
destinationPath: string;
|
|
112
|
+
/** Whether to exclude this definition from exports */
|
|
113
|
+
noExport?: boolean;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Arguments for registering generated content with a specific destination.
|
|
117
|
+
*
|
|
118
|
+
* Extends BaseRegisterArgs to include a destination path, allowing content
|
|
119
|
+
* to be registered and associated with a specific output file location.
|
|
120
|
+
*/
|
|
121
|
+
export type RegisterArgs = {
|
|
122
|
+
/** Import statements to include, organized by module path */
|
|
123
|
+
imports?: Record<string, ImportNameArg[]>;
|
|
124
|
+
/** Re-export statements to include, organized by module path */
|
|
125
|
+
reExports?: Record<string, Identifier[]>;
|
|
126
|
+
/** Definition objects to include in the generated content */
|
|
127
|
+
definitions?: (Definition | undefined)[];
|
|
128
|
+
/** The destination file path where the content should be registered */
|
|
129
|
+
destinationPath: string;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Arguments for inserting a normalized model into the generation context.
|
|
133
|
+
*
|
|
134
|
+
* Used to process and register OpenAPI schema objects as normalized
|
|
135
|
+
* model definitions with fallback naming when schema names are unavailable.
|
|
136
|
+
*
|
|
137
|
+
* @template Schema - The schema type (OasSchema, OasRef, or OasVoid)
|
|
138
|
+
*/
|
|
139
|
+
export type InsertNormalisedModelArgs<Schema extends OasSchema | OasRef<'schema'> | OasVoid> = {
|
|
140
|
+
/** Fallback name to use if the schema doesn't have a name */
|
|
141
|
+
fallbackName: string;
|
|
142
|
+
/** The OpenAPI schema to normalize and insert */
|
|
143
|
+
schema: Schema;
|
|
144
|
+
/** The destination file path for the model */
|
|
145
|
+
destinationPath: string;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Options for inserting a model into the generation context.
|
|
149
|
+
*
|
|
150
|
+
* Configures how a model should be processed and included in
|
|
151
|
+
* the generated code output.
|
|
152
|
+
*
|
|
153
|
+
* @template T - The generation type extending GenerationType
|
|
154
|
+
*/
|
|
155
|
+
export type InsertModelOptions<T extends GenerationType> = {
|
|
156
|
+
/** Whether to exclude this model from exports */
|
|
157
|
+
noExport?: boolean;
|
|
158
|
+
/** The type of generation to apply */
|
|
159
|
+
generation?: T;
|
|
160
|
+
/** Custom destination path for the model */
|
|
161
|
+
destinationPath?: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Options for inserting a normalized model.
|
|
165
|
+
*/
|
|
166
|
+
export type InsertNormalisedModelOptions = {
|
|
167
|
+
/** Whether to exclude this model from exports */
|
|
168
|
+
noExport?: boolean;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Arguments for picking a specific export from a generator module.
|
|
172
|
+
*
|
|
173
|
+
* Used to select and configure specific exports from generator modules
|
|
174
|
+
* during the artifact generation process.
|
|
175
|
+
*/
|
|
176
|
+
export type PickArgs = {
|
|
177
|
+
/** The name of the export to pick from the generator module */
|
|
178
|
+
name: string;
|
|
179
|
+
/** The file path where the export should be made available */
|
|
180
|
+
exportPath: string;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Arguments for building model content settings.
|
|
184
|
+
*
|
|
185
|
+
* @template V - The value type for the model
|
|
186
|
+
* @template EnrichmentType - Optional enrichment type for the model
|
|
187
|
+
*/
|
|
188
|
+
export type BuildModelSettingsArgs<V, EnrichmentType = undefined> = {
|
|
189
|
+
refName: RefName;
|
|
190
|
+
insertable: ModelInsertable<V, EnrichmentType>;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Arguments for generating operation content settings.
|
|
194
|
+
*
|
|
195
|
+
* @template V - The value type for the operation
|
|
196
|
+
* @template EnrichmentType - Optional enrichment type for the operation
|
|
197
|
+
*/
|
|
198
|
+
export type ToOperationSettingsArgs<V, EnrichmentType = undefined> = {
|
|
199
|
+
operation: OasOperation;
|
|
200
|
+
insertable: OperationInsertable<V, EnrichmentType>;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Return type for inserting a normalized model.
|
|
204
|
+
*
|
|
205
|
+
* Provides type-safe return values based on the schema type being processed.
|
|
206
|
+
* Returns different Definition types depending on whether the schema is a
|
|
207
|
+
* reference or a concrete schema.
|
|
208
|
+
*
|
|
209
|
+
* @template V - The generated value type
|
|
210
|
+
* @template Schema - The schema type being processed
|
|
211
|
+
*/
|
|
212
|
+
export type InsertNormalisedModelReturn<V extends GeneratedValue, Schema extends OasSchema | OasRef<'schema'> | OasVoid> = Schema extends OasRef<'schema'> ? Definition<V> : Definition<TypeSystemOutput<SchemaToNonRef<Schema>['type']>>;
|
|
213
|
+
export type GenerateContextType = {
|
|
214
|
+
toArtifacts: () => GenerateResult;
|
|
215
|
+
trace: <T>(token: string, fn: () => T) => T;
|
|
216
|
+
defineAndRegister: <V extends GeneratedValue>({ identifier, value, destinationPath, noExport }: DefineAndRegisterArgs<V>) => Definition<V>;
|
|
217
|
+
registerJson: ({ destinationPath, json }: RegisterJsonArgs) => void;
|
|
218
|
+
register: ({ imports, definitions, destinationPath, reExports }: RegisterArgs) => void;
|
|
219
|
+
insertOperation: <V extends GeneratedValue, T extends GenerationType, EnrichmentType = undefined>(insertable: OperationInsertable<V, EnrichmentType>, operation: OasOperation, { generation, destinationPath, noExport }: InsertOperationOptions<T>) => Inserted<V, T, EnrichmentType>;
|
|
220
|
+
insertNormalisedModel: <V extends GeneratedValue, Schema extends OasSchema | OasRef<'schema'> | OasVoid, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, { schema, fallbackName, destinationPath }: InsertNormalisedModelArgs<Schema>, { noExport }: InsertNormalisedModelOptions) => InsertNormalisedModelReturn<V, Schema>;
|
|
221
|
+
insertModel: <V extends GeneratedValue, T extends GenerationType, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, refName: RefName, { generation, destinationPath, noExport }: InsertModelOptions<T>) => Inserted<V, T, EnrichmentType>;
|
|
222
|
+
toOperationContentSettings: <V, EnrichmentType>({ operation, insertable }: ToOperationSettingsArgs<V, EnrichmentType>) => ContentSettings<EnrichmentType>;
|
|
223
|
+
toModelContentSettings: <V, EnrichmentType>({ refName, insertable }: BuildModelSettingsArgs<V, EnrichmentType>) => ContentSettings<EnrichmentType>;
|
|
224
|
+
resolveSchemaRefOnce: (refName: RefName, generatorId: string) => OasSchema | OasRef<'schema'>;
|
|
225
|
+
findDefinition: ({ name, exportPath }: PickArgs) => Definition | undefined;
|
|
226
|
+
};
|
|
48
227
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAA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EAAE,eAAe,EAAE,EAAE,yBAAyB,CAAC,MAAM,CAAC,EAC5E,EAAE,QAAQ,EAAE,EAAE,4BAA4B,KACvC,2BAA2B,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAC3C,WAAW,EAAE,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,EAC9E,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,EAC9C,OAAO,EAAE,OAAO,EAChB,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAC7D,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC,CAAA;IACnC,0BAA0B,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,EAC9C,SAAS,EACT,UAAU,EACX,EAAE,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,KAAK,eAAe,CAAC,cAAc,CAAC,CAAA;IACjF,sBAAsB,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,EAC1C,OAAO,EACP,UAAU,EACX,EAAE,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC,KAAK,eAAe,CAAC,cAAc,CAAC,CAAA;IAChF,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC7F,cAAc,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,KAAK,UAAU,GAAG,SAAS,CAAA;CAC3E,CAAA"}
|
package/esm/dsl/ContentBase.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GenerateContext } from '../context/GenerateContext.js';
|
|
2
|
-
import type { RegisterArgs } from '../context/
|
|
3
|
-
import type { GeneratorKey } from '
|
|
2
|
+
import type { RegisterArgs } from '../context/types.js';
|
|
3
|
+
import type { GeneratorKey } from './GeneratorKeys.js';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor arguments for {@link ContentBase}.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"ContentBase.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;GAEG;AACH,KAAK,eAAe,GAAG;IACrB,iEAAiE;IACjE,OAAO,EAAE,eAAe,CAAA;IACxB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,qBAAa,WAAW;IACtB,2EAA2E;IAC3E,OAAO,EAAE,eAAe,CAAA;IAExB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAQ;IAExB,6DAA6D;IAC7D,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IAEtC;;;;;;OAMG;gBACS,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,eAAe;IAKtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;CAGnC"}
|
package/esm/dsl/Definition.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GenerateContext } from '../context/GenerateContext.js';
|
|
2
2
|
import type { Identifier } from './Identifier.js';
|
|
3
3
|
import { ContentBase } from './ContentBase.js';
|
|
4
|
-
import type { GeneratedValue } from '
|
|
4
|
+
import type { GeneratedValue } from './GeneratedValue.js';
|
|
5
5
|
/**
|
|
6
6
|
* Constructor arguments for {@link Definition}.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/dsl/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/dsl/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD;;;;GAIG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IAC/C,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAA;IACxB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,kCAAkC;IAClC,KAAK,EAAE,CAAC,CAAA;IACR,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,WAAW;IACpF,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAA;IAEtB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAE/B,kCAAkC;IAClC,KAAK,EAAE,CAAC,CAAA;IAER,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;OAsBG;gBACS,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC;IASrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACM,QAAQ,IAAI,MAAM;CAa5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Definition } from '
|
|
2
|
-
import type { Stringable } from '
|
|
1
|
+
import type { Definition } from './Definition.js';
|
|
2
|
+
import type { Stringable } from './Stringable.js';
|
|
3
3
|
import type { GeneratorKey } from './GeneratorKeys.js';
|
|
4
4
|
/**
|
|
5
5
|
* 'force' - will generate content even it is not selected.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneratedValue.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratedValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;;;;;;;;GASG;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,CAC7B,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,cAAc,IACtB,CAAC,SAAS,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratedValueList.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratedValueList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GeneratedValueList.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratedValueList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,kBAAkB;IAC7B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAA;IAEjB,yCAAyC;IACzC,OAAO,CAAC,KAAK,CAAuB;IAEpC;;;;;;;;;;;;;;;;OAgBG;gBACS,SAAS,EAAE,MAAM;IAI7B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAI9B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,IAAI,MAAM;CAMnB"}
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
* @module GeneratorKeys
|
|
64
64
|
*/
|
|
65
65
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
66
|
-
import type { Brand } from '
|
|
67
|
-
import type { RefName } from '
|
|
68
|
-
import { type Method } from '
|
|
66
|
+
import type { Brand } from '../types/Brand.js';
|
|
67
|
+
import type { RefName } from '../types/RefName.js';
|
|
68
|
+
import { type Method } from '../types/Method.js';
|
|
69
69
|
/**
|
|
70
70
|
* Template literal type for operation generator keys before branding.
|
|
71
71
|
* Format: `generatorId|path|method` (e.g., 'api-client|/users|get')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,oBAAoB,CAAA;AAE1D;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AAExE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,0BAA0B,EAAE,uBAAuB,CAAC,CAAA;AAE9F;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAA;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,YAAY,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,gBAAgB,CAAA;AAEvF;;;;;GAKG;AACH,KAAK,2BAA2B,GAC5B;IACE,0CAA0C;IAC1C,WAAW,EAA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AED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,aAAa,GAAI,cAAc,YAAY,KAAG,MAU1D,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IACE,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAA;IACjB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf,GACD;IACE,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB,GACD;IACE,4CAA4C;IAC5C,IAAI,EAAE,gBAAgB,CAAA;IACtB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,YAAY,KAAG,kBAY7D,CAAA"}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
*
|
|
63
63
|
* @module GeneratorKeys
|
|
64
64
|
*/
|
|
65
|
-
import { isMethod } from '
|
|
65
|
+
import { isMethod } from '../types/Method.js';
|
|
66
66
|
/**
|
|
67
67
|
* Creates an operation generator key from generator ID and operation details.
|
|
68
68
|
*
|
|
@@ -178,9 +178,7 @@ export const toGeneratorOnlyKey = ({ generatorId }) => {
|
|
|
178
178
|
* ```
|
|
179
179
|
*/
|
|
180
180
|
export const isGeneratorKey = (arg) => {
|
|
181
|
-
return
|
|
182
|
-
isOperationGeneratorKey(arg) ||
|
|
183
|
-
isGeneratorOnlyKey(arg));
|
|
181
|
+
return isModelGeneratorKey(arg) || isOperationGeneratorKey(arg) || isGeneratorOnlyKey(arg);
|
|
184
182
|
};
|
|
185
183
|
/**
|
|
186
184
|
* Type guard to check if a value is a valid OperationGeneratorKey.
|
package/esm/dsl/Inserted.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GeneratedDefinition, GeneratedValue, GenerationType } from '
|
|
1
|
+
import type { GeneratedDefinition, GeneratedValue, GenerationType } from './GeneratedValue.js';
|
|
2
2
|
import type { ContentSettings } from './ContentSettings.js';
|
|
3
3
|
import type { Identifier } from './Identifier.js';
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inserted.d.ts","sourceRoot":"","sources":["../../src/dsl/Inserted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Inserted.d.ts","sourceRoot":"","sources":["../../src/dsl/Inserted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;GAMG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,IAAI;IACzF,4DAA4D;IAC5D,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,8CAA8C;IAC9C,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc;IACtF,4DAA4D;IAC5D,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IAEzC,8CAA8C;IAC9C,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAErC;;;;;;OAMG;gBACS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC;IAK3E;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,IAAI,MAAM;IAIhB;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,IAAI,UAAU;IAI1B;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,IAAI,MAAM;IAItB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,OAAO,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS;CAGjD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BaseRegisterArgs, GenerateContext
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { BaseRegisterArgs, GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { InsertModelOptions, InsertNormalisedModelArgs, InsertNormalisedModelReturn } from '../../context/types.js';
|
|
3
|
+
import type { GeneratedValue } from '../GeneratedValue.js';
|
|
4
|
+
import type { GeneratorKey } from '../GeneratorKeys.js';
|
|
4
5
|
import type { RefName } from '../../types/RefName.js';
|
|
5
6
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
6
7
|
import type { ModelInsertable } from './types.js';
|