@eagleoutice/flowr 2.13.3 → 2.13.5

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 (176) hide show
  1. package/README.md +32 -32
  2. package/abstract-interpretation/absint-visitor.js +2 -2
  3. package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
  4. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +1 -1
  5. package/abstract-interpretation/unsupported-functions.js +1 -1
  6. package/cli/repl/core.js +10 -2
  7. package/config.d.ts +4 -1
  8. package/config.js +10 -1
  9. package/control-flow/cfg-dead-code.js +91 -15
  10. package/control-flow/extract-cfg.js +93 -8
  11. package/control-flow/semantic-cfg-guided-visitor.js +2 -0
  12. package/dataflow/environments/built-in-config.d.ts +6 -3
  13. package/dataflow/environments/built-in-eval-name.d.ts +20 -0
  14. package/dataflow/environments/built-in-eval-name.js +25 -0
  15. package/dataflow/environments/built-in-proc-name.d.ts +4 -0
  16. package/dataflow/environments/built-in-proc-name.js +4 -0
  17. package/dataflow/environments/built-in-props.d.ts +175 -0
  18. package/dataflow/environments/built-in-props.js +207 -0
  19. package/dataflow/environments/built-in.d.ts +28 -20
  20. package/dataflow/environments/built-in.js +39 -8
  21. package/dataflow/environments/default-builtin-config.d.ts +1094 -86
  22. package/dataflow/environments/default-builtin-config.js +496 -212
  23. package/dataflow/environments/identifier.d.ts +25 -1
  24. package/dataflow/environments/identifier.js +24 -2
  25. package/dataflow/environments/query-fn-props.d.ts +102 -0
  26. package/dataflow/environments/query-fn-props.js +188 -0
  27. package/dataflow/eval/resolve/alias-tracking.d.ts +2 -0
  28. package/dataflow/eval/resolve/alias-tracking.js +12 -2
  29. package/dataflow/eval/resolve/match-arguments.d.ts +15 -0
  30. package/dataflow/eval/resolve/match-arguments.js +77 -0
  31. package/dataflow/eval/resolve/resolve-numbers.d.ts +202 -0
  32. package/dataflow/eval/resolve/resolve-numbers.js +163 -0
  33. package/dataflow/eval/resolve/resolve-operators.d.ts +60 -0
  34. package/dataflow/eval/resolve/resolve-operators.js +115 -0
  35. package/dataflow/eval/resolve/resolve-strings.d.ts +98 -0
  36. package/dataflow/eval/resolve/resolve-strings.js +116 -0
  37. package/dataflow/eval/resolve/resolve.d.ts +5 -23
  38. package/dataflow/eval/resolve/resolve.js +56 -87
  39. package/dataflow/fn/higher-order-function.js +3 -3
  40. package/dataflow/fn/recursive-function.js +1 -1
  41. package/dataflow/graph/df-helper.js +1 -1
  42. package/dataflow/graph/vertex.d.ts +32 -25
  43. package/dataflow/graph/vertex.js +40 -36
  44. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -0
  45. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -4
  46. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +14 -0
  47. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +28 -29
  48. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +41 -48
  49. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +14 -0
  50. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +45 -0
  51. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -1
  52. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +30 -0
  53. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +62 -2
  54. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +63 -16
  55. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +29 -9
  56. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +5 -1
  57. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +35 -0
  58. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -2
  59. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +1 -1
  60. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -0
  61. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +46 -0
  62. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +1 -1
  63. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +3 -1
  64. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -1
  65. package/dataflow/internal/process/functions/call/known-call-handling.js +2 -1
  66. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +24 -0
  67. package/dataflow/internal/process/functions/process-parameter.js +2 -1
  68. package/documentation/data/faq/faqs.js +11 -0
  69. package/documentation/doc-util/doc-types.js +1 -1
  70. package/documentation/wiki-analyzer.js +75 -0
  71. package/documentation/wiki-core.js +65 -16
  72. package/documentation/wiki-interface.js +3 -0
  73. package/linter/linter-rules.d.ts +10 -11
  74. package/linter/rules/absolute-path.js +1 -1
  75. package/linter/rules/deprecated-functions.js +5 -3
  76. package/linter/rules/function-finder-util.d.ts +2 -2
  77. package/linter/rules/function-finder-util.js +11 -4
  78. package/linter/rules/network-functions.d.ts +25 -5
  79. package/linter/rules/network-functions.js +51 -11
  80. package/linter/rules/no-leaked-credentials.js +1 -1
  81. package/linter/rules/problematic-inputs.d.ts +1 -1
  82. package/linter/rules/problematic-inputs.js +7 -1
  83. package/linter/rules/seeded-randomness.d.ts +5 -8
  84. package/linter/rules/seeded-randomness.js +17 -9
  85. package/linter/rules/undefined-symbol.js +1 -1
  86. package/linter/rules/unused-definition.js +15 -10
  87. package/linter/rules/useless-loop.js +1 -1
  88. package/package.json +3 -2
  89. package/project/cache/flowr-analyzer-cache.d.ts +4 -3
  90. package/project/cache/flowr-analyzer-cache.js +32 -13
  91. package/project/cache/flowr-cache.d.ts +39 -12
  92. package/project/cache/flowr-cache.js +5 -3
  93. package/project/context/flowr-analyzer-context.d.ts +8 -1
  94. package/project/context/flowr-analyzer-context.js +11 -1
  95. package/project/context/flowr-analyzer-dependencies-context.d.ts +4 -2
  96. package/project/context/flowr-analyzer-dependencies-context.js +15 -1
  97. package/project/context/flowr-analyzer-files-context.d.ts +8 -4
  98. package/project/context/flowr-analyzer-files-context.js +20 -1
  99. package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +33 -0
  100. package/project/context/flowr-analyzer-incremental-analysis-context.js +63 -0
  101. package/project/context/flowr-analyzer-meta-context.d.ts +3 -1
  102. package/project/context/flowr-analyzer-meta-context.js +14 -0
  103. package/project/context/flowr-file.d.ts +25 -3
  104. package/project/context/flowr-file.js +24 -2
  105. package/project/dependency-version-space.d.ts +37 -0
  106. package/project/dependency-version-space.js +118 -26
  107. package/project/flowr-analyzer.d.ts +6 -0
  108. package/project/flowr-analyzer.js +6 -2
  109. package/project/incremental/incremental-parse/edit-computation.d.ts +7 -0
  110. package/project/incremental/incremental-parse/edit-computation.js +61 -0
  111. package/project/incremental/incremental-parse/incremental-parse.d.ts +12 -0
  112. package/project/incremental/incremental-parse/incremental-parse.js +37 -0
  113. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +1 -1
  114. package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +57 -0
  115. package/project/plugins/file-plugins/files/flowr-manifest-files.js +121 -0
  116. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -2
  117. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
  118. package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +1 -1
  119. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +33 -0
  120. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +53 -0
  121. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +1 -1
  122. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -3
  123. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.d.ts +27 -0
  124. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +47 -0
  125. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +7 -0
  126. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +31 -3
  127. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +10 -4
  128. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +17 -4
  129. package/project/plugins/plugin-registry.d.ts +4 -4
  130. package/project/plugins/plugin-registry.js +7 -4
  131. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +4 -4
  132. package/project/sigdb/reader.d.ts +7 -0
  133. package/project/sigdb/reader.js +12 -0
  134. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +1 -1
  135. package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -1
  136. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +10 -0
  137. package/queries/catalog/dependencies-query/function-info/derived-functions.js +41 -0
  138. package/queries/catalog/dependencies-query/function-info/read-functions.js +14 -13
  139. package/queries/catalog/dependencies-query/function-info/write-functions.js +28 -36
  140. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +33 -3
  141. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +31 -0
  142. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +9 -2
  143. package/queries/catalog/input-sources-query/input-source-functions.d.ts +9 -10
  144. package/queries/catalog/input-sources-query/input-source-functions.js +23 -394
  145. package/queries/catalog/input-sources-query/input-sources-query-executor.js +11 -6
  146. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -0
  147. package/queries/catalog/input-sources-query/input-sources-query-format.js +28 -10
  148. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +14 -1
  149. package/queries/catalog/input-sources-query/simple-input-classifier.js +24 -0
  150. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -1
  151. package/queries/catalog/signature-query/signature-query-executor.js +79 -3
  152. package/queries/catalog/signature-query/signature-query-format.d.ts +27 -0
  153. package/queries/catalog/signature-query/signature-query-render.js +21 -3
  154. package/r-bridge/data/data.d.ts +2 -2
  155. package/r-bridge/data/data.js +2 -2
  156. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +6 -2
  157. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +21 -2
  158. package/r-bridge/parser.d.ts +11 -1
  159. package/r-bridge/parser.js +7 -4
  160. package/r-bridge/shell-executor.d.ts +1 -0
  161. package/r-bridge/shell-executor.js +1 -0
  162. package/r-bridge/shell.d.ts +1 -0
  163. package/r-bridge/shell.js +1 -0
  164. package/reconstruct/inline/source-inline-map.js +1 -1
  165. package/search/flowr-search-filters.d.ts +1 -6
  166. package/search/flowr-search-filters.js +1 -8
  167. package/search/search-executor/search-enrichers.d.ts +2 -0
  168. package/search/search-executor/search-enrichers.js +29 -12
  169. package/util/mermaid/dfg.js +1 -1
  170. package/util/version.js +1 -1
  171. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +0 -31
  172. package/project/plugins/file-plugins/files/flowr-rproject-file.js +0 -66
  173. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +0 -22
  174. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +0 -36
  175. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +0 -13
  176. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +0 -32
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrUvrManifestFile = exports.FlowrRProjectFile = exports.FlowrManifestFile = exports.manifestFileLog = void 0;
4
+ const flowr_file_1 = require("../../../context/flowr-file");
5
+ const package_1 = require("../../package-version-plugins/package");
6
+ const smol_toml_1 = require("smol-toml");
7
+ const log_1 = require("../../../../util/log");
8
+ exports.manifestFileLog = log_1.log.getSubLogger({ name: 'flowr-manifest-file' });
9
+ /** A project manifest that is no `DESCRIPTION` (an rv `rproject.toml`, a uvr `uvr.toml`). */
10
+ class FlowrManifestFile extends flowr_file_1.FlowrFile {
11
+ wrapped;
12
+ constructor(file) {
13
+ super(file.path(), file.roles);
14
+ this.wrapped = file;
15
+ }
16
+ }
17
+ exports.FlowrManifestFile = FlowrManifestFile;
18
+ /** The `rproject.toml` of an [rv](https://a2-ai.github.io/rv-docs/) project, lifted by {@link FlowrRProjectFile.from}. */
19
+ class FlowrRProjectFile extends FlowrManifestFile {
20
+ loadContent() {
21
+ try {
22
+ const toml = (0, smol_toml_1.parse)(this.wrapped.content().toString());
23
+ return toml.project ?? {};
24
+ }
25
+ catch (e) {
26
+ exports.manifestFileLog.warn(`Could not parse ${this.wrapped.path()}: ${e.message}`);
27
+ return {};
28
+ }
29
+ }
30
+ /** rproject lifter, this does not re-create if already an rproject file */
31
+ static from(file, role) {
32
+ if (role) {
33
+ file.assignRole(role);
34
+ }
35
+ return file instanceof FlowrRProjectFile ? file : new FlowrRProjectFile(file);
36
+ }
37
+ projectName() {
38
+ const name = this.content().name;
39
+ return typeof name === 'string' ? name : undefined;
40
+ }
41
+ /** rv pins a concrete `r_version`, e.g. `4.5` */
42
+ rVersion() {
43
+ const version = this.content().r_version;
44
+ return typeof version === 'string' ? version : undefined;
45
+ }
46
+ /** either a plain name or a table carrying it (`{ name = "ggplot2", repository = "new-rspm" }`) */
47
+ dependencies() {
48
+ const deps = this.content().dependencies;
49
+ if (!Array.isArray(deps)) {
50
+ return [];
51
+ }
52
+ const out = [];
53
+ for (const dep of deps) {
54
+ const name = typeof dep === 'string' ? dep : dep?.name;
55
+ if (typeof name === 'string' && name.length > 0) {
56
+ out.push(new package_1.Package({ name, type: 'package' }));
57
+ }
58
+ }
59
+ return out;
60
+ }
61
+ /** rv does not group its dependencies, they are all needed to run the project */
62
+ declares() {
63
+ return { imports: this.dependencies() };
64
+ }
65
+ }
66
+ exports.FlowrRProjectFile = FlowrRProjectFile;
67
+ /** The `uvr.toml` of a [uvr](https://github.com/nbafrank/uvr) project, lifted by {@link FlowrUvrManifestFile.from}. */
68
+ class FlowrUvrManifestFile extends FlowrManifestFile {
69
+ loadContent() {
70
+ try {
71
+ return (0, smol_toml_1.parse)(this.wrapped.content().toString());
72
+ }
73
+ catch (e) {
74
+ exports.manifestFileLog.warn(`Could not parse ${this.wrapped.path()}: ${e.message}`);
75
+ return {};
76
+ }
77
+ }
78
+ /** uvr manifest lifter, this does not re-create if already a uvr manifest file */
79
+ static from(file, role) {
80
+ if (role) {
81
+ file.assignRole(role);
82
+ }
83
+ return file instanceof FlowrUvrManifestFile ? file : new FlowrUvrManifestFile(file);
84
+ }
85
+ projectName() {
86
+ const name = this.content().project?.name;
87
+ return typeof name === 'string' ? name : undefined;
88
+ }
89
+ /** uvr usually states a requirement (`>=4.0.0`), which pins nothing; the `uvr.lock` holds the resolved version */
90
+ rVersion() {
91
+ const version = this.content().project?.r_version;
92
+ const trimmed = typeof version === 'string' ? version.trim() : '';
93
+ return /^\d/.test(trimmed) ? trimmed : undefined;
94
+ }
95
+ declares() {
96
+ return {
97
+ imports: this.packagesOf(this.content().dependencies),
98
+ suggests: this.packagesOf(this.content()['dev-dependencies'])
99
+ };
100
+ }
101
+ /** a table mapping the name to a bare requirement (`">=3.0.0"`, `"*"`) or to one with its origin (`{ version = ..., git = ... }`) */
102
+ packagesOf(table) {
103
+ // an array is no such table, and its indices would pass as package names
104
+ if (typeof table !== 'object' || table === null || Array.isArray(table)) {
105
+ return [];
106
+ }
107
+ const out = [];
108
+ for (const [name, spec] of Object.entries(table)) {
109
+ if (name.length === 0) {
110
+ continue;
111
+ }
112
+ const version = typeof spec === 'string' ? spec : spec?.version;
113
+ // `*` accepts anything, so it constrains nothing
114
+ const range = typeof version === 'string' && version !== '*' ? package_1.Package.parsePkgVersionRange(undefined, version) : undefined;
115
+ out.push(new package_1.Package({ name, type: 'package', versionConstraints: range ? [range] : undefined }));
116
+ }
117
+ return out;
118
+ }
119
+ }
120
+ exports.FlowrUvrManifestFile = FlowrUvrManifestFile;
121
+ //# sourceMappingURL=flowr-manifest-files.js.map
@@ -3,10 +3,10 @@ import { FlowrFile } from '../../../context/flowr-file';
3
3
  import { type Node } from 'commonmark';
4
4
  import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
5
5
  /**
6
- * This decorates a text file and parses its contents as a R Markdown file.
6
+ * This decorates a text file and parses its contents as an R Markdown file.
7
7
  * Finally, it provides access to the single cells, and all cells fused together as one R file.
8
8
  */
9
- export declare class FlowrRMarkdownFile extends FlowrFile<string> {
9
+ export declare class FlowrRMarkdownFile extends FlowrFile {
10
10
  private data?;
11
11
  private mergedCode?;
12
12
  private readonly wrapped;
@@ -15,7 +15,7 @@ const gray_matter_1 = __importDefault(require("gray-matter"));
15
15
  const log_1 = require("../../../../util/log");
16
16
  const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
17
17
  /**
18
- * This decorates a text file and parses its contents as a R Markdown file.
18
+ * This decorates a text file and parses its contents as an R Markdown file.
19
19
  * Finally, it provides access to the single cells, and all cells fused together as one R file.
20
20
  */
21
21
  class FlowrRMarkdownFile extends flowr_file_1.FlowrFile {
@@ -86,7 +86,7 @@ class FlowrRMarkdownFile extends flowr_file_1.FlowrFile {
86
86
  });
87
87
  const rawChildFile = this.context.files.getFileByPath(childPath[0]);
88
88
  if (rawChildFile !== undefined) {
89
- block.code = FlowrRMarkdownFile.from(rawChildFile, this.context).content();
89
+ block.code = FlowrRMarkdownFile.from(rawChildFile, this.context).content().toString();
90
90
  }
91
91
  else {
92
92
  log_1.log.warn(`Child file '${childPath[0]}' of '${this.path()}' did not load as RMD.`);
@@ -5,7 +5,7 @@ import { FlowrFile } from '../../../context/flowr-file';
5
5
  * Finally, it provides access to the single cells, and all cells fused together as one R file.
6
6
  * So far, this does *not* support `\Sexpr` calls.
7
7
  */
8
- export declare class FlowrSweaveFile extends FlowrFile<string> {
8
+ export declare class FlowrSweaveFile extends FlowrFile {
9
9
  private readonly wrapped;
10
10
  private data?;
11
11
  /**
@@ -0,0 +1,33 @@
1
+ import { FlowrAnalyzerFilePlugin } from './flowr-analyzer-file-plugin';
2
+ import { SemVer } from 'semver';
3
+ import type { PathLike } from 'fs';
4
+ import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
5
+ import type { FlowrFileProvider } from '../../context/flowr-file';
6
+ /**
7
+ * Tags a project manifest with the {@link FileRole.Manifest} role and lifts it, so the meta plugins reading it
8
+ * can look it up by role.
9
+ */
10
+ declare abstract class FlowrAnalyzerManifestFilePlugin extends FlowrAnalyzerFilePlugin {
11
+ readonly version: SemVer;
12
+ private readonly pathPattern;
13
+ /**
14
+ * @param pathPattern - The pattern to identify the manifest, see the respective subclass for its default.
15
+ */
16
+ constructor(pathPattern: RegExp);
17
+ applies(file: PathLike): boolean;
18
+ }
19
+ /** Lifts an rv `rproject.toml` to a {@link FlowrRProjectFile}. */
20
+ export declare class FlowrAnalyzerRProjectFilePlugin extends FlowrAnalyzerManifestFilePlugin {
21
+ readonly name = "flowr-analyzer-rproject-file-plugin";
22
+ readonly description = "Marks the rproject.toml manifest of an rv project.";
23
+ constructor(pathPattern?: RegExp);
24
+ process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
25
+ }
26
+ /** Lifts a uvr `uvr.toml` to a {@link FlowrUvrManifestFile}. */
27
+ export declare class FlowrAnalyzerUvrManifestFilePlugin extends FlowrAnalyzerManifestFilePlugin {
28
+ readonly name = "flowr-analyzer-uvr-manifest-file-plugin";
29
+ readonly description = "Marks the uvr.toml manifest of a uvr project.";
30
+ constructor(pathPattern?: RegExp);
31
+ process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
32
+ }
33
+ export {};
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerUvrManifestFilePlugin = exports.FlowrAnalyzerRProjectFilePlugin = void 0;
4
+ const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
5
+ const semver_1 = require("semver");
6
+ const flowr_file_1 = require("../../context/flowr-file");
7
+ const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
8
+ const flowr_manifest_files_1 = require("./files/flowr-manifest-files");
9
+ const RProjectFilePattern = /^rproject\.toml$/i;
10
+ const UvrManifestFilePattern = /^uvr\.toml$/i;
11
+ /**
12
+ * Tags a project manifest with the {@link FileRole.Manifest} role and lifts it, so the meta plugins reading it
13
+ * can look it up by role.
14
+ */
15
+ class FlowrAnalyzerManifestFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
16
+ version = new semver_1.SemVer('0.1.0');
17
+ pathPattern;
18
+ /**
19
+ * @param pathPattern - The pattern to identify the manifest, see the respective subclass for its default.
20
+ */
21
+ constructor(pathPattern) {
22
+ super();
23
+ this.pathPattern = pathPattern;
24
+ }
25
+ applies(file) {
26
+ return this.pathPattern.test((0, built_in_source_1.platformBasename)(file.toString()));
27
+ }
28
+ }
29
+ /** Lifts an rv `rproject.toml` to a {@link FlowrRProjectFile}. */
30
+ class FlowrAnalyzerRProjectFilePlugin extends FlowrAnalyzerManifestFilePlugin {
31
+ name = 'flowr-analyzer-rproject-file-plugin';
32
+ description = 'Marks the rproject.toml manifest of an rv project.';
33
+ constructor(pathPattern = RProjectFilePattern) {
34
+ super(pathPattern);
35
+ }
36
+ process(_ctx, file) {
37
+ return [flowr_manifest_files_1.FlowrRProjectFile.from(file, flowr_file_1.FileRole.Manifest), true];
38
+ }
39
+ }
40
+ exports.FlowrAnalyzerRProjectFilePlugin = FlowrAnalyzerRProjectFilePlugin;
41
+ /** Lifts a uvr `uvr.toml` to a {@link FlowrUvrManifestFile}. */
42
+ class FlowrAnalyzerUvrManifestFilePlugin extends FlowrAnalyzerManifestFilePlugin {
43
+ name = 'flowr-analyzer-uvr-manifest-file-plugin';
44
+ description = 'Marks the uvr.toml manifest of a uvr project.';
45
+ constructor(pathPattern = UvrManifestFilePattern) {
46
+ super(pathPattern);
47
+ }
48
+ process(_ctx, file) {
49
+ return [flowr_manifest_files_1.FlowrUvrManifestFile.from(file, flowr_file_1.FileRole.Manifest), true];
50
+ }
51
+ }
52
+ exports.FlowrAnalyzerUvrManifestFilePlugin = FlowrAnalyzerUvrManifestFilePlugin;
53
+ //# sourceMappingURL=flowr-analyzer-manifest-file-plugin.js.map
@@ -9,7 +9,7 @@ import type { FlowrFileProvider } from '../../context/flowr-file';
9
9
  */
10
10
  export declare class FlowrAnalyzerVirtualEnvFilePlugin extends FlowrAnalyzerFilePlugin {
11
11
  readonly name = "flowr-analyzer-virtualenv-files-plugin";
12
- readonly description = "Marks virtual-environment lockfiles (renv.lock, rv.lock).";
12
+ readonly description = "Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).";
13
13
  readonly version: SemVer;
14
14
  private readonly pathPattern;
15
15
  /**
@@ -5,15 +5,15 @@ const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
5
5
  const semver_1 = require("semver");
6
6
  const flowr_file_1 = require("../../context/flowr-file");
7
7
  const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
8
- /** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`, `packrat.lock`). */
9
- const VirtualEnvFilePattern = /^(renv|rv|packrat)\.lock$/i;
8
+ /** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`, `uvr.lock`, `packrat.lock`). */
9
+ const VirtualEnvFilePattern = /^(renv|rv|uvr|packrat)\.lock$/i;
10
10
  /**
11
11
  * Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
12
12
  * plugins that read them can look them up by role instead of scanning every project file.
13
13
  */
14
14
  class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
15
15
  name = 'flowr-analyzer-virtualenv-files-plugin';
16
- description = 'Marks virtual-environment lockfiles (renv.lock, rv.lock).';
16
+ description = 'Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).';
17
17
  version = new semver_1.SemVer('0.1.0');
18
18
  pathPattern;
19
19
  /**
@@ -0,0 +1,27 @@
1
+ import { FlowrAnalyzerPackageVersionsPlugin } from './flowr-analyzer-package-versions-plugin';
2
+ import { SemVer } from 'semver';
3
+ import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
4
+ import { FlowrRProjectFile, FlowrUvrManifestFile } from '../file-plugins/files/flowr-manifest-files';
5
+ /**
6
+ * Extracts the project metadata and the declared dependencies from a project manifest. The name is contributed
7
+ * without a namespace: such a project is no package, so `a::b` must not resolve against it.
8
+ */
9
+ declare abstract class FlowrAnalyzerMetaManifestFilePlugin extends FlowrAnalyzerPackageVersionsPlugin {
10
+ readonly version: SemVer;
11
+ /** the manifest flavor this plugin reads, the others are left to their own plugin */
12
+ protected abstract readonly reads: abstract new (...args: never[]) => object;
13
+ process(ctx: FlowrAnalyzerContext): void;
14
+ }
15
+ /** Reads an rv `rproject.toml`. */
16
+ export declare class FlowrAnalyzerMetaRProjectFilePlugin extends FlowrAnalyzerMetaManifestFilePlugin {
17
+ readonly name = "flowr-analyzer-meta-rproject-file-plugin";
18
+ readonly description = "Extracts project meta information and dependencies from an rproject.toml.";
19
+ protected readonly reads: typeof FlowrRProjectFile;
20
+ }
21
+ /** Reads a uvr `uvr.toml`, whose `[dev-dependencies]` land in `suggests`. */
22
+ export declare class FlowrAnalyzerMetaUvrManifestFilePlugin extends FlowrAnalyzerMetaManifestFilePlugin {
23
+ readonly name = "flowr-analyzer-meta-uvr-manifest-file-plugin";
24
+ readonly description = "Extracts project meta information and dependencies from a uvr.toml.";
25
+ protected readonly reads: typeof FlowrUvrManifestFile;
26
+ }
27
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowrAnalyzerMetaUvrManifestFilePlugin = exports.FlowrAnalyzerMetaRProjectFilePlugin = void 0;
4
+ const flowr_analyzer_package_versions_plugin_1 = require("./flowr-analyzer-package-versions-plugin");
5
+ const semver_1 = require("semver");
6
+ const flowr_file_1 = require("../../context/flowr-file");
7
+ const flowr_analyzer_meta_context_1 = require("../../context/flowr-analyzer-meta-context");
8
+ const flowr_manifest_files_1 = require("../file-plugins/files/flowr-manifest-files");
9
+ /**
10
+ * Extracts the project metadata and the declared dependencies from a project manifest. The name is contributed
11
+ * without a namespace: such a project is no package, so `a::b` must not resolve against it.
12
+ */
13
+ class FlowrAnalyzerMetaManifestFilePlugin extends flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin {
14
+ version = new semver_1.SemVer('0.1.0');
15
+ process(ctx) {
16
+ for (const file of ctx.files.getFilesByRole(flowr_file_1.FileRole.Manifest)) {
17
+ if (!(file instanceof this.reads)) {
18
+ continue;
19
+ }
20
+ const declares = file.declares();
21
+ ctx.meta.contribute({
22
+ name: file.projectName(),
23
+ rVersion: file.rVersion(),
24
+ declares
25
+ }, flowr_analyzer_meta_context_1.MetaPriority.Manifest);
26
+ // like a `DESCRIPTION` `Suggests`, anything but the imports is reported but not needed to run the project
27
+ for (const pkg of declares.imports ?? []) {
28
+ ctx.deps.addDeclaredDependency(pkg);
29
+ }
30
+ }
31
+ }
32
+ }
33
+ /** Reads an rv `rproject.toml`. */
34
+ class FlowrAnalyzerMetaRProjectFilePlugin extends FlowrAnalyzerMetaManifestFilePlugin {
35
+ name = 'flowr-analyzer-meta-rproject-file-plugin';
36
+ description = 'Extracts project meta information and dependencies from an rproject.toml.';
37
+ reads = flowr_manifest_files_1.FlowrRProjectFile;
38
+ }
39
+ exports.FlowrAnalyzerMetaRProjectFilePlugin = FlowrAnalyzerMetaRProjectFilePlugin;
40
+ /** Reads a uvr `uvr.toml`, whose `[dev-dependencies]` land in `suggests`. */
41
+ class FlowrAnalyzerMetaUvrManifestFilePlugin extends FlowrAnalyzerMetaManifestFilePlugin {
42
+ name = 'flowr-analyzer-meta-uvr-manifest-file-plugin';
43
+ description = 'Extracts project meta information and dependencies from a uvr.toml.';
44
+ reads = flowr_manifest_files_1.FlowrUvrManifestFile;
45
+ }
46
+ exports.FlowrAnalyzerMetaUvrManifestFilePlugin = FlowrAnalyzerMetaUvrManifestFilePlugin;
47
+ //# sourceMappingURL=flowr-analyzer-meta-manifest-file-plugin.js.map
@@ -23,3 +23,10 @@ export declare class FlowrAnalyzerPackageVersionsRvPlugin extends FlowrAnalyzerP
23
23
  readonly version: SemVer;
24
24
  process(ctx: FlowrAnalyzerContext): void;
25
25
  }
26
+ /** Reads package versions from a `uvr.lock` (TOML). uvr pins are exact, the dev-dependencies among them. */
27
+ export declare class FlowrAnalyzerPackageVersionsUvrPlugin extends FlowrAnalyzerPackageVersionsPlugin {
28
+ readonly name = "flowr-analyzer-package-versions-uvr-plugin";
29
+ readonly description = "Extracts package versions from a uvr.lock lockfile.";
30
+ readonly version: SemVer;
31
+ process(ctx: FlowrAnalyzerContext): void;
32
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FlowrAnalyzerPackageVersionsRvPlugin = exports.FlowrAnalyzerPackageVersionsPackratPlugin = exports.FlowrAnalyzerPackageVersionsRenvPlugin = exports.lockfileLog = void 0;
3
+ exports.FlowrAnalyzerPackageVersionsUvrPlugin = exports.FlowrAnalyzerPackageVersionsRvPlugin = exports.FlowrAnalyzerPackageVersionsPackratPlugin = exports.FlowrAnalyzerPackageVersionsRenvPlugin = exports.lockfileLog = void 0;
4
4
  const flowr_analyzer_package_versions_plugin_1 = require("./flowr-analyzer-package-versions-plugin");
5
5
  const semver_1 = require("semver");
6
6
  const package_1 = require("./package");
@@ -10,9 +10,9 @@ const log_1 = require("../../../util/log");
10
10
  const smol_toml_1 = require("smol-toml");
11
11
  const flowr_analyzer_meta_context_1 = require("../../context/flowr-analyzer-meta-context");
12
12
  exports.lockfileLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-package-versions-lockfile-plugin' });
13
- /** The {@link FileRole.VirtualEnv} lockfiles named `name` (e.g. `renv.lock`), collected by role like the DESCRIPTION reader. */
13
+ /** The {@link FileRole.VirtualEnv} lockfiles named `name` (e.g. `renv.lock`), matched case-insensitively like the role is assigned. */
14
14
  function virtualEnvFiles(ctx, name) {
15
- return ctx.files.getFilesByRole(flowr_file_1.FileRole.VirtualEnv).filter(f => (0, built_in_source_1.platformBasename)(f.path()) === name);
15
+ return ctx.files.getFilesByRole(flowr_file_1.FileRole.VirtualEnv).filter(f => (0, built_in_source_1.platformBasename)(f.path()).toLowerCase() === name);
16
16
  }
17
17
  function pin(ctx, name, version) {
18
18
  const range = package_1.Package.parsePkgVersionRange(undefined, version);
@@ -122,4 +122,32 @@ class FlowrAnalyzerPackageVersionsRvPlugin extends flowr_analyzer_package_versio
122
122
  }
123
123
  }
124
124
  exports.FlowrAnalyzerPackageVersionsRvPlugin = FlowrAnalyzerPackageVersionsRvPlugin;
125
+ /** Reads package versions from a `uvr.lock` (TOML). uvr pins are exact, the dev-dependencies among them. */
126
+ class FlowrAnalyzerPackageVersionsUvrPlugin extends flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin {
127
+ name = 'flowr-analyzer-package-versions-uvr-plugin';
128
+ description = 'Extracts package versions from a uvr.lock lockfile.';
129
+ version = new semver_1.SemVer('0.1.0');
130
+ process(ctx) {
131
+ for (const file of virtualEnvFiles(ctx, 'uvr.lock')) {
132
+ let lock;
133
+ try {
134
+ lock = (0, smol_toml_1.parse)(file.content().toString());
135
+ }
136
+ catch (e) {
137
+ exports.lockfileLog.warn(`Could not parse uvr.lock: ${e.message}`);
138
+ continue;
139
+ }
140
+ if (typeof lock.r?.version === 'string') {
141
+ ctx.meta.contribute({ rVersion: lock.r.version }, flowr_analyzer_meta_context_1.MetaPriority.Lockfile);
142
+ }
143
+ for (const pkg of Array.isArray(lock.package) ? lock.package : []) {
144
+ const { name, version } = pkg;
145
+ if (typeof name === 'string' && typeof version === 'string') {
146
+ pin(ctx, name, version);
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
152
+ exports.FlowrAnalyzerPackageVersionsUvrPlugin = FlowrAnalyzerPackageVersionsUvrPlugin;
125
153
  //# sourceMappingURL=flowr-analyzer-package-versions-lockfile-plugin.js.map
@@ -71,12 +71,18 @@ export declare class FlowrAnalyzerPackageVersionsSigDbPlugin extends FlowrAnalyz
71
71
  signatureSources(config?: FlowrConfig): readonly PackageSignatureSource[];
72
72
  loadedDatabases(): SigDbLoadedInfo[];
73
73
  /**
74
- * Packages in the loaded sources (respecting `self`-package exclusion) that export `name`. Backed by a
75
- * reverse index built once per source set, so repeated hint lookups (e.g. from the `undefined-symbol` linter)
76
- * do not re-scan every package. The first call still pays one full pass over the sources.
74
+ * Packages in the loaded sources (respecting `self`-package exclusion) that export `name`, **most downloaded
75
+ * first**, so whoever has to pick one (or show only a few) starts with the package a script most likely means.
76
+ * Backed by a reverse index built once per source set, so repeated hint lookups (e.g. from the
77
+ * `undefined-symbol` linter) do not re-scan every package. The first call still pays one full pass over the
78
+ * sources.
77
79
  */
78
80
  packagesExporting(name: string): readonly string[];
79
- /** one pass over every loaded source building `export name -> packages`, honoring self-package exclusion */
81
+ /**
82
+ * One pass over every loaded source building `export name -> packages`, honoring self-package exclusion.
83
+ * Each list ends up sorted by download count (descending, ties by name), which the sort at the end does
84
+ * once per name rather than at every lookup.
85
+ */
80
86
  private buildExportIndex;
81
87
  /**
82
88
  * The raw sources in priority order: explicit constructor sources, `$FLOWR_SIGDB`, then **every** bundled
@@ -252,9 +252,11 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
252
252
  return this.loadSources().map(describeLoadedDatabase);
253
253
  }
254
254
  /**
255
- * Packages in the loaded sources (respecting `self`-package exclusion) that export `name`. Backed by a
256
- * reverse index built once per source set, so repeated hint lookups (e.g. from the `undefined-symbol` linter)
257
- * do not re-scan every package. The first call still pays one full pass over the sources.
255
+ * Packages in the loaded sources (respecting `self`-package exclusion) that export `name`, **most downloaded
256
+ * first**, so whoever has to pick one (or show only a few) starts with the package a script most likely means.
257
+ * Backed by a reverse index built once per source set, so repeated hint lookups (e.g. from the
258
+ * `undefined-symbol` linter) do not re-scan every package. The first call still pays one full pass over the
259
+ * sources.
258
260
  */
259
261
  packagesExporting(name) {
260
262
  if (!(0, config_1.isSigDbEnabled)(this.analyzerCtx?.config)) {
@@ -263,14 +265,20 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
263
265
  this.exportIndex ??= this.buildExportIndex();
264
266
  return this.exportIndex.get(name) ?? [];
265
267
  }
266
- /** one pass over every loaded source building `export name -> packages`, honoring self-package exclusion */
268
+ /**
269
+ * One pass over every loaded source building `export name -> packages`, honoring self-package exclusion.
270
+ * Each list ends up sorted by download count (descending, ties by name), which the sort at the end does
271
+ * once per name rather than at every lookup.
272
+ */
267
273
  buildExportIndex() {
268
274
  const index = new Map();
275
+ const downloads = new Map();
269
276
  for (const src of this.loadSources()) {
270
277
  for (const pkg of src.packageNames()) {
271
278
  if (this.isSelfPackage(pkg)) {
272
279
  continue;
273
280
  }
281
+ downloads.set(pkg, Math.max(downloads.get(pkg) ?? 0, src.downloads(pkg)));
274
282
  for (const exp of src.lookup(pkg)?.exported ?? []) {
275
283
  const owners = index.get(exp);
276
284
  if (owners === undefined) {
@@ -282,6 +290,11 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
282
290
  }
283
291
  }
284
292
  }
293
+ for (const owners of index.values()) {
294
+ if (owners.length > 1) {
295
+ owners.sort((a, b) => (downloads.get(b) ?? 0) - (downloads.get(a) ?? 0) || a.localeCompare(b));
296
+ }
297
+ }
285
298
  return index;
286
299
  }
287
300
  /**
@@ -2,7 +2,7 @@ import type { FlowrAnalyzerPlugin } from './flowr-analyzer-plugin';
2
2
  import { FlowrAnalyzerDescriptionFilePlugin } from './file-plugins/flowr-analyzer-description-file-plugin';
3
3
  import { FlowrAnalyzerPackageVersionsDescriptionFilePlugin } from './package-version-plugins/flowr-analyzer-package-versions-description-file-plugin';
4
4
  import { FlowrAnalyzerPackageVersionsSigDbPlugin } from './package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin';
5
- import { FlowrAnalyzerPackageVersionsPackratPlugin, FlowrAnalyzerPackageVersionsRenvPlugin, FlowrAnalyzerPackageVersionsRvPlugin } from './package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin';
5
+ import { FlowrAnalyzerPackageVersionsPackratPlugin, FlowrAnalyzerPackageVersionsRenvPlugin, FlowrAnalyzerPackageVersionsRvPlugin, FlowrAnalyzerPackageVersionsUvrPlugin } from './package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin';
6
6
  import { FlowrAnalyzerPackageVersionsSessionInfoPlugin } from './package-version-plugins/flowr-analyzer-package-versions-session-info-plugin';
7
7
  import { FlowrAnalyzerLoadingOrderDescriptionFilePlugin } from './loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin';
8
8
  import { FlowrAnalyzerLoadingOrderImplicitSourcesPlugin } from './loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin';
@@ -18,8 +18,8 @@ import { FlowrAnalyzerMetaTestFilesPlugin } from './file-plugins/flowr-analyzer-
18
18
  import { FlowrAnalyzerMetaInstFilesPlugin } from './file-plugins/flowr-analyzer-inst-file-plugin';
19
19
  import { FlowrAnalyzerLicenseFilePlugin } from './file-plugins/flowr-analyzer-license-file-plugin';
20
20
  import { FlowrAnalyzerVirtualEnvFilePlugin } from './file-plugins/flowr-analyzer-virtualenv-file-plugin';
21
- import { FlowrAnalyzerRProjectFilePlugin } from './file-plugins/flowr-analyzer-rproject-file-plugin';
22
- import { FlowrAnalyzerMetaRProjectFilePlugin } from './package-version-plugins/flowr-analyzer-meta-rproject-file-plugin';
21
+ import { FlowrAnalyzerRProjectFilePlugin, FlowrAnalyzerUvrManifestFilePlugin } from './file-plugins/flowr-analyzer-manifest-file-plugin';
22
+ import { FlowrAnalyzerMetaRProjectFilePlugin, FlowrAnalyzerMetaUvrManifestFilePlugin } from './package-version-plugins/flowr-analyzer-meta-manifest-file-plugin';
23
23
  import { FlowrAnalyzerMetaDescriptionFilePlugin } from './package-version-plugins/flowr-analyzer-meta-description-file-plugin';
24
24
  import { FlowrAnalyzerSweaveFilePlugin } from './file-plugins/notebooks/flowr-analyzer-sweave-file-plugin';
25
25
  import { FlowrAnalyzerGitignoreProjectDiscoveryPlugin, FlowrAnalyzerIgnoreFileProjectDiscoveryPlugin, FlowrAnalyzerRbuildignoreProjectDiscoveryPlugin } from './project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin';
@@ -29,7 +29,7 @@ import { FlowrAnalyzerLoadingOrderRprofilePlugin } from './loading-order-plugins
29
29
  /**
30
30
  * The built-in Flowr Analyzer plugins that are always available.
31
31
  */
32
- export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["versions:sigdb", typeof FlowrAnalyzerPackageVersionsSigDbPlugin], ["versions:renv", typeof FlowrAnalyzerPackageVersionsRenvPlugin], ["versions:rv", typeof FlowrAnalyzerPackageVersionsRvPlugin], ["versions:packrat", typeof FlowrAnalyzerPackageVersionsPackratPlugin], ["versions:session-info", typeof FlowrAnalyzerPackageVersionsSessionInfoPlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["loading-order:implicit-sources", typeof FlowrAnalyzerLoadingOrderImplicitSourcesPlugin], ["loading-order:rprofile", typeof FlowrAnalyzerLoadingOrderRprofilePlugin], ["meta:description", typeof FlowrAnalyzerMetaDescriptionFilePlugin], ["meta:rproject", typeof FlowrAnalyzerMetaRProjectFilePlugin], ["file-roles:vignette", typeof FlowrAnalyzerMetaVignetteFilesPlugin], ["file-roles:test", typeof FlowrAnalyzerMetaTestFilesPlugin], ["file-roles:inst", typeof FlowrAnalyzerMetaInstFilesPlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:rnw", typeof FlowrAnalyzerSweaveFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilesPlugin], ["versions:namespace", typeof FlowrAnalyzerPackageVersionsNamespaceFilePlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin], ["file:rda", typeof FlowrAnalyzerRdaFilePlugin], ["file:license", typeof FlowrAnalyzerLicenseFilePlugin], ["file:virtualenv", typeof FlowrAnalyzerVirtualEnvFilePlugin], ["file:rproject", typeof FlowrAnalyzerRProjectFilePlugin], ["file:rprofile", typeof FlowrAnalyzerRprofileFilePlugin], ["project-discovery:gitignore", typeof FlowrAnalyzerGitignoreProjectDiscoveryPlugin], ["project-discovery:rbuildignore", typeof FlowrAnalyzerRbuildignoreProjectDiscoveryPlugin], ["project-discovery:ignore-files", typeof FlowrAnalyzerIgnoreFileProjectDiscoveryPlugin], ["project-discovery:default", typeof FlowrAnalyzerDefaultProjectDiscoveryPlugin], ["project-discovery:full", typeof FlowrAnalyzerFullProjectDiscoveryPlugin]];
32
+ export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["versions:sigdb", typeof FlowrAnalyzerPackageVersionsSigDbPlugin], ["versions:renv", typeof FlowrAnalyzerPackageVersionsRenvPlugin], ["versions:rv", typeof FlowrAnalyzerPackageVersionsRvPlugin], ["versions:uvr", typeof FlowrAnalyzerPackageVersionsUvrPlugin], ["versions:packrat", typeof FlowrAnalyzerPackageVersionsPackratPlugin], ["versions:session-info", typeof FlowrAnalyzerPackageVersionsSessionInfoPlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["loading-order:implicit-sources", typeof FlowrAnalyzerLoadingOrderImplicitSourcesPlugin], ["loading-order:rprofile", typeof FlowrAnalyzerLoadingOrderRprofilePlugin], ["meta:description", typeof FlowrAnalyzerMetaDescriptionFilePlugin], ["meta:rproject", typeof FlowrAnalyzerMetaRProjectFilePlugin], ["meta:uvr", typeof FlowrAnalyzerMetaUvrManifestFilePlugin], ["file-roles:vignette", typeof FlowrAnalyzerMetaVignetteFilesPlugin], ["file-roles:test", typeof FlowrAnalyzerMetaTestFilesPlugin], ["file-roles:inst", typeof FlowrAnalyzerMetaInstFilesPlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:rnw", typeof FlowrAnalyzerSweaveFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilesPlugin], ["versions:namespace", typeof FlowrAnalyzerPackageVersionsNamespaceFilePlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin], ["file:rda", typeof FlowrAnalyzerRdaFilePlugin], ["file:license", typeof FlowrAnalyzerLicenseFilePlugin], ["file:virtualenv", typeof FlowrAnalyzerVirtualEnvFilePlugin], ["file:rproject", typeof FlowrAnalyzerRProjectFilePlugin], ["file:uvr", typeof FlowrAnalyzerUvrManifestFilePlugin], ["file:rprofile", typeof FlowrAnalyzerRprofileFilePlugin], ["project-discovery:gitignore", typeof FlowrAnalyzerGitignoreProjectDiscoveryPlugin], ["project-discovery:rbuildignore", typeof FlowrAnalyzerRbuildignoreProjectDiscoveryPlugin], ["project-discovery:ignore-files", typeof FlowrAnalyzerIgnoreFileProjectDiscoveryPlugin], ["project-discovery:default", typeof FlowrAnalyzerDefaultProjectDiscoveryPlugin], ["project-discovery:full", typeof FlowrAnalyzerFullProjectDiscoveryPlugin]];
33
33
  export type BuiltInFlowrPluginName = typeof BuiltInPlugins[number][0];
34
34
  export type BuiltInFlowrPluginArgs<N extends BuiltInFlowrPluginName> = N extends typeof BuiltInPlugins[number][0] ? ConstructorParameters<Extract<typeof BuiltInPlugins[number], [N, PluginProducer]>[1]> : never;
35
35
  type PluginProducer = new (...args: never[]) => FlowrAnalyzerPlugin;
@@ -24,8 +24,8 @@ const flowr_analyzer_test_file_plugin_1 = require("./file-plugins/flowr-analyzer
24
24
  const flowr_analyzer_inst_file_plugin_1 = require("./file-plugins/flowr-analyzer-inst-file-plugin");
25
25
  const flowr_analyzer_license_file_plugin_1 = require("./file-plugins/flowr-analyzer-license-file-plugin");
26
26
  const flowr_analyzer_virtualenv_file_plugin_1 = require("./file-plugins/flowr-analyzer-virtualenv-file-plugin");
27
- const flowr_analyzer_rproject_file_plugin_1 = require("./file-plugins/flowr-analyzer-rproject-file-plugin");
28
- const flowr_analyzer_meta_rproject_file_plugin_1 = require("./package-version-plugins/flowr-analyzer-meta-rproject-file-plugin");
27
+ const flowr_analyzer_manifest_file_plugin_1 = require("./file-plugins/flowr-analyzer-manifest-file-plugin");
28
+ const flowr_analyzer_meta_manifest_file_plugin_1 = require("./package-version-plugins/flowr-analyzer-meta-manifest-file-plugin");
29
29
  const flowr_analyzer_meta_description_file_plugin_1 = require("./package-version-plugins/flowr-analyzer-meta-description-file-plugin");
30
30
  const flowr_analyzer_sweave_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-sweave-file-plugin");
31
31
  const flowr_analyzer_ignore_file_project_discovery_plugin_1 = require("./project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin");
@@ -41,13 +41,15 @@ exports.BuiltInPlugins = [
41
41
  ['versions:sigdb', flowr_analyzer_package_versions_sigdb_plugin_1.FlowrAnalyzerPackageVersionsSigDbPlugin],
42
42
  ['versions:renv', flowr_analyzer_package_versions_lockfile_plugin_1.FlowrAnalyzerPackageVersionsRenvPlugin],
43
43
  ['versions:rv', flowr_analyzer_package_versions_lockfile_plugin_1.FlowrAnalyzerPackageVersionsRvPlugin],
44
+ ['versions:uvr', flowr_analyzer_package_versions_lockfile_plugin_1.FlowrAnalyzerPackageVersionsUvrPlugin],
44
45
  ['versions:packrat', flowr_analyzer_package_versions_lockfile_plugin_1.FlowrAnalyzerPackageVersionsPackratPlugin],
45
46
  ['versions:session-info', flowr_analyzer_package_versions_session_info_plugin_1.FlowrAnalyzerPackageVersionsSessionInfoPlugin],
46
47
  ['loading-order:description', flowr_analyzer_loading_order_description_file_plugin_1.FlowrAnalyzerLoadingOrderDescriptionFilePlugin],
47
48
  ['loading-order:implicit-sources', flowr_analyzer_loading_order_implicit_sources_plugin_1.FlowrAnalyzerLoadingOrderImplicitSourcesPlugin],
48
49
  ['loading-order:rprofile', flowr_analyzer_loading_order_rprofile_plugin_1.FlowrAnalyzerLoadingOrderRprofilePlugin],
49
50
  ['meta:description', flowr_analyzer_meta_description_file_plugin_1.FlowrAnalyzerMetaDescriptionFilePlugin],
50
- ['meta:rproject', flowr_analyzer_meta_rproject_file_plugin_1.FlowrAnalyzerMetaRProjectFilePlugin],
51
+ ['meta:rproject', flowr_analyzer_meta_manifest_file_plugin_1.FlowrAnalyzerMetaRProjectFilePlugin],
52
+ ['meta:uvr', flowr_analyzer_meta_manifest_file_plugin_1.FlowrAnalyzerMetaUvrManifestFilePlugin],
51
53
  ['file-roles:vignette', flowr_analyzer_vignette_file_plugin_1.FlowrAnalyzerMetaVignetteFilesPlugin],
52
54
  ['file-roles:test', flowr_analyzer_test_file_plugin_1.FlowrAnalyzerMetaTestFilesPlugin],
53
55
  ['file-roles:inst', flowr_analyzer_inst_file_plugin_1.FlowrAnalyzerMetaInstFilesPlugin],
@@ -61,7 +63,8 @@ exports.BuiltInPlugins = [
61
63
  ['file:rda', flowr_analyzer_rda_file_plugin_1.FlowrAnalyzerRdaFilePlugin],
62
64
  ['file:license', flowr_analyzer_license_file_plugin_1.FlowrAnalyzerLicenseFilePlugin],
63
65
  ['file:virtualenv', flowr_analyzer_virtualenv_file_plugin_1.FlowrAnalyzerVirtualEnvFilePlugin],
64
- ['file:rproject', flowr_analyzer_rproject_file_plugin_1.FlowrAnalyzerRProjectFilePlugin],
66
+ ['file:rproject', flowr_analyzer_manifest_file_plugin_1.FlowrAnalyzerRProjectFilePlugin],
67
+ ['file:uvr', flowr_analyzer_manifest_file_plugin_1.FlowrAnalyzerUvrManifestFilePlugin],
65
68
  ['file:rprofile', flowr_analyzer_rprofile_file_plugin_1.FlowrAnalyzerRprofileFilePlugin],
66
69
  ['project-discovery:gitignore', flowr_analyzer_ignore_file_project_discovery_plugin_1.FlowrAnalyzerGitignoreProjectDiscoveryPlugin],
67
70
  ['project-discovery:rbuildignore', flowr_analyzer_ignore_file_project_discovery_plugin_1.FlowrAnalyzerRbuildignoreProjectDiscoveryPlugin],
@@ -32,7 +32,7 @@ exports.FlowrAnalyzerProjectDiscoveryPlugin = FlowrAnalyzerProjectDiscoveryPlugi
32
32
  // `.Rprofile`/`Rprofile.site` carry no extension but are plain R sources
33
33
  exports.discoverRSourcesRegex = /(\.(r|rmd|ipynb|qmd|rnw)|(^|[\\/])\.?Rprofile(\.site)?)$/i;
34
34
  // matched against the posix path relative to the project root
35
- exports.ignorePathsWith = /(^|\/)(\.git|\.svn|\.hg|node_modules|__pycache__|\.Rproj\.user|Rtmp[^/]*|(packrat|renv|rv)\/(lib|library|src|staging|sandbox|bundles)[^/]*)(\/|$)/i;
35
+ exports.ignorePathsWith = /(^|\/)(\.git|\.svn|\.hg|node_modules|__pycache__|\.Rproj\.user|\.uvr|Rtmp[^/]*|(packrat|renv|rv)\/(lib|library|src|staging|sandbox|bundles)[^/]*)(\/|$)/i;
36
36
  exports.excludeRequestsForPaths = /vignettes?|tests?|revdep|inst|data/i;
37
37
  /**
38
38
  * Turn the walked `files` (absolute paths under `root`) into the discovery result: R sources become
@@ -97,7 +97,7 @@ class FlowrAnalyzerFullProjectDiscoveryPlugin extends FlowrAnalyzerProjectDiscov
97
97
  }
98
98
  exports.FlowrAnalyzerFullProjectDiscoveryPlugin = FlowrAnalyzerFullProjectDiscoveryPlugin;
99
99
  // noise directories pruned from the scoped walk on top of `ignorePathsWith`: build output, checks, rendered docs and packaged data
100
- const noiseDirs = /(^|\/)(\.git|\.svn|\.hg|node_modules|__pycache__|\.Rproj\.user|[^/]*\.Rcheck|(packrat|renv|rv)\/(lib|library|src|staging|sandbox|bundles|cache)[^/]*|build|dist|_build|_site|_book|\.quarto|\.cache|Rtmp[^/]*|man|inst\/(extdata|doc))(\/|$)/i;
100
+ const noiseDirs = /(^|\/)(\.git|\.svn|\.hg|node_modules|__pycache__|\.Rproj\.user|\.uvr|[^/]*\.Rcheck|(packrat|renv|rv)\/(lib|library|src|staging|sandbox|bundles|cache)[^/]*|build|dist|_build|_site|_book|\.quarto|\.cache|Rtmp[^/]*|man|inst\/(extdata|doc))(\/|$)/i;
101
101
  // binary/data blobs, dropped even inside an otherwise kept directory
102
102
  const noiseFiles = /\.(rds|rda|rdata|rd|png|jpe?g|gif|svg|pdf|ico|zip|tar|t?gz|bz2|xz|so|o|a|dll|dylib|exe|jar|woff2?|ttf|eot|feather|parquet|xls[xm]?|docx?|pptx?)$/i;
103
103
  const descriptionFilePattern = /^DESCRIPTION(\.(txt|in))?$/i;
@@ -106,8 +106,8 @@ const metadataFilePatterns = [
106
106
  descriptionFilePattern,
107
107
  /^NAMESPACE(\.txt)?$/i,
108
108
  /^NEWS(\.(rd|md))?$/i,
109
- /^(renv|rv|packrat)\.lock$/i,
110
- /^rproject\.toml$/i,
109
+ /^(renv|rv|uvr|packrat)\.lock$/i,
110
+ /^(rproject|uvr)\.toml$/i,
111
111
  /license(\.md|\.txt)?$/i,
112
112
  flowr_analyzer_rprofile_file_plugin_1.RprofileFilePattern,
113
113
  flowr_analyzer_rprofile_file_plugin_1.RenvironFilePattern