@eagleoutice/flowr 2.17.0 → 2.17.1

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 (67) hide show
  1. package/README.md +8 -8
  2. package/config.d.ts +32 -0
  3. package/config.js +22 -2
  4. package/dataflow/environments/built-in-props.d.ts +16 -2
  5. package/dataflow/environments/built-in-props.js +23 -3
  6. package/dataflow/environments/built-in.js +13 -3
  7. package/dataflow/environments/default-builtin-config.d.ts +268 -7
  8. package/dataflow/environments/default-builtin-config.js +72 -13
  9. package/dataflow/environments/identifier.d.ts +7 -1
  10. package/dataflow/extractor.js +49 -14
  11. package/dataflow/fn/function-semantics.d.ts +1 -0
  12. package/linter/rules/network-functions.js +10 -2
  13. package/linter/rules/unused-import.js +11 -1
  14. package/package.json +1 -1
  15. package/project/cache/flowr-analyzer-cache.d.ts +4 -0
  16. package/project/cache/flowr-analyzer-cache.js +11 -0
  17. package/project/context/flowr-analyzer-dependencies-context.d.ts +3 -0
  18. package/project/context/flowr-analyzer-dependencies-context.js +6 -0
  19. package/project/context/flowr-file.d.ts +2 -2
  20. package/project/context/flowr-file.js +2 -2
  21. package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +39 -4
  22. package/project/plugins/file-plugins/files/flowr-manifest-files.js +134 -30
  23. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -1
  24. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +7 -0
  25. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +14 -1
  26. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +1 -1
  27. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -3
  28. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.d.ts +18 -5
  29. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +43 -15
  30. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +12 -0
  31. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +31 -2
  32. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +58 -0
  33. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +237 -0
  34. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +8 -0
  35. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +8 -0
  36. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +7 -0
  37. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +24 -18
  38. package/project/plugins/plugin-registry.d.ts +5 -4
  39. package/project/plugins/plugin-registry.js +6 -0
  40. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +4 -4
  41. package/project/sigdb/decode.js +13 -3
  42. package/project/sigdb/memory-source.d.ts +6 -4
  43. package/project/sigdb/memory-source.js +6 -5
  44. package/project/sigdb/on-demand/fetch.d.ts +18 -0
  45. package/project/sigdb/on-demand/fetch.js +127 -0
  46. package/project/sigdb/on-demand/package-sources.d.ts +40 -0
  47. package/project/sigdb/on-demand/package-sources.js +263 -0
  48. package/project/sigdb/on-demand/recoverer.d.ts +40 -0
  49. package/project/sigdb/on-demand/recoverer.js +169 -0
  50. package/project/sigdb/on-demand/remote-sources.d.ts +72 -0
  51. package/project/sigdb/on-demand/remote-sources.js +132 -0
  52. package/project/sigdb/on-demand/tar.d.ts +19 -0
  53. package/project/sigdb/on-demand/tar.js +119 -0
  54. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +5 -0
  55. package/queries/catalog/dependencies-query/function-info/derived-functions.js +17 -1
  56. package/queries/catalog/dependencies-query/function-info/read-functions.js +3 -1
  57. package/queries/catalog/dependencies-query/function-info/write-functions.js +11 -1
  58. package/r-bridge/data/data.d.ts +29 -0
  59. package/r-bridge/data/data.js +23 -0
  60. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +4 -0
  61. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +8 -0
  62. package/taint-analysis/predefined/secret-analysis.js +7 -2
  63. package/taint-analysis/taint-mapping.d.ts +5 -2
  64. package/taint-analysis/taint-mapping.js +17 -6
  65. package/util/flowr-version.d.ts +1 -1
  66. package/util/flowr-version.js +2 -2
  67. package/util/r-version.js +4 -2
@@ -4,16 +4,27 @@ exports.TaintRole = exports.TaintMapper = void 0;
4
4
  const identifier_1 = require("../dataflow/environments/identifier");
5
5
  class TaintMapper {
6
6
  mapper = [];
7
+ /** the mappings by the name they map, in the order they were added; a mapping only ever applies to a call of its name */
8
+ byName = new Map();
7
9
  constructor(mapper) {
8
- if (mapper) {
9
- this.mapper = mapper;
10
+ mapper?.forEach(m => this.add(m));
11
+ }
12
+ add(mapping) {
13
+ this.mapper.push(mapping);
14
+ const name = identifier_1.Identifier.getName(mapping.identifier);
15
+ const named = this.byName.get(name);
16
+ if (named === undefined) {
17
+ this.byName.set(name, [mapping]);
18
+ }
19
+ else {
20
+ named.push(mapping);
10
21
  }
11
22
  }
12
23
  /**
13
24
  * Add one or more taint mapping rules to the mapper
14
25
  */
15
26
  pushMapping(mappings) {
16
- this.mapper.push(...this.mapRulesToInternal(mappings));
27
+ this.mapRulesToInternal(mappings).forEach(m => this.add(m));
17
28
  }
18
29
  /**
19
30
  * Add one or more taint mapping rules to the mapper.
@@ -25,14 +36,14 @@ class TaintMapper {
25
36
  if (this.hasMappingForRole(rule)) {
26
37
  continue;
27
38
  }
28
- this.mapper.push(rule);
39
+ this.add(rule);
29
40
  }
30
41
  }
31
42
  /**
32
43
  * Get all mappings belonging to the given identifier
33
44
  */
34
45
  getMappings(identifier) {
35
- return this.mapper.filter(m => TaintMapper.matches(m.identifier, identifier));
46
+ return this.byName.get(identifier_1.Identifier.getName(identifier))?.filter(m => TaintMapper.matches(m.identifier, identifier)) ?? [];
36
47
  }
37
48
  /** Whether a mapped identifier applies to a call of `called`, which matches any namespace when it names none */
38
49
  static matches(mapped, called) {
@@ -42,7 +53,7 @@ class TaintMapper {
42
53
  * Create a new, independent mapper containing the same taint mappings
43
54
  */
44
55
  clone() {
45
- return new TaintMapper([...this.mapper]);
56
+ return new TaintMapper(this.mapper);
46
57
  }
47
58
  hasMappingForRole(rule) {
48
59
  return this.getMappings(rule.identifier).some(i => i.role === rule.role);
@@ -3,7 +3,7 @@
3
3
  * @module
4
4
  */
5
5
  import { SemVer } from 'semver';
6
- export declare const versionDate = "2026-11-03T08:51:21Z";
6
+ export declare const versionDate = "2026-11-03T17:01:03Z";
7
7
  /**
8
8
  * Retrieves the current flowR version as a new {@link SemVer} object.
9
9
  */
@@ -8,9 +8,9 @@ exports.flowrVersion = flowrVersion;
8
8
  */
9
9
  const semver_1 = require("semver");
10
10
  // this is automatically replaced with the current version by release-it
11
- const version = '2.17.0';
11
+ const version = '2.17.1';
12
12
  // this is automatically replaced with the release date by release-it (scripts/bump-version.ts)
13
- exports.versionDate = '2026-11-03T08:51:21Z';
13
+ exports.versionDate = '2026-11-03T17:01:03Z';
14
14
  /**
15
15
  * Retrieves the current flowR version as a new {@link SemVer} object.
16
16
  */
package/util/r-version.js CHANGED
@@ -65,7 +65,8 @@ function normalizeVersions(versions) {
65
65
  parts.push(prefix);
66
66
  }
67
67
  const versionPart = match[1];
68
- parts.push(normalizeVersion(versionPart));
68
+ // keep what separated it from the previous part, else `>= 1.0 < 2.0` would run together
69
+ parts.push(/^\s*/.exec(versionPart)?.[0] + normalizeVersion(versionPart));
69
70
  index = match.index + versionPart.length;
70
71
  }
71
72
  if (index < versions.length) {
@@ -181,7 +182,8 @@ exports.RRange = {
181
182
  }
182
183
  catch { /* try to normalize R range to SemVer */ }
183
184
  try {
184
- return makeRange(normalizeVersions(range), range);
185
+ // a comma joins requirements as semver's space does (`>= 1.0, < 2.0`, as rig and cargo write them)
186
+ return makeRange(normalizeVersions(range.replaceAll(/\s*,\s*/g, ' ')), range);
185
187
  }
186
188
  catch { /* unparseable even after normalization -> report as "no constraint" */ }
187
189
  return undefined;