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.
@@ -1,4 +1,4 @@
1
- import { t as tryImport } from './index-CAcLDIRJ.js';
1
+ import { t as tryImport } from './index-Cx_srAfm.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { JSONSchema } = await tryImport(import('effect'), "effect");
@@ -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--zg3C1LQ.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
26
+ return import('./effect-D2vKoLgT.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
27
27
  case "sury":
28
- return import('./sury-s6Akl-oc.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
28
+ return import('./sury-DaaR_vre.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
29
29
  case "valibot":
30
- return import('./valibot-DBCeetIe.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
30
+ return import('./valibot-iYGh1vpl.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
31
31
  case "zod":
32
- return import('./zod-Bw_60DVU.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
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 { type Infer, type InferIn, type JSONSchema7 as JsonSchema, StandardSchemaV1 as Schema, initToJsonSchemaSyncVendor, jsonSchema, strictJsonSchema, toJsonSchema, toJsonSchemaSync, validate };
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-CAcLDIRJ.js';
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 { t as tryImport } from './index-CAcLDIRJ.js';
1
+ import { t as tryImport } from './index-Cx_srAfm.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { toJSONSchema } = await tryImport(import('sury'), "sury");
@@ -1,4 +1,4 @@
1
- import { t as tryImport } from './index-CAcLDIRJ.js';
1
+ import { t as tryImport } from './index-Cx_srAfm.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { toJsonSchema } = await tryImport(import('@valibot/to-json-schema'), "@valibot/to-json-schema");
@@ -1,4 +1,4 @@
1
- import { m as missingDependenciesUrl } from './index-CAcLDIRJ.js';
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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xsschema",
3
3
  "type": "module",
4
- "version": "0.4.0-beta.4",
4
+ "version": "0.4.0-beta.6",
5
5
  "description": "extra-small, Standard Schema-based alternative to typeschema.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",