@skmtc/core 0.0.802 → 0.0.803
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/CoreContext.d.ts +3 -0
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +17 -12
- package/esm/context/GenerateContext.d.ts +2 -1
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/ParseContext.d.ts +3 -3
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/RenderContext.d.ts +4 -1
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +11 -6
- package/esm/dsl/operation/OperationDriver.d.ts +36 -0
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +36 -0
- package/esm/dsl/operation/toOperationBase.d.ts +58 -0
- package/esm/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationBase.js +46 -0
- package/esm/dsl/operation/toOperationEntry.d.ts +37 -0
- package/esm/dsl/operation/toOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationEntry.js +28 -0
- package/esm/mod.d.ts +1 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -0
- package/esm/oas/array/Array.d.ts +26 -0
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +26 -0
- package/esm/oas/array/array-types.d.ts +12 -0
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +6 -0
- package/esm/oas/boolean/Boolean.d.ts +26 -0
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +26 -0
- package/esm/oas/boolean/toBoolean.d.ts +57 -0
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +57 -0
- package/esm/oas/number/toNumber.d.ts +62 -0
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +62 -0
- package/esm/oas/parameter/Parameter.d.ts +47 -0
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +47 -0
- package/esm/types/CustomValue.d.ts +58 -0
- package/esm/types/CustomValue.d.ts.map +1 -1
- package/esm/types/CustomValue.js +58 -0
- package/esm/types/DenoJson.d.ts +24 -0
- package/esm/types/DenoJson.d.ts.map +1 -1
- package/esm/types/DenoJson.js +12 -0
- package/esm/types/Enrichments.d.ts +103 -0
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +52 -0
- package/esm/types/GeneratedValue.d.ts +17 -0
- package/esm/types/GeneratedValue.d.ts.map +1 -1
- package/esm/types/Logger.d.ts +9 -0
- package/esm/types/Logger.d.ts.map +1 -0
- package/esm/types/Logger.js +1 -0
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +3 -0
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +17 -12
- package/script/context/GenerateContext.d.ts +2 -1
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/ParseContext.d.ts +3 -3
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/RenderContext.d.ts +4 -1
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +11 -6
- package/script/dsl/operation/OperationDriver.d.ts +36 -0
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +36 -0
- package/script/dsl/operation/toOperationBase.d.ts +58 -0
- package/script/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/script/dsl/operation/toOperationBase.js +46 -0
- package/script/dsl/operation/toOperationEntry.d.ts +37 -0
- package/script/dsl/operation/toOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/toOperationEntry.js +28 -0
- package/script/mod.d.ts +1 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -0
- package/script/oas/array/Array.d.ts +26 -0
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +26 -0
- package/script/oas/array/array-types.d.ts +12 -0
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +6 -0
- package/script/oas/boolean/Boolean.d.ts +26 -0
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +26 -0
- package/script/oas/boolean/toBoolean.d.ts +57 -0
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +57 -0
- package/script/oas/number/toNumber.d.ts +62 -0
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +62 -0
- package/script/oas/parameter/Parameter.d.ts +47 -0
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +47 -0
- package/script/types/CustomValue.d.ts +58 -0
- package/script/types/CustomValue.d.ts.map +1 -1
- package/script/types/CustomValue.js +58 -0
- package/script/types/DenoJson.d.ts +24 -0
- package/script/types/DenoJson.d.ts.map +1 -1
- package/script/types/DenoJson.js +12 -0
- package/script/types/Enrichments.d.ts +103 -0
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +52 -0
- package/script/types/GeneratedValue.d.ts +17 -0
- package/script/types/GeneratedValue.d.ts.map +1 -1
- package/script/types/Logger.d.ts +9 -0
- package/script/types/Logger.d.ts.map +1 -0
- package/script/types/Logger.js +2 -0
|
@@ -188,22 +188,69 @@ export declare class OasParameter {
|
|
|
188
188
|
name: string;
|
|
189
189
|
/** Where the parameter is located (path, query, header, cookie) */
|
|
190
190
|
location: OasParameterLocation;
|
|
191
|
+
/** A brief description of the parameter's purpose and usage */
|
|
191
192
|
description?: string | undefined;
|
|
193
|
+
/** Determines whether this parameter is mandatory for the operation */
|
|
192
194
|
required?: boolean | undefined;
|
|
195
|
+
/** Indicates that the parameter is deprecated and should be avoided */
|
|
193
196
|
deprecated?: boolean | undefined;
|
|
197
|
+
/** Whether to allow empty values for this parameter */
|
|
194
198
|
allowEmptyValue?: boolean | undefined;
|
|
199
|
+
/** Whether reserved characters are allowed in parameter values */
|
|
195
200
|
allowReserved?: boolean | undefined;
|
|
201
|
+
/** The schema defining the parameter's data type and validation rules */
|
|
196
202
|
schema?: OasSchema | OasRef<'schema'> | undefined;
|
|
203
|
+
/** Example values demonstrating parameter usage */
|
|
197
204
|
examples?: Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
205
|
+
/** Media type definitions for complex parameter content */
|
|
198
206
|
content?: Record<string, OasMediaType> | undefined;
|
|
207
|
+
/** The serialization style for the parameter (form, simple, etc.) */
|
|
199
208
|
style: OasParameterStyle;
|
|
209
|
+
/** Whether to explode parameter values into separate key-value pairs */
|
|
200
210
|
explode: boolean;
|
|
211
|
+
/** Custom extension fields (x-* properties) defined for this parameter */
|
|
201
212
|
extensionFields: Record<string, unknown> | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Creates a new OasParameter instance.
|
|
215
|
+
*
|
|
216
|
+
* @param fields - Parameter configuration fields including name, location, schema, and serialization options
|
|
217
|
+
*/
|
|
202
218
|
constructor(fields: ParameterFields);
|
|
219
|
+
/**
|
|
220
|
+
* Determines if this parameter is a reference object.
|
|
221
|
+
*
|
|
222
|
+
* @returns Always false since this is a concrete parameter instance, not a reference
|
|
223
|
+
*/
|
|
203
224
|
isRef(): this is OasRef<'parameter'>;
|
|
225
|
+
/**
|
|
226
|
+
* Resolves this parameter object.
|
|
227
|
+
*
|
|
228
|
+
* @returns The parameter instance itself since it's already a concrete object
|
|
229
|
+
*/
|
|
204
230
|
resolve(): OasParameter;
|
|
231
|
+
/**
|
|
232
|
+
* Resolves this parameter object one level.
|
|
233
|
+
*
|
|
234
|
+
* @returns The parameter instance itself since it's already a concrete object
|
|
235
|
+
*/
|
|
205
236
|
resolveOnce(): OasParameter;
|
|
237
|
+
/**
|
|
238
|
+
* Extracts the schema for this parameter.
|
|
239
|
+
*
|
|
240
|
+
* Returns the direct schema if available, or extracts schema from content
|
|
241
|
+
* for the specified media type.
|
|
242
|
+
*
|
|
243
|
+
* @param mediaType - Media type to extract schema from when using content definitions
|
|
244
|
+
* @returns The parameter's schema object
|
|
245
|
+
* @throws Error if no schema is found for the specified media type
|
|
246
|
+
*/
|
|
206
247
|
toSchema(mediaType?: string): OasSchema | OasRef<'schema'>;
|
|
248
|
+
/**
|
|
249
|
+
* Converts this OAS parameter to an OpenAPI v3 JSON schema representation.
|
|
250
|
+
*
|
|
251
|
+
* @param options - Conversion options including reference handling and formatting preferences
|
|
252
|
+
* @returns OpenAPI v3 parameter object with all properties and validation constraints
|
|
253
|
+
*/
|
|
207
254
|
toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.ParameterObject;
|
|
208
255
|
}
|
|
209
256
|
//# sourceMappingURL=Parameter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../src/oas/parameter/Parameter.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAK9C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,kEAAkE;IAClE,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,2CAA2C;IAC3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a new OasParameter instance.
|
|
149
|
+
*
|
|
150
|
+
* @param fields - Parameter configuration fields including name, location, schema, and serialization options
|
|
151
|
+
*/
|
|
147
152
|
constructor(fields) {
|
|
148
153
|
/** Type identifier for OAS parameter objects */
|
|
149
154
|
Object.defineProperty(this, "oasType", {
|
|
@@ -166,66 +171,77 @@ export class OasParameter {
|
|
|
166
171
|
writable: true,
|
|
167
172
|
value: void 0
|
|
168
173
|
});
|
|
174
|
+
/** A brief description of the parameter's purpose and usage */
|
|
169
175
|
Object.defineProperty(this, "description", {
|
|
170
176
|
enumerable: true,
|
|
171
177
|
configurable: true,
|
|
172
178
|
writable: true,
|
|
173
179
|
value: void 0
|
|
174
180
|
});
|
|
181
|
+
/** Determines whether this parameter is mandatory for the operation */
|
|
175
182
|
Object.defineProperty(this, "required", {
|
|
176
183
|
enumerable: true,
|
|
177
184
|
configurable: true,
|
|
178
185
|
writable: true,
|
|
179
186
|
value: void 0
|
|
180
187
|
});
|
|
188
|
+
/** Indicates that the parameter is deprecated and should be avoided */
|
|
181
189
|
Object.defineProperty(this, "deprecated", {
|
|
182
190
|
enumerable: true,
|
|
183
191
|
configurable: true,
|
|
184
192
|
writable: true,
|
|
185
193
|
value: void 0
|
|
186
194
|
});
|
|
195
|
+
/** Whether to allow empty values for this parameter */
|
|
187
196
|
Object.defineProperty(this, "allowEmptyValue", {
|
|
188
197
|
enumerable: true,
|
|
189
198
|
configurable: true,
|
|
190
199
|
writable: true,
|
|
191
200
|
value: void 0
|
|
192
201
|
});
|
|
202
|
+
/** Whether reserved characters are allowed in parameter values */
|
|
193
203
|
Object.defineProperty(this, "allowReserved", {
|
|
194
204
|
enumerable: true,
|
|
195
205
|
configurable: true,
|
|
196
206
|
writable: true,
|
|
197
207
|
value: void 0
|
|
198
208
|
});
|
|
209
|
+
/** The schema defining the parameter's data type and validation rules */
|
|
199
210
|
Object.defineProperty(this, "schema", {
|
|
200
211
|
enumerable: true,
|
|
201
212
|
configurable: true,
|
|
202
213
|
writable: true,
|
|
203
214
|
value: void 0
|
|
204
215
|
});
|
|
216
|
+
/** Example values demonstrating parameter usage */
|
|
205
217
|
Object.defineProperty(this, "examples", {
|
|
206
218
|
enumerable: true,
|
|
207
219
|
configurable: true,
|
|
208
220
|
writable: true,
|
|
209
221
|
value: void 0
|
|
210
222
|
});
|
|
223
|
+
/** Media type definitions for complex parameter content */
|
|
211
224
|
Object.defineProperty(this, "content", {
|
|
212
225
|
enumerable: true,
|
|
213
226
|
configurable: true,
|
|
214
227
|
writable: true,
|
|
215
228
|
value: void 0
|
|
216
229
|
});
|
|
230
|
+
/** The serialization style for the parameter (form, simple, etc.) */
|
|
217
231
|
Object.defineProperty(this, "style", {
|
|
218
232
|
enumerable: true,
|
|
219
233
|
configurable: true,
|
|
220
234
|
writable: true,
|
|
221
235
|
value: void 0
|
|
222
236
|
});
|
|
237
|
+
/** Whether to explode parameter values into separate key-value pairs */
|
|
223
238
|
Object.defineProperty(this, "explode", {
|
|
224
239
|
enumerable: true,
|
|
225
240
|
configurable: true,
|
|
226
241
|
writable: true,
|
|
227
242
|
value: void 0
|
|
228
243
|
});
|
|
244
|
+
/** Custom extension fields (x-* properties) defined for this parameter */
|
|
229
245
|
Object.defineProperty(this, "extensionFields", {
|
|
230
246
|
enumerable: true,
|
|
231
247
|
configurable: true,
|
|
@@ -248,15 +264,40 @@ export class OasParameter {
|
|
|
248
264
|
this.explode = fields.explode;
|
|
249
265
|
this.extensionFields = fields.extensionFields;
|
|
250
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Determines if this parameter is a reference object.
|
|
269
|
+
*
|
|
270
|
+
* @returns Always false since this is a concrete parameter instance, not a reference
|
|
271
|
+
*/
|
|
251
272
|
isRef() {
|
|
252
273
|
return false;
|
|
253
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Resolves this parameter object.
|
|
277
|
+
*
|
|
278
|
+
* @returns The parameter instance itself since it's already a concrete object
|
|
279
|
+
*/
|
|
254
280
|
resolve() {
|
|
255
281
|
return this;
|
|
256
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Resolves this parameter object one level.
|
|
285
|
+
*
|
|
286
|
+
* @returns The parameter instance itself since it's already a concrete object
|
|
287
|
+
*/
|
|
257
288
|
resolveOnce() {
|
|
258
289
|
return this;
|
|
259
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Extracts the schema for this parameter.
|
|
293
|
+
*
|
|
294
|
+
* Returns the direct schema if available, or extracts schema from content
|
|
295
|
+
* for the specified media type.
|
|
296
|
+
*
|
|
297
|
+
* @param mediaType - Media type to extract schema from when using content definitions
|
|
298
|
+
* @returns The parameter's schema object
|
|
299
|
+
* @throws Error if no schema is found for the specified media type
|
|
300
|
+
*/
|
|
260
301
|
toSchema(mediaType = 'application/json') {
|
|
261
302
|
if (this.schema) {
|
|
262
303
|
return this.schema;
|
|
@@ -267,6 +308,12 @@ export class OasParameter {
|
|
|
267
308
|
}
|
|
268
309
|
return schema;
|
|
269
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Converts this OAS parameter to an OpenAPI v3 JSON schema representation.
|
|
313
|
+
*
|
|
314
|
+
* @param options - Conversion options including reference handling and formatting preferences
|
|
315
|
+
* @returns OpenAPI v3 parameter object with all properties and validation constraints
|
|
316
|
+
*/
|
|
270
317
|
toJsonSchema(options) {
|
|
271
318
|
return {
|
|
272
319
|
name: this.name,
|
|
@@ -9,15 +9,73 @@ type CreateArgs = {
|
|
|
9
9
|
value: Stringable;
|
|
10
10
|
generatorKey?: GeneratorKey;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Represents a custom value in the SKMTC generation pipeline.
|
|
14
|
+
*
|
|
15
|
+
* CustomValue allows generators to create arbitrary content that doesn't fit
|
|
16
|
+
* standard schema types. Used for injecting custom code, templates, or specialized
|
|
17
|
+
* content during the generation process.
|
|
18
|
+
*
|
|
19
|
+
* @example Creating custom content
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const customValue = new CustomValue({
|
|
22
|
+
* context: generateContext,
|
|
23
|
+
* value: 'const customCode = "generated";',
|
|
24
|
+
* generatorKey: 'my-generator'
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* console.log(customValue.toString()); // "const customCode = "generated";"
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
12
30
|
export declare class CustomValue extends ContentBase {
|
|
31
|
+
/** Type identifier for this custom value */
|
|
13
32
|
type: "custom";
|
|
33
|
+
/** The underlying value content that can be converted to string */
|
|
14
34
|
value: Stringable;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new CustomValue instance.
|
|
37
|
+
*
|
|
38
|
+
* @param args - Creation arguments including context, value, and optional generator key
|
|
39
|
+
*/
|
|
15
40
|
constructor({ context, value, generatorKey }: CreateArgs);
|
|
41
|
+
/**
|
|
42
|
+
* Determines if this custom value is a reference.
|
|
43
|
+
*
|
|
44
|
+
* @returns Always false since custom values are concrete content, not references
|
|
45
|
+
*/
|
|
16
46
|
isRef(): this is OasRef<'schema'>;
|
|
47
|
+
/**
|
|
48
|
+
* Resolves this custom value.
|
|
49
|
+
*
|
|
50
|
+
* @returns The custom value itself since it's already resolved
|
|
51
|
+
*/
|
|
17
52
|
resolve(): CustomValue;
|
|
53
|
+
/**
|
|
54
|
+
* Resolves this custom value one level.
|
|
55
|
+
*
|
|
56
|
+
* @returns The custom value itself since it's already resolved
|
|
57
|
+
*/
|
|
18
58
|
resolveOnce(): CustomValue;
|
|
59
|
+
/**
|
|
60
|
+
* Converts the custom value to its string representation.
|
|
61
|
+
*
|
|
62
|
+
* @returns String representation of the underlying value
|
|
63
|
+
*/
|
|
19
64
|
toString(): string;
|
|
20
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Type guard function to check if a value is a CustomValue instance.
|
|
68
|
+
*
|
|
69
|
+
* @param value - Value to check
|
|
70
|
+
* @returns True if the value is a CustomValue, false otherwise
|
|
71
|
+
*
|
|
72
|
+
* @example Type checking
|
|
73
|
+
* ```typescript
|
|
74
|
+
* if (isCustomValue(someValue)) {
|
|
75
|
+
* console.log(someValue.value); // TypeScript knows it's a CustomValue
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
21
79
|
export declare const isCustomValue: (value: unknown) => value is CustomValue;
|
|
22
80
|
export {};
|
|
23
81
|
//# sourceMappingURL=CustomValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomValue.d.ts","sourceRoot":"","sources":["../../src/types/CustomValue.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,UAAU,CAAA;IACjB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAG,QAAQ,CAAS;IACxB,KAAK,EAAE,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"CustomValue.d.ts","sourceRoot":"","sources":["../../src/types/CustomValue.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,UAAU,CAAA;IACjB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,4CAA4C;IAC5C,IAAI,EAAG,QAAQ,CAAS;IACxB,mEAAmE;IACnE,KAAK,EAAE,UAAU,CAAA;IAEjB;;;;OAIG;gBACS,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,UAAU;IAMxD;;;;OAIG;IACH,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC;;;;OAIG;IACH,OAAO,IAAI,WAAW;IAItB;;;;OAIG;IACH,WAAW,IAAI,WAAW;IAI1B;;;;OAIG;IACM,QAAQ,IAAI,MAAM;CAG5B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,WAEvD,CAAA"}
|
package/esm/types/CustomValue.js
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import { ContentBase } from '../dsl/ContentBase.js';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a custom value in the SKMTC generation pipeline.
|
|
5
|
+
*
|
|
6
|
+
* CustomValue allows generators to create arbitrary content that doesn't fit
|
|
7
|
+
* standard schema types. Used for injecting custom code, templates, or specialized
|
|
8
|
+
* content during the generation process.
|
|
9
|
+
*
|
|
10
|
+
* @example Creating custom content
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const customValue = new CustomValue({
|
|
13
|
+
* context: generateContext,
|
|
14
|
+
* value: 'const customCode = "generated";',
|
|
15
|
+
* generatorKey: 'my-generator'
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* console.log(customValue.toString()); // "const customCode = "generated";"
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
3
21
|
export class CustomValue extends ContentBase {
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new CustomValue instance.
|
|
24
|
+
*
|
|
25
|
+
* @param args - Creation arguments including context, value, and optional generator key
|
|
26
|
+
*/
|
|
4
27
|
constructor({ context, value, generatorKey }) {
|
|
5
28
|
super({ context, generatorKey });
|
|
29
|
+
/** Type identifier for this custom value */
|
|
6
30
|
Object.defineProperty(this, "type", {
|
|
7
31
|
enumerable: true,
|
|
8
32
|
configurable: true,
|
|
9
33
|
writable: true,
|
|
10
34
|
value: 'custom'
|
|
11
35
|
});
|
|
36
|
+
/** The underlying value content that can be converted to string */
|
|
12
37
|
Object.defineProperty(this, "value", {
|
|
13
38
|
enumerable: true,
|
|
14
39
|
configurable: true,
|
|
@@ -17,19 +42,52 @@ export class CustomValue extends ContentBase {
|
|
|
17
42
|
});
|
|
18
43
|
this.value = value;
|
|
19
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Determines if this custom value is a reference.
|
|
47
|
+
*
|
|
48
|
+
* @returns Always false since custom values are concrete content, not references
|
|
49
|
+
*/
|
|
20
50
|
isRef() {
|
|
21
51
|
return false;
|
|
22
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Resolves this custom value.
|
|
55
|
+
*
|
|
56
|
+
* @returns The custom value itself since it's already resolved
|
|
57
|
+
*/
|
|
23
58
|
resolve() {
|
|
24
59
|
return this;
|
|
25
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Resolves this custom value one level.
|
|
63
|
+
*
|
|
64
|
+
* @returns The custom value itself since it's already resolved
|
|
65
|
+
*/
|
|
26
66
|
resolveOnce() {
|
|
27
67
|
return this;
|
|
28
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Converts the custom value to its string representation.
|
|
71
|
+
*
|
|
72
|
+
* @returns String representation of the underlying value
|
|
73
|
+
*/
|
|
29
74
|
toString() {
|
|
30
75
|
return `${this.value}`;
|
|
31
76
|
}
|
|
32
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Type guard function to check if a value is a CustomValue instance.
|
|
80
|
+
*
|
|
81
|
+
* @param value - Value to check
|
|
82
|
+
* @returns True if the value is a CustomValue, false otherwise
|
|
83
|
+
*
|
|
84
|
+
* @example Type checking
|
|
85
|
+
* ```typescript
|
|
86
|
+
* if (isCustomValue(someValue)) {
|
|
87
|
+
* console.log(someValue.value); // TypeScript knows it's a CustomValue
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
33
91
|
export const isCustomValue = (value) => {
|
|
34
92
|
return Boolean(value && typeof value === 'object' && 'type' in value && value.type === 'custom');
|
|
35
93
|
};
|
package/esm/types/DenoJson.d.ts
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import * as v from 'valibot';
|
|
3
|
+
/**
|
|
4
|
+
* Valibot schema for root-level deno.json configuration files.
|
|
5
|
+
*
|
|
6
|
+
* Validates workspace-level deno.json files that manage multiple packages
|
|
7
|
+
* and define workspace-wide imports and exports.
|
|
8
|
+
*/
|
|
3
9
|
export declare const rootDenoJson: v.GenericSchema<RootDenoJson>;
|
|
10
|
+
/**
|
|
11
|
+
* Type definition for root-level deno.json configuration.
|
|
12
|
+
*
|
|
13
|
+
* Represents the structure of workspace-level deno.json files that coordinate
|
|
14
|
+
* multiple packages within a Deno workspace.
|
|
15
|
+
*/
|
|
4
16
|
export type RootDenoJson = {
|
|
5
17
|
imports?: Record<string, string>;
|
|
6
18
|
exports?: Record<string, string>;
|
|
7
19
|
workspace?: string[];
|
|
8
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Valibot schema for package-level deno.json configuration files.
|
|
23
|
+
*
|
|
24
|
+
* Validates individual package deno.json files that define package-specific
|
|
25
|
+
* metadata, dependencies, and export configurations.
|
|
26
|
+
*/
|
|
9
27
|
export declare const packageDenoJson: v.GenericSchema<PackageDenoJson>;
|
|
28
|
+
/**
|
|
29
|
+
* Type definition for package-level deno.json configuration.
|
|
30
|
+
*
|
|
31
|
+
* Represents the structure of individual package deno.json files with
|
|
32
|
+
* required name/version fields and optional import/export configurations.
|
|
33
|
+
*/
|
|
10
34
|
export type PackageDenoJson = {
|
|
11
35
|
name: string;
|
|
12
36
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DenoJson.d.ts","sourceRoot":"","sources":["../../src/types/DenoJson.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAIrD,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAK3D,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;CACzC,CAAA"}
|
|
1
|
+
{"version":3,"file":"DenoJson.d.ts","sourceRoot":"","sources":["../../src/types/DenoJson.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAIrD,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAK3D,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;CACzC,CAAA"}
|
package/esm/types/DenoJson.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import * as v from 'valibot';
|
|
3
|
+
/**
|
|
4
|
+
* Valibot schema for root-level deno.json configuration files.
|
|
5
|
+
*
|
|
6
|
+
* Validates workspace-level deno.json files that manage multiple packages
|
|
7
|
+
* and define workspace-wide imports and exports.
|
|
8
|
+
*/
|
|
3
9
|
export const rootDenoJson = v.looseObject({
|
|
4
10
|
imports: v.optional(v.record(v.string(), v.string())),
|
|
5
11
|
exports: v.optional(v.record(v.string(), v.string())),
|
|
6
12
|
workspace: v.optional(v.array(v.string()))
|
|
7
13
|
});
|
|
14
|
+
/**
|
|
15
|
+
* Valibot schema for package-level deno.json configuration files.
|
|
16
|
+
*
|
|
17
|
+
* Validates individual package deno.json files that define package-specific
|
|
18
|
+
* metadata, dependencies, and export configurations.
|
|
19
|
+
*/
|
|
8
20
|
export const packageDenoJson = v.looseObject({
|
|
9
21
|
name: v.string(),
|
|
10
22
|
version: v.string(),
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import { type ModuleExport } from './ModuleExport.js';
|
|
3
3
|
import * as v from 'valibot';
|
|
4
|
+
/**
|
|
5
|
+
* Valibot schema for form field items.
|
|
6
|
+
*
|
|
7
|
+
* Validates individual form field configurations including input components,
|
|
8
|
+
* labels, placeholders, and data access paths.
|
|
9
|
+
*/
|
|
4
10
|
export declare const formFieldItem: v.GenericSchema<FormFieldItem>;
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for a single form field.
|
|
13
|
+
*
|
|
14
|
+
* Defines how a form field should be rendered, including its input component,
|
|
15
|
+
* label text, data binding path, and optional placeholder text.
|
|
16
|
+
*/
|
|
5
17
|
export type FormFieldItem = {
|
|
6
18
|
id: string;
|
|
7
19
|
accessorPath: string[];
|
|
@@ -9,42 +21,133 @@ export type FormFieldItem = {
|
|
|
9
21
|
label: string;
|
|
10
22
|
placeholder?: string;
|
|
11
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Valibot schema for form configurations.
|
|
26
|
+
*
|
|
27
|
+
* Validates complete form definitions including title, description,
|
|
28
|
+
* field configurations, and submit button labels.
|
|
29
|
+
*/
|
|
12
30
|
export declare const formItem: v.GenericSchema<FormItem>;
|
|
31
|
+
/**
|
|
32
|
+
* Configuration for a complete form.
|
|
33
|
+
*
|
|
34
|
+
* Represents a form with optional title, description, field definitions,
|
|
35
|
+
* and customizable submit button label.
|
|
36
|
+
*/
|
|
13
37
|
export type FormItem = {
|
|
14
38
|
title?: string;
|
|
15
39
|
description?: string;
|
|
16
40
|
fields?: FormFieldItem[];
|
|
17
41
|
submitLabel?: string;
|
|
18
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Valibot schema for table column items.
|
|
45
|
+
*
|
|
46
|
+
* Validates table column configurations including formatter components,
|
|
47
|
+
* labels, and data access paths.
|
|
48
|
+
*/
|
|
19
49
|
export declare const tableColumnItem: v.GenericSchema<TableColumnItem>;
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for a single table column.
|
|
52
|
+
*
|
|
53
|
+
* Defines how a table column should be rendered, including its formatter
|
|
54
|
+
* component, display label, and data binding path.
|
|
55
|
+
*/
|
|
20
56
|
export type TableColumnItem = {
|
|
21
57
|
id: string;
|
|
22
58
|
accessorPath: string[];
|
|
23
59
|
formatter: ModuleExport;
|
|
24
60
|
label: string;
|
|
25
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Valibot schema for table configurations.
|
|
64
|
+
*
|
|
65
|
+
* Validates complete table definitions including title, description,
|
|
66
|
+
* and column configurations.
|
|
67
|
+
*/
|
|
26
68
|
export declare const tableItem: v.GenericSchema<TableItem>;
|
|
69
|
+
/**
|
|
70
|
+
* Configuration for a complete table.
|
|
71
|
+
*
|
|
72
|
+
* Represents a table with optional title, description, and column definitions.
|
|
73
|
+
*/
|
|
27
74
|
export type TableItem = {
|
|
28
75
|
title?: string;
|
|
29
76
|
description?: string;
|
|
30
77
|
columns?: TableColumnItem[];
|
|
31
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* Valibot schema for input items.
|
|
81
|
+
*
|
|
82
|
+
* Validates input component configurations including formatter components
|
|
83
|
+
* and data access paths.
|
|
84
|
+
*/
|
|
32
85
|
export declare const inputItem: v.GenericSchema<InputItem>;
|
|
86
|
+
/**
|
|
87
|
+
* Configuration for a single input component.
|
|
88
|
+
*
|
|
89
|
+
* Defines how an input should be rendered, including its formatter
|
|
90
|
+
* component and data binding path.
|
|
91
|
+
*/
|
|
33
92
|
export type InputItem = {
|
|
34
93
|
id: string;
|
|
35
94
|
accessorPath: string[];
|
|
36
95
|
formatter: ModuleExport;
|
|
37
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Valibot schema for operation-level enrichments.
|
|
99
|
+
*
|
|
100
|
+
* Validates enrichment configurations that can be applied to OpenAPI operations,
|
|
101
|
+
* including table, form, and input component definitions.
|
|
102
|
+
*/
|
|
38
103
|
export declare const operationEnrichments: v.GenericSchema<OperationEnrichments>;
|
|
104
|
+
/**
|
|
105
|
+
* Enrichment configurations for a single OpenAPI operation.
|
|
106
|
+
*
|
|
107
|
+
* Contains optional table, form, and input configurations that can enhance
|
|
108
|
+
* how an operation is presented and interacted with in generated UIs.
|
|
109
|
+
*/
|
|
39
110
|
export type OperationEnrichments = {
|
|
40
111
|
table?: TableItem;
|
|
41
112
|
form?: FormItem;
|
|
42
113
|
input?: InputItem;
|
|
43
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* Valibot schema for HTTP method-level enrichments.
|
|
117
|
+
*
|
|
118
|
+
* Maps HTTP methods (GET, POST, etc.) to their operation enrichment configurations.
|
|
119
|
+
*/
|
|
44
120
|
export declare const methodEnrichments: v.GenericSchema<MethodEnrichments>;
|
|
121
|
+
/**
|
|
122
|
+
* HTTP method to operation enrichments mapping.
|
|
123
|
+
*
|
|
124
|
+
* Associates HTTP methods with their corresponding operation enrichment configurations.
|
|
125
|
+
*/
|
|
45
126
|
export type MethodEnrichments = Record<string, OperationEnrichments>;
|
|
127
|
+
/**
|
|
128
|
+
* Valibot schema for API path-level enrichments.
|
|
129
|
+
*
|
|
130
|
+
* Maps API paths to their method enrichment configurations.
|
|
131
|
+
*/
|
|
46
132
|
export declare const pathEnrichments: v.GenericSchema<PathEnrichments>;
|
|
133
|
+
/**
|
|
134
|
+
* API path to method enrichments mapping.
|
|
135
|
+
*
|
|
136
|
+
* Associates API paths with their corresponding method enrichment configurations.
|
|
137
|
+
*/
|
|
47
138
|
export type PathEnrichments = Record<string, MethodEnrichments>;
|
|
139
|
+
/**
|
|
140
|
+
* Valibot schema for generator-level enrichments.
|
|
141
|
+
*
|
|
142
|
+
* Maps generator IDs to their path enrichment configurations,
|
|
143
|
+
* creating a complete hierarchy of enrichment data.
|
|
144
|
+
*/
|
|
48
145
|
export declare const generatorEnrichments: v.GenericSchema<GeneratorEnrichments>;
|
|
146
|
+
/**
|
|
147
|
+
* Generator ID to path enrichments mapping.
|
|
148
|
+
*
|
|
149
|
+
* Top-level enrichment structure that organizes enrichment data by generator,
|
|
150
|
+
* then by path, then by HTTP method, providing complete enrichment hierarchies.
|
|
151
|
+
*/
|
|
49
152
|
export type GeneratorEnrichments = Record<string, PathEnrichments>;
|
|
50
153
|
//# sourceMappingURL=Enrichments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enrichments.d.ts","sourceRoot":"","sources":["../../src/types/Enrichments.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAMvD,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAK7C,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAK3D,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,EAAE,YAAY,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CA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