@eagleoutice/flowr 2.9.9 → 2.9.11
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 +57 -54
- package/abstract-interpretation/absint-visitor.d.ts +16 -14
- package/abstract-interpretation/absint-visitor.js +93 -47
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
- package/abstract-interpretation/data-frame/shape-inference.d.ts +2 -5
- package/abstract-interpretation/data-frame/shape-inference.js +4 -5
- package/abstract-interpretation/domains/abstract-domain.d.ts +4 -4
- package/abstract-interpretation/domains/abstract-domain.js +8 -8
- package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +12 -5
- package/abstract-interpretation/domains/mapped-abstract-domain.js +47 -23
- package/abstract-interpretation/domains/set-range-domain.js +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +30 -1
- package/abstract-interpretation/domains/state-abstract-domain.js +130 -4
- package/abstract-interpretation/normalized-ast-fold.d.ts +2 -2
- package/abstract-interpretation/normalized-ast-fold.js +4 -3
- package/benchmark/slicer.js +5 -5
- package/benchmark/summarizer/first-phase/process.js +4 -4
- package/cli/repl/commands/repl-normalize.js +2 -2
- package/cli/repl/core.js +2 -2
- package/config.js +1 -1
- package/control-flow/cfg-simplification.d.ts +1 -0
- package/control-flow/cfg-simplification.js +1 -0
- package/control-flow/control-flow-graph.d.ts +1 -1
- package/control-flow/control-flow-graph.js +1 -2
- package/control-flow/extract-cfg.js +34 -15
- package/control-flow/semantic-cfg-guided-visitor.js +1 -0
- package/dataflow/cluster.js +1 -1
- package/dataflow/environments/built-in.d.ts +6 -15
- package/dataflow/environments/built-in.js +25 -33
- package/dataflow/environments/default-builtin-config.d.ts +4 -8
- package/dataflow/environments/default-builtin-config.js +8 -5
- package/dataflow/environments/reference-to-maybe.d.ts +8 -0
- package/dataflow/environments/reference-to-maybe.js +46 -3
- package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
- package/dataflow/eval/resolve/alias-tracking.js +6 -6
- package/dataflow/eval/resolve/resolve.js +12 -10
- package/dataflow/fn/exceptions-of-function.d.ts +1 -1
- package/dataflow/fn/exceptions-of-function.js +2 -1
- package/dataflow/graph/call-graph.d.ts +1 -1
- package/dataflow/graph/call-graph.js +4 -3
- package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
- package/dataflow/graph/dataflowgraph-builder.js +21 -21
- package/dataflow/graph/graph.d.ts +5 -5
- package/dataflow/graph/graph.js +36 -32
- package/dataflow/graph/unknown-side-effect.js +3 -1
- package/dataflow/info.d.ts +4 -0
- package/dataflow/info.js +2 -2
- package/dataflow/internal/linker.d.ts +4 -4
- package/dataflow/internal/linker.js +59 -33
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -1
- package/dataflow/internal/process/functions/call/argument/make-argument.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -5
- 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 +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +15 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +22 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +22 -19
- package/dataflow/internal/process/functions/call/common.d.ts +1 -1
- package/dataflow/internal/process/functions/call/common.js +43 -35
- package/dataflow/internal/process/functions/call/known-call-handling.js +0 -2
- package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/process-argument.js +3 -3
- package/dataflow/internal/process/functions/process-parameter.js +2 -2
- package/dataflow/origin/dfg-get-origin.d.ts +1 -1
- package/dataflow/origin/dfg-get-origin.js +2 -2
- package/documentation/doc-util/doc-types.js +1 -1
- package/documentation/wiki-absint.js +7 -8
- package/documentation/wiki-cfg.js +3 -3
- package/documentation/wiki-mk/doc-context.d.ts +8 -0
- package/documentation/wiki-mk/doc-context.js +4 -0
- package/documentation/wiki-normalized-ast.d.ts +1 -1
- package/documentation/wiki-normalized-ast.js +9 -6
- package/linter/linter-format.d.ts +10 -0
- package/linter/linter-format.js +15 -0
- package/linter/rules/absolute-path.js +3 -3
- package/linter/rules/dead-code.js +1 -1
- package/linter/rules/file-path-validity.js +1 -1
- package/linter/rules/seeded-randomness.js +1 -1
- package/linter/rules/unused-definition.js +1 -1
- package/package.json +7 -7
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +9 -0
- package/project/plugins/file-plugins/files/flowr-description-file.js +12 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +1 -1
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +4 -5
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +6 -5
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-format.js +3 -3
- package/queries/catalog/does-call-query/does-call-query-executor.js +3 -3
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -1
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +1 -1
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +1 -1
- package/queries/query-print.d.ts +1 -1
- package/queries/query-print.js +4 -3
- package/r-bridge/lang-4.x/ast/model/model.d.ts +151 -4
- package/r-bridge/lang-4.x/ast/model/model.js +249 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +13 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +19 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +26 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +36 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +48 -13
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +8 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +11 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +23 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +32 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +19 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +26 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +12 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +20 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +26 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +12 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +8 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +11 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +17 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +22 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +22 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +45 -8
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +57 -16
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +12 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +15 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +21 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +21 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +22 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +11 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +14 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +23 -17
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +39 -2
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +52 -9
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +18 -17
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +8 -7
- package/r-bridge/lang-4.x/ast/model/processing/visitor.js +6 -13
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +4 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +2 -2
- package/r-bridge/lang-4.x/convert-values.d.ts +14 -5
- package/r-bridge/lang-4.x/convert-values.js +76 -72
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -15
- package/r-bridge/roxygen2/roxygen-parse.js +1 -1
- package/r-bridge/shell-executor.js +1 -1
- package/reconstruct/auto-select/magic-comments.js +4 -4
- package/reconstruct/reconstruct.js +2 -1
- package/search/search-executor/search-generators.js +2 -2
- package/slicing/criterion/filters/all-variables.js +1 -1
- package/slicing/criterion/parse.d.ts +1 -1
- package/slicing/criterion/parse.js +5 -3
- package/slicing/static/slice-call.d.ts +1 -1
- package/slicing/static/slice-call.js +2 -2
- package/statistics/features/supported/assignments/assignments.js +2 -2
- package/statistics/features/supported/control-flow/control-flow.js +2 -2
- package/statistics/features/supported/data-access/data-access.js +6 -5
- package/statistics/features/supported/defined-functions/defined-functions.js +9 -8
- package/statistics/features/supported/expression-list/statistics-expression-list.js +2 -2
- package/statistics/features/supported/loops/loops.js +6 -5
- package/statistics/features/supported/used-functions/used-functions.js +2 -2
- package/statistics/features/supported/variables/variables.js +8 -8
- package/util/mermaid/ast.js +3 -3
- package/util/mermaid/cfg.js +3 -4
- package/util/mermaid/dfg.d.ts +1 -1
- package/util/mermaid/dfg.js +13 -12
- package/util/simple-df/dfg-ascii.js +1 -1
- package/util/version.js +1 -1
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +0 -10
- package/r-bridge/lang-4.x/ast/model/collect.js +0 -25
package/util/mermaid/cfg.js
CHANGED
|
@@ -8,11 +8,11 @@ const control_flow_graph_1 = require("../../control-flow/control-flow-graph");
|
|
|
8
8
|
const reconstruct_1 = require("../../reconstruct/reconstruct");
|
|
9
9
|
const auto_select_defaults_1 = require("../../reconstruct/auto-select/auto-select-defaults");
|
|
10
10
|
const info_1 = require("./info");
|
|
11
|
-
const
|
|
11
|
+
const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
|
|
12
12
|
exports.MermaidEntryPointDefaultMarkStyle = 'stroke:cyan,stroke-width:6.5px;';
|
|
13
13
|
exports.MermaidExitPointDefaultMarkStyle = 'stroke:green,stroke-width:6.5px;';
|
|
14
14
|
function getLexeme(n) {
|
|
15
|
-
return n ?
|
|
15
|
+
return n ? model_1.RNode.lexeme(n) ?? '' : undefined;
|
|
16
16
|
}
|
|
17
17
|
function cfgOfNode(vert, normalizedVertex, id, content, output) {
|
|
18
18
|
if (normalizedVertex && content !== undefined) {
|
|
@@ -58,8 +58,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
|
|
|
58
58
|
if (!nastNode) {
|
|
59
59
|
continue;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
for (const childId of ids) {
|
|
61
|
+
for (const childId of model_1.RNode.collectAllIds(nastNode)) {
|
|
63
62
|
completed.add(childId);
|
|
64
63
|
}
|
|
65
64
|
}
|
package/util/mermaid/dfg.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DataflowGraph } from '../../dataflow/graph/graph';
|
|
2
|
-
import {
|
|
2
|
+
import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
3
3
|
import { type IdentifierDefinition } from '../../dataflow/environments/identifier';
|
|
4
4
|
import { type MermaidMarkdownMark, type MermaidMarkStyle } from './info';
|
|
5
5
|
interface MermaidGraph {
|
package/util/mermaid/dfg.js
CHANGED
|
@@ -13,9 +13,9 @@ const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-fun
|
|
|
13
13
|
const edge_1 = require("../../dataflow/graph/edge");
|
|
14
14
|
const vertex_1 = require("../../dataflow/graph/vertex");
|
|
15
15
|
const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
|
|
16
|
-
const built_in_1 = require("../../dataflow/environments/built-in");
|
|
17
16
|
const info_1 = require("./info");
|
|
18
17
|
const range_1 = require("../range");
|
|
18
|
+
const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
|
|
19
19
|
function subflowToMermaid(nodeId, subflow, mermaid, idPrefix = '') {
|
|
20
20
|
if (subflow === undefined) {
|
|
21
21
|
return;
|
|
@@ -25,7 +25,7 @@ function subflowToMermaid(nodeId, subflow, mermaid, idPrefix = '') {
|
|
|
25
25
|
// get parent
|
|
26
26
|
const idMap = mermaid.rootGraph.idMap;
|
|
27
27
|
const node = idMap?.get(nodeId);
|
|
28
|
-
const nodeLexeme =
|
|
28
|
+
const nodeLexeme = model_1.RNode.lexeme(node) ?? 'function';
|
|
29
29
|
const location = node?.location?.[0] ? ` (L. ${node?.location?.[0]})` : '';
|
|
30
30
|
mermaid.nodeLines.push(`\nsubgraph "${subflowId}" ["${(0, mermaid_1.escapeMarkdown)(nodeLexeme)}${location}"]`);
|
|
31
31
|
}
|
|
@@ -134,6 +134,7 @@ function printEnvironmentToLines(env) {
|
|
|
134
134
|
function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
135
135
|
const fCall = info.tag === vertex_1.VertexType.FunctionCall;
|
|
136
136
|
const { open, close } = mermaidNodeBrackets(info.tag);
|
|
137
|
+
const origId = id;
|
|
137
138
|
id = (0, mermaid_1.escapeId)(id);
|
|
138
139
|
if (info.environment && mermaid.includeEnvironments) {
|
|
139
140
|
if (info.environment.level > 0 || info.environment.current.memory.size !== 0) {
|
|
@@ -157,17 +158,20 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
157
158
|
if (mark?.has(id)) {
|
|
158
159
|
mermaid.nodeLines.push(` style ${idPrefix}${id} ${mermaid.markStyle.vertex} `);
|
|
159
160
|
}
|
|
160
|
-
if (
|
|
161
|
+
if (mermaid.rootGraph.unknownSideEffects.values().some(l => node_id_1.NodeId.normalize(l) === node_id_1.NodeId.normalize(origId))) {
|
|
161
162
|
mermaid.nodeLines.push(` style ${idPrefix}${id} stroke:red,stroke-width:5px; `);
|
|
162
163
|
}
|
|
163
|
-
|
|
164
|
+
if (info.tag === vertex_1.VertexType.FunctionDefinition) {
|
|
165
|
+
subflowToMermaid(id, info.subflow, mermaid, idPrefix);
|
|
166
|
+
}
|
|
167
|
+
const edges = mermaid.rootGraph.outgoingEdges(node_id_1.NodeId.normalize(origId));
|
|
164
168
|
if (edges === undefined) {
|
|
165
169
|
mermaid.nodeLines.push(' %% No edges found for ' + id);
|
|
166
170
|
return;
|
|
167
171
|
}
|
|
168
|
-
const artificialCdEdges = (info.cds ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']) }]);
|
|
172
|
+
const artificialCdEdges = (info.cds ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']), file: x.file }]);
|
|
169
173
|
// eslint-disable-next-line prefer-const
|
|
170
|
-
for (let [target, edge] of [...edges
|
|
174
|
+
for (let [target, edge] of [...edges, ...artificialCdEdges]) {
|
|
171
175
|
if (includeOnlyIds && !includeOnlyIds.has(target)) {
|
|
172
176
|
continue;
|
|
173
177
|
}
|
|
@@ -177,8 +181,8 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
177
181
|
const edgeId = encodeEdge(idPrefix + id, idPrefix + target, edgeTypes);
|
|
178
182
|
if (!mermaid.presentEdges.has(edgeId)) {
|
|
179
183
|
mermaid.presentEdges.add(edgeId);
|
|
180
|
-
const style =
|
|
181
|
-
mermaid.edgeLines.push(` ${idPrefix}${id} ${style}|"${[...edgeTypes].map(e => typeof e === 'number' ? edge_1.DfEdge.typeToName(e) : e).join(', ')}"| ${idPrefix}${target}`);
|
|
184
|
+
const style = node_id_1.NodeId.isBuiltIn(target) ? '-.->' : '-->';
|
|
185
|
+
mermaid.edgeLines.push(` ${idPrefix}${id} ${style}|"${[...edgeTypes].map(e => typeof e === 'number' ? edge_1.DfEdge.typeToName(e) : e).join(', ')}${'file' in edge && edge.file ? `, from: ${edge.file}` : ''}"| ${idPrefix}${target}`);
|
|
182
186
|
if (mermaid.mark?.has(id + '->' + target)) {
|
|
183
187
|
// who invented this syntax?!
|
|
184
188
|
mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} ${mermaid.markStyle.edge}`);
|
|
@@ -186,7 +190,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
186
190
|
if (edgeTypes.has('CD-True') || edgeTypes.has('CD-False')) {
|
|
187
191
|
mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} stroke:gray,color:gray;`);
|
|
188
192
|
}
|
|
189
|
-
if (
|
|
193
|
+
if (node_id_1.NodeId.isBuiltIn(target)) {
|
|
190
194
|
mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} stroke:gray;`);
|
|
191
195
|
if (!mermaid.presentVertices.has(target)) {
|
|
192
196
|
mermaid.nodeLines.push(` ${idPrefix}${target}["\`Built-In:\n${(0, mermaid_1.escapeMarkdown)(String(originalTarget).replace('built-in:', ''))}\`"]`);
|
|
@@ -196,9 +200,6 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
|
-
if (info.tag === vertex_1.VertexType.FunctionDefinition) {
|
|
200
|
-
subflowToMermaid(id, info.subflow, mermaid, idPrefix);
|
|
201
|
-
}
|
|
202
203
|
}
|
|
203
204
|
// make the passing of root ids more performant again
|
|
204
205
|
function graphToMermaidGraph(rootIds, { simplified, graph, prefix = 'flowchart BT', idPrefix = '', includeEnvironments = !simplified, mark, rootGraph, presentEdges = new Set(), markStyle = info_1.MermaidDefaultMarkStyle, includeOnlyIds }) {
|
|
@@ -156,7 +156,7 @@ function renderVertices(dfg, g, canvas) {
|
|
|
156
156
|
const label = node.label;
|
|
157
157
|
const x = Math.round(node.x);
|
|
158
158
|
const y = Math.round(node.y);
|
|
159
|
-
const tag = dfg.getVertex(
|
|
159
|
+
const tag = dfg.getVertex(node_id_1.NodeId.normalize(nodeId))?.tag;
|
|
160
160
|
let e = '+';
|
|
161
161
|
if (tag && tag in type2Edge) {
|
|
162
162
|
e = type2Edge[tag];
|
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.9.
|
|
9
|
+
const version = '2.9.11';
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
12
12
|
*/
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RNode } from './model';
|
|
2
|
-
import type { NodeId } from './processing/node-id';
|
|
3
|
-
import type { ParentInformation } from './processing/decorate';
|
|
4
|
-
import type { RProject } from './nodes/r-project';
|
|
5
|
-
/**
|
|
6
|
-
* Collects all node ids within a tree given by a respective root node
|
|
7
|
-
* @param nodes - The root id nodes to start collecting from
|
|
8
|
-
* @param stop - A function that determines whether to stop collecting at a given node, does not stop by default
|
|
9
|
-
*/
|
|
10
|
-
export declare function collectAllIds<OtherInfo>(nodes: RProject<OtherInfo & ParentInformation> | RNode<OtherInfo & ParentInformation> | (RNode<OtherInfo & ParentInformation> | null | undefined)[] | undefined, stop?: (node: RNode<OtherInfo & ParentInformation>) => boolean): Set<NodeId>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.collectAllIds = collectAllIds;
|
|
4
|
-
const visitor_1 = require("./processing/visitor");
|
|
5
|
-
const type_1 = require("./type");
|
|
6
|
-
/**
|
|
7
|
-
* Collects all node ids within a tree given by a respective root node
|
|
8
|
-
* @param nodes - The root id nodes to start collecting from
|
|
9
|
-
* @param stop - A function that determines whether to stop collecting at a given node, does not stop by default
|
|
10
|
-
*/
|
|
11
|
-
function collectAllIds(nodes, stop = () => false) {
|
|
12
|
-
if (nodes && 'type' in nodes && nodes.type === type_1.RType.Project) {
|
|
13
|
-
nodes = nodes.files.map(f => f.root);
|
|
14
|
-
}
|
|
15
|
-
const ids = new Set();
|
|
16
|
-
(0, visitor_1.visitAst)(nodes, (node) => {
|
|
17
|
-
if (stop(node)) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
ids.add(node.info.id);
|
|
21
|
-
return false;
|
|
22
|
-
});
|
|
23
|
-
return ids;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=collect.js.map
|