@eagleoutice/flowr 2.8.12 → 2.8.13
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 +23 -22
- package/control-flow/simple-visitor.js +3 -1
- package/dataflow/environments/default-builtin-config.d.ts +1 -1
- package/dataflow/environments/default-builtin-config.js +1 -1
- package/dataflow/extractor.js +1 -1
- package/dataflow/graph/graph.d.ts +1 -14
- package/dataflow/graph/graph.js +1 -10
- package/dataflow/internal/linker.d.ts +12 -0
- package/dataflow/internal/linker.js +24 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +16 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +3 -2
- package/dataflow/internal/process/functions/process-argument.js +2 -1
- package/dataflow/internal/process/functions/process-parameter.js +4 -3
- package/documentation/wiki-query.js +2 -3
- package/package.json +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +4 -3
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +21 -1
- package/queries/catalog/call-context-query/call-context-query-format.js +15 -7
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +11 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +14 -1
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.d.ts +12 -0
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +30 -0
- package/queries/catalog/call-context-query/identify-link-to-relation.d.ts +10 -0
- package/queries/catalog/call-context-query/identify-link-to-relation.js +21 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
- package/queries/catalog/dependencies-query/function-info/test-functions.js +146 -12
- package/queries/query.js +1 -1
- package/search/search-executor/search-enrichers.d.ts +8 -40
- package/search/search-executor/search-enrichers.js +17 -13
- package/search/search-executor/search-generators.js +5 -7
- package/search/search-executor/search-transformer.js +1 -7
- package/util/schema.js +6 -8
- package/util/version.js +1 -1
|
@@ -82,15 +82,13 @@ async function generateFromQuery(input, args) {
|
|
|
82
82
|
nodesByQuery.set(query, nodes);
|
|
83
83
|
}
|
|
84
84
|
// enrich elements with query data
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const elements = await new flowr_search_1.FlowrSearchElements([...nodesByQuery]
|
|
89
|
-
.flatMap(([_, nodes]) => [...nodes]))
|
|
85
|
+
const nodearr = [...nodesByQuery];
|
|
86
|
+
const elements = await new flowr_search_1.FlowrSearchElements(nodearr
|
|
87
|
+
.flatMap(([_, nodes]) => Array.from(nodes)))
|
|
90
88
|
.enrich(input, search_enrichers_1.Enrichment.QueryData, { queries: result });
|
|
91
89
|
return elements.mutate(s => Promise.all(s.map(async (e) => {
|
|
92
|
-
const [query, _] =
|
|
93
|
-
return await (0, search_enrichers_1.enrichElement)(e, elements,
|
|
90
|
+
const [query, _] = nodearr.find(([_, nodes]) => nodes.has(e));
|
|
91
|
+
return await (0, search_enrichers_1.enrichElement)(e, elements, input, search_enrichers_1.Enrichment.QueryData, { query });
|
|
94
92
|
})));
|
|
95
93
|
}
|
|
96
94
|
async function generateSyntax(input, args) {
|
|
@@ -100,13 +100,7 @@ async function getFilter(data, elements, { filter }) {
|
|
|
100
100
|
return elements.mutate(e => e.filter(e => (0, flowr_search_filters_1.evalFilter)(filter, { element: e, data: { dataflow } })));
|
|
101
101
|
}
|
|
102
102
|
async function getWith(input, elements, { info, args }) {
|
|
103
|
-
|
|
104
|
-
normalize: await input.normalize(),
|
|
105
|
-
dataflow: await input.dataflow(),
|
|
106
|
-
cfg: await input.controlflow(),
|
|
107
|
-
config: input.flowrConfig
|
|
108
|
-
};
|
|
109
|
-
return (await elements.enrich(input, info, args)).mutate(async (s) => await Promise.all(s.map(e => (0, search_enrichers_1.enrichElement)(e, elements, data, info, args))));
|
|
103
|
+
return (await elements.enrich(input, info, args)).mutate(async (s) => await Promise.all(s.map(e => (0, search_enrichers_1.enrichElement)(e, elements, input, info, args))));
|
|
110
104
|
}
|
|
111
105
|
function getMap(data, elements, { mapper, args }) {
|
|
112
106
|
return elements.mutate(elements => elements.flatMap(e => (0, search_mappers_1.map)(e, data, mapper, args)));
|
package/util/schema.js
CHANGED
|
@@ -24,7 +24,7 @@ function genericDescription(level, formatter, name, desc) {
|
|
|
24
24
|
}
|
|
25
25
|
const lines = [...headerLine(level, formatter, name, desc.type ?? 'unknown', desc.flags)];
|
|
26
26
|
if ('allow' in desc) {
|
|
27
|
-
lines.push({ level: level + 1, text: `
|
|
27
|
+
lines.push({ level: level + 1, text: `Only allows: ${desc['allow'].map(v => "'" + v + "'").join(', ')}` });
|
|
28
28
|
}
|
|
29
29
|
switch (desc.type) {
|
|
30
30
|
case 'object':
|
|
@@ -57,18 +57,16 @@ function printFlags(flags) {
|
|
|
57
57
|
if ('presence' in flags) {
|
|
58
58
|
flagText += String(flags['presence']);
|
|
59
59
|
}
|
|
60
|
-
return flagText.trim().length > 0 ? '[' + flagText + ']' : '';
|
|
60
|
+
return flagText.trim().length > 0 ? '[' + flagText + '] ' : '';
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Creates the header line(s) for a schema description.
|
|
64
64
|
*/
|
|
65
65
|
function headerLine(level, formatter, name, type, flags) {
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
return [baseLine];
|
|
66
|
+
const fnam = name === '.' ? '' : (0, ansi_1.bold)(name, formatter) + ' ';
|
|
67
|
+
const fdesc = flags && 'description' in flags ? (0, ansi_1.italic)(flags['description'], formatter) + ' ' : '';
|
|
68
|
+
const text = `- ${fnam}${printFlags(flags)}${fdesc}(${formatter.format(type, { effect: ansi_1.ColorEffect.Foreground, color: 7 /* Colors.White */ })})`;
|
|
69
|
+
return [{ level, text }];
|
|
72
70
|
}
|
|
73
71
|
/**
|
|
74
72
|
* Describes a Joi object schema.
|
package/util/version.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
|
|
|
6
6
|
const semver_1 = require("semver");
|
|
7
7
|
const assert_1 = require("./assert");
|
|
8
8
|
// this is automatically replaced with the current version by release-it
|
|
9
|
-
const version = '2.8.
|
|
9
|
+
const version = '2.8.13';
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
12
12
|
*/
|