json-schema-to-zod
Advanced tools
Comparing version 2.0.10 to 2.0.11
@@ -65,3 +65,3 @@ "use strict"; | ||
jsonOrPath = jsonOrPath.trim(); | ||
if ((0, fs_1.statSync)(jsonOrPath, { throwIfNoEntry: false })?.isFile()) { | ||
if (jsonOrPath.length < 255 && (0, fs_1.statSync)(jsonOrPath, { throwIfNoEntry: false })?.isFile()) { | ||
jsonOrPath = (0, fs_1.readFileSync)(jsonOrPath, "utf-8"); | ||
@@ -68,0 +68,0 @@ } |
@@ -61,3 +61,3 @@ import { statSync, readFileSync } from "fs"; | ||
jsonOrPath = jsonOrPath.trim(); | ||
if (statSync(jsonOrPath, { throwIfNoEntry: false })?.isFile()) { | ||
if (jsonOrPath.length < 255 && statSync(jsonOrPath, { throwIfNoEntry: false })?.isFile()) { | ||
jsonOrPath = readFileSync(jsonOrPath, "utf-8"); | ||
@@ -64,0 +64,0 @@ } |
{ | ||
"name": "json-schema-to-zod", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"description": "Converts JSON schema objects or files into Zod schemas", | ||
@@ -59,2 +59,2 @@ "types": "./dist/types/index.d.ts", | ||
} | ||
} | ||
} |
95190