@skmtc/core 0.0.593 → 0.0.595
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/oas/string/String.d.ts +2 -2
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/string-types.d.ts +13 -1
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/string-types.js +32 -15
- package/esm/run/transform.d.ts.map +1 -1
- package/esm/run/transform.js +7 -1
- package/esm/types/Manifest.d.ts +10 -10
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +2 -2
- package/esm/types/SchemaOptions.d.ts +58 -0
- package/esm/types/SchemaOptions.d.ts.map +1 -1
- package/esm/types/SchemaOptions.js +34 -0
- package/package.json +1 -1
- package/script/oas/string/String.d.ts +2 -2
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/string-types.d.ts +13 -1
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/string-types.js +32 -15
- package/script/run/transform.d.ts.map +1 -1
- package/script/run/transform.js +7 -1
- package/script/types/Manifest.d.ts +10 -10
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +1 -1
- package/script/types/SchemaOptions.d.ts +58 -0
- package/script/types/SchemaOptions.d.ts.map +1 -1
- package/script/types/SchemaOptions.js +35 -1
|
@@ -6,7 +6,7 @@ export type StringFields = {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
format?: string;
|
|
9
|
-
enums?: string[];
|
|
9
|
+
enums?: (string | null)[];
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
minLength?: number;
|
|
12
12
|
nullable?: boolean;
|
|
@@ -41,7 +41,7 @@ export declare class OasString {
|
|
|
41
41
|
/**
|
|
42
42
|
* An array of allowed values for the string.
|
|
43
43
|
*/
|
|
44
|
-
enums: string[] | undefined;
|
|
44
|
+
enums: (string | null)[] | undefined;
|
|
45
45
|
/**
|
|
46
46
|
* The maximum length of the string.
|
|
47
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,qBAAa,SAAS;IACpB;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,WAAoB;IACxB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B;;OAEG;IACH,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,CAAA;IACpC;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACpD,gCAAgC;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;gBAEf,MAAM,EAAE,YAAY;IAgBhC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAKxB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CAa5E"}
|
|
@@ -3,6 +3,18 @@ export declare const stringFormat: z.ZodEnum<["date-time", "time", "date", "dura
|
|
|
3
3
|
export declare const oasStringData: z.ZodType<OasStringData>;
|
|
4
4
|
export type StringFormat = 'date-time' | 'time' | 'date' | 'duration' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uuid' | 'uri' | 'regex' | 'password' | 'byte' | 'binary';
|
|
5
5
|
export type OasStringData = {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
default?: string;
|
|
9
|
+
type: 'string';
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
minLength?: number;
|
|
12
|
+
pattern?: string;
|
|
13
|
+
enum?: (string | null)[];
|
|
14
|
+
format?: string;
|
|
15
|
+
nullable: true;
|
|
16
|
+
example?: string;
|
|
17
|
+
} | {
|
|
6
18
|
title?: string;
|
|
7
19
|
description?: string;
|
|
8
20
|
default?: string;
|
|
@@ -12,7 +24,7 @@ export type OasStringData = {
|
|
|
12
24
|
pattern?: string;
|
|
13
25
|
enum?: string[];
|
|
14
26
|
format?: string;
|
|
15
|
-
nullable?:
|
|
27
|
+
nullable?: false;
|
|
16
28
|
example?: string;
|
|
17
29
|
};
|
|
18
30
|
//# sourceMappingURL=string-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,YAAY,iJAevB,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,YAAY,iJAevB,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CA+BjD,CAAA;AAEF,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,QAAQ,CAAA;AAEZ,MAAM,MAAM,aAAa,GACrB;IACE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GACD;IACE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -15,18 +15,35 @@ export const stringFormat = z.enum([
|
|
|
15
15
|
'byte',
|
|
16
16
|
'binary'
|
|
17
17
|
]);
|
|
18
|
-
export const oasStringData = z
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
export const oasStringData = z.union([
|
|
19
|
+
z
|
|
20
|
+
.object({
|
|
21
|
+
type: z.literal('string'),
|
|
22
|
+
title: z.string().optional(),
|
|
23
|
+
description: z.string().optional(),
|
|
24
|
+
default: z.string().optional(),
|
|
25
|
+
maxLength: z.number().optional(),
|
|
26
|
+
minLength: z.number().optional(),
|
|
27
|
+
pattern: z.string().optional(),
|
|
28
|
+
enum: z.array(z.union([z.string(), z.null()])).optional(),
|
|
29
|
+
format: z.string().optional(),
|
|
30
|
+
nullable: z.literal(true),
|
|
31
|
+
example: z.string().optional().catch(undefined)
|
|
32
|
+
})
|
|
33
|
+
.passthrough(),
|
|
34
|
+
z
|
|
35
|
+
.object({
|
|
36
|
+
type: z.literal('string'),
|
|
37
|
+
title: z.string().optional(),
|
|
38
|
+
description: z.string().optional(),
|
|
39
|
+
default: z.string().optional(),
|
|
40
|
+
maxLength: z.number().optional(),
|
|
41
|
+
minLength: z.number().optional(),
|
|
42
|
+
pattern: z.string().optional(),
|
|
43
|
+
enum: z.array(z.string()).optional(),
|
|
44
|
+
format: z.string().optional(),
|
|
45
|
+
nullable: z.literal(false).optional(),
|
|
46
|
+
example: z.string().optional().catch(undefined)
|
|
47
|
+
})
|
|
48
|
+
.passthrough()
|
|
49
|
+
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/run/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,SAAS,qGASnB,aAAa;;;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/run/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,SAAS,qGASnB,aAAa;;;CA8Bf,CAAA"}
|
package/esm/run/transform.js
CHANGED
|
@@ -11,7 +11,13 @@ export const transform = ({ traceId, spanId, documentObject, settings, prettier,
|
|
|
11
11
|
const manifest = {
|
|
12
12
|
files,
|
|
13
13
|
previews,
|
|
14
|
-
schemaOptions
|
|
14
|
+
schemaOptions: schemaOptions.map(schemaOption => ({
|
|
15
|
+
...schemaOption,
|
|
16
|
+
matchBy: {
|
|
17
|
+
schema: schemaOption.matchBy.schema.toJsonSchema({ resolve: true }),
|
|
18
|
+
name: schemaOption.matchBy.name
|
|
19
|
+
}
|
|
20
|
+
})),
|
|
15
21
|
traceId,
|
|
16
22
|
spanId,
|
|
17
23
|
results,
|
package/esm/types/Manifest.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import "../_dnt.polyfills.js";
|
|
|
2
2
|
import { z } from '@hono/zod-openapi';
|
|
3
3
|
import { type ResultsItem } from './Results.js';
|
|
4
4
|
import { type Preview } from './Preview.js';
|
|
5
|
-
import { type
|
|
5
|
+
import { type SerializedSchemaOption } from './SchemaOptions.js';
|
|
6
6
|
export type ManifestEntry = {
|
|
7
7
|
lines: number;
|
|
8
8
|
characters: number;
|
|
@@ -45,7 +45,7 @@ export type ManifestContent = {
|
|
|
45
45
|
results: ResultsItem;
|
|
46
46
|
startAt: number;
|
|
47
47
|
endAt: number;
|
|
48
|
-
schemaOptions:
|
|
48
|
+
schemaOptions: SerializedSchemaOption[];
|
|
49
49
|
};
|
|
50
50
|
export declare const manifestContent: z.ZodObject<{
|
|
51
51
|
deploymentId: z.ZodString;
|
|
@@ -176,23 +176,23 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
176
176
|
schemaOptions: z.ZodArray<z.ZodObject<{
|
|
177
177
|
type: z.ZodEnum<["input", "formatter"]>;
|
|
178
178
|
name: z.ZodString;
|
|
179
|
+
exportPath: z.ZodString;
|
|
179
180
|
matchBy: z.ZodObject<{
|
|
180
|
-
schema: z.
|
|
181
|
+
schema: z.ZodType<import("./SchemaOptions.js").SerializedSchema, z.ZodTypeDef, import("./SchemaOptions.js").SerializedSchema>;
|
|
181
182
|
name: z.ZodOptional<z.ZodString>;
|
|
182
183
|
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
schema:
|
|
184
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
184
185
|
name?: string | undefined;
|
|
185
186
|
}, {
|
|
186
|
-
schema:
|
|
187
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
187
188
|
name?: string | undefined;
|
|
188
189
|
}>;
|
|
189
|
-
exportPath: z.ZodString;
|
|
190
190
|
}, "strip", z.ZodTypeAny, {
|
|
191
191
|
name: string;
|
|
192
192
|
type: "input" | "formatter";
|
|
193
193
|
exportPath: string;
|
|
194
194
|
matchBy: {
|
|
195
|
-
schema:
|
|
195
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
196
196
|
name?: string | undefined;
|
|
197
197
|
};
|
|
198
198
|
}, {
|
|
@@ -200,7 +200,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
200
200
|
type: "input" | "formatter";
|
|
201
201
|
exportPath: string;
|
|
202
202
|
matchBy: {
|
|
203
|
-
schema:
|
|
203
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
204
204
|
name?: string | undefined;
|
|
205
205
|
};
|
|
206
206
|
}>, "many">;
|
|
@@ -246,7 +246,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
246
246
|
type: "input" | "formatter";
|
|
247
247
|
exportPath: string;
|
|
248
248
|
matchBy: {
|
|
249
|
-
schema:
|
|
249
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
250
250
|
name?: string | undefined;
|
|
251
251
|
};
|
|
252
252
|
}[];
|
|
@@ -293,7 +293,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
293
293
|
type: "input" | "formatter";
|
|
294
294
|
exportPath: string;
|
|
295
295
|
matchBy: {
|
|
296
|
-
schema:
|
|
296
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
297
297
|
name?: string | undefined;
|
|
298
298
|
};
|
|
299
299
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/types/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AACnF,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaC,CAAA"}
|
package/esm/types/Manifest.js
CHANGED
|
@@ -2,7 +2,7 @@ import "../_dnt.polyfills.js";
|
|
|
2
2
|
import { z } from '@hono/zod-openapi';
|
|
3
3
|
import { resultsItem, resultsItemJsonSchema } from './Results.js';
|
|
4
4
|
import { preview } from './Preview.js';
|
|
5
|
-
import {
|
|
5
|
+
import { serializedSchemaOption } from './SchemaOptions.js';
|
|
6
6
|
export const manifestEntry = z
|
|
7
7
|
.object({
|
|
8
8
|
lines: z.number(),
|
|
@@ -27,6 +27,6 @@ export const manifestContent = z
|
|
|
27
27
|
results: resultsItem.openapi('ResultsItem', resultsItemJsonSchema),
|
|
28
28
|
startAt: z.number(),
|
|
29
29
|
endAt: z.number(),
|
|
30
|
-
schemaOptions: z.array(
|
|
30
|
+
schemaOptions: z.array(serializedSchemaOption)
|
|
31
31
|
})
|
|
32
32
|
.openapi('ManifestContent');
|
|
@@ -41,4 +41,62 @@ export declare const schemaOption: z.ZodObject<{
|
|
|
41
41
|
name?: string | undefined;
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
|
+
export declare const serializedSchema: z.ZodType<SerializedSchema>;
|
|
45
|
+
export type SerializedSchema = {
|
|
46
|
+
type: 'object';
|
|
47
|
+
properties?: Record<string, SerializedSchema>;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'string';
|
|
50
|
+
} | {
|
|
51
|
+
type: 'number';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'boolean';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'array';
|
|
56
|
+
items: SerializedSchema;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'integer';
|
|
59
|
+
} | {
|
|
60
|
+
type: 'boolean';
|
|
61
|
+
};
|
|
62
|
+
export declare const serializedSchemaOption: z.ZodObject<{
|
|
63
|
+
type: z.ZodEnum<["input", "formatter"]>;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
exportPath: z.ZodString;
|
|
66
|
+
matchBy: z.ZodObject<{
|
|
67
|
+
schema: z.ZodType<SerializedSchema, z.ZodTypeDef, SerializedSchema>;
|
|
68
|
+
name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
schema: SerializedSchema;
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
schema: SerializedSchema;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
name: string;
|
|
78
|
+
type: "input" | "formatter";
|
|
79
|
+
exportPath: string;
|
|
80
|
+
matchBy: {
|
|
81
|
+
schema: SerializedSchema;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
name: string;
|
|
86
|
+
type: "input" | "formatter";
|
|
87
|
+
exportPath: string;
|
|
88
|
+
matchBy: {
|
|
89
|
+
schema: SerializedSchema;
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
export type SerializedSchemaOption = {
|
|
94
|
+
type: 'input' | 'formatter';
|
|
95
|
+
name: string;
|
|
96
|
+
exportPath: string;
|
|
97
|
+
matchBy: {
|
|
98
|
+
schema: SerializedSchema;
|
|
99
|
+
name?: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
44
102
|
//# sourceMappingURL=SchemaOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaOptions.d.ts","sourceRoot":"","sources":["../../src/types/SchemaOptions.ts"],"names":[],"mappings":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;CACf,GACD;IACE,IAAI,EAAE,QAAQ,CAAA;CACf,GACD;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,GACD;IACE,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,gBAAgB,CAAA;CACxB,GACD;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,GACD;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAEL,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE;QACP,MAAM,EAAE,gBAAgB,CAAA;QACxB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA"}
|
|
@@ -9,3 +9,37 @@ export const schemaOption = z.object({
|
|
|
9
9
|
}),
|
|
10
10
|
exportPath: z.string()
|
|
11
11
|
});
|
|
12
|
+
export const serializedSchema = z.union([
|
|
13
|
+
z.object({
|
|
14
|
+
type: z.literal('object'),
|
|
15
|
+
properties: z.lazy(() => z.record(serializedSchema)).optional()
|
|
16
|
+
}),
|
|
17
|
+
z.object({
|
|
18
|
+
type: z.literal('string')
|
|
19
|
+
}),
|
|
20
|
+
z.object({
|
|
21
|
+
type: z.literal('number')
|
|
22
|
+
}),
|
|
23
|
+
z.object({
|
|
24
|
+
type: z.literal('boolean')
|
|
25
|
+
}),
|
|
26
|
+
z.object({
|
|
27
|
+
type: z.literal('array'),
|
|
28
|
+
items: z.lazy(() => serializedSchema)
|
|
29
|
+
}),
|
|
30
|
+
z.object({
|
|
31
|
+
type: z.literal('integer')
|
|
32
|
+
}),
|
|
33
|
+
z.object({
|
|
34
|
+
type: z.literal('integer')
|
|
35
|
+
})
|
|
36
|
+
]);
|
|
37
|
+
export const serializedSchemaOption = z.object({
|
|
38
|
+
type: z.enum(['input', 'formatter']),
|
|
39
|
+
name: z.string(),
|
|
40
|
+
exportPath: z.string(),
|
|
41
|
+
matchBy: z.object({
|
|
42
|
+
schema: serializedSchema,
|
|
43
|
+
name: z.string().optional()
|
|
44
|
+
})
|
|
45
|
+
});
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export type StringFields = {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
format?: string;
|
|
9
|
-
enums?: string[];
|
|
9
|
+
enums?: (string | null)[];
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
minLength?: number;
|
|
12
12
|
nullable?: boolean;
|
|
@@ -41,7 +41,7 @@ export declare class OasString {
|
|
|
41
41
|
/**
|
|
42
42
|
* An array of allowed values for the string.
|
|
43
43
|
*/
|
|
44
|
-
enums: string[] | undefined;
|
|
44
|
+
enums: (string | null)[] | undefined;
|
|
45
45
|
/**
|
|
46
46
|
* The maximum length of the string.
|
|
47
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAA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EAAE,YAAY;IAgBhC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAKxB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CAa5E"}
|
|
@@ -3,6 +3,18 @@ export declare const stringFormat: z.ZodEnum<["date-time", "time", "date", "dura
|
|
|
3
3
|
export declare const oasStringData: z.ZodType<OasStringData>;
|
|
4
4
|
export type StringFormat = 'date-time' | 'time' | 'date' | 'duration' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uuid' | 'uri' | 'regex' | 'password' | 'byte' | 'binary';
|
|
5
5
|
export type OasStringData = {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
default?: string;
|
|
9
|
+
type: 'string';
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
minLength?: number;
|
|
12
|
+
pattern?: string;
|
|
13
|
+
enum?: (string | null)[];
|
|
14
|
+
format?: string;
|
|
15
|
+
nullable: true;
|
|
16
|
+
example?: string;
|
|
17
|
+
} | {
|
|
6
18
|
title?: string;
|
|
7
19
|
description?: string;
|
|
8
20
|
default?: string;
|
|
@@ -12,7 +24,7 @@ export type OasStringData = {
|
|
|
12
24
|
pattern?: string;
|
|
13
25
|
enum?: string[];
|
|
14
26
|
format?: string;
|
|
15
|
-
nullable?:
|
|
27
|
+
nullable?: false;
|
|
16
28
|
example?: string;
|
|
17
29
|
};
|
|
18
30
|
//# sourceMappingURL=string-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,YAAY,iJAevB,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,YAAY,iJAevB,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CA+BjD,CAAA;AAEF,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,QAAQ,CAAA;AAEZ,MAAM,MAAM,aAAa,GACrB;IACE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GACD;IACE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -18,18 +18,35 @@ exports.stringFormat = zod_openapi_1.z.enum([
|
|
|
18
18
|
'byte',
|
|
19
19
|
'binary'
|
|
20
20
|
]);
|
|
21
|
-
exports.oasStringData = zod_openapi_1.z
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
exports.oasStringData = zod_openapi_1.z.union([
|
|
22
|
+
zod_openapi_1.z
|
|
23
|
+
.object({
|
|
24
|
+
type: zod_openapi_1.z.literal('string'),
|
|
25
|
+
title: zod_openapi_1.z.string().optional(),
|
|
26
|
+
description: zod_openapi_1.z.string().optional(),
|
|
27
|
+
default: zod_openapi_1.z.string().optional(),
|
|
28
|
+
maxLength: zod_openapi_1.z.number().optional(),
|
|
29
|
+
minLength: zod_openapi_1.z.number().optional(),
|
|
30
|
+
pattern: zod_openapi_1.z.string().optional(),
|
|
31
|
+
enum: zod_openapi_1.z.array(zod_openapi_1.z.union([zod_openapi_1.z.string(), zod_openapi_1.z.null()])).optional(),
|
|
32
|
+
format: zod_openapi_1.z.string().optional(),
|
|
33
|
+
nullable: zod_openapi_1.z.literal(true),
|
|
34
|
+
example: zod_openapi_1.z.string().optional().catch(undefined)
|
|
35
|
+
})
|
|
36
|
+
.passthrough(),
|
|
37
|
+
zod_openapi_1.z
|
|
38
|
+
.object({
|
|
39
|
+
type: zod_openapi_1.z.literal('string'),
|
|
40
|
+
title: zod_openapi_1.z.string().optional(),
|
|
41
|
+
description: zod_openapi_1.z.string().optional(),
|
|
42
|
+
default: zod_openapi_1.z.string().optional(),
|
|
43
|
+
maxLength: zod_openapi_1.z.number().optional(),
|
|
44
|
+
minLength: zod_openapi_1.z.number().optional(),
|
|
45
|
+
pattern: zod_openapi_1.z.string().optional(),
|
|
46
|
+
enum: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
47
|
+
format: zod_openapi_1.z.string().optional(),
|
|
48
|
+
nullable: zod_openapi_1.z.literal(false).optional(),
|
|
49
|
+
example: zod_openapi_1.z.string().optional().catch(undefined)
|
|
50
|
+
})
|
|
51
|
+
.passthrough()
|
|
52
|
+
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/run/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,SAAS,qGASnB,aAAa;;;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/run/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,SAAS,qGASnB,aAAa;;;CA8Bf,CAAA"}
|
package/script/run/transform.js
CHANGED
|
@@ -37,7 +37,13 @@ const transform = ({ traceId, spanId, documentObject, settings, prettier, toGene
|
|
|
37
37
|
const manifest = {
|
|
38
38
|
files,
|
|
39
39
|
previews,
|
|
40
|
-
schemaOptions
|
|
40
|
+
schemaOptions: schemaOptions.map(schemaOption => ({
|
|
41
|
+
...schemaOption,
|
|
42
|
+
matchBy: {
|
|
43
|
+
schema: schemaOption.matchBy.schema.toJsonSchema({ resolve: true }),
|
|
44
|
+
name: schemaOption.matchBy.name
|
|
45
|
+
}
|
|
46
|
+
})),
|
|
41
47
|
traceId,
|
|
42
48
|
spanId,
|
|
43
49
|
results,
|
|
@@ -2,7 +2,7 @@ import "../_dnt.polyfills.js";
|
|
|
2
2
|
import { z } from '@hono/zod-openapi';
|
|
3
3
|
import { type ResultsItem } from './Results.js';
|
|
4
4
|
import { type Preview } from './Preview.js';
|
|
5
|
-
import { type
|
|
5
|
+
import { type SerializedSchemaOption } from './SchemaOptions.js';
|
|
6
6
|
export type ManifestEntry = {
|
|
7
7
|
lines: number;
|
|
8
8
|
characters: number;
|
|
@@ -45,7 +45,7 @@ export type ManifestContent = {
|
|
|
45
45
|
results: ResultsItem;
|
|
46
46
|
startAt: number;
|
|
47
47
|
endAt: number;
|
|
48
|
-
schemaOptions:
|
|
48
|
+
schemaOptions: SerializedSchemaOption[];
|
|
49
49
|
};
|
|
50
50
|
export declare const manifestContent: z.ZodObject<{
|
|
51
51
|
deploymentId: z.ZodString;
|
|
@@ -176,23 +176,23 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
176
176
|
schemaOptions: z.ZodArray<z.ZodObject<{
|
|
177
177
|
type: z.ZodEnum<["input", "formatter"]>;
|
|
178
178
|
name: z.ZodString;
|
|
179
|
+
exportPath: z.ZodString;
|
|
179
180
|
matchBy: z.ZodObject<{
|
|
180
|
-
schema: z.
|
|
181
|
+
schema: z.ZodType<import("./SchemaOptions.js").SerializedSchema, z.ZodTypeDef, import("./SchemaOptions.js").SerializedSchema>;
|
|
181
182
|
name: z.ZodOptional<z.ZodString>;
|
|
182
183
|
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
schema:
|
|
184
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
184
185
|
name?: string | undefined;
|
|
185
186
|
}, {
|
|
186
|
-
schema:
|
|
187
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
187
188
|
name?: string | undefined;
|
|
188
189
|
}>;
|
|
189
|
-
exportPath: z.ZodString;
|
|
190
190
|
}, "strip", z.ZodTypeAny, {
|
|
191
191
|
name: string;
|
|
192
192
|
type: "input" | "formatter";
|
|
193
193
|
exportPath: string;
|
|
194
194
|
matchBy: {
|
|
195
|
-
schema:
|
|
195
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
196
196
|
name?: string | undefined;
|
|
197
197
|
};
|
|
198
198
|
}, {
|
|
@@ -200,7 +200,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
200
200
|
type: "input" | "formatter";
|
|
201
201
|
exportPath: string;
|
|
202
202
|
matchBy: {
|
|
203
|
-
schema:
|
|
203
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
204
204
|
name?: string | undefined;
|
|
205
205
|
};
|
|
206
206
|
}>, "many">;
|
|
@@ -246,7 +246,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
246
246
|
type: "input" | "formatter";
|
|
247
247
|
exportPath: string;
|
|
248
248
|
matchBy: {
|
|
249
|
-
schema:
|
|
249
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
250
250
|
name?: string | undefined;
|
|
251
251
|
};
|
|
252
252
|
}[];
|
|
@@ -293,7 +293,7 @@ export declare const manifestContent: z.ZodObject<{
|
|
|
293
293
|
type: "input" | "formatter";
|
|
294
294
|
exportPath: string;
|
|
295
295
|
matchBy: {
|
|
296
|
-
schema:
|
|
296
|
+
schema: import("./SchemaOptions.js").SerializedSchema;
|
|
297
297
|
name?: string | undefined;
|
|
298
298
|
};
|
|
299
299
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/types/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AACnF,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/types/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AACnF,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,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|
|
30
30
|
results: Results_js_1.resultsItem.openapi('ResultsItem', Results_js_1.resultsItemJsonSchema),
|
|
31
31
|
startAt: zod_openapi_1.z.number(),
|
|
32
32
|
endAt: zod_openapi_1.z.number(),
|
|
33
|
-
schemaOptions: zod_openapi_1.z.array(SchemaOptions_js_1.
|
|
33
|
+
schemaOptions: zod_openapi_1.z.array(SchemaOptions_js_1.serializedSchemaOption)
|
|
34
34
|
})
|
|
35
35
|
.openapi('ManifestContent');
|
|
@@ -41,4 +41,62 @@ export declare const schemaOption: z.ZodObject<{
|
|
|
41
41
|
name?: string | undefined;
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
|
+
export declare const serializedSchema: z.ZodType<SerializedSchema>;
|
|
45
|
+
export type SerializedSchema = {
|
|
46
|
+
type: 'object';
|
|
47
|
+
properties?: Record<string, SerializedSchema>;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'string';
|
|
50
|
+
} | {
|
|
51
|
+
type: 'number';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'boolean';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'array';
|
|
56
|
+
items: SerializedSchema;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'integer';
|
|
59
|
+
} | {
|
|
60
|
+
type: 'boolean';
|
|
61
|
+
};
|
|
62
|
+
export declare const serializedSchemaOption: z.ZodObject<{
|
|
63
|
+
type: z.ZodEnum<["input", "formatter"]>;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
exportPath: z.ZodString;
|
|
66
|
+
matchBy: z.ZodObject<{
|
|
67
|
+
schema: z.ZodType<SerializedSchema, z.ZodTypeDef, SerializedSchema>;
|
|
68
|
+
name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
schema: SerializedSchema;
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
schema: SerializedSchema;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
name: string;
|
|
78
|
+
type: "input" | "formatter";
|
|
79
|
+
exportPath: string;
|
|
80
|
+
matchBy: {
|
|
81
|
+
schema: SerializedSchema;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
name: string;
|
|
86
|
+
type: "input" | "formatter";
|
|
87
|
+
exportPath: string;
|
|
88
|
+
matchBy: {
|
|
89
|
+
schema: SerializedSchema;
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
export type SerializedSchemaOption = {
|
|
94
|
+
type: 'input' | 'formatter';
|
|
95
|
+
name: string;
|
|
96
|
+
exportPath: string;
|
|
97
|
+
matchBy: {
|
|
98
|
+
schema: SerializedSchema;
|
|
99
|
+
name?: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
44
102
|
//# sourceMappingURL=SchemaOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaOptions.d.ts","sourceRoot":"","sources":["../../src/types/SchemaOptions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,GAAG,WAAW,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE;QACP,MAAM,EAAE,SAAS,CAAA;QACjB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"SchemaOptions.d.ts","sourceRoot":"","sources":["../../src/types/SchemaOptions.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EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schemaOption = void 0;
|
|
3
|
+
exports.serializedSchemaOption = exports.serializedSchema = exports.schemaOption = void 0;
|
|
4
4
|
require("../_dnt.polyfills.js");
|
|
5
5
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
6
6
|
exports.schemaOption = zod_openapi_1.z.object({
|
|
@@ -12,3 +12,37 @@ exports.schemaOption = zod_openapi_1.z.object({
|
|
|
12
12
|
}),
|
|
13
13
|
exportPath: zod_openapi_1.z.string()
|
|
14
14
|
});
|
|
15
|
+
exports.serializedSchema = zod_openapi_1.z.union([
|
|
16
|
+
zod_openapi_1.z.object({
|
|
17
|
+
type: zod_openapi_1.z.literal('object'),
|
|
18
|
+
properties: zod_openapi_1.z.lazy(() => zod_openapi_1.z.record(exports.serializedSchema)).optional()
|
|
19
|
+
}),
|
|
20
|
+
zod_openapi_1.z.object({
|
|
21
|
+
type: zod_openapi_1.z.literal('string')
|
|
22
|
+
}),
|
|
23
|
+
zod_openapi_1.z.object({
|
|
24
|
+
type: zod_openapi_1.z.literal('number')
|
|
25
|
+
}),
|
|
26
|
+
zod_openapi_1.z.object({
|
|
27
|
+
type: zod_openapi_1.z.literal('boolean')
|
|
28
|
+
}),
|
|
29
|
+
zod_openapi_1.z.object({
|
|
30
|
+
type: zod_openapi_1.z.literal('array'),
|
|
31
|
+
items: zod_openapi_1.z.lazy(() => exports.serializedSchema)
|
|
32
|
+
}),
|
|
33
|
+
zod_openapi_1.z.object({
|
|
34
|
+
type: zod_openapi_1.z.literal('integer')
|
|
35
|
+
}),
|
|
36
|
+
zod_openapi_1.z.object({
|
|
37
|
+
type: zod_openapi_1.z.literal('integer')
|
|
38
|
+
})
|
|
39
|
+
]);
|
|
40
|
+
exports.serializedSchemaOption = zod_openapi_1.z.object({
|
|
41
|
+
type: zod_openapi_1.z.enum(['input', 'formatter']),
|
|
42
|
+
name: zod_openapi_1.z.string(),
|
|
43
|
+
exportPath: zod_openapi_1.z.string(),
|
|
44
|
+
matchBy: zod_openapi_1.z.object({
|
|
45
|
+
schema: exports.serializedSchema,
|
|
46
|
+
name: zod_openapi_1.z.string().optional()
|
|
47
|
+
})
|
|
48
|
+
});
|