@standard-community/standard-json 0.3.0-rc.2 → 0.3.0-rc.3
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-Bvx52kW3.js → effect-BHXCUs57.js} +1 -1
- package/dist/{effect-C8fjlj5o.cjs → effect-Btg6OWP3.cjs} +1 -1
- package/dist/{index-BBK5urhS.js → index-BCoFb8WC.js} +4 -4
- package/dist/{index-DvrVjqKS.cjs → index-Bx2xBXfI.cjs} +4 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{valibot-dqIC-dYU.js → valibot-B3sSM057.js} +1 -1
- package/dist/{valibot-BUY58gEv.cjs → valibot-D9XXvyYJ.cjs} +1 -1
- package/dist/{zod-BXV2kwOE.js → zod-6IWvQABX.js} +6 -5
- package/dist/{zod-DfeEqb6D.cjs → zod-P2Lea6ZA.cjs} +6 -5
- package/package.json +1 -1
|
@@ -12,11 +12,11 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
12
12
|
case "arktype":
|
|
13
13
|
return (await import('./arktype-DUDu5yUt.js')).default();
|
|
14
14
|
case "effect":
|
|
15
|
-
return (await import('./effect-
|
|
15
|
+
return (await import('./effect-BHXCUs57.js')).default();
|
|
16
16
|
case "valibot":
|
|
17
|
-
return (await import('./valibot-
|
|
17
|
+
return (await import('./valibot-B3sSM057.js')).default();
|
|
18
18
|
case "zod":
|
|
19
|
-
return (await import('./zod-
|
|
19
|
+
return (await import('./zod-6IWvQABX.js')).default();
|
|
20
20
|
default:
|
|
21
21
|
throw new Error(
|
|
22
22
|
errorMessageWrapper(`Unsupported schema vendor "${vendor}".`)
|
|
@@ -28,4 +28,4 @@ const toJsonSchema = (schema, options) => getToJsonSchemaFn(schema["~standard"].
|
|
|
28
28
|
(toJsonSchema2) => toJsonSchema2(schema, options)
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
export { toJsonSchema as a, tryImport as t };
|
|
31
|
+
export { toJsonSchema as a, errorMessageWrapper as e, tryImport as t };
|
|
@@ -14,11 +14,11 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
14
14
|
case "arktype":
|
|
15
15
|
return (await Promise.resolve().then(function () { return require('./arktype-BCitmcgd.cjs'); })).default();
|
|
16
16
|
case "effect":
|
|
17
|
-
return (await Promise.resolve().then(function () { return require('./effect-
|
|
17
|
+
return (await Promise.resolve().then(function () { return require('./effect-Btg6OWP3.cjs'); })).default();
|
|
18
18
|
case "valibot":
|
|
19
|
-
return (await Promise.resolve().then(function () { return require('./valibot-
|
|
19
|
+
return (await Promise.resolve().then(function () { return require('./valibot-D9XXvyYJ.cjs'); })).default();
|
|
20
20
|
case "zod":
|
|
21
|
-
return (await Promise.resolve().then(function () { return require('./zod-
|
|
21
|
+
return (await Promise.resolve().then(function () { return require('./zod-P2Lea6ZA.cjs'); })).default();
|
|
22
22
|
default:
|
|
23
23
|
throw new Error(
|
|
24
24
|
errorMessageWrapper(`Unsupported schema vendor "${vendor}".`)
|
|
@@ -30,5 +30,6 @@ const toJsonSchema = (schema, options) => getToJsonSchemaFn(schema["~standard"].
|
|
|
30
30
|
(toJsonSchema2) => toJsonSchema2(schema, options)
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
exports.errorMessageWrapper = errorMessageWrapper;
|
|
33
34
|
exports.toJsonSchema = toJsonSchema;
|
|
34
35
|
exports.tryImport = tryImport;
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as toJsonSchema } from './index-
|
|
1
|
+
export { a as toJsonSchema } from './index-BCoFb8WC.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tryImport } from './index-
|
|
1
|
+
import { t as tryImport, e as errorMessageWrapper } from './index-BCoFb8WC.js';
|
|
2
2
|
|
|
3
3
|
async function getToJsonSchemaFn() {
|
|
4
4
|
return async (schema, options) => {
|
|
@@ -8,10 +8,11 @@ async function getToJsonSchemaFn() {
|
|
|
8
8
|
(mod) => mod.toJSONSchema
|
|
9
9
|
);
|
|
10
10
|
} else {
|
|
11
|
-
handler = await
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
handler = await import('zod-to-json-schema').catch(() => {
|
|
12
|
+
throw new Error(
|
|
13
|
+
errorMessageWrapper('Missing dependencies "zod-to-json-schema".')
|
|
14
|
+
);
|
|
15
|
+
}).then(
|
|
15
16
|
(mod) => mod.zodToJsonSchema
|
|
16
17
|
);
|
|
17
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Bx2xBXfI.cjs');
|
|
4
4
|
|
|
5
5
|
async function getToJsonSchemaFn() {
|
|
6
6
|
return async (schema, options) => {
|
|
@@ -10,10 +10,11 @@ async function getToJsonSchemaFn() {
|
|
|
10
10
|
(mod) => mod.toJSONSchema
|
|
11
11
|
);
|
|
12
12
|
} else {
|
|
13
|
-
handler = await
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
handler = await import('zod-to-json-schema').catch(() => {
|
|
14
|
+
throw new Error(
|
|
15
|
+
index.errorMessageWrapper('Missing dependencies "zod-to-json-schema".')
|
|
16
|
+
);
|
|
17
|
+
}).then(
|
|
17
18
|
(mod) => mod.zodToJsonSchema
|
|
18
19
|
);
|
|
19
20
|
}
|