@eagleoutice/flowr 2.10.7 → 2.10.9

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 (49) hide show
  1. package/README.md +21 -21
  2. package/abstract-interpretation/domains/multi-value-state-domain.d.ts +4 -10
  3. package/abstract-interpretation/domains/multi-value-state-domain.js +1 -6
  4. package/abstract-interpretation/domains/partial-product-domain.d.ts +6 -2
  5. package/abstract-interpretation/domains/partial-product-domain.js +7 -3
  6. package/config.d.ts +10 -0
  7. package/config.js +6 -2
  8. package/control-flow/extract-cfg.js +9 -3
  9. package/dataflow/extractor.js +10 -1
  10. package/dataflow/graph/graph.js +6 -2
  11. package/dataflow/info.js +3 -1
  12. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -1
  13. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +20 -0
  14. package/documentation/wiki-linting-and-testing.js +1 -1
  15. package/documentation/wiki-mk/doc-context.d.ts +21 -1
  16. package/documentation/wiki-mk/doc-context.js +9 -0
  17. package/documentation/wiki-search.js +13 -2
  18. package/linter/linter-rules.d.ts +4 -2
  19. package/linter/rules/absolute-path.d.ts +3 -0
  20. package/linter/rules/absolute-path.js +37 -12
  21. package/linter/rules/file-path-validity.d.ts +9 -2
  22. package/linter/rules/file-path-validity.js +83 -36
  23. package/linter/rules/problematic-inputs.js +4 -1
  24. package/package.json +4 -3
  25. package/queries/catalog/dependencies-query/function-info/read-functions.js +21 -1
  26. package/queries/catalog/dependencies-query/function-info/write-functions.js +18 -1
  27. package/queries/catalog/input-sources-query/input-source-functions.d.ts +3 -1
  28. package/queries/catalog/input-sources-query/input-source-functions.js +322 -46
  29. package/queries/catalog/input-sources-query/input-sources-query-executor.js +14 -9
  30. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +4 -2
  31. package/queries/catalog/input-sources-query/input-sources-query-format.js +8 -4
  32. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +13 -6
  33. package/queries/catalog/input-sources-query/simple-input-classifier.js +33 -8
  34. package/queries/catalog/linter-query/linter-query-format.d.ts +2 -2
  35. package/queries/catalog/linter-query/linter-query-format.js +9 -3
  36. package/queries/query.d.ts +3 -2
  37. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +10 -1
  38. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +10 -2
  39. package/search/flowr-search-builder.d.ts +50 -16
  40. package/search/flowr-search-builder.js +33 -17
  41. package/search/flowr-search-filters.d.ts +10 -1
  42. package/search/flowr-search-filters.js +10 -0
  43. package/search/flowr-search.d.ts +8 -3
  44. package/search/search-executor/search-generators.d.ts +2 -0
  45. package/search/search-executor/search-generators.js +2 -2
  46. package/util/objects.js +3 -1
  47. package/util/text/strings.d.ts +7 -0
  48. package/util/text/strings.js +23 -0
  49. package/util/version.js +1 -1
@@ -69,6 +69,19 @@ const PathFunctions = new Map([
69
69
  return results;
70
70
  }]
71
71
  ]);
72
+ /**
73
+ * Resolve a raw string value to the path that should be checked for absoluteness.
74
+ * - `file://` URIs: extract the local path (always checked, ignoreUrls has no effect)
75
+ * - remote URLs (http/s3/...): `undefined` when ignoreUrls is true (skip)
76
+ * - everything else: the value itself
77
+ */
78
+ function resolvePathForAbsoluteCheck(value, ignoreUrls) {
79
+ const local = (0, strings_1.fileUrlToPath)(value);
80
+ if (local !== undefined) {
81
+ return local;
82
+ }
83
+ return ignoreUrls && (0, strings_1.isUrl)(value) ? undefined : value;
84
+ }
72
85
  exports.ABSOLUTE_PATH = {
73
86
  /* this can be done better once we have types */
74
87
  createSearch: (config) => {
@@ -103,12 +116,13 @@ exports.ABSOLUTE_PATH = {
103
116
  const node = element.node;
104
117
  const wd = inferWd(node.info.file, config.useAsWd);
105
118
  if (r_string_1.RString.is(node)) {
106
- if (node.content.str.length >= 3 && (0, strings_1.isAbsolutePath)(node.content.str, regex)) {
119
+ const resolved = resolvePathForAbsoluteCheck(node.content.str, config.ignoreUrls);
120
+ if (resolved !== undefined && resolved.length >= 3 && (0, strings_1.isAbsolutePath)(resolved, regex)) {
107
121
  return [{
108
122
  certainty: linter_format_1.LintingResultCertainty.Uncertain,
109
- filePath: node.content.str,
123
+ filePath: resolved,
110
124
  loc: range_1.SourceLocation.fromNode(node) ?? range_1.SourceLocation.invalid(),
111
- quickFix: buildQuickFix(node, node.content.str, wd)
125
+ quickFix: buildQuickFix(node, resolved, wd)
112
126
  }];
113
127
  }
114
128
  else {
@@ -117,14 +131,21 @@ exports.ABSOLUTE_PATH = {
117
131
  }
118
132
  else if ((0, search_enrichers_1.enrichmentContent)(element, search_enrichers_1.Enrichment.QueryData)) {
119
133
  const result = queryResults[(0, search_enrichers_1.enrichmentContent)(element, search_enrichers_1.Enrichment.QueryData).query];
120
- const mappedStrings = result.read.filter(r => r.value !== undefined && r.value !== dependencies_query_format_1.Unknown && (0, strings_1.isAbsolutePath)(r.value, regex)).map(r => {
134
+ const mappedStrings = result.read.flatMap(r => {
135
+ if (r.value === undefined || r.value === dependencies_query_format_1.Unknown) {
136
+ return [];
137
+ }
138
+ const resolved = resolvePathForAbsoluteCheck(r.value, config.ignoreUrls);
139
+ if (resolved === undefined || !(0, strings_1.isAbsolutePath)(resolved, regex)) {
140
+ return [];
141
+ }
121
142
  const elem = data.normalize.idMap.get(r.nodeId);
122
- return {
123
- certainty: linter_format_1.LintingResultCertainty.Certain,
124
- filePath: r.value,
125
- loc: elem ? range_1.SourceLocation.fromNode(elem) ?? range_1.SourceLocation.invalid() : range_1.SourceLocation.invalid(),
126
- quickFix: buildQuickFix(elem, r.value, wd)
127
- };
143
+ return [{
144
+ certainty: linter_format_1.LintingResultCertainty.Certain,
145
+ filePath: resolved,
146
+ loc: elem ? range_1.SourceLocation.fromNode(elem) ?? range_1.SourceLocation.invalid() : range_1.SourceLocation.invalid(),
147
+ quickFix: buildQuickFix(elem, resolved, wd)
148
+ }];
128
149
  });
129
150
  if (mappedStrings.length > 0) {
130
151
  return mappedStrings;
@@ -140,7 +161,10 @@ exports.ABSOLUTE_PATH = {
140
161
  const handler = dfNode.name ? PathFunctions.get(dfNode.name) : undefined;
141
162
  const strings = handler ? handler(data.dataflow.graph, dfNode, data.analyzer.inspectContext()) : [];
142
163
  if (strings) {
143
- return strings.filter(s => (0, strings_1.isAbsolutePath)(s, regex)).map(str => ({
164
+ return strings.flatMap(s => {
165
+ const resolved = resolvePathForAbsoluteCheck(s, config.ignoreUrls);
166
+ return resolved !== undefined && (0, strings_1.isAbsolutePath)(resolved, regex) ? [resolved] : [];
167
+ }).map(str => ({
144
168
  certainty: linter_format_1.LintingResultCertainty.Uncertain,
145
169
  filePath: str,
146
170
  loc: range_1.SourceLocation.fromNode(element.node) ?? range_1.SourceLocation.invalid(),
@@ -173,7 +197,8 @@ exports.ABSOLUTE_PATH = {
173
197
  },
174
198
  additionalPathFunctions: [],
175
199
  absolutePathRegex: undefined,
176
- useAsWd: '@script'
200
+ useAsWd: '@script',
201
+ ignoreUrls: true
177
202
  }
178
203
  }
179
204
  };
@@ -20,6 +20,12 @@ export interface FilePathValidityConfig extends MergeableRecord {
20
20
  * Whether unknown file paths should be included as linting results.
21
21
  */
22
22
  includeUnknown: boolean;
23
+ /**
24
+ * Whether URLs should be validated by checking the endpoint exists.
25
+ * When `false` (default), URLs are silently ignored.
26
+ * When `true`, an HTTP HEAD request is made and the URL is reported if unreachable.
27
+ */
28
+ checkUrls: boolean;
23
29
  }
24
30
  export interface FilePathValidityMetadata extends MergeableRecord {
25
31
  totalReads: number;
@@ -34,10 +40,10 @@ export declare const FILE_PATH_VALIDITY: {
34
40
  dataflow: import("../../dataflow/info").DataflowInformation;
35
41
  cfg: import("../../control-flow/control-flow-graph").ControlFlowInformation;
36
42
  analyzer: import("../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider;
37
- }) => {
43
+ }) => Promise<{
38
44
  results: FilePathValidityResult[];
39
45
  ".meta": FilePathValidityMetadata;
40
- };
46
+ }>;
41
47
  readonly info: {
42
48
  readonly name: "File Path Validity";
43
49
  readonly description: "Checks whether file paths used in read and write operations are valid and point to existing files.";
@@ -47,6 +53,7 @@ export declare const FILE_PATH_VALIDITY: {
47
53
  readonly additionalReadFunctions: readonly [];
48
54
  readonly additionalWriteFunctions: readonly [];
49
55
  readonly includeUnknown: false;
56
+ readonly checkUrls: false;
50
57
  };
51
58
  };
52
59
  readonly prettyPrint: {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FILE_PATH_VALIDITY = void 0;
4
4
  const linter_format_1 = require("../linter-format");
5
+ const strings_1 = require("../../util/text/strings");
5
6
  const flowr_search_builder_1 = require("../../search/flowr-search-builder");
6
7
  const range_1 = require("../../util/range");
7
8
  const dependencies_query_format_1 = require("../../queries/catalog/dependencies-query/dependencies-query-format");
@@ -10,6 +11,15 @@ const logic_1 = require("../../util/logic");
10
11
  const happens_before_1 = require("../../control-flow/happens-before");
11
12
  const linter_tags_1 = require("../linter-tags");
12
13
  const search_enrichers_1 = require("../../search/search-executor/search-enrichers");
14
+ async function urlExists(url) {
15
+ try {
16
+ const response = await fetch(url, { method: 'HEAD' });
17
+ return response.ok;
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ }
13
23
  exports.FILE_PATH_VALIDITY = {
14
24
  createSearch: (config) => flowr_search_builder_1.Q.fromQuery({
15
25
  type: 'dependencies',
@@ -17,7 +27,7 @@ exports.FILE_PATH_VALIDITY = {
17
27
  readFunctions: config.additionalReadFunctions,
18
28
  writeFunctions: config.additionalWriteFunctions
19
29
  }).with(search_enrichers_1.Enrichment.CfgInformation),
20
- processSearchResult: (elements, config, data) => {
30
+ processSearchResult: async (elements, config, data) => {
21
31
  const cfg = elements.enrichmentContent(search_enrichers_1.Enrichment.CfgInformation).cfg.graph;
22
32
  const metadata = {
23
33
  totalReads: 0,
@@ -26,41 +36,35 @@ exports.FILE_PATH_VALIDITY = {
26
36
  totalValid: 0
27
37
  };
28
38
  const results = elements.enrichmentContent(search_enrichers_1.Enrichment.QueryData).queries['dependencies'];
29
- return {
30
- results: elements.getElements().flatMap(element => {
31
- const matchingRead = results.read.find(r => r.nodeId === element.node.info.id);
32
- if (!matchingRead) {
33
- return [];
39
+ const findings = await Promise.all(elements.getElements().map(async (element) => {
40
+ const matchingRead = results.read.find(r => r.nodeId === element.node.info.id);
41
+ if (!matchingRead) {
42
+ return [];
43
+ }
44
+ metadata.totalReads++;
45
+ const loc = range_1.SourceLocation.fromNode(element.node);
46
+ if (!loc) {
47
+ return [];
48
+ }
49
+ // check if we can't parse the file path statically
50
+ if (matchingRead.value === dependencies_query_format_1.Unknown) {
51
+ metadata.totalUnknown++;
52
+ if (config.includeUnknown) {
53
+ return [{
54
+ involvedId: matchingRead.nodeId,
55
+ loc,
56
+ filePath: dependencies_query_format_1.Unknown,
57
+ certainty: linter_format_1.LintingResultCertainty.Uncertain
58
+ }];
34
59
  }
35
- metadata.totalReads++;
36
- const loc = range_1.SourceLocation.fromNode(element.node);
37
- if (!loc) {
60
+ else {
38
61
  return [];
39
62
  }
40
- // check if we can't parse the file path statically
41
- if (matchingRead.value === dependencies_query_format_1.Unknown) {
42
- metadata.totalUnknown++;
43
- if (config.includeUnknown) {
44
- return [{
45
- involvedId: matchingRead.nodeId,
46
- loc,
47
- filePath: dependencies_query_format_1.Unknown,
48
- certainty: linter_format_1.LintingResultCertainty.Uncertain
49
- }];
50
- }
51
- else {
52
- return [];
53
- }
54
- }
55
- // check if any write to the same file happens before the read, and exclude this case if so
56
- const writesToFile = results.write.filter(r => samePath(r.value, matchingRead.value, data.analyzer.flowrConfig.solver.resolveSource?.ignoreCapitalization));
57
- const writesBefore = writesToFile.map(w => (0, happens_before_1.happensBefore)(cfg, w.nodeId, element.node.info.id));
58
- if (writesBefore.some(w => w === logic_1.Ternary.Always)) {
59
- metadata.totalWritesBeforeAlways++;
60
- return [];
61
- }
62
- // check if the file exists!
63
- const paths = (0, built_in_source_1.findSource)(data.analyzer.flowrConfig.solver.resolveSource, matchingRead.value, {
63
+ }
64
+ // file:// URIs are local paths; resolve and check existence directly
65
+ const localFromFileUrl = (0, strings_1.fileUrlToPath)(matchingRead.value);
66
+ if (localFromFileUrl !== undefined) {
67
+ const paths = (0, built_in_source_1.findSource)(data.analyzer.flowrConfig.solver.resolveSource, localFromFileUrl, {
64
68
  referenceChain: element.node.info.file ? [element.node.info.file] : [],
65
69
  ctx: data.analyzer.inspectContext()
66
70
  });
@@ -68,13 +72,55 @@ exports.FILE_PATH_VALIDITY = {
68
72
  metadata.totalValid++;
69
73
  return [];
70
74
  }
75
+ return [{
76
+ involvedId: matchingRead.nodeId,
77
+ loc,
78
+ filePath: localFromFileUrl,
79
+ certainty: linter_format_1.LintingResultCertainty.Certain
80
+ }];
81
+ }
82
+ // handle remote URLs separately from file paths
83
+ if ((0, strings_1.isUrl)(matchingRead.value)) {
84
+ if (!config.checkUrls) {
85
+ return [];
86
+ }
87
+ const exists = await urlExists(matchingRead.value);
88
+ if (exists) {
89
+ metadata.totalValid++;
90
+ return [];
91
+ }
71
92
  return [{
72
93
  involvedId: matchingRead.nodeId,
73
94
  loc,
74
95
  filePath: matchingRead.value,
75
- certainty: writesBefore && writesBefore.length && writesBefore.every(w => w === logic_1.Ternary.Maybe) ? linter_format_1.LintingResultCertainty.Uncertain : linter_format_1.LintingResultCertainty.Certain
96
+ certainty: linter_format_1.LintingResultCertainty.Uncertain
76
97
  }];
77
- }),
98
+ }
99
+ // check if any write to the same file happens before the read, and exclude this case if so
100
+ const writesToFile = results.write.filter(r => samePath(r.value, matchingRead.value, data.analyzer.flowrConfig.solver.resolveSource?.ignoreCapitalization));
101
+ const writesBefore = writesToFile.map(w => (0, happens_before_1.happensBefore)(cfg, w.nodeId, element.node.info.id));
102
+ if (writesBefore.some(w => w === logic_1.Ternary.Always)) {
103
+ metadata.totalWritesBeforeAlways++;
104
+ return [];
105
+ }
106
+ // check if the file exists!
107
+ const paths = (0, built_in_source_1.findSource)(data.analyzer.flowrConfig.solver.resolveSource, matchingRead.value, {
108
+ referenceChain: element.node.info.file ? [element.node.info.file] : [],
109
+ ctx: data.analyzer.inspectContext()
110
+ });
111
+ if (paths && paths.length) {
112
+ metadata.totalValid++;
113
+ return [];
114
+ }
115
+ return [{
116
+ involvedId: matchingRead.nodeId,
117
+ loc,
118
+ filePath: matchingRead.value,
119
+ certainty: writesBefore && writesBefore.length && writesBefore.every(w => w === logic_1.Ternary.Maybe) ? linter_format_1.LintingResultCertainty.Uncertain : linter_format_1.LintingResultCertainty.Certain
120
+ }];
121
+ }));
122
+ return {
123
+ results: findings.flat(),
78
124
  '.meta': metadata
79
125
  };
80
126
  },
@@ -87,7 +133,8 @@ exports.FILE_PATH_VALIDITY = {
87
133
  defaultConfig: {
88
134
  additionalReadFunctions: [],
89
135
  additionalWriteFunctions: [],
90
- includeUnknown: false
136
+ includeUnknown: false,
137
+ checkUrls: false
91
138
  }
92
139
  },
93
140
  prettyPrint: {
@@ -84,7 +84,10 @@ function checkPipeInjection(nid, loc, name, sources) {
84
84
  exports.PROBLEMATIC_INPUTS = {
85
85
  createSearch: config => {
86
86
  const toQ = (name, subkind) => ({ type: 'call-context', callName: name, callNameExact: false, subkind });
87
- return flowr_search_builder_1.Q.fromQuery(...normalizePatternList(config?.consider, defaultConsider).map((n, i) => toQ(n, `fn-${i}`)), ...normalizePipeSpecs(config?.pipeCommandFunctions).map((s, i) => toQ(s.pattern, `pipe-${i}`)));
87
+ return flowr_search_builder_1.Q.fromQuery([
88
+ ...normalizePatternList(config?.consider, defaultConsider).map((n, i) => toQ(n, `fn-${i}`)),
89
+ ...normalizePipeSpecs(config?.pipeCommandFunctions).map((s, i) => toQ(s.pattern, `pipe-${i}`))
90
+ ]);
88
91
  },
89
92
  processSearchResult: async (elements, config, data) => {
90
93
  const results = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "2.10.7",
3
+ "version": "2.10.9",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "repository": {
@@ -41,11 +41,12 @@
41
41
  "test:system": "vitest --dir test/system-tests --config test/system-tests/vitest.config.mts",
42
42
  "test:coverage": "npm run test -- --coverage",
43
43
  "test:full": "npm run test-full",
44
+ "test:bench": "vitest bench --config test/vitest.config.mts",
44
45
  "test-full": "npm run test:coverage -- --no-watch -- --make-summary --test-installation",
45
46
  "performance-test": "func() { cd test/performance/ && bash run-all-suites.sh $1 $2 $3 $4; cd ../../; }; func",
46
47
  "test:performance": "npm run performance-test --",
47
48
  "detect-circular-deps": "npx madge --extensions ts,tsx --circular src/",
48
- "checkup": "npm run flowr -- --execute \":version\" && npm run lint && npm run test-full -- --allowOnly=false && npm run test:system -- --no-watch && docker build -t test-flowr -f scripts/Dockerfile . && npm run doc && npm run gen:readme && npm-run-all wiki:*"
49
+ "checkup": "npm run flowr -- --execute \":version\" && npm run lint && npm run test-full -- --allowOnly=false && npm run test:system -- --no-watch && docker build -t test-flowr -f scripts/Dockerfile . && npm run doc && npm run wiki"
49
50
  },
50
51
  "keywords": [
51
52
  "static code analysis",
@@ -184,7 +185,7 @@
184
185
  "@types/ws": "^8.18.1",
185
186
  "@typescript-eslint/eslint-plugin": "^8.40.0",
186
187
  "@vitest/coverage-v8": "^4.1.8",
187
- "esbuild": "^0.27.2",
188
+ "esbuild": "^0.28.1",
188
189
  "eslint": "^9.39.2",
189
190
  "license-checker-rseidelsohn": "^4.4.2",
190
191
  "npm-run-all": "^4.1.5",
@@ -115,6 +115,26 @@ exports.ReadFunctions = [
115
115
  { package: 'readODS', name: 'read_ods', argIdx: 0, argName: 'path', resolveValue: true },
116
116
  { package: 'vroom', name: 'vroom', argIdx: 0, argName: 'file', resolveValue: true },
117
117
  { package: 'compiler', name: 'loadcmp', argIdx: 0, argName: 'file', resolveValue: true },
118
- { package: 'compiler', name: 'cmpfile', argIdx: 0, argName: 'infile', resolveValue: true }
118
+ { package: 'compiler', name: 'cmpfile', argIdx: 0, argName: 'infile', resolveValue: true },
119
+ /* image / raster */
120
+ { package: 'jpeg', name: 'readJPEG', argIdx: 0, argName: 'source', resolveValue: true },
121
+ { package: 'png', name: 'readPNG', argIdx: 0, argName: 'source', resolveValue: true },
122
+ { package: 'tiff', name: 'readTIFF', argIdx: 0, argName: 'source', resolveValue: true },
123
+ { package: 'imager', name: 'load.image', argIdx: 0, argName: 'file', resolveValue: true },
124
+ { package: 'imager', name: 'load.video', argIdx: 0, argName: 'file', resolveValue: true },
125
+ { package: 'imager', name: 'load.dir', argIdx: 0, argName: 'path', resolveValue: true },
126
+ { package: 'OpenImageR', name: 'readImage', argIdx: 0, argName: 'path', resolveValue: true },
127
+ { package: 'EBImage', name: 'readImage', argIdx: 0, argName: 'files', resolveValue: true },
128
+ /* audio / video */
129
+ { package: 'av', name: 'av_video_images', argIdx: 0, argName: 'video', resolveValue: true },
130
+ { package: 'av', name: 'read_audio_bin', argIdx: 0, argName: 'audio', resolveValue: true },
131
+ { package: 'av', name: 'read_audio_fft', argIdx: 0, argName: 'audio', resolveValue: true },
132
+ { package: 'tuneR', name: 'readWave', argIdx: 0, argName: 'filename', resolveValue: true },
133
+ { package: 'tuneR', name: 'readMP3', argIdx: 0, argName: 'file', resolveValue: true },
134
+ { package: 'tuneR', name: 'readMidi', argIdx: 0, argName: 'file', resolveValue: true },
135
+ { package: 'seewave', name: 'read.audacity', argIdx: 0, argName: 'file', resolveValue: true },
136
+ { package: 'audio', name: 'load.wave', argIdx: 0, argName: 'where', resolveValue: true },
137
+ /* shinyjs - loads an external JavaScript file */
138
+ { package: 'shinyjs', name: 'extendShinyjs', argIdx: 0, argName: 'script', resolveValue: true, ignoreIf: 'arg-missing' }
119
139
  ];
120
140
  //# sourceMappingURL=read-functions.js.map
@@ -123,6 +123,23 @@ exports.WriteFunctions = [
123
123
  { package: 'rio', name: 'export', argIdx: 1, argName: 'file', resolveValue: true },
124
124
  { package: 'rio', name: 'export_list', argIdx: 1, argName: 'file', resolveValue: true },
125
125
  { package: 'magick', name: 'image_write', argIdx: 1, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
126
- { package: 'compiler', name: 'cmpfile', argIdx: 1, argName: 'outfile', resolveValue: true }
126
+ { package: 'compiler', name: 'cmpfile', argIdx: 1, argName: 'outfile', resolveValue: true },
127
+ /* image / raster */
128
+ { package: 'jpeg', name: 'writeJPEG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
129
+ { package: 'png', name: 'writePNG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
130
+ { package: 'tiff', name: 'writeTIFF', argIdx: 1, argName: 'where', resolveValue: true },
131
+ { package: 'imager', name: 'make.video', argIdx: 1, argName: 'file', resolveValue: true },
132
+ { package: 'OpenImageR', name: 'writeImage', argIdx: 1, argName: 'file_name', resolveValue: true },
133
+ { package: 'EBImage', name: 'writeImage', argIdx: 1, argName: 'files', resolveValue: true },
134
+ { package: 'gifski', name: 'gifski', argIdx: 1, argName: 'gif_file', resolveValue: true },
135
+ { package: 'gifski', name: 'save_gif', argIdx: 1, argName: 'gif_file', resolveValue: true },
136
+ { package: 'svglite', name: 'svglite', argIdx: 0, argName: 'file', resolveValue: true },
137
+ /* audio / video */
138
+ { package: 'av', name: 'av_encode_video', argIdx: 1, argName: 'output', resolveValue: true },
139
+ { package: 'av', name: 'av_audio_convert', argIdx: 1, argName: 'output', resolveValue: true },
140
+ { package: 'av', name: 'av_capture_graphics', argIdx: 1, argName: 'output', resolveValue: true },
141
+ { package: 'tuneR', name: 'writeWave', argIdx: 1, argName: 'filename', resolveValue: true },
142
+ { package: 'seewave', name: 'savewav', argName: 'filename', resolveValue: true, defaultValue: '<wave-name>' },
143
+ { package: 'audio', name: 'save.wave', argIdx: 1, argName: 'where', resolveValue: true }
127
144
  ];
128
145
  //# sourceMappingURL=write-functions.js.map
@@ -1,7 +1,9 @@
1
- import type { Identifier } from '../../../dataflow/environments/identifier';
1
+ import { Identifier } from '../../../dataflow/environments/identifier';
2
2
  export declare const PureFunctions: Identifier[];
3
3
  export declare const SystemFunctions: Identifier[];
4
4
  export declare const FfiFunctions: Identifier[];
5
5
  export declare const LangFunctions: Identifier[];
6
6
  export declare const OptionsFunctions: Identifier[];
7
7
  export declare const UserFunctions: Identifier[];
8
+ /** R functions that produce temporary file/directory paths (sub-type of {@link InputType.File}). */
9
+ export declare const TempFileFunctions: Identifier[];