@eagleoutice/flowr 2.2.2 → 2.2.4

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 (116) hide show
  1. package/README.md +412 -39
  2. package/benchmark/slicer.js +0 -1
  3. package/benchmark/summarizer/first-phase/process.js +18 -8
  4. package/benchmark/summarizer/summarizer.d.ts +1 -1
  5. package/benchmark/summarizer/summarizer.js +1 -1
  6. package/cli/benchmark-app.js +1 -1
  7. package/cli/common/script.js +0 -1
  8. package/cli/repl/commands/repl-cfg.js +38 -8
  9. package/cli/repl/commands/repl-commands.js +1 -1
  10. package/cli/repl/commands/repl-dataflow.js +45 -12
  11. package/cli/repl/commands/repl-normalize.js +38 -8
  12. package/cli/repl/commands/repl-parse.js +43 -2
  13. package/cli/repl/commands/repl-query.js +2 -2
  14. package/cli/repl/core.js +17 -8
  15. package/cli/repl/print-version.d.ts +1 -0
  16. package/cli/repl/print-version.js +8 -2
  17. package/cli/repl/server/connection.js +27 -15
  18. package/cli/repl/server/messages/all-messages.js +17 -7
  19. package/cli/repl/server/messages/message-repl.js +17 -7
  20. package/cli/repl/server/messages/message-slice.js +17 -7
  21. package/cli/script-core/statistics-helper-core.js +0 -1
  22. package/core/pipeline-executor.d.ts +6 -0
  23. package/core/pipeline-executor.js +8 -0
  24. package/core/print/dataflow-printer.js +3 -0
  25. package/core/print/normalize-printer.js +0 -1
  26. package/core/steps/all/core/01-parse-tree-sitter.d.ts +7 -0
  27. package/core/steps/pipeline/default-pipelines.d.ts +57 -47
  28. package/core/steps/pipeline/default-pipelines.js +23 -2
  29. package/core/steps/pipeline/pipeline.d.ts +1 -1
  30. package/core/steps/pipeline/pipeline.js +1 -1
  31. package/core/steps/pipeline-step.d.ts +1 -3
  32. package/dataflow/environments/resolve-by-name.d.ts +5 -2
  33. package/dataflow/environments/resolve-by-name.js +6 -4
  34. package/dataflow/extractor.d.ts +10 -0
  35. package/dataflow/extractor.js +10 -0
  36. package/dataflow/graph/resolve-graph.js +1 -1
  37. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -1
  38. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
  39. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +20 -4
  40. package/documentation/data/server/doc-data-server-messages.js +1 -2
  41. package/documentation/doc-util/doc-auto-gen.d.ts +1 -0
  42. package/documentation/doc-util/doc-auto-gen.js +5 -1
  43. package/documentation/doc-util/doc-benchmarks.d.ts +23 -0
  44. package/documentation/doc-util/doc-benchmarks.js +76 -0
  45. package/documentation/doc-util/doc-code.d.ts +1 -0
  46. package/documentation/doc-util/doc-code.js +4 -0
  47. package/documentation/doc-util/doc-dfg.d.ts +5 -3
  48. package/documentation/doc-util/doc-dfg.js +10 -8
  49. package/documentation/doc-util/doc-files.d.ts +2 -1
  50. package/documentation/doc-util/doc-files.js +3 -2
  51. package/documentation/doc-util/doc-normalized-ast.d.ts +2 -1
  52. package/documentation/doc-util/doc-normalized-ast.js +4 -5
  53. package/documentation/doc-util/doc-repl.d.ts +6 -2
  54. package/documentation/doc-util/doc-repl.js +10 -6
  55. package/documentation/doc-util/doc-server-message.js +1 -1
  56. package/documentation/doc-util/doc-structure.d.ts +1 -1
  57. package/documentation/doc-util/doc-structure.js +2 -2
  58. package/documentation/doc-util/doc-types.d.ts +8 -5
  59. package/documentation/doc-util/doc-types.js +31 -18
  60. package/documentation/index.d.ts +9 -0
  61. package/documentation/index.js +26 -0
  62. package/documentation/print-capabilities-markdown.js +105 -19
  63. package/documentation/print-core-wiki.d.ts +1 -0
  64. package/documentation/print-core-wiki.js +413 -0
  65. package/documentation/print-dataflow-graph-wiki.js +27 -27
  66. package/documentation/print-interface-wiki.js +22 -16
  67. package/documentation/print-linting-and-testing-wiki.js +29 -9
  68. package/documentation/print-normalized-ast-wiki.js +22 -17
  69. package/documentation/print-query-wiki.js +7 -7
  70. package/documentation/print-readme.d.ts +1 -0
  71. package/documentation/print-readme.js +160 -0
  72. package/documentation/print-search-wiki.js +2 -1
  73. package/package.json +30 -41
  74. package/queries/catalog/dependencies-query/dependencies-query-executor.js +77 -45
  75. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +3 -0
  76. package/queries/catalog/dependencies-query/dependencies-query-format.js +3 -2
  77. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -1
  78. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +1 -1
  79. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -1
  80. package/queries/catalog/search-query/search-query-format.js +1 -1
  81. package/r-bridge/data/data.d.ts +48 -7
  82. package/r-bridge/data/data.js +62 -8
  83. package/r-bridge/data/types.d.ts +7 -1
  84. package/r-bridge/lang-4.x/ast/model/model.d.ts +2 -3
  85. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +2 -0
  86. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +2 -5
  87. package/r-bridge/lang-4.x/ast/parser/json/format.d.ts +6 -0
  88. package/r-bridge/lang-4.x/ast/parser/json/format.js +6 -0
  89. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +13 -2
  90. package/r-bridge/lang-4.x/ast/parser/json/parser.js +19 -3
  91. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +3 -0
  92. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -0
  93. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +1 -0
  94. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -0
  95. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +6 -1
  96. package/r-bridge/parser.d.ts +10 -0
  97. package/r-bridge/parser.js +26 -2
  98. package/r-bridge/shell.js +18 -8
  99. package/search/flowr-search-builder.d.ts +1 -2
  100. package/search/flowr-search-builder.js +1 -3
  101. package/statistics/features/supported/comments/comments.js +17 -7
  102. package/statistics/features/supported/used-functions/post-process.js +0 -1
  103. package/statistics/features/supported/used-packages/used-packages.js +17 -7
  104. package/statistics/features/supported/values/values.js +17 -7
  105. package/statistics/summarizer/summarizer.js +1 -2
  106. package/util/files.js +17 -7
  107. package/util/json.js +0 -2
  108. package/util/mermaid/dfg.d.ts +3 -0
  109. package/util/mermaid/dfg.js +24 -8
  110. package/util/numbers.d.ts +1 -0
  111. package/util/numbers.js +5 -0
  112. package/util/parallel.js +17 -7
  113. package/util/quads.js +3 -3
  114. package/util/strings.d.ts +9 -0
  115. package/util/strings.js +14 -0
  116. package/util/version.js +1 -1
package/util/quads.js CHANGED
@@ -15,12 +15,12 @@ exports.defaultQuadIgnoreIf = defaultQuadIgnoreIf;
15
15
  exports.serialize2quads = serialize2quads;
16
16
  exports.graph2quads = graph2quads;
17
17
  const n3_1 = require("n3");
18
- var namedNode = n3_1.DataFactory.namedNode;
19
- var quad = n3_1.DataFactory.quad;
18
+ const namedNode = (v) => n3_1.DataFactory.namedNode(v);
19
+ const quad = (s, p, o, g) => n3_1.DataFactory.quad(s, p, o, g);
20
20
  const objects_1 = require("./objects");
21
21
  const assert_1 = require("./assert");
22
22
  const defaultmap_1 = require("./defaultmap");
23
- var literal = n3_1.DataFactory.literal;
23
+ const literal = (v, n) => n3_1.DataFactory.literal(v, n);
24
24
  const log_1 = require("./log");
25
25
  const domain = 'https://uni-ulm.de/r-ast/';
26
26
  /**
package/util/strings.d.ts CHANGED
@@ -10,3 +10,12 @@ export declare function withoutWhitespace(output: string): string;
10
10
  * Find the longest common prefix in an array of strings
11
11
  */
12
12
  export declare function longestCommonPrefix(strings: string[]): string;
13
+ /**
14
+ * Join a list of strings, but with special handling for the last element/scenarios in which the array contains exactly two elements.
15
+ * The goal is to create (partial) sentences like `a, b, and c` or `a and b`.
16
+ */
17
+ export declare function joinWithLast(strs: readonly string[], { join, last, joinTwo }?: {
18
+ join?: string;
19
+ last?: string;
20
+ joinTwo?: string;
21
+ }): string;
package/util/strings.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.startAndEndsWith = startAndEndsWith;
4
4
  exports.withoutWhitespace = withoutWhitespace;
5
5
  exports.longestCommonPrefix = longestCommonPrefix;
6
+ exports.joinWithLast = joinWithLast;
6
7
  /**
7
8
  * Check if the given string starts and ends with the given letter
8
9
  */
@@ -37,4 +38,17 @@ function longestCommonPrefix(strings) {
37
38
  }
38
39
  return prefix;
39
40
  }
41
+ /**
42
+ * Join a list of strings, but with special handling for the last element/scenarios in which the array contains exactly two elements.
43
+ * The goal is to create (partial) sentences like `a, b, and c` or `a and b`.
44
+ */
45
+ function joinWithLast(strs, { join = ', ', last = ', and ', joinTwo = ' and ' } = {}) {
46
+ if (strs.length <= 1) {
47
+ return strs.join('');
48
+ }
49
+ else if (strs.length === 2) {
50
+ return strs.join(joinTwo);
51
+ }
52
+ return strs.slice(0, -1).join(join) + last + strs[strs.length - 1];
53
+ }
40
54
  //# sourceMappingURL=strings.js.map
package/util/version.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.flowrVersion = flowrVersion;
4
4
  const semver_1 = require("semver");
5
5
  // this is automatically replaced with the current version by release-it
6
- const version = '2.2.2';
6
+ const version = '2.2.4';
7
7
  function flowrVersion() {
8
8
  return new semver_1.SemVer(version);
9
9
  }