@power-plant/schema 0.0.3 → 0.0.5
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/dist/codegen.cjs +77 -1
- package/dist/codegen.d.cts +1 -1
- package/dist/codegen.d.mts +1 -1
- package/dist/codegen.mjs +78 -1
- package/dist/codegen.mjs.map +1 -0
- package/dist/constants-CwyhgVEl.cjs +1 -0
- package/dist/constants-lk1mMbgx.mjs +2 -0
- package/dist/constants-lk1mMbgx.mjs.map +1 -0
- package/dist/helpers-B5sr5S3X.cjs +1 -0
- package/dist/helpers-Bh_V7xwV.mjs +2 -0
- package/dist/helpers-Bh_V7xwV.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +616 -31
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +616 -31
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -0
- package/dist/{types.d.cts → types-BawP3FVI.d.mts} +81 -180
- package/dist/types-BawP3FVI.d.mts.map +1 -0
- package/dist/{types.d.mts → types-BmNamqlM.d.cts} +80 -179
- package/dist/types-BmNamqlM.d.cts.map +1 -0
- package/dist/valibot.cjs +1 -0
- package/dist/valibot.d.cts +14 -0
- package/dist/valibot.d.cts.map +1 -0
- package/dist/valibot.d.mts +14 -0
- package/dist/valibot.d.mts.map +1 -0
- package/dist/valibot.mjs +2 -0
- package/dist/valibot.mjs.map +1 -0
- package/dist/zod.cjs +1 -0
- package/dist/zod.d.cts +14 -0
- package/dist/zod.d.cts.map +1 -0
- package/dist/zod.d.mts +14 -0
- package/dist/zod.d.mts.map +1 -0
- package/dist/zod.mjs +2 -0
- package/dist/zod.mjs.map +1 -0
- package/package.json +26 -91
- package/dist/constants-u7ovYS9e.d.cts +0 -31
- package/dist/constants-u7ovYS9e.d.cts.map +0 -1
- package/dist/constants-u7ovYS9e.d.mts +0 -31
- package/dist/constants-u7ovYS9e.d.mts.map +0 -1
- package/dist/constants.cjs +0 -1
- package/dist/constants.d.cts +0 -2
- package/dist/constants.d.mts +0 -2
- package/dist/constants.mjs +0 -2
- package/dist/constants.mjs.map +0 -1
- package/dist/extract.cjs +0 -1
- package/dist/extract.d.cts +0 -143
- package/dist/extract.d.cts.map +0 -1
- package/dist/extract.d.mts +0 -143
- package/dist/extract.d.mts.map +0 -1
- package/dist/extract.mjs +0 -2
- package/dist/extract.mjs.map +0 -1
- package/dist/helpers.cjs +0 -1
- package/dist/helpers.d.cts +0 -134
- package/dist/helpers.d.cts.map +0 -1
- package/dist/helpers.d.mts +0 -134
- package/dist/helpers.d.mts.map +0 -1
- package/dist/helpers.mjs +0 -1
- package/dist/metadata-CsY3HrP2.cjs +0 -77
- package/dist/metadata-DIEpQjbq.mjs +0 -78
- package/dist/metadata-DIEpQjbq.mjs.map +0 -1
- package/dist/metadata.cjs +0 -1
- package/dist/metadata.d.cts +0 -94
- package/dist/metadata.d.cts.map +0 -1
- package/dist/metadata.d.mts +0 -94
- package/dist/metadata.d.mts.map +0 -1
- package/dist/metadata.mjs +0 -1
- package/dist/type-checks.cjs +0 -1
- package/dist/type-checks.d.cts +0 -331
- package/dist/type-checks.d.cts.map +0 -1
- package/dist/type-checks.d.mts +0 -331
- package/dist/type-checks.d.mts.map +0 -1
- package/dist/type-checks.mjs +0 -2
- package/dist/type-checks.mjs.map +0 -1
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts.map +0 -1
- package/dist/types.mjs +0 -1
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import { n as JSON_SCHEMA_PRIMITIVE_TYPES, r as JSON_SCHEMA_TYPES } from "./constants-u7ovYS9e.mjs";
|
|
2
1
|
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
|
-
import { InferLoadOptions,
|
|
4
|
-
import {
|
|
5
|
-
import { InputObject, Schema as Schema$1 } from "untyped";
|
|
2
|
+
import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
|
|
3
|
+
import { InputObject, Schema } from "untyped";
|
|
6
4
|
import { BaseIssue, BaseSchema } from "valibot";
|
|
7
5
|
import * as z3 from "zod/v3";
|
|
8
6
|
|
|
7
|
+
//#region src/constants.d.ts
|
|
8
|
+
declare const JsonSchemaTypeNames: {
|
|
9
|
+
readonly STRING: "string";
|
|
10
|
+
readonly NUMBER: "number";
|
|
11
|
+
readonly INTEGER: "integer";
|
|
12
|
+
readonly BOOLEAN: "boolean";
|
|
13
|
+
readonly NULL: "null";
|
|
14
|
+
readonly OBJECT: "object";
|
|
15
|
+
readonly ARRAY: "array";
|
|
16
|
+
};
|
|
17
|
+
declare const JSON_SCHEMA_PRIMITIVE_TYPES: readonly ["string", "number", "integer", "boolean", "null"];
|
|
18
|
+
declare const JSON_SCHEMA_TYPES: readonly ["string", "number", "integer", "boolean", "null", "array", "object"];
|
|
19
|
+
declare const JSON_SCHEMA_METADATA_KEYS: ("$id" | "$schema" | "$vocabulary" | "$comment" | "$anchor" | "$defs" | "$dynamicRef" | "$dynamicAnchor" | "name" | "version" | "title" | "description" | "docs" | "examples" | "alias" | "tags" | "deprecated" | "hidden" | "ignore" | "internal" | "runtime" | "readOnly" | "writeOnly")[];
|
|
20
|
+
/**
|
|
21
|
+
* Keywords whose values are a flat record of named JSON Schema fragments.
|
|
22
|
+
* Each child schema is merged recursively with its counterpart.
|
|
23
|
+
*/
|
|
24
|
+
declare const SCHEMA_RECORD_KEYWORDS: Set<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Keywords whose value is a single JSON Schema fragment that should be
|
|
27
|
+
* recursively merged when both sides define it.
|
|
28
|
+
*/
|
|
29
|
+
declare const SCHEMA_SINGLE_KEYWORDS: Set<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Keywords whose values are arrays of JSON Schema fragments that should be
|
|
32
|
+
* concatenated (rather than overridden) during a merge.
|
|
33
|
+
*/
|
|
34
|
+
declare const SCHEMA_ARRAY_CONCAT_KEYWORDS: Set<string>;
|
|
35
|
+
//#endregion
|
|
9
36
|
//#region src/types.d.ts
|
|
10
37
|
/**
|
|
11
38
|
* Primitive JSON Schema `type` keyword values.
|
|
@@ -110,7 +137,7 @@ interface JsonSchemaMetadataKeywords {
|
|
|
110
137
|
/**
|
|
111
138
|
* A title for the schema, which can be used by documentation tools or other libraries that support this feature to provide a human-readable name or description for the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
|
|
112
139
|
*/
|
|
113
|
-
|
|
140
|
+
title?: string;
|
|
114
141
|
/**
|
|
115
142
|
* A description for the schema, which can be used by documentation tools or other libraries that support this feature to provide a human-readable explanation or summary of the schema's purpose and usage. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
|
|
116
143
|
*/
|
|
@@ -1128,19 +1155,19 @@ type SchemaSourceVariant = "standard-schema" | "json-schema" | "zod3" | "untyped
|
|
|
1128
1155
|
/**
|
|
1129
1156
|
* Accepted schema input variants, including raw type definitions.
|
|
1130
1157
|
*/
|
|
1131
|
-
type
|
|
1158
|
+
type SchemaConfigVariant = SchemaSourceVariant | "file-reference";
|
|
1132
1159
|
/**
|
|
1133
1160
|
* Alias for the Untyped object-input schema shape.
|
|
1134
1161
|
*/
|
|
1135
|
-
type
|
|
1162
|
+
type UntypedConfigObject = InputObject;
|
|
1136
1163
|
/**
|
|
1137
1164
|
* Alias for the Untyped schema document shape.
|
|
1138
1165
|
*/
|
|
1139
|
-
type UntypedSchema = Schema
|
|
1166
|
+
type UntypedSchema = Schema;
|
|
1140
1167
|
/**
|
|
1141
1168
|
* A Valibot schema instance.
|
|
1142
1169
|
*
|
|
1143
|
-
* @template
|
|
1170
|
+
* @template TConfig - The raw input type accepted by the schema.
|
|
1144
1171
|
* @template TOutput - The parsed output type produced by the schema.
|
|
1145
1172
|
* @template TIssue - The issue type emitted for validation errors.
|
|
1146
1173
|
*/
|
|
@@ -1148,12 +1175,12 @@ type ValibotSchema<TInput = unknown, TOutput = unknown, TIssue extends BaseIssue
|
|
|
1148
1175
|
/**
|
|
1149
1176
|
* Raw schema source input union before normalization.
|
|
1150
1177
|
*/
|
|
1151
|
-
type
|
|
1178
|
+
type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaOf<TSpec> | z3.ZodType<TSpec, any, any> | UntypedConfigObject | UntypedSchema | ValibotSchema<TSpec>;
|
|
1152
1179
|
/**
|
|
1153
1180
|
* Any accepted schema input, including normalized schemas and references.
|
|
1154
1181
|
*
|
|
1155
1182
|
* @remarks
|
|
1156
|
-
* The `
|
|
1183
|
+
* The `SchemaConfig` type can be one of the following variants:
|
|
1157
1184
|
* - A file path string (for example: `"./src/types.ts"`).
|
|
1158
1185
|
* - A URL string (for example: `"https://example.com/config.json"`).
|
|
1159
1186
|
* - A {@link GitHubReference | GitHub repository reference string}, starting with either `"github:"` or `"gh:"`, an optional branch or tag, and optionally including a specific file path within the repository (for example: `"github:main:storm-software/stryke/packages/resolve/src/types.ts"`). It is also valid to provide the branch or tag after the file path (for example: `"github:storm-software/stryke/packages/resolve/src/types.ts@main"`).
|
|
@@ -1162,168 +1189,20 @@ type SchemaSourceInput<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaOf
|
|
|
1162
1189
|
* - A file reference string (this value can include both a path to the TypeScript module and the name of the module export separated by a ":", "#", or ";" character - for example: `"./src/types.ts#ExampleExport"`).
|
|
1163
1190
|
* - A {@link FileReference} object, which contains information about a file reference.
|
|
1164
1191
|
* - A {@link URL} object, which represents a URL to fetch the file from.
|
|
1165
|
-
* - A {@link
|
|
1192
|
+
* - A {@link SchemaSourceConfig} object, which represents a raw schema input in one of the supported formats (Standard Schema, JSON Schema, Zod v3, Untyped, or Valibot).
|
|
1166
1193
|
*
|
|
1167
1194
|
* @template TSpec - The original TypeScript type for which the schema is being extracted. This type parameter is used to derive the appropriate JSON Schema representation based on the structure and constraints of `T`.
|
|
1168
1195
|
*
|
|
1169
|
-
* @see {@link
|
|
1170
|
-
* @see {@link
|
|
1171
|
-
* @see {@link
|
|
1196
|
+
* @see {@link SchemaSourceConfig}
|
|
1197
|
+
* @see {@link SchemaEnvelope}
|
|
1198
|
+
* @see {@link SchemaConfigWithMeta}
|
|
1172
1199
|
*/
|
|
1173
|
-
type
|
|
1174
|
-
type InferExtractOptions<T extends
|
|
1175
|
-
type MetaValue<TSpec, TValue = any> = TValue | ((spec: TSpec) => MaybePromise<TValue>);
|
|
1176
|
-
type MetaDeprecated = true | string | {
|
|
1177
|
-
message?: string;
|
|
1178
|
-
since?: string;
|
|
1179
|
-
alternative?: string;
|
|
1180
|
-
};
|
|
1181
|
-
type MetaLink = string | {
|
|
1182
|
-
href: string;
|
|
1183
|
-
description?: string;
|
|
1184
|
-
};
|
|
1185
|
-
interface MetaInput<TSpec> {
|
|
1186
|
-
/**
|
|
1187
|
-
* A name for the schema, which can be used to identify or reference the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1188
|
-
*
|
|
1189
|
-
* @remarks
|
|
1190
|
-
* The `name` property is a string that can be used to give the schema a human-readable identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have a name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1191
|
-
*/
|
|
1192
|
-
name?: MetaValue<TSpec, string>;
|
|
1193
|
-
/**
|
|
1194
|
-
* A version string that indicates the version of the schema. This property can be used to track changes or updates to the schema over time, allowing consumers of the schema to determine which version they are working with. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1195
|
-
*
|
|
1196
|
-
* @remarks
|
|
1197
|
-
* The `version` property is a string that can follow any versioning scheme, such as semantic versioning (e.g., "1.0.0", "2.1.3"), date-based versioning (e.g., "2023-06-15"), or any other format that conveys the version of the schema. It is recommended to use a consistent versioning scheme across all schemas to facilitate easier tracking and management of schema versions.
|
|
1198
|
-
*
|
|
1199
|
-
* @defaultValue "1.0"
|
|
1200
|
-
*/
|
|
1201
|
-
version?: MetaValue<TSpec, string | Date | number>;
|
|
1202
|
-
/**
|
|
1203
|
-
* A string that describes the schema in some way.
|
|
1204
|
-
*/
|
|
1205
|
-
description?: MetaValue<TSpec, string>;
|
|
1206
|
-
/**
|
|
1207
|
-
* A string that provides a human-readable name for the schema, which can be used in documentation, tooling, or other contexts to identify or reference the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1208
|
-
*
|
|
1209
|
-
* @remarks
|
|
1210
|
-
* The `displayName` property is a string that can be used to give the schema a more user-friendly or descriptive name. It can be used in documentation, error messages, or other contexts where it is helpful to have a display name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1211
|
-
*/
|
|
1212
|
-
displayName?: MetaValue<TSpec, string>;
|
|
1213
|
-
/**
|
|
1214
|
-
* A string that describes when the schema is used.
|
|
1215
|
-
*/
|
|
1216
|
-
usage?: MetaValue<TSpec, string>;
|
|
1217
|
-
/**
|
|
1218
|
-
* Indicates whether the schema is deprecated, and optionally provides additional information about the deprecation, such as a message, the version since which it is deprecated, and an alternative schema to use instead.
|
|
1219
|
-
*
|
|
1220
|
-
* @remarks
|
|
1221
|
-
* The `deprecated` property can be a boolean value, where `true` indicates that the schema is deprecated and `false` indicates that it is not. It can also be a string that provides a message explaining the deprecation, or an object that includes additional details such as a message, the version since which it is deprecated, and an alternative schema to use instead. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1222
|
-
*/
|
|
1223
|
-
deprecated?: MetaValue<TSpec, MetaDeprecated>;
|
|
1224
|
-
/**
|
|
1225
|
-
* An array of tags associated with the schema. Tags can be used to categorize or label schemas for organizational purposes, making it easier to search, filter, or group related schemas together. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1226
|
-
*
|
|
1227
|
-
* @remarks
|
|
1228
|
-
* Each tag in the array should be a string that represents a meaningful label or category for the schema. It is recommended to use consistent and descriptive tags across schemas to facilitate easier management and discovery of related schemas.
|
|
1229
|
-
*/
|
|
1230
|
-
tags?: MetaValue<TSpec, string[]>;
|
|
1231
|
-
/**
|
|
1232
|
-
* An array of links associated with the schema. Each link can be a string representing a URL or an object containing a `href` property and an optional `description` property.
|
|
1233
|
-
*/
|
|
1234
|
-
links?: MetaValue<TSpec, MetaLink[]>;
|
|
1235
|
-
}
|
|
1236
|
-
interface Meta<TSpec> {
|
|
1237
|
-
/**
|
|
1238
|
-
* A unique identifier for the schema, which can be used to reference or identify the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1239
|
-
*
|
|
1240
|
-
* @remarks
|
|
1241
|
-
* The `id` property is a string that can be used to give the schema a unique identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have an identifier associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1242
|
-
*/
|
|
1243
|
-
id: MetaValue<TSpec, string>;
|
|
1244
|
-
/**
|
|
1245
|
-
* A name for the schema, which can be used to identify or reference the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1246
|
-
*
|
|
1247
|
-
* @remarks
|
|
1248
|
-
* The `name` property is a string that can be used to give the schema a human-readable identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have a name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1249
|
-
*/
|
|
1250
|
-
name: MetaValue<TSpec, string>;
|
|
1251
|
-
/**
|
|
1252
|
-
* A version string that indicates the version of the schema. This property can be used to track changes or updates to the schema over time, allowing consumers of the schema to determine which version they are working with. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1253
|
-
*
|
|
1254
|
-
* @remarks
|
|
1255
|
-
* The `version` property is a string that can follow any versioning scheme, such as semantic versioning (e.g., "1.0.0", "2.1.3"), date-based versioning (e.g., "2023-06-15"), or any other format that conveys the version of the schema. It is recommended to use a consistent versioning scheme across all schemas to facilitate easier tracking and management of schema versions.
|
|
1256
|
-
*
|
|
1257
|
-
* @defaultValue "1.0"
|
|
1258
|
-
*/
|
|
1259
|
-
version: MetaValue<TSpec, string | Date | number>;
|
|
1260
|
-
/**
|
|
1261
|
-
* A string that describes the schema in some way.
|
|
1262
|
-
*/
|
|
1263
|
-
description: MetaValue<TSpec, string>;
|
|
1264
|
-
/**
|
|
1265
|
-
* A string that provides a human-readable name for the schema, which can be used in documentation, tooling, or other contexts to identify or reference the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1266
|
-
*
|
|
1267
|
-
* @remarks
|
|
1268
|
-
* The `displayName` property is a string that can be used to give the schema a more user-friendly or descriptive name. It can be used in documentation, error messages, or other contexts where it is helpful to have a display name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1269
|
-
*/
|
|
1270
|
-
displayName: MetaValue<TSpec, string>;
|
|
1271
|
-
/**
|
|
1272
|
-
* A string that describes when the schema is used.
|
|
1273
|
-
*/
|
|
1274
|
-
usage?: MetaValue<TSpec, string>;
|
|
1275
|
-
/**
|
|
1276
|
-
* Indicates whether the schema is deprecated, and optionally provides additional information about the deprecation, such as a message, the version since which it is deprecated, and an alternative schema to use instead.
|
|
1277
|
-
*
|
|
1278
|
-
* @remarks
|
|
1279
|
-
* The `deprecated` property can be a boolean value, where `true` indicates that the schema is deprecated and `false` indicates that it is not. It can also be a string that provides a message explaining the deprecation, or an object that includes additional details such as a message, the version since which it is deprecated, and an alternative schema to use instead. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1280
|
-
*/
|
|
1281
|
-
deprecated?: MetaValue<TSpec, MetaDeprecated>;
|
|
1282
|
-
/**
|
|
1283
|
-
* An array of tags associated with the schema. Tags can be used to categorize or label schemas for organizational purposes, making it easier to search, filter, or group related schemas together. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1284
|
-
*
|
|
1285
|
-
* @remarks
|
|
1286
|
-
* Each tag in the array should be a string that represents a meaningful label or category for the schema. It is recommended to use consistent and descriptive tags across schemas to facilitate easier management and discovery of related schemas.
|
|
1287
|
-
*/
|
|
1288
|
-
tags?: MetaValue<TSpec, string[]>;
|
|
1289
|
-
/**
|
|
1290
|
-
* An array of links associated with the schema. Each link can be a string representing a URL or an object containing a `href` property and an optional `description` property.
|
|
1291
|
-
*/
|
|
1292
|
-
links: MetaValue<TSpec, MetaLink[]>;
|
|
1293
|
-
}
|
|
1294
|
-
type SchemaMetaExample<TSpec> = TSpec | {
|
|
1295
|
-
description?: string;
|
|
1296
|
-
value: TSpec;
|
|
1297
|
-
};
|
|
1298
|
-
interface SchemaMetaInput<TSpec> extends MetaInput<TSpec> {
|
|
1299
|
-
/**
|
|
1300
|
-
* Examples of valid data for the schema. This can be a single example or an array of examples.
|
|
1301
|
-
*/
|
|
1302
|
-
examples?: SchemaMetaExample<TSpec> | MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
|
|
1303
|
-
}
|
|
1304
|
-
interface SchemaMeta<TSpec> extends Meta<TSpec> {
|
|
1305
|
-
/**
|
|
1306
|
-
* Examples of valid data for the schema.
|
|
1307
|
-
*/
|
|
1308
|
-
examples: MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
|
|
1309
|
-
}
|
|
1200
|
+
type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1201
|
+
type InferExtractOptions<T extends SchemaConfig> = T extends LoadReference ? InferLoadOptions<T> : {};
|
|
1310
1202
|
/**
|
|
1311
|
-
*
|
|
1203
|
+
* A schema envelope that contains the normalized schema and its source variant.
|
|
1312
1204
|
*/
|
|
1313
|
-
interface
|
|
1314
|
-
/**
|
|
1315
|
-
* The underlying schema input payload.
|
|
1316
|
-
*/
|
|
1317
|
-
schema: SchemaSourceInput<TSpec> | Schema<JsonSchemaOf<TSpec>> | LoadInput;
|
|
1318
|
-
/**
|
|
1319
|
-
* Optional contextual metadata associated with this schema input.
|
|
1320
|
-
*/
|
|
1321
|
-
meta?: SchemaMetaInput<TSpec> | string;
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* A schema extracted from a source input, normalized to JSON Schema.
|
|
1325
|
-
*/
|
|
1326
|
-
interface Schema<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
1205
|
+
interface SchemaEnvelope<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
1327
1206
|
/**
|
|
1328
1207
|
* A stable content hash for the normalized schema.
|
|
1329
1208
|
*/
|
|
@@ -1331,24 +1210,20 @@ interface Schema<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
|
1331
1210
|
/**
|
|
1332
1211
|
* The source variant used to derive the normalized {@link JsonSchema}.
|
|
1333
1212
|
*/
|
|
1334
|
-
variant:
|
|
1213
|
+
variant: SchemaConfigVariant;
|
|
1335
1214
|
/**
|
|
1336
1215
|
* The normalized schema definition.
|
|
1337
1216
|
*/
|
|
1338
1217
|
schema: TJsonSchema;
|
|
1339
|
-
/**
|
|
1340
|
-
* Optional contextual metadata associated with the schema.
|
|
1341
|
-
*/
|
|
1342
|
-
meta: SchemaMeta<SpecOf<TJsonSchema>>;
|
|
1343
1218
|
}
|
|
1344
1219
|
/**
|
|
1345
1220
|
* A normalized JSON Schema extracted from a source input of type `T`. This type represents the result of the schema extraction process, where a raw schema input (which could be in various formats such as Zod, Untyped, Valibot, or as a type definition in TypeScript source code) is transformed into a standardized JSON Schema format. The `SchemaOf<T>` type captures the normalized JSON Schema along with metadata about the source variant and a content hash for caching or identification purposes.
|
|
1346
1221
|
*
|
|
1347
1222
|
* @template TSpec - The original TypeScript type for which the schema is being extracted. This type parameter is used to derive the appropriate JSON Schema representation based on the structure and constraints of `T`.
|
|
1348
1223
|
*
|
|
1349
|
-
* @see {@link
|
|
1224
|
+
* @see {@link SchemaEnvelope}
|
|
1350
1225
|
*/
|
|
1351
|
-
type
|
|
1226
|
+
type SchemaEnvelopeOf<TSpec> = SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1352
1227
|
/**
|
|
1353
1228
|
* Base metadata captured for schema source inputs.
|
|
1354
1229
|
*/
|
|
@@ -1358,7 +1233,7 @@ interface BaseSchemaSource<TSpec = any> {
|
|
|
1358
1233
|
/** The specific source format used for the schema input. */
|
|
1359
1234
|
variant: SchemaSourceVariant;
|
|
1360
1235
|
/** The original schema input captured before normalization. */
|
|
1361
|
-
schema:
|
|
1236
|
+
schema: SchemaSourceConfig<TSpec>;
|
|
1362
1237
|
}
|
|
1363
1238
|
/**
|
|
1364
1239
|
* Source descriptor for schemas that already use JSON Schema.
|
|
@@ -1394,7 +1269,7 @@ interface UntypedSchemaSource<TSpec = any> extends BaseSchemaSource<TSpec> {
|
|
|
1394
1269
|
/** Indicates the source input comes from the Untyped schema model. */
|
|
1395
1270
|
variant: "untyped";
|
|
1396
1271
|
/** The original Untyped schema input. */
|
|
1397
|
-
schema:
|
|
1272
|
+
schema: UntypedConfigObject | UntypedSchema;
|
|
1398
1273
|
}
|
|
1399
1274
|
/**
|
|
1400
1275
|
* Source descriptor for Valibot schema inputs.
|
|
@@ -1412,12 +1287,38 @@ type SchemaSource<TSpec = any> = JsonSchemaSchemaSource<TSpec> | StandardSchemaS
|
|
|
1412
1287
|
/**
|
|
1413
1288
|
* A normalized schema plus metadata about the source that produced it.
|
|
1414
1289
|
*/
|
|
1415
|
-
interface
|
|
1290
|
+
interface ExtractedSchemaEnvelope<TSpec = any> extends SchemaEnvelopeOf<TSpec> {
|
|
1416
1291
|
/**
|
|
1417
1292
|
* The schema source that produced this normalized schema.
|
|
1418
1293
|
*/
|
|
1419
1294
|
source: SchemaSource<TSpec>;
|
|
1420
1295
|
}
|
|
1296
|
+
declare module "zod" {
|
|
1297
|
+
interface GlobalMeta {
|
|
1298
|
+
id?: string;
|
|
1299
|
+
title?: string;
|
|
1300
|
+
description?: string;
|
|
1301
|
+
docs?: string;
|
|
1302
|
+
alias?: string[];
|
|
1303
|
+
tags?: string[];
|
|
1304
|
+
deprecated?: boolean;
|
|
1305
|
+
hidden?: boolean;
|
|
1306
|
+
ignore?: boolean;
|
|
1307
|
+
internal?: boolean;
|
|
1308
|
+
runtime?: boolean;
|
|
1309
|
+
examples?: unknown | {
|
|
1310
|
+
name?: string;
|
|
1311
|
+
description?: string;
|
|
1312
|
+
value: unknown;
|
|
1313
|
+
}[];
|
|
1314
|
+
readOnly?: boolean;
|
|
1315
|
+
writeOnly?: boolean;
|
|
1316
|
+
contentEncoding?: string;
|
|
1317
|
+
contentMediaType?: string;
|
|
1318
|
+
contentSchema?: string;
|
|
1319
|
+
[keyword: string]: unknown;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1421
1322
|
//#endregion
|
|
1422
|
-
export {
|
|
1423
|
-
//# sourceMappingURL=types.d.
|
|
1323
|
+
export { SpecOf as $, JsonSchemaObject as A, JsonSchemaStringFormat as B, JsonSchemaMetadataKeywords as C, JsonSchemaNullable as D, JsonSchemaNull as E, JsonSchemaRecordPropertyNames as F, JsonSchemaUnknown as G, JsonSchemaType as H, JsonSchemaRef as I, SchemaEnvelope as J, SchemaConfig as K, JsonSchemaSchemaSource as L, JsonSchemaPrimitiveType as M, JsonSchemaPrimitiveUnion as N, JsonSchemaNumber as O, JsonSchemaRecord as P, SchemaSourceVariant as Q, JsonSchemaSet as R, JsonSchemaMap as S, JsonSchemaNever as T, JsonSchemaUndefined as U, JsonSchemaTuple as V, JsonSchemaUnion as W, SchemaSource as X, SchemaEnvelopeOf as Y, SchemaSourceConfig as Z, JsonSchemaIntegerFormat as _, JsonSchemaAllOf as a, ValibotSchemaSource as at, JsonSchemaLiteral as b, JsonSchemaArray as c, JSON_SCHEMA_PRIMITIVE_TYPES as ct, JsonSchemaConditionalKeywords as d, SCHEMA_ARRAY_CONCAT_KEYWORDS as dt, StandardSchemaSchemaSource as et, JsonSchemaDate as f, SCHEMA_RECORD_KEYWORDS as ft, JsonSchemaInteger as g, JsonSchemaEnum as h, JsonSchema as i, ValibotSchema as it, JsonSchemaOf as j, JsonSchemaNumberFormat as k, JsonSchemaBigint as l, JSON_SCHEMA_TYPES as lt, JsonSchemaDecimalFormat as m, ExtractedSchemaEnvelope as n, UntypedSchema as nt, JsonSchemaAny as o, Zod3SchemaSource as ot, JsonSchemaDecimal as p, SCHEMA_SINGLE_KEYWORDS as pt, SchemaConfigVariant as q, InferExtractOptions as r, UntypedSchemaSource as rt, JsonSchemaAnyOf as s, JSON_SCHEMA_METADATA_KEYS as st, BaseSchemaSource as t, UntypedConfigObject as tt, JsonSchemaBoolean as u, JsonSchemaTypeNames as ut, JsonSchemaKeywords as v, JsonSchemaNativeEnum as w, JsonSchemaLogicKeywords as x, JsonSchemaLike as y, JsonSchemaString as z };
|
|
1324
|
+
//# sourceMappingURL=types-BmNamqlM.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BmNamqlM.d.cts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":";;;;;;;cAoBa,mBAAA;EAAA;;;;;;;;cAUA,2BAAA;AAAA,cAQA,iBAAA;AAAA,cAMA,yBAAA;;;;;cA8BA,sBAAA,EAAsB,GAAA;;;;AA5CnC;cAwDa,sBAAA,EAAsB,GAAA;;;AAlDzB;AAEV;cAiEa,4BAAA,EAA4B,GAAA;;;;AAnFzC;;;;KCeY,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.toStringTag,{value:`Module`});const e=require("./constants-CwyhgVEl.cjs");let t=require("valibot");t=e.c(t,1);const n=t.picklist(e.r),r=t.union([t.string(),t.number(),t.bigint(),t.boolean(),t.null()]),i=t.union([t.number(),t.bigint()]),a=t.union([t.boolean(),t.string(),t.object({message:t.optional(t.string()),since:t.optional(t.string()),alternative:t.optional(t.string())})]),o=t.union([t.unknown(),t.object({name:t.optional(t.string()),description:t.optional(t.string()),value:t.unknown()})]),s=t.pipe(t.number(),t.integer(),t.minValue(0)),c=t.object({$ref:t.pipe(t.string(),t.minLength(1,`Reference must be a non-empty URI`))});function l(e){return t.union([c,e])}const u=t.object({$id:t.optional(t.string()),$schema:t.optional(t.string()),$vocabulary:t.optional(t.record(t.string(),t.boolean())),$comment:t.optional(t.string()),$anchor:t.optional(t.string()),$dynamicRef:t.optional(t.string()),$dynamicAnchor:t.optional(t.string()),name:t.optional(t.string()),version:t.optional(t.union([t.string(),t.number()])),title:t.optional(t.string()),description:t.optional(t.string()),docs:t.optional(t.string()),examples:t.optional(t.array(o)),alias:t.optional(t.array(t.string())),tags:t.optional(t.array(t.string())),deprecated:t.optional(a),hidden:t.optional(t.boolean()),ignore:t.optional(t.boolean()),internal:t.optional(t.boolean()),runtime:t.optional(t.boolean()),readOnly:t.optional(t.boolean()),writeOnly:t.optional(t.boolean())}),d=t.lazy(()=>{let e=t.object({type:t.literal(`array`),prefixItems:t.tuple([d,d]),items:t.optional(t.literal(!1)),minItems:t.literal(2),maxItems:t.literal(2)}),a=t.object({...u.entries,$ref:t.optional(t.string()),$defs:t.optional(t.record(t.string(),d)),type:t.optional(t.union([n,t.array(n)])),const:t.optional(t.unknown()),enum:t.optional(t.array(r)),format:t.optional(t.string()),default:t.optional(t.unknown()),allOf:t.optional(t.array(d)),anyOf:t.optional(t.array(d)),oneOf:t.optional(t.array(d)),not:t.optional(d),if:t.optional(d),then:t.optional(d),else:t.optional(d),properties:t.optional(t.record(t.string(),d)),patternProperties:t.optional(t.record(t.string(),d)),additionalProperties:t.optional(t.union([t.boolean(),d])),required:t.optional(t.array(t.string())),propertyNames:t.optional(d),dependencies:t.optional(t.record(t.string(),t.union([t.array(t.string()),d]))),dependentRequired:t.optional(t.record(t.string(),t.array(t.string()))),dependentSchemas:t.optional(t.record(t.string(),d)),minProperties:t.optional(s),maxProperties:t.optional(s),primaryKey:t.optional(t.array(t.string())),databaseSchema:t.optional(t.string()),unevaluatedProperties:t.optional(t.union([t.boolean(),d])),prefixItems:t.optional(t.array(d)),items:t.optional(t.union([d,e])),contains:t.optional(d),minItems:t.optional(s),maxItems:t.optional(s),uniqueItems:t.optional(t.boolean()),minContains:t.optional(s),maxContains:t.optional(s),unevaluatedItems:t.optional(t.union([t.boolean(),d])),minLength:t.optional(s),maxLength:t.optional(s),pattern:t.optional(t.string()),contentMediaType:t.optional(t.string()),contentEncoding:t.optional(t.string()),contentSchema:t.optional(t.string()),minimum:t.optional(i),maximum:t.optional(i),exclusiveMinimum:t.optional(i),exclusiveMaximum:t.optional(i),multipleOf:t.optional(i)});return t.union([c,a])});exports.jsonSchema=d,exports.refOr=l,exports.referenceSchema=c;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as JsonSchema } from "./types-BmNamqlM.cjs";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
|
|
4
|
+
//#region src/valibot.d.ts
|
|
5
|
+
declare const referenceSchema: v.ObjectSchema<{
|
|
6
|
+
readonly $ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Reference must be a non-empty URI">]>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
declare function refOr<TSchema extends v.GenericSchema>(schema: TSchema): v.UnionSchema<[v.ObjectSchema<{
|
|
9
|
+
readonly $ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Reference must be a non-empty URI">]>;
|
|
10
|
+
}, undefined>, TSchema], undefined>;
|
|
11
|
+
declare const jsonSchema: v.GenericSchema<JsonSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { jsonSchema, refOr, referenceSchema };
|
|
14
|
+
//# sourceMappingURL=valibot.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valibot.d.cts","names":[],"sources":["../src/valibot.ts"],"mappings":";;;;cAuDa,eAAA,EAAe,CAAA,CAAA,YAAA;EAAA;;iBAIZ,KAAA,iBAAsB,CAAA,CAAE,aAAA,EAAe,MAAA,EAAQ,OAAA,GAAO,CAAA,CAAA,WAAA,EAAA,CAAA,CAAA,YAAA;EAAA;;cA6BzD,UAAA,EAAY,CAAA,CAAE,aAAa,CAAC,UAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as JsonSchema } from "./types-BawP3FVI.mjs";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
|
|
4
|
+
//#region src/valibot.d.ts
|
|
5
|
+
declare const referenceSchema: v.ObjectSchema<{
|
|
6
|
+
readonly $ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Reference must be a non-empty URI">]>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
declare function refOr<TSchema extends v.GenericSchema>(schema: TSchema): v.UnionSchema<[v.ObjectSchema<{
|
|
9
|
+
readonly $ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Reference must be a non-empty URI">]>;
|
|
10
|
+
}, undefined>, TSchema], undefined>;
|
|
11
|
+
declare const jsonSchema: v.GenericSchema<JsonSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { jsonSchema, refOr, referenceSchema };
|
|
14
|
+
//# sourceMappingURL=valibot.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valibot.d.mts","names":[],"sources":["../src/valibot.ts"],"mappings":""}
|
package/dist/valibot.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./constants-lk1mMbgx.mjs";import*as t from"valibot";const n=t.picklist(e),r=t.union([t.string(),t.number(),t.bigint(),t.boolean(),t.null()]),i=t.union([t.number(),t.bigint()]),a=t.union([t.boolean(),t.string(),t.object({message:t.optional(t.string()),since:t.optional(t.string()),alternative:t.optional(t.string())})]),o=t.union([t.unknown(),t.object({name:t.optional(t.string()),description:t.optional(t.string()),value:t.unknown()})]),s=t.pipe(t.number(),t.integer(),t.minValue(0)),c=t.object({$ref:t.pipe(t.string(),t.minLength(1,`Reference must be a non-empty URI`))});function l(e){return t.union([c,e])}const u=t.object({$id:t.optional(t.string()),$schema:t.optional(t.string()),$vocabulary:t.optional(t.record(t.string(),t.boolean())),$comment:t.optional(t.string()),$anchor:t.optional(t.string()),$dynamicRef:t.optional(t.string()),$dynamicAnchor:t.optional(t.string()),name:t.optional(t.string()),version:t.optional(t.union([t.string(),t.number()])),title:t.optional(t.string()),description:t.optional(t.string()),docs:t.optional(t.string()),examples:t.optional(t.array(o)),alias:t.optional(t.array(t.string())),tags:t.optional(t.array(t.string())),deprecated:t.optional(a),hidden:t.optional(t.boolean()),ignore:t.optional(t.boolean()),internal:t.optional(t.boolean()),runtime:t.optional(t.boolean()),readOnly:t.optional(t.boolean()),writeOnly:t.optional(t.boolean())}),d=t.lazy(()=>{let e=t.object({type:t.literal(`array`),prefixItems:t.tuple([d,d]),items:t.optional(t.literal(!1)),minItems:t.literal(2),maxItems:t.literal(2)}),a=t.object({...u.entries,$ref:t.optional(t.string()),$defs:t.optional(t.record(t.string(),d)),type:t.optional(t.union([n,t.array(n)])),const:t.optional(t.unknown()),enum:t.optional(t.array(r)),format:t.optional(t.string()),default:t.optional(t.unknown()),allOf:t.optional(t.array(d)),anyOf:t.optional(t.array(d)),oneOf:t.optional(t.array(d)),not:t.optional(d),if:t.optional(d),then:t.optional(d),else:t.optional(d),properties:t.optional(t.record(t.string(),d)),patternProperties:t.optional(t.record(t.string(),d)),additionalProperties:t.optional(t.union([t.boolean(),d])),required:t.optional(t.array(t.string())),propertyNames:t.optional(d),dependencies:t.optional(t.record(t.string(),t.union([t.array(t.string()),d]))),dependentRequired:t.optional(t.record(t.string(),t.array(t.string()))),dependentSchemas:t.optional(t.record(t.string(),d)),minProperties:t.optional(s),maxProperties:t.optional(s),primaryKey:t.optional(t.array(t.string())),databaseSchema:t.optional(t.string()),unevaluatedProperties:t.optional(t.union([t.boolean(),d])),prefixItems:t.optional(t.array(d)),items:t.optional(t.union([d,e])),contains:t.optional(d),minItems:t.optional(s),maxItems:t.optional(s),uniqueItems:t.optional(t.boolean()),minContains:t.optional(s),maxContains:t.optional(s),unevaluatedItems:t.optional(t.union([t.boolean(),d])),minLength:t.optional(s),maxLength:t.optional(s),pattern:t.optional(t.string()),contentMediaType:t.optional(t.string()),contentEncoding:t.optional(t.string()),contentSchema:t.optional(t.string()),minimum:t.optional(i),maximum:t.optional(i),exclusiveMinimum:t.optional(i),exclusiveMaximum:t.optional(i),multipleOf:t.optional(i)});return t.union([c,a])});export{d as jsonSchema,l as refOr,c as referenceSchema};
|
|
2
|
+
//# sourceMappingURL=valibot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valibot.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/zod.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./constants-CwyhgVEl.cjs");let t=require("zod/mini");t=e.c(t,1);const n=t.enum(e.r),r=t.union([t.string(),t.number(),t.bigint(),t.boolean(),t.null()]),i=t.union([t.number(),t.bigint()]),a=t.union([t.boolean(),t.string(),t.object({message:t.optional(t.string()),since:t.optional(t.string()),alternative:t.optional(t.string())})]),o=t.union([t.unknown(),t.object({name:t.optional(t.string()),description:t.optional(t.string()),value:t.unknown()})]),s=t.number().check(t.int(),t.nonnegative()),c=t.object({$ref:t.string().check(t.minLength(1,`Reference must be a non-empty URI`))});function l(e){return t.union([c,e])}const u=t.object({$id:t.optional(t.string()),$schema:t.optional(t.string()),$vocabulary:t.optional(t.record(t.string(),t.boolean())),$comment:t.optional(t.string()),$anchor:t.optional(t.string()),$dynamicRef:t.optional(t.string()),$dynamicAnchor:t.optional(t.string()),name:t.optional(t.string()),version:t.optional(t.union([t.string(),t.number()])),title:t.optional(t.string()),description:t.optional(t.string()),docs:t.optional(t.string()),examples:t.optional(t.array(o)),alias:t.optional(t.array(t.string())),tags:t.optional(t.array(t.string())),deprecated:t.optional(a),hidden:t.optional(t.boolean()),ignore:t.optional(t.boolean()),internal:t.optional(t.boolean()),runtime:t.optional(t.boolean()),readOnly:t.optional(t.boolean()),writeOnly:t.optional(t.boolean())}),d=t.lazy(()=>{let e=t.object({type:t.literal(`array`),prefixItems:t.tuple([d,d]),items:t.optional(t.literal(!1)),minItems:t.literal(2),maxItems:t.literal(2)}),a=t.extend(u,{$ref:t.optional(t.string()),$defs:t.optional(t.record(t.string(),d)),type:t.optional(t.union([n,t.array(n)])),const:t.optional(t.unknown()),enum:t.optional(t.array(r)),format:t.optional(t.string()),default:t.optional(t.unknown()),allOf:t.optional(t.array(d)),anyOf:t.optional(t.array(d)),oneOf:t.optional(t.array(d)),not:t.optional(d),if:t.optional(d),then:t.optional(d),else:t.optional(d),properties:t.optional(t.record(t.string(),d)),patternProperties:t.optional(t.record(t.string(),d)),additionalProperties:t.optional(t.union([t.boolean(),d])),required:t.optional(t.array(t.string())),propertyNames:t.optional(d),dependencies:t.optional(t.record(t.string(),t.union([t.array(t.string()),d]))),dependentRequired:t.optional(t.record(t.string(),t.array(t.string()))),dependentSchemas:t.optional(t.record(t.string(),d)),minProperties:t.optional(s),maxProperties:t.optional(s),primaryKey:t.optional(t.array(t.string())),databaseSchema:t.optional(t.string()),unevaluatedProperties:t.optional(t.union([t.boolean(),d])),prefixItems:t.optional(t.array(d)),items:t.optional(t.union([d,e])),contains:t.optional(d),minItems:t.optional(s),maxItems:t.optional(s),uniqueItems:t.optional(t.boolean()),minContains:t.optional(s),maxContains:t.optional(s),unevaluatedItems:t.optional(t.union([t.boolean(),d])),minLength:t.optional(s),maxLength:t.optional(s),pattern:t.optional(t.string()),contentMediaType:t.optional(t.string()),contentEncoding:t.optional(t.string()),contentSchema:t.optional(t.string()),minimum:t.optional(i),maximum:t.optional(i),exclusiveMinimum:t.optional(i),exclusiveMaximum:t.optional(i),multipleOf:t.optional(i)});return t.union([c,a])});exports.jsonSchema=d,exports.refOr=l,exports.referenceSchema=c;
|
package/dist/zod.d.cts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as JsonSchema } from "./types-BmNamqlM.cjs";
|
|
2
|
+
import * as z from "zod/mini";
|
|
3
|
+
|
|
4
|
+
//#region src/zod.d.ts
|
|
5
|
+
declare const referenceSchema: z.ZodMiniObject<{
|
|
6
|
+
$ref: z.ZodMiniString<string>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare function refOr<T extends z.ZodMiniType>(schema: T): z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
9
|
+
$ref: z.ZodMiniString<string>;
|
|
10
|
+
}, z.core.$strip>, T]>;
|
|
11
|
+
declare const jsonSchema: z.ZodMiniType<JsonSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { jsonSchema, refOr, referenceSchema };
|
|
14
|
+
//# sourceMappingURL=zod.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.cts","names":[],"sources":["../src/zod.ts"],"mappings":";;;;cAuDa,eAAA,EAAe,CAAA,CAAA,aAAA;;;iBAIZ,KAAA,WAAgB,CAAA,CAAE,WAAA,EAAa,MAAA,EAAQ,CAAA,GAAC,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;cA6B3C,UAAA,EAAY,CAAA,CAAE,WAAW,CAAC,UAAA"}
|
package/dist/zod.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as JsonSchema } from "./types-BawP3FVI.mjs";
|
|
2
|
+
import * as z from "zod/mini";
|
|
3
|
+
|
|
4
|
+
//#region src/zod.d.ts
|
|
5
|
+
declare const referenceSchema: z.ZodMiniObject<{
|
|
6
|
+
$ref: z.ZodMiniString<string>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare function refOr<T extends z.ZodMiniType>(schema: T): z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
9
|
+
$ref: z.ZodMiniString<string>;
|
|
10
|
+
}, z.core.$strip>, T]>;
|
|
11
|
+
declare const jsonSchema: z.ZodMiniType<JsonSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { jsonSchema, refOr, referenceSchema };
|
|
14
|
+
//# sourceMappingURL=zod.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.mts","names":[],"sources":["../src/zod.ts"],"mappings":""}
|
package/dist/zod.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./constants-lk1mMbgx.mjs";import*as t from"zod/mini";const n=t.enum(e),r=t.union([t.string(),t.number(),t.bigint(),t.boolean(),t.null()]),i=t.union([t.number(),t.bigint()]),a=t.union([t.boolean(),t.string(),t.object({message:t.optional(t.string()),since:t.optional(t.string()),alternative:t.optional(t.string())})]),o=t.union([t.unknown(),t.object({name:t.optional(t.string()),description:t.optional(t.string()),value:t.unknown()})]),s=t.number().check(t.int(),t.nonnegative()),c=t.object({$ref:t.string().check(t.minLength(1,`Reference must be a non-empty URI`))});function l(e){return t.union([c,e])}const u=t.object({$id:t.optional(t.string()),$schema:t.optional(t.string()),$vocabulary:t.optional(t.record(t.string(),t.boolean())),$comment:t.optional(t.string()),$anchor:t.optional(t.string()),$dynamicRef:t.optional(t.string()),$dynamicAnchor:t.optional(t.string()),name:t.optional(t.string()),version:t.optional(t.union([t.string(),t.number()])),title:t.optional(t.string()),description:t.optional(t.string()),docs:t.optional(t.string()),examples:t.optional(t.array(o)),alias:t.optional(t.array(t.string())),tags:t.optional(t.array(t.string())),deprecated:t.optional(a),hidden:t.optional(t.boolean()),ignore:t.optional(t.boolean()),internal:t.optional(t.boolean()),runtime:t.optional(t.boolean()),readOnly:t.optional(t.boolean()),writeOnly:t.optional(t.boolean())}),d=t.lazy(()=>{let e=t.object({type:t.literal(`array`),prefixItems:t.tuple([d,d]),items:t.optional(t.literal(!1)),minItems:t.literal(2),maxItems:t.literal(2)}),a=t.extend(u,{$ref:t.optional(t.string()),$defs:t.optional(t.record(t.string(),d)),type:t.optional(t.union([n,t.array(n)])),const:t.optional(t.unknown()),enum:t.optional(t.array(r)),format:t.optional(t.string()),default:t.optional(t.unknown()),allOf:t.optional(t.array(d)),anyOf:t.optional(t.array(d)),oneOf:t.optional(t.array(d)),not:t.optional(d),if:t.optional(d),then:t.optional(d),else:t.optional(d),properties:t.optional(t.record(t.string(),d)),patternProperties:t.optional(t.record(t.string(),d)),additionalProperties:t.optional(t.union([t.boolean(),d])),required:t.optional(t.array(t.string())),propertyNames:t.optional(d),dependencies:t.optional(t.record(t.string(),t.union([t.array(t.string()),d]))),dependentRequired:t.optional(t.record(t.string(),t.array(t.string()))),dependentSchemas:t.optional(t.record(t.string(),d)),minProperties:t.optional(s),maxProperties:t.optional(s),primaryKey:t.optional(t.array(t.string())),databaseSchema:t.optional(t.string()),unevaluatedProperties:t.optional(t.union([t.boolean(),d])),prefixItems:t.optional(t.array(d)),items:t.optional(t.union([d,e])),contains:t.optional(d),minItems:t.optional(s),maxItems:t.optional(s),uniqueItems:t.optional(t.boolean()),minContains:t.optional(s),maxContains:t.optional(s),unevaluatedItems:t.optional(t.union([t.boolean(),d])),minLength:t.optional(s),maxLength:t.optional(s),pattern:t.optional(t.string()),contentMediaType:t.optional(t.string()),contentEncoding:t.optional(t.string()),contentSchema:t.optional(t.string()),minimum:t.optional(i),maximum:t.optional(i),exclusiveMinimum:t.optional(i),exclusiveMaximum:t.optional(i),multipleOf:t.optional(i)});return t.union([c,a])});export{d as jsonSchema,l as refOr,c as referenceSchema};
|
|
2
|
+
//# sourceMappingURL=zod.mjs.map
|
package/dist/zod.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.mjs","names":[],"sources":[],"mappings":""}
|