@orkestrel/contract 0.0.10 → 0.0.11
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/src/core/index.cjs +61 -17
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +51 -10
- package/dist/src/core/index.d.ts +51 -10
- package/dist/src/core/index.js +61 -18
- package/dist/src/core/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1916,14 +1916,21 @@ export declare type Infer<S extends ContractShape> = [ContractShape] extends [S]
|
|
|
1916
1916
|
export declare const INFER_BREADTH_LIMIT = 256;
|
|
1917
1917
|
|
|
1918
1918
|
/**
|
|
1919
|
-
* The
|
|
1920
|
-
* frozen.
|
|
1919
|
+
* The maximum object/array nesting depth {@link valueToSchema} walks, frozen.
|
|
1921
1920
|
*
|
|
1922
1921
|
* @remarks
|
|
1923
1922
|
* Bounds inference against adversarial or cyclic runtime input — once the
|
|
1924
1923
|
* remaining depth budget reaches zero, inference stops descending and emits
|
|
1925
1924
|
* the empty accept-anything schema `{}` for that branch instead of recursing
|
|
1926
|
-
* further.
|
|
1925
|
+
* further. LOWERABLE per call via {@link ValueToSchemaOptions.maxDepth}; a
|
|
1926
|
+
* higher value is held here.
|
|
1927
|
+
*
|
|
1928
|
+
* A ceiling rather than a default, because the walk recurses: what a deeper
|
|
1929
|
+
* walk spends is the JavaScript call stack rather than this budget, and that
|
|
1930
|
+
* stack is not a fixed quantity. The survivable depth measured on one host rose
|
|
1931
|
+
* across repeated calls within a single process as the engine optimized, and
|
|
1932
|
+
* fell to roughly this number under a reduced stack size. Any larger constant
|
|
1933
|
+
* therefore has a host where it fails, which is why none is published.
|
|
1927
1934
|
*/
|
|
1928
1935
|
export declare const INFER_DEPTH_LIMIT = 32;
|
|
1929
1936
|
|
|
@@ -5301,8 +5308,9 @@ export declare function samplesToFormat(values: readonly unknown[]): SchemaForma
|
|
|
5301
5308
|
* and `enum` (both default `false`) opt a low-cardinality/unanimous-format
|
|
5302
5309
|
* slot into the corresponding keyword — see {@link inferSamples} for the
|
|
5303
5310
|
* precedence and the multi-sample format-disabling seam. `maxDepth` /
|
|
5304
|
-
* `maxProperties` are
|
|
5305
|
-
* {@link
|
|
5311
|
+
* `maxProperties` are resolved exactly as {@link valueToSchema} resolves them —
|
|
5312
|
+
* breadth through {@link sanitizeBudget}, depth through {@link sanitizeDepth},
|
|
5313
|
+
* which also caps at {@link INFER_DEPTH_LIMIT}; see there for why.
|
|
5306
5314
|
*
|
|
5307
5315
|
* @param samples - The example values to infer a schema from
|
|
5308
5316
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` / `enum` bounds
|
|
@@ -5352,6 +5360,34 @@ export declare function samplesToSchema(samples: readonly unknown[], options?: V
|
|
|
5352
5360
|
*/
|
|
5353
5361
|
export declare function sanitizeBudget(value: number | undefined, fallback: number): number;
|
|
5354
5362
|
|
|
5363
|
+
/**
|
|
5364
|
+
* Resolve a caller's depth budget to one the traversal can actually survive.
|
|
5365
|
+
*
|
|
5366
|
+
* @remarks
|
|
5367
|
+
* {@link sanitizeBudget} decides the SHAPE of a budget and deliberately lets any
|
|
5368
|
+
* finite non-negative integer through, because it must never read a fallback a
|
|
5369
|
+
* hostile caller supplied. That left the depth axis unbounded from above, and
|
|
5370
|
+
* depth is the axis that recurses: `1e9` is a valid integer, so the walk descended
|
|
5371
|
+
* until the call STACK failed, at a depth that varied between runs, and the
|
|
5372
|
+
* refusal surfaced as an unreadable value rather than as the exhaustion the guard
|
|
5373
|
+
* promises. Breadth needs no such ceiling — its loop is already bounded by the
|
|
5374
|
+
* entries actually present.
|
|
5375
|
+
*
|
|
5376
|
+
* So {@link INFER_DEPTH_LIMIT} is the ceiling as well as the default, and
|
|
5377
|
+
* `maxDepth` narrows the walk rather than widening it. One bound, and the same
|
|
5378
|
+
* answer on every host.
|
|
5379
|
+
*
|
|
5380
|
+
* @param value - The candidate depth budget
|
|
5381
|
+
* @returns A finite non-negative integer no greater than `INFER_DEPTH_LIMIT`
|
|
5382
|
+
*
|
|
5383
|
+
* @example
|
|
5384
|
+
* ```ts
|
|
5385
|
+
* sanitizeDepth(4) // 4
|
|
5386
|
+
* sanitizeDepth(1e9) // 32
|
|
5387
|
+
* ```
|
|
5388
|
+
*/
|
|
5389
|
+
export declare function sanitizeDepth(value: number | undefined): number;
|
|
5390
|
+
|
|
5355
5391
|
/**
|
|
5356
5392
|
* Stateful owner of one JSON Schema snapshot operation.
|
|
5357
5393
|
*
|
|
@@ -6176,11 +6212,16 @@ export declare function validateShapeDepth(shape: ContractShape): void;
|
|
|
6176
6212
|
* expect an object-shaped `inputSchema`; wrap a non-object payload with
|
|
6177
6213
|
* {@link schemaToObject} before advertising it as a tool's parameters.
|
|
6178
6214
|
*
|
|
6179
|
-
* `
|
|
6180
|
-
*
|
|
6181
|
-
*
|
|
6182
|
-
*
|
|
6183
|
-
*
|
|
6215
|
+
* `maxProperties` is sanitized via {@link sanitizeBudget} to a finite
|
|
6216
|
+
* non-negative integer, falling back to {@link INFER_BREADTH_LIMIT} for anything
|
|
6217
|
+
* else (`NaN`, `Infinity`, negative, fractional), so a malformed breadth cannot
|
|
6218
|
+
* corrupt the sampled key/element list.
|
|
6219
|
+
*
|
|
6220
|
+
* `maxDepth` goes through {@link sanitizeDepth}, which does the same and then caps
|
|
6221
|
+
* at {@link INFER_DEPTH_LIMIT}, so the option NARROWS the walk and cannot widen
|
|
6222
|
+
* it. The cap is what makes the depth guard unbreakable: depth is the recursing
|
|
6223
|
+
* axis, and a large-but-valid budget used to descend until the call STACK failed
|
|
6224
|
+
* rather than until the guard said stop.
|
|
6184
6225
|
*
|
|
6185
6226
|
* @param value - The value to infer a schema from
|
|
6186
6227
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` bounds
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -1916,14 +1916,21 @@ export declare type Infer<S extends ContractShape> = [ContractShape] extends [S]
|
|
|
1916
1916
|
export declare const INFER_BREADTH_LIMIT = 256;
|
|
1917
1917
|
|
|
1918
1918
|
/**
|
|
1919
|
-
* The
|
|
1920
|
-
* frozen.
|
|
1919
|
+
* The maximum object/array nesting depth {@link valueToSchema} walks, frozen.
|
|
1921
1920
|
*
|
|
1922
1921
|
* @remarks
|
|
1923
1922
|
* Bounds inference against adversarial or cyclic runtime input — once the
|
|
1924
1923
|
* remaining depth budget reaches zero, inference stops descending and emits
|
|
1925
1924
|
* the empty accept-anything schema `{}` for that branch instead of recursing
|
|
1926
|
-
* further.
|
|
1925
|
+
* further. LOWERABLE per call via {@link ValueToSchemaOptions.maxDepth}; a
|
|
1926
|
+
* higher value is held here.
|
|
1927
|
+
*
|
|
1928
|
+
* A ceiling rather than a default, because the walk recurses: what a deeper
|
|
1929
|
+
* walk spends is the JavaScript call stack rather than this budget, and that
|
|
1930
|
+
* stack is not a fixed quantity. The survivable depth measured on one host rose
|
|
1931
|
+
* across repeated calls within a single process as the engine optimized, and
|
|
1932
|
+
* fell to roughly this number under a reduced stack size. Any larger constant
|
|
1933
|
+
* therefore has a host where it fails, which is why none is published.
|
|
1927
1934
|
*/
|
|
1928
1935
|
export declare const INFER_DEPTH_LIMIT = 32;
|
|
1929
1936
|
|
|
@@ -5301,8 +5308,9 @@ export declare function samplesToFormat(values: readonly unknown[]): SchemaForma
|
|
|
5301
5308
|
* and `enum` (both default `false`) opt a low-cardinality/unanimous-format
|
|
5302
5309
|
* slot into the corresponding keyword — see {@link inferSamples} for the
|
|
5303
5310
|
* precedence and the multi-sample format-disabling seam. `maxDepth` /
|
|
5304
|
-
* `maxProperties` are
|
|
5305
|
-
* {@link
|
|
5311
|
+
* `maxProperties` are resolved exactly as {@link valueToSchema} resolves them —
|
|
5312
|
+
* breadth through {@link sanitizeBudget}, depth through {@link sanitizeDepth},
|
|
5313
|
+
* which also caps at {@link INFER_DEPTH_LIMIT}; see there for why.
|
|
5306
5314
|
*
|
|
5307
5315
|
* @param samples - The example values to infer a schema from
|
|
5308
5316
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` / `enum` bounds
|
|
@@ -5352,6 +5360,34 @@ export declare function samplesToSchema(samples: readonly unknown[], options?: V
|
|
|
5352
5360
|
*/
|
|
5353
5361
|
export declare function sanitizeBudget(value: number | undefined, fallback: number): number;
|
|
5354
5362
|
|
|
5363
|
+
/**
|
|
5364
|
+
* Resolve a caller's depth budget to one the traversal can actually survive.
|
|
5365
|
+
*
|
|
5366
|
+
* @remarks
|
|
5367
|
+
* {@link sanitizeBudget} decides the SHAPE of a budget and deliberately lets any
|
|
5368
|
+
* finite non-negative integer through, because it must never read a fallback a
|
|
5369
|
+
* hostile caller supplied. That left the depth axis unbounded from above, and
|
|
5370
|
+
* depth is the axis that recurses: `1e9` is a valid integer, so the walk descended
|
|
5371
|
+
* until the call STACK failed, at a depth that varied between runs, and the
|
|
5372
|
+
* refusal surfaced as an unreadable value rather than as the exhaustion the guard
|
|
5373
|
+
* promises. Breadth needs no such ceiling — its loop is already bounded by the
|
|
5374
|
+
* entries actually present.
|
|
5375
|
+
*
|
|
5376
|
+
* So {@link INFER_DEPTH_LIMIT} is the ceiling as well as the default, and
|
|
5377
|
+
* `maxDepth` narrows the walk rather than widening it. One bound, and the same
|
|
5378
|
+
* answer on every host.
|
|
5379
|
+
*
|
|
5380
|
+
* @param value - The candidate depth budget
|
|
5381
|
+
* @returns A finite non-negative integer no greater than `INFER_DEPTH_LIMIT`
|
|
5382
|
+
*
|
|
5383
|
+
* @example
|
|
5384
|
+
* ```ts
|
|
5385
|
+
* sanitizeDepth(4) // 4
|
|
5386
|
+
* sanitizeDepth(1e9) // 32
|
|
5387
|
+
* ```
|
|
5388
|
+
*/
|
|
5389
|
+
export declare function sanitizeDepth(value: number | undefined): number;
|
|
5390
|
+
|
|
5355
5391
|
/**
|
|
5356
5392
|
* Stateful owner of one JSON Schema snapshot operation.
|
|
5357
5393
|
*
|
|
@@ -6176,11 +6212,16 @@ export declare function validateShapeDepth(shape: ContractShape): void;
|
|
|
6176
6212
|
* expect an object-shaped `inputSchema`; wrap a non-object payload with
|
|
6177
6213
|
* {@link schemaToObject} before advertising it as a tool's parameters.
|
|
6178
6214
|
*
|
|
6179
|
-
* `
|
|
6180
|
-
*
|
|
6181
|
-
*
|
|
6182
|
-
*
|
|
6183
|
-
*
|
|
6215
|
+
* `maxProperties` is sanitized via {@link sanitizeBudget} to a finite
|
|
6216
|
+
* non-negative integer, falling back to {@link INFER_BREADTH_LIMIT} for anything
|
|
6217
|
+
* else (`NaN`, `Infinity`, negative, fractional), so a malformed breadth cannot
|
|
6218
|
+
* corrupt the sampled key/element list.
|
|
6219
|
+
*
|
|
6220
|
+
* `maxDepth` goes through {@link sanitizeDepth}, which does the same and then caps
|
|
6221
|
+
* at {@link INFER_DEPTH_LIMIT}, so the option NARROWS the walk and cannot widen
|
|
6222
|
+
* it. The cap is what makes the depth guard unbreakable: depth is the recursing
|
|
6223
|
+
* axis, and a large-but-valid budget used to descend until the call STACK failed
|
|
6224
|
+
* rather than until the guard said stop.
|
|
6184
6225
|
*
|
|
6185
6226
|
* @param value - The value to infer a schema from
|
|
6186
6227
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` bounds
|
package/dist/src/core/index.js
CHANGED
|
@@ -362,14 +362,21 @@ var CLONE_NODE_LIMIT = 262144;
|
|
|
362
362
|
*/
|
|
363
363
|
var GENERATION_ATTEMPT_LIMIT = 32;
|
|
364
364
|
/**
|
|
365
|
-
* The
|
|
366
|
-
* frozen.
|
|
365
|
+
* The maximum object/array nesting depth {@link valueToSchema} walks, frozen.
|
|
367
366
|
*
|
|
368
367
|
* @remarks
|
|
369
368
|
* Bounds inference against adversarial or cyclic runtime input — once the
|
|
370
369
|
* remaining depth budget reaches zero, inference stops descending and emits
|
|
371
370
|
* the empty accept-anything schema `{}` for that branch instead of recursing
|
|
372
|
-
* further.
|
|
371
|
+
* further. LOWERABLE per call via {@link ValueToSchemaOptions.maxDepth}; a
|
|
372
|
+
* higher value is held here.
|
|
373
|
+
*
|
|
374
|
+
* A ceiling rather than a default, because the walk recurses: what a deeper
|
|
375
|
+
* walk spends is the JavaScript call stack rather than this budget, and that
|
|
376
|
+
* stack is not a fixed quantity. The survivable depth measured on one host rose
|
|
377
|
+
* across repeated calls within a single process as the engine optimized, and
|
|
378
|
+
* fell to roughly this number under a reduced stack size. Any larger constant
|
|
379
|
+
* therefore has a host where it fails, which is why none is published.
|
|
373
380
|
*/
|
|
374
381
|
var INFER_DEPTH_LIMIT = 32;
|
|
375
382
|
/**
|
|
@@ -3003,6 +3010,35 @@ function sanitizeBudget(value, fallback) {
|
|
|
3003
3010
|
}, "sanitizeBudget");
|
|
3004
3011
|
}
|
|
3005
3012
|
/**
|
|
3013
|
+
* Resolve a caller's depth budget to one the traversal can actually survive.
|
|
3014
|
+
*
|
|
3015
|
+
* @remarks
|
|
3016
|
+
* {@link sanitizeBudget} decides the SHAPE of a budget and deliberately lets any
|
|
3017
|
+
* finite non-negative integer through, because it must never read a fallback a
|
|
3018
|
+
* hostile caller supplied. That left the depth axis unbounded from above, and
|
|
3019
|
+
* depth is the axis that recurses: `1e9` is a valid integer, so the walk descended
|
|
3020
|
+
* until the call STACK failed, at a depth that varied between runs, and the
|
|
3021
|
+
* refusal surfaced as an unreadable value rather than as the exhaustion the guard
|
|
3022
|
+
* promises. Breadth needs no such ceiling — its loop is already bounded by the
|
|
3023
|
+
* entries actually present.
|
|
3024
|
+
*
|
|
3025
|
+
* So {@link INFER_DEPTH_LIMIT} is the ceiling as well as the default, and
|
|
3026
|
+
* `maxDepth` narrows the walk rather than widening it. One bound, and the same
|
|
3027
|
+
* answer on every host.
|
|
3028
|
+
*
|
|
3029
|
+
* @param value - The candidate depth budget
|
|
3030
|
+
* @returns A finite non-negative integer no greater than `INFER_DEPTH_LIMIT`
|
|
3031
|
+
*
|
|
3032
|
+
* @example
|
|
3033
|
+
* ```ts
|
|
3034
|
+
* sanitizeDepth(4) // 4
|
|
3035
|
+
* sanitizeDepth(1e9) // 32
|
|
3036
|
+
* ```
|
|
3037
|
+
*/
|
|
3038
|
+
function sanitizeDepth(value) {
|
|
3039
|
+
return INTRINSICS.min(sanitizeBudget(value, 32), 32);
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3006
3042
|
* Render a short, safe, TOTAL preview of an unknown value for a {@link Fault}'s
|
|
3007
3043
|
* `received` field.
|
|
3008
3044
|
*
|
|
@@ -8819,7 +8855,7 @@ function inferValue(value, depth, breadth, closed, format, visited, memo) {
|
|
|
8819
8855
|
*/
|
|
8820
8856
|
function inferArray(value, depth, breadth, closed, format, visited, memo) {
|
|
8821
8857
|
return contain(() => {
|
|
8822
|
-
const maxDepth =
|
|
8858
|
+
const maxDepth = sanitizeDepth(depth);
|
|
8823
8859
|
const maxBreadth = sanitizeBudget(breadth, 256);
|
|
8824
8860
|
return readValue(() => {
|
|
8825
8861
|
if (!(maxDepth > 0) || matchesVisited(visited, value)) return {};
|
|
@@ -8900,9 +8936,10 @@ function inferArray(value, depth, breadth, closed, format, visited, memo) {
|
|
|
8900
8936
|
function inferObject(value, depth, breadth, closed, format, visited, memo) {
|
|
8901
8937
|
return contain(() => {
|
|
8902
8938
|
const maxBreadth = sanitizeBudget(breadth, 256);
|
|
8939
|
+
const maxDepth = sanitizeDepth(depth);
|
|
8903
8940
|
return readValue(() => {
|
|
8904
|
-
if (!(
|
|
8905
|
-
const cached = INTRINSICS.apply(INTRINSICS.recall, memo, [value])?.get(
|
|
8941
|
+
if (!(maxDepth > 0) || matchesVisited(visited, value)) return {};
|
|
8942
|
+
const cached = INTRINSICS.apply(INTRINSICS.recall, memo, [value])?.get(maxDepth);
|
|
8906
8943
|
if (cached) return cached;
|
|
8907
8944
|
admitVisited(visited, value);
|
|
8908
8945
|
const outcome = attempt(() => {
|
|
@@ -8922,7 +8959,7 @@ function inferObject(value, depth, breadth, closed, format, visited, memo) {
|
|
|
8922
8959
|
dropped = true;
|
|
8923
8960
|
continue;
|
|
8924
8961
|
}
|
|
8925
|
-
properties[key] = inferValue(propertyValue,
|
|
8962
|
+
properties[key] = inferValue(propertyValue, maxDepth - 1, maxBreadth, closed, format, visited, memo);
|
|
8926
8963
|
required[required.length] = key;
|
|
8927
8964
|
}
|
|
8928
8965
|
return {
|
|
@@ -8942,7 +8979,7 @@ function inferObject(value, depth, breadth, closed, format, visited, memo) {
|
|
|
8942
8979
|
...required.length > 0 ? { required } : {},
|
|
8943
8980
|
additionalProperties: partial ? true : !closed
|
|
8944
8981
|
};
|
|
8945
|
-
retainDepth(memo, value,
|
|
8982
|
+
retainDepth(memo, value, maxDepth, schema);
|
|
8946
8983
|
return schema;
|
|
8947
8984
|
}, "inferObject");
|
|
8948
8985
|
}, "inferObject");
|
|
@@ -8965,11 +9002,16 @@ function inferObject(value, depth, breadth, closed, format, visited, memo) {
|
|
|
8965
9002
|
* expect an object-shaped `inputSchema`; wrap a non-object payload with
|
|
8966
9003
|
* {@link schemaToObject} before advertising it as a tool's parameters.
|
|
8967
9004
|
*
|
|
8968
|
-
* `
|
|
8969
|
-
*
|
|
8970
|
-
*
|
|
8971
|
-
*
|
|
8972
|
-
*
|
|
9005
|
+
* `maxProperties` is sanitized via {@link sanitizeBudget} to a finite
|
|
9006
|
+
* non-negative integer, falling back to {@link INFER_BREADTH_LIMIT} for anything
|
|
9007
|
+
* else (`NaN`, `Infinity`, negative, fractional), so a malformed breadth cannot
|
|
9008
|
+
* corrupt the sampled key/element list.
|
|
9009
|
+
*
|
|
9010
|
+
* `maxDepth` goes through {@link sanitizeDepth}, which does the same and then caps
|
|
9011
|
+
* at {@link INFER_DEPTH_LIMIT}, so the option NARROWS the walk and cannot widen
|
|
9012
|
+
* it. The cap is what makes the depth guard unbreakable: depth is the recursing
|
|
9013
|
+
* axis, and a large-but-valid budget used to descend until the call STACK failed
|
|
9014
|
+
* rather than until the guard said stop.
|
|
8973
9015
|
*
|
|
8974
9016
|
* @param value - The value to infer a schema from
|
|
8975
9017
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` bounds
|
|
@@ -8993,7 +9035,7 @@ function valueToSchema(value, options) {
|
|
|
8993
9035
|
"format",
|
|
8994
9036
|
"enum"
|
|
8995
9037
|
], "valueToSchema", "schema");
|
|
8996
|
-
const maxDepth =
|
|
9038
|
+
const maxDepth = sanitizeDepth(optionsSnapshot?.maxDepth);
|
|
8997
9039
|
const maxProperties = sanitizeBudget(optionsSnapshot?.maxProperties, 256);
|
|
8998
9040
|
const closed = optionsSnapshot?.closed ?? true;
|
|
8999
9041
|
const format = optionsSnapshot?.format ?? false;
|
|
@@ -9229,8 +9271,9 @@ function inferRecordSamples(samples, depth, breadth, closed, format, enumOn, mem
|
|
|
9229
9271
|
* and `enum` (both default `false`) opt a low-cardinality/unanimous-format
|
|
9230
9272
|
* slot into the corresponding keyword — see {@link inferSamples} for the
|
|
9231
9273
|
* precedence and the multi-sample format-disabling seam. `maxDepth` /
|
|
9232
|
-
* `maxProperties` are
|
|
9233
|
-
* {@link
|
|
9274
|
+
* `maxProperties` are resolved exactly as {@link valueToSchema} resolves them —
|
|
9275
|
+
* breadth through {@link sanitizeBudget}, depth through {@link sanitizeDepth},
|
|
9276
|
+
* which also caps at {@link INFER_DEPTH_LIMIT}; see there for why.
|
|
9234
9277
|
*
|
|
9235
9278
|
* @param samples - The example values to infer a schema from
|
|
9236
9279
|
* @param options - Optional `maxDepth` / `maxProperties` / `closed` / `format` / `enum` bounds
|
|
@@ -9254,7 +9297,7 @@ function samplesToSchema(samples, options) {
|
|
|
9254
9297
|
"format",
|
|
9255
9298
|
"enum"
|
|
9256
9299
|
], "samplesToSchema", "schema");
|
|
9257
|
-
const maxDepth =
|
|
9300
|
+
const maxDepth = sanitizeDepth(optionsSnapshot?.maxDepth);
|
|
9258
9301
|
const maxProperties = sanitizeBudget(optionsSnapshot?.maxProperties, 256);
|
|
9259
9302
|
const closed = optionsSnapshot?.closed ?? true;
|
|
9260
9303
|
const format = optionsSnapshot?.format ?? false;
|
|
@@ -10298,6 +10341,6 @@ function schemaToShape(schema) {
|
|
|
10298
10341
|
}, "schemaToShape");
|
|
10299
10342
|
}
|
|
10300
10343
|
//#endregion
|
|
10301
|
-
export { CLONE_NODE_LIMIT, COMPILE_DEPTH_LIMIT, COMPILE_NODE_LIMIT, ContractCompiler, ContractError, FAULT_LIMIT, FORMAT_MAX_LENGTH, FORMAT_PATTERNS, GENERATION_ATTEMPT_LIMIT, GUARD_DEPTH_LIMIT, INFER_BREADTH_LIMIT, INFER_DEPTH_LIMIT, INFER_ENUM_LIMIT, INTRINSICS, JSONCloner, JSON_SCHEMA_TYPES, PREVIEW_LIMIT, SchemaCloner, ShapeCloner, ShapeValidator, admitMember, admitVisited, andOf, appendEntries, arrayOf, arrayShape, attempt, booleanShape, boundsOf, buildObjectShape, buildSampleMemo, buildShapeFromNode, canonicalStringify, canonicalizeValue, classifyFormat, cloneJSONRecord, cloneJSONValue, cloneSchema, cloneShape, collectEntries, collectMembers, compareValues, compileAuditor, compileGenerator, compileGuard, compileParser, compileReporter, compileSchema, complementOf, contain, createArrayFaults, createContract, createNumberFaults, createStringFaults, deriveLengthBounds, deriveRangeBounds, drawRandom, encodeLeaf, enumOf, enumerableKeys, enumerableSymbolCount, holds, inferArray, inferObject, inferPrimitiveEnum, inferRecordSamples, inferSamples, inferValue, instanceOf, integerShape, intersectionOf, isArray, isArrayBuffer, isArrayBufferView, isAsyncFunction, isAsyncGeneratorFunction, isAsyncIterable, isBigInt, isBigInt64Array, isBigUint64Array, isBoolean, isBoundedJSONRecord, isBoundedJSONValue, isConstructor, isContractError, isDataView, isDate, isDefined, isEmptyArray, isEmptyMap, isEmptyObject, isEmptySet, isEmptyString, isError, isFalse, isFiniteNumber, isFloat32Array, isFloat64Array, isFunction, isGeneratorFunction, isInstance, isInt16Array, isInt32Array, isInt8Array, isInteger, isIterable, isJSONPrimitive, isJSONValue, isLiteralValue, isMap, isNonEmptyArray, isNonEmptyMap, isNonEmptyObject, isNonEmptySet, isNonEmptyString, isNonNegativeInteger, isNonNegativeNumber, isNull, isNullableBoolean, isNullableNumber, isNullableString, isNumber, isObject, isPromise, isPromiseLike, isRecord, isRegExp, isSet, isSharedArrayBuffer, isString, isSymbol, isTrue, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, isValidISOInstant, isWeakMap, isWeakSet, isZeroArg, isZeroArgAsync, isZeroArgAsyncGenerator, isZeroArgGenerator, jsonShape, keyOf, lazyOf, limitEntries, literalOf, literalShape, mapOf, matchOf, matchesJSONDepth, matchesJSONValue, matchesMember, matchesPattern, matchesRecordBrand, matchesVisited, notOf, nullShape, nullableOf, nullableShape, numberShape, objectShape, omitOf, omitVisited, oneOfShape, optionalOf, optionalShape, orOf, ownShape, parseArray, parseArrayField, parseBoolean, parseBooleanField, parseEnum, parseEnumField, parseInteger, parseIntegerField, parseJSON, parseJSONAs, parseJSONValue, parseJSONValueField, parseNull, parseNullField, parseNumber, parseNumberField, parseRecord, parseRecordField, parseString, parseStringField, pathOf, pickOf, pinMembers, preview, rawShape, readArrayEntries, readMapEntries, readOptions, readPattern, readPatternFlags, readPatternSource, readSampleMemo, readSetEntries, readValue, recordOf, recordShape, refuseExpansion, resolveField, retainDepth, samplesToFormat, samplesToSchema, sanitizeBudget, schemaNodeToShape, schemaToObject, schemaToParameters, schemaToShape, seededRandom, selectClosestFaults, setOf, shapeToKind, sortValues, stringOf, stringShape, stringToFormat, transformOf, tupleOf, unifySchemas, unionOf, unionShape, validateShapeDepth, valueToSchema, whereOf };
|
|
10344
|
+
export { CLONE_NODE_LIMIT, COMPILE_DEPTH_LIMIT, COMPILE_NODE_LIMIT, ContractCompiler, ContractError, FAULT_LIMIT, FORMAT_MAX_LENGTH, FORMAT_PATTERNS, GENERATION_ATTEMPT_LIMIT, GUARD_DEPTH_LIMIT, INFER_BREADTH_LIMIT, INFER_DEPTH_LIMIT, INFER_ENUM_LIMIT, INTRINSICS, JSONCloner, JSON_SCHEMA_TYPES, PREVIEW_LIMIT, SchemaCloner, ShapeCloner, ShapeValidator, admitMember, admitVisited, andOf, appendEntries, arrayOf, arrayShape, attempt, booleanShape, boundsOf, buildObjectShape, buildSampleMemo, buildShapeFromNode, canonicalStringify, canonicalizeValue, classifyFormat, cloneJSONRecord, cloneJSONValue, cloneSchema, cloneShape, collectEntries, collectMembers, compareValues, compileAuditor, compileGenerator, compileGuard, compileParser, compileReporter, compileSchema, complementOf, contain, createArrayFaults, createContract, createNumberFaults, createStringFaults, deriveLengthBounds, deriveRangeBounds, drawRandom, encodeLeaf, enumOf, enumerableKeys, enumerableSymbolCount, holds, inferArray, inferObject, inferPrimitiveEnum, inferRecordSamples, inferSamples, inferValue, instanceOf, integerShape, intersectionOf, isArray, isArrayBuffer, isArrayBufferView, isAsyncFunction, isAsyncGeneratorFunction, isAsyncIterable, isBigInt, isBigInt64Array, isBigUint64Array, isBoolean, isBoundedJSONRecord, isBoundedJSONValue, isConstructor, isContractError, isDataView, isDate, isDefined, isEmptyArray, isEmptyMap, isEmptyObject, isEmptySet, isEmptyString, isError, isFalse, isFiniteNumber, isFloat32Array, isFloat64Array, isFunction, isGeneratorFunction, isInstance, isInt16Array, isInt32Array, isInt8Array, isInteger, isIterable, isJSONPrimitive, isJSONValue, isLiteralValue, isMap, isNonEmptyArray, isNonEmptyMap, isNonEmptyObject, isNonEmptySet, isNonEmptyString, isNonNegativeInteger, isNonNegativeNumber, isNull, isNullableBoolean, isNullableNumber, isNullableString, isNumber, isObject, isPromise, isPromiseLike, isRecord, isRegExp, isSet, isSharedArrayBuffer, isString, isSymbol, isTrue, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, isValidISOInstant, isWeakMap, isWeakSet, isZeroArg, isZeroArgAsync, isZeroArgAsyncGenerator, isZeroArgGenerator, jsonShape, keyOf, lazyOf, limitEntries, literalOf, literalShape, mapOf, matchOf, matchesJSONDepth, matchesJSONValue, matchesMember, matchesPattern, matchesRecordBrand, matchesVisited, notOf, nullShape, nullableOf, nullableShape, numberShape, objectShape, omitOf, omitVisited, oneOfShape, optionalOf, optionalShape, orOf, ownShape, parseArray, parseArrayField, parseBoolean, parseBooleanField, parseEnum, parseEnumField, parseInteger, parseIntegerField, parseJSON, parseJSONAs, parseJSONValue, parseJSONValueField, parseNull, parseNullField, parseNumber, parseNumberField, parseRecord, parseRecordField, parseString, parseStringField, pathOf, pickOf, pinMembers, preview, rawShape, readArrayEntries, readMapEntries, readOptions, readPattern, readPatternFlags, readPatternSource, readSampleMemo, readSetEntries, readValue, recordOf, recordShape, refuseExpansion, resolveField, retainDepth, samplesToFormat, samplesToSchema, sanitizeBudget, sanitizeDepth, schemaNodeToShape, schemaToObject, schemaToParameters, schemaToShape, seededRandom, selectClosestFaults, setOf, shapeToKind, sortValues, stringOf, stringShape, stringToFormat, transformOf, tupleOf, unifySchemas, unionOf, unionShape, validateShapeDepth, valueToSchema, whereOf };
|
|
10302
10345
|
|
|
10303
10346
|
//# sourceMappingURL=index.js.map
|