@eagleoutice/flowr 2.5.0 → 2.6.0

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 (223) hide show
  1. package/README.md +57 -42
  2. package/cli/flowr.js +3 -29
  3. package/cli/repl/commands/repl-cfg.d.ts +5 -5
  4. package/cli/repl/commands/repl-cfg.js +21 -22
  5. package/cli/repl/commands/repl-commands.d.ts +3 -3
  6. package/cli/repl/commands/repl-commands.js +2 -0
  7. package/cli/repl/commands/repl-dataflow.d.ts +5 -5
  8. package/cli/repl/commands/repl-dataflow.js +27 -30
  9. package/cli/repl/commands/repl-execute.js +1 -0
  10. package/cli/repl/commands/repl-lineage.js +1 -0
  11. package/cli/repl/commands/repl-main.d.ts +34 -3
  12. package/cli/repl/commands/repl-normalize.d.ts +3 -3
  13. package/cli/repl/commands/repl-normalize.js +15 -19
  14. package/cli/repl/commands/repl-parse.d.ts +2 -2
  15. package/cli/repl/commands/repl-parse.js +13 -8
  16. package/cli/repl/commands/repl-query.d.ts +3 -3
  17. package/cli/repl/commands/repl-query.js +29 -19
  18. package/cli/repl/commands/repl-quit.js +1 -0
  19. package/cli/repl/commands/repl-version.js +1 -0
  20. package/cli/repl/core.d.ts +4 -1
  21. package/cli/repl/core.js +21 -1
  22. package/cli/repl/server/connection.d.ts +7 -3
  23. package/cli/repl/server/connection.js +40 -48
  24. package/cli/repl/server/messages/message-slice.d.ts +1 -1
  25. package/cli/slicer-app.js +1 -1
  26. package/config.d.ts +1 -1
  27. package/config.js +4 -1
  28. package/control-flow/extract-cfg.d.ts +1 -1
  29. package/control-flow/extract-cfg.js +1 -1
  30. package/core/pipeline-executor.d.ts +5 -0
  31. package/core/pipeline-executor.js +5 -0
  32. package/core/steps/pipeline/create-pipeline.js +1 -1
  33. package/core/steps/pipeline/default-pipelines.d.ts +42 -42
  34. package/core/steps/pipeline/default-pipelines.js +4 -1
  35. package/dataflow/graph/dataflowgraph-builder.d.ts +11 -12
  36. package/dataflow/graph/dataflowgraph-builder.js +6 -6
  37. package/documentation/doc-util/doc-query.d.ts +3 -6
  38. package/documentation/doc-util/doc-query.js +5 -17
  39. package/documentation/doc-util/doc-search.js +7 -10
  40. package/documentation/doc-util/doc-structure.d.ts +4 -0
  41. package/documentation/doc-util/doc-structure.js +28 -0
  42. package/documentation/doc-util/doc-types.d.ts +5 -1
  43. package/documentation/doc-util/doc-types.js +29 -3
  44. package/documentation/print-analyzer-wiki.d.ts +1 -0
  45. package/documentation/print-analyzer-wiki.js +137 -0
  46. package/documentation/print-core-wiki.d.ts +2 -1
  47. package/documentation/print-core-wiki.js +58 -4
  48. package/documentation/print-dataflow-graph-wiki.js +15 -22
  49. package/documentation/print-interface-wiki.js +18 -1
  50. package/documentation/print-linter-wiki.js +5 -1
  51. package/documentation/print-normalized-ast-wiki.js +6 -8
  52. package/engines.d.ts +9 -0
  53. package/engines.js +38 -0
  54. package/linter/linter-executor.d.ts +2 -8
  55. package/linter/linter-executor.js +9 -4
  56. package/linter/linter-format.d.ts +8 -9
  57. package/linter/linter-rules.d.ts +57 -15
  58. package/linter/linter-rules.js +2 -0
  59. package/linter/rules/absolute-path.d.ts +1 -0
  60. package/linter/rules/dataframe-access-validation.d.ts +4 -3
  61. package/linter/rules/dataframe-access-validation.js +7 -4
  62. package/linter/rules/dead-code.d.ts +2 -1
  63. package/linter/rules/deprecated-functions.d.ts +15 -28
  64. package/linter/rules/deprecated-functions.js +5 -43
  65. package/linter/rules/file-path-validity.d.ts +2 -1
  66. package/linter/rules/file-path-validity.js +1 -1
  67. package/linter/rules/function-finder-util.d.ts +51 -0
  68. package/linter/rules/function-finder-util.js +77 -0
  69. package/linter/rules/naming-convention.d.ts +2 -1
  70. package/linter/rules/network-functions.d.ts +40 -0
  71. package/linter/rules/network-functions.js +24 -0
  72. package/linter/rules/seeded-randomness.d.ts +2 -1
  73. package/linter/rules/unused-definition.d.ts +2 -1
  74. package/linter/rules/useless-loop.d.ts +3 -2
  75. package/linter/rules/useless-loop.js +4 -6
  76. package/package.json +2 -1
  77. package/project/cache/flowr-analyzer-cache.d.ts +93 -0
  78. package/project/cache/flowr-analyzer-cache.js +156 -0
  79. package/project/cache/flowr-cache.d.ts +28 -0
  80. package/project/cache/flowr-cache.js +49 -0
  81. package/project/context/abstract-flowr-analyzer-context.d.ts +35 -0
  82. package/project/context/abstract-flowr-analyzer-context.js +46 -0
  83. package/project/context/flowr-analyzer-context.d.ts +48 -0
  84. package/project/context/flowr-analyzer-context.js +47 -0
  85. package/project/context/flowr-analyzer-dependencies-context.d.ts +38 -0
  86. package/project/context/flowr-analyzer-dependencies-context.js +39 -0
  87. package/project/context/flowr-analyzer-files-context.d.ts +86 -0
  88. package/project/context/flowr-analyzer-files-context.js +130 -0
  89. package/project/context/flowr-analyzer-loading-order-context.d.ts +76 -0
  90. package/project/context/flowr-analyzer-loading-order-context.js +90 -0
  91. package/project/context/flowr-file.d.ts +89 -0
  92. package/project/context/flowr-file.js +78 -0
  93. package/project/flowr-analyzer-builder.d.ts +106 -0
  94. package/project/flowr-analyzer-builder.js +197 -0
  95. package/project/flowr-analyzer.d.ts +125 -0
  96. package/project/flowr-analyzer.js +81 -0
  97. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +17 -0
  98. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +28 -0
  99. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +21 -0
  100. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +34 -0
  101. package/project/plugins/file-plugins/flowr-description-file.d.ts +24 -0
  102. package/project/plugins/file-plugins/flowr-description-file.js +38 -0
  103. package/project/plugins/flowr-analyzer-plugin.d.ts +90 -0
  104. package/project/plugins/flowr-analyzer-plugin.js +82 -0
  105. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +14 -0
  106. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +56 -0
  107. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.d.ts +13 -0
  108. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +33 -0
  109. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +14 -0
  110. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +41 -0
  111. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +10 -0
  112. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +29 -0
  113. package/project/plugins/package-version-plugins/package.d.ts +15 -0
  114. package/project/plugins/package-version-plugins/package.js +56 -0
  115. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +15 -0
  116. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +44 -0
  117. package/queries/base-query-format.d.ts +2 -8
  118. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
  119. package/queries/catalog/call-context-query/call-context-query-executor.js +20 -13
  120. package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -3
  121. package/queries/catalog/call-context-query/call-context-query-format.js +2 -2
  122. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +1 -1
  123. package/queries/catalog/cluster-query/cluster-query-executor.js +2 -2
  124. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -54
  125. package/queries/catalog/cluster-query/cluster-query-format.js +2 -2
  126. package/queries/catalog/config-query/config-query-executor.d.ts +1 -1
  127. package/queries/catalog/config-query/config-query-executor.js +5 -5
  128. package/queries/catalog/config-query/config-query-format.d.ts +1 -1
  129. package/queries/catalog/config-query/config-query-format.js +1 -1
  130. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
  131. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -3
  132. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -54
  133. package/queries/catalog/control-flow-query/control-flow-query-format.js +2 -2
  134. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +1 -1
  135. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +2 -2
  136. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -54
  137. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -1
  138. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +1 -1
  139. package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
  140. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -54
  141. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -1
  142. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
  143. package/queries/catalog/dependencies-query/dependencies-query-executor.js +19 -12
  144. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +7 -56
  145. package/queries/catalog/dependencies-query/dependencies-query-format.js +7 -4
  146. package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +1 -1
  147. package/queries/catalog/df-shape-query/df-shape-query-executor.js +4 -4
  148. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +1 -54
  149. package/queries/catalog/df-shape-query/df-shape-query-format.js +1 -1
  150. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +1 -1
  151. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  152. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -54
  153. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -1
  154. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +1 -1
  155. package/queries/catalog/id-map-query/id-map-query-executor.js +2 -2
  156. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -54
  157. package/queries/catalog/id-map-query/id-map-query-format.js +2 -2
  158. package/queries/catalog/lineage-query/lineage-query-executor.d.ts +1 -1
  159. package/queries/catalog/lineage-query/lineage-query-executor.js +2 -2
  160. package/queries/catalog/lineage-query/lineage-query-format.d.ts +1 -54
  161. package/queries/catalog/lineage-query/lineage-query-format.js +1 -1
  162. package/queries/catalog/linter-query/linter-query-executor.d.ts +1 -1
  163. package/queries/catalog/linter-query/linter-query-executor.js +2 -3
  164. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -54
  165. package/queries/catalog/linter-query/linter-query-format.js +1 -1
  166. package/queries/catalog/location-map-query/location-map-query-executor.d.ts +1 -1
  167. package/queries/catalog/location-map-query/location-map-query-executor.js +3 -2
  168. package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
  169. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  170. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
  171. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +2 -2
  172. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -54
  173. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -1
  174. package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
  175. package/queries/catalog/origin-query/origin-query-executor.js +3 -3
  176. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -54
  177. package/queries/catalog/origin-query/origin-query-format.js +1 -1
  178. package/queries/catalog/project-query/project-query-executor.d.ts +1 -1
  179. package/queries/catalog/project-query/project-query-executor.js +2 -2
  180. package/queries/catalog/project-query/project-query-format.d.ts +1 -54
  181. package/queries/catalog/project-query/project-query-format.js +1 -1
  182. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +1 -1
  183. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +4 -2
  184. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -54
  185. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -1
  186. package/queries/catalog/search-query/search-query-executor.d.ts +1 -1
  187. package/queries/catalog/search-query/search-query-executor.js +3 -3
  188. package/queries/catalog/search-query/search-query-format.d.ts +1 -54
  189. package/queries/catalog/search-query/search-query-format.js +1 -1
  190. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
  191. package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -3
  192. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -54
  193. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -1
  194. package/queries/query-print.d.ts +4 -4
  195. package/queries/query-print.js +12 -12
  196. package/queries/query.d.ts +29 -885
  197. package/queries/query.js +1 -1
  198. package/r-bridge/retriever.d.ts +6 -5
  199. package/r-bridge/retriever.js +9 -5
  200. package/search/flowr-search-executor.d.ts +3 -5
  201. package/search/flowr-search-executor.js +6 -4
  202. package/search/flowr-search-filters.d.ts +12 -6
  203. package/search/flowr-search-filters.js +1 -1
  204. package/search/flowr-search.d.ts +5 -16
  205. package/search/flowr-search.js +14 -5
  206. package/search/search-executor/search-enrichers.d.ts +37 -36
  207. package/search/search-executor/search-enrichers.js +4 -4
  208. package/search/search-executor/search-generators.d.ts +12 -12
  209. package/search/search-executor/search-generators.js +27 -19
  210. package/search/search-executor/search-mappers.d.ts +5 -5
  211. package/search/search-executor/search-transformer.d.ts +17 -17
  212. package/search/search-executor/search-transformer.js +14 -7
  213. package/util/collections/arrays.d.ts +1 -0
  214. package/util/collections/arrays.js +15 -0
  215. package/util/collections/objectmap.d.ts +17 -0
  216. package/util/collections/objectmap.js +28 -0
  217. package/util/containers.d.ts +0 -1
  218. package/util/containers.js +0 -1
  219. package/util/files.d.ts +17 -0
  220. package/util/files.js +65 -0
  221. package/util/formats/adapter.d.ts +4 -2
  222. package/util/formats/adapter.js +11 -4
  223. package/util/version.js +1 -1
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerContext = void 0;
4
+ const flowr_analyzer_files_context_1 = require("./flowr-analyzer-files-context");
5
+ const flowr_analyzer_dependencies_context_1 = require("./flowr-analyzer-dependencies-context");
6
+ const flowr_analyzer_plugin_1 = require("../plugins/flowr-analyzer-plugin");
7
+ const flowr_analyzer_loading_order_context_1 = require("./flowr-analyzer-loading-order-context");
8
+ /**
9
+ * This summarizes the other context layers used by the {@link FlowrAnalyzer}.
10
+ * Have a look at the attributes and layers listed below (e.g., {@link files} and {@link deps})
11
+ * to get an idea of the capabilities provided by this context.
12
+ * Besides these, this layer only orchestrates the different steps and layers, providing a collection of convenience methods alongside the
13
+ * {@link resolvePreAnalysis} method that conducts all the steps that can be done before the main analysis run.
14
+ * In general, you do not have to worry about these details, as the {@link FlowrAnalyzerBuilder} and {@link FlowrAnalyzer} take care of them.
15
+ *
16
+ * To inspect, e.g., the loading order, you can do so via {@link files.loadingOrder.getLoadingOrder}. To get information on a specific library, use
17
+ * {@link deps.getDependency}.
18
+ * If you are just interested in inspecting the context, you can use {@link ReadOnlyFlowrAnalyzerContext} instead (e.g., via {@link inspect}).
19
+ */
20
+ class FlowrAnalyzerContext {
21
+ files;
22
+ deps;
23
+ constructor(plugins) {
24
+ const loadingOrder = new flowr_analyzer_loading_order_context_1.FlowrAnalyzerLoadingOrderContext(this, plugins.get(flowr_analyzer_plugin_1.PluginType.LoadingOrder));
25
+ this.files = new flowr_analyzer_files_context_1.FlowrAnalyzerFilesContext(loadingOrder, (plugins.get(flowr_analyzer_plugin_1.PluginType.ProjectDiscovery) ?? []), (plugins.get(flowr_analyzer_plugin_1.PluginType.FileLoad) ?? []));
26
+ this.deps = new flowr_analyzer_dependencies_context_1.FlowrAnalyzerDependenciesContext(this, (plugins.get(flowr_analyzer_plugin_1.PluginType.DependencyIdentification) ?? []));
27
+ }
28
+ /** delegate request addition */
29
+ addRequests(requests) {
30
+ this.files.addRequests(requests);
31
+ }
32
+ /** this conducts all the step that can be done before the main analysis run */
33
+ resolvePreAnalysis() {
34
+ this.files.computeLoadingOrder();
35
+ this.deps.resolveStaticDependencies();
36
+ }
37
+ /**
38
+ * Get a read-only version of this context.
39
+ * This is useful if you want to pass the context to a place where you do not want it to be modified or just to reduce
40
+ * the available methods.
41
+ */
42
+ inspect() {
43
+ return this;
44
+ }
45
+ }
46
+ exports.FlowrAnalyzerContext = FlowrAnalyzerContext;
47
+ //# sourceMappingURL=flowr-analyzer-context.js.map
@@ -0,0 +1,38 @@
1
+ import { AbstractFlowrAnalyzerContext } from './abstract-flowr-analyzer-context';
2
+ import { FlowrAnalyzerPackageVersionsPlugin } from '../plugins/package-version-plugins/flowr-analyzer-package-versions-plugin';
3
+ import type { Package } from '../plugins/package-version-plugins/package';
4
+ import type { FlowrAnalyzerContext } from './flowr-analyzer-context';
5
+ /**
6
+ * This is a read-only interface to the {@link FlowrAnalyzerDependenciesContext}.
7
+ * It prevents you from modifying the dependencies, but allows you to inspect them (which is probably what you want when using the {@link FlowrAnalyzer}).
8
+ * If you are a {@link FlowrAnalyzerPackageVersionsPlugin} and want to modify the dependencies, you can use the {@link FlowrAnalyzerDependenciesContext} directly.
9
+ */
10
+ export interface ReadOnlyFlowrAnalyzerDependenciesContext {
11
+ /**
12
+ * The name of this context.
13
+ */
14
+ readonly name: string;
15
+ /**
16
+ * Get the dependency with the given name, if it exists.
17
+ *
18
+ * If the static dependencies have not yet been loaded, this may trigger a resolution step.
19
+ *
20
+ * @param name - The name of the dependency to get.
21
+ * @returns The dependency with the given name, or undefined if it does not exist.
22
+ */
23
+ getDependency(name: string): Package | undefined;
24
+ }
25
+ /**
26
+ * This context is responsible for managing the dependencies of the project, including their versions and interplays with {@link FlowrAnalyzerPackageVersionsPlugin}s.
27
+ *
28
+ * If you are interested in inspecting these dependencies, refer to {@link ReadOnlyFlowrAnalyzerDependenciesContext}.
29
+ */
30
+ export declare class FlowrAnalyzerDependenciesContext extends AbstractFlowrAnalyzerContext<undefined, void, FlowrAnalyzerPackageVersionsPlugin> implements ReadOnlyFlowrAnalyzerDependenciesContext {
31
+ readonly name = "flowr-analyzer-dependencies-context";
32
+ private dependencies;
33
+ private staticsLoaded;
34
+ constructor(ctx: FlowrAnalyzerContext, plugins?: readonly FlowrAnalyzerPackageVersionsPlugin[]);
35
+ resolveStaticDependencies(): void;
36
+ addDependency(pkg: Package): void;
37
+ getDependency(name: string): Package | undefined;
38
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerDependenciesContext = void 0;
4
+ const abstract_flowr_analyzer_context_1 = require("./abstract-flowr-analyzer-context");
5
+ const flowr_analyzer_package_versions_plugin_1 = require("../plugins/package-version-plugins/flowr-analyzer-package-versions-plugin");
6
+ /**
7
+ * This context is responsible for managing the dependencies of the project, including their versions and interplays with {@link FlowrAnalyzerPackageVersionsPlugin}s.
8
+ *
9
+ * If you are interested in inspecting these dependencies, refer to {@link ReadOnlyFlowrAnalyzerDependenciesContext}.
10
+ */
11
+ class FlowrAnalyzerDependenciesContext extends abstract_flowr_analyzer_context_1.AbstractFlowrAnalyzerContext {
12
+ name = 'flowr-analyzer-dependencies-context';
13
+ dependencies = new Map();
14
+ staticsLoaded = false;
15
+ constructor(ctx, plugins) {
16
+ super(ctx, flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin.defaultPlugin(), plugins);
17
+ }
18
+ resolveStaticDependencies() {
19
+ this.applyPlugins(undefined);
20
+ this.staticsLoaded = true;
21
+ }
22
+ addDependency(pkg) {
23
+ const p = this.dependencies.get(pkg.name);
24
+ if (p) {
25
+ p.mergeInPlace(pkg);
26
+ }
27
+ else {
28
+ this.dependencies.set(pkg.name, pkg);
29
+ }
30
+ }
31
+ getDependency(name) {
32
+ if (!this.staticsLoaded) {
33
+ this.resolveStaticDependencies();
34
+ }
35
+ return this.dependencies.get(name);
36
+ }
37
+ }
38
+ exports.FlowrAnalyzerDependenciesContext = FlowrAnalyzerDependenciesContext;
39
+ //# sourceMappingURL=flowr-analyzer-dependencies-context.js.map
@@ -0,0 +1,86 @@
1
+ import { AbstractFlowrAnalyzerContext } from './abstract-flowr-analyzer-context';
2
+ import type { RParseRequest, RParseRequestFromFile } from '../../r-bridge/retriever';
3
+ import type { FlowrAnalyzerLoadingOrderContext, ReadOnlyFlowrAnalyzerLoadingOrderContext } from './flowr-analyzer-loading-order-context';
4
+ import { FlowrAnalyzerProjectDiscoveryPlugin } from '../plugins/project-discovery/flowr-analyzer-project-discovery-plugin';
5
+ import { FlowrAnalyzerFilePlugin } from '../plugins/file-plugins/flowr-analyzer-file-plugin';
6
+ import type { FlowrFile, FlowrFileProvider } from './flowr-file';
7
+ import { SpecialFileRole } from './flowr-file';
8
+ import type { FlowrDescriptionFile } from '../plugins/file-plugins/flowr-description-file';
9
+ /**
10
+ * This is a request to process a folder as a project, which will be expanded by the registered {@link FlowrAnalyzerProjectDiscoveryPlugin}s.
11
+ */
12
+ export interface RProjectAnalysisRequest {
13
+ readonly request: 'project';
14
+ /**
15
+ * The path to the root folder (an absolute path is probably best here).
16
+ */
17
+ readonly content: string;
18
+ }
19
+ export type RAnalysisRequest = RParseRequest | RProjectAnalysisRequest;
20
+ export type SpecialFiles = {
21
+ [SpecialFileRole.Description]: FlowrDescriptionFile[];
22
+ [SpecialFileRole.Namespace]: FlowrFileProvider[];
23
+ [SpecialFileRole.Data]: FlowrFileProvider[];
24
+ [SpecialFileRole.Other]: FlowrFileProvider[];
25
+ };
26
+ /**
27
+ * This is the read-only interface for the files context, which is used to manage all files known to the {@link FlowrAnalyzer}.
28
+ * It prevents you from modifying the available files, but allows you to inspect them (which is probably what you want when using the {@link FlowrAnalyzer}).
29
+ * If you are a {@link FlowrAnalyzerProjectDiscoveryPlugin} and want to modify the available files, you can use the {@link FlowrAnalyzerFilesContext} directly.
30
+ */
31
+ export interface ReadOnlyFlowrAnalyzerFilesContext {
32
+ /**
33
+ * The name of this context.
34
+ */
35
+ readonly name: string;
36
+ /**
37
+ * The loading order context provides access to the loading order of script files in the project.
38
+ */
39
+ readonly loadingOrder: ReadOnlyFlowrAnalyzerLoadingOrderContext;
40
+ /**
41
+ * Get all requests that have been added to this context.
42
+ *
43
+ * @example If you want to obtain all description files, use
44
+ * ```ts
45
+ * getFilesByRole(SpecialFileRole.Description)
46
+ * ```
47
+ */
48
+ getFilesByRole<Role extends SpecialFileRole>(role: Role): SpecialFiles[Role];
49
+ }
50
+ /**
51
+ * This is the analyzer file context to be modified by all plugins that affect the files.
52
+ * If you are interested in inspecting these files, refer to {@link ReadOnlyFlowrAnalyzerFilesContext}.
53
+ * Plugins, however, can use this context directly to modify files.
54
+ */
55
+ export declare class FlowrAnalyzerFilesContext extends AbstractFlowrAnalyzerContext<RProjectAnalysisRequest, (RParseRequest | FlowrFile<string>)[], FlowrAnalyzerProjectDiscoveryPlugin> implements ReadOnlyFlowrAnalyzerFilesContext {
56
+ readonly name = "flowr-analyzer-files-context";
57
+ readonly loadingOrder: FlowrAnalyzerLoadingOrderContext;
58
+ private files;
59
+ private readonly fileLoaders;
60
+ private specialFiles;
61
+ constructor(loadingOrder: FlowrAnalyzerLoadingOrderContext, plugins: readonly FlowrAnalyzerProjectDiscoveryPlugin[], fileLoaders: readonly FlowrAnalyzerFilePlugin[]);
62
+ /**
63
+ * Add multiple requests to the context. This is just a convenience method that calls {@link addRequest} for each request.
64
+ */
65
+ addRequests(requests: readonly RAnalysisRequest[]): void;
66
+ /**
67
+ * Add a request to the context. If the request is of type `project`, it will be expanded using the registered {@link FlowrAnalyzerProjectDiscoveryPlugin}s.
68
+ */
69
+ addRequest(request: RAnalysisRequest): void;
70
+ /**
71
+ * Add multiple files to the context. This is just a convenience method that calls {@link addFile} for each file.
72
+ */
73
+ addFiles(...files: (string | FlowrFileProvider<string> | RParseRequestFromFile)[]): void;
74
+ /**
75
+ * Add a file to the context. If the file has a special role, it will be added to the corresponding list of special files.
76
+ * This method also applies any registered {@link FlowrAnalyzerFilePlugin}s to the file before adding it to the context.
77
+ */
78
+ addFile(file: string | FlowrFileProvider<string> | RParseRequestFromFile, role?: SpecialFileRole): void;
79
+ private fileLoadPlugins;
80
+ /**
81
+ * Get all requests that have been added to this context.
82
+ * This is a convenience method that calls {@link FlowrAnalyzerLoadingOrderContext.getLoadingOrder}.
83
+ */
84
+ computeLoadingOrder(): readonly RParseRequest[];
85
+ getFilesByRole<Role extends SpecialFileRole>(role: Role): SpecialFiles[Role];
86
+ }
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerFilesContext = void 0;
4
+ const abstract_flowr_analyzer_context_1 = require("./abstract-flowr-analyzer-context");
5
+ const retriever_1 = require("../../r-bridge/retriever");
6
+ const assert_1 = require("../../util/assert");
7
+ const flowr_analyzer_project_discovery_plugin_1 = require("../plugins/project-discovery/flowr-analyzer-project-discovery-plugin");
8
+ const flowr_analyzer_file_plugin_1 = require("../plugins/file-plugins/flowr-analyzer-file-plugin");
9
+ const flowr_file_1 = require("./flowr-file");
10
+ const log_1 = require("../../util/log");
11
+ const fileLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-files-context' });
12
+ function obtainFileAndPath(file, role) {
13
+ let f;
14
+ let p;
15
+ if (typeof file === 'string') {
16
+ f = new flowr_file_1.FlowrTextFile(file, role);
17
+ p = file;
18
+ }
19
+ else if ('request' in file) {
20
+ f = file;
21
+ p = file.content;
22
+ }
23
+ else {
24
+ f = file;
25
+ p = file.path().toString();
26
+ }
27
+ return { f, p };
28
+ }
29
+ /**
30
+ * This is the analyzer file context to be modified by all plugins that affect the files.
31
+ * If you are interested in inspecting these files, refer to {@link ReadOnlyFlowrAnalyzerFilesContext}.
32
+ * Plugins, however, can use this context directly to modify files.
33
+ */
34
+ class FlowrAnalyzerFilesContext extends abstract_flowr_analyzer_context_1.AbstractFlowrAnalyzerContext {
35
+ name = 'flowr-analyzer-files-context';
36
+ loadingOrder;
37
+ /* all project files etc., this contains *all* files, loading orders etc. are to be handled by plugins */
38
+ files = new Map();
39
+ fileLoaders;
40
+ /* files that are part of the analysis, e.g. source files */
41
+ specialFiles = {
42
+ [flowr_file_1.SpecialFileRole.Description]: [],
43
+ [flowr_file_1.SpecialFileRole.Namespace]: [],
44
+ [flowr_file_1.SpecialFileRole.Data]: [],
45
+ [flowr_file_1.SpecialFileRole.Other]: []
46
+ };
47
+ constructor(loadingOrder, plugins, fileLoaders) {
48
+ super(loadingOrder.getAttachedContext(), flowr_analyzer_project_discovery_plugin_1.FlowrAnalyzerProjectDiscoveryPlugin.defaultPlugin(), plugins);
49
+ this.fileLoaders = [...fileLoaders, flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin.defaultPlugin()];
50
+ this.loadingOrder = loadingOrder;
51
+ }
52
+ /**
53
+ * Add multiple requests to the context. This is just a convenience method that calls {@link addRequest} for each request.
54
+ */
55
+ addRequests(requests) {
56
+ for (const request of requests) {
57
+ this.addRequest(request);
58
+ }
59
+ }
60
+ /**
61
+ * Add a request to the context. If the request is of type `project`, it will be expanded using the registered {@link FlowrAnalyzerProjectDiscoveryPlugin}s.
62
+ */
63
+ addRequest(request) {
64
+ if (request.request !== 'project') {
65
+ this.loadingOrder.addRequest(request);
66
+ if (request.request === 'file') {
67
+ this.files.set(request.content, request);
68
+ }
69
+ return;
70
+ }
71
+ const expandedRequests = this.applyPlugins(request).flat();
72
+ for (const req of expandedRequests) {
73
+ if ((0, retriever_1.isParseRequest)(req)) {
74
+ this.addRequest(req);
75
+ }
76
+ else {
77
+ this.addFile(req, req.role);
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Add multiple files to the context. This is just a convenience method that calls {@link addFile} for each file.
83
+ */
84
+ addFiles(...files) {
85
+ for (const file of files) {
86
+ this.addFile(file);
87
+ }
88
+ }
89
+ /**
90
+ * Add a file to the context. If the file has a special role, it will be added to the corresponding list of special files.
91
+ * This method also applies any registered {@link FlowrAnalyzerFilePlugin}s to the file before adding it to the context.
92
+ */
93
+ addFile(file, role) {
94
+ const { f, p } = obtainFileAndPath(file, role);
95
+ const { f: fA, p: pA } = this.fileLoadPlugins(f, p);
96
+ const exist = this.files.get(pA);
97
+ (0, assert_1.guard)(exist === undefined || exist === fA, `File ${pA} already added to the context.`);
98
+ this.files.set(pA, fA);
99
+ if (!(0, retriever_1.isParseRequest)(fA) && fA.role) {
100
+ this.specialFiles[fA.role].push(fA);
101
+ }
102
+ }
103
+ fileLoadPlugins(f, p) {
104
+ let fFinal = f;
105
+ let pFinal = p;
106
+ if (!(0, retriever_1.isParseRequest)(f)) { // we have to change the types when we integrate the adapters
107
+ for (const loader of this.fileLoaders) {
108
+ if (loader.applies(p)) {
109
+ fileLog.debug(`Applying file loader ${loader.name} to file ${p}`);
110
+ fFinal = loader.processor(this.ctx, f);
111
+ pFinal = f.path().toString();
112
+ break;
113
+ }
114
+ }
115
+ }
116
+ return { f: fFinal, p: pFinal };
117
+ }
118
+ /**
119
+ * Get all requests that have been added to this context.
120
+ * This is a convenience method that calls {@link FlowrAnalyzerLoadingOrderContext.getLoadingOrder}.
121
+ */
122
+ computeLoadingOrder() {
123
+ return this.loadingOrder.getLoadingOrder();
124
+ }
125
+ getFilesByRole(role) {
126
+ return this.specialFiles[role];
127
+ }
128
+ }
129
+ exports.FlowrAnalyzerFilesContext = FlowrAnalyzerFilesContext;
130
+ //# sourceMappingURL=flowr-analyzer-files-context.js.map
@@ -0,0 +1,76 @@
1
+ import { AbstractFlowrAnalyzerContext } from './abstract-flowr-analyzer-context';
2
+ import type { RParseRequest } from '../../r-bridge/retriever';
3
+ import { FlowrAnalyzerLoadingOrderPlugin } from '../plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin';
4
+ import type { FlowrAnalyzerContext } from './flowr-analyzer-context';
5
+ /**
6
+ * Read-only interface for the loading order context, which is used to determine the order in which script files are loaded in a project.
7
+ *
8
+ * This interface prevents you from modifying the available files, but allows you to inspect them (which is probably what you want when using the {@link FlowrAnalyzer}).
9
+ * If you are a {@link FlowrAnalyzerLoadingOrderPlugin} and want to modify the available orders, you can use the {@link FlowrAnalyzerLoadingOrderContext} directly.
10
+ */
11
+ export interface ReadOnlyFlowrAnalyzerLoadingOrderContext {
12
+ /**
13
+ * The name of this context.
14
+ */
15
+ readonly name: string;
16
+ /**
17
+ * Peek whether we have a loading order known or guessed, this does not trigger any plugin runs.
18
+ * If you want to get the current loading order, including potential recompoutations, use {@link getLoadingOrder} instead.
19
+ */
20
+ peekLoadingOrder(): readonly RParseRequest[] | undefined;
21
+ /**
22
+ * Get the current loading order of requests, potentially triggering a re-computation if new requests have been added since the last computation.
23
+ */
24
+ getLoadingOrder(): readonly RParseRequest[];
25
+ /**
26
+ * Get all requests that have been added to this context, but for which no loading order is known or guessed.
27
+ */
28
+ getUnorderedRequests(): readonly RParseRequest[];
29
+ /**
30
+ * Get the current guesses for the loading order, if any. These are populated by {@link FlowrAnalyzerLoadingOrderPlugin}s.
31
+ */
32
+ currentGuesses(): readonly RParseRequest[][];
33
+ /**
34
+ * Get the current known loading order, if any. This is populated by {@link FlowrAnalyzerLoadingOrderPlugin}s if they have a source of identifying the order definitively.
35
+ */
36
+ currentKnownOrder(): readonly RParseRequest[] | undefined;
37
+ }
38
+ /**
39
+ * This context is responsible for managing the loading order of script files in a project, including guesses and known orders provided by {@link FlowrAnalyzerLoadingOrderPlugin}s.
40
+ *
41
+ * If you are interested in inspecting these orders, refer to {@link ReadOnlyFlowrAnalyzerLoadingOrderContext}.
42
+ * Plugins, however, can use this context directly to modify order guesses.
43
+ */
44
+ export declare class FlowrAnalyzerLoadingOrderContext extends AbstractFlowrAnalyzerContext<undefined, void, FlowrAnalyzerLoadingOrderPlugin> implements ReadOnlyFlowrAnalyzerLoadingOrderContext {
45
+ readonly name = "flowr-analyzer-loading-order-context";
46
+ private rerunRequired;
47
+ constructor(ctx: FlowrAnalyzerContext, plugins: readonly FlowrAnalyzerLoadingOrderPlugin[] | undefined);
48
+ private knownOrder?;
49
+ private guesses;
50
+ /** just the base collection of requests we know nothing about the order! */
51
+ private unordered;
52
+ /**
53
+ * Add one or multiple requests to the context.
54
+ * These are considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
55
+ *
56
+ * This is a batched version of {@link addRequest}.
57
+ */
58
+ addRequests(requests: readonly RParseRequest[]): void;
59
+ /**
60
+ * Add a single request to the context.
61
+ * This is considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
62
+ *
63
+ * If you want to add multiple requests, consider using {@link addRequests} instead for efficiency.
64
+ */
65
+ addRequest(request: RParseRequest): void;
66
+ /**
67
+ * Add a guess for the loading order. This is mostly for plugins to use.
68
+ * In case you have a certain order, use the `certain` flag to indicate this -- but please take care of *really* being certain!
69
+ */
70
+ addGuess(guess: readonly RParseRequest[], certain?: boolean): void;
71
+ currentGuesses(): readonly RParseRequest[][];
72
+ currentKnownOrder(): readonly RParseRequest[] | undefined;
73
+ peekLoadingOrder(): readonly RParseRequest[] | undefined;
74
+ getUnorderedRequests(): readonly RParseRequest[];
75
+ getLoadingOrder(): readonly RParseRequest[];
76
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerLoadingOrderContext = void 0;
4
+ const abstract_flowr_analyzer_context_1 = require("./abstract-flowr-analyzer-context");
5
+ const log_1 = require("../../util/log");
6
+ const arrays_1 = require("../../util/collections/arrays");
7
+ const flowr_analyzer_loading_order_plugin_1 = require("../plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin");
8
+ const loadingOrderLog = log_1.log.getSubLogger({ name: 'loading-order' });
9
+ /**
10
+ * This context is responsible for managing the loading order of script files in a project, including guesses and known orders provided by {@link FlowrAnalyzerLoadingOrderPlugin}s.
11
+ *
12
+ * If you are interested in inspecting these orders, refer to {@link ReadOnlyFlowrAnalyzerLoadingOrderContext}.
13
+ * Plugins, however, can use this context directly to modify order guesses.
14
+ */
15
+ class FlowrAnalyzerLoadingOrderContext extends abstract_flowr_analyzer_context_1.AbstractFlowrAnalyzerContext {
16
+ name = 'flowr-analyzer-loading-order-context';
17
+ rerunRequired;
18
+ constructor(ctx, plugins) {
19
+ super(ctx, flowr_analyzer_loading_order_plugin_1.FlowrAnalyzerLoadingOrderPlugin.defaultPlugin(), plugins);
20
+ this.rerunRequired = this.plugins.length > 0;
21
+ }
22
+ knownOrder;
23
+ guesses = [];
24
+ /** just the base collection of requests we know nothing about the order! */
25
+ unordered = [];
26
+ /**
27
+ * Add one or multiple requests to the context.
28
+ * These are considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
29
+ *
30
+ * This is a batched version of {@link addRequest}.
31
+ */
32
+ addRequests(requests) {
33
+ this.unordered.push(...requests);
34
+ if (this.knownOrder || this.guesses.length > 0) {
35
+ loadingOrderLog.warn(`Adding requests ${requests.map(r => r.request).join(', ')} after known order!`);
36
+ this.rerunRequired = true;
37
+ }
38
+ }
39
+ /**
40
+ * Add a single request to the context.
41
+ * This is considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
42
+ *
43
+ * If you want to add multiple requests, consider using {@link addRequests} instead for efficiency.
44
+ */
45
+ addRequest(request) {
46
+ this.unordered.push(request);
47
+ if (this.knownOrder || this.guesses.length > 0) {
48
+ loadingOrderLog.warn(`Adding request ${request.request} ${request.content} after known order!`);
49
+ this.rerunRequired = true;
50
+ }
51
+ }
52
+ /**
53
+ * Add a guess for the loading order. This is mostly for plugins to use.
54
+ * In case you have a certain order, use the `certain` flag to indicate this -- but please take care of *really* being certain!
55
+ */
56
+ addGuess(guess, certain) {
57
+ if (certain) {
58
+ if (this.knownOrder) {
59
+ loadingOrderLog.warn(`Adding certain guess ${guess.map(g => g.request).join(', ')} after known order!`);
60
+ if (!(0, arrays_1.arrayEqual)(this.knownOrder, guess)) {
61
+ loadingOrderLog.error(`Certain guess ${guess.map(g => g.request).join(', ')} does not match known order ${this.knownOrder.map(g => g.request).join(', ')}`);
62
+ }
63
+ }
64
+ else {
65
+ this.knownOrder = guess;
66
+ }
67
+ }
68
+ }
69
+ currentGuesses() {
70
+ return this.guesses;
71
+ }
72
+ currentKnownOrder() {
73
+ return this.knownOrder;
74
+ }
75
+ peekLoadingOrder() {
76
+ return this.knownOrder ?? (this.guesses.length > 0 ? this.guesses[0] : undefined);
77
+ }
78
+ getUnorderedRequests() {
79
+ return this.unordered;
80
+ }
81
+ getLoadingOrder() {
82
+ if (this.rerunRequired) {
83
+ this.rerunRequired = false;
84
+ this.applyPlugins(undefined);
85
+ }
86
+ return this.peekLoadingOrder() ?? this.unordered;
87
+ }
88
+ }
89
+ exports.FlowrAnalyzerLoadingOrderContext = FlowrAnalyzerLoadingOrderContext;
90
+ //# sourceMappingURL=flowr-analyzer-loading-order-context.js.map
@@ -0,0 +1,89 @@
1
+ import type { PathLike } from 'fs';
2
+ /**
3
+ * Just a readable alias for file paths, mostly for documentation purposes.
4
+ * We separate {@link PathLike} types from string paths that are used for project paths.
5
+ */
6
+ export type FilePath = string;
7
+ /**
8
+ * Some files have a special meaning in R projects, e.g., the `DESCRIPTION` file in R packages.
9
+ * This list may be extended in the future and reflects files that the {@link FlowrAnalyzer} can do something interesting with.
10
+ * If you add an interesting file that is only part of your plugin infrastructure, please use the `other` role.
11
+ */
12
+ export declare enum SpecialFileRole {
13
+ /** The `DESCRIPTION` file in R packages, this is the only currently supported special file. */
14
+ Description = "description",
15
+ /** The `NAMESPACE` file in R packages, currently not specially supported. */
16
+ Namespace = "namespace",
17
+ /** Data files, e.g., `R/sysdata.rda`, currently not specially supported. */
18
+ Data = "data",
19
+ /** Other special files that are not specifically supported by flowR but may be interesting for some analyses. */
20
+ Other = "other"
21
+ }
22
+ /**
23
+ * This is the basic interface for all files known to the FlowrAnalyzer.
24
+ * You can implement this interface to provide custom file loading mechanisms.
25
+ * Mostly, we will be interested in text files (or decorations thereof).
26
+ * If you want to load other file types, you either have to transform them into a presentation supported by flowR
27
+ * or add your own file loader plugin (similar to the {@link FlowrAnalyzerDescriptionFilePlugin}).
28
+ *
29
+ * See {@link FlowrFile} for a basic single-cache implementation and {@link FlowrTextFile} for a text-file specific implementation.
30
+ * If you want to pass in inline text files, see {@link FlowrInlineTextFile}.
31
+ *
32
+ * @typeParam Content - The type of the content returned by the `content()` method.
33
+ */
34
+ export interface FlowrFileProvider<Content = unknown> {
35
+ /**
36
+ * The role of this file, if any, in general your file should _not_ decide for itself what role it has in the project context,
37
+ * this is for the loaders plugins to decide (cf. {@link PluginType}) as they can, e.g., respect ignore files, updated mappings, etc.
38
+ * However, they will 1) set this role as soon as they decide on it (using {@link assignRole}) and 2) try to respect an already assigned role (however, user configurations may override this).
39
+ */
40
+ role?: SpecialFileRole;
41
+ /**
42
+ * The path to the file, this is used for identification and logging purposes.
43
+ * If the file does not exist on disk, this can be a virtual path (e.g. for inline files).
44
+ * Even though this is a getter, please make sure that the operation is cheap and deterministic (some decorators may overwrite the path, e.g., because they support other protocols).
45
+ */
46
+ path(): PathLike;
47
+ /**
48
+ * The content of the file, this may be cached by the implementation and does not have to be expensive.
49
+ * You can used stream based implementations but right now there is no external, project-wide expressions of life cycles for files.
50
+ * So make sure your implementation closes the resource as soon as possible.
51
+ */
52
+ content(): Content;
53
+ /**
54
+ * Assign a role to this file, this should be done by the loader plugins (cf. {@link PluginType}).
55
+ * **Do not call this method yourself unless you are a file-loader plugin and/or really know what you are doing, this may break plugin assumptions!**
56
+ */
57
+ assignRole(role: SpecialFileRole): void;
58
+ }
59
+ /**
60
+ * A basic implementation of the {@link FlowrFileProvider} interface that caches the content after the first load (i.e., updates on disk are ignored).
61
+ *
62
+ * See {@link FlowrTextFile} for a text-file specific implementation and {@link FlowrInlineTextFile} for inline text files.
63
+ */
64
+ export declare abstract class FlowrFile<Content = unknown> implements FlowrFileProvider<Content> {
65
+ private contentCache;
66
+ protected filePath: PathLike;
67
+ readonly role?: SpecialFileRole;
68
+ constructor(filePath: PathLike, role?: SpecialFileRole);
69
+ path(): PathLike;
70
+ content(): Content;
71
+ protected abstract loadContent(): Content;
72
+ assignRole(role: SpecialFileRole): void;
73
+ }
74
+ /**
75
+ * A basic implementation of the {@link FlowrFileProvider} interface for text files that caches the content after the first load (i.e., updates on disk are ignored).
76
+ */
77
+ export declare class FlowrTextFile extends FlowrFile<string> {
78
+ protected loadContent(): string;
79
+ }
80
+ /**
81
+ * A basic implementation of the {@link FlowrFileProvider} interface for (constant) inline text files.
82
+ * This is also useful for "special" files like the `DESCRIPTION` file in R packages that you want to pass in directly.
83
+ * These will be handled by the {@link FlowrAnalyzerDescriptionFilePlugin} (e.g., by using the {@link FlowrDescriptionFile#from} method decorator).
84
+ */
85
+ export declare class FlowrInlineTextFile extends FlowrFile<string> {
86
+ private readonly contentStr;
87
+ constructor(path: PathLike, content: string);
88
+ protected loadContent(): string;
89
+ }