@standard-community/standard-json 0.3.0-rc.4 → 0.3.0-rc.5
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-mqrnTEOr.cjs → effect-BdLFlbKK.cjs} +6 -4
- package/dist/effect-upmsZks7.js +12 -0
- package/dist/{index-KjAKLWUk.cjs → index-CeYTpXSN.cjs} +3 -3
- package/dist/{index-C9VwJCyn.js → index-TV3as6RE.js} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/valibot-DW5hlWjk.cjs +14 -0
- package/dist/valibot-f_9pHZHS.js +12 -0
- package/dist/zod-CQLI5Nm9.js +23 -0
- package/dist/zod-CTiow-o0.cjs +25 -0
- package/package.json +1 -1
- package/dist/effect-BXKsAFl6.js +0 -10
- package/dist/valibot-B7IzN3Bh.js +0 -12
- package/dist/valibot-DoBgUS7l.cjs +0 -14
- package/dist/zod-CgqyA5eu.cjs +0 -25
- package/dist/zod-Cq7zJ_U9.js +0 -23
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CeYTpXSN.cjs');
|
|
4
4
|
|
|
5
5
|
async function getToJsonSchemaFn() {
|
|
6
|
-
|
|
6
|
+
try {
|
|
7
|
+
const { JSONSchema } = await import('effect');
|
|
8
|
+
return (schema) => JSONSchema.make(schema);
|
|
9
|
+
} catch {
|
|
7
10
|
throw new Error(index.errorMessageWrapper('Missing dependencies "effect".'));
|
|
8
|
-
}
|
|
9
|
-
return (schema) => JSONSchema.make(schema);
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
exports.default = getToJsonSchemaFn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { e as errorMessageWrapper } from './index-TV3as6RE.js';
|
|
2
|
+
|
|
3
|
+
async function getToJsonSchemaFn() {
|
|
4
|
+
try {
|
|
5
|
+
const { JSONSchema } = await import('effect');
|
|
6
|
+
return (schema) => JSONSchema.make(schema);
|
|
7
|
+
} catch {
|
|
8
|
+
throw new Error(errorMessageWrapper('Missing dependencies "effect".'));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { getToJsonSchemaFn as default };
|
|
@@ -7,11 +7,11 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
7
7
|
case "arktype":
|
|
8
8
|
return (await Promise.resolve().then(function () { return require('./arktype-BCitmcgd.cjs'); })).default();
|
|
9
9
|
case "effect":
|
|
10
|
-
return (await Promise.resolve().then(function () { return require('./effect-
|
|
10
|
+
return (await Promise.resolve().then(function () { return require('./effect-BdLFlbKK.cjs'); })).default();
|
|
11
11
|
case "valibot":
|
|
12
|
-
return (await Promise.resolve().then(function () { return require('./valibot-
|
|
12
|
+
return (await Promise.resolve().then(function () { return require('./valibot-DW5hlWjk.cjs'); })).default();
|
|
13
13
|
case "zod":
|
|
14
|
-
return (await Promise.resolve().then(function () { return require('./zod-
|
|
14
|
+
return (await Promise.resolve().then(function () { return require('./zod-CTiow-o0.cjs'); })).default();
|
|
15
15
|
default:
|
|
16
16
|
throw new Error(
|
|
17
17
|
errorMessageWrapper(`Unsupported schema vendor "${vendor}".`)
|
|
@@ -5,11 +5,11 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
5
5
|
case "arktype":
|
|
6
6
|
return (await import('./arktype-DUDu5yUt.js')).default();
|
|
7
7
|
case "effect":
|
|
8
|
-
return (await import('./effect-
|
|
8
|
+
return (await import('./effect-upmsZks7.js')).default();
|
|
9
9
|
case "valibot":
|
|
10
|
-
return (await import('./valibot-
|
|
10
|
+
return (await import('./valibot-f_9pHZHS.js')).default();
|
|
11
11
|
case "zod":
|
|
12
|
-
return (await import('./zod-
|
|
12
|
+
return (await import('./zod-CQLI5Nm9.js')).default();
|
|
13
13
|
default:
|
|
14
14
|
throw new Error(
|
|
15
15
|
errorMessageWrapper(`Unsupported schema vendor "${vendor}".`)
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as toJsonSchema } from './index-
|
|
1
|
+
export { t as toJsonSchema } from './index-TV3as6RE.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CeYTpXSN.cjs');
|
|
4
|
+
|
|
5
|
+
async function getToJsonSchemaFn() {
|
|
6
|
+
try {
|
|
7
|
+
const { toJsonSchema } = await import('@valibot/to-json-schema');
|
|
8
|
+
return toJsonSchema;
|
|
9
|
+
} catch {
|
|
10
|
+
throw new Error(index.errorMessageWrapper('Missing dependencies "@valibot/to-json-schema".'));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.default = getToJsonSchemaFn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { e as errorMessageWrapper } from './index-TV3as6RE.js';
|
|
2
|
+
|
|
3
|
+
async function getToJsonSchemaFn() {
|
|
4
|
+
try {
|
|
5
|
+
const { toJsonSchema } = await import('@valibot/to-json-schema');
|
|
6
|
+
return toJsonSchema;
|
|
7
|
+
} catch {
|
|
8
|
+
throw new Error(errorMessageWrapper('Missing dependencies "@valibot/to-json-schema".'));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { getToJsonSchemaFn as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { e as errorMessageWrapper } from './index-TV3as6RE.js';
|
|
2
|
+
|
|
3
|
+
async function getToJsonSchemaFn() {
|
|
4
|
+
return async (schema, options) => {
|
|
5
|
+
let handler;
|
|
6
|
+
if ("_zod" in schema) {
|
|
7
|
+
try {
|
|
8
|
+
handler = await import('zod/v4/core').then((mod) => mod.toJSONSchema);
|
|
9
|
+
} catch {
|
|
10
|
+
throw new Error(errorMessageWrapper('Missing dependencies "zod v4".'));
|
|
11
|
+
}
|
|
12
|
+
} else {
|
|
13
|
+
try {
|
|
14
|
+
handler = await import('zod-to-json-schema').then((mod) => mod.zodToJsonSchema);
|
|
15
|
+
} catch {
|
|
16
|
+
throw new Error(errorMessageWrapper('Missing dependencies "zod-to-json-schema".'));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return handler(schema, options);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { getToJsonSchemaFn as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CeYTpXSN.cjs');
|
|
4
|
+
|
|
5
|
+
async function getToJsonSchemaFn() {
|
|
6
|
+
return async (schema, options) => {
|
|
7
|
+
let handler;
|
|
8
|
+
if ("_zod" in schema) {
|
|
9
|
+
try {
|
|
10
|
+
handler = await import('zod/v4/core').then((mod) => mod.toJSONSchema);
|
|
11
|
+
} catch {
|
|
12
|
+
throw new Error(index.errorMessageWrapper('Missing dependencies "zod v4".'));
|
|
13
|
+
}
|
|
14
|
+
} else {
|
|
15
|
+
try {
|
|
16
|
+
handler = await import('zod-to-json-schema').then((mod) => mod.zodToJsonSchema);
|
|
17
|
+
} catch {
|
|
18
|
+
throw new Error(index.errorMessageWrapper('Missing dependencies "zod-to-json-schema".'));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return handler(schema, options);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.default = getToJsonSchemaFn;
|
package/package.json
CHANGED
package/dist/effect-BXKsAFl6.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { e as errorMessageWrapper } from './index-C9VwJCyn.js';
|
|
2
|
-
|
|
3
|
-
async function getToJsonSchemaFn() {
|
|
4
|
-
const { JSONSchema } = await import('effect').catch(() => {
|
|
5
|
-
throw new Error(errorMessageWrapper('Missing dependencies "effect".'));
|
|
6
|
-
});
|
|
7
|
-
return (schema) => JSONSchema.make(schema);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { getToJsonSchemaFn as default };
|
package/dist/valibot-B7IzN3Bh.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { e as errorMessageWrapper } from './index-C9VwJCyn.js';
|
|
2
|
-
|
|
3
|
-
async function getToJsonSchemaFn() {
|
|
4
|
-
const { toJsonSchema } = await import('@valibot/to-json-schema').catch(() => {
|
|
5
|
-
throw new Error(
|
|
6
|
-
errorMessageWrapper('Missing dependencies "@valibot/to-json-schema".')
|
|
7
|
-
);
|
|
8
|
-
});
|
|
9
|
-
return toJsonSchema;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { getToJsonSchemaFn as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-KjAKLWUk.cjs');
|
|
4
|
-
|
|
5
|
-
async function getToJsonSchemaFn() {
|
|
6
|
-
const { toJsonSchema } = await import('@valibot/to-json-schema').catch(() => {
|
|
7
|
-
throw new Error(
|
|
8
|
-
index.errorMessageWrapper('Missing dependencies "@valibot/to-json-schema".')
|
|
9
|
-
);
|
|
10
|
-
});
|
|
11
|
-
return toJsonSchema;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.default = getToJsonSchemaFn;
|
package/dist/zod-CgqyA5eu.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-KjAKLWUk.cjs');
|
|
4
|
-
|
|
5
|
-
async function getToJsonSchemaFn() {
|
|
6
|
-
return async (schema, options) => {
|
|
7
|
-
let handler;
|
|
8
|
-
if ("_zod" in schema) {
|
|
9
|
-
handler = await import('zod/v4/core').catch(() => {
|
|
10
|
-
throw new Error(
|
|
11
|
-
index.errorMessageWrapper('Missing dependencies "zod v4".')
|
|
12
|
-
);
|
|
13
|
-
}).then((mod) => mod.toJSONSchema);
|
|
14
|
-
} else {
|
|
15
|
-
handler = await import('zod-to-json-schema').catch(() => {
|
|
16
|
-
throw new Error(
|
|
17
|
-
index.errorMessageWrapper('Missing dependencies "zod-to-json-schema".')
|
|
18
|
-
);
|
|
19
|
-
}).then((mod) => mod.zodToJsonSchema);
|
|
20
|
-
}
|
|
21
|
-
return handler(schema, options);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
exports.default = getToJsonSchemaFn;
|
package/dist/zod-Cq7zJ_U9.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { e as errorMessageWrapper } from './index-C9VwJCyn.js';
|
|
2
|
-
|
|
3
|
-
async function getToJsonSchemaFn() {
|
|
4
|
-
return async (schema, options) => {
|
|
5
|
-
let handler;
|
|
6
|
-
if ("_zod" in schema) {
|
|
7
|
-
handler = await import('zod/v4/core').catch(() => {
|
|
8
|
-
throw new Error(
|
|
9
|
-
errorMessageWrapper('Missing dependencies "zod v4".')
|
|
10
|
-
);
|
|
11
|
-
}).then((mod) => mod.toJSONSchema);
|
|
12
|
-
} else {
|
|
13
|
-
handler = await import('zod-to-json-schema').catch(() => {
|
|
14
|
-
throw new Error(
|
|
15
|
-
errorMessageWrapper('Missing dependencies "zod-to-json-schema".')
|
|
16
|
-
);
|
|
17
|
-
}).then((mod) => mod.zodToJsonSchema);
|
|
18
|
-
}
|
|
19
|
-
return handler(schema, options);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { getToJsonSchemaFn as default };
|