@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.
Files changed (158) hide show
  1. package/README.md +13 -13
  2. package/abstract-interpretation/absint-visitor.d.ts +20 -68
  3. package/abstract-interpretation/absint-visitor.js +44 -54
  4. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +0 -9
  5. package/abstract-interpretation/data-frame/dataframe-domain.js +1 -14
  6. package/abstract-interpretation/data-frame/mappers/function-mapper.js +1 -1
  7. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +2 -0
  8. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -2
  9. package/abstract-interpretation/data-frame/shape-inference.d.ts +15 -7
  10. package/abstract-interpretation/data-frame/shape-inference.js +20 -17
  11. package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
  12. package/abstract-interpretation/domains/abstract-domain.js +1 -2
  13. package/abstract-interpretation/domains/product-domain.d.ts +1 -1
  14. package/abstract-interpretation/domains/product-domain.js +1 -1
  15. package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
  16. package/abstract-interpretation/domains/set-range-domain.js +1 -1
  17. package/abstract-interpretation/domains/state-abstract-domain.d.ts +3 -1
  18. package/abstract-interpretation/domains/state-abstract-domain.js +6 -0
  19. package/abstract-interpretation/normalized-ast-fold.d.ts +2 -1
  20. package/abstract-interpretation/normalized-ast-fold.js +8 -1
  21. package/cli/repl/commands/repl-query.js +7 -9
  22. package/cli/wiki.d.ts +2 -1
  23. package/cli/wiki.js +2 -0
  24. package/control-flow/cfg-dead-code.js +3 -0
  25. package/control-flow/extract-cfg.js +27 -7
  26. package/control-flow/semantic-cfg-guided-visitor.d.ts +57 -4
  27. package/control-flow/semantic-cfg-guided-visitor.js +89 -28
  28. package/control-flow/useless-loop.d.ts +2 -1
  29. package/control-flow/useless-loop.js +13 -6
  30. package/dataflow/environments/built-in-config.d.ts +6 -5
  31. package/dataflow/environments/built-in.d.ts +107 -34
  32. package/dataflow/environments/built-in.js +115 -39
  33. package/dataflow/environments/default-builtin-config.d.ts +113 -67
  34. package/dataflow/environments/default-builtin-config.js +71 -66
  35. package/dataflow/environments/diff.js +2 -2
  36. package/dataflow/environments/environment.js +7 -7
  37. package/dataflow/environments/identifier.d.ts +4 -2
  38. package/dataflow/environments/identifier.js +2 -0
  39. package/dataflow/environments/reference-to-maybe.d.ts +2 -2
  40. package/dataflow/environments/reference-to-maybe.js +11 -11
  41. package/dataflow/environments/resolve-by-name.js +17 -6
  42. package/dataflow/eval/resolve/alias-tracking.js +1 -1
  43. package/dataflow/eval/resolve/resolve.js +6 -6
  44. package/dataflow/eval/values/intervals/interval-constants.js +3 -3
  45. package/dataflow/eval/values/scalar/{scalar-consatnts.d.ts → scalar-constants.d.ts} +2 -2
  46. package/dataflow/eval/values/scalar/{scalar-consatnts.js → scalar-constants.js} +3 -3
  47. package/dataflow/eval/values/sets/set-constants.d.ts +4 -2
  48. package/dataflow/eval/values/sets/set-constants.js +4 -2
  49. package/dataflow/extractor.js +1 -1
  50. package/dataflow/fn/exceptions-of-function.d.ts +1 -1
  51. package/dataflow/fn/exceptions-of-function.js +3 -3
  52. package/dataflow/graph/call-graph.js +2 -2
  53. package/dataflow/graph/dataflowgraph-builder.d.ts +4 -4
  54. package/dataflow/graph/dataflowgraph-builder.js +14 -14
  55. package/dataflow/graph/diff-dataflow-graph.js +3 -3
  56. package/dataflow/graph/graph.d.ts +1 -1
  57. package/dataflow/graph/graph.js +4 -4
  58. package/dataflow/graph/vertex.d.ts +3 -3
  59. package/dataflow/info.d.ts +3 -3
  60. package/dataflow/info.js +11 -11
  61. package/dataflow/internal/linker.d.ts +9 -0
  62. package/dataflow/internal/linker.js +33 -7
  63. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -12
  64. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  65. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +11 -10
  66. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +20 -17
  67. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  68. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +4 -3
  69. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
  70. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +9 -9
  71. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +5 -1
  72. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -6
  73. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +0 -7
  74. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +39 -6
  75. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -1
  76. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +12 -1
  77. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +36 -12
  78. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
  79. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +3 -2
  80. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -1
  81. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +18 -0
  82. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +67 -0
  83. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +11 -10
  85. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
  86. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -2
  87. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +5 -4
  88. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -2
  89. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -1
  90. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +7 -6
  91. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  92. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +3 -2
  93. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +18 -0
  94. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +103 -0
  95. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +8 -7
  96. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +4 -3
  97. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +13 -12
  98. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +6 -5
  99. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -1
  100. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -1
  101. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +7 -6
  102. package/dataflow/internal/process/functions/call/common.js +7 -7
  103. package/dataflow/internal/process/functions/call/known-call-handling.js +7 -8
  104. package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +1 -2
  105. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +6 -6
  106. package/dataflow/internal/process/functions/process-argument.js +2 -2
  107. package/dataflow/internal/process/functions/process-parameter.js +3 -3
  108. package/dataflow/internal/process/process-symbol.js +3 -3
  109. package/dataflow/internal/process/process-uninteresting-leaf.d.ts +3 -1
  110. package/dataflow/internal/process/process-uninteresting-leaf.js +3 -1
  111. package/dataflow/internal/process/process-value.d.ts +1 -1
  112. package/dataflow/internal/process/process-value.js +4 -4
  113. package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
  114. package/dataflow/processor.d.ts +1 -1
  115. package/documentation/doc-util/doc-structure.js +1 -1
  116. package/documentation/doc-util/doc-types.d.ts +10 -3
  117. package/documentation/doc-util/doc-types.js +110 -33
  118. package/documentation/wiki-absint.d.ts +6 -0
  119. package/documentation/wiki-absint.js +149 -0
  120. package/documentation/wiki-dataflow-graph.js +11 -10
  121. package/documentation/wiki-interface.js +2 -1
  122. package/documentation/wiki-mk/doc-context.d.ts +3 -3
  123. package/documentation/wiki-mk/doc-context.js +2 -2
  124. package/documentation/wiki-mk/doc-maker.js +2 -2
  125. package/documentation/wiki-normalized-ast.d.ts +9 -0
  126. package/documentation/wiki-normalized-ast.js +40 -52
  127. package/linter/linter-rules.d.ts +1 -1
  128. package/linter/rules/seeded-randomness.js +5 -4
  129. package/linter/rules/useless-loop.d.ts +3 -3
  130. package/package.json +1 -1
  131. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
  132. package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -1
  133. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -0
  134. package/queries/catalog/dependencies-query/dependencies-query-format.js +5 -0
  135. package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
  136. package/queries/catalog/dependencies-query/function-info/test-functions.js +82 -0
  137. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -2
  138. package/queries/catalog/df-shape-query/df-shape-query-format.js +3 -3
  139. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
  140. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +1 -1
  141. package/r-bridge/data/data.d.ts +6 -1
  142. package/r-bridge/data/data.js +8 -2
  143. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +7 -0
  144. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +19 -0
  145. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +4 -0
  146. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +7 -0
  147. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -1
  148. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -1
  149. package/r-bridge/lang-4.x/convert-values.d.ts +5 -0
  150. package/search/flowr-search-filters.d.ts +2 -2
  151. package/slicing/static/static-slicer.js +2 -2
  152. package/util/mermaid/cfg.d.ts +10 -3
  153. package/util/mermaid/cfg.js +39 -10
  154. package/util/mermaid/dfg.js +5 -5
  155. package/util/simple-df/dfg-view.js +1 -1
  156. package/util/text/ansi.d.ts +4 -0
  157. package/util/text/ansi.js +7 -0
  158. package/util/version.js +1 -1
@@ -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 = `"\`Basic Block (${id})\n${(0, mermaid_1.escapeMarkdown)(reconstruct)}\`"`;
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 (includeOnlyIds && !includeOnlyIds.has(from)) {
132
+ if (!diagramIncludedIds.has(from)) {
106
133
  continue;
107
134
  }
108
135
  for (const [to, edge] of targets) {
109
- if (includeOnlyIds && !includeOnlyIds.has(to)) {
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 (!includeOnlyIds || includeOnlyIds.has(entryPoint)) {
119
- output += ` style n${entryPoint} stroke:cyan,stroke-width:6.5px;`;
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 (!includeOnlyIds || includeOnlyIds.has(exitPoint)) {
124
- output += ` style n${exitPoint} stroke:green,stroke-width:6.5px;`;
150
+ if (diagramIncludedIds.has(exitPoint)) {
151
+ output += ` style n${exitPoint} ${exitPointStyle}`;
125
152
  }
126
153
  }
127
154
  if (mark) {
128
- for (const id of mark.values()) {
129
- output += ` style n${id} ${markStyle.vertex}`;
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;
@@ -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.controlDependencies ? ', :may:' + arg.controlDependencies.map(c => c.id + (c.when ? '+' : '-')).join(',') : '';
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.controlDependencies ? ' (:may:' + arg.controlDependencies.map(c => c.id + (c.when ? '+' : '-')).join(',') + ')' : '';
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.controlDependencies ? ' cds: {' + id.controlDependencies.map(c => c.id + (c.when ? '+' : '-')).join(',') + '},' : ''} def. @${id.definedAt})`;
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.controlDependencies ? ', :may:' + info.controlDependencies.map(c => c.id + (c.when ? '+' : '-')).join(',') : '';
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.controlDependencies ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']) }]);
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
- controlDependencies: options.keepCd ? arg.controlDependencies : undefined,
31
+ cds: options.keepCd ? arg.cds : undefined,
32
32
  functionInformation: options.compactFunctions ? arg.functionInformation : undefined
33
33
  };
34
34
  };
@@ -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.6';
9
+ const version = '2.8.7';
10
10
  /**
11
11
  * Retrieves the current flowR version as a new {@link SemVer} object.
12
12
  */