@skmtc/core 0.0.799 → 0.0.802
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 +0 -3
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +12 -17
- package/esm/context/GenerateContext.d.ts +35 -3
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +21 -1
- package/esm/context/ParseContext.d.ts +64 -3
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +61 -0
- package/esm/context/RenderContext.d.ts +151 -2
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +185 -11
- package/esm/context/ResultsHandler.d.ts +10 -3
- package/esm/context/ResultsHandler.d.ts.map +1 -1
- 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/model/types.d.ts +51 -4
- package/esm/dsl/model/types.d.ts.map +1 -1
- 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 +48 -0
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +49 -1
- package/esm/dsl/operation/types.d.ts +61 -3
- package/esm/dsl/operation/types.d.ts.map +1 -1
- 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 +51 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +51 -0
- package/esm/oas/array/array-types.d.ts +20 -11
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +10 -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-types.d.ts +1 -7
- package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
- 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/operation/Operation.d.ts +47 -2
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +43 -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-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/ref/Ref.d.ts +49 -2
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +28 -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/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 +104 -5
- package/esm/typescript/List.d.ts.map +1 -1
- package/esm/typescript/List.js +75 -0
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +0 -3
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +12 -17
- package/script/context/GenerateContext.d.ts +35 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +21 -1
- package/script/context/ParseContext.d.ts +64 -3
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +61 -0
- package/script/context/RenderContext.d.ts +151 -2
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +185 -11
- package/script/context/ResultsHandler.d.ts +10 -3
- package/script/context/ResultsHandler.d.ts.map +1 -1
- 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/model/types.d.ts +51 -4
- package/script/dsl/model/types.d.ts.map +1 -1
- 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 +48 -0
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +49 -1
- package/script/dsl/operation/types.d.ts +61 -3
- package/script/dsl/operation/types.d.ts.map +1 -1
- 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 +51 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +51 -0
- package/script/oas/array/array-types.d.ts +20 -11
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +11 -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-types.d.ts +1 -7
- package/script/oas/boolean/boolean-types.d.ts.map +1 -1
- 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/operation/Operation.d.ts +47 -2
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +43 -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-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/ref/Ref.d.ts +49 -2
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +28 -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/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 +104 -5
- package/script/typescript/List.d.ts.map +1 -1
- package/script/typescript/List.js +75 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unknown-types.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/unknown-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"unknown-types.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/unknown-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAMzD,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,kDAAkD;IAClD,OAAO,EAAE,QAAQ,CAAA;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA"}
|
|
@@ -33,6 +33,12 @@ export type Mapping = {
|
|
|
33
33
|
module: MappingModule;
|
|
34
34
|
source: OperationSource | ModelSource;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Valibot schema for validating operation source objects.
|
|
38
|
+
*
|
|
39
|
+
* Validates operation source structures including type, generator ID,
|
|
40
|
+
* operation path, and HTTP method information.
|
|
41
|
+
*/
|
|
36
42
|
export declare const operationSource: v.ObjectSchema<{
|
|
37
43
|
readonly type: v.LiteralSchema<'operation', undefined>;
|
|
38
44
|
readonly generatorId: v.StringSchema<undefined>;
|
|
@@ -48,14 +54,45 @@ export declare const operationSource: v.ObjectSchema<{
|
|
|
48
54
|
v.LiteralSchema<'trace', undefined>
|
|
49
55
|
], undefined>;
|
|
50
56
|
}, undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Valibot schema for validating model source objects.
|
|
59
|
+
*
|
|
60
|
+
* Validates model source structures including type, generator ID,
|
|
61
|
+
* and reference name information.
|
|
62
|
+
*/
|
|
51
63
|
export declare const modelSource: v.ObjectSchema<{
|
|
52
64
|
readonly type: v.LiteralSchema<'model', undefined>;
|
|
53
65
|
readonly generatorId: v.StringSchema<undefined>;
|
|
54
66
|
readonly refName: v.StringSchema<undefined>;
|
|
55
67
|
}, undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Valibot schema for validating preview group values.
|
|
70
|
+
*
|
|
71
|
+
* Validates preview group categories for UI organization.
|
|
72
|
+
*/
|
|
56
73
|
export declare const previewGroup: v.GenericSchema<PreviewGroup>;
|
|
74
|
+
/**
|
|
75
|
+
* Valibot schema for validating preview module objects.
|
|
76
|
+
*
|
|
77
|
+
* Validates preview module structures including group, title, and description.
|
|
78
|
+
*/
|
|
57
79
|
export declare const previewModule: v.GenericSchema<PreviewModule>;
|
|
80
|
+
/**
|
|
81
|
+
* Valibot schema for validating mapping module objects.
|
|
82
|
+
*
|
|
83
|
+
* Validates mapping module structures for file relationship tracking.
|
|
84
|
+
*/
|
|
58
85
|
export declare const mappingModule: v.GenericSchema<MappingModule>;
|
|
86
|
+
/**
|
|
87
|
+
* Valibot schema for validating preview objects.
|
|
88
|
+
*
|
|
89
|
+
* Validates complete preview structures including module and source information.
|
|
90
|
+
*/
|
|
59
91
|
export declare const preview: v.GenericSchema<Preview>;
|
|
92
|
+
/**
|
|
93
|
+
* Valibot schema for validating mapping objects.
|
|
94
|
+
*
|
|
95
|
+
* Validates complete mapping structures including module and source information.
|
|
96
|
+
*/
|
|
60
97
|
export declare const mapping: v.GenericSchema<Mapping>;
|
|
61
98
|
//# sourceMappingURL=Preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../src/types/Preview.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,QAAQ,EAAE,OAAO,GAAG,WAAW,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,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;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,YAAY,CACtC;IACE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IAClD,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IAC/C,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;CAC5C,EACD,SAAS,CAKT,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAA6C,CAAA;AAEpG;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAIvD,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAMvD,CAAA;AAKF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAG3C,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAG3C,CAAA"}
|
package/script/types/Preview.js
CHANGED
|
@@ -37,23 +37,50 @@ exports.mapping = exports.preview = exports.mappingModule = exports.previewModul
|
|
|
37
37
|
require("../_dnt.polyfills.js");
|
|
38
38
|
const Method_js_1 = require("./Method.js");
|
|
39
39
|
const v = __importStar(require("valibot"));
|
|
40
|
+
/**
|
|
41
|
+
* Valibot schema for validating operation source objects.
|
|
42
|
+
*
|
|
43
|
+
* Validates operation source structures including type, generator ID,
|
|
44
|
+
* operation path, and HTTP method information.
|
|
45
|
+
*/
|
|
40
46
|
exports.operationSource = v.object({
|
|
41
47
|
type: v.literal('operation'),
|
|
42
48
|
generatorId: v.string(),
|
|
43
49
|
operationPath: v.string(),
|
|
44
50
|
operationMethod: Method_js_1.method
|
|
45
51
|
});
|
|
52
|
+
/**
|
|
53
|
+
* Valibot schema for validating model source objects.
|
|
54
|
+
*
|
|
55
|
+
* Validates model source structures including type, generator ID,
|
|
56
|
+
* and reference name information.
|
|
57
|
+
*/
|
|
46
58
|
exports.modelSource = v.object({
|
|
47
59
|
type: v.literal('model'),
|
|
48
60
|
generatorId: v.string(),
|
|
49
61
|
refName: v.string()
|
|
50
62
|
});
|
|
63
|
+
/**
|
|
64
|
+
* Valibot schema for validating preview group values.
|
|
65
|
+
*
|
|
66
|
+
* Validates preview group categories for UI organization.
|
|
67
|
+
*/
|
|
51
68
|
exports.previewGroup = v.picklist(['forms', 'tables', 'inputs']);
|
|
69
|
+
/**
|
|
70
|
+
* Valibot schema for validating preview module objects.
|
|
71
|
+
*
|
|
72
|
+
* Validates preview module structures including group, title, and description.
|
|
73
|
+
*/
|
|
52
74
|
exports.previewModule = v.object({
|
|
53
75
|
name: v.string(),
|
|
54
76
|
exportPath: v.string(),
|
|
55
77
|
group: exports.previewGroup
|
|
56
78
|
});
|
|
79
|
+
/**
|
|
80
|
+
* Valibot schema for validating mapping module objects.
|
|
81
|
+
*
|
|
82
|
+
* Validates mapping module structures for file relationship tracking.
|
|
83
|
+
*/
|
|
57
84
|
exports.mappingModule = v.object({
|
|
58
85
|
name: v.string(),
|
|
59
86
|
exportPath: v.string(),
|
|
@@ -62,10 +89,20 @@ exports.mappingModule = v.object({
|
|
|
62
89
|
schema: v.string()
|
|
63
90
|
});
|
|
64
91
|
const source = v.variant('type', [exports.operationSource, exports.modelSource]);
|
|
92
|
+
/**
|
|
93
|
+
* Valibot schema for validating preview objects.
|
|
94
|
+
*
|
|
95
|
+
* Validates complete preview structures including module and source information.
|
|
96
|
+
*/
|
|
65
97
|
exports.preview = v.object({
|
|
66
98
|
module: exports.previewModule,
|
|
67
99
|
source: source
|
|
68
100
|
});
|
|
101
|
+
/**
|
|
102
|
+
* Valibot schema for validating mapping objects.
|
|
103
|
+
*
|
|
104
|
+
* Validates complete mapping structures including module and source information.
|
|
105
|
+
*/
|
|
69
106
|
exports.mapping = v.object({
|
|
70
107
|
module: exports.mappingModule,
|
|
71
108
|
source: source
|
|
@@ -32,9 +32,30 @@ export type ModulePackage = {
|
|
|
32
32
|
/** Optional module name for package.json or imports */
|
|
33
33
|
moduleName?: string;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Valibot schema for validating skip paths configuration.
|
|
37
|
+
*
|
|
38
|
+
* Validates path-to-methods mappings for skipping specific operations.
|
|
39
|
+
*/
|
|
35
40
|
export declare const skipPaths: v.GenericSchema<SkipPaths>;
|
|
41
|
+
/**
|
|
42
|
+
* Valibot schema for validating skip operations configuration.
|
|
43
|
+
*
|
|
44
|
+
* Validates generator-to-skip-paths mappings for skipping operations by generator.
|
|
45
|
+
*/
|
|
36
46
|
export declare const skipOperations: v.GenericSchema<SkipOperations>;
|
|
47
|
+
/**
|
|
48
|
+
* Valibot schema for validating skip models configuration.
|
|
49
|
+
*
|
|
50
|
+
* Validates generator-to-model-names mappings for skipping specific models.
|
|
51
|
+
*/
|
|
37
52
|
export declare const skipModels: v.GenericSchema<SkipModels>;
|
|
53
|
+
/**
|
|
54
|
+
* Valibot schema for validating client settings configuration.
|
|
55
|
+
*
|
|
56
|
+
* Validates the complete client settings structure including base paths,
|
|
57
|
+
* packages, skip configurations, and enrichments.
|
|
58
|
+
*/
|
|
38
59
|
export declare const clientSettings: v.GenericSchema<ClientSettings>;
|
|
39
60
|
/**
|
|
40
61
|
* Configuration for skipping specific HTTP methods on API paths.
|
|
@@ -150,9 +171,23 @@ export type ClientSettings = {
|
|
|
150
171
|
/** Array of skip configurations to exclude content */
|
|
151
172
|
skip?: Skip[];
|
|
152
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* Configuration for SKMTC client with optional project identification.
|
|
176
|
+
*
|
|
177
|
+
* Extends client settings with an optional project key for multi-project
|
|
178
|
+
* environments or organizational contexts.
|
|
179
|
+
*/
|
|
153
180
|
export type SkmtcClientConfig = {
|
|
181
|
+
/** Optional project identifier for organizational contexts */
|
|
154
182
|
projectKey?: string;
|
|
183
|
+
/** Client settings for customizing generation behavior */
|
|
155
184
|
settings: ClientSettings;
|
|
156
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Valibot schema for validating SKMTC client configuration.
|
|
188
|
+
*
|
|
189
|
+
* Validates the complete client configuration including project key
|
|
190
|
+
* and client settings structure.
|
|
191
|
+
*/
|
|
157
192
|
export declare const skmtcClientConfig: v.GenericSchema<SkmtcClientConfig>;
|
|
158
193
|
//# sourceMappingURL=Settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AAEjD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAGvD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,CAAyC,CAAA;AAE1F,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAAmC,CAAA;AAE9F,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,CAA6C,CAAA;AAIhG,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAKzD,CAAA;AAEF;;;;;;;;;;;;;GAaG;AAC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EAAE,IAAI,EAAE,CAAA;CACd,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,cAAc,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAG/D,CAAA"}
|
package/script/types/Settings.js
CHANGED
|
@@ -45,16 +45,43 @@ exports.modulePackage = v.object({
|
|
|
45
45
|
rootPath: v.string(),
|
|
46
46
|
moduleName: v.optional(v.string())
|
|
47
47
|
});
|
|
48
|
+
/**
|
|
49
|
+
* Valibot schema for validating skip paths configuration.
|
|
50
|
+
*
|
|
51
|
+
* Validates path-to-methods mappings for skipping specific operations.
|
|
52
|
+
*/
|
|
48
53
|
exports.skipPaths = v.record(v.string(), v.array(Method_js_1.method));
|
|
54
|
+
/**
|
|
55
|
+
* Valibot schema for validating skip operations configuration.
|
|
56
|
+
*
|
|
57
|
+
* Validates generator-to-skip-paths mappings for skipping operations by generator.
|
|
58
|
+
*/
|
|
49
59
|
exports.skipOperations = v.record(v.string(), exports.skipPaths);
|
|
60
|
+
/**
|
|
61
|
+
* Valibot schema for validating skip models configuration.
|
|
62
|
+
*
|
|
63
|
+
* Validates generator-to-model-names mappings for skipping specific models.
|
|
64
|
+
*/
|
|
50
65
|
exports.skipModels = v.record(v.string(), v.array(v.string()));
|
|
51
66
|
const skip = v.union([exports.skipOperations, exports.skipModels, v.string()]);
|
|
67
|
+
/**
|
|
68
|
+
* Valibot schema for validating client settings configuration.
|
|
69
|
+
*
|
|
70
|
+
* Validates the complete client settings structure including base paths,
|
|
71
|
+
* packages, skip configurations, and enrichments.
|
|
72
|
+
*/
|
|
52
73
|
exports.clientSettings = v.object({
|
|
53
74
|
basePath: v.optional(v.string()),
|
|
54
75
|
packages: v.optional(v.array(exports.modulePackage)),
|
|
55
76
|
enrichments: v.optional(Enrichments_js_1.generatorEnrichments),
|
|
56
77
|
skip: v.optional(v.array(skip))
|
|
57
78
|
});
|
|
79
|
+
/**
|
|
80
|
+
* Valibot schema for validating SKMTC client configuration.
|
|
81
|
+
*
|
|
82
|
+
* Validates the complete client configuration including project key
|
|
83
|
+
* and client settings structure.
|
|
84
|
+
*/
|
|
58
85
|
exports.skmtcClientConfig = v.object({
|
|
59
86
|
projectKey: v.optional(v.string()),
|
|
60
87
|
settings: exports.clientSettings
|
|
@@ -19,17 +19,17 @@ type FunctionParameterArgs = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Union type representing the different parameter configurations.
|
|
21
21
|
*/
|
|
22
|
-
type ParameterProperties = VoidParameter | DestructuredParameter | RegularParameter;
|
|
22
|
+
export type ParameterProperties = VoidParameter | DestructuredParameter | RegularParameter;
|
|
23
23
|
/**
|
|
24
24
|
* Represents a void parameter (no parameters).
|
|
25
25
|
*/
|
|
26
|
-
type VoidParameter = {
|
|
26
|
+
export type VoidParameter = {
|
|
27
27
|
type: 'void';
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Represents a destructured object parameter.
|
|
31
31
|
*/
|
|
32
|
-
type DestructuredParameter = {
|
|
32
|
+
export type DestructuredParameter = {
|
|
33
33
|
type: 'destructured';
|
|
34
34
|
typeDefinition: Definition<TypeSystemObject>;
|
|
35
35
|
required: true;
|
|
@@ -37,7 +37,7 @@ type DestructuredParameter = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Represents a regular named parameter.
|
|
39
39
|
*/
|
|
40
|
-
type RegularParameter = {
|
|
40
|
+
export type RegularParameter = {
|
|
41
41
|
type: 'regular';
|
|
42
42
|
name: string;
|
|
43
43
|
typeDefinition: Definition<TypeSystemValue>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionParameter.d.ts","sourceRoot":"","sources":["../../src/typescript/FunctionParameter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,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
|
skipEmpty?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Type alias for creating key-value pair lists.
|
|
16
|
+
*
|
|
17
|
+
* Creates a List specialized for key-value pairs with colon separator
|
|
18
|
+
* and no bookends (e.g., "key1: value1, key2: value2").
|
|
19
|
+
*
|
|
20
|
+
* @template Key - Type of the keys (must be stringable)
|
|
21
|
+
* @template Value - Type of the values (must be stringable)
|
|
22
|
+
*/
|
|
14
23
|
export type ListKeyValue<Key extends Stringable, Value extends Stringable> = List<[
|
|
15
24
|
Key,
|
|
16
25
|
Value
|
|
17
26
|
], ': ', 'none'>;
|
|
18
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Type representing the different bookend styles for lists.
|
|
29
|
+
*/
|
|
30
|
+
export type BookendsType = '[]' | '{}' | '()' | '<>' | 'none';
|
|
19
31
|
type ConstructorOptions<Separator extends string = ', ', Bookends extends BookendsType = 'none'> = {
|
|
20
32
|
separator?: Separator;
|
|
21
33
|
bookends?: Bookends;
|
|
22
34
|
skipEmpty?: boolean;
|
|
23
35
|
};
|
|
24
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Utility type to extract the item type from an array type.
|
|
38
|
+
*/
|
|
39
|
+
export type ExtractArrayItem<ArrayOf> = ArrayOf extends Array<infer Item> ? Item : never;
|
|
25
40
|
type ToFilteredKeyValueReturn<Value extends undefined | Stringable | Stringable[] | List> = Value extends undefined ? undefined : List<[string, Stringable | Stringable[] | List], ': ', 'none'>;
|
|
26
41
|
type ToConditionalReturn<Value extends Stringable, Condition extends boolean> = Condition extends true ? List<[Value], ', ', 'none'> : List<never[], ', ', 'none'>;
|
|
27
42
|
/**
|
|
@@ -136,6 +151,14 @@ export declare class List<Values extends Stringable[] = Stringable[], Separator
|
|
|
136
151
|
* ```
|
|
137
152
|
*/
|
|
138
153
|
constructor(values: (ExtractArrayItem<Values> | undefined)[], { separator, bookends, skipEmpty }?: ConstructorOptions<Separator, Bookends>);
|
|
154
|
+
/**
|
|
155
|
+
* Converts the list to its string representation.
|
|
156
|
+
*
|
|
157
|
+
* Joins all values with the configured separator and wraps with bookends.
|
|
158
|
+
* Returns empty string if skipEmpty is enabled and list is empty.
|
|
159
|
+
*
|
|
160
|
+
* @returns Formatted string representation of the list
|
|
161
|
+
*/
|
|
139
162
|
toString(): string;
|
|
140
163
|
/**
|
|
141
164
|
* Create an empty List that will render as an empty string ''
|
|
@@ -241,22 +264,98 @@ export declare class List<Values extends Stringable[] = Stringable[], Separator
|
|
|
241
264
|
*/
|
|
242
265
|
static hasValue: (value: undefined | Stringable | Stringable[] | List) => value is Stringable | Stringable[] | List;
|
|
243
266
|
}
|
|
244
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Mapping function type for transforming keys into values.
|
|
269
|
+
*/
|
|
270
|
+
export type KeyMapFn<V extends Stringable> = (key: string, index: number) => V;
|
|
271
|
+
/**
|
|
272
|
+
* Utility class for working with arrays of string keys.
|
|
273
|
+
*
|
|
274
|
+
* Provides methods for transforming key arrays into objects and lists
|
|
275
|
+
* with custom mapping functions.
|
|
276
|
+
*/
|
|
245
277
|
export declare class KeyList {
|
|
278
|
+
/** Array of string keys */
|
|
246
279
|
keys: string[];
|
|
280
|
+
/**
|
|
281
|
+
* Creates a new KeyList instance.
|
|
282
|
+
*
|
|
283
|
+
* @param keys - Array of string keys to work with
|
|
284
|
+
*/
|
|
247
285
|
constructor(keys: string[]);
|
|
286
|
+
/**
|
|
287
|
+
* Transforms keys into an object using a mapping function.
|
|
288
|
+
*
|
|
289
|
+
* @param mapFn - Function to transform each key into a value
|
|
290
|
+
* @param options - Options for handling empty values
|
|
291
|
+
* @returns Object with keys mapped to transformed values
|
|
292
|
+
*/
|
|
248
293
|
toObject<V extends Stringable>(mapFn: KeyMapFn<V>, { skipEmpty }?: SkipEmptyOption): ListObject<V>;
|
|
294
|
+
/**
|
|
295
|
+
* Creates a plain object with keys as both keys and values.
|
|
296
|
+
*
|
|
297
|
+
* @returns Object where each key maps to itself
|
|
298
|
+
*/
|
|
249
299
|
toObjectPlain(): ListObject<string>;
|
|
300
|
+
/**
|
|
301
|
+
* Transforms keys into a List using a mapping function.
|
|
302
|
+
*
|
|
303
|
+
* @param mapFn - Function to transform each key into a value
|
|
304
|
+
* @returns List containing the transformed values
|
|
305
|
+
*/
|
|
250
306
|
toLines<V extends Stringable>(mapFn: KeyMapFn<V>): ListLines<V>;
|
|
307
|
+
/**
|
|
308
|
+
* Creates a List with keys as the values.
|
|
309
|
+
*
|
|
310
|
+
* @returns List containing the original keys
|
|
311
|
+
*/
|
|
251
312
|
toLinesPlain(): ListLines<string>;
|
|
252
313
|
}
|
|
253
|
-
|
|
254
|
-
|
|
314
|
+
/**
|
|
315
|
+
* Type representing a key-value pair entry.
|
|
316
|
+
*/
|
|
317
|
+
export type Entry<T extends Stringable> = [key: string, value: T];
|
|
318
|
+
/**
|
|
319
|
+
* Mapping function type for transforming entries.
|
|
320
|
+
*/
|
|
321
|
+
export type EntryMapFn<T extends Stringable, V extends Stringable> = (entry: Entry<T>, index: number) => V | undefined;
|
|
322
|
+
/**
|
|
323
|
+
* Utility class for working with arrays of key-value pair entries.
|
|
324
|
+
*
|
|
325
|
+
* Provides methods for transforming entry arrays into objects and lists
|
|
326
|
+
* with custom mapping functions.
|
|
327
|
+
*
|
|
328
|
+
* @template T - Type of the entry values
|
|
329
|
+
*/
|
|
255
330
|
export declare class EntryList<T extends Stringable> {
|
|
331
|
+
/** Array of key-value pair entries */
|
|
256
332
|
entries: Entry<T>[];
|
|
333
|
+
/**
|
|
334
|
+
* Creates a new EntryList instance.
|
|
335
|
+
*
|
|
336
|
+
* @param entries - Array of key-value pair entries to work with
|
|
337
|
+
*/
|
|
257
338
|
constructor(entries: Entry<T>[]);
|
|
339
|
+
/**
|
|
340
|
+
* Transforms entries into an object using a mapping function.
|
|
341
|
+
*
|
|
342
|
+
* @param mapFn - Function to transform each entry into a value
|
|
343
|
+
* @returns Object with transformed values
|
|
344
|
+
*/
|
|
258
345
|
toObject<V extends Stringable>(mapFn: EntryMapFn<T, V>): ListObject<V>;
|
|
346
|
+
/**
|
|
347
|
+
* Transforms entries into a List using a mapping function.
|
|
348
|
+
*
|
|
349
|
+
* @param mapFn - Function to transform each entry into a value
|
|
350
|
+
* @returns List containing the transformed values
|
|
351
|
+
*/
|
|
259
352
|
toLines<V extends Stringable>(mapFn: EntryMapFn<T, V>): ListLines<V>;
|
|
353
|
+
/**
|
|
354
|
+
* Transforms entries into an array using a mapping function.
|
|
355
|
+
*
|
|
356
|
+
* @param mapFn - Function to transform each entry into a value
|
|
357
|
+
* @returns Array containing the transformed values
|
|
358
|
+
*/
|
|
260
359
|
toArray<V extends Stringable>(mapFn: EntryMapFn<T, V>): ListArray<V>;
|
|
261
360
|
}
|
|
262
361
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/typescript/List.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGtD,4EAA4E;AAC5E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEpE,2DAA2D;AAC3D,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AAErE,8EAA8E;AAC9E,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEnE,gFAAgF;AAChF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEpE,kDAAkD;AAClD,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,CAAC,EAAE,O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f,KAAK,EAAE,MAAM,KACV,CAAC,GAAG,SAAS,CAAA;AAElB;;;;;;;GAOG;AACH,qBAAa,SAAS,CAAC,CAAC,SAAS,UAAU;IACzC,sCAAsC;IACtC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAEnB;;;;OAIG;gBACS,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;IAI/B;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAItE;;;;;OAKG;IACH,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAIpE;;;;;OAKG;IACH,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;CAGrE"}
|
|
@@ -139,6 +139,14 @@ class List {
|
|
|
139
139
|
this.bookends = bookends ?? 'none';
|
|
140
140
|
this.skipEmpty = skipEmpty ?? false;
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Converts the list to its string representation.
|
|
144
|
+
*
|
|
145
|
+
* Joins all values with the configured separator and wraps with bookends.
|
|
146
|
+
* Returns empty string if skipEmpty is enabled and list is empty.
|
|
147
|
+
*
|
|
148
|
+
* @returns Formatted string representation of the list
|
|
149
|
+
*/
|
|
142
150
|
toString() {
|
|
143
151
|
if (this.skipEmpty && this.values.length === 0) {
|
|
144
152
|
return '';
|
|
@@ -381,8 +389,20 @@ Object.defineProperty(List, "hasValue", {
|
|
|
381
389
|
return true;
|
|
382
390
|
}
|
|
383
391
|
});
|
|
392
|
+
/**
|
|
393
|
+
* Utility class for working with arrays of string keys.
|
|
394
|
+
*
|
|
395
|
+
* Provides methods for transforming key arrays into objects and lists
|
|
396
|
+
* with custom mapping functions.
|
|
397
|
+
*/
|
|
384
398
|
class KeyList {
|
|
399
|
+
/**
|
|
400
|
+
* Creates a new KeyList instance.
|
|
401
|
+
*
|
|
402
|
+
* @param keys - Array of string keys to work with
|
|
403
|
+
*/
|
|
385
404
|
constructor(keys) {
|
|
405
|
+
/** Array of string keys */
|
|
386
406
|
Object.defineProperty(this, "keys", {
|
|
387
407
|
enumerable: true,
|
|
388
408
|
configurable: true,
|
|
@@ -391,22 +411,59 @@ class KeyList {
|
|
|
391
411
|
});
|
|
392
412
|
this.keys = keys;
|
|
393
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Transforms keys into an object using a mapping function.
|
|
416
|
+
*
|
|
417
|
+
* @param mapFn - Function to transform each key into a value
|
|
418
|
+
* @param options - Options for handling empty values
|
|
419
|
+
* @returns Object with keys mapped to transformed values
|
|
420
|
+
*/
|
|
394
421
|
toObject(mapFn, { skipEmpty } = {}) {
|
|
395
422
|
return List.toObject(this.keys.map((key, index) => mapFn(key, index)), { skipEmpty });
|
|
396
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* Creates a plain object with keys as both keys and values.
|
|
426
|
+
*
|
|
427
|
+
* @returns Object where each key maps to itself
|
|
428
|
+
*/
|
|
397
429
|
toObjectPlain() {
|
|
398
430
|
return List.toObject(this.keys);
|
|
399
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Transforms keys into a List using a mapping function.
|
|
434
|
+
*
|
|
435
|
+
* @param mapFn - Function to transform each key into a value
|
|
436
|
+
* @returns List containing the transformed values
|
|
437
|
+
*/
|
|
400
438
|
toLines(mapFn) {
|
|
401
439
|
return List.toLines(this.keys.map((key, index) => mapFn(key, index)));
|
|
402
440
|
}
|
|
441
|
+
/**
|
|
442
|
+
* Creates a List with keys as the values.
|
|
443
|
+
*
|
|
444
|
+
* @returns List containing the original keys
|
|
445
|
+
*/
|
|
403
446
|
toLinesPlain() {
|
|
404
447
|
return List.toLines(this.keys);
|
|
405
448
|
}
|
|
406
449
|
}
|
|
407
450
|
exports.KeyList = KeyList;
|
|
451
|
+
/**
|
|
452
|
+
* Utility class for working with arrays of key-value pair entries.
|
|
453
|
+
*
|
|
454
|
+
* Provides methods for transforming entry arrays into objects and lists
|
|
455
|
+
* with custom mapping functions.
|
|
456
|
+
*
|
|
457
|
+
* @template T - Type of the entry values
|
|
458
|
+
*/
|
|
408
459
|
class EntryList {
|
|
460
|
+
/**
|
|
461
|
+
* Creates a new EntryList instance.
|
|
462
|
+
*
|
|
463
|
+
* @param entries - Array of key-value pair entries to work with
|
|
464
|
+
*/
|
|
409
465
|
constructor(entries) {
|
|
466
|
+
/** Array of key-value pair entries */
|
|
410
467
|
Object.defineProperty(this, "entries", {
|
|
411
468
|
enumerable: true,
|
|
412
469
|
configurable: true,
|
|
@@ -415,12 +472,30 @@ class EntryList {
|
|
|
415
472
|
});
|
|
416
473
|
this.entries = entries;
|
|
417
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* Transforms entries into an object using a mapping function.
|
|
477
|
+
*
|
|
478
|
+
* @param mapFn - Function to transform each entry into a value
|
|
479
|
+
* @returns Object with transformed values
|
|
480
|
+
*/
|
|
418
481
|
toObject(mapFn) {
|
|
419
482
|
return List.toObject(this.entries.map((entry, index) => mapFn(entry, index)));
|
|
420
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Transforms entries into a List using a mapping function.
|
|
486
|
+
*
|
|
487
|
+
* @param mapFn - Function to transform each entry into a value
|
|
488
|
+
* @returns List containing the transformed values
|
|
489
|
+
*/
|
|
421
490
|
toLines(mapFn) {
|
|
422
491
|
return List.toLines(this.entries.map((key, index) => mapFn(key, index)));
|
|
423
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* Transforms entries into an array using a mapping function.
|
|
495
|
+
*
|
|
496
|
+
* @param mapFn - Function to transform each entry into a value
|
|
497
|
+
* @returns Array containing the transformed values
|
|
498
|
+
*/
|
|
424
499
|
toArray(mapFn) {
|
|
425
500
|
return List.toArray(this.entries.map((entry, index) => mapFn(entry, index)));
|
|
426
501
|
}
|