@skmtc/core 0.0.931 → 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 -210
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +0 -52
- 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/ContentSettings.d.ts +1 -1
- package/esm/dsl/ContentSettings.js +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 -84
- package/esm/dsl/Inserted.d.ts.map +1 -1
- package/esm/dsl/Inserted.js +0 -83
- package/esm/dsl/JsonFile.d.ts +0 -80
- package/esm/dsl/JsonFile.d.ts.map +1 -1
- package/esm/dsl/JsonFile.js +0 -80
- package/esm/dsl/Stringable.d.ts +0 -67
- package/esm/dsl/Stringable.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/model/toModelEntry.d.ts.map +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 -210
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +0 -52
- 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/ContentSettings.d.ts +1 -1
- package/script/dsl/ContentSettings.js +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 -84
- package/script/dsl/Inserted.d.ts.map +1 -1
- package/script/dsl/Inserted.js +0 -83
- package/script/dsl/JsonFile.d.ts +0 -80
- package/script/dsl/JsonFile.d.ts.map +1 -1
- package/script/dsl/JsonFile.js +0 -80
- package/script/dsl/Stringable.d.ts +0 -67
- package/script/dsl/Stringable.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/model/toModelEntry.d.ts.map +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
|
@@ -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,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO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C,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"}
|
|
@@ -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"}
|
|
@@ -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,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|
-
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,0BA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,YAAY,KAAG,kBAY7D,CAAA"}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
*/
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
67
|
exports.fromGeneratorKey = exports.toGeneratorId = exports.isGeneratorOnlyKey = exports.isModelGeneratorKey = exports.isOperationGeneratorKey = exports.isGeneratorKey = exports.toGeneratorOnlyKey = exports.toModelGeneratorKey = exports.toOperationGeneratorKey = void 0;
|
|
68
|
-
const Method_js_1 = require("
|
|
68
|
+
const Method_js_1 = require("../types/Method.js");
|
|
69
69
|
/**
|
|
70
70
|
* Creates an operation generator key from generator ID and operation details.
|
|
71
71
|
*
|
|
@@ -184,9 +184,7 @@ exports.toGeneratorOnlyKey = toGeneratorOnlyKey;
|
|
|
184
184
|
* ```
|
|
185
185
|
*/
|
|
186
186
|
const isGeneratorKey = (arg) => {
|
|
187
|
-
return (
|
|
188
|
-
(0, exports.isOperationGeneratorKey)(arg) ||
|
|
189
|
-
(0, exports.isGeneratorOnlyKey)(arg));
|
|
187
|
+
return (0, exports.isModelGeneratorKey)(arg) || (0, exports.isOperationGeneratorKey)(arg) || (0, exports.isGeneratorOnlyKey)(arg);
|
|
190
188
|
};
|
|
191
189
|
exports.isGeneratorKey = isGeneratorKey;
|
|
192
190
|
/**
|
package/script/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
|
/**
|
|
@@ -65,89 +65,6 @@ type ConstructorArgs<V extends GeneratedValue, T extends GenerationType, Enrichm
|
|
|
65
65
|
* }
|
|
66
66
|
* }
|
|
67
67
|
* ```
|
|
68
|
-
*
|
|
69
|
-
* @example Working with lazy generation
|
|
70
|
-
* ```typescript
|
|
71
|
-
* class ConditionalGenerator extends ModelBase {
|
|
72
|
-
* generate(): Definition {
|
|
73
|
-
* // Insert with lazy generation (may not generate if already exists)
|
|
74
|
-
* const optionalModel = this.insertModel(
|
|
75
|
-
* new OptionalModelGenerator({ ... }),
|
|
76
|
-
* 'OptionalModel',
|
|
77
|
-
* { generation: 'lazy' }
|
|
78
|
-
* ); // Returns Inserted<OptionalValue, 'lazy', EnrichmentType>
|
|
79
|
-
*
|
|
80
|
-
* // Value might be undefined with lazy generation
|
|
81
|
-
* const value = optionalModel.toValue(); // OptionalValue | undefined
|
|
82
|
-
*
|
|
83
|
-
* if (value) {
|
|
84
|
-
* // Use the generated value
|
|
85
|
-
* return this.createDefinitionWith(value);
|
|
86
|
-
* } else {
|
|
87
|
-
* // Handle case where generation was skipped
|
|
88
|
-
* return this.createFallbackDefinition();
|
|
89
|
-
* }
|
|
90
|
-
* }
|
|
91
|
-
* }
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @example Accessing insertion metadata
|
|
95
|
-
* ```typescript
|
|
96
|
-
* class MetadataAwareGenerator extends OperationBase {
|
|
97
|
-
* generate(): Definition {
|
|
98
|
-
* const requestModel = this.insertModel(
|
|
99
|
-
* new RequestModelGenerator({ ... }),
|
|
100
|
-
* 'CreateUserRequest'
|
|
101
|
-
* );
|
|
102
|
-
*
|
|
103
|
-
* // Access various metadata
|
|
104
|
-
* const modelName = requestModel.toName(); // 'CreateUserRequest'
|
|
105
|
-
* const identifier = requestModel.toIdentifier(); // Full Identifier object
|
|
106
|
-
* const exportPath = requestModel.toExportPath(); // './src/api/types.ts'
|
|
107
|
-
* const enrichments = requestModel.settings.enrichments; // Custom data
|
|
108
|
-
*
|
|
109
|
-
* console.log(`Generated ${modelName} in ${exportPath}`);
|
|
110
|
-
*
|
|
111
|
-
* return new Definition({
|
|
112
|
-
* identifier: Identifier.createVariable(this.operation.operationId!),
|
|
113
|
-
* value: {
|
|
114
|
-
* generatorKey: this.generatorKey,
|
|
115
|
-
* content: `async function createUser(data: ${modelName}) { ... }`
|
|
116
|
-
* }
|
|
117
|
-
* });
|
|
118
|
-
* }
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
|
-
* @example With enrichment data
|
|
123
|
-
* ```typescript
|
|
124
|
-
* type ValidationEnrichment = {
|
|
125
|
-
* validators: string[];
|
|
126
|
-
* required: boolean;
|
|
127
|
-
* };
|
|
128
|
-
*
|
|
129
|
-
* class EnrichedGenerator extends ModelBase<ValidationEnrichment> {
|
|
130
|
-
* generate(): Definition {
|
|
131
|
-
* const validatedModel = this.insertModel(
|
|
132
|
-
* new ValidatedModelGenerator({ ... }),
|
|
133
|
-
* 'ValidatedUser'
|
|
134
|
-
* ); // Returns Inserted<ModelValue, 'force', ValidationEnrichment>
|
|
135
|
-
*
|
|
136
|
-
* // Access enrichment data
|
|
137
|
-
* const enrichment = validatedModel.settings.enrichments;
|
|
138
|
-
* const validators = enrichment?.validators ?? [];
|
|
139
|
-
* const isRequired = enrichment?.required ?? false;
|
|
140
|
-
*
|
|
141
|
-
* return new Definition({
|
|
142
|
-
* identifier: Identifier.createType(this.refName),
|
|
143
|
-
* value: {
|
|
144
|
-
* generatorKey: this.generatorKey,
|
|
145
|
-
* content: this.generateWithValidation(validatedModel.toValue(), validators)
|
|
146
|
-
* }
|
|
147
|
-
* });
|
|
148
|
-
* }
|
|
149
|
-
* }
|
|
150
|
-
* ```
|
|
151
68
|
*/
|
|
152
69
|
export declare class Inserted<V extends GeneratedValue, T extends GenerationType, EnrichmentType> {
|
|
153
70
|
/** Content settings including identifier and export path */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inserted.d.ts","sourceRoot":"","sources":["../../src/dsl/Inserted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"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sl/Inserted.js
CHANGED
|
@@ -52,89 +52,6 @@ exports.Inserted = void 0;
|
|
|
52
52
|
* }
|
|
53
53
|
* }
|
|
54
54
|
* ```
|
|
55
|
-
*
|
|
56
|
-
* @example Working with lazy generation
|
|
57
|
-
* ```typescript
|
|
58
|
-
* class ConditionalGenerator extends ModelBase {
|
|
59
|
-
* generate(): Definition {
|
|
60
|
-
* // Insert with lazy generation (may not generate if already exists)
|
|
61
|
-
* const optionalModel = this.insertModel(
|
|
62
|
-
* new OptionalModelGenerator({ ... }),
|
|
63
|
-
* 'OptionalModel',
|
|
64
|
-
* { generation: 'lazy' }
|
|
65
|
-
* ); // Returns Inserted<OptionalValue, 'lazy', EnrichmentType>
|
|
66
|
-
*
|
|
67
|
-
* // Value might be undefined with lazy generation
|
|
68
|
-
* const value = optionalModel.toValue(); // OptionalValue | undefined
|
|
69
|
-
*
|
|
70
|
-
* if (value) {
|
|
71
|
-
* // Use the generated value
|
|
72
|
-
* return this.createDefinitionWith(value);
|
|
73
|
-
* } else {
|
|
74
|
-
* // Handle case where generation was skipped
|
|
75
|
-
* return this.createFallbackDefinition();
|
|
76
|
-
* }
|
|
77
|
-
* }
|
|
78
|
-
* }
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* @example Accessing insertion metadata
|
|
82
|
-
* ```typescript
|
|
83
|
-
* class MetadataAwareGenerator extends OperationBase {
|
|
84
|
-
* generate(): Definition {
|
|
85
|
-
* const requestModel = this.insertModel(
|
|
86
|
-
* new RequestModelGenerator({ ... }),
|
|
87
|
-
* 'CreateUserRequest'
|
|
88
|
-
* );
|
|
89
|
-
*
|
|
90
|
-
* // Access various metadata
|
|
91
|
-
* const modelName = requestModel.toName(); // 'CreateUserRequest'
|
|
92
|
-
* const identifier = requestModel.toIdentifier(); // Full Identifier object
|
|
93
|
-
* const exportPath = requestModel.toExportPath(); // './src/api/types.ts'
|
|
94
|
-
* const enrichments = requestModel.settings.enrichments; // Custom data
|
|
95
|
-
*
|
|
96
|
-
* console.log(`Generated ${modelName} in ${exportPath}`);
|
|
97
|
-
*
|
|
98
|
-
* return new Definition({
|
|
99
|
-
* identifier: Identifier.createVariable(this.operation.operationId!),
|
|
100
|
-
* value: {
|
|
101
|
-
* generatorKey: this.generatorKey,
|
|
102
|
-
* content: `async function createUser(data: ${modelName}) { ... }`
|
|
103
|
-
* }
|
|
104
|
-
* });
|
|
105
|
-
* }
|
|
106
|
-
* }
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* @example With enrichment data
|
|
110
|
-
* ```typescript
|
|
111
|
-
* type ValidationEnrichment = {
|
|
112
|
-
* validators: string[];
|
|
113
|
-
* required: boolean;
|
|
114
|
-
* };
|
|
115
|
-
*
|
|
116
|
-
* class EnrichedGenerator extends ModelBase<ValidationEnrichment> {
|
|
117
|
-
* generate(): Definition {
|
|
118
|
-
* const validatedModel = this.insertModel(
|
|
119
|
-
* new ValidatedModelGenerator({ ... }),
|
|
120
|
-
* 'ValidatedUser'
|
|
121
|
-
* ); // Returns Inserted<ModelValue, 'force', ValidationEnrichment>
|
|
122
|
-
*
|
|
123
|
-
* // Access enrichment data
|
|
124
|
-
* const enrichment = validatedModel.settings.enrichments;
|
|
125
|
-
* const validators = enrichment?.validators ?? [];
|
|
126
|
-
* const isRequired = enrichment?.required ?? false;
|
|
127
|
-
*
|
|
128
|
-
* return new Definition({
|
|
129
|
-
* identifier: Identifier.createType(this.refName),
|
|
130
|
-
* value: {
|
|
131
|
-
* generatorKey: this.generatorKey,
|
|
132
|
-
* content: this.generateWithValidation(validatedModel.toValue(), validators)
|
|
133
|
-
* }
|
|
134
|
-
* });
|
|
135
|
-
* }
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
55
|
*/
|
|
139
56
|
class Inserted {
|
|
140
57
|
/**
|
package/script/dsl/JsonFile.d.ts
CHANGED
|
@@ -38,86 +38,6 @@ type JsonFileArgs = {
|
|
|
38
38
|
* }
|
|
39
39
|
* });
|
|
40
40
|
*
|
|
41
|
-
* const jsonContent = packageJson.toString();
|
|
42
|
-
* console.log(jsonContent);
|
|
43
|
-
* // {
|
|
44
|
-
* // "name": "my-api-client",
|
|
45
|
-
* // "version": "1.0.0",
|
|
46
|
-
* // "type": "module",
|
|
47
|
-
* // "main": "./index.js",
|
|
48
|
-
* // "dependencies": {
|
|
49
|
-
* // "axios": "^1.0.0"
|
|
50
|
-
* // }
|
|
51
|
-
* // }
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @example Configuration file generation
|
|
55
|
-
* ```typescript
|
|
56
|
-
* const configFile = new JsonFile({
|
|
57
|
-
* path: './src/config/api.json',
|
|
58
|
-
* content: {
|
|
59
|
-
* baseUrl: 'https://api.example.com',
|
|
60
|
-
* timeout: 5000,
|
|
61
|
-
* retryAttempts: 3,
|
|
62
|
-
* endpoints: {
|
|
63
|
-
* users: '/users',
|
|
64
|
-
* products: '/products',
|
|
65
|
-
* orders: '/orders'
|
|
66
|
-
* }
|
|
67
|
-
* }
|
|
68
|
-
* });
|
|
69
|
-
*
|
|
70
|
-
* // Write to file system
|
|
71
|
-
* await Deno.writeTextFile(configFile.path, configFile.toString());
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* @example OpenAPI specification output
|
|
75
|
-
* ```typescript
|
|
76
|
-
* const openApiFile = new JsonFile({
|
|
77
|
-
* path: './dist/openapi.json',
|
|
78
|
-
* content: {
|
|
79
|
-
* openapi: '3.0.0',
|
|
80
|
-
* info: {
|
|
81
|
-
* title: 'My API',
|
|
82
|
-
* version: '1.0.0'
|
|
83
|
-
* },
|
|
84
|
-
* paths: {
|
|
85
|
-
* '/users': {
|
|
86
|
-
* get: {
|
|
87
|
-
* summary: 'List users',
|
|
88
|
-
* responses: {
|
|
89
|
-
* '200': {
|
|
90
|
-
* description: 'Success'
|
|
91
|
-
* }
|
|
92
|
-
* }
|
|
93
|
-
* }
|
|
94
|
-
* }
|
|
95
|
-
* }
|
|
96
|
-
* }
|
|
97
|
-
* });
|
|
98
|
-
* ```
|
|
99
|
-
*
|
|
100
|
-
* @example Using with generator registration
|
|
101
|
-
* ```typescript
|
|
102
|
-
* class MyGenerator extends ContentBase {
|
|
103
|
-
* generate() {
|
|
104
|
-
* const manifestFile = new JsonFile({
|
|
105
|
-
* path: './generated/manifest.json',
|
|
106
|
-
* content: {
|
|
107
|
-
* generatedAt: new Date().toISOString(),
|
|
108
|
-
* version: '1.0.0',
|
|
109
|
-
* files: [
|
|
110
|
-
* './models/User.ts',
|
|
111
|
-
* './models/Product.ts'
|
|
112
|
-
* ]
|
|
113
|
-
* }
|
|
114
|
-
* });
|
|
115
|
-
*
|
|
116
|
-
* // Register with the generation context
|
|
117
|
-
* this.register({ jsonFile: manifestFile });
|
|
118
|
-
* }
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
41
|
*/
|
|
122
42
|
export declare class JsonFile {
|
|
123
43
|
/** The file type, always 'json' for JSON files */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonFile.d.ts","sourceRoot":"","sources":["../../src/dsl/JsonFile.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,YAAY,GAAG;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"JsonFile.d.ts","sourceRoot":"","sources":["../../src/dsl/JsonFile.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,YAAY,GAAG;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,QAAQ;IACnB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAS;IAEzB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IAEZ,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;gBACS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,YAAY;IAK3C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,IAAI,MAAM;CAGnB"}
|