@eagleoutice/flowr 2.8.3 → 2.8.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.
- package/cli/repl/core.js +22 -0
- package/config.d.ts +14 -0
- package/config.js +10 -2
- package/control-flow/extract-cfg.js +35 -14
- package/core/print/slice-diff-ansi.js +1 -1
- package/dataflow/extractor.js +2 -2
- package/dataflow/graph/graph.js +0 -4
- package/dataflow/instrument/instrument-dataflow-count.d.ts +9 -0
- package/dataflow/instrument/instrument-dataflow-count.js +22 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +14 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +4 -2
- package/documentation/wiki-interface.js +3 -1
- package/documentation/wiki-query.js +1 -1
- package/linter/rules/unused-definition.js +6 -5
- package/package.json +1 -1
- package/project/context/flowr-analyzer-files-context.d.ts +1 -0
- package/project/context/flowr-file.d.ts +2 -0
- package/project/context/flowr-file.js +2 -0
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +24 -0
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +37 -0
- package/project/plugins/flowr-analyzer-plugin-defaults.js +2 -0
- package/project/plugins/plugin-registry.d.ts +2 -1
- package/project/plugins/plugin-registry.js +3 -1
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +0 -1
- package/queries/catalog/config-query/config-query-format.d.ts +2 -2
- package/queries/catalog/config-query/config-query-format.js +40 -2
- package/queries/catalog/dependencies-query/function-info/read-functions.js +8 -0
- package/queries/catalog/dependencies-query/function-info/write-functions.js +9 -0
- package/queries/query.d.ts +1 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +481 -447
- package/r-bridge/roxygen2/documentation-provider.js +3 -1
- package/r-bridge/roxygen2/roxygen-parse.d.ts +1 -1
- package/r-bridge/roxygen2/roxygen-parse.js +9 -5
- package/util/r-version.js +17 -1
- package/util/range.d.ts +1 -1
- package/util/range.js +1 -1
- package/util/version.js +1 -1
|
@@ -74,12 +74,50 @@ function configQueryLineParser(output, line, _config) {
|
|
|
74
74
|
return { query: [{ type: 'config' }]
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
+
function collectKeysFromUpdate(update, prefix = '') {
|
|
78
|
+
// only collect leaf keys
|
|
79
|
+
const keys = [];
|
|
80
|
+
for (const [key, value] of Object.entries(update)) {
|
|
81
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
82
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
83
|
+
keys.push(...collectKeysFromUpdate(value, fullKey));
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
keys.push(fullKey);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return keys;
|
|
90
|
+
}
|
|
91
|
+
function getValueAtPath(obj, path) {
|
|
92
|
+
let current = obj;
|
|
93
|
+
for (const key of path) {
|
|
94
|
+
if (current && typeof current === 'object' && current[key] !== undefined) {
|
|
95
|
+
current = current[key];
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return current;
|
|
102
|
+
}
|
|
77
103
|
exports.ConfigQueryDefinition = {
|
|
78
104
|
executor: config_query_executor_1.executeConfigQuery,
|
|
79
|
-
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
105
|
+
asciiSummarizer: (formatter, _analyzer, queryResults, result, queries) => {
|
|
80
106
|
const out = queryResults;
|
|
81
107
|
result.push(`Query: ${(0, ansi_1.bold)('config', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
|
|
82
|
-
|
|
108
|
+
const configQueries = queries.filter(q => q.type === 'config');
|
|
109
|
+
if (configQueries.some(q => q.update)) {
|
|
110
|
+
const updatedKeys = configQueries.flatMap(q => q.update ? collectKeysFromUpdate(q.update) : []);
|
|
111
|
+
result.push(' ╰ Updated configuration:');
|
|
112
|
+
for (const key of updatedKeys) {
|
|
113
|
+
const path = key.split('.');
|
|
114
|
+
const newValue = getValueAtPath(out.config, path);
|
|
115
|
+
result.push(` - ${key}: ${JSON.stringify(newValue, json_1.jsonReplacer)}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
result.push(` ╰ Config:\n${JSON.stringify(out.config, json_1.jsonReplacer, 4)}`);
|
|
120
|
+
}
|
|
83
121
|
return true;
|
|
84
122
|
},
|
|
85
123
|
completer: configReplCompleter,
|
|
@@ -100,5 +100,13 @@ exports.ReadFunctions = [
|
|
|
100
100
|
{ package: 'DBI', name: 'dbReadTable', argIdx: 1, argName: 'name', resolveValue: true },
|
|
101
101
|
{ package: 'DBI', name: 'dbReadTableArrow', argIdx: 1, argName: 'name', resolveValue: true },
|
|
102
102
|
{ package: 'jsonlite', name: 'read_json', argIdx: 0, argName: 'path', resolveValue: true },
|
|
103
|
+
{ package: 'rpolars', name: 'pl_read_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
104
|
+
{ package: 'rpolars', name: 'pl_read_csv', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
105
|
+
{ package: 'rpolars', name: 'pl_read_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
106
|
+
{ package: 'rpolars', name: 'pl_read_parquet', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
107
|
+
{ package: 'rpolars', name: 'pl_scan_csv', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
108
|
+
{ package: 'rpolars', name: 'pl_scan_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
109
|
+
{ package: 'rpolars', name: 'pl_scan_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
110
|
+
{ package: 'rpolars', name: 'pl_scan_parquet', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
103
111
|
];
|
|
104
112
|
//# sourceMappingURL=read-functions.js.map
|
|
@@ -106,5 +106,14 @@ exports.WriteFunctions = [
|
|
|
106
106
|
{ package: 'rasterpdf', name: 'agg_pdf', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
107
107
|
{ package: 'highcharter', name: 'hc_exporting', argName: 'filename', resolveValue: true },
|
|
108
108
|
{ package: 'jsonlite', name: 'write_json', argIdx: 1, argName: 'path', resolveValue: true },
|
|
109
|
+
{ package: 'rpolars', name: 'sink_ipc', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
110
|
+
{ package: 'rpolars', name: 'sink_csv', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
111
|
+
{ package: 'rpolars', name: 'sink_ndjson', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
112
|
+
{ package: 'rpolars', name: 'sink_parquet', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
113
|
+
{ package: 'rpolars', name: 'lazyframe__lazy_sink_csv', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
114
|
+
{ package: 'rpolars', name: 'write_ipc', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
115
|
+
{ package: 'rpolars', name: 'write_csv', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
116
|
+
{ package: 'rpolars', name: 'write_ndjson', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
117
|
+
{ package: 'rpolars', name: 'write_parquet', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
109
118
|
];
|
|
110
119
|
//# sourceMappingURL=write-functions.js.map
|
package/queries/query.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare const SupportedQueries: {
|
|
|
78
78
|
};
|
|
79
79
|
readonly config: {
|
|
80
80
|
readonly executor: typeof import("./catalog/config-query/config-query-executor").executeConfigQuery;
|
|
81
|
-
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
|
|
81
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
|
|
82
82
|
readonly completer: (partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfigOptions) => CommandCompletions;
|
|
83
83
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"config">;
|
|
84
84
|
readonly schema: Joi.ObjectSchema<any>;
|