@eagleoutice/flowr 2.8.6 → 2.8.7
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 +13 -13
- package/abstract-interpretation/absint-visitor.d.ts +20 -68
- package/abstract-interpretation/absint-visitor.js +44 -54
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +0 -9
- package/abstract-interpretation/data-frame/dataframe-domain.js +1 -14
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +1 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +2 -0
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -2
- package/abstract-interpretation/data-frame/shape-inference.d.ts +15 -7
- package/abstract-interpretation/data-frame/shape-inference.js +20 -17
- package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
- package/abstract-interpretation/domains/abstract-domain.js +1 -2
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.js +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +3 -1
- package/abstract-interpretation/domains/state-abstract-domain.js +6 -0
- package/abstract-interpretation/normalized-ast-fold.d.ts +2 -1
- package/abstract-interpretation/normalized-ast-fold.js +8 -1
- package/cli/repl/commands/repl-query.js +7 -9
- package/cli/wiki.d.ts +2 -1
- package/cli/wiki.js +2 -0
- package/control-flow/cfg-dead-code.js +3 -0
- package/control-flow/extract-cfg.js +27 -7
- package/control-flow/semantic-cfg-guided-visitor.d.ts +57 -4
- package/control-flow/semantic-cfg-guided-visitor.js +89 -28
- package/control-flow/useless-loop.d.ts +2 -1
- package/control-flow/useless-loop.js +13 -6
- package/dataflow/environments/built-in-config.d.ts +6 -5
- package/dataflow/environments/built-in.d.ts +107 -34
- package/dataflow/environments/built-in.js +115 -39
- package/dataflow/environments/default-builtin-config.d.ts +113 -67
- package/dataflow/environments/default-builtin-config.js +71 -66
- package/dataflow/environments/diff.js +2 -2
- package/dataflow/environments/environment.js +7 -7
- package/dataflow/environments/identifier.d.ts +4 -2
- package/dataflow/environments/identifier.js +2 -0
- package/dataflow/environments/reference-to-maybe.d.ts +2 -2
- package/dataflow/environments/reference-to-maybe.js +11 -11
- package/dataflow/environments/resolve-by-name.js +17 -6
- package/dataflow/eval/resolve/alias-tracking.js +1 -1
- package/dataflow/eval/resolve/resolve.js +6 -6
- package/dataflow/eval/values/intervals/interval-constants.js +3 -3
- package/dataflow/eval/values/scalar/{scalar-consatnts.d.ts → scalar-constants.d.ts} +2 -2
- package/dataflow/eval/values/scalar/{scalar-consatnts.js → scalar-constants.js} +3 -3
- package/dataflow/eval/values/sets/set-constants.d.ts +4 -2
- package/dataflow/eval/values/sets/set-constants.js +4 -2
- package/dataflow/extractor.js +1 -1
- package/dataflow/fn/exceptions-of-function.d.ts +1 -1
- package/dataflow/fn/exceptions-of-function.js +3 -3
- package/dataflow/graph/call-graph.js +2 -2
- package/dataflow/graph/dataflowgraph-builder.d.ts +4 -4
- package/dataflow/graph/dataflowgraph-builder.js +14 -14
- package/dataflow/graph/diff-dataflow-graph.js +3 -3
- package/dataflow/graph/graph.d.ts +1 -1
- package/dataflow/graph/graph.js +4 -4
- package/dataflow/graph/vertex.d.ts +3 -3
- package/dataflow/info.d.ts +3 -3
- package/dataflow/info.js +11 -11
- package/dataflow/internal/linker.d.ts +9 -0
- package/dataflow/internal/linker.js +33 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +20 -17
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +9 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +5 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +0 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +39 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +12 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +36 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +18 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +67 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +7 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +18 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +103 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +8 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +13 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +7 -6
- package/dataflow/internal/process/functions/call/common.js +7 -7
- package/dataflow/internal/process/functions/call/known-call-handling.js +7 -8
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +1 -2
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +6 -6
- package/dataflow/internal/process/functions/process-argument.js +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +3 -3
- package/dataflow/internal/process/process-symbol.js +3 -3
- package/dataflow/internal/process/process-uninteresting-leaf.d.ts +3 -1
- package/dataflow/internal/process/process-uninteresting-leaf.js +3 -1
- package/dataflow/internal/process/process-value.d.ts +1 -1
- package/dataflow/internal/process/process-value.js +4 -4
- package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
- package/dataflow/processor.d.ts +1 -1
- package/documentation/doc-util/doc-structure.js +1 -1
- package/documentation/doc-util/doc-types.d.ts +10 -3
- package/documentation/doc-util/doc-types.js +110 -33
- package/documentation/wiki-absint.d.ts +6 -0
- package/documentation/wiki-absint.js +149 -0
- package/documentation/wiki-dataflow-graph.js +11 -10
- package/documentation/wiki-interface.js +2 -1
- package/documentation/wiki-mk/doc-context.d.ts +3 -3
- package/documentation/wiki-mk/doc-context.js +2 -2
- package/documentation/wiki-mk/doc-maker.js +2 -2
- package/documentation/wiki-normalized-ast.d.ts +9 -0
- package/documentation/wiki-normalized-ast.js +40 -52
- package/linter/linter-rules.d.ts +1 -1
- package/linter/rules/seeded-randomness.js +5 -4
- package/linter/rules/useless-loop.d.ts +3 -3
- package/package.json +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.js +5 -0
- package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/test-functions.js +82 -0
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -2
- package/queries/catalog/df-shape-query/df-shape-query-format.js +3 -3
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +1 -1
- package/r-bridge/data/data.d.ts +6 -1
- package/r-bridge/data/data.js +8 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +7 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +19 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +4 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +7 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -1
- package/r-bridge/lang-4.x/convert-values.d.ts +5 -0
- package/search/flowr-search-filters.d.ts +2 -2
- package/slicing/static/static-slicer.js +2 -2
- package/util/mermaid/cfg.d.ts +10 -3
- package/util/mermaid/cfg.js +39 -10
- package/util/mermaid/dfg.js +5 -5
- package/util/simple-df/dfg-view.js +1 -1
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +7 -0
- package/util/version.js +1 -1
package/util/mermaid/cfg.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MermaidExitPointDefaultMarkStyle = exports.MermaidEntryPointDefaultMarkStyle = void 0;
|
|
3
4
|
exports.cfgToMermaid = cfgToMermaid;
|
|
4
5
|
exports.cfgToMermaidUrl = cfgToMermaidUrl;
|
|
5
6
|
const mermaid_1 = require("./mermaid");
|
|
@@ -9,6 +10,8 @@ const reconstruct_1 = require("../../reconstruct/reconstruct");
|
|
|
9
10
|
const auto_select_defaults_1 = require("../../reconstruct/auto-select/auto-select-defaults");
|
|
10
11
|
const info_1 = require("./info");
|
|
11
12
|
const collect_1 = require("../../r-bridge/lang-4.x/ast/model/collect");
|
|
13
|
+
exports.MermaidEntryPointDefaultMarkStyle = 'stroke:cyan,stroke-width:6.5px;';
|
|
14
|
+
exports.MermaidExitPointDefaultMarkStyle = 'stroke:green,stroke-width:6.5px;';
|
|
12
15
|
function getLexeme(n) {
|
|
13
16
|
return n ? n.info.fullLexeme ?? n.lexeme ?? '' : undefined;
|
|
14
17
|
}
|
|
@@ -25,6 +28,18 @@ function cfgOfNode(vert, normalizedVertex, id, content, output) {
|
|
|
25
28
|
return output;
|
|
26
29
|
}
|
|
27
30
|
const getDirRegex = /flowchart\s+([A-Za-z]+)/;
|
|
31
|
+
function shouldIncludeNode(simplify, element, include) {
|
|
32
|
+
if (simplify) {
|
|
33
|
+
// Only basic blocks are shown, so include the BB, if at least one child is selected
|
|
34
|
+
return element.type == control_flow_graph_1.CfgVertexType.Block && element.elems.filter(elem => elem.type !== control_flow_graph_1.CfgVertexType.EndMarker).some(elem => include.has(elem.id));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
// Basic blocks and vertices are shown, include the BB, if all children are highlighted
|
|
38
|
+
return element.type == control_flow_graph_1.CfgVertexType.Block
|
|
39
|
+
? element.elems.filter(elem => elem.type !== control_flow_graph_1.CfgVertexType.EndMarker).every(elem => include.has(elem.id))
|
|
40
|
+
: include.has(element.id);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
28
43
|
/**
|
|
29
44
|
* Convert the control flow graph to a mermaid string.
|
|
30
45
|
* @param cfg - The control flow graph to convert.
|
|
@@ -35,7 +50,8 @@ const getDirRegex = /flowchart\s+([A-Za-z]+)/;
|
|
|
35
50
|
* @param includeOnlyIds - If provided, only include the vertices with the given IDs.
|
|
36
51
|
* @param mark - If provided, mark the given vertices and edges.
|
|
37
52
|
*/
|
|
38
|
-
function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify = false, markStyle = info_1.MermaidDefaultMarkStyle, includeOnlyIds, mark } = {}) {
|
|
53
|
+
function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify = false, markStyle = info_1.MermaidDefaultMarkStyle, entryPointStyle = exports.MermaidEntryPointDefaultMarkStyle, exitPointStyle = exports.MermaidExitPointDefaultMarkStyle, includeOnlyIds, mark, includeBasicBlockLabel = true } = {}) {
|
|
54
|
+
const hasBbandSimplify = simplify && cfg.graph.mayHaveBasicBlocks();
|
|
39
55
|
let output = prefix;
|
|
40
56
|
if (includeOnlyIds) {
|
|
41
57
|
const completed = new Set(includeOnlyIds);
|
|
@@ -59,6 +75,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
59
75
|
includeOnlyIds = completed;
|
|
60
76
|
}
|
|
61
77
|
const dirIs = getDirRegex.exec(prefix)?.at(1) ?? 'LR';
|
|
78
|
+
const diagramIncludedIds = new Set();
|
|
62
79
|
for (const [id, vertex] of cfg.graph.vertices(false)) {
|
|
63
80
|
const normalizedVertex = normalizedAst?.idMap.get(id);
|
|
64
81
|
const content = getLexeme(normalizedVertex);
|
|
@@ -68,14 +85,22 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
68
85
|
}
|
|
69
86
|
if (vertex.type === control_flow_graph_1.CfgVertexType.Block) {
|
|
70
87
|
if (simplify) {
|
|
88
|
+
if (includeOnlyIds && !vertex.elems.some(elem => includeOnlyIds.has(elem.id))) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
71
91
|
const ids = vertex.elems?.map(e => e.id) ?? [];
|
|
72
92
|
const reconstruct = (0, reconstruct_1.reconstructToCode)(normalizedAst, { nodes: new Set(ids) }, auto_select_defaults_1.doNotAutoSelect).code;
|
|
73
|
-
const name = `"
|
|
93
|
+
const name = `"\`${includeBasicBlockLabel ? `Basic Block (${id})\n` : ''}${(0, mermaid_1.escapeMarkdown)(reconstruct)}\`"`;
|
|
74
94
|
output += ` n${id}[[${name}]]\n`;
|
|
95
|
+
diagramIncludedIds.add(vertex.id);
|
|
75
96
|
}
|
|
76
97
|
else {
|
|
98
|
+
if (includeOnlyIds && !vertex.elems.some(elem => includeOnlyIds.has(elem.id))) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
77
101
|
output += ` subgraph n${vertex.id} [Block ${normalizedVertex?.info.fullLexeme ?? id}]\n`;
|
|
78
102
|
output += ` direction ${dirIs}\n`;
|
|
103
|
+
diagramIncludedIds.add(vertex.id);
|
|
79
104
|
let last = undefined;
|
|
80
105
|
for (const element of vertex.elems ?? []) {
|
|
81
106
|
if (includeOnlyIds && !includeOnlyIds.has(element.id)) {
|
|
@@ -85,6 +110,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
85
110
|
const childNormalizedVertex = normalizedAst?.idMap.get(element.id);
|
|
86
111
|
const childContent = getLexeme(childNormalizedVertex);
|
|
87
112
|
output = cfgOfNode(vertex, childNormalizedVertex, element.id, childContent, output);
|
|
113
|
+
diagramIncludedIds.add(element.id);
|
|
88
114
|
// just to keep the order
|
|
89
115
|
if (last) {
|
|
90
116
|
output += ` ${last} -.-> n${element.id}\n`;
|
|
@@ -96,17 +122,18 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
96
122
|
}
|
|
97
123
|
else if (!includeOnlyIds || includeOnlyIds.has(id)) {
|
|
98
124
|
output = cfgOfNode(vertex, normalizedVertex, id, content, output);
|
|
125
|
+
diagramIncludedIds.add(vertex.id);
|
|
99
126
|
}
|
|
100
127
|
if (vertex.name === type_1.RType.ExpressionList && vertex.type === control_flow_graph_1.CfgVertexType.EndMarker) {
|
|
101
128
|
output += ' end\n';
|
|
102
129
|
}
|
|
103
130
|
}
|
|
104
131
|
for (const [from, targets] of cfg.graph.edges()) {
|
|
105
|
-
if (
|
|
132
|
+
if (!diagramIncludedIds.has(from)) {
|
|
106
133
|
continue;
|
|
107
134
|
}
|
|
108
135
|
for (const [to, edge] of targets) {
|
|
109
|
-
if (
|
|
136
|
+
if (!diagramIncludedIds.has(to)) {
|
|
110
137
|
continue;
|
|
111
138
|
}
|
|
112
139
|
const edgeType = edge.label === 1 /* CfgEdgeType.Cd */ ? '-->' : '-.->';
|
|
@@ -115,18 +142,20 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
115
142
|
}
|
|
116
143
|
}
|
|
117
144
|
for (const entryPoint of cfg.entryPoints) {
|
|
118
|
-
if (
|
|
119
|
-
output += ` style n${entryPoint}
|
|
145
|
+
if (diagramIncludedIds.has(entryPoint)) {
|
|
146
|
+
output += ` style n${entryPoint} ${entryPointStyle}`;
|
|
120
147
|
}
|
|
121
148
|
}
|
|
122
149
|
for (const exitPoint of cfg.exitPoints) {
|
|
123
|
-
if (
|
|
124
|
-
output += ` style n${exitPoint}
|
|
150
|
+
if (diagramIncludedIds.has(exitPoint)) {
|
|
151
|
+
output += ` style n${exitPoint} ${exitPointStyle}`;
|
|
125
152
|
}
|
|
126
153
|
}
|
|
127
154
|
if (mark) {
|
|
128
|
-
for (const
|
|
129
|
-
|
|
155
|
+
for (const [_, vertex] of cfg.graph.vertices(true)) {
|
|
156
|
+
if (shouldIncludeNode(hasBbandSimplify, vertex, mark)) {
|
|
157
|
+
output += ` style n${vertex.id} ${markStyle.vertex}`;
|
|
158
|
+
}
|
|
130
159
|
}
|
|
131
160
|
}
|
|
132
161
|
return output;
|
package/util/mermaid/dfg.js
CHANGED
|
@@ -85,11 +85,11 @@ function printArg(arg) {
|
|
|
85
85
|
return '[empty]';
|
|
86
86
|
}
|
|
87
87
|
else if ((0, graph_1.isNamedArgument)(arg)) {
|
|
88
|
-
const deps = arg.
|
|
88
|
+
const deps = arg.cds ? ', :may:' + arg.cds.map(c => c.id + (c.when ? '+' : '-')).join(',') : '';
|
|
89
89
|
return `${arg.name} (${arg.nodeId}${deps})`;
|
|
90
90
|
}
|
|
91
91
|
else if ((0, graph_1.isPositionalArgument)(arg)) {
|
|
92
|
-
const deps = arg.
|
|
92
|
+
const deps = arg.cds ? ' (:may:' + arg.cds.map(c => c.id + (c.when ? '+' : '-')).join(',') + ')' : '';
|
|
93
93
|
return `${arg.nodeId}${deps}`;
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
@@ -131,7 +131,7 @@ function mermaidNodeBrackets(tag) {
|
|
|
131
131
|
* Prints an identifier definition in a human-readable format.
|
|
132
132
|
*/
|
|
133
133
|
function printIdentifier(id) {
|
|
134
|
-
return `**${id.name}** (id: ${id.nodeId}, type: ${identifier_1.ReferenceTypeReverseMapping.get(id.type)},${id.
|
|
134
|
+
return `**${id.name}** (id: ${id.nodeId}, type: ${identifier_1.ReferenceTypeReverseMapping.get(id.type)},${id.cds ? ' cds: {' + id.cds.map(c => c.id + (c.when ? '+' : '-')).join(',') + '},' : ''} def. @${id.definedAt})`;
|
|
135
135
|
}
|
|
136
136
|
function printEnvironmentToLines(env) {
|
|
137
137
|
if (env === undefined) {
|
|
@@ -166,7 +166,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
166
166
|
}
|
|
167
167
|
else {
|
|
168
168
|
const escapedName = (0, mermaid_1.escapeMarkdown)(node ? `[${node.type}] ${lexeme}` : '??');
|
|
169
|
-
const deps = info.
|
|
169
|
+
const deps = info.cds ? ', :may:' + info.cds.map(c => c.id + (c.when ? '+' : '-')).join(',') : '';
|
|
170
170
|
const lnks = info.link?.origin ? ', :links:' + info.link.origin.join(',') : '';
|
|
171
171
|
const n = node?.info.fullRange ?? node?.location ?? (node?.type === type_1.RType.ExpressionList ? node?.grouping?.[0].location : undefined);
|
|
172
172
|
mermaid.nodeLines.push(` ${idPrefix}${id}${open}"\`${escapedName}${escapedName.length > 10 ? '\n ' : ' '}(${id}${deps}${lnks})\n *${formatRange(n)}*${fCall ? displayFunctionArgMapping(info.args) : ''}\`"${close}`);
|
|
@@ -182,7 +182,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
182
182
|
mermaid.nodeLines.push(' %% No edges found for ' + id);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
const artificialCdEdges = (info.
|
|
185
|
+
const artificialCdEdges = (info.cds ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']) }]);
|
|
186
186
|
// eslint-disable-next-line prefer-const
|
|
187
187
|
for (let [target, edge] of [...edges[1], ...artificialCdEdges]) {
|
|
188
188
|
if (includeOnlyIds && !includeOnlyIds.has(target)) {
|
|
@@ -28,7 +28,7 @@ function makeFilter(options, idMap) {
|
|
|
28
28
|
return {
|
|
29
29
|
...arg,
|
|
30
30
|
environment: options.keepEnv ? arg.environment : undefined,
|
|
31
|
-
|
|
31
|
+
cds: options.keepCd ? arg.cds : undefined,
|
|
32
32
|
functionInformation: options.compactFunctions ? arg.functionInformation : undefined
|
|
33
33
|
};
|
|
34
34
|
};
|
package/util/text/ansi.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export declare function italic(s: string, f?: OutputFormatter, options?: FormatO
|
|
|
41
41
|
* This does not work if the {@link setFormatter|formatter} is void. Tries to format the text with an italic font shape.
|
|
42
42
|
*/
|
|
43
43
|
export declare function bold(s: string, f?: OutputFormatter, options?: FormatOptions): string;
|
|
44
|
+
/**
|
|
45
|
+
* This does not work if the {@link setFormatter|formatter} is void. Tries to format the text as informational message.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ansiInfo(s: string, f?: OutputFormatter): string;
|
|
44
48
|
export declare const escape = "\u001B[";
|
|
45
49
|
export declare const ansiFormatter: {
|
|
46
50
|
reset(): string;
|
package/util/text/ansi.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.formatter = exports.ansiFormatter = exports.escape = exports.markdownFormatter = exports.voidFormatter = exports.ColorEffect = void 0;
|
|
4
4
|
exports.italic = italic;
|
|
5
5
|
exports.bold = bold;
|
|
6
|
+
exports.ansiInfo = ansiInfo;
|
|
6
7
|
exports.setFormatter = setFormatter;
|
|
7
8
|
// noinspection JSUnusedGlobalSymbols
|
|
8
9
|
var ColorEffect;
|
|
@@ -63,6 +64,12 @@ function italic(s, f = exports.formatter, options) {
|
|
|
63
64
|
function bold(s, f = exports.formatter, options) {
|
|
64
65
|
return f.format(s, { style: 1 /* FontStyles.Bold */, ...options });
|
|
65
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* This does not work if the {@link setFormatter|formatter} is void. Tries to format the text as informational message.
|
|
69
|
+
*/
|
|
70
|
+
function ansiInfo(s, f = exports.formatter) {
|
|
71
|
+
return f.format(s, { color: 7 /* Colors.White */, effect: ColorEffect.Foreground, style: 3 /* FontStyles.Italic */ });
|
|
72
|
+
}
|
|
66
73
|
exports.escape = '\x1b[';
|
|
67
74
|
const colorSuffix = 'm';
|
|
68
75
|
exports.ansiFormatter = {
|
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.7';
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
12
12
|
*/
|