@eagleoutice/flowr 2.7.0 → 2.7.3

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 (168) hide show
  1. package/README.md +14 -14
  2. package/abstract-interpretation/absint-visitor.d.ts +160 -0
  3. package/abstract-interpretation/absint-visitor.js +279 -0
  4. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +2 -2
  5. package/abstract-interpretation/data-frame/dataframe-domain.js +23 -7
  6. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +6 -6
  7. package/abstract-interpretation/data-frame/mappers/access-mapper.js +10 -14
  8. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +15 -9
  9. package/abstract-interpretation/data-frame/mappers/arguments.js +27 -4
  10. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +17 -17
  11. package/abstract-interpretation/data-frame/mappers/function-mapper.js +55 -67
  12. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +7 -7
  13. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +25 -29
  14. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
  15. package/abstract-interpretation/data-frame/resolve-args.js +1 -1
  16. package/abstract-interpretation/data-frame/semantics.js +5 -6
  17. package/abstract-interpretation/data-frame/shape-inference.d.ts +52 -28
  18. package/abstract-interpretation/data-frame/shape-inference.js +67 -90
  19. package/abstract-interpretation/domains/bounded-set-domain.d.ts +2 -2
  20. package/abstract-interpretation/domains/interval-domain.d.ts +2 -2
  21. package/abstract-interpretation/domains/set-range-domain.d.ts +10 -4
  22. package/abstract-interpretation/domains/set-range-domain.js +7 -1
  23. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +2 -2
  24. package/abstract-interpretation/domains/singleton-domain.d.ts +2 -2
  25. package/benchmark/slicer.js +13 -14
  26. package/cli/common/options.d.ts +431 -8
  27. package/cli/common/options.js +1 -1
  28. package/cli/common/scripts-info.d.ts +431 -7
  29. package/cli/flowr-main-options.d.ts +102 -2
  30. package/cli/flowr.d.ts +102 -2
  31. package/cli/repl/commands/repl-commands.d.ts +25 -0
  32. package/cli/repl/commands/repl-query.js +17 -5
  33. package/cli/wiki.d.ts +13 -0
  34. package/cli/wiki.js +7 -2
  35. package/config.d.ts +4 -4
  36. package/config.js +1 -1
  37. package/control-flow/basic-cfg-guided-visitor.js +7 -8
  38. package/control-flow/control-flow-graph.d.ts +1 -1
  39. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  40. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  41. package/dataflow/eval/resolve/alias-tracking.js +1 -1
  42. package/dataflow/internal/linker.d.ts +2 -0
  43. package/dataflow/internal/linker.js +10 -12
  44. package/documentation/doc-capabilities.d.ts +1 -1
  45. package/documentation/doc-readme.d.ts +1 -1
  46. package/documentation/doc-util/doc-cfg.js +1 -1
  47. package/documentation/doc-util/doc-cli-option.d.ts +6 -6
  48. package/documentation/doc-util/doc-cli-option.js +3 -3
  49. package/documentation/doc-util/doc-dfg.d.ts +1 -1
  50. package/documentation/doc-util/doc-files.d.ts +3 -0
  51. package/documentation/doc-util/doc-files.js +4 -1
  52. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  53. package/documentation/issue-linting-rule.d.ts +1 -1
  54. package/documentation/wiki-analyzer.d.ts +1 -1
  55. package/documentation/wiki-cfg.d.ts +1 -1
  56. package/documentation/wiki-core.d.ts +1 -1
  57. package/documentation/wiki-dataflow-graph.d.ts +1 -1
  58. package/documentation/wiki-dataflow-graph.js +6 -6
  59. package/documentation/wiki-engine.d.ts +1 -1
  60. package/documentation/wiki-engine.js +9 -10
  61. package/documentation/wiki-faq.d.ts +1 -1
  62. package/documentation/wiki-interface.d.ts +1 -1
  63. package/documentation/wiki-interface.js +12 -13
  64. package/documentation/wiki-linter.d.ts +1 -1
  65. package/documentation/wiki-linting-and-testing.d.ts +1 -1
  66. package/documentation/wiki-mk/doc-context.d.ts +54 -1
  67. package/documentation/wiki-mk/doc-context.js +17 -0
  68. package/documentation/wiki-mk/doc-maker.d.ts +5 -5
  69. package/documentation/wiki-mk/doc-maker.js +3 -1
  70. package/documentation/wiki-normalized-ast.d.ts +1 -1
  71. package/documentation/wiki-onboarding.d.ts +1 -1
  72. package/documentation/wiki-overview.d.ts +9 -0
  73. package/documentation/wiki-overview.js +248 -0
  74. package/documentation/wiki-query.d.ts +1 -1
  75. package/documentation/wiki-query.js +17 -1
  76. package/documentation/wiki-search.d.ts +1 -1
  77. package/documentation/wiki-setup.d.ts +9 -0
  78. package/documentation/wiki-setup.js +122 -0
  79. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  80. package/linter/rules/dataframe-access-validation.js +8 -10
  81. package/linter/rules/unused-definition.js +1 -1
  82. package/package.json +1 -1
  83. package/project/context/flowr-analyzer-context.d.ts +4 -0
  84. package/project/context/flowr-analyzer-context.js +3 -1
  85. package/project/context/flowr-analyzer-dependencies-context.d.ts +3 -2
  86. package/project/context/flowr-analyzer-dependencies-context.js +4 -2
  87. package/project/context/flowr-analyzer-files-context.d.ts +9 -1
  88. package/project/context/flowr-analyzer-files-context.js +4 -0
  89. package/project/context/flowr-analyzer-functions-context.d.ts +29 -0
  90. package/project/context/flowr-analyzer-functions-context.js +68 -0
  91. package/project/context/flowr-file.d.ts +2 -0
  92. package/project/context/flowr-file.js +2 -0
  93. package/project/plugins/file-plugins/{flowr-description-file.d.ts → files/flowr-description-file.d.ts} +1 -1
  94. package/project/plugins/file-plugins/files/flowr-description-file.js +75 -0
  95. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +32 -0
  96. package/project/plugins/file-plugins/files/flowr-namespace-file.js +102 -0
  97. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +27 -0
  98. package/project/plugins/file-plugins/files/flowr-news-file.js +152 -0
  99. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  100. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  101. package/project/plugins/file-plugins/flowr-analyzer-namespace-file-plugin.d.ts +22 -0
  102. package/project/plugins/file-plugins/flowr-analyzer-namespace-file-plugin.js +34 -0
  103. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +23 -0
  104. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +35 -0
  105. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +1 -1
  106. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +1 -1
  107. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -1
  108. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +1 -1
  109. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +1 -1
  110. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +1 -1
  111. package/project/plugins/flowr-analyzer-plugin-defaults.js +4 -0
  112. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +5 -1
  113. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +10 -0
  114. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +56 -0
  115. package/project/plugins/package-version-plugins/package.d.ts +15 -2
  116. package/project/plugins/package-version-plugins/package.js +33 -5
  117. package/project/plugins/plugin-registry.d.ts +3 -1
  118. package/project/plugins/plugin-registry.js +4 -0
  119. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
  120. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -1
  121. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +2 -0
  122. package/queries/catalog/dependencies-query/dependencies-query-format.js +2 -1
  123. package/queries/catalog/df-shape-query/df-shape-query-executor.js +4 -2
  124. package/queries/catalog/files-query/files-query-executor.d.ts +6 -0
  125. package/queries/catalog/files-query/files-query-executor.js +49 -0
  126. package/queries/catalog/files-query/files-query-format.d.ts +36 -0
  127. package/queries/catalog/files-query/files-query-format.js +114 -0
  128. package/queries/catalog/linter-query/linter-query-format.js +1 -1
  129. package/queries/query.d.ts +10 -1
  130. package/queries/query.js +3 -1
  131. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -1
  132. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +8 -8
  133. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +8 -8
  134. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +0 -1
  135. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +0 -1
  136. package/statistics/features/supported/data-access/data-access.js +1 -1
  137. package/util/containers.js +1 -1
  138. package/util/files.d.ts +0 -7
  139. package/util/files.js +0 -41
  140. package/util/mermaid/ast.d.ts +3 -2
  141. package/util/mermaid/ast.js +13 -7
  142. package/util/mermaid/cfg.d.ts +3 -2
  143. package/util/mermaid/cfg.js +26 -6
  144. package/util/mermaid/dfg.d.ts +1 -7
  145. package/util/mermaid/dfg.js +7 -3
  146. package/util/mermaid/info.d.ts +17 -0
  147. package/util/mermaid/info.js +5 -0
  148. package/util/prefix.d.ts +9 -5
  149. package/util/prefix.js +14 -6
  150. package/util/r-regex.d.ts +21 -0
  151. package/util/r-regex.js +25 -0
  152. package/util/text/args.js +12 -3
  153. package/util/version.js +1 -1
  154. package/abstract-interpretation/data-frame/absint-info.d.ts +0 -109
  155. package/abstract-interpretation/data-frame/absint-info.js +0 -31
  156. package/abstract-interpretation/data-frame/absint-visitor.d.ts +0 -57
  157. package/abstract-interpretation/data-frame/absint-visitor.js +0 -176
  158. package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +0 -21
  159. package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +0 -34
  160. package/documentation/doc-util/doc-print.d.ts +0 -5
  161. package/documentation/doc-util/doc-print.js +0 -36
  162. package/project/plugins/file-plugins/flowr-description-file.js +0 -37
  163. package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
  164. package/project/plugins/file-plugins/notebooks/notebook.js +0 -2
  165. /package/project/plugins/file-plugins/{notebooks → files}/flowr-jupyter-file.d.ts +0 -0
  166. /package/project/plugins/file-plugins/{notebooks → files}/flowr-jupyter-file.js +0 -0
  167. /package/project/plugins/file-plugins/{notebooks → files}/flowr-rmarkdown-file.d.ts +0 -0
  168. /package/project/plugins/file-plugins/{notebooks → files}/flowr-rmarkdown-file.js +0 -0
@@ -4,7 +4,7 @@ exports.FlowrAnalyzerJupyterFilePlugin = void 0;
4
4
  const semver_1 = require("semver");
5
5
  const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
6
6
  const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
7
- const flowr_jupyter_file_1 = require("./flowr-jupyter-file");
7
+ const flowr_jupyter_file_1 = require("../files/flowr-jupyter-file");
8
8
  const IpynbPattern = /\.ipynb$/i;
9
9
  /**
10
10
  * The plugin provides support for Jupyter (`.ipynb`) files
@@ -3,7 +3,7 @@ import { SemVer } from 'semver';
3
3
  import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
4
4
  import type { FlowrFileProvider } from '../../../context/flowr-file';
5
5
  import { FlowrAnalyzerFilePlugin } from '../flowr-analyzer-file-plugin';
6
- import { FlowrRMarkdownFile } from './flowr-rmarkdown-file';
6
+ import { FlowrRMarkdownFile } from '../files/flowr-rmarkdown-file';
7
7
  /**
8
8
  * The plugin provides support for Quarto R Markdown (`.qmd`) files
9
9
  */
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlowrAnalyzerQmdFilePlugin = void 0;
4
4
  const semver_1 = require("semver");
5
5
  const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
6
- const flowr_rmarkdown_file_1 = require("./flowr-rmarkdown-file");
6
+ const flowr_rmarkdown_file_1 = require("../files/flowr-rmarkdown-file");
7
7
  const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
8
8
  const QmdPattern = /\.qmd$/i;
9
9
  /**
@@ -3,7 +3,7 @@ import { SemVer } from 'semver';
3
3
  import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
4
4
  import { type FlowrFileProvider } from '../../../context/flowr-file';
5
5
  import { FlowrAnalyzerFilePlugin } from '../flowr-analyzer-file-plugin';
6
- import { FlowrRMarkdownFile } from './flowr-rmarkdown-file';
6
+ import { FlowrRMarkdownFile } from '../files/flowr-rmarkdown-file';
7
7
  /**
8
8
  * The plugin provides support for R Markdown (`.rmd`) files
9
9
  */
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlowrAnalyzerRmdFilePlugin = void 0;
4
4
  const semver_1 = require("semver");
5
5
  const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
6
- const flowr_rmarkdown_file_1 = require("./flowr-rmarkdown-file");
6
+ const flowr_rmarkdown_file_1 = require("../files/flowr-rmarkdown-file");
7
7
  const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
8
8
  const RmdPattern = /\.rmd$/i;
9
9
  /**
@@ -7,6 +7,8 @@ const flowr_analyzer_loading_order_description_file_plugin_1 = require("./loadin
7
7
  const flowr_analyzer_rmd_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-rmd-file-plugin");
8
8
  const flowr_analyzer_qmd_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-qmd-file-plugin");
9
9
  const flowr_analyzer_jupyter_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin");
10
+ const flowr_analyzer_namespace_file_plugin_1 = require("./file-plugins/flowr-analyzer-namespace-file-plugin");
11
+ const flowr_analyzer_news_file_plugin_1 = require("./file-plugins/flowr-analyzer-news-file-plugin");
10
12
  /**
11
13
  * Provides the default set of Flowr Analyzer plugins.
12
14
  */
@@ -18,6 +20,8 @@ function FlowrAnalyzerPluginDefaults() {
18
20
  new flowr_analyzer_rmd_file_plugin_1.FlowrAnalyzerRmdFilePlugin(),
19
21
  new flowr_analyzer_qmd_file_plugin_1.FlowrAnalyzerQmdFilePlugin(),
20
22
  new flowr_analyzer_jupyter_file_plugin_1.FlowrAnalyzerJupyterFilePlugin(),
23
+ new flowr_analyzer_namespace_file_plugin_1.FlowrAnalyzerNamespaceFilePlugin(),
24
+ new flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin()
21
25
  ];
22
26
  }
23
27
  //# sourceMappingURL=flowr-analyzer-plugin-defaults.js.map
@@ -32,7 +32,11 @@ class FlowrAnalyzerPackageVersionsDescriptionFilePlugin extends flowr_analyzer_p
32
32
  if (match) {
33
33
  const [, name, operator, version] = match;
34
34
  const range = package_1.Package.parsePackageVersionRange(operator, version);
35
- ctx.deps.addDependency(new package_1.Package(name, type, undefined, range));
35
+ ctx.deps.addDependency(new package_1.Package({
36
+ name: name,
37
+ type: type,
38
+ versionConstraints: range ? [range] : undefined
39
+ }));
36
40
  }
37
41
  }
38
42
  }
@@ -0,0 +1,10 @@
1
+ import { FlowrAnalyzerPackageVersionsPlugin } from './flowr-analyzer-package-versions-plugin';
2
+ import { SemVer } from 'semver';
3
+ import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
4
+ export declare const namespaceFileLog: import("tslog").Logger<import("tslog").ILogObj>;
5
+ export declare class FlowrAnalyzerPackageVersionsNamespaceFilePlugin extends FlowrAnalyzerPackageVersionsPlugin {
6
+ readonly name = "flowr-analyzer-package-version-namespace-file-plugin";
7
+ readonly description = "This plugin does...";
8
+ readonly version: SemVer;
9
+ process(ctx: FlowrAnalyzerContext): void;
10
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerPackageVersionsNamespaceFilePlugin = exports.namespaceFileLog = void 0;
4
+ const flowr_analyzer_package_versions_plugin_1 = require("./flowr-analyzer-package-versions-plugin");
5
+ const semver_1 = require("semver");
6
+ const package_1 = require("./package");
7
+ const flowr_file_1 = require("../../context/flowr-file");
8
+ const log_1 = require("../../../util/log");
9
+ exports.namespaceFileLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-package-versions-namespace-file-plugin' });
10
+ class FlowrAnalyzerPackageVersionsNamespaceFilePlugin extends flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin {
11
+ name = 'flowr-analyzer-package-version-namespace-file-plugin';
12
+ description = 'This plugin does...';
13
+ version = new semver_1.SemVer('0.1.0');
14
+ process(ctx) {
15
+ const nmspcFiles = ctx.files.getFilesByRole(flowr_file_1.FileRole.Namespace);
16
+ exports.namespaceFileLog.info(`Found ${nmspcFiles.length} namespace files!`);
17
+ /** this will do the caching etc. for me */
18
+ const deps = nmspcFiles[0].content();
19
+ for (const pkg in deps) {
20
+ const info = deps[pkg];
21
+ ctx.deps.addDependency(new package_1.Package({
22
+ name: pkg,
23
+ namespaceInfo: info
24
+ }));
25
+ for (const exportedSymbol of info.exportedSymbols) {
26
+ ctx.deps.functionsContext.addFunctionInfo({
27
+ name: exportedSymbol,
28
+ packageOrigin: pkg,
29
+ isExported: true,
30
+ isS3Generic: false,
31
+ });
32
+ }
33
+ for (const exportedFunction of info.exportedFunctions) {
34
+ ctx.deps.functionsContext.addFunctionInfo({
35
+ name: exportedFunction,
36
+ packageOrigin: pkg,
37
+ isExported: true,
38
+ isS3Generic: false,
39
+ });
40
+ }
41
+ for (const [genericName, classes] of info.exportS3Generics.entries()) {
42
+ for (const s3TypeDispatch of classes) {
43
+ ctx.deps.functionsContext.addFunctionInfo({
44
+ name: genericName,
45
+ packageOrigin: pkg,
46
+ isExported: true,
47
+ isS3Generic: true,
48
+ s3TypeDispatch: s3TypeDispatch,
49
+ });
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ exports.FlowrAnalyzerPackageVersionsNamespaceFilePlugin = FlowrAnalyzerPackageVersionsNamespaceFilePlugin;
56
+ //# sourceMappingURL=flowr-analyzer-package-versions-namespace-file-plugin.js.map
@@ -1,14 +1,27 @@
1
1
  import { Range } from 'semver';
2
+ import type { NamespaceInfo } from '../file-plugins/files/flowr-namespace-file';
2
3
  export type PackageType = 'package' | 'system' | 'r';
4
+ export type PackageOptions = {
5
+ derivedVersion?: Range;
6
+ type?: PackageType;
7
+ dependencies?: Package[];
8
+ namespaceInfo?: NamespaceInfo;
9
+ versionConstraints?: Range[];
10
+ };
3
11
  export declare class Package {
4
12
  name: string;
5
13
  derivedVersion?: Range;
6
14
  type?: PackageType;
7
15
  dependencies?: Package[];
16
+ namespaceInfo?: NamespaceInfo;
8
17
  versionConstraints: Range[];
9
- constructor(name: string, type?: PackageType, dependencies?: Package[], ...versionConstraints: readonly (Range | undefined)[]);
18
+ constructor(info: {
19
+ name: string;
20
+ } & PackageOptions);
21
+ has(name: string, className?: string): boolean;
22
+ s3For(generic: string): string[];
10
23
  mergeInPlace(other: Package): void;
11
- addInfo(type?: PackageType, dependencies?: Package[], ...versionConstraints: readonly Range[]): void;
24
+ addInfo(info: PackageOptions): void;
12
25
  getInfo(): this;
13
26
  deriveVersion(): Range | undefined;
14
27
  static parsePackageVersionRange(constraint?: string, version?: string): Range | undefined;
@@ -8,22 +8,50 @@ class Package {
8
8
  derivedVersion;
9
9
  type;
10
10
  dependencies;
11
+ namespaceInfo;
11
12
  versionConstraints = [];
12
- constructor(name, type, dependencies, ...versionConstraints) {
13
- this.name = name;
14
- this.addInfo(type, dependencies, ...(versionConstraints ?? []).filter(assert_1.isNotUndefined));
13
+ constructor(info) {
14
+ this.name = info.name;
15
+ this.addInfo(info);
16
+ }
17
+ has(name, className) {
18
+ if (!this.namespaceInfo) {
19
+ return false;
20
+ }
21
+ if (name.includes('.')) {
22
+ const [genericSplit, classSplit] = name.split('.');
23
+ const classes = this.namespaceInfo.exportS3Generics.get(genericSplit);
24
+ return classes ? classes.includes(classSplit) : false;
25
+ }
26
+ if (className) {
27
+ const classes = this.namespaceInfo.exportS3Generics.get(name);
28
+ return classes ? classes.includes(className) : false;
29
+ }
30
+ return this.namespaceInfo.exportedFunctions.includes(name) || this.namespaceInfo.exportedSymbols.includes(name);
31
+ }
32
+ s3For(generic) {
33
+ return this.namespaceInfo?.exportS3Generics.get(generic) ?? [];
15
34
  }
16
35
  mergeInPlace(other) {
17
36
  (0, assert_1.guard)(this.name === other.name, 'Can only merge packages with the same name');
18
- this.addInfo(other.type, other.dependencies, ...other.versionConstraints);
37
+ this.addInfo({
38
+ type: other.type,
39
+ dependencies: other.dependencies,
40
+ namespaceInfo: other.namespaceInfo,
41
+ versionConstraints: other.versionConstraints
42
+ });
19
43
  }
20
- addInfo(type, dependencies, ...versionConstraints) {
44
+ addInfo(info) {
45
+ const { type, dependencies, namespaceInfo, versionConstraints } = info;
21
46
  if (type !== undefined) {
22
47
  this.type = type;
23
48
  }
24
49
  if (dependencies !== undefined) {
25
50
  this.dependencies = dependencies;
26
51
  }
52
+ if (namespaceInfo !== undefined) {
53
+ this.namespaceInfo = namespaceInfo;
54
+ }
27
55
  if (versionConstraints !== undefined) {
28
56
  this.derivedVersion ??= versionConstraints[0];
29
57
  for (const constraint of versionConstraints) {
@@ -5,10 +5,12 @@ import { FlowrAnalyzerLoadingOrderDescriptionFilePlugin } from './loading-order-
5
5
  import { FlowrAnalyzerRmdFilePlugin } from './file-plugins/notebooks/flowr-analyzer-rmd-file-plugin';
6
6
  import { FlowrAnalyzerQmdFilePlugin } from './file-plugins/notebooks/flowr-analyzer-qmd-file-plugin';
7
7
  import { FlowrAnalyzerJupyterFilePlugin } from './file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin';
8
+ import { FlowrAnalyzerNamespaceFilePlugin } from './file-plugins/flowr-analyzer-namespace-file-plugin';
9
+ import { FlowrAnalyzerNewsFilePlugin } from './file-plugins/flowr-analyzer-news-file-plugin';
8
10
  /**
9
11
  * The built-in Flowr Analyzer plugins that are always available.
10
12
  */
11
- export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin]];
13
+ export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilePlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin]];
12
14
  export type BuiltInFlowrPluginName = typeof BuiltInPlugins[number][0];
13
15
  export type BuiltInFlowrPluginArgs<N extends BuiltInFlowrPluginName> = N extends typeof BuiltInPlugins[number][0] ? ConstructorParameters<Extract<typeof BuiltInPlugins[number], [N, PluginProducer]>[1]> : never;
14
16
  type PluginProducer = new (...args: never[]) => FlowrAnalyzerPlugin;
@@ -11,6 +11,8 @@ const flowr_analyzer_rmd_file_plugin_1 = require("./file-plugins/notebooks/flowr
11
11
  const flowr_analyzer_qmd_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-qmd-file-plugin");
12
12
  const assert_1 = require("../../util/assert");
13
13
  const flowr_analyzer_jupyter_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin");
14
+ const flowr_analyzer_namespace_file_plugin_1 = require("./file-plugins/flowr-analyzer-namespace-file-plugin");
15
+ const flowr_analyzer_news_file_plugin_1 = require("./file-plugins/flowr-analyzer-news-file-plugin");
14
16
  /**
15
17
  * The built-in Flowr Analyzer plugins that are always available.
16
18
  */
@@ -21,6 +23,8 @@ exports.BuiltInPlugins = [
21
23
  ['file:rmd', flowr_analyzer_rmd_file_plugin_1.FlowrAnalyzerRmdFilePlugin],
22
24
  ['file:qmd', flowr_analyzer_qmd_file_plugin_1.FlowrAnalyzerQmdFilePlugin],
23
25
  ['file:ipynb', flowr_analyzer_jupyter_file_plugin_1.FlowrAnalyzerJupyterFilePlugin],
26
+ ['file:namespace', flowr_analyzer_namespace_file_plugin_1.FlowrAnalyzerNamespaceFilePlugin],
27
+ ['file:news', flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin]
24
28
  ];
25
29
  /**
26
30
  * The registry of built-in and user-registered Flowr Analyzer plugins.
@@ -20,6 +20,7 @@ class FlowrAnalyzerProjectDiscoveryPlugin extends flowr_analyzer_plugin_1.FlowrA
20
20
  }
21
21
  exports.FlowrAnalyzerProjectDiscoveryPlugin = FlowrAnalyzerProjectDiscoveryPlugin;
22
22
  const discoverRSourcesRegex = /\.(r|rmd|ipynb|qmd)$/i;
23
+ const ignorePathsWith = /(\.git|\.svn|\.hg|renv|packrat|node_modules|__pycache__|\.Rproj\.user)/i;
23
24
  /**
24
25
  * This is the default dummy implementation of the {@link FlowrAnalyzerProjectDiscoveryPlugin}.
25
26
  * It simply collects all files in the given folder and returns them as either {@link RParseRequest} (for R and Rmd files) or {@link FlowrTextFile} (for all other files).
@@ -29,14 +30,19 @@ class DefaultFlowrAnalyzerProjectDiscoveryPlugin extends FlowrAnalyzerProjectDis
29
30
  description = 'This is the default project discovery plugin that does nothing.';
30
31
  version = new semver_1.SemVer('0.0.0');
31
32
  supportedExtensions;
32
- constructor(triggerOnExtensions = discoverRSourcesRegex) {
33
+ ignorePathsRegex;
34
+ constructor(triggerOnExtensions = discoverRSourcesRegex, ignorePathsRegex = ignorePathsWith) {
33
35
  super();
34
36
  this.supportedExtensions = triggerOnExtensions;
37
+ this.ignorePathsRegex = ignorePathsRegex;
35
38
  }
36
39
  process(_context, args) {
37
40
  const requests = [];
38
41
  /* the dummy approach of collecting all files, group R and Rmd files, and be done with it */
39
42
  for (const file of (0, files_1.getAllFilesSync)(args.content)) {
43
+ if (this.ignorePathsRegex.test(file)) {
44
+ continue;
45
+ }
40
46
  if (this.supportedExtensions.test(file)) {
41
47
  requests.push({ content: file, request: 'file' });
42
48
  }
@@ -119,7 +119,8 @@ function getResults(queries, { dataflow, config, normalize }, results, kind, fun
119
119
  linkedIds: linked?.length ? linked : undefined,
120
120
  value: value ?? defaultValue,
121
121
  versionConstraints: dep?.versionConstraints,
122
- derivedVersion: dep?.derivedVersion
122
+ derivedVersion: dep?.derivedVersion,
123
+ namespaceInfo: dep?.namespaceInfo
123
124
  });
124
125
  if (result) {
125
126
  results.push(result);
@@ -6,6 +6,7 @@ import type { FunctionInfo } from './function-info/function-info';
6
6
  import type { CallContextQueryResult } from '../call-context-query/call-context-query-format';
7
7
  import type { Range } from 'semver';
8
8
  import type { AsyncOrSync } from 'ts-essentials';
9
+ import type { NamespaceInfo } from '../../../project/plugins/file-plugins/files/flowr-namespace-file';
9
10
  export declare const Unknown = "unknown";
10
11
  export interface DependencyCategorySettings {
11
12
  queryDisplayName?: string;
@@ -63,6 +64,7 @@ export interface DependencyInfo extends Record<string, unknown> {
63
64
  value?: string;
64
65
  versionConstraints?: Range[];
65
66
  derivedVersion?: Range;
67
+ namespaceInfo?: NamespaceInfo;
66
68
  }
67
69
  /**
68
70
  * Gets all dependency categories, including user-defined additional categories.
@@ -34,7 +34,8 @@ exports.DefaultDependencyCategories = {
34
34
  functionName: (n.info.fullLexeme ?? n.lexeme).includes(':::') ? ':::' : '::',
35
35
  value: n.namespace,
36
36
  versionConstraints: dep?.versionConstraints,
37
- derivedVersion: dep?.derivedVersion
37
+ derivedVersion: dep?.derivedVersion,
38
+ namespaceInfo: dep?.namespaceInfo
38
39
  });
39
40
  }
40
41
  });
@@ -16,7 +16,9 @@ async function executeDfShapeQuery({ analyzer }, queries) {
16
16
  const dfg = (await analyzer.dataflow()).graph;
17
17
  const cfg = await analyzer.controlflow();
18
18
  const start = Date.now();
19
- const domains = (0, shape_inference_1.inferDataFrameShapes)(cfg, dfg, ast, analyzer.inspectContext());
19
+ const inference = new shape_inference_1.DataFrameShapeInferenceVisitor({ controlFlow: cfg, dfg, normalizedAst: ast, ctx: analyzer.inspectContext() });
20
+ inference.start();
21
+ const domains = inference.getEndState();
20
22
  if (queries.length === 1 && queries[0].criterion === undefined) {
21
23
  return {
22
24
  '.meta': {
@@ -37,7 +39,7 @@ async function executeDfShapeQuery({ analyzer }, queries) {
37
39
  }
38
40
  const nodeId = (0, parse_1.slicingCriterionToId)(query.criterion, ast.idMap);
39
41
  const node = ast.idMap.get(nodeId);
40
- const value = (0, shape_inference_1.resolveIdToDataFrameShape)(node?.info.id, dfg);
42
+ const value = inference.getAbstractValue(node?.info.id);
41
43
  result.set(query.criterion, value);
42
44
  }
43
45
  return {
@@ -0,0 +1,6 @@
1
+ import type { FilesQuery, FilesQueryResult } from './files-query-format';
2
+ import type { BasicQueryData } from '../../base-query-format';
3
+ /**
4
+ * Executes the given files queries using the provided analyzer.
5
+ */
6
+ export declare function executeFileQuery({ analyzer }: BasicQueryData, queries: readonly FilesQuery[]): Promise<FilesQueryResult>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeFileQuery = executeFileQuery;
4
+ /**
5
+ * Executes the given files queries using the provided analyzer.
6
+ */
7
+ function executeFileQuery({ analyzer }, queries) {
8
+ const start = Date.now();
9
+ analyzer.inspectContext().resolvePreAnalysis();
10
+ const base = analyzer.inspectContext().files.getAllFiles();
11
+ let files = [];
12
+ const foundFingerprints = new Set();
13
+ for (const query of queries) {
14
+ if (query.matchesPathRegex === undefined && query.roles === undefined) {
15
+ files = base.map(l => ({
16
+ role: l.role,
17
+ content: l.content(),
18
+ path: l.path()
19
+ }));
20
+ break;
21
+ }
22
+ const pathRegex = query.matchesPathRegex ? new RegExp(query.matchesPathRegex) : undefined;
23
+ for (const file of base) {
24
+ const fingerprint = `${file.role}:::${file.path()}`;
25
+ if (foundFingerprints.has(fingerprint)) {
26
+ continue;
27
+ }
28
+ if (pathRegex && !pathRegex.test(file.path())) {
29
+ continue;
30
+ }
31
+ if (query.roles && !query.roles.includes(file.role ?? '')) {
32
+ continue;
33
+ }
34
+ foundFingerprints.add(fingerprint);
35
+ files.push({
36
+ role: file.role,
37
+ content: file.content(),
38
+ path: file.path()
39
+ });
40
+ }
41
+ }
42
+ return Promise.resolve({
43
+ '.meta': {
44
+ timing: Date.now() - start
45
+ },
46
+ files
47
+ });
48
+ }
49
+ //# sourceMappingURL=files-query-executor.js.map
@@ -0,0 +1,36 @@
1
+ import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
+ import Joi from 'joi';
3
+ import type { ParsedQueryLine } from '../../query';
4
+ import { executeFileQuery } from './files-query-executor';
5
+ import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
+ import { FileRole } from '../../../project/context/flowr-file';
7
+ import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
+ import type { FlowrConfigOptions } from '../../../config';
9
+ import type { CommandCompletions } from '../../../cli/repl/core';
10
+ /**
11
+ * Returns the content(s) of all files matching the given pattern.
12
+ */
13
+ export interface FilesQuery extends BaseQueryFormat {
14
+ readonly type: 'files';
15
+ readonly roles?: FileRole[];
16
+ readonly matchesPathRegex?: string;
17
+ }
18
+ export interface FileQueryInfo<T = object> {
19
+ role?: FileRole;
20
+ path: string;
21
+ content: T;
22
+ }
23
+ export interface FilesQueryResult extends BaseQueryResult {
24
+ files: FileQueryInfo[];
25
+ }
26
+ declare function filesQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'files'>;
27
+ declare function filesQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions): CommandCompletions;
28
+ export declare const FilesQueryDefinition: {
29
+ readonly executor: typeof executeFileQuery;
30
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
31
+ readonly completer: typeof filesQueryCompleter;
32
+ readonly fromLine: typeof filesQueryLineParser;
33
+ readonly schema: Joi.ObjectSchema<any>;
34
+ readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
35
+ };
36
+ export {};
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FilesQueryDefinition = void 0;
7
+ const ansi_1 = require("../../../util/text/ansi");
8
+ const joi_1 = __importDefault(require("joi"));
9
+ const files_query_executor_1 = require("./files-query-executor");
10
+ const flowr_file_1 = require("../../../project/context/flowr-file");
11
+ const json_1 = require("../../../util/json");
12
+ const retriever_1 = require("../../../r-bridge/retriever");
13
+ function summarizeObjectWithLimit(obj, limitChars = 500, limitLines = 10) {
14
+ const str = JSON.stringify(obj, json_1.jsonReplacer, 2);
15
+ if (str.split('\n').length > limitLines) {
16
+ const lines = str.split('\n').slice(0, limitLines);
17
+ return lines.join('\n') + '\n... (truncated)';
18
+ }
19
+ else if (str.length > limitChars) {
20
+ return str.slice(0, limitChars) + '... (truncated)';
21
+ }
22
+ else {
23
+ return str;
24
+ }
25
+ }
26
+ function rolesFromInput(rolesPart) {
27
+ return rolesPart
28
+ .reduce((acc, roleName) => {
29
+ roleName = roleName.trim();
30
+ // check if it is one of the values
31
+ if (Object.values(flowr_file_1.FileRole).includes(roleName)) {
32
+ acc.valid.push(roleName);
33
+ }
34
+ else {
35
+ acc.invalid.push(roleName);
36
+ }
37
+ return acc;
38
+ }, { valid: [], invalid: [] });
39
+ }
40
+ const rolePrefix = 'role:';
41
+ function filesQueryLineParser(output, line, _config) {
42
+ let roles = undefined;
43
+ let input = undefined;
44
+ if (line.length > 0 && line[0].startsWith(rolePrefix)) {
45
+ const rolesPart = line[0].slice(rolePrefix.length).split(',');
46
+ const parseResult = rolesFromInput(rolesPart);
47
+ if (parseResult.invalid.length > 0) {
48
+ output.stderr(`Invalid roles: ${parseResult.invalid.map(r => (0, ansi_1.bold)(r, output.formatter)).join(', ')}`
49
+ + `\nValid roles are: ${Object.values(flowr_file_1.FileRole).map(r => (0, ansi_1.bold)(r, output.formatter)).join(', ')}`);
50
+ }
51
+ roles = parseResult.valid;
52
+ input = line[1];
53
+ }
54
+ else if (line.length > 0) {
55
+ input = line[0];
56
+ }
57
+ return { query: [{ type: 'files', roles }], rCode: input };
58
+ }
59
+ function filesQueryCompleter(line, startingNewArg, _config) {
60
+ const rolesPrefixNotPresent = line.length == 0 || (line.length == 1 && line[0].length < rolePrefix.length);
61
+ const rolesNotFinished = line.length == 1 && line[0].startsWith(rolePrefix) && !startingNewArg;
62
+ const endOfRoles = line.length == 1 && startingNewArg || line.length == 2;
63
+ if (rolesPrefixNotPresent) {
64
+ return { completions: [`${rolePrefix}`] };
65
+ }
66
+ else if (endOfRoles) {
67
+ return { completions: [retriever_1.fileProtocol] };
68
+ }
69
+ else if (rolesNotFinished) {
70
+ const rolesWithoutPrefix = line[0].slice(rolePrefix.length);
71
+ const usedRoles = rolesWithoutPrefix.split(',').map(r => r.trim());
72
+ const allRoles = Object.values(flowr_file_1.FileRole);
73
+ const unusedRoles = allRoles.filter(r => !usedRoles.includes(r));
74
+ const lastRole = usedRoles[usedRoles.length - 1];
75
+ const lastRoleIsUnfinished = !allRoles.includes(lastRole);
76
+ if (lastRoleIsUnfinished) {
77
+ return { completions: unusedRoles, argumentPart: lastRole };
78
+ }
79
+ else if (unusedRoles.length > 0) {
80
+ return { completions: [','], argumentPart: '' };
81
+ }
82
+ else {
83
+ return { completions: [' '], argumentPart: '' };
84
+ }
85
+ }
86
+ return { completions: [] };
87
+ }
88
+ exports.FilesQueryDefinition = {
89
+ executor: files_query_executor_1.executeFileQuery,
90
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
91
+ const out = queryResults;
92
+ result.push(`Query: ${(0, ansi_1.bold)('files', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
93
+ result.push(` ╰ Found ${out.files.length} file${out.files.length === 1 ? '' : 's'}`);
94
+ for (const f of out.files) {
95
+ result.push(` ╰ ${(0, ansi_1.bold)(f.path, formatter)}${f.role ? ` [role: ${f.role}]` : ''}:`);
96
+ const summary = summarizeObjectWithLimit(f.content);
97
+ for (const line of summary.split('\n')) {
98
+ result.push(` ${line}`);
99
+ }
100
+ }
101
+ return true;
102
+ },
103
+ completer: filesQueryCompleter,
104
+ fromLine: filesQueryLineParser,
105
+ schema: joi_1.default.object({
106
+ type: joi_1.default.string().valid('files').required().description('The type of the query.'),
107
+ roles: joi_1.default.array().optional().items(joi_1.default.string().valid(...Object.values(flowr_file_1.FileRole))).description('Optional roles of the files to query. If not provided, all roles are considered.'),
108
+ matchesPathRegex: joi_1.default.string().optional().description('An optional regular expression to match the file paths against.')
109
+ }).description('The file query finds files in the project based on their roles and path patterns.'),
110
+ flattenInvolvedNodes: (_) => {
111
+ return [];
112
+ }
113
+ };
114
+ //# sourceMappingURL=files-query-format.js.map
@@ -34,7 +34,7 @@ function linterQueryLineParser(output, line, _config) {
34
34
  const rulesPart = line[0].slice(rulesPrefix.length).split(',');
35
35
  const parseResult = rulesFromInput(output, rulesPart);
36
36
  if (parseResult.invalid.length > 0) {
37
- output.stdout(`Invalid linting rule name(s): ${parseResult.invalid.map(r => (0, ansi_1.bold)(r, output.formatter)).join(', ')}`
37
+ output.stderr(`Invalid linting rule name(s): ${parseResult.invalid.map(r => (0, ansi_1.bold)(r, output.formatter)).join(', ')}`
38
38
  + `\nValid rule names are: ${Object.keys(linter_rules_1.LintingRules).map(r => (0, ansi_1.bold)(r, output.formatter)).join(', ')}`);
39
39
  }
40
40
  rules = parseResult.valid;
@@ -28,10 +28,11 @@ import { type InspectHigherOrderQuery } from './catalog/inspect-higher-order-que
28
28
  import type { ReadonlyFlowrAnalysisProvider } from '../project/flowr-analyzer';
29
29
  import type { ReplOutput } from '../cli/repl/commands/repl-main';
30
30
  import type { CommandCompletions } from '../cli/repl/core';
31
+ import type { FilesQuery } from './catalog/files-query/files-query-format';
31
32
  /**
32
33
  * These are all queries that can be executed from within flowR
33
34
  */
34
- export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | ControlFlowQuery | DataflowLensQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectHigherOrderQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery;
35
+ export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectHigherOrderQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery;
35
36
  export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
36
37
  type: QueryType;
37
38
  };
@@ -105,6 +106,14 @@ export declare const SupportedQueries: {
105
106
  readonly schema: Joi.ObjectSchema<any>;
106
107
  readonly flattenInvolvedNodes: () => never[];
107
108
  };
109
+ readonly files: {
110
+ readonly executor: typeof import("./catalog/files-query/files-query-executor").executeFileQuery;
111
+ readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
112
+ readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions) => CommandCompletions;
113
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"files">;
114
+ readonly schema: Joi.ObjectSchema<any>;
115
+ readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
116
+ };
108
117
  readonly 'id-map': {
109
118
  readonly executor: typeof import("./catalog/id-map-query/id-map-query-executor").executeIdMapQuery;
110
119
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
package/queries/query.js CHANGED
@@ -35,6 +35,7 @@ const control_flow_query_format_1 = require("./catalog/control-flow-query/contro
35
35
  const df_shape_query_format_1 = require("./catalog/df-shape-query/df-shape-query-format");
36
36
  const inspect_higher_order_query_format_1 = require("./catalog/inspect-higher-order-query/inspect-higher-order-query-format");
37
37
  const log_1 = require("../util/log");
38
+ const files_query_format_1 = require("./catalog/files-query/files-query-format");
38
39
  exports.SupportedQueries = {
39
40
  'call-context': call_context_query_format_1.CallContextQueryDefinition,
40
41
  'config': config_query_format_1.ConfigQueryDefinition,
@@ -42,6 +43,7 @@ exports.SupportedQueries = {
42
43
  'dataflow': dataflow_query_format_1.DataflowQueryDefinition,
43
44
  'dataflow-lens': dataflow_lens_query_format_1.DataflowLensQueryDefinition,
44
45
  'df-shape': df_shape_query_format_1.DfShapeQueryDefinition,
46
+ 'files': files_query_format_1.FilesQueryDefinition,
45
47
  'id-map': id_map_query_format_1.IdMapQueryDefinition,
46
48
  'normalized-ast': normalized_ast_query_format_1.NormalizedAstQueryDefinition,
47
49
  'dataflow-cluster': cluster_query_format_1.ClusterQueryDefinition,
@@ -103,7 +105,7 @@ async function executeQueries(data, queries) {
103
105
  const results = [];
104
106
  for (const [type, group] of entries) {
105
107
  try {
106
- const result = await Promise.resolve(executeQueriesOfSameType(data, group));
108
+ const result = await executeQueriesOfSameType(data, group);
107
109
  results.push([type, result]);
108
110
  }
109
111
  catch (e) {