@standard-community/standard-json 0.3.4 → 0.3.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/{vendors/arktype.cjs → arktype-dE563TQ0.cjs} +1 -1
- package/dist/{vendors/effect.cjs → effect-IriD2QG7.cjs} +4 -3
- package/dist/{vendors/effect.js → effect-QlVUlMFu.js} +2 -1
- package/dist/index-CLddUTqr.js +66 -0
- package/dist/index-aBd5wZAR.cjs +70 -0
- package/dist/index.cjs +4 -52
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2 -52
- package/dist/sury-79aC8rnF.cjs +15 -0
- package/dist/sury-CWZTCd75.js +13 -0
- package/dist/{vendors/valibot.js → valibot--1zFm7rT.js} +2 -1
- package/dist/{vendors/valibot.cjs → valibot-DKumHSJb.cjs} +4 -3
- package/dist/{vendors/zod.cjs → zod-BSYBZsr2.cjs} +5 -4
- package/dist/{vendors/zod.js → zod-Bwrt9trS.js} +2 -1
- package/package.json +18 -54
- package/dist/utils-1JaZ8JC_.d.ts +0 -5
- package/dist/utils-8OktpmW4.js +0 -13
- package/dist/utils-CeR2367j.cjs +0 -17
- package/dist/vendors/arktype.d.cts +0 -6
- package/dist/vendors/arktype.d.ts +0 -6
- package/dist/vendors/effect.d.cts +0 -6
- package/dist/vendors/effect.d.ts +0 -6
- package/dist/vendors/valibot.d.cts +0 -6
- package/dist/vendors/valibot.d.ts +0 -6
- package/dist/vendors/zod.d.cts +0 -6
- package/dist/vendors/zod.d.ts +0 -6
- /package/dist/{vendors/arktype.js → arktype-aI7TBD0R.js} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('./index-aBd5wZAR.cjs');
|
|
4
|
+
require('quansync');
|
|
4
5
|
|
|
5
6
|
async function getToJsonSchemaFn() {
|
|
6
7
|
try {
|
|
7
8
|
const { JSONSchema } = await import('effect');
|
|
8
9
|
return (schema) => JSONSchema.make(schema);
|
|
9
10
|
} catch {
|
|
10
|
-
throw new
|
|
11
|
+
throw new index.MissingDependencyError("effect");
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
exports.default = getToJsonSchemaFn;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { quansync } from 'quansync';
|
|
2
|
+
|
|
3
|
+
const validationMapper = /* @__PURE__ */ new Map();
|
|
4
|
+
class UnsupportedVendorError extends Error {
|
|
5
|
+
constructor(vendor) {
|
|
6
|
+
super(`standard-json: Unsupported schema vendor "${vendor}".`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
class MissingDependencyError extends Error {
|
|
10
|
+
constructor(packageName) {
|
|
11
|
+
super(`standard-json: Missing dependencies "${packageName}".`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const getToJsonSchemaFn = async (vendor) => {
|
|
16
|
+
const cached = validationMapper.get(vendor);
|
|
17
|
+
if (cached) {
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
let vendorFnPromise;
|
|
21
|
+
switch (vendor) {
|
|
22
|
+
case "arktype":
|
|
23
|
+
vendorFnPromise = (await import('./arktype-aI7TBD0R.js')).default();
|
|
24
|
+
break;
|
|
25
|
+
case "effect":
|
|
26
|
+
vendorFnPromise = (await import('./effect-QlVUlMFu.js')).default();
|
|
27
|
+
break;
|
|
28
|
+
case "sury":
|
|
29
|
+
vendorFnPromise = (await import('./sury-CWZTCd75.js')).default();
|
|
30
|
+
break;
|
|
31
|
+
case "typebox":
|
|
32
|
+
vendorFnPromise = (await import('./typebox-Dei93FPO.js')).default();
|
|
33
|
+
break;
|
|
34
|
+
case "valibot":
|
|
35
|
+
vendorFnPromise = (await import('./valibot--1zFm7rT.js')).default();
|
|
36
|
+
break;
|
|
37
|
+
case "zod":
|
|
38
|
+
vendorFnPromise = (await import('./zod-Bwrt9trS.js')).default();
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
throw new UnsupportedVendorError(vendor);
|
|
42
|
+
}
|
|
43
|
+
const vendorFn = await vendorFnPromise;
|
|
44
|
+
validationMapper.set(vendor, vendorFn);
|
|
45
|
+
return vendorFn;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const toJsonSchema = quansync({
|
|
49
|
+
sync: (schema, options) => {
|
|
50
|
+
const vendor = schema["~standard"].vendor;
|
|
51
|
+
const fn = validationMapper.get(vendor);
|
|
52
|
+
if (!fn) {
|
|
53
|
+
throw new UnsupportedVendorError(vendor);
|
|
54
|
+
}
|
|
55
|
+
return fn(schema, options);
|
|
56
|
+
},
|
|
57
|
+
async: async (schema, options) => {
|
|
58
|
+
const fn = await getToJsonSchemaFn(schema["~standard"].vendor);
|
|
59
|
+
return fn(schema, options);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
function loadVendor(vendor, fn) {
|
|
63
|
+
validationMapper.set(vendor, fn);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { MissingDependencyError as M, loadVendor as l, toJsonSchema as t };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var quansync = require('quansync');
|
|
4
|
+
|
|
5
|
+
const validationMapper = /* @__PURE__ */ new Map();
|
|
6
|
+
class UnsupportedVendorError extends Error {
|
|
7
|
+
constructor(vendor) {
|
|
8
|
+
super(`standard-json: Unsupported schema vendor "${vendor}".`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
class MissingDependencyError extends Error {
|
|
12
|
+
constructor(packageName) {
|
|
13
|
+
super(`standard-json: Missing dependencies "${packageName}".`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const getToJsonSchemaFn = async (vendor) => {
|
|
18
|
+
const cached = validationMapper.get(vendor);
|
|
19
|
+
if (cached) {
|
|
20
|
+
return cached;
|
|
21
|
+
}
|
|
22
|
+
let vendorFnPromise;
|
|
23
|
+
switch (vendor) {
|
|
24
|
+
case "arktype":
|
|
25
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./arktype-dE563TQ0.cjs'); })).default();
|
|
26
|
+
break;
|
|
27
|
+
case "effect":
|
|
28
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./effect-IriD2QG7.cjs'); })).default();
|
|
29
|
+
break;
|
|
30
|
+
case "sury":
|
|
31
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./sury-79aC8rnF.cjs'); })).default();
|
|
32
|
+
break;
|
|
33
|
+
case "typebox":
|
|
34
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./typebox-DYb9QD5O.cjs'); })).default();
|
|
35
|
+
break;
|
|
36
|
+
case "valibot":
|
|
37
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./valibot-DKumHSJb.cjs'); })).default();
|
|
38
|
+
break;
|
|
39
|
+
case "zod":
|
|
40
|
+
vendorFnPromise = (await Promise.resolve().then(function () { return require('./zod-BSYBZsr2.cjs'); })).default();
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
throw new UnsupportedVendorError(vendor);
|
|
44
|
+
}
|
|
45
|
+
const vendorFn = await vendorFnPromise;
|
|
46
|
+
validationMapper.set(vendor, vendorFn);
|
|
47
|
+
return vendorFn;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const toJsonSchema = quansync.quansync({
|
|
51
|
+
sync: (schema, options) => {
|
|
52
|
+
const vendor = schema["~standard"].vendor;
|
|
53
|
+
const fn = validationMapper.get(vendor);
|
|
54
|
+
if (!fn) {
|
|
55
|
+
throw new UnsupportedVendorError(vendor);
|
|
56
|
+
}
|
|
57
|
+
return fn(schema, options);
|
|
58
|
+
},
|
|
59
|
+
async: async (schema, options) => {
|
|
60
|
+
const fn = await getToJsonSchemaFn(schema["~standard"].vendor);
|
|
61
|
+
return fn(schema, options);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
function loadVendor(vendor, fn) {
|
|
65
|
+
validationMapper.set(vendor, fn);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
exports.MissingDependencyError = MissingDependencyError;
|
|
69
|
+
exports.loadVendor = loadVendor;
|
|
70
|
+
exports.toJsonSchema = toJsonSchema;
|
package/dist/index.cjs
CHANGED
|
@@ -1,57 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var index = require('./index-aBd5wZAR.cjs');
|
|
4
|
+
require('quansync');
|
|
5
5
|
|
|
6
|
-
function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, default: e }); }
|
|
7
6
|
|
|
8
|
-
const getToJsonSchemaFn = async (vendor) => {
|
|
9
|
-
const cached = utils.validationMapper.get(vendor);
|
|
10
|
-
if (cached) {
|
|
11
|
-
return cached;
|
|
12
|
-
}
|
|
13
|
-
let vendorFnPromise;
|
|
14
|
-
switch (vendor) {
|
|
15
|
-
case "arktype":
|
|
16
|
-
vendorFnPromise = (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./vendors/arktype.cjs')); })).default();
|
|
17
|
-
break;
|
|
18
|
-
case "effect":
|
|
19
|
-
vendorFnPromise = (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./vendors/effect.cjs')); })).default();
|
|
20
|
-
break;
|
|
21
|
-
case "typebox":
|
|
22
|
-
vendorFnPromise = (await Promise.resolve().then(function () { return require('./typebox-DYb9QD5O.cjs'); })).default();
|
|
23
|
-
break;
|
|
24
|
-
case "valibot":
|
|
25
|
-
vendorFnPromise = (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./vendors/valibot.cjs')); })).default();
|
|
26
|
-
break;
|
|
27
|
-
case "zod":
|
|
28
|
-
vendorFnPromise = (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./vendors/zod.cjs')); })).default();
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
throw new utils.UnsupportedVendorError(vendor);
|
|
32
|
-
}
|
|
33
|
-
const vendorFn = await vendorFnPromise;
|
|
34
|
-
utils.validationMapper.set(vendor, vendorFn);
|
|
35
|
-
return vendorFn;
|
|
36
|
-
};
|
|
37
7
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const vendor = schema["~standard"].vendor;
|
|
41
|
-
const fn = utils.validationMapper.get(vendor);
|
|
42
|
-
if (!fn) {
|
|
43
|
-
throw new utils.UnsupportedVendorError(vendor);
|
|
44
|
-
}
|
|
45
|
-
return fn(schema, options);
|
|
46
|
-
},
|
|
47
|
-
async: async (schema, options) => {
|
|
48
|
-
const fn = await getToJsonSchemaFn(schema["~standard"].vendor);
|
|
49
|
-
return fn(schema, options);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function loadVendor(vendor, fn) {
|
|
53
|
-
utils.validationMapper.set(vendor, fn);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
exports.loadVendor = loadVendor;
|
|
57
|
-
exports.toJsonSchema = toJsonSchema;
|
|
8
|
+
exports.loadVendor = index.loadVendor;
|
|
9
|
+
exports.toJsonSchema = index.toJsonSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as quansync from 'quansync';
|
|
2
2
|
import * as json_schema from 'json-schema';
|
|
3
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
type ToJsonSchemaFn = (schema: unknown, options?: Record<string, unknown>) => JSONSchema7 | Promise<JSONSchema7>;
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Converts a Standard Schema to a JSON schema.
|
|
@@ -9,4 +11,5 @@ import { T as ToJsonSchemaFn } from './utils-1JaZ8JC_.js';
|
|
|
9
11
|
declare const toJsonSchema: quansync.QuansyncFn<json_schema.JSONSchema7 | Promise<json_schema.JSONSchema7>, [schema: StandardSchemaV1<unknown, unknown>, options?: Record<string, unknown> | undefined]>;
|
|
10
12
|
declare function loadVendor(vendor: string, fn: ToJsonSchemaFn): void;
|
|
11
13
|
|
|
12
|
-
export {
|
|
14
|
+
export { loadVendor, toJsonSchema };
|
|
15
|
+
export type { ToJsonSchemaFn };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as quansync from 'quansync';
|
|
2
2
|
import * as json_schema from 'json-schema';
|
|
3
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
type ToJsonSchemaFn = (schema: unknown, options?: Record<string, unknown>) => JSONSchema7 | Promise<JSONSchema7>;
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Converts a Standard Schema to a JSON schema.
|
|
@@ -9,4 +11,5 @@ import { T as ToJsonSchemaFn } from './utils-1JaZ8JC_.js';
|
|
|
9
11
|
declare const toJsonSchema: quansync.QuansyncFn<json_schema.JSONSchema7 | Promise<json_schema.JSONSchema7>, [schema: StandardSchemaV1<unknown, unknown>, options?: Record<string, unknown> | undefined]>;
|
|
10
12
|
declare function loadVendor(vendor: string, fn: ToJsonSchemaFn): void;
|
|
11
13
|
|
|
12
|
-
export {
|
|
14
|
+
export { loadVendor, toJsonSchema };
|
|
15
|
+
export type { ToJsonSchemaFn };
|
package/dist/index.js
CHANGED
|
@@ -1,52 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const getToJsonSchemaFn = async (vendor) => {
|
|
5
|
-
const cached = validationMapper.get(vendor);
|
|
6
|
-
if (cached) {
|
|
7
|
-
return cached;
|
|
8
|
-
}
|
|
9
|
-
let vendorFnPromise;
|
|
10
|
-
switch (vendor) {
|
|
11
|
-
case "arktype":
|
|
12
|
-
vendorFnPromise = (await import('./vendors/arktype.js')).default();
|
|
13
|
-
break;
|
|
14
|
-
case "effect":
|
|
15
|
-
vendorFnPromise = (await import('./vendors/effect.js')).default();
|
|
16
|
-
break;
|
|
17
|
-
case "typebox":
|
|
18
|
-
vendorFnPromise = (await import('./typebox-Dei93FPO.js')).default();
|
|
19
|
-
break;
|
|
20
|
-
case "valibot":
|
|
21
|
-
vendorFnPromise = (await import('./vendors/valibot.js')).default();
|
|
22
|
-
break;
|
|
23
|
-
case "zod":
|
|
24
|
-
vendorFnPromise = (await import('./vendors/zod.js')).default();
|
|
25
|
-
break;
|
|
26
|
-
default:
|
|
27
|
-
throw new UnsupportedVendorError(vendor);
|
|
28
|
-
}
|
|
29
|
-
const vendorFn = await vendorFnPromise;
|
|
30
|
-
validationMapper.set(vendor, vendorFn);
|
|
31
|
-
return vendorFn;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const toJsonSchema = quansync({
|
|
35
|
-
sync: (schema, options) => {
|
|
36
|
-
const vendor = schema["~standard"].vendor;
|
|
37
|
-
const fn = validationMapper.get(vendor);
|
|
38
|
-
if (!fn) {
|
|
39
|
-
throw new UnsupportedVendorError(vendor);
|
|
40
|
-
}
|
|
41
|
-
return fn(schema, options);
|
|
42
|
-
},
|
|
43
|
-
async: async (schema, options) => {
|
|
44
|
-
const fn = await getToJsonSchemaFn(schema["~standard"].vendor);
|
|
45
|
-
return fn(schema, options);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
function loadVendor(vendor, fn) {
|
|
49
|
-
validationMapper.set(vendor, fn);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { loadVendor, toJsonSchema };
|
|
1
|
+
export { l as loadVendor, t as toJsonSchema } from './index-CLddUTqr.js';
|
|
2
|
+
import 'quansync';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-aBd5wZAR.cjs');
|
|
4
|
+
require('quansync');
|
|
5
|
+
|
|
6
|
+
async function getToJsonSchemaFn() {
|
|
7
|
+
try {
|
|
8
|
+
const { toJSONSchema } = await import('sury');
|
|
9
|
+
return toJSONSchema;
|
|
10
|
+
} catch {
|
|
11
|
+
throw new index.MissingDependencyError("sury");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.default = getToJsonSchemaFn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { M as MissingDependencyError } from './index-CLddUTqr.js';
|
|
2
|
+
import 'quansync';
|
|
3
|
+
|
|
4
|
+
async function getToJsonSchemaFn() {
|
|
5
|
+
try {
|
|
6
|
+
const { toJSONSchema } = await import('sury');
|
|
7
|
+
return toJSONSchema;
|
|
8
|
+
} catch {
|
|
9
|
+
throw new MissingDependencyError("sury");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { getToJsonSchemaFn as default };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('./index-aBd5wZAR.cjs');
|
|
4
|
+
require('quansync');
|
|
4
5
|
|
|
5
6
|
async function getToJsonSchemaFn() {
|
|
6
7
|
try {
|
|
7
8
|
const { toJsonSchema } = await import('@valibot/to-json-schema');
|
|
8
9
|
return toJsonSchema;
|
|
9
10
|
} catch {
|
|
10
|
-
throw new
|
|
11
|
+
throw new index.MissingDependencyError("@valibot/to-json-schema");
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
exports.default = getToJsonSchemaFn;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('./index-aBd5wZAR.cjs');
|
|
4
|
+
require('quansync');
|
|
4
5
|
|
|
5
|
-
const zodv4Error = new
|
|
6
|
+
const zodv4Error = new index.MissingDependencyError("zod v4");
|
|
6
7
|
async function getToJsonSchemaFn() {
|
|
7
8
|
return async (schema, options) => {
|
|
8
9
|
let handler;
|
|
@@ -18,11 +19,11 @@ async function getToJsonSchemaFn() {
|
|
|
18
19
|
const mod = await import('zod-to-json-schema');
|
|
19
20
|
handler = mod.zodToJsonSchema;
|
|
20
21
|
} catch {
|
|
21
|
-
throw new
|
|
22
|
+
throw new index.MissingDependencyError("zod-to-json-schema");
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
return handler(schema, options);
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
exports.default = getToJsonSchemaFn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standard-community/standard-json",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -28,66 +28,27 @@
|
|
|
28
28
|
"url": "https://github.com/standard-community/standard-json/issues"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"default": "./dist/index.js"
|
|
35
|
-
},
|
|
36
|
-
"require": {
|
|
37
|
-
"types": "./dist/index.d.cts",
|
|
38
|
-
"default": "./dist/index.cjs"
|
|
39
|
-
}
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
40
34
|
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"default": "./dist/vendors/arktype.js"
|
|
45
|
-
},
|
|
46
|
-
"require": {
|
|
47
|
-
"types": "./dist/vendors/arktype.d.cts",
|
|
48
|
-
"default": "./dist/vendors/arktype.cjs"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"./effect": {
|
|
52
|
-
"import": {
|
|
53
|
-
"types": "./dist/vendors/effect.d.ts",
|
|
54
|
-
"default": "./dist/vendors/effect.js"
|
|
55
|
-
},
|
|
56
|
-
"require": {
|
|
57
|
-
"types": "./dist/vendors/effect.d.cts",
|
|
58
|
-
"default": "./dist/vendors/effect.cjs"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"./valibot": {
|
|
62
|
-
"import": {
|
|
63
|
-
"types": "./dist/vendors/valibot.d.ts",
|
|
64
|
-
"default": "./dist/vendors/valibot.js"
|
|
65
|
-
},
|
|
66
|
-
"require": {
|
|
67
|
-
"types": "./dist/vendors/valibot.d.cts",
|
|
68
|
-
"default": "./dist/vendors/valibot.cjs"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"./zod": {
|
|
72
|
-
"import": {
|
|
73
|
-
"types": "./dist/vendors/zod.d.ts",
|
|
74
|
-
"default": "./dist/vendors/zod.js"
|
|
75
|
-
},
|
|
76
|
-
"require": {
|
|
77
|
-
"types": "./dist/vendors/zod.d.cts",
|
|
78
|
-
"default": "./dist/vendors/zod.cjs"
|
|
79
|
-
}
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/index.d.cts",
|
|
37
|
+
"default": "./dist/index.cjs"
|
|
80
38
|
}
|
|
81
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"quansync": "^0.2.11"
|
|
42
|
+
},
|
|
82
43
|
"peerDependencies": {
|
|
83
44
|
"@standard-schema/spec": "^1.0.0",
|
|
84
45
|
"@types/json-schema": "^7.0.15",
|
|
85
46
|
"@valibot/to-json-schema": "^1.3.0",
|
|
86
47
|
"arktype": "^2.1.20",
|
|
87
|
-
"effect": "^3.
|
|
48
|
+
"effect": "^3.20.0",
|
|
88
49
|
"typebox": "^1.0.17",
|
|
89
|
-
"
|
|
90
|
-
"valibot": "^1.
|
|
50
|
+
"sury": "^10.0.0",
|
|
51
|
+
"valibot": "^1.4.2",
|
|
91
52
|
"zod": "^3.25.0 || ^4.0.0",
|
|
92
53
|
"zod-to-json-schema": "^3.24.5"
|
|
93
54
|
},
|
|
@@ -104,6 +65,9 @@
|
|
|
104
65
|
"typebox": {
|
|
105
66
|
"optional": true
|
|
106
67
|
},
|
|
68
|
+
"sury": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
107
71
|
"valibot": {
|
|
108
72
|
"optional": true
|
|
109
73
|
},
|
|
@@ -117,9 +81,9 @@
|
|
|
117
81
|
"devDependencies": {
|
|
118
82
|
"@biomejs/biome": "^2.0.4",
|
|
119
83
|
"@types/node": "^24.3.1",
|
|
120
|
-
"pkgroll": "^2.
|
|
84
|
+
"pkgroll": "^2.28.1",
|
|
121
85
|
"typescript": "^5.8.3",
|
|
122
|
-
"vitest": "^3.2.
|
|
86
|
+
"vitest": "^3.2.6"
|
|
123
87
|
},
|
|
124
88
|
"scripts": {
|
|
125
89
|
"build": "pkgroll --clean-dist",
|
package/dist/utils-1JaZ8JC_.d.ts
DELETED
package/dist/utils-8OktpmW4.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const validationMapper = /* @__PURE__ */ new Map();
|
|
2
|
-
class UnsupportedVendorError extends Error {
|
|
3
|
-
constructor(vendor) {
|
|
4
|
-
super(`standard-json: Unsupported schema vendor "${vendor}".`);
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class MissingDependencyError extends Error {
|
|
8
|
-
constructor(packageName) {
|
|
9
|
-
super(`standard-json: Missing dependencies "${packageName}".`);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { MissingDependencyError as M, UnsupportedVendorError as U, validationMapper as v };
|
package/dist/utils-CeR2367j.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const validationMapper = /* @__PURE__ */ new Map();
|
|
4
|
-
class UnsupportedVendorError extends Error {
|
|
5
|
-
constructor(vendor) {
|
|
6
|
-
super(`standard-json: Unsupported schema vendor "${vendor}".`);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
class MissingDependencyError extends Error {
|
|
10
|
-
constructor(packageName) {
|
|
11
|
-
super(`standard-json: Missing dependencies "${packageName}".`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
exports.MissingDependencyError = MissingDependencyError;
|
|
16
|
-
exports.UnsupportedVendorError = UnsupportedVendorError;
|
|
17
|
-
exports.validationMapper = validationMapper;
|
package/dist/vendors/effect.d.ts
DELETED
package/dist/vendors/zod.d.cts
DELETED
package/dist/vendors/zod.d.ts
DELETED
|
File without changes
|