toolcraft-openapi 0.0.532 → 0.0.534
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/composition.json
CHANGED
|
@@ -99,7 +99,7 @@ fetching.
|
|
|
99
99
|
`isJsonValue(value, options)` checks JSON data without invoking getters or
|
|
100
100
|
serialization hooks. It rejects cycles, sparse arrays, non-finite numbers and
|
|
101
101
|
non-JSON prototypes. Defaults bound the tree to 10,000 nodes and depth 64.
|
|
102
|
-
Use `maxNodes` for larger bounded documents, or `maxDepth` (0–256) to choose a
|
|
102
|
+
Use `maxNodes` for larger bounded documents (`Infinity` removes the node budget), or `maxDepth` (0–256) to choose a
|
|
103
103
|
depth budget. Shared objects count once for each occurrence in the JSON tree;
|
|
104
104
|
options never change other calls' budgets.
|
|
105
105
|
|
|
@@ -8,7 +8,7 @@ export function Json(options = {}) {
|
|
|
8
8
|
export function isJsonValue(value, options = {}) {
|
|
9
9
|
const maxNodes = options.maxNodes ?? 10_000;
|
|
10
10
|
const maxDepth = options.maxDepth ?? 64;
|
|
11
|
-
if (!Number.isSafeInteger(maxNodes) || maxNodes < 1)
|
|
11
|
+
if (maxNodes !== Infinity && (!Number.isSafeInteger(maxNodes) || maxNodes < 1))
|
|
12
12
|
throw new Error("maxNodes must be a positive safe integer");
|
|
13
13
|
if (!Number.isSafeInteger(maxDepth) || maxDepth < 0 || maxDepth > 256)
|
|
14
14
|
throw new Error("maxDepth must be an integer between 0 and 256");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft-openapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.534",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"toolcraft-openapi-generate": "dist/bin/generate.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"toolcraft": "0.0.
|
|
33
|
+
"toolcraft": "0.0.534",
|
|
34
34
|
"fast-string-width": "^3.0.2",
|
|
35
35
|
"fast-wrap-ansi": "^0.2.0",
|
|
36
36
|
"sisteransi": "^1.0.5",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"directory": "packages/toolcraft-openapi"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"toolcraft-schema": "0.0.
|
|
48
|
+
"toolcraft-schema": "0.0.534",
|
|
49
49
|
"toolcraft-design": "*",
|
|
50
50
|
"@poe-code/frontmatter": "*"
|
|
51
51
|
},
|