@eagleoutice/flowr 2.17.3 → 2.17.4

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 (97) hide show
  1. package/README.md +9 -9
  2. package/cli/repl/commands/repl-signature.d.ts +1 -1
  3. package/cli/repl/completion.d.ts +23 -0
  4. package/cli/repl/completion.js +9 -0
  5. package/cli/repl/core.d.ts +0 -23
  6. package/cli/repl/core.js +0 -5
  7. package/cli/repl/parser/slice-query-parser.d.ts +1 -1
  8. package/cli/repl/parser/slice-query-parser.js +3 -3
  9. package/dataflow/environments/built-in-props.d.ts +8 -1
  10. package/dataflow/environments/built-in-props.js +9 -1
  11. package/dataflow/environments/built-in.d.ts +5 -3
  12. package/dataflow/environments/built-in.js +5 -4
  13. package/dataflow/environments/default-builtin-config.d.ts +21 -3
  14. package/dataflow/environments/default-builtin-config.js +49 -47
  15. package/dataflow/eval/resolve/resolve-argument.js +11 -6
  16. package/dataflow/eval/resolve/resolve-numbers.d.ts +1 -178
  17. package/dataflow/eval/resolve/resolve-numbers.js +2 -13
  18. package/dataflow/eval/resolve/resolve-strings.d.ts +1 -93
  19. package/dataflow/eval/resolve/resolve-strings.js +2 -17
  20. package/dataflow/eval/resolve/resolve-working-directory.js +3 -4
  21. package/dataflow/extractor.js +44 -26
  22. package/dataflow/graph/df-helper.d.ts +2 -1
  23. package/dataflow/graph/df-helper.js +2 -1
  24. package/dataflow/internal/linker.js +2 -1
  25. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +8 -0
  26. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +44 -7
  27. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +3 -2
  28. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -1
  29. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +0 -9
  30. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -21
  31. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +3 -3
  32. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +2 -1
  33. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +13 -3
  34. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +15 -5
  35. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +1 -24
  36. package/dataflow/internal/process/functions/call/known-call-handling.js +8 -34
  37. package/dataflow/internal/process/functions/call/nse-kind.d.ts +24 -0
  38. package/dataflow/internal/process/functions/call/nse-kind.js +30 -0
  39. package/documentation/wiki-query.js +3 -2
  40. package/linter/rules/absolute-path.js +5 -5
  41. package/linter/rules/cmd-check/dependency-declaration.js +2 -2
  42. package/linter/rules/cmd-check/package-runtime.js +2 -2
  43. package/linter/rules/deprecated-functions.js +2 -2
  44. package/linter/rules/file-path-validity.js +5 -5
  45. package/linter/rules/function-finder-util.js +2 -2
  46. package/linter/rules/overwritten-file.js +2 -4
  47. package/linter/rules/secret-exfiltration.d.ts +3 -2
  48. package/linter/rules/secret-exfiltration.js +8 -3
  49. package/linter/rules/unused-import.js +20 -6
  50. package/package.json +1 -1
  51. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +0 -6
  52. package/project/cache/flowr-analyzer-controlflow-cache.js +7 -27
  53. package/project/context/flowr-analyzer-context.d.ts +2 -2
  54. package/project/context/flowr-analyzer-context.js +2 -2
  55. package/project/context/flowr-analyzer-files-context.d.ts +8 -0
  56. package/project/context/flowr-analyzer-files-context.js +51 -6
  57. package/project/flowr-analyzer.d.ts +0 -9
  58. package/project/flowr-analyzer.js +7 -28
  59. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +0 -3
  60. package/project/plugins/file-plugins/files/flowr-namespace-file.js +57 -163
  61. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -3
  62. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -3
  63. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -3
  64. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -2
  65. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -2
  66. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +0 -1
  67. package/project/plugins/package-version-plugins/package.js +1 -1
  68. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -3
  69. package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
  70. package/queries/catalog/config-query/config-query-format.d.ts +1 -1
  71. package/queries/catalog/config-query/config-query-format.js +4 -4
  72. package/queries/catalog/dependencies-query/dependencies-query-executor.js +6 -5
  73. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -4
  74. package/queries/catalog/dependencies-query/dependencies-query-format.js +11 -11
  75. package/queries/catalog/dependencies-query/dependency-values.d.ts +9 -0
  76. package/queries/catalog/dependencies-query/dependency-values.js +13 -0
  77. package/queries/catalog/dependencies-query/function-info/remote-functions.js +2 -2
  78. package/queries/catalog/dependencies-query/function-info/write-functions.js +8 -7
  79. package/queries/catalog/dependencies-query/implicit-echo.js +2 -1
  80. package/queries/catalog/dependencies-query/plot-description.d.ts +1 -1
  81. package/queries/catalog/dependencies-query/plot-description.js +2 -2
  82. package/queries/catalog/dice-query/dice-query-format.d.ts +1 -1
  83. package/queries/catalog/files-query/files-query-format.d.ts +1 -1
  84. package/queries/catalog/linter-query/linter-query-format.d.ts +2 -2
  85. package/queries/catalog/linter-query/linter-query-format.js +13 -9
  86. package/queries/catalog/signature-query/signature-query-executor.d.ts +1 -1
  87. package/queries/catalog/taint-query/taint-query-format.d.ts +1 -1
  88. package/queries/query-function-filter.d.ts +1 -1
  89. package/queries/query.d.ts +2 -2
  90. package/r-bridge/init.js +1 -1
  91. package/search/flowr-search-filters.js +2 -2
  92. package/search/search-executor/search-generators.d.ts +0 -1
  93. package/search/search-executor/search-generators.js +5 -6
  94. package/search/search-logger.d.ts +1 -0
  95. package/search/search-logger.js +6 -0
  96. package/util/flowr-version.d.ts +1 -1
  97. package/util/flowr-version.js +2 -2
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DependenciesQueryDefinition = exports.defaultDependencyCategories = exports.DefaultDependencyCategoryNames = exports.Attached = exports.Constant = exports.Unknown = void 0;
6
+ exports.DependenciesQueryDefinition = exports.defaultDependencyCategories = exports.DefaultDependencyCategoryNames = exports.Attached = exports.Unknown = exports.Constant = void 0;
7
7
  exports.getAllCategories = getAllCategories;
8
8
  exports.getAllCategoryNames = getAllCategoryNames;
9
9
  const base_query_format_1 = require("../../base-query-format");
@@ -37,10 +37,10 @@ const implicit_echo_1 = require("./implicit-echo");
37
37
  const arrays_1 = require("../../../util/collections/arrays");
38
38
  const defaultmap_1 = require("../../../util/collections/defaultmap");
39
39
  const range_1 = require("../../../util/range");
40
- /** The value could not be resolved, e.g. a path assembled at runtime. Such a dependency may be missing or fetchable. */
41
- exports.Unknown = 'unknown';
42
- /** The value resolved, but to data given inline rather than to a path (`matrix(0, 2, 2)`, `data.frame(a = 1)`). */
43
- exports.Constant = 'constant';
40
+ const dependency_values_1 = require("./dependency-values");
41
+ var dependency_values_2 = require("./dependency-values");
42
+ Object.defineProperty(exports, "Constant", { enumerable: true, get: function () { return dependency_values_2.Constant; } });
43
+ Object.defineProperty(exports, "Unknown", { enumerable: true, get: function () { return dependency_values_2.Unknown; } });
44
44
  /** {@link DependencyInfo#functionName} for an assumed base package: nothing in the code names it, so there is no call to report as `functionName`. */
45
45
  exports.Attached = '<attached>';
46
46
  /** the built-in categories; what each searches for is derived per configuration, see {@link defaultDependencyCategories} */
@@ -135,7 +135,7 @@ const dependencyCategoriesOf = (env) => ({
135
135
  'library': {
136
136
  queryDisplayName: 'Libraries',
137
137
  functions: library_functions_1.LibraryFunctions,
138
- defaultValue: exports.Unknown,
138
+ defaultValue: dependency_values_1.Unknown,
139
139
  /* for libraries, we have to additionally track all uses of `::` and `:::`, for this we currently simply traverse all uses */
140
140
  additionalAnalysis: async (data, ignoreDefault, _functions, _queryResults, result) => {
141
141
  if (!ignoreDefault) {
@@ -160,7 +160,7 @@ const dependencyCategoriesOf = (env) => ({
160
160
  'remote': {
161
161
  queryDisplayName: 'Remote Installs',
162
162
  functions: remote_functions_1.RemoteFunctions,
163
- defaultValue: exports.Unknown,
163
+ defaultValue: dependency_values_1.Unknown,
164
164
  /* the value is the reference as written, which names the package only implicitly */
165
165
  additionalAnalysis: (_data, _ignoreDefault, _functions, _queryResults, result) => {
166
166
  for (const [at, info] of result.entries()) {
@@ -174,17 +174,17 @@ const dependencyCategoriesOf = (env) => ({
174
174
  'source': {
175
175
  queryDisplayName: 'Sourced Files',
176
176
  functions: source_functions_1.SourceFunctions,
177
- defaultValue: exports.Unknown
177
+ defaultValue: dependency_values_1.Unknown
178
178
  },
179
179
  'read': {
180
180
  queryDisplayName: 'Read Data',
181
181
  functions: env.deriveFromDefinitions(read_functions_1.computeReadFunctions),
182
- defaultValue: exports.Unknown
182
+ defaultValue: dependency_values_1.Unknown
183
183
  },
184
184
  'write': {
185
185
  queryDisplayName: 'Outputs',
186
186
  functions: env.derive(write_functions_1.writeFunctionsOf),
187
- defaultValue: 'stdout',
187
+ defaultValue: dependency_values_1.StdOut,
188
188
  /* what the top level prints on its own is an output like any other, marked {@link DependencyInfo#implicit} */
189
189
  additionalAnalysis: async (data, ignoreDefault, _functions, queryResults, result) => {
190
190
  /* without implicit echo (e.g. in a package, whose top-level code runs at install time) nothing is auto-printed */
@@ -228,7 +228,7 @@ function printResultSection(title, infos, result, formatter) {
228
228
  // one line per dependency: the value (package/file) up front, its function + node as a faint provenance suffix
229
229
  for (const i of infos) {
230
230
  /* neither names a resource: inline data is resolved but no path, `unknown` is a path we could not resolve */
231
- const stands = i.value === exports.Constant ? '<inline data>' : i.value === exports.Unknown || i.value === undefined ? '<unresolved>' : undefined;
231
+ const stands = i.value === dependency_values_1.Constant ? '<inline data>' : i.value === dependency_values_1.Unknown || i.value === undefined ? '<unresolved>' : undefined;
232
232
  const value = stands !== undefined ? (0, ansi_1.faint)(stands, formatter) : (0, ansi_1.bold)(i.value, formatter);
233
233
  const version = i.derivedRange !== undefined ? ` ${(0, ansi_1.faint)(i.derivedRange.format(), formatter)}` : '';
234
234
  if (i.nodeId === undefined) {
@@ -0,0 +1,9 @@
1
+ /** The value could not be resolved, e.g. a path assembled at runtime. Such a dependency may be missing or fetchable. */
2
+ export declare const Unknown = "unknown";
3
+ /** The value resolved, but to data given inline rather than to a path (`matrix(0, 2, 2)`, `data.frame(a = 1)`). */
4
+ export declare const Constant = "constant";
5
+ /** What goes to the console rather than to a file: the standard output, and the standard error stream. */
6
+ export declare const StdOut = "stdout";
7
+ export declare const StdErr = "stderr";
8
+ /** The values naming a console stream rather than a file, see {@link StdOut} and {@link StdErr}. */
9
+ export declare const ConsoleStreams: ReadonlySet<string>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConsoleStreams = exports.StdErr = exports.StdOut = exports.Constant = exports.Unknown = void 0;
4
+ /** The value could not be resolved, e.g. a path assembled at runtime. Such a dependency may be missing or fetchable. */
5
+ exports.Unknown = 'unknown';
6
+ /** The value resolved, but to data given inline rather than to a path (`matrix(0, 2, 2)`, `data.frame(a = 1)`). */
7
+ exports.Constant = 'constant';
8
+ /** What goes to the console rather than to a file: the standard output, and the standard error stream. */
9
+ exports.StdOut = 'stdout';
10
+ exports.StdErr = 'stderr';
11
+ /** The values naming a console stream rather than a file, see {@link StdOut} and {@link StdErr}. */
12
+ exports.ConsoleStreams = new Set([exports.StdOut, exports.StdErr]);
13
+ //# sourceMappingURL=dependency-values.js.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RemoteFunctions = void 0;
4
4
  exports.remoteTarget = remoteTarget;
5
- const dependencies_query_format_1 = require("../dependencies-query-format");
5
+ const dependency_values_1 = require("../dependency-values");
6
6
  /**
7
7
  * The installers that fetch a package from somewhere other than a configured CRAN-like repository, with the
8
8
  * argument naming what they fetch: a `user/repo` slug for the forge installers, a url or path for the rest.
@@ -31,7 +31,7 @@ const RemoteRevision = /[@#](?<revision>[^/]+)$/;
31
31
  * `undefined` for a value that never resolved, which names nothing.
32
32
  */
33
33
  function remoteTarget(value) {
34
- if (value === undefined || value === dependencies_query_format_1.Unknown || value === dependencies_query_format_1.Constant || value.length === 0) {
34
+ if (value === undefined || value === dependency_values_1.Unknown || value === dependency_values_1.Constant || value.length === 0) {
35
35
  return undefined;
36
36
  }
37
37
  const revision = RemoteRevision.exec(value)?.groups?.revision;
@@ -4,6 +4,7 @@ exports.writeFunctions = void 0;
4
4
  exports.computeWriteFunctions = computeWriteFunctions;
5
5
  exports.writeFunctionsOf = writeFunctionsOf;
6
6
  const function_info_1 = require("./function-info");
7
+ const dependency_values_1 = require("../dependency-values");
7
8
  const built_in_props_1 = require("../../../../dataflow/environments/built-in-props");
8
9
  const derived_functions_1 = require("./derived-functions");
9
10
  const other_path_functions_1 = require("./other-path-functions");
@@ -26,7 +27,7 @@ const WriteFunctionsWithMore = [
26
27
  argIdx: 2,
27
28
  argName: 'outFile',
28
29
  resolveValue: true,
29
- defaultValue: 'stderr',
30
+ defaultValue: dependency_values_1.StdErr,
30
31
  ignoreIf: 'arg-true',
31
32
  additionalArgs: {
32
33
  val: { argIdx: 1, argName: 'silent' }
@@ -38,12 +39,12 @@ const WriteFunctionsWithMore = [
38
39
  { package: 'graphics', name: 'stem', linkTo: OutputRedirects, resolveValue: false },
39
40
  { package: 'base', name: 'cat', linkTo: OutputRedirects, argName: 'file', resolveValue: true },
40
41
  /* conditions and messages go to the message stream, which is stderr */
41
- { package: 'base', name: 'message', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
42
- { package: 'base', name: 'warning', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
43
- { package: 'rlang', name: 'warn', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
44
- { package: 'rlang', name: 'inform', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
45
- { package: 'cli', name: 'cli_warn', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
46
- { package: 'cli', name: 'cli_abort', linkTo: OutputRedirects, resolveValue: false, defaultValue: 'stderr' },
42
+ { package: 'base', name: 'message', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
43
+ { package: 'base', name: 'warning', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
44
+ { package: 'rlang', name: 'warn', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
45
+ { package: 'rlang', name: 'inform', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
46
+ { package: 'cli', name: 'cli_warn', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
47
+ { package: 'cli', name: 'cli_abort', linkTo: OutputRedirects, resolveValue: false, defaultValue: dependency_values_1.StdErr },
47
48
  /* `output = "default"` shows the table where R prints */
48
49
  { package: 'modelsummary', name: 'modelsummary', argIdx: 1, argName: 'output', resolveValue: true, stringReplacements: { default: 'stdout' } },
49
50
  { package: 'modelsummary', name: 'msummary', argIdx: 1, argName: 'output', resolveValue: true, stringReplacements: { default: 'stdout' } },
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectImplicitEchoes = collectImplicitEchoes;
4
4
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
5
5
  const function_semantics_1 = require("../../../dataflow/fn/function-semantics");
6
+ const dependency_values_1 = require("./dependency-values");
6
7
  const identifier_1 = require("../../../dataflow/environments/identifier");
7
8
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
8
9
  const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
@@ -161,7 +162,7 @@ function collectImplicitEchoes(ast, dataflow, accountedFor, invisible, result) {
161
162
  continue;
162
163
  }
163
164
  const inputs = (0, data_flow_1.inputVariablesAt)(dataflow, ast, echoed.info.id);
164
- result.push({ nodeId: echoed.info.id, functionName: echoName(echoed, dataflow), value: 'stdout', implicit: true, inputVariables: inputs.length > 0 ? inputs : undefined });
165
+ result.push({ nodeId: echoed.info.id, functionName: echoName(echoed, dataflow), value: dependency_values_1.StdOut, implicit: true, inputVariables: inputs.length > 0 ? inputs : undefined });
165
166
  }
166
167
  }
167
168
  }
@@ -1,4 +1,4 @@
1
- import { type DependencyInfo } from './dependencies-query-format';
1
+ import type { DependencyInfo } from './dependencies-query-format';
2
2
  import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
3
3
  import type { QueryRun } from './dependencies-query-executor';
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.describePlots = describePlots;
4
- const dependencies_query_format_1 = require("./dependencies-query-format");
4
+ const dependency_values_1 = require("./dependency-values");
5
5
  const vertex_1 = require("../../../dataflow/graph/vertex");
6
6
  const edge_1 = require("../../../dataflow/graph/edge");
7
7
  const identifier_1 = require("../../../dataflow/environments/identifier");
@@ -16,7 +16,7 @@ const TitleArguments = {
16
16
  };
17
17
  const DefaultTitleArgument = { argName: 'main' };
18
18
  function isResolved(value) {
19
- return value !== undefined && value !== dependencies_query_format_1.Unknown && value !== dependencies_query_format_1.Constant;
19
+ return value !== undefined && value !== dependency_values_1.Unknown && value !== dependency_values_1.Constant;
20
20
  }
21
21
  function titleOf(call, { dataflow, config, formals }, ctx) {
22
22
  /* a call handed nothing states no title */
@@ -5,7 +5,7 @@ import type { ParsedQueryLine } from '../../query';
5
5
  import Joi from 'joi';
6
6
  import { executeDiceQuery } from './dice-query-executor';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { CommandCompletions } from '../../../cli/repl/core';
8
+ import type { CommandCompletions } from '../../../cli/repl/completion';
9
9
  import type { FlowrConfig } from '../../../config';
10
10
  import { type SliceQueryOptions } from '../slice-query-options';
11
11
  /**
@@ -6,7 +6,7 @@ import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/nod
6
6
  import { FileRole } from '../../../project/context/flowr-file';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
8
  import type { FlowrConfig } from '../../../config';
9
- import type { CommandCompletions } from '../../../cli/repl/core';
9
+ import type { CommandCompletions } from '../../../cli/repl/completion';
10
10
  /**
11
11
  * Returns the content(s) of all files matching the given pattern.
12
12
  */
@@ -8,7 +8,7 @@ import { type ConfiguredLintingRule, LintingResultCertainty } from '../../../lin
8
8
  import { type OutputFormatter } from '../../../util/text/ansi';
9
9
  import type { FlowrConfig } from '../../../config';
10
10
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
11
- import type { CommandCompletions } from '../../../cli/repl/core';
11
+ import type { CommandCompletions } from '../../../cli/repl/completion';
12
12
  import { type LintResultsByRule, LinterOutputFormat } from '../../../linter/linter-output';
13
13
  export interface LinterQuery extends BaseQueryFormat {
14
14
  readonly type: 'linter';
@@ -39,7 +39,7 @@ export declare const LinterQueryDefinition: {
39
39
  readonly completer: typeof linterQueryCompleter;
40
40
  readonly fromLine: typeof linterQueryLineParser;
41
41
  readonly syntax: "@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>";
42
- readonly schema: Joi.ObjectSchema<any>;
42
+ readonly schema: Joi.ObjectSchema;
43
43
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly import("../../query").Query[], certainty: LintingResultCertainty | undefined) => ((string & {
44
44
  __brand?: "node-id";
45
45
  }) | (number & {
@@ -104,6 +104,7 @@ function linterQueryCompleter(line, startingNewArg, _config) {
104
104
  retriever_1.fileProtocol
105
105
  ] };
106
106
  }
107
+ let linterQuerySchema;
107
108
  exports.LinterQueryDefinition = {
108
109
  title: 'Linter Query',
109
110
  executor: linter_query_executor_1.executeLinterQuery,
@@ -146,15 +147,18 @@ exports.LinterQueryDefinition = {
146
147
  completer: linterQueryCompleter,
147
148
  fromLine: linterQueryLineParser,
148
149
  syntax: '@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>',
149
- schema: joi_1.default.object({
150
- type: joi_1.default.string().valid('linter').required().description('The type of the query.'),
151
- format: joi_1.default.string().valid(...Object.values(linter_output_1.LinterOutputFormat)).optional().description('Print the findings in a machine-readable format instead of the human-readable summary.'),
152
- rules: joi_1.default.array().items(joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)), joi_1.default.object({
153
- name: joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)).required(),
154
- config: joi_1.default.object()
155
- })).description('The rules to lint for. If unset, all rules will be included.'),
156
- tags: joi_1.default.array().items(joi_1.default.string().valid(...Object.values(linter_tags_1.LintingRuleTag))).optional().description('Lint for every rule carrying one of these tags, e.g. cmd-check for the R CMD check rules.')
157
- }).description('The linter query lints for the given set of rules and returns the result.'),
150
+ /* built on first use, as the rules are not yet known while this module loads */
151
+ get schema() {
152
+ return linterQuerySchema ??= joi_1.default.object({
153
+ type: joi_1.default.string().valid('linter').required().description('The type of the query.'),
154
+ format: joi_1.default.string().valid(...Object.values(linter_output_1.LinterOutputFormat)).optional().description('Print the findings in a machine-readable format instead of the human-readable summary.'),
155
+ rules: joi_1.default.array().items(joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)), joi_1.default.object({
156
+ name: joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)).required(),
157
+ config: joi_1.default.object()
158
+ })).description('The rules to lint for. If unset, all rules will be included.'),
159
+ tags: joi_1.default.array().items(joi_1.default.string().valid(...Object.values(linter_tags_1.LintingRuleTag))).optional().description('Lint for every rule carrying one of these tags, e.g. cmd-check for the R CMD check rules.')
160
+ }).description('The linter query lints for the given set of rules and returns the result.');
161
+ },
158
162
  flattenInvolvedNodes: (queryResults, _queries, certainty) => {
159
163
  const out = queryResults;
160
164
  return Object.values(out.results).flatMap(v => {
@@ -2,7 +2,7 @@ import type { BasicQueryData } from '../../base-query-format';
2
2
  import type { SignatureQuery, SignatureQueryResult, SignaturePackageView, SignatureFunctionView } from './signature-query-format';
3
3
  import { type PackageSignatureSource } from '../../../project/sigdb/reader';
4
4
  import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
5
- import type { CommandCompletions } from '../../../cli/repl/core';
5
+ import type { CommandCompletions } from '../../../cli/repl/completion';
6
6
  import { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl } from '../../../util/r-package-urls';
7
7
  export { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl };
8
8
  /**
@@ -5,7 +5,7 @@ import type { ParsedQueryLine } from '../../query';
5
5
  import Joi from 'joi';
6
6
  import { executeTaintQuery } from './taint-query-executor';
7
7
  import type { AnyPredefinedTaintAnalysisName } from '../../../taint-analysis/predefined/predefined';
8
- import type { CommandCompletions } from '../../../cli/repl/core';
8
+ import type { CommandCompletions } from '../../../cli/repl/completion';
9
9
  import type { TaintInferenceResult } from '../../../taint-analysis/builder/taint-analysis';
10
10
  export interface TaintQuery extends BaseQueryFormat {
11
11
  readonly type: 'taint';
@@ -27,7 +27,7 @@ export declare const QueryFunctionFilter: {
27
27
  /** The call graph together with the functions the given queries want to inspect. */
28
28
  readonly inCallGraph: (this: void, queries: readonly FunctionFilteringQuery[], analyzer: ReadonlyFlowrAnalysisProvider, onlyDefinitions?: boolean) => Promise<{
29
29
  cg: import("../dataflow/graph/call-graph").CallGraph;
30
- fns: IteratorObject<[NodeId, Required<import("../dataflow/graph/vertex").DataflowGraphVertexFunctionDefinition | import("../dataflow/graph/vertex").DataflowGraphVertexFunctionCall>], undefined, unknown>;
30
+ fns: IteratorObject<[NodeId, Required<import("../dataflow/graph/vertex").DataflowGraphVertexFunctionCall | import("../dataflow/graph/vertex").DataflowGraphVertexFunctionDefinition>], undefined, unknown>;
31
31
  }>;
32
32
  };
33
33
  export {};
@@ -27,7 +27,7 @@ import type { FlowrConfig } from '../config';
27
27
  import { type InspectHigherOrderQuery } from './catalog/inspect-higher-order-query/inspect-higher-order-query-format';
28
28
  import type { ReadonlyFlowrAnalysisProvider } from '../project/flowr-analyzer';
29
29
  import type { ReplOutput } from '../cli/repl/commands/repl-main';
30
- import type { CommandCompletions } from '../cli/repl/core';
30
+ import type { CommandCompletions } from '../cli/repl/completion';
31
31
  import type { FilesQuery } from './catalog/files-query/files-query-format';
32
32
  import type { CallGraphQuery } from './catalog/call-graph-query/call-graph-query-format';
33
33
  import type { InspectRecursionQuery } from './catalog/inspect-recursion-query/inspect-recursion-query-format';
@@ -329,7 +329,7 @@ export declare const SupportedQueries: {
329
329
  readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
330
330
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"linter">;
331
331
  readonly syntax: "@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>";
332
- readonly schema: Joi.ObjectSchema<any>;
332
+ readonly schema: Joi.ObjectSchema;
333
333
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly Query[], certainty: LintingResultCertainty | undefined) => ((string & {
334
334
  __brand?: "node-id";
335
335
  }) | (number & {
package/r-bridge/init.js CHANGED
@@ -22,7 +22,7 @@ function initCommand(eol, pipeBind = false) {
22
22
  + (pipeBind ? 'Sys.setenv("_R_USE_PIPEBIND_"="true");' : '')
23
23
  + 'flowr_output<-NULL;flowr_get_ast<-compiler::cmpfun(function(...){tryCatch({'
24
24
  /* the actual code to parse the R code, ... allows us to keep the old 'file=path' and 'text=content' semantics. we define flowr_output using the super assignment to persist it in the env! */
25
- + 'flowr_output<<-getParseData(parse(...,keep.source=TRUE),includeText=TRUE);'
25
+ + 'flowr_output<<-utils::getParseData(parse(...,keep.source=TRUE),includeText=TRUE);'
26
26
  /* json conversion of the output, dataframe="values" allows us to receive a list of lists (which is more compact)!
27
27
  * so we do not depend on jsonlite and friends, we do so manually (:sparkles:)
28
28
  */
@@ -9,7 +9,7 @@ const type_1 = require("../r-bridge/lang-4.x/ast/model/type");
9
9
  const vertex_1 = require("../dataflow/graph/vertex");
10
10
  const search_enrichers_1 = require("./search-executor/search-enrichers");
11
11
  const objects_1 = require("../util/objects");
12
- const search_generators_1 = require("./search-executor/search-generators");
12
+ const search_logger_1 = require("./search-logger");
13
13
  const query_fn_props_1 = require("../dataflow/environments/query-fn-props");
14
14
  const r_argument_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-argument");
15
15
  var FlowrFilter;
@@ -56,7 +56,7 @@ exports.FlowrFilters = {
56
56
  }),
57
57
  [FlowrFilter.MatchesEnrichment]: ((e, args) => {
58
58
  const content = (0, search_enrichers_1.enrichmentContent)(e, args.enrichment);
59
- return content && (0, objects_1.looselyCompareObjects)(content, args.test, args.arrayMatch, search_generators_1.searchLogger);
59
+ return content && (0, objects_1.looselyCompareObjects)(content, args.test, args.arrayMatch, search_logger_1.searchLogger);
60
60
  }),
61
61
  [FlowrFilter.OriginKind]: ((e, args, data) => {
62
62
  const dfgNode = data.dataflow.graph.getVertex(e.node.info.id);
@@ -6,7 +6,6 @@ import { type Query } from '../../queries/query';
6
6
  import type { LintingResultCertainty } from '../../linter/linter-format';
7
7
  import type { ReadonlyFlowrAnalysisProvider } from '../../project/flowr-analyzer';
8
8
  import type TreeSitter from 'web-tree-sitter';
9
- export declare const searchLogger: import("tslog").Logger<import("tslog").ILogObj>;
10
9
  /**
11
10
  * This is a union of all possible generator node types
12
11
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generators = exports.searchLogger = void 0;
3
+ exports.generators = void 0;
4
4
  exports.getGenerator = getGenerator;
5
5
  const flowr_search_1 = require("../flowr-search");
6
6
  const parse_1 = require("../../slicing/criterion/parse");
@@ -9,9 +9,8 @@ const assert_1 = require("../../util/assert");
9
9
  const range_1 = require("../../util/range");
10
10
  const query_1 = require("../../queries/query");
11
11
  const search_enrichers_1 = require("./search-enrichers");
12
- const log_1 = require("../../util/log");
12
+ const search_logger_1 = require("../search-logger");
13
13
  const r_project_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-project");
14
- exports.searchLogger = log_1.log.getSubLogger({ name: 'search' });
15
14
  /**
16
15
  * All supported generators!
17
16
  */
@@ -124,7 +123,7 @@ async function generateSyntax(input, args) {
124
123
  const result = await info.treeSitterQuery(args.source);
125
124
  const relevant = result.filter(c => captures.has(c.name));
126
125
  if (!relevant.length) {
127
- exports.searchLogger.debug(`empty tree-sitter query result for query ${JSON.stringify(args)}`);
126
+ search_logger_1.searchLogger.debug(`empty tree-sitter query result for query ${JSON.stringify(args)}`);
128
127
  return new flowr_search_1.FlowrSearchElements([]);
129
128
  }
130
129
  const nodesByTreeSitterId = new Map();
@@ -134,7 +133,7 @@ async function generateSyntax(input, args) {
134
133
  nodesByTreeSitterId.set(treeSitterInfo.tsId, node);
135
134
  }
136
135
  else {
137
- exports.searchLogger.debug(`normalized ast node ${node.lexeme} with type ${node.type} does not have a tree-sitter id`);
136
+ search_logger_1.searchLogger.debug(`normalized ast node ${node.lexeme} with type ${node.type} does not have a tree-sitter id`);
138
137
  }
139
138
  });
140
139
  const ret = [];
@@ -144,7 +143,7 @@ async function generateSyntax(input, args) {
144
143
  ret.push({ node });
145
144
  }
146
145
  else {
147
- exports.searchLogger.debug(`tree-sitter node ${capture.node.id} with type ${capture.node.type} does not have a corresponding normalized ast node`);
146
+ search_logger_1.searchLogger.debug(`tree-sitter node ${capture.node.id} with type ${capture.node.type} does not have a corresponding normalized ast node`);
148
147
  }
149
148
  }
150
149
  return new flowr_search_1.FlowrSearchElements(ret);
@@ -0,0 +1 @@
1
+ export declare const searchLogger: import("tslog").Logger<import("tslog").ILogObj>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchLogger = void 0;
4
+ const log_1 = require("../util/log");
5
+ exports.searchLogger = log_1.log.getSubLogger({ name: 'search' });
6
+ //# sourceMappingURL=search-logger.js.map
@@ -3,7 +3,7 @@
3
3
  * @module
4
4
  */
5
5
  import { SemVer } from 'semver';
6
- export declare const versionDate = "2026-11-06T08:48:46Z";
6
+ export declare const versionDate = "2026-11-07T10:53:43Z";
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.3';
11
+ const version = '2.17.4';
12
12
  // this is automatically replaced with the release date by release-it (scripts/bump-version.ts)
13
- exports.versionDate = '2026-11-06T08:48:46Z';
13
+ exports.versionDate = '2026-11-07T10:53:43Z';
14
14
  /**
15
15
  * Retrieves the current flowR version as a new {@link SemVer} object.
16
16
  */