@power-plant/schema 0.0.35 → 0.0.37

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/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-hfHmxKG0.cjs";
1
+ import { $ as SchemaEnvelopeOf, A as JsonSchemaNullable, B as JsonSchemaSchemaSource, C as JsonSchemaLiteral, D as JsonSchemaNativeEnum, E as JsonSchemaMetadataKeywords, F as JsonSchemaPrimitiveType, G as JsonSchemaType, H as JsonSchemaString, I as JsonSchemaPrimitiveUnion, J as JsonSchemaUnknown, K as JsonSchemaUndefined, L as JsonSchemaRecord, M as JsonSchemaNumberFormat, N as JsonSchemaObject, O as JsonSchemaNever, P as JsonSchemaOf, Q as SchemaEnvelope, R as JsonSchemaRecordPropertyNames, S as JsonSchemaLike, T as JsonSchemaMap, U as JsonSchemaStringFormat, V as JsonSchemaSet, W as JsonSchemaTuple, X as SchemaConfig, Y as ReflectionSchemaSource, Z as SchemaConfigVariant, _ as JsonSchemaFunction, _t as SCHEMA_RECORD_KEYWORDS, a as JsonSchema, at as UntypedConfigObject, b as JsonSchemaIntegerFormat, c as JsonSchemaAnyOf, ct as ValibotSchema, d as JsonSchemaBoolean, dt as JSON_SCHEMA_CONSTRUCTOR_KEY, et as SchemaSource, f as JsonSchemaConditionalKeywords, ft as JSON_SCHEMA_METADATA_KEYS, g as JsonSchemaEnum, gt as SCHEMA_ARRAY_CONCAT_KEYWORDS, h as JsonSchemaDecimalFormat, ht as JsonSchemaTypeNames, i as InferExtractOptions, it as StandardSchemaSchemaSource, j as JsonSchemaNumber, k as JsonSchemaNull, l as JsonSchemaArray, lt as ValibotSchemaSource, m as JsonSchemaDecimal, mt as JSON_SCHEMA_TYPES, n as BaseSchemaSource, nt as SchemaSourceVariant, o as JsonSchemaAllOf, ot as UntypedSchema, p as JsonSchemaDate, pt as JSON_SCHEMA_PRIMITIVE_TYPES, q as JsonSchemaUnion, r as ExtractedSchemaEnvelope, rt as SpecOf, s as JsonSchemaAny, st as UntypedSchemaSource, t as BaseExtractOptions, tt as SchemaSourceConfig, u as JsonSchemaBigint, ut as Zod3SchemaSource, v as JsonSchemaFunctionParameter, vt as SCHEMA_SINGLE_KEYWORDS, w as JsonSchemaLogicKeywords, x as JsonSchemaKeywords, y as JsonSchemaInteger, z as JsonSchemaRef } from "./types-BH-Q7QrB.cjs";
2
2
  import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-ldf5lukz.cjs";
3
+ import { Type } from "@deepkit/type";
3
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
5
  import { InferLoadOptions } from "@stryke/resolve/types";
5
6
  import { InputObject, Schema } from "untyped";
@@ -43,6 +44,10 @@ declare function bundleReferences(schema: JsonSchema): JsonSchema;
43
44
  * Creates a hash string for a given schema definition input.
44
45
  */
45
46
  declare function extractHash(variant: SchemaConfigVariant, input: SchemaConfig): string;
47
+ /**
48
+ * Converts a reflected Deepkit {@link Type} into a JSON Schema (draft-2020-12) representation.
49
+ */
50
+ declare function extractReflection(reflection: Type): JsonSchema | undefined;
46
51
  /**
47
52
  * Extracts a JSON Schema from Zod, Standard Schema, Valibot, untyped, or JSON Schema inputs.
48
53
  *
@@ -84,19 +89,18 @@ declare function extractSchema(input: SchemaSourceConfig, variant?: SchemaConfig
84
89
  */
85
90
  declare function extractSource(variant: SchemaSourceVariant, input: SchemaSourceConfig): SchemaSource;
86
91
  /**
87
- * Resolves a type definition to a JSON Schema. First bundles the TypeScript
88
- * module graph for {@link FileReference.file} with esbuild (preserving original
89
- * sources), then feeds that program to
90
- * [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator)
91
- * using the referenced export name as the target type when one is provided.
92
+ * Resolves a type definition to a JSON Schema. Bundles the TypeScript module
93
+ * graph with esbuild using `@deepkit/type-compiler` reflection transformers,
94
+ * then converts the reflected Deepkit {@link Type} via {@link reflectionToJsonSchema}.
92
95
  *
93
96
  * @param input - The type definition to compile. This can be either a string or a {@link FileReference} object.
94
- * @param options - Optional overrides reserved for API compatibility.
97
+ * @param options - Optional overrides for reflection and file resolution.
95
98
  * @returns A promise that resolves to the generated JSON Schema.
99
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
96
100
  */
97
101
  declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> & BaseExtractOptions): Promise<JsonSchema>;
98
102
  /**
99
- * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
103
+ * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, a Deepkit Type object, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](https://esbuild.github.io) using [@deepkit/type-compiler](https://deepkit.io/en/documentation/runtime-types/getting-started) reflection to obtain the actual schema definition before extraction.
100
104
  *
101
105
  * @example
102
106
  * ```ts
@@ -110,8 +114,8 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
110
114
  * const schema4 = await extract(context, zodSchema);
111
115
  * // Resolve a schema definition from a Valibot schema
112
116
  * const schema5 = await extract(context, valibotSchema);
113
- * // Resolve a schema definition from an untyped schema
114
- * const schema6 = await extract(context, untypedSchema);
117
+ * // Resolve a schema definition from a reflected Deepkit Type object
118
+ * const schema6 = await extract(context, reflectionType);
115
119
  * ```
116
120
  *
117
121
  * @see https://zod.dev/
@@ -119,7 +123,7 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
119
123
  * @see https://standardschema.dev/json-schema#what-schema-libraries-support-this-spec
120
124
  * @see https://json-schema.org/
121
125
  * @see https://ajv.js.org/json-type-definition.html
122
- * @see https://github.com/vega/ts-json-schema-generator
126
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
123
127
  * @see https://github.com/unjs/untyped
124
128
  * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
125
129
  *
@@ -130,7 +134,7 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
130
134
  */
131
135
  declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, options?: InferExtractOptions<typeof input>): Promise<ExtractedSchemaEnvelope<TSpec>>;
132
136
  /**
133
- * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
137
+ * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, a Deepkit Type object, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](https://esbuild.github.io) using [@deepkit/type-compiler](https://deepkit.io/en/documentation/runtime-types/getting-started) reflection to obtain the actual schema definition before extraction.
134
138
  *
135
139
  * @example
136
140
  * ```ts
@@ -144,8 +148,8 @@ declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, optio
144
148
  * const schema4 = await extract(context, zodSchema);
145
149
  * // Resolve a schema definition from a Valibot schema
146
150
  * const schema5 = await extract(context, valibotSchema);
147
- * // Resolve a schema definition from an untyped schema
148
- * const schema6 = await extract(context, untypedSchema);
151
+ * // Resolve a schema definition from a reflected Deepkit Type object
152
+ * const schema6 = await extract(context, reflectionType);
149
153
  * ```
150
154
  *
151
155
  * @see https://zod.dev/
@@ -153,7 +157,7 @@ declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, optio
153
157
  * @see https://standardschema.dev/json-schema#what-schema-libraries-support-this-spec
154
158
  * @see https://json-schema.org/
155
159
  * @see https://ajv.js.org/json-type-definition.html
156
- * @see https://github.com/vega/ts-json-schema-generator
160
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
157
161
  * @see https://github.com/unjs/untyped
158
162
  * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
159
163
  *
@@ -566,6 +570,17 @@ declare function isStandardSchema(input: unknown): input is StandardSchemaV1;
566
570
  * @returns True if the input is a Valibot BaseSchema, false otherwise.
567
571
  */
568
572
  declare function isValibotSchema(input: unknown): input is BaseSchema<any, any, any>;
573
+ /**
574
+ * Returns true when `input` is a function schema that represents a constructor.
575
+ *
576
+ * @remarks
577
+ * Uses `Object.hasOwn` on {@link JSON_SCHEMA_CONSTRUCTOR_KEY}. Do not read
578
+ * `schema.constructor` — that returns `Object.prototype.constructor`.
579
+ *
580
+ * @param input - A JSON Schema (or unknown value) to inspect.
581
+ * @returns True when the schema has an own `"constructor": true` flag.
582
+ */
583
+ declare function hasJsonSchemaConstructorFlag(input: unknown): boolean;
569
584
  /**
570
585
  * Type guard for JSON Schema types.
571
586
  *
@@ -661,5 +676,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
661
676
  */
662
677
  declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
663
678
  //#endregion
664
- export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
679
+ export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
665
680
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBC8Cc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;;;;iBAgDO,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA0Ba,eAAe,OAAO,eAAe;;;;;;;;;iBAsB/B,cACpB,OAAO,oBACP,UAAU,sBACT,QAAQ;;;;;;;;;iBAmCK,cACd,SAAS,qBACT,OAAO,qBACN;;;;;;;;;;;;iBAkSmB,cACpB,OAAO,oBACP,UAAS,wBAAwB,SAAS,qBACzC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+FW,wBAAwB,aAC5C,OAAO,cACP,UAAS,2BAA2B,SACnC,QAAQ,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0Ib,QAAQ,aAC5B,OAAO,aAAa,QACpB,UAAS,2BAA2B,SACnC,QAAQ,iBAAiB;;;KC9mChB,oBAAoB;EAC9B;EACA;EACA;;;;;;;;;;;;iBAac,cAAc,OAAO,iBAAiB,aAAa;;;;;;;;;;;iBAmBnD,oBACd,OAAO,iBAAiB,aACvB;;;;;;;;;;iBAkBa,cACd,KAAK,iBAAiB,mBACrB,eAAe;;;;;;;;;;iBA6BF,kBAAkB,KAAK,iBAAiB,mBAAgB;;;;;;;;;;iBAaxD,YAAY,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iBA+B7C,oBACd,iBACC,SAAS;;;;;;;iBAUI,oBACd,iBACC,SAAS;;;;;;;iBAUI,mBAAmB,iBAAiB,SAAS;;;;;;;iBA2C7C,mBAAmB,iBAAiB,SAAS;;;;;;;iBA4B7C,gBAAgB,iBAAiB,SAAS;;;;;;;iBA8B1C,mBAAmB,iBAAiB,SAAS;;;;;;;iBAyB7C,kBAAkB,iBAAiB,SAAS;;;;;;;iBA8B5C,sBACd,iBACC,SAAS;;;;;;;iBAoBI,2BACd,iBACC,SAAS;;;;;;;iBAsEI,kBAAkB,iBAAiB,SAAS;;;;;;;iBAmB5C,oBACd,iBACC,SAAS;;;;;;;iBAUI,kBAAkB,iBAAiB,SAAS;;;;;;;iBAkB5C,gBAAgB,iBAAiB,SAAS;;;;;;;iBAgB1C,iBAAiB,iBAAiB,SAAS;;;;;;;iBAqB3C,gBACd,iBACC,SAAS;;;;;;;;;;iBA0BI,aAAa,iBAAiB,SAAS;;;;;;;;;;iBAsCvC,qBAAqB,iBAAiB,SAAS;;;;;;;;;;iBAa/C,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;iBAyD1C,sBAAsB,iBAAiB,SAAS;;;;;;;;;;;cAmBnD,uBAAc;iBAEX,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;;cA2B7C,6BAAoB;iBAEjB,sBACd,iBACC,SAAS;;;;;;;iBAuBI,SAAS,iBAAiB,SAAS;;;;;;;iBAkBnC,WAAW,OACzB,iBACC,SAAS,iBAAiB;;;;;;;iBAUb,mBAAmB,iBAAiB,SAAS;;;;;;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBCuDc,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B5C,oBACd,iBACC,SAAS;;;;;;;iBAUI,kBAAkB,iBAAiB,SAAS;;;;;;;iBAkB5C,gBAAgB,iBAAiB,SAAS;;;;;;;iBAgB1C,iBAAiB,iBAAiB,SAAS;;;;;;;iBAqB3C,gBACd,iBACC,SAAS;;;;;;;;;;;iBA2BI,6BAA6B;;;;;;;;;;iBAoB7B,aAAa,iBAAiB,SAAS;;;;;;;;;;iBAsCvC,qBAAqB,iBAAiB,SAAS;;;;;;;;;;iBAa/C,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;iBAyD1C,sBAAsB,iBAAiB,SAAS;;;;;;;;;;;cAmBnD,uBAAc;iBAEX,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;;cA2B7C,6BAAoB;iBAEjB,sBACd,iBACC,SAAS;;;;;;;iBAuBI,SAAS,iBAAiB,SAAS;;;;;;;iBAkBnC,WAAW,OACzB,iBACC,SAAS,iBAAiB;;;;;;;iBAUb,mBAAmB,iBAAiB,SAAS;;;;;;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-CyvYSCHO.mjs";
1
+ import { $ as SchemaEnvelopeOf, A as JsonSchemaNullable, B as JsonSchemaSchemaSource, C as JsonSchemaLiteral, D as JsonSchemaNativeEnum, E as JsonSchemaMetadataKeywords, F as JsonSchemaPrimitiveType, G as JsonSchemaType, H as JsonSchemaString, I as JsonSchemaPrimitiveUnion, J as JsonSchemaUnknown, K as JsonSchemaUndefined, L as JsonSchemaRecord, M as JsonSchemaNumberFormat, N as JsonSchemaObject, O as JsonSchemaNever, P as JsonSchemaOf, Q as SchemaEnvelope, R as JsonSchemaRecordPropertyNames, S as JsonSchemaLike, T as JsonSchemaMap, U as JsonSchemaStringFormat, V as JsonSchemaSet, W as JsonSchemaTuple, X as SchemaConfig, Y as ReflectionSchemaSource, Z as SchemaConfigVariant, _ as JsonSchemaFunction, _t as SCHEMA_RECORD_KEYWORDS, a as JsonSchema, at as UntypedConfigObject, b as JsonSchemaIntegerFormat, c as JsonSchemaAnyOf, ct as ValibotSchema, d as JsonSchemaBoolean, dt as JSON_SCHEMA_CONSTRUCTOR_KEY, et as SchemaSource, f as JsonSchemaConditionalKeywords, ft as JSON_SCHEMA_METADATA_KEYS, g as JsonSchemaEnum, gt as SCHEMA_ARRAY_CONCAT_KEYWORDS, h as JsonSchemaDecimalFormat, ht as JsonSchemaTypeNames, i as InferExtractOptions, it as StandardSchemaSchemaSource, j as JsonSchemaNumber, k as JsonSchemaNull, l as JsonSchemaArray, lt as ValibotSchemaSource, m as JsonSchemaDecimal, mt as JSON_SCHEMA_TYPES, n as BaseSchemaSource, nt as SchemaSourceVariant, o as JsonSchemaAllOf, ot as UntypedSchema, p as JsonSchemaDate, pt as JSON_SCHEMA_PRIMITIVE_TYPES, q as JsonSchemaUnion, r as ExtractedSchemaEnvelope, rt as SpecOf, s as JsonSchemaAny, st as UntypedSchemaSource, t as BaseExtractOptions, tt as SchemaSourceConfig, u as JsonSchemaBigint, ut as Zod3SchemaSource, v as JsonSchemaFunctionParameter, vt as SCHEMA_SINGLE_KEYWORDS, w as JsonSchemaLogicKeywords, x as JsonSchemaKeywords, y as JsonSchemaInteger, z as JsonSchemaRef } from "./types-BrSNvUQg.mjs";
2
2
  import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-C7q4X7Bo.mjs";
3
+ import { Type } from "@deepkit/type";
3
4
  import { BaseSchema } from "valibot";
4
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
6
  import { InferLoadOptions } from "@stryke/resolve/types";
@@ -43,6 +44,10 @@ declare function bundleReferences(schema: JsonSchema): JsonSchema;
43
44
  * Creates a hash string for a given schema definition input.
44
45
  */
45
46
  declare function extractHash(variant: SchemaConfigVariant, input: SchemaConfig): string;
47
+ /**
48
+ * Converts a reflected Deepkit {@link Type} into a JSON Schema (draft-2020-12) representation.
49
+ */
50
+ declare function extractReflection(reflection: Type): JsonSchema | undefined;
46
51
  /**
47
52
  * Extracts a JSON Schema from Zod, Standard Schema, Valibot, untyped, or JSON Schema inputs.
48
53
  *
@@ -84,19 +89,18 @@ declare function extractSchema(input: SchemaSourceConfig, variant?: SchemaConfig
84
89
  */
85
90
  declare function extractSource(variant: SchemaSourceVariant, input: SchemaSourceConfig): SchemaSource;
86
91
  /**
87
- * Resolves a type definition to a JSON Schema. First bundles the TypeScript
88
- * module graph for {@link FileReference.file} with esbuild (preserving original
89
- * sources), then feeds that program to
90
- * [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator)
91
- * using the referenced export name as the target type when one is provided.
92
+ * Resolves a type definition to a JSON Schema. Bundles the TypeScript module
93
+ * graph with esbuild using `@deepkit/type-compiler` reflection transformers,
94
+ * then converts the reflected Deepkit {@link Type} via {@link reflectionToJsonSchema}.
92
95
  *
93
96
  * @param input - The type definition to compile. This can be either a string or a {@link FileReference} object.
94
- * @param options - Optional overrides reserved for API compatibility.
97
+ * @param options - Optional overrides for reflection and file resolution.
95
98
  * @returns A promise that resolves to the generated JSON Schema.
99
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
96
100
  */
97
101
  declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> & BaseExtractOptions): Promise<JsonSchema>;
98
102
  /**
99
- * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
103
+ * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, a Deepkit Type object, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](https://esbuild.github.io) using [@deepkit/type-compiler](https://deepkit.io/en/documentation/runtime-types/getting-started) reflection to obtain the actual schema definition before extraction.
100
104
  *
101
105
  * @example
102
106
  * ```ts
@@ -110,8 +114,8 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
110
114
  * const schema4 = await extract(context, zodSchema);
111
115
  * // Resolve a schema definition from a Valibot schema
112
116
  * const schema5 = await extract(context, valibotSchema);
113
- * // Resolve a schema definition from an untyped schema
114
- * const schema6 = await extract(context, untypedSchema);
117
+ * // Resolve a schema definition from a reflected Deepkit Type object
118
+ * const schema6 = await extract(context, reflectionType);
115
119
  * ```
116
120
  *
117
121
  * @see https://zod.dev/
@@ -119,7 +123,7 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
119
123
  * @see https://standardschema.dev/json-schema#what-schema-libraries-support-this-spec
120
124
  * @see https://json-schema.org/
121
125
  * @see https://ajv.js.org/json-type-definition.html
122
- * @see https://github.com/vega/ts-json-schema-generator
126
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
123
127
  * @see https://github.com/unjs/untyped
124
128
  * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
125
129
  *
@@ -130,7 +134,7 @@ declare function extractTSType(input: FileReferenceInput, options?: InferLoadOpt
130
134
  */
131
135
  declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, options?: InferExtractOptions<typeof input>): Promise<ExtractedSchemaEnvelope<TSpec>>;
132
136
  /**
133
- * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
137
+ * Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, a Deepkit Type object, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](https://esbuild.github.io) using [@deepkit/type-compiler](https://deepkit.io/en/documentation/runtime-types/getting-started) reflection to obtain the actual schema definition before extraction.
134
138
  *
135
139
  * @example
136
140
  * ```ts
@@ -144,8 +148,8 @@ declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, optio
144
148
  * const schema4 = await extract(context, zodSchema);
145
149
  * // Resolve a schema definition from a Valibot schema
146
150
  * const schema5 = await extract(context, valibotSchema);
147
- * // Resolve a schema definition from an untyped schema
148
- * const schema6 = await extract(context, untypedSchema);
151
+ * // Resolve a schema definition from a reflected Deepkit Type object
152
+ * const schema6 = await extract(context, reflectionType);
149
153
  * ```
150
154
  *
151
155
  * @see https://zod.dev/
@@ -153,7 +157,7 @@ declare function extractSchemaWithSource<TSpec = any>(input: SchemaConfig, optio
153
157
  * @see https://standardschema.dev/json-schema#what-schema-libraries-support-this-spec
154
158
  * @see https://json-schema.org/
155
159
  * @see https://ajv.js.org/json-type-definition.html
156
- * @see https://github.com/vega/ts-json-schema-generator
160
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
157
161
  * @see https://github.com/unjs/untyped
158
162
  * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
159
163
  *
@@ -566,6 +570,17 @@ declare function isStandardSchema(input: unknown): input is StandardSchemaV1;
566
570
  * @returns True if the input is a Valibot BaseSchema, false otherwise.
567
571
  */
568
572
  declare function isValibotSchema(input: unknown): input is BaseSchema<any, any, any>;
573
+ /**
574
+ * Returns true when `input` is a function schema that represents a constructor.
575
+ *
576
+ * @remarks
577
+ * Uses `Object.hasOwn` on {@link JSON_SCHEMA_CONSTRUCTOR_KEY}. Do not read
578
+ * `schema.constructor` — that returns `Object.prototype.constructor`.
579
+ *
580
+ * @param input - A JSON Schema (or unknown value) to inspect.
581
+ * @returns True when the schema has an own `"constructor": true` flag.
582
+ */
583
+ declare function hasJsonSchemaConstructorFlag(input: unknown): boolean;
569
584
  /**
570
585
  * Type guard for JSON Schema types.
571
586
  *
@@ -661,5 +676,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
661
676
  */
662
677
  declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
663
678
  //#endregion
664
- export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
679
+ export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
665
680
  //# sourceMappingURL=index.d.mts.map