@eagleoutice/flowr 2.15.1 → 2.15.3
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/README.md +20 -20
- package/dataflow/environments/identifier.d.ts +2 -0
- package/dataflow/environments/identifier.js +8 -1
- package/dataflow/environments/query-fn-props.d.ts +48 -3
- package/dataflow/environments/query-fn-props.js +182 -18
- package/dataflow/graph/graph.d.ts +18 -4
- package/dataflow/graph/graph.js +100 -63
- package/dataflow/graph/vertex.js +1 -1
- package/dataflow/internal/linker.js +9 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +1 -1
- package/dataflow/internal/process/functions/call/common.js +6 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +1 -1
- package/dataflow/internal/process/functions/call/quoted.js +1 -1
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +1 -1
- package/dataflow/internal/process/functions/process-argument.js +1 -1
- package/dataflow/internal/process/process-symbol.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +4 -1
- package/linter/linter-rules.d.ts +9 -9
- package/linter/rules/problematic-inputs.js +1 -1
- package/linter/rules/undefined-symbol.js +3 -2
- package/package.json +1 -1
- package/project/context/flowr-analyzer-environment-context.d.ts +6 -0
- package/project/context/flowr-analyzer-environment-context.js +2 -0
- package/project/flowr-analyzer.d.ts +13 -0
- package/project/flowr-analyzer.js +5 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +3 -1
- package/project/sigdb/manifest.js +1 -1
- package/project/sigdb/reader.d.ts +11 -5
- package/project/sigdb/reader.js +63 -31
- package/project/sigdb/signature-db.d.ts +3 -0
- package/project/sigdb/signature-db.js +5 -4
- package/queries/catalog/dice-query/dice-query-executor.js +3 -2
- package/queries/catalog/input-sources-query/simple-input-classifier.js +67 -0
- package/queries/catalog/signature-query/signature-query-format.d.ts +1 -2
- package/queries/catalog/slice-query-options.d.ts +10 -4
- package/queries/catalog/slice-query-options.js +27 -5
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +7 -4
- package/queries/query.d.ts +56 -2
- package/queries/query.js +66 -1
- package/util/collections/bimap.d.ts +2 -1
- package/util/collections/bimap.js +4 -4
- package/util/version.js +2 -2
package/queries/query.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CompoundQuerySchema = exports.SupportedQueries = void 0;
|
|
6
|
+
exports.Query = exports.CompoundQuerySchema = exports.SupportedQueries = void 0;
|
|
7
7
|
exports.queryWikiPage = queryWikiPage;
|
|
8
8
|
exports.executeQueriesOfSameType = executeQueriesOfSameType;
|
|
9
9
|
exports.executeQueries = executeQueries;
|
|
@@ -228,4 +228,69 @@ async function genericWrapReplFailIfNoRequest(fn, output, analyzer) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Running queries and reading what they reported, without `Object.entries` and the casts it forces. Reading
|
|
233
|
+
* changes nothing: the results keep the shape they are serialized in.
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* const out = await executeQueries({ analyzer }, [{ type: 'static-slice', criteria: ['2@x'] }]);
|
|
237
|
+
* Query.get(out, 'static-slice', '2@x'); // the slice taken at `2@x`
|
|
238
|
+
* Query.first(out, 'static-slice'); // the only slice, when one was asked for
|
|
239
|
+
* for(const [criterion, slice] of Query.entries(out, 'static-slice')) { ... }
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
exports.Query = {
|
|
243
|
+
name: 'Query',
|
|
244
|
+
/**
|
|
245
|
+
* Run a single query and answer with what it reported, so a caller asking one thing is handed that one
|
|
246
|
+
* thing instead of a {@link QueryResults} to index into.
|
|
247
|
+
*/
|
|
248
|
+
async one(data, query) {
|
|
249
|
+
const results = await executeQueries(data, [query]);
|
|
250
|
+
return results[query.type];
|
|
251
|
+
},
|
|
252
|
+
/** Every key and result of one query, typed as that query reports them. */
|
|
253
|
+
entries(results, type) {
|
|
254
|
+
const found = results[type];
|
|
255
|
+
return Object.entries(found?.results ?? {});
|
|
256
|
+
},
|
|
257
|
+
/** Every result of one query, for when the keys are not what you are after. */
|
|
258
|
+
values(results, type) {
|
|
259
|
+
return exports.Query.entries(results, type).map(([, value]) => value);
|
|
260
|
+
},
|
|
261
|
+
/** The result of one query under one key, `undefined` when it reported none. */
|
|
262
|
+
get(results, type, key) {
|
|
263
|
+
const found = results[type];
|
|
264
|
+
return found?.results?.[key];
|
|
265
|
+
},
|
|
266
|
+
/** The one result of a query that was asked for one thing, `undefined` when it reported none. */
|
|
267
|
+
first(results, type) {
|
|
268
|
+
return exports.Query.values(results, type)[0];
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* Every call a `call-context` query found, flat, each carrying the kind and subkind it was found under
|
|
272
|
+
* rather than leaving them as the two levels of record the result nests them in.
|
|
273
|
+
*/
|
|
274
|
+
calls(results) {
|
|
275
|
+
const found = [];
|
|
276
|
+
for (const [kind, { subkinds }] of Object.entries(results['call-context']?.kinds ?? {})) {
|
|
277
|
+
for (const [subkind, hits] of Object.entries(subkinds)) {
|
|
278
|
+
for (const hit of hits) {
|
|
279
|
+
found.push({ ...hit, kind, subkind });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return found;
|
|
284
|
+
},
|
|
285
|
+
/** Every finding a `linter` query reported, flat, each carrying the rule that reported it. */
|
|
286
|
+
lints(results) {
|
|
287
|
+
const found = [];
|
|
288
|
+
for (const [rule, reported] of Object.entries(results['linter']?.results ?? {})) {
|
|
289
|
+
for (const result of reported.results ?? []) {
|
|
290
|
+
found.push({ rule, result });
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return found;
|
|
294
|
+
}
|
|
295
|
+
};
|
|
231
296
|
//# sourceMappingURL=query.js.map
|
|
@@ -16,7 +16,6 @@ export type BiMapReverse = 'lazy' | 'eager';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare class BiMap<K, V extends object> implements Map<K, V> {
|
|
18
18
|
readonly [Symbol.toStringTag]: string;
|
|
19
|
-
size: number;
|
|
20
19
|
private readonly k2v;
|
|
21
20
|
private v2k;
|
|
22
21
|
private readonly eager;
|
|
@@ -26,6 +25,8 @@ export declare class BiMap<K, V extends object> implements Map<K, V> {
|
|
|
26
25
|
*/
|
|
27
26
|
constructor(base?: Iterable<[K, V]>, reverse?: BiMapReverse);
|
|
28
27
|
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
28
|
+
/** Read off the forward direction, so filling the map costs no bookkeeping per entry. */
|
|
29
|
+
get size(): number;
|
|
29
30
|
clear(): void;
|
|
30
31
|
delete(key: K): boolean;
|
|
31
32
|
entries(): MapIterator<[K, V]>;
|
|
@@ -8,7 +8,6 @@ exports.BiMap = void 0;
|
|
|
8
8
|
*/
|
|
9
9
|
class BiMap {
|
|
10
10
|
[Symbol.toStringTag] = 'BiMap';
|
|
11
|
-
size = 0;
|
|
12
11
|
k2v = new Map();
|
|
13
12
|
/* see {@link BiMapReverse}: `undefined` until the first reverse lookup unless this map was asked to be eager */
|
|
14
13
|
v2k;
|
|
@@ -31,8 +30,11 @@ class BiMap {
|
|
|
31
30
|
[Symbol.iterator]() {
|
|
32
31
|
return this.k2v[Symbol.iterator]();
|
|
33
32
|
}
|
|
33
|
+
/** Read off the forward direction, so filling the map costs no bookkeeping per entry. */
|
|
34
|
+
get size() {
|
|
35
|
+
return this.k2v.size;
|
|
36
|
+
}
|
|
34
37
|
clear() {
|
|
35
|
-
this.size = 0;
|
|
36
38
|
this.k2v.clear();
|
|
37
39
|
this.v2k = this.eager ? new WeakMap() : undefined;
|
|
38
40
|
}
|
|
@@ -44,7 +46,6 @@ class BiMap {
|
|
|
44
46
|
this.k2v.delete(key);
|
|
45
47
|
/* another key may still hold this value, so dropping just its entry would lose a live mapping */
|
|
46
48
|
this.staleReverse();
|
|
47
|
-
this.size = this.k2v.size;
|
|
48
49
|
return true;
|
|
49
50
|
}
|
|
50
51
|
entries() {
|
|
@@ -86,7 +87,6 @@ class BiMap {
|
|
|
86
87
|
this.v2k.set(value, key);
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
this.size = this.k2v.size;
|
|
90
90
|
return this;
|
|
91
91
|
}
|
|
92
92
|
/** the reverse direction can no longer be maintained in place, so re-derive it (at once if eager) */
|
package/util/version.js
CHANGED
|
@@ -42,9 +42,9 @@ const assert_1 = require("./assert");
|
|
|
42
42
|
const sigdb_download_1 = require("../project/sigdb/sigdb-download");
|
|
43
43
|
const doc_files_1 = require("../documentation/doc-util/doc-files");
|
|
44
44
|
// this is automatically replaced with the current version by release-it
|
|
45
|
-
const version = '2.15.
|
|
45
|
+
const version = '2.15.3';
|
|
46
46
|
// this is automatically replaced with the release date by release-it (regex-bumper, see package.json)
|
|
47
|
-
const versionDate = '2026-08-
|
|
47
|
+
const versionDate = '2026-08-26T12:04:46Z';
|
|
48
48
|
/**
|
|
49
49
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
50
50
|
*/
|