@power-plant/schema 0.0.3 → 0.0.4

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.
Files changed (43) hide show
  1. package/dist/codegen.cjs +77 -1
  2. package/dist/codegen.mjs +78 -1
  3. package/dist/codegen.mjs.map +1 -0
  4. package/dist/{constants-u7ovYS9e.d.cts → constants-lihlIQu7.d.cts} +2 -2
  5. package/dist/{constants-u7ovYS9e.d.cts.map → constants-lihlIQu7.d.cts.map} +1 -1
  6. package/dist/{constants-u7ovYS9e.d.mts → constants-lihlIQu7.d.mts} +2 -2
  7. package/dist/constants-lihlIQu7.d.mts.map +1 -0
  8. package/dist/constants.cjs +1 -1
  9. package/dist/constants.d.cts +1 -1
  10. package/dist/constants.d.mts +1 -1
  11. package/dist/constants.mjs +1 -1
  12. package/dist/extract.cjs +1 -1
  13. package/dist/extract.d.cts +4 -12
  14. package/dist/extract.d.cts.map +1 -1
  15. package/dist/extract.d.mts +4 -12
  16. package/dist/extract.mjs +1 -1
  17. package/dist/helpers.cjs +1 -1
  18. package/dist/helpers.d.cts +8 -8
  19. package/dist/helpers.d.cts.map +1 -1
  20. package/dist/helpers.d.mts +8 -8
  21. package/dist/helpers.mjs +2 -1
  22. package/dist/helpers.mjs.map +1 -0
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +5 -5
  25. package/dist/index.d.mts +5 -5
  26. package/dist/index.mjs +1 -1
  27. package/dist/metadata.cjs +1 -1
  28. package/dist/metadata.d.cts +2 -65
  29. package/dist/metadata.d.cts.map +1 -1
  30. package/dist/metadata.d.mts +2 -65
  31. package/dist/metadata.mjs +2 -1
  32. package/dist/metadata.mjs.map +1 -0
  33. package/dist/type-checks.d.cts +5 -5
  34. package/dist/type-checks.d.cts.map +1 -1
  35. package/dist/type-checks.d.mts +5 -5
  36. package/dist/types.d.cts +12 -165
  37. package/dist/types.d.cts.map +1 -1
  38. package/dist/types.d.mts +12 -165
  39. package/package.json +15 -15
  40. package/dist/constants-u7ovYS9e.d.mts.map +0 -1
  41. package/dist/metadata-CsY3HrP2.cjs +0 -77
  42. package/dist/metadata-DIEpQjbq.mjs +0 -78
  43. package/dist/metadata-DIEpQjbq.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaObject, JsonSchemaOf, Schema } from "./types.mjs";
1
+ import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaObject, JsonSchemaOf, SchemaEnvelope } from "./types.mjs";
2
2
 
3
3
  //#region src/helpers.d.ts
4
4
  type GetPropertyResult = JsonSchema & {
@@ -16,7 +16,7 @@ type GetPropertyResult = JsonSchema & {
16
16
  * @returns The JSON Schema object.
17
17
  * @throws Will throw a TypeError if the input is neither a valid Schema wrapper nor a valid JSON Schema object.
18
18
  */
19
- declare function getJsonSchema(input: Schema | JsonSchema): JsonSchema;
19
+ declare function getJsonSchema(input: SchemaEnvelope | JsonSchema): JsonSchema;
20
20
  /**
21
21
  * Retrieves the JSON Schema in Object form from a Schema wrapper or returns the input if it's already a JSON Schema.
22
22
  *
@@ -27,7 +27,7 @@ declare function getJsonSchema(input: Schema | JsonSchema): JsonSchema;
27
27
  * @returns The JSON Schema object.
28
28
  * @throws Will throw a TypeError if the input is neither a valid Schema wrapper nor a valid JSON Schema object.
29
29
  */
30
- declare function getJsonSchemaObject(input: Schema | JsonSchema): JsonSchemaObject;
30
+ declare function getJsonSchemaObject(input: SchemaEnvelope | JsonSchema): JsonSchemaObject;
31
31
  /**
32
32
  * Extracts object properties from a JSON Schema object form.
33
33
  *
@@ -37,7 +37,7 @@ declare function getJsonSchemaObject(input: Schema | JsonSchema): JsonSchemaObje
37
37
  * @param obj - The JSON Schema object form or a Schema wrapper to extract properties from.
38
38
  * @returns An object mapping property names to their corresponding JSON Schema fragments, including metadata.
39
39
  */
40
- declare function getProperties(obj: Schema | JsonSchemaObject): Record<string, GetPropertyResult>;
40
+ declare function getProperties(obj: SchemaEnvelope | JsonSchemaObject): Record<string, GetPropertyResult>;
41
41
  /**
42
42
  * Returns object properties as an array.
43
43
  *
@@ -47,7 +47,7 @@ declare function getProperties(obj: Schema | JsonSchemaObject): Record<string, G
47
47
  * @param obj - The JSON Schema object form or a Schema wrapper to extract properties from.
48
48
  * @returns An array of JSON Schema fragments representing the properties, each including metadata.
49
49
  */
50
- declare function getPropertiesList(obj: Schema | JsonSchemaObject): GetPropertyResult[];
50
+ declare function getPropertiesList(obj: SchemaEnvelope | JsonSchemaObject): GetPropertyResult[];
51
51
  /**
52
52
  * Extracts object properties from a JSON Schema object form.
53
53
  *
@@ -57,7 +57,7 @@ declare function getPropertiesList(obj: Schema | JsonSchemaObject): GetPropertyR
57
57
  * @param obj - The JSON Schema object form or a Schema wrapper to extract properties from.
58
58
  * @returns An object mapping property names to their corresponding JSON Schema fragments, including metadata.
59
59
  */
60
- declare function getProperty<TSchema extends JsonSchemaObject>(obj: Schema<TSchema> | TSchema, name: keyof TSchema["properties"] & string): GetPropertyResult;
60
+ declare function getProperty<TSchema extends JsonSchemaObject>(obj: SchemaEnvelope<TSchema> | TSchema, name: keyof TSchema["properties"] & string): GetPropertyResult;
61
61
  /**
62
62
  * Adds a property to a JSON Schema object form.
63
63
  *
@@ -69,7 +69,7 @@ declare function getProperty<TSchema extends JsonSchemaObject>(obj: Schema<TSche
69
69
  * @param property - The JSON Schema fragment representing the property's schema, including metadata.
70
70
  * @throws Will throw an error if the provided schema is not an object form.
71
71
  */
72
- declare function addProperty(obj: Schema | JsonSchemaObject, name: string, property: JsonSchema): void;
72
+ declare function addProperty(obj: SchemaEnvelope | JsonSchemaObject, name: string, property: JsonSchema): void;
73
73
  /**
74
74
  * Merges multiple JSON Schemas into one.
75
75
  *
@@ -89,7 +89,7 @@ declare function addProperty(obj: Schema | JsonSchemaObject, name: string, prope
89
89
  * @param schemas - An array of JSON Schemas or Schema wrappers to merge.
90
90
  * @returns A new JSON Schema that is the result of merging all input schemas.
91
91
  */
92
- declare function merge(...schemas: (JsonSchema | Schema)[]): JsonSchema;
92
+ declare function merge(...schemas: (JsonSchema | SchemaEnvelope)[]): JsonSchema;
93
93
  /**
94
94
  * Merges metadata into a JSON Schema fragment.
95
95
  *
package/dist/helpers.mjs CHANGED
@@ -1 +1,2 @@
1
- import{C as e,E as t,S as n,T as r,_ as i,b as a,g as o,v as s,w as c,x as l,y as u}from"./metadata-DIEpQjbq.mjs";export{o as addProperty,i as getJsonSchema,s as getJsonSchemaObject,u as getProperties,a as getPropertiesList,l as getProperty,n as isPropertyOptional,e as isSchemaNullable,c as isValidSchemaInputFile,r as merge,t as mergeMetadata};
1
+ import{JSON_SCHEMA_METADATA_KEYS as e,SCHEMA_ARRAY_CONCAT_KEYWORDS as t,SCHEMA_RECORD_KEYWORDS as n,SCHEMA_SINGLE_KEYWORDS as r}from"./constants.mjs";import{isJsonSchema as i,isJsonSchemaObject as a,isSchema as o}from"./type-checks.mjs";import{readSchemaTypes as s}from"./metadata.mjs";import{isSetObject as c}from"@stryke/type-checks";import{getUnique as l}from"@stryke/helpers/get-unique";import{findFileExtensionSafe as u}from"@stryke/path/find";import{VALID_OBJECT_SOURCE_EXTENSIONS as d}from"@stryke/resolve/constants";import f from"defu";function p(e){let t=o(e)?e.schema:e;if(!i(t))throw TypeError(`The provided input is not a valid JSON Schema`);return t}function m(e){let t=p(e);if(!a(t))throw TypeError(`The provided input is not a valid JSON Schema object`);return t}function h(e){let t=m(e);return c(t.properties)?Object.entries(t.properties).reduce((e,[n,r])=>(r.name=n,r.required=!C(t,n),r.default=t.default?.[n]??r.default,e[n]=r,e),{}):{}}function g(e){return Object.values(h(e))}function _(e,t){let n=m(e);if(!c(n.properties))throw TypeError(`The provided schema does not have any properties`);let r=n.properties[t];if(!r)throw TypeError(`The provided schema does not have a property named "${t}"`);return{...r,name:t,required:!C(n,t),default:n.default?.[t]??r?.default}}function v(e,t,n){let r=m(e);r.properties??={},r.required??=[],n.name=t,r.properties[t]=n,r.required.includes(t)||r.required.push(t),r.required.length===0&&delete r.required}function y(e,a){let o={...e};for(let[e,s]of Object.entries(a)){let a=o[e];if(e===`required`)o[e]=l([...Array.isArray(a)?a:[],...Array.isArray(s)?s:[]]);else if(n.has(e)&&c(a)&&c(s)){let t={...a};for(let[e,n]of Object.entries(s)){let r=t[e];t[e]=i(r)&&i(n)?y(r,n):n}o[e]=t}else t.has(e)&&Array.isArray(a)&&Array.isArray(s)?o[e]=[...a,...s]:r.has(e)&&i(a)&&i(s)?o[e]=y(a,s):o[e]=s}return o}function b(...e){let t=e.map(e=>p(e));return t.length===0?{}:t.reduce((e,t)=>{let n=e.type,r=t.type;return n&&r&&n!==r?t:y(e,t)})}function x(t,n){return f(t,Object.fromEntries(e.filter(e=>n[e]!==void 0).map(e=>[e,n[e]])))}function S(e){return c(e)?e.nullable===!0?!0:s(e).includes(`null`):!1}function C(e,t){if(!e.properties?.[t])throw Error(`The property "${t}" does not exist in the parent schema.`);return!(e.required??[]).includes(t)}function w(e){return d.includes(u(e))}export{v as addProperty,p as getJsonSchema,m as getJsonSchemaObject,h as getProperties,g as getPropertiesList,_ as getProperty,C as isPropertyOptional,S as isSchemaNullable,w as isValidSchemaInputFile,b as merge,x as mergeMetadata};
2
+ //# sourceMappingURL=helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.mjs","names":[],"sources":[],"mappings":""}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./metadata-CsY3HrP2.cjs");require("./types.cjs");const t=require("./constants.cjs"),n=require("./type-checks.cjs"),r=require("./extract.cjs");exports.JSON_SCHEMA_METADATA_KEYS=t.JSON_SCHEMA_METADATA_KEYS,exports.JSON_SCHEMA_PRIMITIVE_TYPES=t.JSON_SCHEMA_PRIMITIVE_TYPES,exports.JSON_SCHEMA_TYPES=t.JSON_SCHEMA_TYPES,exports.JsonSchemaTypeNames=t.JsonSchemaTypeNames,exports.SCHEMA_ARRAY_CONCAT_KEYWORDS=t.SCHEMA_ARRAY_CONCAT_KEYWORDS,exports.SCHEMA_RECORD_KEYWORDS=t.SCHEMA_RECORD_KEYWORDS,exports.SCHEMA_SINGLE_KEYWORDS=t.SCHEMA_SINGLE_KEYWORDS,exports.addProperty=e.g,exports.applyJsonSchemaMetadata=e.t,exports.bundleReferences=r.bundleReferences,exports.extract=r.extract,exports.extractHash=r.extractHash,exports.extractJsonSchema=r.extractJsonSchema,exports.extractResolvedVariant=r.extractResolvedVariant,exports.extractSchema=r.extractSchema,exports.extractSchemaMeta=r.extractSchemaMeta,exports.extractSchemaWithSource=r.extractSchemaWithSource,exports.extractSource=r.extractSource,exports.extractTSType=r.extractTSType,exports.extractVariant=r.extractVariant,exports.formatMetaVersion=e.n,exports.generateParserCode=e.f,exports.getJsonSchema=e._,exports.getJsonSchemaObject=e.v,exports.getJsonSchemaType=e.p,exports.getPrimarySchemaType=e.r,exports.getProperties=e.y,exports.getPropertiesList=e.b,exports.getProperty=e.x,exports.isFileReference=n.isFileReference,exports.isJsonSchema=n.isJsonSchema,exports.isJsonSchemaAllOf=n.isJsonSchemaAllOf,exports.isJsonSchemaAny=n.isJsonSchemaAny,exports.isJsonSchemaAnyOf=n.isJsonSchemaAnyOf,exports.isJsonSchemaArray=n.isJsonSchemaArray,exports.isJsonSchemaBigint=n.isJsonSchemaBigint,exports.isJsonSchemaBoolean=n.isJsonSchemaBoolean,exports.isJsonSchemaDate=n.isJsonSchemaDate,exports.isJsonSchemaDecimal=n.isJsonSchemaDecimal,exports.isJsonSchemaEnum=n.isJsonSchemaEnum,exports.isJsonSchemaInteger=n.isJsonSchemaInteger,exports.isJsonSchemaKeywords=n.isJsonSchemaKeywords,exports.isJsonSchemaLiteral=n.isJsonSchemaLiteral,exports.isJsonSchemaMap=n.isJsonSchemaMap,exports.isJsonSchemaNativeEnum=n.isJsonSchemaNativeEnum,exports.isJsonSchemaNever=n.isJsonSchemaNever,exports.isJsonSchemaNull=n.isJsonSchemaNull,exports.isJsonSchemaNullable=n.isJsonSchemaNullable,exports.isJsonSchemaNumber=n.isJsonSchemaNumber,exports.isJsonSchemaObject=n.isJsonSchemaObject,exports.isJsonSchemaPrimitiveType=n.isJsonSchemaPrimitiveType,exports.isJsonSchemaPrimitiveUnion=n.isJsonSchemaPrimitiveUnion,exports.isJsonSchemaRecord=n.isJsonSchemaRecord,exports.isJsonSchemaRef=n.isJsonSchemaRef,exports.isJsonSchemaSet=n.isJsonSchemaSet,exports.isJsonSchemaString=n.isJsonSchemaString,exports.isJsonSchemaTuple=n.isJsonSchemaTuple,exports.isJsonSchemaType=n.isJsonSchemaType,exports.isJsonSchemaUndefined=n.isJsonSchemaUndefined,exports.isJsonSchemaUnion=n.isJsonSchemaUnion,exports.isJsonSchemaUnknown=n.isJsonSchemaUnknown,exports.isNullOnlyJsonSchema=n.isNullOnlyJsonSchema,exports.isPropertyOptional=e.S,exports.isSchema=n.isSchema,exports.isSchemaNullable=e.C,exports.isSchemaObject=n.isSchemaObject,exports.isSchemaOf=n.isSchemaOf,exports.isSchemaWithSource=n.isSchemaWithSource,exports.isStandardSchema=n.isStandardSchema,exports.isUntypedInput=n.isUntypedInput,exports.isUntypedInputStrict=n.isUntypedInputStrict,exports.isUntypedSchema=n.isUntypedSchema,exports.isUntypedSchemaStrict=n.isUntypedSchemaStrict,exports.isValibotSchema=n.isValibotSchema,exports.isValidSchemaInputFile=e.w,exports.merge=e.T,exports.mergeMetadata=e.E,exports.readSchemaTypes=e.i,exports.resolveMetaDescription=e.a,exports.resolveMetaDisplayName=e.o,exports.resolveMetaExample=e.s,exports.resolveMetaId=e.c,exports.resolveMetaLinks=e.l,exports.resolveMetaName=e.u,exports.resolveMetaVersion=e.d,exports.stringifyType=e.m,exports.stringifyValue=e.h;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./types.cjs");const e=require("./constants.cjs"),t=require("./type-checks.cjs"),n=require("./metadata.cjs"),r=require("./helpers.cjs"),i=require("./codegen.cjs"),a=require("./extract.cjs");exports.JSON_SCHEMA_METADATA_KEYS=e.JSON_SCHEMA_METADATA_KEYS,exports.JSON_SCHEMA_PRIMITIVE_TYPES=e.JSON_SCHEMA_PRIMITIVE_TYPES,exports.JSON_SCHEMA_TYPES=e.JSON_SCHEMA_TYPES,exports.JsonSchemaTypeNames=e.JsonSchemaTypeNames,exports.SCHEMA_ARRAY_CONCAT_KEYWORDS=e.SCHEMA_ARRAY_CONCAT_KEYWORDS,exports.SCHEMA_RECORD_KEYWORDS=e.SCHEMA_RECORD_KEYWORDS,exports.SCHEMA_SINGLE_KEYWORDS=e.SCHEMA_SINGLE_KEYWORDS,exports.addProperty=r.addProperty,exports.applyJsonSchemaMetadata=n.applyJsonSchemaMetadata,exports.bundleReferences=a.bundleReferences,exports.extract=a.extract,exports.extractHash=a.extractHash,exports.extractJsonSchema=a.extractJsonSchema,exports.extractResolvedVariant=a.extractResolvedVariant,exports.extractSchema=a.extractSchema,exports.extractSchemaWithSource=a.extractSchemaWithSource,exports.extractSource=a.extractSource,exports.extractTSType=a.extractTSType,exports.extractVariant=a.extractVariant,exports.generateParserCode=i.generateParserCode,exports.getJsonSchema=r.getJsonSchema,exports.getJsonSchemaObject=r.getJsonSchemaObject,exports.getJsonSchemaType=i.getJsonSchemaType,exports.getPrimarySchemaType=n.getPrimarySchemaType,exports.getProperties=r.getProperties,exports.getPropertiesList=r.getPropertiesList,exports.getProperty=r.getProperty,exports.isFileReference=t.isFileReference,exports.isJsonSchema=t.isJsonSchema,exports.isJsonSchemaAllOf=t.isJsonSchemaAllOf,exports.isJsonSchemaAny=t.isJsonSchemaAny,exports.isJsonSchemaAnyOf=t.isJsonSchemaAnyOf,exports.isJsonSchemaArray=t.isJsonSchemaArray,exports.isJsonSchemaBigint=t.isJsonSchemaBigint,exports.isJsonSchemaBoolean=t.isJsonSchemaBoolean,exports.isJsonSchemaDate=t.isJsonSchemaDate,exports.isJsonSchemaDecimal=t.isJsonSchemaDecimal,exports.isJsonSchemaEnum=t.isJsonSchemaEnum,exports.isJsonSchemaInteger=t.isJsonSchemaInteger,exports.isJsonSchemaKeywords=t.isJsonSchemaKeywords,exports.isJsonSchemaLiteral=t.isJsonSchemaLiteral,exports.isJsonSchemaMap=t.isJsonSchemaMap,exports.isJsonSchemaNativeEnum=t.isJsonSchemaNativeEnum,exports.isJsonSchemaNever=t.isJsonSchemaNever,exports.isJsonSchemaNull=t.isJsonSchemaNull,exports.isJsonSchemaNullable=t.isJsonSchemaNullable,exports.isJsonSchemaNumber=t.isJsonSchemaNumber,exports.isJsonSchemaObject=t.isJsonSchemaObject,exports.isJsonSchemaPrimitiveType=t.isJsonSchemaPrimitiveType,exports.isJsonSchemaPrimitiveUnion=t.isJsonSchemaPrimitiveUnion,exports.isJsonSchemaRecord=t.isJsonSchemaRecord,exports.isJsonSchemaRef=t.isJsonSchemaRef,exports.isJsonSchemaSet=t.isJsonSchemaSet,exports.isJsonSchemaString=t.isJsonSchemaString,exports.isJsonSchemaTuple=t.isJsonSchemaTuple,exports.isJsonSchemaType=t.isJsonSchemaType,exports.isJsonSchemaUndefined=t.isJsonSchemaUndefined,exports.isJsonSchemaUnion=t.isJsonSchemaUnion,exports.isJsonSchemaUnknown=t.isJsonSchemaUnknown,exports.isNullOnlyJsonSchema=t.isNullOnlyJsonSchema,exports.isPropertyOptional=r.isPropertyOptional,exports.isSchema=t.isSchema,exports.isSchemaNullable=r.isSchemaNullable,exports.isSchemaObject=t.isSchemaObject,exports.isSchemaOf=t.isSchemaOf,exports.isSchemaWithSource=t.isSchemaWithSource,exports.isStandardSchema=t.isStandardSchema,exports.isUntypedInput=t.isUntypedInput,exports.isUntypedInputStrict=t.isUntypedInputStrict,exports.isUntypedSchema=t.isUntypedSchema,exports.isUntypedSchemaStrict=t.isUntypedSchemaStrict,exports.isValibotSchema=t.isValibotSchema,exports.isValidSchemaInputFile=r.isValidSchemaInputFile,exports.merge=r.merge,exports.mergeMetadata=r.mergeMetadata,exports.readSchemaTypes=n.readSchemaTypes,exports.stringifyType=i.stringifyType,exports.stringifyValue=i.stringifyValue;
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as SCHEMA_ARRAY_CONCAT_KEYWORDS, i as JsonSchemaTypeNames, n as JSON_SCHEMA_PRIMITIVE_TYPES, o as SCHEMA_RECORD_KEYWORDS, r as JSON_SCHEMA_TYPES, s as SCHEMA_SINGLE_KEYWORDS, t as JSON_SCHEMA_METADATA_KEYS } from "./constants-u7ovYS9e.cjs";
2
- import { BaseSchemaSource, ExtractedSchema, InferExtractOptions, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Meta, MetaDeprecated, MetaInput, MetaLink, MetaValue, Schema, SchemaInput, SchemaInputVariant, SchemaInputWithMeta, SchemaMeta, SchemaMetaExample, SchemaMetaInput, SchemaOf, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource } from "./types.cjs";
1
+ import { a as SCHEMA_ARRAY_CONCAT_KEYWORDS, i as JsonSchemaTypeNames, n as JSON_SCHEMA_PRIMITIVE_TYPES, o as SCHEMA_RECORD_KEYWORDS, r as JSON_SCHEMA_TYPES, s as SCHEMA_SINGLE_KEYWORDS, t as JSON_SCHEMA_METADATA_KEYS } from "./constants-lihlIQu7.cjs";
2
+ import { BaseSchemaSource, ExtractedSchemaEnvelope, InferExtractOptions, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SchemaEnvelope, SchemaEnvelopeOf, SchemaInput, SchemaInputVariant, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource } from "./types.cjs";
3
3
  import { GenerateParserCodeOptions, generateParserCode, getJsonSchemaType, stringifyType, stringifyValue } from "./codegen.cjs";
4
- import { bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaMeta, extractSchemaWithSource, extractSource, extractTSType, extractVariant } from "./extract.cjs";
4
+ import { bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant } from "./extract.cjs";
5
5
  import { GetPropertyResult, addProperty, getJsonSchema, getJsonSchemaObject, getProperties, getPropertiesList, getProperty, isPropertyOptional, isSchemaNullable, isValidSchemaInputFile, merge, mergeMetadata } from "./helpers.cjs";
6
- import { applyJsonSchemaMetadata, formatMetaVersion, getPrimarySchemaType, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion } from "./metadata.cjs";
6
+ import { applyJsonSchemaMetadata, getPrimarySchemaType, readSchemaTypes } from "./metadata.cjs";
7
7
  import { 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, isSchema, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema } from "./type-checks.cjs";
8
8
 
9
9
  //#region src/index.d.ts
@@ -30,5 +30,5 @@ declare module "zod" {
30
30
  }
31
31
  }
32
32
  //#endregion
33
- export { BaseSchemaSource, ExtractedSchema, GenerateParserCodeOptions, GetPropertyResult, InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaTypeNames, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Meta, MetaDeprecated, MetaInput, MetaLink, MetaValue, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, Schema, SchemaInput, SchemaInputVariant, SchemaInputWithMeta, SchemaMeta, SchemaMetaExample, SchemaMetaInput, SchemaOf, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaMeta, extractSchemaWithSource, extractSource, extractTSType, extractVariant, formatMetaVersion, generateParserCode, getJsonSchema, getJsonSchemaObject, getJsonSchemaType, 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, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaInputFile, merge, mergeMetadata, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion, stringifyType, stringifyValue };
33
+ export { BaseSchemaSource, ExtractedSchemaEnvelope, GenerateParserCodeOptions, GetPropertyResult, InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaTypeNames, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, SchemaEnvelope, SchemaEnvelopeOf, SchemaInput, SchemaInputVariant, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, generateParserCode, getJsonSchema, getJsonSchemaObject, getJsonSchemaType, 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, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaInputFile, merge, mergeMetadata, readSchemaTypes, stringifyType, stringifyValue };
34
34
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as SCHEMA_ARRAY_CONCAT_KEYWORDS, i as JsonSchemaTypeNames, n as JSON_SCHEMA_PRIMITIVE_TYPES, o as SCHEMA_RECORD_KEYWORDS, r as JSON_SCHEMA_TYPES, s as SCHEMA_SINGLE_KEYWORDS, t as JSON_SCHEMA_METADATA_KEYS } from "./constants-u7ovYS9e.mjs";
2
- import { BaseSchemaSource, ExtractedSchema, InferExtractOptions, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Meta, MetaDeprecated, MetaInput, MetaLink, MetaValue, Schema, SchemaInput, SchemaInputVariant, SchemaInputWithMeta, SchemaMeta, SchemaMetaExample, SchemaMetaInput, SchemaOf, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource } from "./types.mjs";
1
+ import { a as SCHEMA_ARRAY_CONCAT_KEYWORDS, i as JsonSchemaTypeNames, n as JSON_SCHEMA_PRIMITIVE_TYPES, o as SCHEMA_RECORD_KEYWORDS, r as JSON_SCHEMA_TYPES, s as SCHEMA_SINGLE_KEYWORDS, t as JSON_SCHEMA_METADATA_KEYS } from "./constants-lihlIQu7.mjs";
2
+ import { BaseSchemaSource, ExtractedSchemaEnvelope, InferExtractOptions, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SchemaEnvelope, SchemaEnvelopeOf, SchemaInput, SchemaInputVariant, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource } from "./types.mjs";
3
3
  import { GenerateParserCodeOptions, generateParserCode, getJsonSchemaType, stringifyType, stringifyValue } from "./codegen.mjs";
4
- import { bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaMeta, extractSchemaWithSource, extractSource, extractTSType, extractVariant } from "./extract.mjs";
4
+ import { bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant } from "./extract.mjs";
5
5
  import { GetPropertyResult, addProperty, getJsonSchema, getJsonSchemaObject, getProperties, getPropertiesList, getProperty, isPropertyOptional, isSchemaNullable, isValidSchemaInputFile, merge, mergeMetadata } from "./helpers.mjs";
6
- import { applyJsonSchemaMetadata, formatMetaVersion, getPrimarySchemaType, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion } from "./metadata.mjs";
6
+ import { applyJsonSchemaMetadata, getPrimarySchemaType, readSchemaTypes } from "./metadata.mjs";
7
7
  import { 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, isSchema, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema } from "./type-checks.mjs";
8
8
 
9
9
  //#region src/index.d.ts
@@ -30,5 +30,5 @@ declare module "zod" {
30
30
  }
31
31
  }
32
32
  //#endregion
33
- export { BaseSchemaSource, ExtractedSchema, GenerateParserCodeOptions, GetPropertyResult, InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaTypeNames, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Meta, MetaDeprecated, MetaInput, MetaLink, MetaValue, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, Schema, SchemaInput, SchemaInputVariant, SchemaInputWithMeta, SchemaMeta, SchemaMetaExample, SchemaMetaInput, SchemaOf, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaMeta, extractSchemaWithSource, extractSource, extractTSType, extractVariant, formatMetaVersion, generateParserCode, getJsonSchema, getJsonSchemaObject, getJsonSchemaType, 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, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaInputFile, merge, mergeMetadata, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion, stringifyType, stringifyValue };
33
+ export { BaseSchemaSource, ExtractedSchemaEnvelope, GenerateParserCodeOptions, GetPropertyResult, InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaConditionalKeywords, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaDecimalFormat, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaIntegerFormat, JsonSchemaKeywords, JsonSchemaLike, JsonSchemaLiteral, JsonSchemaLogicKeywords, JsonSchemaMap, JsonSchemaMetadataKeywords, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaNumberFormat, JsonSchemaObject, JsonSchemaOf, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRecordPropertyNames, JsonSchemaRef, JsonSchemaSchemaSource, JsonSchemaSet, JsonSchemaString, JsonSchemaStringFormat, JsonSchemaTuple, JsonSchemaType, JsonSchemaTypeNames, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, SchemaEnvelope, SchemaEnvelopeOf, SchemaInput, SchemaInputVariant, SchemaSource, SchemaSourceInput, SchemaSourceVariant, SpecOf, StandardSchemaSchemaSource, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, bundleReferences, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, generateParserCode, getJsonSchema, getJsonSchemaObject, getJsonSchemaType, 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, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaInputFile, merge, mergeMetadata, readSchemaTypes, stringifyType, stringifyValue };
34
34
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import"./types.mjs";import{JSON_SCHEMA_METADATA_KEYS as e,JSON_SCHEMA_PRIMITIVE_TYPES as t,JSON_SCHEMA_TYPES as n,JsonSchemaTypeNames as r,SCHEMA_ARRAY_CONCAT_KEYWORDS as i,SCHEMA_RECORD_KEYWORDS as a,SCHEMA_SINGLE_KEYWORDS as o}from"./constants.mjs";import{isFileReference as s,isJsonSchema as c,isJsonSchemaAllOf as l,isJsonSchemaAny as u,isJsonSchemaAnyOf as d,isJsonSchemaArray as f,isJsonSchemaBigint as p,isJsonSchemaBoolean as m,isJsonSchemaDate as h,isJsonSchemaDecimal as g,isJsonSchemaEnum as _,isJsonSchemaInteger as v,isJsonSchemaKeywords as y,isJsonSchemaLiteral as b,isJsonSchemaMap as x,isJsonSchemaNativeEnum as S,isJsonSchemaNever as C,isJsonSchemaNull as w,isJsonSchemaNullable as T,isJsonSchemaNumber as E,isJsonSchemaObject as D,isJsonSchemaPrimitiveType as O,isJsonSchemaPrimitiveUnion as k,isJsonSchemaRecord as A,isJsonSchemaRef as j,isJsonSchemaSet as M,isJsonSchemaString as N,isJsonSchemaTuple as P,isJsonSchemaType as F,isJsonSchemaUndefined as I,isJsonSchemaUnion as L,isJsonSchemaUnknown as R,isNullOnlyJsonSchema as z,isSchema as B,isSchemaObject as V,isSchemaOf as H,isSchemaWithSource as U,isStandardSchema as W,isUntypedInput as G,isUntypedInputStrict as K,isUntypedSchema as q,isUntypedSchemaStrict as J,isValibotSchema as Y}from"./type-checks.mjs";import{C as X,E as Z,S as Q,T as $,_ as ee,a as te,b as ne,c as re,d as ie,f as ae,g as oe,h as se,i as ce,l as le,m as ue,n as de,o as fe,p as pe,r as me,s as he,t as ge,u as _e,v as ve,w as ye,x as be,y as xe}from"./metadata-DIEpQjbq.mjs";import{bundleReferences as Se,extract as Ce,extractHash as we,extractJsonSchema as Te,extractResolvedVariant as Ee,extractSchema as De,extractSchemaMeta as Oe,extractSchemaWithSource as ke,extractSource as Ae,extractTSType as je,extractVariant as Me}from"./extract.mjs";export{e as JSON_SCHEMA_METADATA_KEYS,t as JSON_SCHEMA_PRIMITIVE_TYPES,n as JSON_SCHEMA_TYPES,r as JsonSchemaTypeNames,i as SCHEMA_ARRAY_CONCAT_KEYWORDS,a as SCHEMA_RECORD_KEYWORDS,o as SCHEMA_SINGLE_KEYWORDS,oe as addProperty,ge as applyJsonSchemaMetadata,Se as bundleReferences,Ce as extract,we as extractHash,Te as extractJsonSchema,Ee as extractResolvedVariant,De as extractSchema,Oe as extractSchemaMeta,ke as extractSchemaWithSource,Ae as extractSource,je as extractTSType,Me as extractVariant,de as formatMetaVersion,ae as generateParserCode,ee as getJsonSchema,ve as getJsonSchemaObject,pe as getJsonSchemaType,me as getPrimarySchemaType,xe as getProperties,ne as getPropertiesList,be as getProperty,s as isFileReference,c as isJsonSchema,l as isJsonSchemaAllOf,u as isJsonSchemaAny,d as isJsonSchemaAnyOf,f as isJsonSchemaArray,p as isJsonSchemaBigint,m as isJsonSchemaBoolean,h as isJsonSchemaDate,g as isJsonSchemaDecimal,_ as isJsonSchemaEnum,v as isJsonSchemaInteger,y as isJsonSchemaKeywords,b as isJsonSchemaLiteral,x as isJsonSchemaMap,S as isJsonSchemaNativeEnum,C as isJsonSchemaNever,w as isJsonSchemaNull,T as isJsonSchemaNullable,E as isJsonSchemaNumber,D as isJsonSchemaObject,O as isJsonSchemaPrimitiveType,k as isJsonSchemaPrimitiveUnion,A as isJsonSchemaRecord,j as isJsonSchemaRef,M as isJsonSchemaSet,N as isJsonSchemaString,P as isJsonSchemaTuple,F as isJsonSchemaType,I as isJsonSchemaUndefined,L as isJsonSchemaUnion,R as isJsonSchemaUnknown,z as isNullOnlyJsonSchema,Q as isPropertyOptional,B as isSchema,X as isSchemaNullable,V as isSchemaObject,H as isSchemaOf,U as isSchemaWithSource,W as isStandardSchema,G as isUntypedInput,K as isUntypedInputStrict,q as isUntypedSchema,J as isUntypedSchemaStrict,Y as isValibotSchema,ye as isValidSchemaInputFile,$ as merge,Z as mergeMetadata,ce as readSchemaTypes,te as resolveMetaDescription,fe as resolveMetaDisplayName,he as resolveMetaExample,re as resolveMetaId,le as resolveMetaLinks,_e as resolveMetaName,ie as resolveMetaVersion,ue as stringifyType,se as stringifyValue};
1
+ import"./types.mjs";import{JSON_SCHEMA_METADATA_KEYS as e,JSON_SCHEMA_PRIMITIVE_TYPES as t,JSON_SCHEMA_TYPES as n,JsonSchemaTypeNames as r,SCHEMA_ARRAY_CONCAT_KEYWORDS as i,SCHEMA_RECORD_KEYWORDS as a,SCHEMA_SINGLE_KEYWORDS as o}from"./constants.mjs";import{isFileReference as s,isJsonSchema as c,isJsonSchemaAllOf as l,isJsonSchemaAny as u,isJsonSchemaAnyOf as d,isJsonSchemaArray as f,isJsonSchemaBigint as p,isJsonSchemaBoolean as m,isJsonSchemaDate as h,isJsonSchemaDecimal as g,isJsonSchemaEnum as _,isJsonSchemaInteger as v,isJsonSchemaKeywords as y,isJsonSchemaLiteral as b,isJsonSchemaMap as x,isJsonSchemaNativeEnum as S,isJsonSchemaNever as C,isJsonSchemaNull as w,isJsonSchemaNullable as T,isJsonSchemaNumber as E,isJsonSchemaObject as D,isJsonSchemaPrimitiveType as O,isJsonSchemaPrimitiveUnion as k,isJsonSchemaRecord as A,isJsonSchemaRef as j,isJsonSchemaSet as M,isJsonSchemaString as N,isJsonSchemaTuple as P,isJsonSchemaType as F,isJsonSchemaUndefined as I,isJsonSchemaUnion as L,isJsonSchemaUnknown as R,isNullOnlyJsonSchema as z,isSchema as B,isSchemaObject as V,isSchemaOf as H,isSchemaWithSource as U,isStandardSchema as W,isUntypedInput as G,isUntypedInputStrict as K,isUntypedSchema as q,isUntypedSchemaStrict as J,isValibotSchema as Y}from"./type-checks.mjs";import{applyJsonSchemaMetadata as X,getPrimarySchemaType as Z,readSchemaTypes as Q}from"./metadata.mjs";import{addProperty as $,getJsonSchema as ee,getJsonSchemaObject as te,getProperties as ne,getPropertiesList as re,getProperty as ie,isPropertyOptional as ae,isSchemaNullable as oe,isValidSchemaInputFile as se,merge as ce,mergeMetadata as le}from"./helpers.mjs";import{generateParserCode as ue,getJsonSchemaType as de,stringifyType as fe,stringifyValue as pe}from"./codegen.mjs";import{bundleReferences as me,extract as he,extractHash as ge,extractJsonSchema as _e,extractResolvedVariant as ve,extractSchema as ye,extractSchemaWithSource as be,extractSource as xe,extractTSType as Se,extractVariant as Ce}from"./extract.mjs";export{e as JSON_SCHEMA_METADATA_KEYS,t as JSON_SCHEMA_PRIMITIVE_TYPES,n as JSON_SCHEMA_TYPES,r as JsonSchemaTypeNames,i as SCHEMA_ARRAY_CONCAT_KEYWORDS,a as SCHEMA_RECORD_KEYWORDS,o as SCHEMA_SINGLE_KEYWORDS,$ as addProperty,X as applyJsonSchemaMetadata,me as bundleReferences,he as extract,ge as extractHash,_e as extractJsonSchema,ve as extractResolvedVariant,ye as extractSchema,be as extractSchemaWithSource,xe as extractSource,Se as extractTSType,Ce as extractVariant,ue as generateParserCode,ee as getJsonSchema,te as getJsonSchemaObject,de as getJsonSchemaType,Z as getPrimarySchemaType,ne as getProperties,re as getPropertiesList,ie as getProperty,s as isFileReference,c as isJsonSchema,l as isJsonSchemaAllOf,u as isJsonSchemaAny,d as isJsonSchemaAnyOf,f as isJsonSchemaArray,p as isJsonSchemaBigint,m as isJsonSchemaBoolean,h as isJsonSchemaDate,g as isJsonSchemaDecimal,_ as isJsonSchemaEnum,v as isJsonSchemaInteger,y as isJsonSchemaKeywords,b as isJsonSchemaLiteral,x as isJsonSchemaMap,S as isJsonSchemaNativeEnum,C as isJsonSchemaNever,w as isJsonSchemaNull,T as isJsonSchemaNullable,E as isJsonSchemaNumber,D as isJsonSchemaObject,O as isJsonSchemaPrimitiveType,k as isJsonSchemaPrimitiveUnion,A as isJsonSchemaRecord,j as isJsonSchemaRef,M as isJsonSchemaSet,N as isJsonSchemaString,P as isJsonSchemaTuple,F as isJsonSchemaType,I as isJsonSchemaUndefined,L as isJsonSchemaUnion,R as isJsonSchemaUnknown,z as isNullOnlyJsonSchema,ae as isPropertyOptional,B as isSchema,oe as isSchemaNullable,V as isSchemaObject,H as isSchemaOf,U as isSchemaWithSource,W as isStandardSchema,G as isUntypedInput,K as isUntypedInputStrict,q as isUntypedSchema,J as isUntypedSchemaStrict,Y as isValibotSchema,se as isValidSchemaInputFile,ce as merge,le as mergeMetadata,Q as readSchemaTypes,fe as stringifyType,pe as stringifyValue};
package/dist/metadata.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./metadata-CsY3HrP2.cjs");exports.applyJsonSchemaMetadata=e.t,exports.formatMetaVersion=e.n,exports.getPrimarySchemaType=e.r,exports.readSchemaTypes=e.i,exports.resolveMetaDescription=e.a,exports.resolveMetaDisplayName=e.o,exports.resolveMetaExample=e.s,exports.resolveMetaId=e.c,exports.resolveMetaLinks=e.l,exports.resolveMetaName=e.u,exports.resolveMetaVersion=e.d;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./constants.cjs");let t=require("@stryke/type-checks/is-set-object"),n=require("@stryke/type-checks/is-set-string");function r(n,r){if(!r||!(0,t.isSetObject)(n))return n;let i={...n},a=i;for(let t of e.JSON_SCHEMA_METADATA_KEYS){let e=r[t];e!=null&&(a[t]=e)}return i}function i(e){if(!(0,t.isSetObject)(e))return[];let r=e;return Array.isArray(r.type)?r.type.filter(e=>(0,n.isSetString)(e)):(0,n.isSetString)(r.type)&&r.type!==`object`&&r.type!==`array`?[r.type]:[]}function a(e){if((0,t.isSetObject)(e))return i(e).find(e=>e!==`null`)}exports.applyJsonSchemaMetadata=r,exports.getPrimarySchemaType=a,exports.readSchemaTypes=i;
@@ -1,4 +1,4 @@
1
- import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaPrimitiveType, Meta, MetaLink, MetaValue, SchemaMeta, SchemaMetaExample } from "./types.cjs";
1
+ import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaPrimitiveType } from "./types.cjs";
2
2
 
3
3
  //#region src/metadata.d.ts
4
4
  /**
@@ -26,69 +26,6 @@ declare function readSchemaTypes(schema?: JsonSchema): JsonSchemaPrimitiveType[]
26
26
  * @returns The primary non-null JSON Schema type name, or `undefined` if none is found.
27
27
  */
28
28
  declare function getPrimarySchemaType(schema?: JsonSchema): JsonSchemaPrimitiveType | undefined;
29
- declare function formatMetaVersion(value: string | number | Date): string;
30
- /**
31
- * Extracts the version information from a given input, which can be a string, number, or Date object. The function returns a string representation of the version in the format "YYYYMMDD" for Date inputs, or as a string for valid timestamp numbers. If the input is a string, it is returned as-is. If the input is invalid or not provided, a default version of "1.0" is returned.
32
- *
33
- * @param input - The input from which to extract the version. It can be a string, number, undefined, or Date object.
34
- * @returns A string representing the extracted version information.
35
- */
36
- declare function resolveMetaVersion<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string | number | Date>): MetaValue<TSpec, string>;
37
- /**
38
- * Resolves a metadata name using explicit input, metadata, or schema fallbacks.
39
- *
40
- * @param schema - The JSON Schema fragment to read fallback values from.
41
- * @param meta - Metadata values that may already include a name.
42
- * @param input - An explicit name value to prioritize when provided.
43
- * @returns The resolved metadata name.
44
- */
45
- declare function resolveMetaName<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
46
- /**
47
- * Resolves a stable metadata identifier in the format `<name>@<version>`.
48
- *
49
- * @param schema - The JSON Schema fragment used to infer fallback values.
50
- * @param meta - Metadata values used to resolve name and version.
51
- * @returns The resolved metadata identifier, or a generated id when no name is available.
52
- */
53
- declare function resolveMetaId<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>): MetaValue<TSpec, string>;
54
- /**
55
- * Resolves a human-readable display name for metadata.
56
- *
57
- * @param schema - The JSON Schema fragment to read fallback display values from.
58
- * @param meta - Metadata values that may already include a display name.
59
- * @param input - An explicit display name value to prioritize when provided.
60
- * @returns The resolved metadata display name.
61
- */
62
- declare function resolveMetaDisplayName<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
63
- /**
64
- * Resolves a metadata description from explicit input, metadata, or schema values.
65
- *
66
- * @param template - A template string used to generate a default description when no explicit description is provided.
67
- * @param schema - The JSON Schema fragment to read fallback description values from.
68
- * @param meta - Metadata values that may already include a description.
69
- * @param input - An explicit description value to prioritize when provided.
70
- * @returns The resolved description, if available.
71
- */
72
- declare function resolveMetaDescription<TSpec>(template: string, schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
73
- /**
74
- * Resolves and normalizes metadata examples into a consistent object format.
75
- *
76
- * @typeParam TSpec - The schema specification type associated with example values.
77
- * @param schema - The JSON Schema fragment to read fallback examples from.
78
- * @param meta - Metadata values that may already include examples.
79
- * @param input - Explicit examples to prioritize when provided.
80
- * @returns A normalized list of examples with generated descriptions when needed.
81
- */
82
- declare function resolveMetaExample<TSpec>(schema: JsonSchema, meta: Partial<SchemaMeta<TSpec>>, input?: SchemaMetaExample<TSpec> | MetaValue<TSpec, SchemaMetaExample<TSpec>[]>): MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
83
- /**
84
- * Resolves and de-duplicates metadata links from input, metadata, and schema docs.
85
- *
86
- * @param schema - The JSON Schema fragment to read fallback documentation links from.
87
- * @param meta - Metadata values that may already include links.
88
- * @param input - Explicit links to prioritize when provided.
89
- * @returns A unique list of metadata links.
90
- */
91
- declare function resolveMetaLinks<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, MetaLink[]>): MetaValue<TSpec, MetaLink[]>;
92
29
  //#endregion
93
- export { applyJsonSchemaMetadata, formatMetaVersion, getPrimarySchemaType, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion };
30
+ export { applyJsonSchemaMetadata, getPrimarySchemaType, readSchemaTypes };
94
31
  //# sourceMappingURL=metadata.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.cts","names":[],"sources":["../src/metadata.ts"],"mappings":";;;;;AAuDA;;;;;iBAAgB,uBAAA,CACd,MAAA,EAAQ,UAAA,EACR,QAAA,EAAU,0BAAA,eACT,UAAA;;;;;;;;;AAAU;iBA0BG,eAAA,CACd,MAAA,GAAS,UAAA,GACR,uBAAuB;;;;;;;iBA6BV,oBAAA,CACd,MAAA,GAAS,UAAA,GACR,uBAAuB;AAAA,iBAQV,iBAAA,CAAkB,KAA6B,oBAAJ,IAAI;AAV/D;;;;;;AAAA,iBA4BgB,kBAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,IACnB,KAAA,GAAQ,SAAA,CAAU,KAAA,oBAAyB,IAAA,IAC1C,SAAA,CAAU,KAAA;;AA9Ba;AAQ1B;;;;AAA+D;AAkB/D;iBAsBgB,eAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,IACnB,KAAA,GAAQ,SAAA,CAAU,KAAA,YACjB,SAAA,CAAU,KAAA;;;;;;;;iBAqBG,aAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,KAClB,SAAA,CAAU,KAAA;;;;;;;;;iBA0BG,sBAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,IACnB,KAAA,GAAQ,SAAA,CAAU,KAAA,YACjB,SAAA,CAAU,KAAA;;;;;;;;;;iBAyBG,sBAAA,QACd,QAAA,UACA,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,IACnB,KAAA,GAAQ,SAAA,CAAU,KAAA,YACjB,SAAA,CAAU,KAAA;AAxFb;;;;;;;;;AAAA,iBAsIgB,kBAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,UAAA,CAAW,KAAA,IACzB,KAAA,GACI,iBAAA,CAAkB,KAAA,IAClB,SAAA,CAAU,KAAA,EAAO,iBAAA,CAAkB,KAAA,OACtC,SAAA,CAAU,KAAA,EAAO,iBAAA,CAAkB,KAAA;;;;;;;;;iBAoCtB,gBAAA,QACd,MAAA,EAAQ,UAAA,EACR,IAAA,EAAM,OAAA,CAAQ,IAAA,CAAK,KAAA,IACnB,KAAA,GAAQ,SAAA,CAAU,KAAA,EAAO,QAAA,MACxB,SAAA,CAAU,KAAA,EAAO,QAAA"}
1
+ {"version":3,"file":"metadata.d.cts","names":[],"sources":["../src/metadata.ts"],"mappings":";;;;;AAuCA;;;;;iBAAgB,uBAAA,CACd,MAAA,EAAQ,UAAA,EACR,QAAA,EAAU,0BAAA,eACT,UAAA;;;;;;;;;AAAU;iBA0BG,eAAA,CACd,MAAA,GAAS,UAAA,GACR,uBAAuB;;;;;;;iBA6BV,oBAAA,CACd,MAAA,GAAS,UAAA,GACR,uBAAuB"}
@@ -1,4 +1,4 @@
1
- import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaPrimitiveType, Meta, MetaLink, MetaValue, SchemaMeta, SchemaMetaExample } from "./types.mjs";
1
+ import { JsonSchema, JsonSchemaMetadataKeywords, JsonSchemaPrimitiveType } from "./types.mjs";
2
2
 
3
3
  //#region src/metadata.d.ts
4
4
  /**
@@ -26,69 +26,6 @@ declare function readSchemaTypes(schema?: JsonSchema): JsonSchemaPrimitiveType[]
26
26
  * @returns The primary non-null JSON Schema type name, or `undefined` if none is found.
27
27
  */
28
28
  declare function getPrimarySchemaType(schema?: JsonSchema): JsonSchemaPrimitiveType | undefined;
29
- declare function formatMetaVersion(value: string | number | Date): string;
30
- /**
31
- * Extracts the version information from a given input, which can be a string, number, or Date object. The function returns a string representation of the version in the format "YYYYMMDD" for Date inputs, or as a string for valid timestamp numbers. If the input is a string, it is returned as-is. If the input is invalid or not provided, a default version of "1.0" is returned.
32
- *
33
- * @param input - The input from which to extract the version. It can be a string, number, undefined, or Date object.
34
- * @returns A string representing the extracted version information.
35
- */
36
- declare function resolveMetaVersion<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string | number | Date>): MetaValue<TSpec, string>;
37
- /**
38
- * Resolves a metadata name using explicit input, metadata, or schema fallbacks.
39
- *
40
- * @param schema - The JSON Schema fragment to read fallback values from.
41
- * @param meta - Metadata values that may already include a name.
42
- * @param input - An explicit name value to prioritize when provided.
43
- * @returns The resolved metadata name.
44
- */
45
- declare function resolveMetaName<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
46
- /**
47
- * Resolves a stable metadata identifier in the format `<name>@<version>`.
48
- *
49
- * @param schema - The JSON Schema fragment used to infer fallback values.
50
- * @param meta - Metadata values used to resolve name and version.
51
- * @returns The resolved metadata identifier, or a generated id when no name is available.
52
- */
53
- declare function resolveMetaId<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>): MetaValue<TSpec, string>;
54
- /**
55
- * Resolves a human-readable display name for metadata.
56
- *
57
- * @param schema - The JSON Schema fragment to read fallback display values from.
58
- * @param meta - Metadata values that may already include a display name.
59
- * @param input - An explicit display name value to prioritize when provided.
60
- * @returns The resolved metadata display name.
61
- */
62
- declare function resolveMetaDisplayName<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
63
- /**
64
- * Resolves a metadata description from explicit input, metadata, or schema values.
65
- *
66
- * @param template - A template string used to generate a default description when no explicit description is provided.
67
- * @param schema - The JSON Schema fragment to read fallback description values from.
68
- * @param meta - Metadata values that may already include a description.
69
- * @param input - An explicit description value to prioritize when provided.
70
- * @returns The resolved description, if available.
71
- */
72
- declare function resolveMetaDescription<TSpec>(template: string, schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, string>): MetaValue<TSpec, string>;
73
- /**
74
- * Resolves and normalizes metadata examples into a consistent object format.
75
- *
76
- * @typeParam TSpec - The schema specification type associated with example values.
77
- * @param schema - The JSON Schema fragment to read fallback examples from.
78
- * @param meta - Metadata values that may already include examples.
79
- * @param input - Explicit examples to prioritize when provided.
80
- * @returns A normalized list of examples with generated descriptions when needed.
81
- */
82
- declare function resolveMetaExample<TSpec>(schema: JsonSchema, meta: Partial<SchemaMeta<TSpec>>, input?: SchemaMetaExample<TSpec> | MetaValue<TSpec, SchemaMetaExample<TSpec>[]>): MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
83
- /**
84
- * Resolves and de-duplicates metadata links from input, metadata, and schema docs.
85
- *
86
- * @param schema - The JSON Schema fragment to read fallback documentation links from.
87
- * @param meta - Metadata values that may already include links.
88
- * @param input - Explicit links to prioritize when provided.
89
- * @returns A unique list of metadata links.
90
- */
91
- declare function resolveMetaLinks<TSpec>(schema: JsonSchema, meta: Partial<Meta<TSpec>>, input?: MetaValue<TSpec, MetaLink[]>): MetaValue<TSpec, MetaLink[]>;
92
29
  //#endregion
93
- export { applyJsonSchemaMetadata, formatMetaVersion, getPrimarySchemaType, readSchemaTypes, resolveMetaDescription, resolveMetaDisplayName, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaVersion };
30
+ export { applyJsonSchemaMetadata, getPrimarySchemaType, readSchemaTypes };
94
31
  //# sourceMappingURL=metadata.d.mts.map
package/dist/metadata.mjs CHANGED
@@ -1 +1,2 @@
1
- import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./metadata-DIEpQjbq.mjs";export{l as applyJsonSchemaMetadata,a as formatMetaVersion,s as getPrimarySchemaType,r as readSchemaTypes,e as resolveMetaDescription,o as resolveMetaDisplayName,c as resolveMetaExample,t as resolveMetaId,i as resolveMetaLinks,u as resolveMetaName,n as resolveMetaVersion};
1
+ import{JSON_SCHEMA_METADATA_KEYS as e}from"./constants.mjs";import{isSetObject as t}from"@stryke/type-checks/is-set-object";import{isSetString as n}from"@stryke/type-checks/is-set-string";function r(n,r){if(!r||!t(n))return n;let i={...n},a=i;for(let t of e){let e=r[t];e!=null&&(a[t]=e)}return i}function i(e){if(!t(e))return[];let r=e;return Array.isArray(r.type)?r.type.filter(e=>n(e)):n(r.type)&&r.type!==`object`&&r.type!==`array`?[r.type]:[]}function a(e){if(t(e))return i(e).find(e=>e!==`null`)}export{r as applyJsonSchemaMetadata,a as getPrimarySchemaType,i as readSchemaTypes};
2
+ //# sourceMappingURL=metadata.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { ExtractedSchema, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaKeywords, JsonSchemaLiteral, JsonSchemaMap, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRef, JsonSchemaSet, JsonSchemaString, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Schema as Schema$1, SchemaOf } from "./types.cjs";
1
+ import { ExtractedSchemaEnvelope, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaKeywords, JsonSchemaLiteral, JsonSchemaMap, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRef, JsonSchemaSet, JsonSchemaString, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SchemaEnvelope, SchemaEnvelopeOf } from "./types.cjs";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  import { InputObject, Schema } from "untyped";
4
4
  import { BaseSchema } from "valibot";
@@ -304,28 +304,28 @@ declare function isUntypedInputStrict(input: unknown): input is InputObject;
304
304
  * @param input - The value to check.
305
305
  * @returns True if the input is a Powerlines Schema object, false otherwise.
306
306
  */
307
- declare function isSchema(input: unknown): input is Schema$1;
307
+ declare function isSchema(input: unknown): input is SchemaEnvelope;
308
308
  /**
309
309
  * Type guard for Powerlines Schema objects with a specific type specification.
310
310
  *
311
311
  * @param input - The value to check.
312
312
  * @returns True if the input is a Powerlines Schema object with the specified type specification, false otherwise.
313
313
  */
314
- declare function isSchemaOf<TSpec>(input: unknown): input is SchemaOf<TSpec>;
314
+ declare function isSchemaOf<TSpec>(input: unknown): input is SchemaEnvelopeOf<TSpec>;
315
315
  /**
316
316
  * Type guard for extracted schema objects that include source information.
317
317
  *
318
318
  * @param input - The value to check.
319
319
  * @returns True if the input is a SchemaWithSource object, false otherwise.
320
320
  */
321
- declare function isSchemaWithSource(input: unknown): input is ExtractedSchema;
321
+ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnvelope;
322
322
  /**
323
323
  * Type guard for Powerlines Schemas that are in Object form.
324
324
  *
325
325
  * @param input - The value to check.
326
326
  * @returns True if the input is a Powerlines Schema object in Object form, false otherwise.
327
327
  */
328
- declare function isSchemaObject(input: unknown): input is Schema$1<JsonSchemaObject>;
328
+ declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
329
329
  //#endregion
330
330
  export { 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, isSchema, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema };
331
331
  //# sourceMappingURL=type-checks.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-checks.d.cts","names":[],"sources":["../src/type-checks.ts"],"mappings":";;;;;;;;;AA8EA;;;;iBAAgB,eAAA,CAAgB,KAAA,QAAa,KAAA,IAAS,aAAa;;;;AAAA;AAsCnE;;iBAAgB,yBAAA,CACd,KAAA,YACC,KAAA,IAAS,uBAAuB;;;;;;AAAA;iBAanB,gBAAA,CAAiB,KAAA,YAAiB,KAAA,IAAS,cAAc;;;;;;;iBAiRzD,oBAAA,CACd,KAAA,YACC,KAAA,IAAS,kBAAkB;AAnR2C;AAiRzE;;;;;AAjRyE,iBAiSzD,eAAA,CAAgB,KAA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emaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaKeywords, JsonSchemaLiteral, JsonSchemaMap, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRef, JsonSchemaSet, JsonSchemaString, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, Schema as Schema$1, SchemaOf } from "./types.mjs";
1
+ import { ExtractedSchemaEnvelope, JsonSchema, JsonSchemaAllOf, JsonSchemaAny, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBigint, JsonSchemaBoolean, JsonSchemaDate, JsonSchemaDecimal, JsonSchemaEnum, JsonSchemaInteger, JsonSchemaKeywords, JsonSchemaLiteral, JsonSchemaMap, JsonSchemaNativeEnum, JsonSchemaNever, JsonSchemaNull, JsonSchemaNullable, JsonSchemaNumber, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaPrimitiveUnion, JsonSchemaRecord, JsonSchemaRef, JsonSchemaSet, JsonSchemaString, JsonSchemaTuple, JsonSchemaType, JsonSchemaUndefined, JsonSchemaUnion, JsonSchemaUnknown, SchemaEnvelope, SchemaEnvelopeOf } from "./types.mjs";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  import { InputObject, Schema } from "untyped";
4
4
  import { BaseSchema } from "valibot";
@@ -304,28 +304,28 @@ declare function isUntypedInputStrict(input: unknown): input is InputObject;
304
304
  * @param input - The value to check.
305
305
  * @returns True if the input is a Powerlines Schema object, false otherwise.
306
306
  */
307
- declare function isSchema(input: unknown): input is Schema$1;
307
+ declare function isSchema(input: unknown): input is SchemaEnvelope;
308
308
  /**
309
309
  * Type guard for Powerlines Schema objects with a specific type specification.
310
310
  *
311
311
  * @param input - The value to check.
312
312
  * @returns True if the input is a Powerlines Schema object with the specified type specification, false otherwise.
313
313
  */
314
- declare function isSchemaOf<TSpec>(input: unknown): input is SchemaOf<TSpec>;
314
+ declare function isSchemaOf<TSpec>(input: unknown): input is SchemaEnvelopeOf<TSpec>;
315
315
  /**
316
316
  * Type guard for extracted schema objects that include source information.
317
317
  *
318
318
  * @param input - The value to check.
319
319
  * @returns True if the input is a SchemaWithSource object, false otherwise.
320
320
  */
321
- declare function isSchemaWithSource(input: unknown): input is ExtractedSchema;
321
+ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnvelope;
322
322
  /**
323
323
  * Type guard for Powerlines Schemas that are in Object form.
324
324
  *
325
325
  * @param input - The value to check.
326
326
  * @returns True if the input is a Powerlines Schema object in Object form, false otherwise.
327
327
  */
328
- declare function isSchemaObject(input: unknown): input is Schema$1<JsonSchemaObject>;
328
+ declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
329
329
  //#endregion
330
330
  export { 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, isSchema, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema };
331
331
  //# sourceMappingURL=type-checks.d.mts.map