zod 4.2.0 → 4.2.1
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/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type * as JSONSchema from "../core/json-schema.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _checks from "./checks.js";
|
|
3
|
+
import * as _iso from "./iso.js";
|
|
4
|
+
import * as _schemas from "./schemas.js";
|
|
3
5
|
import type { ZodNumber, ZodString, ZodType } from "./schemas.js";
|
|
4
6
|
|
|
7
|
+
// Local z object to avoid circular dependency with ../index.js
|
|
8
|
+
const z = {
|
|
9
|
+
..._schemas,
|
|
10
|
+
..._checks,
|
|
11
|
+
iso: _iso,
|
|
12
|
+
};
|
|
13
|
+
|
|
5
14
|
type JSONSchemaVersion = "draft-2020-12" | "draft-7" | "draft-4" | "openapi-3.0";
|
|
6
15
|
|
|
7
16
|
interface FromJSONSchemaParams {
|
package/src/v4/core/versions.ts
CHANGED
|
@@ -24,7 +24,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.fromJSONSchema = fromJSONSchema;
|
|
27
|
-
const
|
|
27
|
+
const _checks = __importStar(require("./checks.cjs"));
|
|
28
|
+
const _iso = __importStar(require("./iso.cjs"));
|
|
29
|
+
const _schemas = __importStar(require("./schemas.cjs"));
|
|
30
|
+
// Local z object to avoid circular dependency with ../index.js
|
|
31
|
+
const z = {
|
|
32
|
+
..._schemas,
|
|
33
|
+
..._checks,
|
|
34
|
+
iso: _iso,
|
|
35
|
+
};
|
|
28
36
|
function detectVersion(schema, defaultTarget) {
|
|
29
37
|
const $schema = schema.$schema;
|
|
30
38
|
if ($schema === "https://json-schema.org/draft/2020-12/schema") {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _checks from "./checks.js";
|
|
2
|
+
import * as _iso from "./iso.js";
|
|
3
|
+
import * as _schemas from "./schemas.js";
|
|
4
|
+
// Local z object to avoid circular dependency with ../index.js
|
|
5
|
+
const z = {
|
|
6
|
+
..._schemas,
|
|
7
|
+
..._checks,
|
|
8
|
+
iso: _iso,
|
|
9
|
+
};
|
|
2
10
|
function detectVersion(schema, defaultTarget) {
|
|
3
11
|
const $schema = schema.$schema;
|
|
4
12
|
if ($schema === "https://json-schema.org/draft/2020-12/schema") {
|
package/v4/core/versions.cjs
CHANGED
package/v4/core/versions.js
CHANGED