@elaraai/east 1.0.104 → 1.0.106
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/ast_to_ir.d.ts.map +1 -1
- package/dist/src/ast_to_ir.js +29 -7
- package/dist/src/ast_to_ir.js.map +1 -1
- package/dist/src/codegen/codegen.spec.js +14 -0
- package/dist/src/codegen/codegen.spec.js.map +1 -1
- package/dist/src/codegen/types.d.ts +3 -1
- package/dist/src/codegen/types.d.ts.map +1 -1
- package/dist/src/codegen/types.js +19 -3
- package/dist/src/codegen/types.js.map +1 -1
- package/dist/src/compile/control.d.ts.map +1 -1
- package/dist/src/compile/control.js +10 -5
- package/dist/src/compile/control.js.map +1 -1
- package/dist/src/compile.open_beast.spec.js +7 -3
- package/dist/src/compile.open_beast.spec.js.map +1 -1
- package/dist/src/expr/query.d.ts.map +1 -1
- package/dist/src/expr/query.js +3 -1
- package/dist/src/expr/query.js.map +1 -1
- package/dist/src/fuzz.js +8 -8
- package/dist/src/fuzz.js.map +1 -1
- package/dist/src/patch/type_of_patch.d.ts.map +1 -1
- package/dist/src/patch/type_of_patch.js +4 -5
- package/dist/src/patch/type_of_patch.js.map +1 -1
- package/dist/src/query/jq/catalog.d.ts.map +1 -1
- package/dist/src/query/jq/catalog.js +15 -15
- package/dist/src/query/jq/catalog.js.map +1 -1
- package/dist/src/query/jq/check.d.ts.map +1 -1
- package/dist/src/query/jq/check.js +22 -16
- package/dist/src/query/jq/check.js.map +1 -1
- package/dist/src/query/jq/narrow.d.ts +68 -0
- package/dist/src/query/jq/narrow.d.ts.map +1 -0
- package/dist/src/query/jq/narrow.js +691 -0
- package/dist/src/query/jq/narrow.js.map +1 -0
- package/dist/src/query/jq/shapes.d.ts.map +1 -1
- package/dist/src/query/jq/shapes.js +4 -2
- package/dist/src/query/jq/shapes.js.map +1 -1
- package/dist/src/query/jq/split.d.ts +35 -11
- package/dist/src/query/jq/split.d.ts.map +1 -1
- package/dist/src/query/jq/split.js +206 -35
- package/dist/src/query/jq/split.js.map +1 -1
- package/dist/src/query/jq/translate-builtins.d.ts.map +1 -1
- package/dist/src/query/jq/translate-builtins.js +52 -14
- package/dist/src/query/jq/translate-builtins.js.map +1 -1
- package/dist/src/query/jq/translate.d.ts +58 -4
- package/dist/src/query/jq/translate.d.ts.map +1 -1
- package/dist/src/query/jq/translate.js +192 -34
- package/dist/src/query/jq/translate.js.map +1 -1
- package/dist/src/runner_exec.d.ts +10 -0
- package/dist/src/runner_exec.d.ts.map +1 -1
- package/dist/src/runner_exec.js +11 -3
- package/dist/src/runner_exec.js.map +1 -1
- package/dist/src/runner_exec.spec.js +40 -2
- package/dist/src/runner_exec.spec.js.map +1 -1
- package/dist/src/serialization/beast.d.ts.map +1 -1
- package/dist/src/serialization/beast.js +4 -2
- package/dist/src/serialization/beast.js.map +1 -1
- package/dist/src/serialization/beast2/index.d.ts +2 -1
- package/dist/src/serialization/beast2/index.d.ts.map +1 -1
- package/dist/src/serialization/beast2/index.js +2 -1
- package/dist/src/serialization/beast2/index.js.map +1 -1
- package/dist/src/serialization/beast2/v5/codec.d.ts +30 -1
- package/dist/src/serialization/beast2/v5/codec.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/codec.js +24 -3
- package/dist/src/serialization/beast2/v5/codec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/header-type.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/header-type.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/header-type.spec.js +120 -0
- package/dist/src/serialization/beast2/v5/header-type.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/lazy.d.ts +23 -4
- package/dist/src/serialization/beast2/v5/lazy.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/lazy.js +84 -19
- package/dist/src/serialization/beast2/v5/lazy.js.map +1 -1
- package/dist/src/serialization/beast2/v5/project.d.ts +156 -0
- package/dist/src/serialization/beast2/v5/project.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/project.js +830 -0
- package/dist/src/serialization/beast2/v5/project.js.map +1 -0
- package/dist/src/serialization/beast2/v5/project.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/project.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/project.spec.js +273 -0
- package/dist/src/serialization/beast2/v5/project.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.d.ts +78 -7
- package/dist/src/serialization/beast2/v5/runs.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/runs.js +218 -7
- package/dist/src/serialization/beast2/v5/runs.js.map +1 -1
- package/dist/src/serialization/beast2/v5/runs.spec.js +223 -6
- package/dist/src/serialization/beast2/v5/runs.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/stream.d.ts +40 -6
- package/dist/src/serialization/beast2/v5/stream.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/stream.js +54 -15
- package/dist/src/serialization/beast2/v5/stream.js.map +1 -1
- package/dist/src/serialization/east.js +3 -5
- package/dist/src/serialization/east.js.map +1 -1
- package/dist/src/serialization/index.d.ts +1 -1
- package/dist/src/serialization/index.d.ts.map +1 -1
- package/dist/src/serialization/index.js +1 -1
- package/dist/src/serialization/index.js.map +1 -1
- package/dist/src/serialization/json_schema.spec.js +12 -2
- package/dist/src/serialization/json_schema.spec.js.map +1 -1
- package/dist/src/serialization/json_schema_to_type.d.ts +7 -0
- package/dist/src/serialization/json_schema_to_type.d.ts.map +1 -1
- package/dist/src/serialization/json_schema_to_type.js +34 -5
- package/dist/src/serialization/json_schema_to_type.js.map +1 -1
- package/dist/src/serialization/json_schema_to_type.spec.js +22 -0
- package/dist/src/serialization/json_schema_to_type.spec.js.map +1 -1
- package/dist/src/type_of_type.d.ts +9 -1
- package/dist/src/type_of_type.d.ts.map +1 -1
- package/dist/src/type_of_type.js +47 -7
- package/dist/src/type_of_type.js.map +1 -1
- package/dist/src/types.d.ts +67 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +133 -43
- package/dist/src/types.js.map +1 -1
- package/dist/src/types.struct_fields.spec.d.ts +6 -0
- package/dist/src/types.struct_fields.spec.d.ts.map +1 -0
- package/dist/src/types.struct_fields.spec.js +118 -0
- package/dist/src/types.struct_fields.spec.js.map +1 -0
- package/dist/src/types.variant_cases.spec.d.ts +6 -0
- package/dist/src/types.variant_cases.spec.d.ts.map +1 -0
- package/dist/src/types.variant_cases.spec.js +85 -0
- package/dist/src/types.variant_cases.spec.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type EastType } from "../../types.js";
|
|
6
|
+
import { type CheckJqResult } from "./check.js";
|
|
7
|
+
import { type JqNode, type JqRange } from "./spans.js";
|
|
8
|
+
/**
|
|
9
|
+
* Whether a filter never raises, whatever its input: what a step may leave
|
|
10
|
+
* unmade, a stage's rows past the ones a step needs (#1140) or a field no step
|
|
11
|
+
* reads (#1141), since a value that raises makes the whole query raise.
|
|
12
|
+
* Conservative: paths, literals, comparisons, `and`, `or`, `+`, `-` and `*`,
|
|
13
|
+
* objects, arrays, strings, `if`, `//`, `try`, a `label` and a `break` to it,
|
|
14
|
+
* and the builtins in {@link NEVER_RAISE}, of parts that never raise. `/` and
|
|
15
|
+
* `%` (a zero divisor), a `def` or a call of one, a function value, any other
|
|
16
|
+
* builtin, and a `break` out of the filter, which leaves it as a raise does,
|
|
17
|
+
* may raise.
|
|
18
|
+
*
|
|
19
|
+
* @param node - the filter
|
|
20
|
+
* @param defs - the defs in scope, by `name/arity`: a call of one may raise
|
|
21
|
+
* @param labels - the labels the filter is inside, which a `break` may leave
|
|
22
|
+
* @returns whether it never raises
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function cannotRaise(node: JqNode, defs: {
|
|
27
|
+
has(key: string): boolean;
|
|
28
|
+
}, labels?: ReadonlySet<string>): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Checks a program again: the same program, over the same text, against the
|
|
31
|
+
* same input or another.
|
|
32
|
+
*
|
|
33
|
+
* @param checked - the program, checked
|
|
34
|
+
* @param program - the program to check: `checked`'s, or one rewritten from it
|
|
35
|
+
* @param spans - each node's range in `checked`'s text
|
|
36
|
+
* @param input - the input's type
|
|
37
|
+
* @returns the check, or `undefined` when it does not check to `checked`'s
|
|
38
|
+
* output type, multiplicity and reads
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare function checkAgain(checked: CheckJqResult, program: JqNode, spans: ReadonlyMap<string, JqRange>, input: EastType): CheckJqResult | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The program a checked query runs: its rows narrowed to the fields its later
|
|
45
|
+
* steps read (#1141), checked again.
|
|
46
|
+
*
|
|
47
|
+
* @param checked - the program as written, checked
|
|
48
|
+
* @returns the narrowed program, checked; or `checked` itself, where nothing
|
|
49
|
+
* narrows or the narrowed program does not check to `checked`'s output
|
|
50
|
+
* type, multiplicity and reads
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare function narrowRows(checked: CheckJqResult): CheckJqResult;
|
|
55
|
+
/**
|
|
56
|
+
* The fields of each row the program reads of the collection a node gives,
|
|
57
|
+
* as {@link narrowRows} finds them: a re-keyed join's pieces send only those
|
|
58
|
+
* (#1141).
|
|
59
|
+
*
|
|
60
|
+
* @param checked - the program, checked
|
|
61
|
+
* @param path - the node's path: a dataset's read from the root
|
|
62
|
+
* @returns the fields, or `undefined` when a row is read whole, or the
|
|
63
|
+
* program defines a function
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare function rowsRead(checked: CheckJqResult, path: string): ReadonlySet<string> | undefined;
|
|
68
|
+
//# sourceMappingURL=narrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../../../src/query/jq/narrow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EAA4C,KAAK,MAAM,EAAkB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAkBjH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAAE,MAAM,GAAE,WAAW,CAAC,MAAM,CAAa,GAAG,OAAO,CAwC/H;AA0fD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,aAAa,GAAG,SAAS,CAQnJ;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAahE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAS9F"}
|