@skmtc/core 0.0.800 → 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 +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.d.ts +16 -3
- 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 +153 -1
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +179 -0
- package/esm/context/types.d.ts +30 -0
- package/esm/context/types.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.d.ts +1 -1
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.d.ts +62 -0
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +63 -1
- package/esm/dsl/model/toModelBase.d.ts +66 -0
- package/esm/dsl/model/toModelBase.d.ts.map +1 -1
- package/esm/dsl/model/toModelBase.js +46 -0
- package/esm/dsl/model/toModelEntry.d.ts +63 -0
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +63 -0
- package/esm/dsl/operation/OperationBase.d.ts +3 -3
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.d.ts +84 -0
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +85 -1
- 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/helpers/isEmpty.d.ts +1 -1
- package/esm/helpers/isEmpty.d.ts.map +1 -1
- package/esm/helpers/tracer.d.ts +1 -1
- package/esm/helpers/tracer.d.ts.map +1 -1
- package/esm/helpers/tracer.js +1 -1
- package/esm/mod.d.ts +52 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +52 -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 +32 -11
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +16 -0
- package/esm/oas/array/toArray.d.ts +111 -0
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +115 -3
- 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/boolean-types.d.ts +1 -7
- package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
- 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/components/components-types.d.ts +19 -0
- package/esm/oas/components/components-types.d.ts.map +1 -0
- package/esm/oas/components/components-types.js +21 -0
- package/esm/oas/contact/contact-types.d.ts +9 -0
- package/esm/oas/contact/contact-types.d.ts.map +1 -0
- package/esm/oas/contact/contact-types.js +7 -0
- package/esm/oas/discriminator/discriminator-types.d.ts +1 -5
- package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/esm/oas/document/document-types.d.ts +16 -0
- package/esm/oas/document/document-types.d.ts.map +1 -0
- package/esm/oas/document/document-types.js +18 -0
- package/esm/oas/example/example-types.d.ts +1 -6
- package/esm/oas/example/example-types.d.ts.map +1 -1
- package/esm/oas/header/header-types.d.ts +50 -0
- package/esm/oas/header/header-types.d.ts.map +1 -0
- package/esm/oas/header/header-types.js +30 -0
- package/esm/oas/info/info-types.d.ts +14 -0
- package/esm/oas/info/info-types.d.ts.map +1 -0
- package/esm/oas/info/info-types.js +13 -0
- package/esm/oas/integer/integer-types.d.ts +3 -17
- package/esm/oas/integer/integer-types.d.ts.map +1 -1
- package/esm/oas/license/license-types.d.ts +9 -0
- package/esm/oas/license/license-types.d.ts.map +1 -0
- package/esm/oas/license/license-types.js +7 -0
- package/esm/oas/mediaType/mediaType-types.d.ts +1 -11
- package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/esm/oas/number/number-types.d.ts +2 -16
- package/esm/oas/number/number-types.d.ts.map +1 -1
- 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/operation/operation-types.d.ts +22 -0
- package/esm/oas/operation/operation-types.d.ts.map +1 -0
- package/esm/oas/operation/operation-types.js +35 -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/oas/parameter/parameter-types.d.ts +3 -58
- package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
- package/esm/oas/pathItem/pathItem-types.d.ts +12 -0
- package/esm/oas/pathItem/pathItem-types.d.ts.map +1 -0
- package/esm/oas/pathItem/pathItem-types.js +12 -0
- package/esm/oas/requestBody/requestBody-types.d.ts +10 -0
- package/esm/oas/requestBody/requestBody-types.d.ts.map +1 -0
- package/esm/oas/requestBody/requestBody-types.js +9 -0
- package/esm/oas/response/response-types.d.ts +12 -0
- package/esm/oas/response/response-types.d.ts.map +1 -0
- package/esm/oas/response/response-types.js +11 -0
- package/esm/oas/schema/toSchemasV3.js +2 -2
- package/esm/oas/server/toServerV3.d.ts.map +1 -1
- package/esm/oas/string/string-types.d.ts +2 -29
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/toString.d.ts +125 -1
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +119 -0
- package/esm/oas/tag/tag-types.d.ts +8 -0
- package/esm/oas/tag/tag-types.d.ts.map +1 -0
- package/esm/oas/tag/tag-types.js +8 -0
- package/esm/oas/union/union-types.d.ts +1 -12
- package/esm/oas/union/union-types.d.ts.map +1 -1
- package/esm/oas/unknown/unknown-types.d.ts +1 -7
- package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
- 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/esm/types/Preview.d.ts +37 -0
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +37 -0
- package/esm/types/Settings.d.ts +35 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +27 -0
- package/esm/typescript/FunctionParameter.d.ts +4 -4
- package/esm/typescript/FunctionParameter.d.ts.map +1 -1
- package/esm/typescript/List.d.ts +40 -2
- package/esm/typescript/List.d.ts.map +1 -1
- package/esm/typescript/List.js +32 -0
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/GenerateContext.d.ts +16 -3
- 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 +153 -1
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +179 -0
- package/script/context/types.d.ts +30 -0
- package/script/context/types.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.d.ts +1 -1
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.d.ts +62 -0
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +63 -1
- package/script/dsl/model/toModelBase.d.ts +66 -0
- package/script/dsl/model/toModelBase.d.ts.map +1 -1
- package/script/dsl/model/toModelBase.js +46 -0
- package/script/dsl/model/toModelEntry.d.ts +63 -0
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +63 -0
- package/script/dsl/operation/OperationBase.d.ts +3 -3
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.d.ts +84 -0
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +85 -1
- 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/helpers/isEmpty.d.ts +1 -1
- package/script/helpers/isEmpty.d.ts.map +1 -1
- package/script/helpers/tracer.d.ts +1 -1
- package/script/helpers/tracer.d.ts.map +1 -1
- package/script/helpers/tracer.js +1 -1
- package/script/mod.d.ts +52 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +52 -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 +32 -11
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +17 -1
- package/script/oas/array/toArray.d.ts +111 -0
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +114 -2
- 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/boolean-types.d.ts +1 -7
- package/script/oas/boolean/boolean-types.d.ts.map +1 -1
- 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/components/components-types.d.ts +19 -0
- package/script/oas/components/components-types.d.ts.map +1 -0
- package/script/oas/components/components-types.js +57 -0
- package/script/oas/contact/contact-types.d.ts +9 -0
- package/script/oas/contact/contact-types.d.ts.map +1 -0
- package/script/oas/contact/contact-types.js +43 -0
- package/script/oas/discriminator/discriminator-types.d.ts +1 -5
- package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/script/oas/document/document-types.d.ts +16 -0
- package/script/oas/document/document-types.d.ts.map +1 -0
- package/script/oas/document/document-types.js +54 -0
- package/script/oas/example/example-types.d.ts +1 -6
- package/script/oas/example/example-types.d.ts.map +1 -1
- package/script/oas/header/header-types.d.ts +50 -0
- package/script/oas/header/header-types.d.ts.map +1 -0
- package/script/oas/header/header-types.js +66 -0
- package/script/oas/info/info-types.d.ts +14 -0
- package/script/oas/info/info-types.d.ts.map +1 -0
- package/script/oas/info/info-types.js +49 -0
- package/script/oas/integer/integer-types.d.ts +3 -17
- package/script/oas/integer/integer-types.d.ts.map +1 -1
- package/script/oas/license/license-types.d.ts +9 -0
- package/script/oas/license/license-types.d.ts.map +1 -0
- package/script/oas/license/license-types.js +43 -0
- package/script/oas/mediaType/mediaType-types.d.ts +1 -11
- package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/script/oas/number/number-types.d.ts +2 -16
- package/script/oas/number/number-types.d.ts.map +1 -1
- 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/operation/operation-types.d.ts +22 -0
- package/script/oas/operation/operation-types.d.ts.map +1 -0
- package/script/oas/operation/operation-types.js +71 -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/oas/parameter/parameter-types.d.ts +3 -58
- package/script/oas/parameter/parameter-types.d.ts.map +1 -1
- package/script/oas/pathItem/pathItem-types.d.ts +12 -0
- package/script/oas/pathItem/pathItem-types.d.ts.map +1 -0
- package/script/oas/pathItem/pathItem-types.js +48 -0
- package/script/oas/requestBody/requestBody-types.d.ts +10 -0
- package/script/oas/requestBody/requestBody-types.d.ts.map +1 -0
- package/script/oas/requestBody/requestBody-types.js +45 -0
- package/script/oas/response/response-types.d.ts +12 -0
- package/script/oas/response/response-types.d.ts.map +1 -0
- package/script/oas/response/response-types.js +47 -0
- package/script/oas/schema/toSchemasV3.js +2 -2
- package/script/oas/server/toServerV3.d.ts.map +1 -1
- package/script/oas/string/string-types.d.ts +2 -29
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/toString.d.ts +125 -1
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +119 -0
- package/script/oas/tag/tag-types.d.ts +8 -0
- package/script/oas/tag/tag-types.d.ts.map +1 -0
- package/script/oas/tag/tag-types.js +44 -0
- package/script/oas/union/union-types.d.ts +1 -12
- package/script/oas/union/union-types.d.ts.map +1 -1
- package/script/oas/unknown/unknown-types.d.ts +1 -7
- package/script/oas/unknown/unknown-types.d.ts.map +1 -1
- 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
- package/script/types/Preview.d.ts +37 -0
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +37 -0
- package/script/types/Settings.d.ts +35 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +27 -0
- package/script/typescript/FunctionParameter.d.ts +4 -4
- package/script/typescript/FunctionParameter.d.ts.map +1 -1
- package/script/typescript/List.d.ts +40 -2
- package/script/typescript/List.d.ts.map +1 -1
- package/script/typescript/List.js +32 -0
|
@@ -12,17 +12,101 @@ type CreateOperationArgs<V extends GeneratedValue, T extends GenerationType, Enr
|
|
|
12
12
|
destinationPath?: string;
|
|
13
13
|
noExport?: boolean;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Driver class for generating operation-based artifacts from OpenAPI operations.
|
|
17
|
+
*
|
|
18
|
+
* The `OperationDriver` manages the transformation of OpenAPI operation objects
|
|
19
|
+
* into code artifacts, handling path generation, identifier resolution, and
|
|
20
|
+
* definition management. It serves as the core orchestrator for operation-based
|
|
21
|
+
* code generation in the SKMTC pipeline.
|
|
22
|
+
*
|
|
23
|
+
* @template V - Type of generated values produced by this driver
|
|
24
|
+
* @template T - Type of generation strategy (e.g., 'function', 'class', 'hook')
|
|
25
|
+
* @template EnrichmentType - Type of enrichments that can be applied
|
|
26
|
+
*
|
|
27
|
+
* @example Basic usage in an operation generator
|
|
28
|
+
* ```typescript
|
|
29
|
+
* class APIClientGenerator extends OperationBase {
|
|
30
|
+
* generate() {
|
|
31
|
+
* const driver = new OperationDriver({
|
|
32
|
+
* context: this.context,
|
|
33
|
+
* insertable: this,
|
|
34
|
+
* operation: this.operation,
|
|
35
|
+
* generation: 'function'
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* const functionCode = driver.definition.toValueString();
|
|
39
|
+
* const file = this.createFile(functionCode);
|
|
40
|
+
* this.register({ file });
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
15
45
|
export declare class OperationDriver<V extends GeneratedValue, T extends GenerationType, EnrichmentType = undefined> {
|
|
46
|
+
/** The generation context providing access to OAS objects and utilities */
|
|
16
47
|
context: GenerateContext;
|
|
48
|
+
/** The insertable object that provides generation configuration */
|
|
17
49
|
insertable: OperationInsertable<V, EnrichmentType>;
|
|
50
|
+
/** The OpenAPI operation object being processed */
|
|
18
51
|
operation: OasOperation;
|
|
52
|
+
/** Content settings for customizing generation behavior */
|
|
19
53
|
settings: ContentSettings<EnrichmentType>;
|
|
54
|
+
/** Optional custom destination path for generated files */
|
|
20
55
|
destinationPath?: string;
|
|
56
|
+
/** The generated definition containing the transformed operation */
|
|
21
57
|
definition: GeneratedDefinition<V, T>;
|
|
58
|
+
/** Whether to exclude this operation from exports */
|
|
22
59
|
noExport?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new OperationDriver instance.
|
|
62
|
+
*
|
|
63
|
+
* @param args - Configuration for the operation driver
|
|
64
|
+
* @param args.context - Generation context
|
|
65
|
+
* @param args.insertable - Insertable providing generation configuration
|
|
66
|
+
* @param args.operation - OpenAPI operation to process
|
|
67
|
+
* @param args.generation - Optional generation type
|
|
68
|
+
* @param args.destinationPath - Optional custom destination path
|
|
69
|
+
* @param args.noExport - Whether to exclude from exports
|
|
70
|
+
*/
|
|
23
71
|
constructor({ context, insertable, operation, generation, destinationPath, noExport }: CreateOperationArgs<V, T, EnrichmentType>);
|
|
72
|
+
/**
|
|
73
|
+
* Applies generation configuration to create the operation definition.
|
|
74
|
+
*
|
|
75
|
+
* This method handles the core generation logic for operations, including
|
|
76
|
+
* identifier resolution, export path management, and import registration
|
|
77
|
+
* for cross-file dependencies.
|
|
78
|
+
*
|
|
79
|
+
* @template T - The generation type
|
|
80
|
+
* @param args - Apply configuration arguments
|
|
81
|
+
* @param args.generation - Optional generation type (unused currently)
|
|
82
|
+
* @param args.destinationPath - Optional destination path for imports
|
|
83
|
+
* @returns Generated definition for the operation
|
|
84
|
+
*/
|
|
24
85
|
private apply;
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves or creates a definition for the operation.
|
|
88
|
+
*
|
|
89
|
+
* This method first checks for cached definitions to avoid duplicate generation,
|
|
90
|
+
* then creates a new definition if none exists. It handles the complete operation
|
|
91
|
+
* transformation process including schema resolution and value generation.
|
|
92
|
+
*
|
|
93
|
+
* @param args - Definition retrieval arguments
|
|
94
|
+
* @param args.identifier - The identifier for the definition
|
|
95
|
+
* @param args.exportPath - The export path for the definition
|
|
96
|
+
* @returns Operation definition instance
|
|
97
|
+
*/
|
|
25
98
|
private getDefinition;
|
|
99
|
+
/**
|
|
100
|
+
* Type guard to verify a definition matches the expected generated value type.
|
|
101
|
+
*
|
|
102
|
+
* This method performs type narrowing to ensure a cached definition is compatible
|
|
103
|
+
* with the current generation requirements, including export path validation.
|
|
104
|
+
*
|
|
105
|
+
* @template V - The expected generated value type
|
|
106
|
+
* @param definition - The definition to verify (may be undefined)
|
|
107
|
+
* @param exportPath - Expected export path for validation
|
|
108
|
+
* @returns True if definition matches expected type and constraints
|
|
109
|
+
*/
|
|
26
110
|
private affirmDefinition;
|
|
27
111
|
}
|
|
28
112
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,KA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AUG;IACH,OAAO,CAAC,gBAAgB;CAqBzB"}
|
|
@@ -1,44 +1,92 @@
|
|
|
1
1
|
import { normalize } from '../../deps/jsr.io/@std/path/1.1.2/normalize.js';
|
|
2
2
|
import { Definition } from '../Definition.js';
|
|
3
3
|
import { toOperationGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
4
|
+
/**
|
|
5
|
+
* Driver class for generating operation-based artifacts from OpenAPI operations.
|
|
6
|
+
*
|
|
7
|
+
* The `OperationDriver` manages the transformation of OpenAPI operation objects
|
|
8
|
+
* into code artifacts, handling path generation, identifier resolution, and
|
|
9
|
+
* definition management. It serves as the core orchestrator for operation-based
|
|
10
|
+
* code generation in the SKMTC pipeline.
|
|
11
|
+
*
|
|
12
|
+
* @template V - Type of generated values produced by this driver
|
|
13
|
+
* @template T - Type of generation strategy (e.g., 'function', 'class', 'hook')
|
|
14
|
+
* @template EnrichmentType - Type of enrichments that can be applied
|
|
15
|
+
*
|
|
16
|
+
* @example Basic usage in an operation generator
|
|
17
|
+
* ```typescript
|
|
18
|
+
* class APIClientGenerator extends OperationBase {
|
|
19
|
+
* generate() {
|
|
20
|
+
* const driver = new OperationDriver({
|
|
21
|
+
* context: this.context,
|
|
22
|
+
* insertable: this,
|
|
23
|
+
* operation: this.operation,
|
|
24
|
+
* generation: 'function'
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* const functionCode = driver.definition.toValueString();
|
|
28
|
+
* const file = this.createFile(functionCode);
|
|
29
|
+
* this.register({ file });
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
4
34
|
export class OperationDriver {
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new OperationDriver instance.
|
|
37
|
+
*
|
|
38
|
+
* @param args - Configuration for the operation driver
|
|
39
|
+
* @param args.context - Generation context
|
|
40
|
+
* @param args.insertable - Insertable providing generation configuration
|
|
41
|
+
* @param args.operation - OpenAPI operation to process
|
|
42
|
+
* @param args.generation - Optional generation type
|
|
43
|
+
* @param args.destinationPath - Optional custom destination path
|
|
44
|
+
* @param args.noExport - Whether to exclude from exports
|
|
45
|
+
*/
|
|
5
46
|
constructor({ context, insertable, operation, generation, destinationPath, noExport }) {
|
|
47
|
+
/** The generation context providing access to OAS objects and utilities */
|
|
6
48
|
Object.defineProperty(this, "context", {
|
|
7
49
|
enumerable: true,
|
|
8
50
|
configurable: true,
|
|
9
51
|
writable: true,
|
|
10
52
|
value: void 0
|
|
11
53
|
});
|
|
54
|
+
/** The insertable object that provides generation configuration */
|
|
12
55
|
Object.defineProperty(this, "insertable", {
|
|
13
56
|
enumerable: true,
|
|
14
57
|
configurable: true,
|
|
15
58
|
writable: true,
|
|
16
59
|
value: void 0
|
|
17
60
|
});
|
|
61
|
+
/** The OpenAPI operation object being processed */
|
|
18
62
|
Object.defineProperty(this, "operation", {
|
|
19
63
|
enumerable: true,
|
|
20
64
|
configurable: true,
|
|
21
65
|
writable: true,
|
|
22
66
|
value: void 0
|
|
23
67
|
});
|
|
68
|
+
/** Content settings for customizing generation behavior */
|
|
24
69
|
Object.defineProperty(this, "settings", {
|
|
25
70
|
enumerable: true,
|
|
26
71
|
configurable: true,
|
|
27
72
|
writable: true,
|
|
28
73
|
value: void 0
|
|
29
74
|
});
|
|
75
|
+
/** Optional custom destination path for generated files */
|
|
30
76
|
Object.defineProperty(this, "destinationPath", {
|
|
31
77
|
enumerable: true,
|
|
32
78
|
configurable: true,
|
|
33
79
|
writable: true,
|
|
34
80
|
value: void 0
|
|
35
81
|
});
|
|
82
|
+
/** The generated definition containing the transformed operation */
|
|
36
83
|
Object.defineProperty(this, "definition", {
|
|
37
84
|
enumerable: true,
|
|
38
85
|
configurable: true,
|
|
39
86
|
writable: true,
|
|
40
87
|
value: void 0
|
|
41
88
|
});
|
|
89
|
+
/** Whether to exclude this operation from exports */
|
|
42
90
|
Object.defineProperty(this, "noExport", {
|
|
43
91
|
enumerable: true,
|
|
44
92
|
configurable: true,
|
|
@@ -56,7 +104,20 @@ export class OperationDriver {
|
|
|
56
104
|
});
|
|
57
105
|
this.definition = this.apply({ generation, destinationPath });
|
|
58
106
|
}
|
|
59
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Applies generation configuration to create the operation definition.
|
|
109
|
+
*
|
|
110
|
+
* This method handles the core generation logic for operations, including
|
|
111
|
+
* identifier resolution, export path management, and import registration
|
|
112
|
+
* for cross-file dependencies.
|
|
113
|
+
*
|
|
114
|
+
* @template T - The generation type
|
|
115
|
+
* @param args - Apply configuration arguments
|
|
116
|
+
* @param args.generation - Optional generation type (unused currently)
|
|
117
|
+
* @param args.destinationPath - Optional destination path for imports
|
|
118
|
+
* @returns Generated definition for the operation
|
|
119
|
+
*/
|
|
120
|
+
apply({ generation: _generation, destinationPath } = {}) {
|
|
60
121
|
const { identifier, exportPath } = this.settings;
|
|
61
122
|
// Everything is selected (for now)
|
|
62
123
|
// if (/*!selected && */ generation !== 'force') {
|
|
@@ -71,6 +132,18 @@ export class OperationDriver {
|
|
|
71
132
|
}
|
|
72
133
|
return definition;
|
|
73
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves or creates a definition for the operation.
|
|
137
|
+
*
|
|
138
|
+
* This method first checks for cached definitions to avoid duplicate generation,
|
|
139
|
+
* then creates a new definition if none exists. It handles the complete operation
|
|
140
|
+
* transformation process including schema resolution and value generation.
|
|
141
|
+
*
|
|
142
|
+
* @param args - Definition retrieval arguments
|
|
143
|
+
* @param args.identifier - The identifier for the definition
|
|
144
|
+
* @param args.exportPath - The export path for the definition
|
|
145
|
+
* @returns Operation definition instance
|
|
146
|
+
*/
|
|
74
147
|
getDefinition({ identifier, exportPath }) {
|
|
75
148
|
const cachedDefinition = this.context.findDefinition({
|
|
76
149
|
name: identifier.name,
|
|
@@ -96,6 +169,17 @@ export class OperationDriver {
|
|
|
96
169
|
});
|
|
97
170
|
return definition;
|
|
98
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Type guard to verify a definition matches the expected generated value type.
|
|
174
|
+
*
|
|
175
|
+
* This method performs type narrowing to ensure a cached definition is compatible
|
|
176
|
+
* with the current generation requirements, including export path validation.
|
|
177
|
+
*
|
|
178
|
+
* @template V - The expected generated value type
|
|
179
|
+
* @param definition - The definition to verify (may be undefined)
|
|
180
|
+
* @param exportPath - Expected export path for validation
|
|
181
|
+
* @returns True if definition matches expected type and constraints
|
|
182
|
+
*/
|
|
99
183
|
affirmDefinition(definition, exportPath) {
|
|
100
184
|
if (!definition) {
|
|
101
185
|
return false;
|
|
@@ -3,11 +3,69 @@ import { OperationBase } from './OperationBase.js';
|
|
|
3
3
|
import type { Identifier } from '../Identifier.js';
|
|
4
4
|
import type { OperationInsertableArgs } from './types.js';
|
|
5
5
|
import * as v from 'valibot';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for creating a base operation class.
|
|
8
|
+
*
|
|
9
|
+
* Defines the structure and behavior for operation generators, including
|
|
10
|
+
* identifier generation, export path resolution, and enrichment schemas.
|
|
11
|
+
*
|
|
12
|
+
* @template EnrichmentType - Type of enrichments to apply to generated operations
|
|
13
|
+
*/
|
|
6
14
|
export type BaseOperationConfig<EnrichmentType = undefined> = {
|
|
15
|
+
/** Unique identifier for the operation generator */
|
|
7
16
|
id: string;
|
|
17
|
+
/** Function to generate identifiers from operations */
|
|
8
18
|
toIdentifier: (operation: OasOperation) => Identifier;
|
|
19
|
+
/** Function to generate export paths from operations */
|
|
9
20
|
toExportPath: (operation: OasOperation) => string;
|
|
21
|
+
/** Optional function to provide enrichment validation schema */
|
|
10
22
|
toEnrichmentSchema?: () => v.BaseSchema<EnrichmentType, EnrichmentType, v.BaseIssue<unknown>>;
|
|
11
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Creates a base operation class constructor for generating type-safe operation artifacts.
|
|
26
|
+
*
|
|
27
|
+
* This factory function creates a specialized OperationBase class that implements
|
|
28
|
+
* the provided configuration for identifier generation, export paths, and
|
|
29
|
+
* enrichment handling. The resulting class can be instantiated to generate
|
|
30
|
+
* operation artifacts from OpenAPI operations.
|
|
31
|
+
*
|
|
32
|
+
* @template EnrichmentType - Type of enrichments to apply to generated operations
|
|
33
|
+
* @param config - Configuration defining the operation generation behavior
|
|
34
|
+
* @returns Constructor function for creating operation instances
|
|
35
|
+
*
|
|
36
|
+
* @example Creating a TypeScript function generator
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { toOperationBase } from '@skmtc/core';
|
|
39
|
+
*
|
|
40
|
+
* const TypeScriptOperationBase = toOperationBase({
|
|
41
|
+
* id: 'typescript-functions',
|
|
42
|
+
* toIdentifier: (operation) => new Identifier(camelCase(operation.operationId)),
|
|
43
|
+
* toExportPath: (operation) => `./operations/${kebabCase(operation.operationId)}.ts`,
|
|
44
|
+
* toEnrichmentSchema: () => v.object({
|
|
45
|
+
* includeValidation: v.optional(v.boolean()),
|
|
46
|
+
* asyncMode: v.optional(v.boolean())
|
|
47
|
+
* })
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* class TypeScriptOperationGenerator extends TypeScriptOperationBase {
|
|
51
|
+
* generate() {
|
|
52
|
+
* const enrichments = this.enrichments;
|
|
53
|
+
* const functionCode = generateFunction(this.operation, {
|
|
54
|
+
* async: enrichments?.asyncMode ?? true
|
|
55
|
+
* });
|
|
56
|
+
* this.register({ file: this.createFile(functionCode) });
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example Creating a React hook generator
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const ReactHookOperationBase = toOperationBase({
|
|
64
|
+
* id: 'react-hooks',
|
|
65
|
+
* toIdentifier: (operation) => new Identifier(`use${pascalCase(operation.operationId)}`),
|
|
66
|
+
* toExportPath: (operation) => `./hooks/${kebabCase(operation.operationId)}.hook.ts`
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
12
70
|
export declare const toOperationBase: <EnrichmentType = undefined>(config: BaseOperationConfig<EnrichmentType>) => new (args: OperationInsertableArgs<EnrichmentType>) => OperationBase<EnrichmentType>;
|
|
13
71
|
//# sourceMappingURL=toOperationBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationBase.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,MAAM,MAAM,mBAAmB,CAAC,cAAc,GAAG,SAAS,IAAI;IAC5D,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,UAAU,CAAA;IACrD,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,MAAM,CAAA;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;CAC9F,CAAA;AAOD,eAAO,MAAM,eAAe,GAAI,cAAc,GAAG,SAAS,EACxD,QAAQ,mBAAmB,CAAC,cAAc,CAAC,KAC1C,KAAK,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC,KAAK,aAAa,CAAC,cAAc,CA6BrF,CAAA"}
|
|
1
|
+
{"version":3,"file":"toOperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationBase.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,CAAC,cAAc,GAAG,SAAS,IAAI;IAC5D,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,uDAAuD;IACvD,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,UAAU,CAAA;IACrD,wDAAwD;IACxD,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,MAAM,CAAA;IACjD,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;CAC9F,CAAA;AAOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc,GAAG,SAAS,EACxD,QAAQ,mBAAmB,CAAC,cAAc,CAAC,KAC1C,KAAK,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC,KAAK,aAAa,CAAC,cAAc,CA6BrF,CAAA"}
|
|
@@ -2,6 +2,52 @@ import { toOperationGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
|
2
2
|
import { OperationBase } from './OperationBase.js';
|
|
3
3
|
import * as v from 'valibot';
|
|
4
4
|
import { get } from 'lodash-es';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a base operation class constructor for generating type-safe operation artifacts.
|
|
7
|
+
*
|
|
8
|
+
* This factory function creates a specialized OperationBase class that implements
|
|
9
|
+
* the provided configuration for identifier generation, export paths, and
|
|
10
|
+
* enrichment handling. The resulting class can be instantiated to generate
|
|
11
|
+
* operation artifacts from OpenAPI operations.
|
|
12
|
+
*
|
|
13
|
+
* @template EnrichmentType - Type of enrichments to apply to generated operations
|
|
14
|
+
* @param config - Configuration defining the operation generation behavior
|
|
15
|
+
* @returns Constructor function for creating operation instances
|
|
16
|
+
*
|
|
17
|
+
* @example Creating a TypeScript function generator
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { toOperationBase } from '@skmtc/core';
|
|
20
|
+
*
|
|
21
|
+
* const TypeScriptOperationBase = toOperationBase({
|
|
22
|
+
* id: 'typescript-functions',
|
|
23
|
+
* toIdentifier: (operation) => new Identifier(camelCase(operation.operationId)),
|
|
24
|
+
* toExportPath: (operation) => `./operations/${kebabCase(operation.operationId)}.ts`,
|
|
25
|
+
* toEnrichmentSchema: () => v.object({
|
|
26
|
+
* includeValidation: v.optional(v.boolean()),
|
|
27
|
+
* asyncMode: v.optional(v.boolean())
|
|
28
|
+
* })
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* class TypeScriptOperationGenerator extends TypeScriptOperationBase {
|
|
32
|
+
* generate() {
|
|
33
|
+
* const enrichments = this.enrichments;
|
|
34
|
+
* const functionCode = generateFunction(this.operation, {
|
|
35
|
+
* async: enrichments?.asyncMode ?? true
|
|
36
|
+
* });
|
|
37
|
+
* this.register({ file: this.createFile(functionCode) });
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example Creating a React hook generator
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const ReactHookOperationBase = toOperationBase({
|
|
45
|
+
* id: 'react-hooks',
|
|
46
|
+
* toIdentifier: (operation) => new Identifier(`use${pascalCase(operation.operationId)}`),
|
|
47
|
+
* toExportPath: (operation) => `./hooks/${kebabCase(operation.operationId)}.hook.ts`
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
5
51
|
export const toOperationBase = (config) => {
|
|
6
52
|
var _a;
|
|
7
53
|
return _a = class extends OperationBase {
|
|
@@ -4,6 +4,15 @@ import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
|
4
4
|
import type { IsSupportedArgs, ToOperationPreviewModuleArgs, ToOperationMappingArgs, TransformOperationArgs } from './types.js';
|
|
5
5
|
import type { IsSupportedOperationConfigArgs } from './types.js';
|
|
6
6
|
import type { MappingModule, PreviewModule } from '../../types/Preview.js';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration arguments for creating operation generator entries.
|
|
9
|
+
*
|
|
10
|
+
* Defines the structure for operation generator configuration including transform functions,
|
|
11
|
+
* enrichment schemas, preview/mapping modules, and support validation.
|
|
12
|
+
*
|
|
13
|
+
* @template EnrichmentType - Type of enrichment data this operation can provide
|
|
14
|
+
* @template Acc - Accumulator type used during operation processing
|
|
15
|
+
*/
|
|
7
16
|
export type ToOperationConfigArgs<EnrichmentType = undefined, Acc = void> = {
|
|
8
17
|
id: string;
|
|
9
18
|
transform: ({ context, operation, acc }: TransformOperationArgs<Acc>) => Acc;
|
|
@@ -13,6 +22,34 @@ export type ToOperationConfigArgs<EnrichmentType = undefined, Acc = void> = {
|
|
|
13
22
|
toMappingModule?: ({ context, operation }: ToOperationMappingArgs) => MappingModule;
|
|
14
23
|
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(operation: OasOperation) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
15
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Creates a configured operation generator entry.
|
|
27
|
+
*
|
|
28
|
+
* Transforms operation configuration arguments into a standardized operation generator entry
|
|
29
|
+
* that can be used within the SKMTC generation pipeline. Provides type-safe operation processing
|
|
30
|
+
* with optional enrichment support and preview capabilities.
|
|
31
|
+
*
|
|
32
|
+
* @template EnrichmentType - Type of enrichment data this operation provides
|
|
33
|
+
* @template Acc - Accumulator type used during operation processing
|
|
34
|
+
* @param config - Configuration object defining operation behavior
|
|
35
|
+
* @returns Configured operation generator entry ready for pipeline integration
|
|
36
|
+
*
|
|
37
|
+
* @example Basic operation entry
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import { toOperationEntry } from '@skmtc/core';
|
|
40
|
+
*
|
|
41
|
+
* const operationEntry = toOperationEntry({
|
|
42
|
+
* id: 'my-operation-generator',
|
|
43
|
+
* transform: ({ context, operation, acc }) => {
|
|
44
|
+
* // Transform operation into desired format
|
|
45
|
+
* return processedOperation;
|
|
46
|
+
* },
|
|
47
|
+
* isSupported: ({ operation }) => {
|
|
48
|
+
* return operation.method === 'POST';
|
|
49
|
+
* }
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
16
53
|
export declare const toOperationEntry: <EnrichmentType = undefined, Acc = void>({ id, transform, toEnrichmentSchema, isSupported, toPreviewModule, toMappingModule, toEnrichmentRequest }: ToOperationConfigArgs<EnrichmentType, Acc>) => {
|
|
17
54
|
id: string;
|
|
18
55
|
type: "operation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationEntry.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAG1E,MAAM,MAAM,qBAAqB,CAAC,cAAc,GAAG,SAAS,EAAE,GAAG,GAAG,IAAI,IAAI;IAC1E,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,sBAAsB,CAAC,GAAG,CAAC,KAAK,GAAG,CAAA;IAC5E,kBAAkB,CAAC,EA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AE,YAAY,KACpB,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,GAAG,SAAS,EAAE,GAAG,GAAG,IAAI,EAAE,2GAQtE,qBAAqB,CAAC,cAAc,EAAE,GAAG,CAAC,KAAG;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,sBAAsB,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC3D,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,KAAK,OAAO,CAAC;IAClE,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,4BAA4B,KAAK,aAAa,CAAC;IAC1F,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,sBAAsB,KAAK,aAAa,CAAC;IACpF,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,SAAS,cAAc,EAC/D,SAAS,EAAE,YAAY,KACpB,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;CA6BzD,CAAA"}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { get } from 'lodash-es';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a configured operation generator entry.
|
|
5
|
+
*
|
|
6
|
+
* Transforms operation configuration arguments into a standardized operation generator entry
|
|
7
|
+
* that can be used within the SKMTC generation pipeline. Provides type-safe operation processing
|
|
8
|
+
* with optional enrichment support and preview capabilities.
|
|
9
|
+
*
|
|
10
|
+
* @template EnrichmentType - Type of enrichment data this operation provides
|
|
11
|
+
* @template Acc - Accumulator type used during operation processing
|
|
12
|
+
* @param config - Configuration object defining operation behavior
|
|
13
|
+
* @returns Configured operation generator entry ready for pipeline integration
|
|
14
|
+
*
|
|
15
|
+
* @example Basic operation entry
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { toOperationEntry } from '@skmtc/core';
|
|
18
|
+
*
|
|
19
|
+
* const operationEntry = toOperationEntry({
|
|
20
|
+
* id: 'my-operation-generator',
|
|
21
|
+
* transform: ({ context, operation, acc }) => {
|
|
22
|
+
* // Transform operation into desired format
|
|
23
|
+
* return processedOperation;
|
|
24
|
+
* },
|
|
25
|
+
* isSupported: ({ operation }) => {
|
|
26
|
+
* return operation.method === 'POST';
|
|
27
|
+
* }
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
3
31
|
export const toOperationEntry = ({ id, transform, toEnrichmentSchema, isSupported, toPreviewModule, toMappingModule, toEnrichmentRequest }) => {
|
|
4
32
|
return {
|
|
5
33
|
id,
|
package/esm/helpers/isEmpty.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../src/helpers/isEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../src/helpers/isEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,KAAG,OAEvC,CAAA"}
|
package/esm/helpers/tracer.d.ts
CHANGED
|
@@ -124,5 +124,5 @@ import type { StackTrail } from '../context/StackTrail.js';
|
|
|
124
124
|
* }
|
|
125
125
|
* ```
|
|
126
126
|
*/
|
|
127
|
-
export declare const tracer: <T>(stackTrail: StackTrail, token: string | string[], fn: () => T,
|
|
127
|
+
export declare const tracer: <T>(stackTrail: StackTrail, token: string | string[], fn: () => T, _log: Logger) => T;
|
|
128
128
|
//# sourceMappingURL=tracer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/helpers/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2HG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EACtB,YAAY,UAAU,EACtB,OAAO,MAAM,GAAG,MAAM,EAAE,EACxB,IAAI,MAAM,CAAC,EACX,
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/helpers/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2HG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EACtB,YAAY,UAAU,EACtB,OAAO,MAAM,GAAG,MAAM,EAAE,EACxB,IAAI,MAAM,CAAC,EACX,MAAM,MAAM,MAgBb,CAAA"}
|
package/esm/helpers/tracer.js
CHANGED
package/esm/mod.d.ts
CHANGED
|
@@ -69,11 +69,15 @@ export * from './app/validate.js';
|
|
|
69
69
|
export * from './context/CoreContext.js';
|
|
70
70
|
export * from './context/GenerateContext.js';
|
|
71
71
|
export * from './context/ParseContext.js';
|
|
72
|
+
export * from './context/RenderContext.js';
|
|
73
|
+
export * from './context/types.js';
|
|
72
74
|
export * from './dsl/constants.js';
|
|
73
75
|
export * from './dsl/ContentBase.js';
|
|
74
76
|
export * from './dsl/ContentSettings.js';
|
|
75
77
|
export * from './dsl/Definition.js';
|
|
76
78
|
export * from './dsl/EntityType.js';
|
|
79
|
+
export * from './dsl/File.js';
|
|
80
|
+
export * from './dsl/JsonFile.js';
|
|
77
81
|
export * from './dsl/GeneratedValueList.js';
|
|
78
82
|
export * from './dsl/Identifier.js';
|
|
79
83
|
export * from './dsl/Import.js';
|
|
@@ -99,25 +103,71 @@ export * from './helpers/refFns.js';
|
|
|
99
103
|
export * from './helpers/strings.js';
|
|
100
104
|
export * from './helpers/parseModuleName.js';
|
|
101
105
|
export * from './helpers/toResolvedArtifactPath.js';
|
|
106
|
+
export * from './context/StackTrail.js';
|
|
102
107
|
export * from './oas/array/Array.js';
|
|
108
|
+
export * from './oas/array/array-types.js';
|
|
109
|
+
export * from './oas/array/toArray.js';
|
|
103
110
|
export * from './oas/boolean/Boolean.js';
|
|
111
|
+
export * from './oas/boolean/boolean-types.js';
|
|
112
|
+
export * from './oas/boolean/toBoolean.js';
|
|
104
113
|
export * from './oas/components/Components.js';
|
|
114
|
+
export * from './oas/components/components-types.js';
|
|
115
|
+
export * from './oas/contact/Contact.js';
|
|
116
|
+
export * from './oas/contact/contact-types.js';
|
|
105
117
|
export * from './oas/discriminator/Discriminator.js';
|
|
118
|
+
export * from './oas/discriminator/discriminator-types.js';
|
|
106
119
|
export * from './oas/document/Document.js';
|
|
120
|
+
export * from './oas/document/document-types.js';
|
|
121
|
+
export * from './oas/example/Example.js';
|
|
122
|
+
export * from './oas/example/example-types.js';
|
|
123
|
+
export * from './oas/header/Header.js';
|
|
124
|
+
export * from './oas/header/header-types.js';
|
|
107
125
|
export * from './oas/info/Info.js';
|
|
126
|
+
export * from './oas/info/info-types.js';
|
|
127
|
+
export * from './oas/license/License.js';
|
|
128
|
+
export * from './oas/license/license-types.js';
|
|
129
|
+
export * from './oas/mediaType/MediaType.js';
|
|
130
|
+
export * from './oas/mediaType/mediaType-types.js';
|
|
108
131
|
export * from './oas/integer/Integer.js';
|
|
132
|
+
export * from './oas/integer/integer-types.js';
|
|
133
|
+
export * from './oas/integer/toInteger.js';
|
|
109
134
|
export * from './oas/number/Number.js';
|
|
135
|
+
export * from './oas/number/number-types.js';
|
|
136
|
+
export * from './oas/number/toNumber.js';
|
|
110
137
|
export * from './oas/object/Object.js';
|
|
138
|
+
export * from './oas/object/object-types.js';
|
|
139
|
+
export * from './oas/object/toObject.js';
|
|
111
140
|
export * from './oas/operation/Operation.js';
|
|
141
|
+
export * from './oas/operation/operation-types.js';
|
|
112
142
|
export * from './oas/parameter/Parameter.js';
|
|
143
|
+
export * from './oas/parameter/parameter-types.js';
|
|
144
|
+
export * from './oas/pathItem/PathItem.js';
|
|
145
|
+
export * from './oas/pathItem/pathItem-types.js';
|
|
113
146
|
export * from './oas/ref/Ref.js';
|
|
147
|
+
export * from './oas/ref/ref-types.js';
|
|
148
|
+
export * from './oas/ref/toRefV31.js';
|
|
114
149
|
export * from './oas/requestBody/RequestBody.js';
|
|
150
|
+
export * from './oas/requestBody/requestBody-types.js';
|
|
115
151
|
export * from './oas/response/Response.js';
|
|
152
|
+
export * from './oas/response/response-types.js';
|
|
116
153
|
export * from './oas/schema/Schema.js';
|
|
154
|
+
export * from './oas/schema/schema-types.js';
|
|
155
|
+
export * from './oas/schema/toSchemasV3.js';
|
|
156
|
+
export * from './oas/securityRequirement/SecurityRequirement.js';
|
|
157
|
+
export * from './oas/securitySchemes/SecurityScheme.js';
|
|
158
|
+
export * from './oas/server/Server.js';
|
|
159
|
+
export * from './oas/serverVariable/ServerVariable.js';
|
|
117
160
|
export * from './oas/string/String.js';
|
|
161
|
+
export * from './oas/string/string-types.js';
|
|
162
|
+
export * from './oas/string/toString.js';
|
|
118
163
|
export * from './oas/tag/Tag.js';
|
|
164
|
+
export * from './oas/tag/tag-types.js';
|
|
119
165
|
export * from './oas/union/Union.js';
|
|
166
|
+
export * from './oas/union/union-types.js';
|
|
167
|
+
export * from './oas/union/toUnion.js';
|
|
120
168
|
export * from './oas/unknown/Unknown.js';
|
|
169
|
+
export * from './oas/unknown/unknown-types.js';
|
|
170
|
+
export * from './oas/unknown/toUnknown.js';
|
|
121
171
|
export * from './oas/void/Void.js';
|
|
122
172
|
export * from './run/toArtifacts.js';
|
|
123
173
|
export * from './run/toV3JsonDocument.js';
|
|
@@ -128,6 +178,7 @@ export * from './types/Enrichments.js';
|
|
|
128
178
|
export * from './types/GeneratedValue.js';
|
|
129
179
|
export * from './types/GeneratorKeys.js';
|
|
130
180
|
export * from './types/GeneratorType.js';
|
|
181
|
+
export * from './types/Logger.js';
|
|
131
182
|
export * from './types/Manifest.js';
|
|
132
183
|
export * from './types/Method.js';
|
|
133
184
|
export * from './types/Modifiers.js';
|
|
@@ -135,6 +186,7 @@ export * from './types/ModuleExport.js';
|
|
|
135
186
|
export * from './types/PrettierConfig.js';
|
|
136
187
|
export * from './types/Preview.js';
|
|
137
188
|
export * from './types/RefName.js';
|
|
189
|
+
export * from './types/Results.js';
|
|
138
190
|
export * from './types/Settings.js';
|
|
139
191
|
export * from './types/TypeSystem.js';
|
|
140
192
|
export * from './typescript/FunctionParameter.js';
|
package/esm/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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