jlens-wasm 0.4.0 → 0.6.0

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/jlens.d.ts CHANGED
@@ -17,12 +17,29 @@ export type Bindings = Record<string, unknown>;
17
17
  */
18
18
  export type HostFunction = (...args: any[]) => unknown;
19
19
 
20
- /** Evaluation guardrails. */
20
+ /** Evaluation guardrails, and the clock and seed that make an evaluation reproducible. */
21
21
  export interface EvaluateOptions {
22
22
  /** Maximum duration of one evaluation, in milliseconds (error `D1012`). */
23
23
  timeout?: number;
24
- /** Maximum evaluation depth (error `D1011`). */
24
+ /** Maximum evaluation depth (default 1,000; error `D1011`). */
25
25
  maxDepth?: number;
26
+ /** Maximum length, in bytes of UTF-8, of a string the evaluation builds (default 256 MiB; error `U1001`). */
27
+ maxStringLength?: number;
28
+ /** Maximum number of items of an array the evaluation builds (default 16,777,216; error `U1001`). */
29
+ maxArrayLength?: number;
30
+ /**
31
+ * Maximum size of the result as compact JSON text, in bytes (default 256 MiB; error `U1001`).
32
+ * It also limits the arguments of a host function. A value that appears several times counts
33
+ * each time.
34
+ */
35
+ maxResultSize?: number;
36
+ /**
37
+ * The evaluation's timestamp for `$now()` and `$millis()`: milliseconds since the epoch, a
38
+ * `Date` or an ISO 8601 timestamp. Default: the system clock.
39
+ */
40
+ now?: number | Date | string;
41
+ /** Seed for `$random()` and `$shuffle()`: the same seed gives the same results. */
42
+ seed?: number;
26
43
  }
27
44
 
28
45
  /** A range of the expression source, in UTF-16 code units (`end` is exclusive). */
package/jlens_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jlens-wasm",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "JSONata in WebAssembly, with evaluation audits and schema-driven autocomplete",
5
5
  "license": "MIT",
6
6
  "repository": {