@skmtc/core 0.0.418 → 0.0.420
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.map +1 -1
- package/esm/context/CoreContext.js +3 -5
- package/esm/context/GenerateContext.d.ts +0 -1
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +9 -22
- package/esm/context/RenderContext.d.ts +1 -3
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +1 -9
- package/esm/dsl/File.d.ts +10 -7
- package/esm/dsl/File.d.ts.map +1 -1
- package/esm/dsl/File.js +18 -32
- package/esm/oas/string/String.d.ts +13 -2
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +20 -0
- package/esm/oas/string/string-types.d.ts +7 -2
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/string-types.js +27 -23
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +5 -1
- package/esm/types/Settings.d.ts +33 -5
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +6 -3
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +3 -5
- package/script/context/GenerateContext.d.ts +0 -1
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +9 -22
- package/script/context/RenderContext.d.ts +1 -3
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +1 -9
- package/script/dsl/File.d.ts +10 -7
- package/script/dsl/File.d.ts.map +1 -1
- package/script/dsl/File.js +18 -32
- package/script/oas/string/String.d.ts +13 -2
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +20 -0
- package/script/oas/string/string-types.d.ts +7 -2
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/string-types.js +27 -23
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +5 -1
- package/script/types/Settings.d.ts +33 -5
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +7 -4
|
@@ -2,31 +2,35 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.oasStringData = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const stringFormat = zod_1.z.enum([
|
|
6
|
+
'date-time',
|
|
7
|
+
'time',
|
|
8
|
+
'date',
|
|
9
|
+
'duration',
|
|
10
|
+
'email',
|
|
11
|
+
'hostname',
|
|
12
|
+
'ipv4',
|
|
13
|
+
'ipv6',
|
|
14
|
+
'uuid',
|
|
15
|
+
'uri',
|
|
16
|
+
'regex',
|
|
17
|
+
'password'
|
|
18
|
+
// 'byte',
|
|
19
|
+
// 'binary'
|
|
20
|
+
]);
|
|
21
|
+
exports.oasStringData = zod_1.z
|
|
22
|
+
.object({
|
|
6
23
|
oasType: zod_1.z.literal('schema'),
|
|
24
|
+
type: zod_1.z.literal('string'),
|
|
7
25
|
title: zod_1.z.string().optional(),
|
|
8
26
|
description: zod_1.z.string().optional(),
|
|
9
27
|
default: zod_1.z.string().optional(),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// maxLength: z.number().optional(),
|
|
13
|
-
// minLength: z.number().optional(),
|
|
28
|
+
maxLength: zod_1.z.number().optional(),
|
|
29
|
+
minLength: zod_1.z.number().optional(),
|
|
14
30
|
pattern: zod_1.z.string().optional(),
|
|
15
|
-
|
|
16
|
-
format:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'duration',
|
|
22
|
-
'email',
|
|
23
|
-
'hostname',
|
|
24
|
-
'ipv4',
|
|
25
|
-
'ipv6',
|
|
26
|
-
'uuid',
|
|
27
|
-
'uri',
|
|
28
|
-
'regex',
|
|
29
|
-
'binary'
|
|
30
|
-
])
|
|
31
|
-
.optional()
|
|
32
|
-
});
|
|
31
|
+
enum: zod_1.z.array(zod_1.z.string()).optional(),
|
|
32
|
+
format: stringFormat.optional(),
|
|
33
|
+
nullable: zod_1.z.boolean().optional(),
|
|
34
|
+
example: zod_1.z.string().optional()
|
|
35
|
+
})
|
|
36
|
+
.passthrough();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA2B3D,CAAA"}
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toString = void 0;
|
|
4
4
|
const String_js_1 = require("./String.js");
|
|
5
5
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
6
|
+
const string_types_js_1 = require("./string-types.js");
|
|
6
7
|
const toString = ({ value, context }) => {
|
|
7
|
-
const { type: _type, title, description, enum: enums, nullable, example, ...skipped } = value;
|
|
8
|
+
const { type: _type, title, description, enum: enums, nullable, example, format, maxLength, minLength, ...skipped } = string_types_js_1.oasStringData.parse(value);
|
|
8
9
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
|
|
9
10
|
return new String_js_1.OasString({
|
|
10
11
|
title,
|
|
@@ -12,6 +13,9 @@ const toString = ({ value, context }) => {
|
|
|
12
13
|
enums,
|
|
13
14
|
nullable,
|
|
14
15
|
example,
|
|
16
|
+
format,
|
|
17
|
+
maxLength,
|
|
18
|
+
minLength,
|
|
15
19
|
extensionFields
|
|
16
20
|
});
|
|
17
21
|
};
|
|
@@ -3,7 +3,6 @@ import { type Method } from './Method.js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
export declare const baseSettings: z.ZodType<BaseSettings>;
|
|
5
5
|
export type BaseSettings = {
|
|
6
|
-
moduleName?: string;
|
|
7
6
|
parentExportPath?: string;
|
|
8
7
|
exportPath?: string;
|
|
9
8
|
selected: boolean;
|
|
@@ -94,9 +93,32 @@ export declare const clientGeneratorSettings: z.ZodUnion<[z.ZodObject<{
|
|
|
94
93
|
exportPath?: string | undefined;
|
|
95
94
|
}>]>;
|
|
96
95
|
export type ClientGeneratorSettings = OperationsGeneratorSettings | ModelsGeneratorSettings;
|
|
96
|
+
export declare const modulePackage: z.ZodObject<{
|
|
97
|
+
rootPath: z.ZodString;
|
|
98
|
+
moduleName: z.ZodString;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
rootPath: string;
|
|
101
|
+
moduleName: string;
|
|
102
|
+
}, {
|
|
103
|
+
rootPath: string;
|
|
104
|
+
moduleName: string;
|
|
105
|
+
}>;
|
|
106
|
+
export type ModulePackage = {
|
|
107
|
+
rootPath: string;
|
|
108
|
+
moduleName: string;
|
|
109
|
+
};
|
|
97
110
|
export declare const clientSettings: z.ZodObject<{
|
|
98
111
|
basePath: z.ZodOptional<z.ZodString>;
|
|
99
|
-
|
|
112
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
113
|
+
rootPath: z.ZodString;
|
|
114
|
+
moduleName: z.ZodString;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
rootPath: string;
|
|
117
|
+
moduleName: string;
|
|
118
|
+
}, {
|
|
119
|
+
rootPath: string;
|
|
120
|
+
moduleName: string;
|
|
121
|
+
}>, "many">>;
|
|
100
122
|
generators: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
101
123
|
id: z.ZodString;
|
|
102
124
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -145,7 +167,10 @@ export declare const clientSettings: z.ZodObject<{
|
|
|
145
167
|
exportPath?: string | undefined;
|
|
146
168
|
})[];
|
|
147
169
|
basePath?: string | undefined;
|
|
148
|
-
|
|
170
|
+
packages?: {
|
|
171
|
+
rootPath: string;
|
|
172
|
+
moduleName: string;
|
|
173
|
+
}[] | undefined;
|
|
149
174
|
}, {
|
|
150
175
|
generators: ({
|
|
151
176
|
id: string;
|
|
@@ -160,11 +185,14 @@ export declare const clientSettings: z.ZodObject<{
|
|
|
160
185
|
exportPath?: string | undefined;
|
|
161
186
|
})[];
|
|
162
187
|
basePath?: string | undefined;
|
|
163
|
-
|
|
188
|
+
packages?: {
|
|
189
|
+
rootPath: string;
|
|
190
|
+
moduleName: string;
|
|
191
|
+
}[] | undefined;
|
|
164
192
|
}>;
|
|
165
193
|
export type ClientSettings = {
|
|
166
194
|
basePath?: string;
|
|
167
|
-
|
|
195
|
+
packages?: ModulePackage[];
|
|
168
196
|
generators: ClientGeneratorSettings[];
|
|
169
197
|
};
|
|
170
198
|
export type SkmtcClientConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAU,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,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
3
|
-
exports.skmtcStackConfig = exports.generatorType = exports.skmtcClientConfig = exports.clientSettings = exports.clientGeneratorSettings = exports.modelsGeneratorSettings = exports.operationsGeneratorSettings = exports.baseSettings = void 0;
|
|
3
|
+
exports.skmtcStackConfig = exports.generatorType = exports.skmtcClientConfig = exports.clientSettings = exports.modulePackage = exports.clientGeneratorSettings = exports.modelsGeneratorSettings = exports.operationsGeneratorSettings = exports.baseSettings = void 0;
|
|
4
4
|
require("../_dnt.polyfills.js");
|
|
5
5
|
const Method_js_1 = require("./Method.js");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -9,8 +9,7 @@ exports.baseSettings = zod_1.z.object({
|
|
|
9
9
|
name: zod_1.z.string().optional(),
|
|
10
10
|
importFrom: zod_1.z.string().optional(),
|
|
11
11
|
exportPath: zod_1.z.string().optional(),
|
|
12
|
-
parentExportPath: zod_1.z.string().optional()
|
|
13
|
-
moduleName: zod_1.z.string().optional()
|
|
12
|
+
parentExportPath: zod_1.z.string().optional()
|
|
14
13
|
});
|
|
15
14
|
exports.operationsGeneratorSettings = zod_1.z.object({
|
|
16
15
|
id: zod_1.z.string(),
|
|
@@ -29,9 +28,13 @@ exports.clientGeneratorSettings = zod_1.z.union([
|
|
|
29
28
|
exports.operationsGeneratorSettings,
|
|
30
29
|
exports.modelsGeneratorSettings
|
|
31
30
|
]);
|
|
31
|
+
exports.modulePackage = zod_1.z.object({
|
|
32
|
+
rootPath: zod_1.z.string(),
|
|
33
|
+
moduleName: zod_1.z.string()
|
|
34
|
+
});
|
|
32
35
|
exports.clientSettings = zod_1.z.object({
|
|
33
36
|
basePath: zod_1.z.string().optional(),
|
|
34
|
-
|
|
37
|
+
packages: zod_1.z.array(exports.modulePackage).optional(),
|
|
35
38
|
generators: zod_1.z.array(exports.clientGeneratorSettings)
|
|
36
39
|
});
|
|
37
40
|
exports.skmtcClientConfig = zod_1.z.object({
|