xsschema 0.4.0-beta.4 → 0.4.0-beta.6
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/{effect--zg3C1LQ.js → effect-D2vKoLgT.js} +1 -1
- package/dist/{index-CAcLDIRJ.js → index-Cx_srAfm.js} +4 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/{sury-s6Akl-oc.js → sury-DaaR_vre.js} +1 -1
- package/dist/{valibot-DBCeetIe.js → valibot-iYGh1vpl.js} +1 -1
- package/dist/{zod-Bw_60DVU.js → zod-D6g6461c.js} +2 -2
- package/package.json +1 -1
|
@@ -23,13 +23,13 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
23
23
|
case "arktype":
|
|
24
24
|
return import('./arktype-C-GObzDh.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
|
|
25
25
|
case "effect":
|
|
26
|
-
return import('./effect
|
|
26
|
+
return import('./effect-D2vKoLgT.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
|
|
27
27
|
case "sury":
|
|
28
|
-
return import('./sury-
|
|
28
|
+
return import('./sury-DaaR_vre.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
|
|
29
29
|
case "valibot":
|
|
30
|
-
return import('./valibot-
|
|
30
|
+
return import('./valibot-iYGh1vpl.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
|
|
31
31
|
case "zod":
|
|
32
|
-
return import('./zod-
|
|
32
|
+
return import('./zod-D6g6461c.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
|
|
33
33
|
default:
|
|
34
34
|
throw new Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`);
|
|
35
35
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -245,4 +245,5 @@ declare const toJsonSchemaSync: (schema: StandardSchemaV1) => JSONSchema7;
|
|
|
245
245
|
/** @see {@link https://github.com/standard-schema/standard-schema#how-do-i-accept-standard-schemas-in-my-library} */
|
|
246
246
|
declare const validate: <T extends StandardSchemaV1>(schema: T, input: StandardSchemaV1.InferInput<T>) => Promise<StandardSchemaV1.InferOutput<T>>;
|
|
247
247
|
|
|
248
|
-
export {
|
|
248
|
+
export { StandardSchemaV1 as Schema, initToJsonSchemaSyncVendor, jsonSchema, strictJsonSchema, toJsonSchema, toJsonSchemaSync, validate };
|
|
249
|
+
export type { Infer, InferIn, JSONSchema7 as JsonSchema };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as initToJsonSchemaSyncVendor, j as jsonSchema, s as strictJsonSchema, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-
|
|
1
|
+
export { i as initToJsonSchemaSyncVendor, j as jsonSchema, s as strictJsonSchema, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-Cx_srAfm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as missingDependenciesUrl } from './index-
|
|
1
|
+
import { m as missingDependenciesUrl } from './index-Cx_srAfm.js';
|
|
2
2
|
|
|
3
3
|
const getToJsonSchemaFn = async () => {
|
|
4
4
|
let zodV4toJSONSchema = (_schema) => {
|
|
@@ -9,7 +9,7 @@ const getToJsonSchemaFn = async () => {
|
|
|
9
9
|
};
|
|
10
10
|
try {
|
|
11
11
|
const { toJSONSchema } = await import('zod/v4/core');
|
|
12
|
-
zodV4toJSONSchema = toJSONSchema;
|
|
12
|
+
zodV4toJSONSchema = ((schema) => toJSONSchema(schema, { target: "draft-7" }));
|
|
13
13
|
} catch (err) {
|
|
14
14
|
if (err instanceof Error)
|
|
15
15
|
console.error(err.message);
|