xsschema 0.2.0 → 0.2.2

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-BeZ6D_oD.js';
1
+ import { t as tryImport } from './index-C-E_CfaN.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { JSONSchema } = await tryImport(import('effect'), "effect");
@@ -10,9 +10,11 @@ const getToJsonSchemaFn = async (vendor) => {
10
10
  case "arktype":
11
11
  return import('./arktype-C-GObzDh.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
12
12
  case "effect":
13
- return import('./effect-AvyXEvwH.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
13
+ return import('./effect-D-9STIhm.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
14
+ case "sury":
15
+ return import('./sury-KxK2jCkG.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
14
16
  case "valibot":
15
- return import('./valibot-BI4iQMg3.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
17
+ return import('./valibot-DJYmUlOb.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
16
18
  case "zod":
17
19
  return import('./zod-CxRm5Gac.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
18
20
  default:
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { i as initToJsonSchemaSyncVendor, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-BeZ6D_oD.js';
1
+ export { i as initToJsonSchemaSyncVendor, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-C-E_CfaN.js';
@@ -0,0 +1,8 @@
1
+ import { t as tryImport } from './index-C-E_CfaN.js';
2
+
3
+ const getToJsonSchemaFn = async () => {
4
+ const { toJSONSchema } = await tryImport(import('sury'), "sury");
5
+ return (schema) => toJSONSchema(schema);
6
+ };
7
+
8
+ export { getToJsonSchemaFn };
@@ -1,4 +1,4 @@
1
- import { t as tryImport } from './index-BeZ6D_oD.js';
1
+ import { t as tryImport } from './index-C-E_CfaN.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { toJsonSchema } = await tryImport(import('@valibot/to-json-schema'), "@valibot/to-json-schema");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xsschema",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "description": "extra-small, Standard Schema-based alternative to typeschema.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "@zod/mini": "^4.0.0-beta",
36
36
  "arktype": "^2.1.16",
37
37
  "effect": "^3.14.5",
38
+ "sury": "^10.0.0-rc",
38
39
  "zod": "^3.24.3 || ^4.0.0-beta",
39
40
  "zod-to-json-schema": "^3.24.5"
40
41
  },
@@ -51,6 +52,9 @@
51
52
  "effect": {
52
53
  "optional": true
53
54
  },
55
+ "sury": {
56
+ "optional": true
57
+ },
54
58
  "zod": {
55
59
  "optional": true
56
60
  },
@@ -65,6 +69,7 @@
65
69
  "@zod/mini": "^4.0.0-beta.20250420T053007",
66
70
  "arktype": "^2.1.16",
67
71
  "effect": "^3.14.5",
72
+ "sury": "^10.0.0-rc.4",
68
73
  "valibot": "^1.0.0",
69
74
  "zod": "^3.24.3",
70
75
  "zod-to-json-schema": "^3.24.5",