@eagleoutice/flowr 2.8.3 → 2.8.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.
- 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/linter-format.d.ts +6 -0
- package/linter/linter-rules.d.ts +6 -0
- package/linter/rules/dataframe-access-validation.js +1 -0
- package/linter/rules/dead-code.d.ts +1 -0
- package/linter/rules/dead-code.js +1 -0
- package/linter/rules/deprecated-functions.d.ts +1 -0
- package/linter/rules/file-path-validity.js +2 -0
- package/linter/rules/function-finder-util.d.ts +1 -0
- package/linter/rules/function-finder-util.js +1 -0
- package/linter/rules/naming-convention.d.ts +1 -0
- package/linter/rules/naming-convention.js +1 -0
- package/linter/rules/network-functions.d.ts +1 -0
- package/linter/rules/seeded-randomness.d.ts +1 -0
- package/linter/rules/seeded-randomness.js +2 -0
- package/linter/rules/unused-definition.js +7 -5
- package/linter/rules/useless-loop.d.ts +1 -0
- package/linter/rules/useless-loop.js +2 -1
- 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/catalog/linter-query/linter-query-format.d.ts +5 -1
- package/queries/catalog/linter-query/linter-query-format.js +9 -1
- package/queries/query.d.ts +6 -2
- 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
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ export type RoleBasedFiles = {
|
|
|
24
24
|
[FileRole.Namespace]: FlowrNamespaceFile[];
|
|
25
25
|
[FileRole.Vignette]: FlowrFileProvider[];
|
|
26
26
|
[FileRole.Test]: FlowrFileProvider[];
|
|
27
|
+
[FileRole.License]: FlowrFileProvider[];
|
|
27
28
|
[FileRole.Source]: FlowrFileProvider[];
|
|
28
29
|
[FileRole.Data]: FlowrFileProvider[];
|
|
29
30
|
[FileRole.Other]: FlowrFileProvider[];
|
|
@@ -23,6 +23,8 @@ export declare enum FileRole {
|
|
|
23
23
|
Test = "test",
|
|
24
24
|
/** Data files, e.g., `R/sysdata.rda`, currently not specially supported. */
|
|
25
25
|
Data = "data",
|
|
26
|
+
/** Signals separate license files, but please note, that DESCRIPTION files may contain license info too */
|
|
27
|
+
License = "license",
|
|
26
28
|
/**
|
|
27
29
|
* Catch-all for any file that provides usable R source code to incorporate into the analysis.
|
|
28
30
|
* Please note, that the loading order/inclusion and even potential relevance of these source files
|
|
@@ -24,6 +24,8 @@ var FileRole;
|
|
|
24
24
|
FileRole["Test"] = "test";
|
|
25
25
|
/** Data files, e.g., `R/sysdata.rda`, currently not specially supported. */
|
|
26
26
|
FileRole["Data"] = "data";
|
|
27
|
+
/** Signals separate license files, but please note, that DESCRIPTION files may contain license info too */
|
|
28
|
+
FileRole["License"] = "license";
|
|
27
29
|
/**
|
|
28
30
|
* Catch-all for any file that provides usable R source code to incorporate into the analysis.
|
|
29
31
|
* Please note, that the loading order/inclusion and even potential relevance of these source files
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* This plugin provides supports for the identification of license files.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FlowrAnalyzerLicenseFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
10
|
+
readonly name = "flowr-analyzer-license-files-plugin";
|
|
11
|
+
readonly description = "This plugin provides support for loading license files.";
|
|
12
|
+
readonly version: SemVer;
|
|
13
|
+
private readonly pathPattern;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new instance of the TEST file plugin.
|
|
16
|
+
* @param pathPattern - The pathPattern to identify TEST files, see {@link FileNamePattern} for the default pathPattern.
|
|
17
|
+
*/
|
|
18
|
+
constructor(pathPattern?: RegExp);
|
|
19
|
+
applies(file: PathLike): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Processes the given file, assigning it the {@link FileRole.License} role.
|
|
22
|
+
*/
|
|
23
|
+
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): FlowrFileProvider;
|
|
24
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerLicenseFilePlugin = 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 FileNamePattern = /license(\.md|\.txt)?$/i;
|
|
9
|
+
/**
|
|
10
|
+
* This plugin provides supports for the identification of license files.
|
|
11
|
+
*/
|
|
12
|
+
class FlowrAnalyzerLicenseFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
13
|
+
name = 'flowr-analyzer-license-files-plugin';
|
|
14
|
+
description = 'This plugin provides support for loading license files.';
|
|
15
|
+
version = new semver_1.SemVer('0.1.0');
|
|
16
|
+
pathPattern;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new instance of the TEST file plugin.
|
|
19
|
+
* @param pathPattern - The pathPattern to identify TEST files, see {@link FileNamePattern} for the default pathPattern.
|
|
20
|
+
*/
|
|
21
|
+
constructor(pathPattern = FileNamePattern) {
|
|
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
|
+
* Processes the given file, assigning it the {@link FileRole.License} role.
|
|
30
|
+
*/
|
|
31
|
+
process(_ctx, file) {
|
|
32
|
+
file.assignRole(flowr_file_1.FileRole.License);
|
|
33
|
+
return file;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.FlowrAnalyzerLicenseFilePlugin = FlowrAnalyzerLicenseFilePlugin;
|
|
37
|
+
//# sourceMappingURL=flowr-analyzer-license-file-plugin.js.map
|
|
@@ -11,6 +11,7 @@ const flowr_analyzer_namespace_files_plugin_1 = require("./file-plugins/flowr-an
|
|
|
11
11
|
const flowr_analyzer_news_file_plugin_1 = require("./file-plugins/flowr-analyzer-news-file-plugin");
|
|
12
12
|
const flowr_analyzer_vignette_file_plugin_1 = require("./file-plugins/flowr-analyzer-vignette-file-plugin");
|
|
13
13
|
const flowr_analyzer_test_file_plugin_1 = require("./file-plugins/flowr-analyzer-test-file-plugin");
|
|
14
|
+
const flowr_analyzer_license_file_plugin_1 = require("./file-plugins/flowr-analyzer-license-file-plugin");
|
|
14
15
|
/**
|
|
15
16
|
* Provides the default set of Flowr Analyzer plugins.
|
|
16
17
|
*/
|
|
@@ -23,6 +24,7 @@ function FlowrAnalyzerPluginDefaults() {
|
|
|
23
24
|
new flowr_analyzer_loading_order_description_file_plugin_1.FlowrAnalyzerLoadingOrderDescriptionFilePlugin(),
|
|
24
25
|
new flowr_analyzer_rmd_file_plugin_1.FlowrAnalyzerRmdFilePlugin(),
|
|
25
26
|
new flowr_analyzer_qmd_file_plugin_1.FlowrAnalyzerQmdFilePlugin(),
|
|
27
|
+
new flowr_analyzer_license_file_plugin_1.FlowrAnalyzerLicenseFilePlugin(),
|
|
26
28
|
new flowr_analyzer_jupyter_file_plugin_1.FlowrAnalyzerJupyterFilePlugin(),
|
|
27
29
|
new flowr_analyzer_namespace_files_plugin_1.FlowrAnalyzerNamespaceFilesPlugin(),
|
|
28
30
|
new flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin()
|
|
@@ -9,10 +9,11 @@ import { FlowrAnalyzerNamespaceFilesPlugin } from './file-plugins/flowr-analyzer
|
|
|
9
9
|
import { FlowrAnalyzerNewsFilePlugin } from './file-plugins/flowr-analyzer-news-file-plugin';
|
|
10
10
|
import { FlowrAnalyzerMetaVignetteFilesPlugin } from './file-plugins/flowr-analyzer-vignette-file-plugin';
|
|
11
11
|
import { FlowrAnalyzerMetaTestFilesPlugin } from './file-plugins/flowr-analyzer-test-file-plugin';
|
|
12
|
+
import { FlowrAnalyzerLicenseFilePlugin } from './file-plugins/flowr-analyzer-license-file-plugin';
|
|
12
13
|
/**
|
|
13
14
|
* The built-in Flowr Analyzer plugins that are always available.
|
|
14
15
|
*/
|
|
15
|
-
export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["files:vignette", typeof FlowrAnalyzerMetaVignetteFilesPlugin], ["files:test", typeof FlowrAnalyzerMetaTestFilesPlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilesPlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin]];
|
|
16
|
+
export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["files:vignette", typeof FlowrAnalyzerMetaVignetteFilesPlugin], ["files:test", typeof FlowrAnalyzerMetaTestFilesPlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilesPlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin], ["file:license", typeof FlowrAnalyzerLicenseFilePlugin]];
|
|
16
17
|
export type BuiltInFlowrPluginName = typeof BuiltInPlugins[number][0];
|
|
17
18
|
export type BuiltInFlowrPluginArgs<N extends BuiltInFlowrPluginName> = N extends typeof BuiltInPlugins[number][0] ? ConstructorParameters<Extract<typeof BuiltInPlugins[number], [N, PluginProducer]>[1]> : never;
|
|
18
19
|
type PluginProducer = new (...args: never[]) => FlowrAnalyzerPlugin;
|
|
@@ -15,6 +15,7 @@ const flowr_analyzer_namespace_files_plugin_1 = require("./file-plugins/flowr-an
|
|
|
15
15
|
const flowr_analyzer_news_file_plugin_1 = require("./file-plugins/flowr-analyzer-news-file-plugin");
|
|
16
16
|
const flowr_analyzer_vignette_file_plugin_1 = require("./file-plugins/flowr-analyzer-vignette-file-plugin");
|
|
17
17
|
const flowr_analyzer_test_file_plugin_1 = require("./file-plugins/flowr-analyzer-test-file-plugin");
|
|
18
|
+
const flowr_analyzer_license_file_plugin_1 = require("./file-plugins/flowr-analyzer-license-file-plugin");
|
|
18
19
|
/**
|
|
19
20
|
* The built-in Flowr Analyzer plugins that are always available.
|
|
20
21
|
*/
|
|
@@ -28,7 +29,8 @@ exports.BuiltInPlugins = [
|
|
|
28
29
|
['file:qmd', flowr_analyzer_qmd_file_plugin_1.FlowrAnalyzerQmdFilePlugin],
|
|
29
30
|
['file:ipynb', flowr_analyzer_jupyter_file_plugin_1.FlowrAnalyzerJupyterFilePlugin],
|
|
30
31
|
['file:namespace', flowr_analyzer_namespace_files_plugin_1.FlowrAnalyzerNamespaceFilesPlugin],
|
|
31
|
-
['file:news', flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin]
|
|
32
|
+
['file:news', flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin],
|
|
33
|
+
['file:license', flowr_analyzer_license_file_plugin_1.FlowrAnalyzerLicenseFilePlugin]
|
|
32
34
|
];
|
|
33
35
|
/**
|
|
34
36
|
* The registry of built-in and user-registered Flowr Analyzer plugins.
|
|
@@ -57,7 +57,6 @@ class DefaultFlowrAnalyzerProjectDiscoveryPlugin extends FlowrAnalyzerProjectDis
|
|
|
57
57
|
const requests = [];
|
|
58
58
|
/* the dummy approach of collecting all files, group R and Rmd files, and be done with it */
|
|
59
59
|
for (const file of (0, files_1.getAllFilesSync)(args.content, /.*/, this.ignorePathsRegex)) {
|
|
60
|
-
console.log(`Discovered file: ${file}`);
|
|
61
60
|
const relativePath = path_1.default.relative(args.content, file);
|
|
62
61
|
if (this.supportedExtensions.test(relativePath) && (!this.onlyTraversePaths || this.onlyTraversePaths.test(relativePath)) && !this.excludePathsRegex.test((0, built_in_source_1.platformDirname)(relativePath))) {
|
|
63
62
|
requests.push({ content: file, request: 'file' });
|
|
@@ -4,7 +4,7 @@ import { type OutputFormatter } from '../../../util/text/ansi';
|
|
|
4
4
|
import Joi from 'joi';
|
|
5
5
|
import type { FlowrConfigOptions } from '../../../config';
|
|
6
6
|
import type { DeepPartial } from 'ts-essentials';
|
|
7
|
-
import type { ParsedQueryLine } from '../../query';
|
|
7
|
+
import type { ParsedQueryLine, Query } from '../../query';
|
|
8
8
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
9
9
|
import type { CommandCompletions } from '../../../cli/repl/core';
|
|
10
10
|
export interface ConfigQuery extends BaseQueryFormat {
|
|
@@ -18,7 +18,7 @@ declare function configReplCompleter(partialLine: readonly string[], _startingNe
|
|
|
18
18
|
declare function configQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'config'>;
|
|
19
19
|
export declare const ConfigQueryDefinition: {
|
|
20
20
|
readonly executor: typeof executeConfigQuery;
|
|
21
|
-
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
|
|
21
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
|
|
22
22
|
readonly completer: typeof configReplCompleter;
|
|
23
23
|
readonly fromLine: typeof configQueryLineParser;
|
|
24
24
|
readonly schema: Joi.ObjectSchema<any>;
|
|
@@ -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
|
|
@@ -31,6 +31,10 @@ export declare const LinterQueryDefinition: {
|
|
|
31
31
|
readonly completer: typeof linterQueryCompleter;
|
|
32
32
|
readonly fromLine: typeof linterQueryLineParser;
|
|
33
33
|
readonly schema: Joi.ObjectSchema<any>;
|
|
34
|
-
readonly flattenInvolvedNodes: () =>
|
|
34
|
+
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => ((string & {
|
|
35
|
+
__brand?: "node-id";
|
|
36
|
+
}) | (number & {
|
|
37
|
+
__brand?: "node-id";
|
|
38
|
+
}))[];
|
|
35
39
|
};
|
|
36
40
|
export {};
|
|
@@ -105,7 +105,15 @@ exports.LinterQueryDefinition = {
|
|
|
105
105
|
config: joi_1.default.object()
|
|
106
106
|
})).description('The rules to lint for. If unset, all rules will be included.')
|
|
107
107
|
}).description('The linter query lints for the given set of rules and returns the result.'),
|
|
108
|
-
flattenInvolvedNodes: () =>
|
|
108
|
+
flattenInvolvedNodes: (queryResults) => {
|
|
109
|
+
const out = queryResults;
|
|
110
|
+
return Object.values(out.results).flatMap(v => {
|
|
111
|
+
if ((0, linter_format_1.isLintingResultsError)(v)) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
return v.results.map(v => v.involvedId);
|
|
115
|
+
}).filter(assert_1.isNotUndefined);
|
|
116
|
+
}
|
|
109
117
|
};
|
|
110
118
|
function addLintingRuleResult(ruleName, results, result) {
|
|
111
119
|
const rule = linter_rules_1.LintingRules[ruleName];
|
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>;
|
|
@@ -228,7 +228,11 @@ export declare const SupportedQueries: {
|
|
|
228
228
|
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions) => CommandCompletions;
|
|
229
229
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"linter">;
|
|
230
230
|
readonly schema: Joi.ObjectSchema<any>;
|
|
231
|
-
readonly flattenInvolvedNodes: () =>
|
|
231
|
+
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => ((string & {
|
|
232
|
+
__brand?: "node-id";
|
|
233
|
+
}) | (number & {
|
|
234
|
+
__brand?: "node-id";
|
|
235
|
+
}))[];
|
|
232
236
|
};
|
|
233
237
|
};
|
|
234
238
|
export type SupportedQueryTypes = keyof typeof SupportedQueries;
|