@eagleoutice/flowr 2.2.3 → 2.2.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/README.md +412 -39
- package/benchmark/slicer.js +0 -1
- package/benchmark/summarizer/first-phase/process.js +18 -8
- package/benchmark/summarizer/summarizer.d.ts +1 -1
- package/benchmark/summarizer/summarizer.js +1 -1
- package/cli/benchmark-app.js +1 -1
- package/cli/common/script.js +0 -1
- package/cli/repl/commands/repl-cfg.js +38 -8
- package/cli/repl/commands/repl-commands.js +1 -1
- package/cli/repl/commands/repl-dataflow.js +38 -8
- package/cli/repl/commands/repl-normalize.js +38 -8
- package/cli/repl/commands/repl-query.js +2 -2
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/core.js +40 -21
- package/cli/repl/print-version.js +2 -1
- package/cli/repl/server/connection.js +17 -7
- package/cli/repl/server/messages/all-messages.js +17 -7
- package/cli/repl/server/messages/message-repl.js +17 -7
- package/cli/repl/server/messages/message-slice.js +17 -7
- package/cli/script-core/statistics-helper-core.js +0 -1
- package/config.d.ts +2 -2
- package/config.js +7 -1
- package/core/print/normalize-printer.js +0 -1
- package/dataflow/environments/resolve-by-name.d.ts +2 -0
- package/dataflow/environments/resolve-by-name.js +2 -0
- package/dataflow/graph/resolve-graph.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -1
- package/documentation/data/server/doc-data-server-messages.js +1 -2
- package/documentation/doc-util/doc-auto-gen.d.ts +1 -0
- package/documentation/doc-util/doc-auto-gen.js +5 -1
- package/documentation/doc-util/doc-benchmarks.d.ts +23 -0
- package/documentation/doc-util/doc-benchmarks.js +76 -0
- package/documentation/doc-util/doc-code.d.ts +1 -0
- package/documentation/doc-util/doc-code.js +4 -0
- package/documentation/doc-util/doc-files.d.ts +1 -0
- package/documentation/doc-util/doc-files.js +2 -1
- package/documentation/doc-util/doc-server-message.js +1 -1
- package/documentation/doc-util/doc-structure.d.ts +1 -1
- package/documentation/doc-util/doc-structure.js +2 -2
- package/documentation/doc-util/doc-types.d.ts +1 -0
- package/documentation/doc-util/doc-types.js +16 -8
- package/documentation/print-core-wiki.js +8 -1
- package/documentation/print-interface-wiki.js +21 -15
- package/documentation/print-linting-and-testing-wiki.js +3 -1
- package/documentation/print-readme.d.ts +1 -0
- package/documentation/print-readme.js +160 -0
- package/package.json +28 -40
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +77 -45
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +3 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.js +3 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +2 -3
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +1 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -0
- package/r-bridge/shell.js +18 -8
- package/statistics/features/supported/comments/comments.js +17 -7
- package/statistics/features/supported/used-functions/post-process.js +0 -1
- package/statistics/features/supported/used-packages/used-packages.js +17 -7
- package/statistics/features/supported/values/values.js +17 -7
- package/statistics/summarizer/summarizer.js +1 -2
- package/util/files.js +17 -7
- package/util/json.js +0 -2
- package/util/numbers.d.ts +1 -0
- package/util/numbers.js +5 -0
- package/util/parallel.js +17 -7
- package/util/quads.js +3 -3
- package/util/version.js +1 -1
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.dataflowStarCommand = exports.dataflowCommand = void 0;
|
|
7
37
|
const default_pipelines_1 = require("../../../core/steps/pipeline/default-pipelines");
|
|
8
38
|
const retriever_1 = require("../../../r-bridge/retriever");
|
|
9
39
|
const dfg_1 = require("../../../util/mermaid/dfg");
|
|
10
|
-
const
|
|
40
|
+
const clipboard = Promise.resolve().then(() => __importStar(require('clipboardy')));
|
|
11
41
|
const ansi_1 = require("../../../util/ansi");
|
|
12
42
|
/**
|
|
13
43
|
* Obtain the dataflow graph using a known parser (such as the {@link RShell} or {@link TreeSitterExecutor}).
|
|
@@ -33,10 +63,10 @@ exports.dataflowCommand = {
|
|
|
33
63
|
const mermaid = (0, dfg_1.graphToMermaid)({ graph: result.dataflow.graph, includeEnvironments: false }).string;
|
|
34
64
|
output.stdout(mermaid);
|
|
35
65
|
try {
|
|
36
|
-
|
|
66
|
+
(await clipboard).default.writeSync(mermaid);
|
|
37
67
|
output.stdout(formatInfo(output, 'mermaid code', result.dataflow['.meta'].timing));
|
|
38
68
|
}
|
|
39
|
-
catch
|
|
69
|
+
catch { /* do nothing this is a service thing */ }
|
|
40
70
|
}
|
|
41
71
|
};
|
|
42
72
|
exports.dataflowStarCommand = {
|
|
@@ -49,10 +79,10 @@ exports.dataflowStarCommand = {
|
|
|
49
79
|
const mermaid = (0, dfg_1.graphToMermaidUrl)(result.dataflow.graph, false);
|
|
50
80
|
output.stdout(mermaid);
|
|
51
81
|
try {
|
|
52
|
-
|
|
82
|
+
(await clipboard).default.writeSync(mermaid);
|
|
53
83
|
output.stdout(formatInfo(output, 'mermaid url', result.dataflow['.meta'].timing));
|
|
54
84
|
}
|
|
55
|
-
catch
|
|
85
|
+
catch { /* do nothing this is a service thing */ }
|
|
56
86
|
}
|
|
57
87
|
};
|
|
58
88
|
//# sourceMappingURL=repl-dataflow.js.map
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.normalizeStarCommand = exports.normalizeCommand = void 0;
|
|
7
37
|
const default_pipelines_1 = require("../../../core/steps/pipeline/default-pipelines");
|
|
8
38
|
const retriever_1 = require("../../../r-bridge/retriever");
|
|
9
39
|
const ast_1 = require("../../../util/mermaid/ast");
|
|
10
|
-
const
|
|
40
|
+
const clipboard = Promise.resolve().then(() => __importStar(require('clipboardy')));
|
|
11
41
|
const ansi_1 = require("../../../util/ansi");
|
|
12
42
|
async function normalize(parser, remainingLine) {
|
|
13
43
|
return await (0, default_pipelines_1.createNormalizePipeline)(parser, {
|
|
@@ -30,10 +60,10 @@ exports.normalizeCommand = {
|
|
|
30
60
|
const mermaid = (0, ast_1.normalizedAstToMermaid)(result.normalize.ast);
|
|
31
61
|
output.stdout(mermaid);
|
|
32
62
|
try {
|
|
33
|
-
|
|
63
|
+
(await clipboard).default.writeSync(mermaid);
|
|
34
64
|
output.stdout(formatInfo(output, 'mermaid url', result.normalize['.meta'].timing));
|
|
35
65
|
}
|
|
36
|
-
catch
|
|
66
|
+
catch { /* do nothing this is a service thing */ }
|
|
37
67
|
}
|
|
38
68
|
};
|
|
39
69
|
exports.normalizeStarCommand = {
|
|
@@ -46,10 +76,10 @@ exports.normalizeStarCommand = {
|
|
|
46
76
|
const mermaid = (0, ast_1.normalizedAstToMermaidUrl)(result.normalize.ast);
|
|
47
77
|
output.stdout(mermaid);
|
|
48
78
|
try {
|
|
49
|
-
|
|
79
|
+
(await clipboard).default.writeSync(mermaid);
|
|
50
80
|
output.stdout(formatInfo(output, 'mermaid url', result.normalize['.meta'].timing));
|
|
51
81
|
}
|
|
52
|
-
catch
|
|
82
|
+
catch { /* do nothing this is a service thing */ }
|
|
53
83
|
}
|
|
54
84
|
};
|
|
55
85
|
//# sourceMappingURL=repl-normalize.js.map
|
|
@@ -21,14 +21,14 @@ function printHelp(output) {
|
|
|
21
21
|
output.stdout(`\n\nThe example ${(0, ansi_1.italic)(':query "[{\\"type\\": \\"call-context\\", \\"callName\\": \\"mean\\" }]" mean(1:10)', output.formatter)} would return the call context of the mean function.`);
|
|
22
22
|
output.stdout('As a convenience, we interpret any (non-help, non-@) string not starting with \'[\' as a regex for the simple call-context query.');
|
|
23
23
|
output.stdout(`Hence, ${(0, ansi_1.italic)(':query "mean" mean(1:10)', output.formatter)} is equivalent to the above example.`);
|
|
24
|
-
output.stdout(
|
|
24
|
+
output.stdout('Similarly, \'@<type>\' is interpreted as a query of the given type.');
|
|
25
25
|
output.stdout(`With this, ${(0, ansi_1.italic)(':query @config', output.formatter)} prints the result of the config query.`);
|
|
26
26
|
}
|
|
27
27
|
async function processQueryArgs(line, parser, output) {
|
|
28
28
|
const args = (0, args_1.splitAtEscapeSensitive)(line);
|
|
29
29
|
const query = args.shift();
|
|
30
30
|
if (!query) {
|
|
31
|
-
output.stderr(
|
|
31
|
+
output.stderr('No query provided, use \':query help\' to get more information.');
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
if (query === 'help') {
|
package/cli/repl/core.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { KnownParser } from '../../r-bridge/parser';
|
|
|
6
6
|
* Used by the repl to provide automatic completions for a given (partial) input line
|
|
7
7
|
*/
|
|
8
8
|
export declare function replCompleter(line: string): [string[], string];
|
|
9
|
-
export declare
|
|
9
|
+
export declare function makeDefaultReplReadline(): readline.ReadLineOptions;
|
|
10
10
|
/**
|
|
11
11
|
* This function interprets the given `expr` as a REPL command (see {@link repl} for more on the semantics).
|
|
12
12
|
*
|
package/cli/repl/core.js
CHANGED
|
@@ -15,19 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.DEFAULT_REPL_READLINE_CONFIGURATION = void 0;
|
|
30
39
|
exports.replCompleter = replCompleter;
|
|
40
|
+
exports.makeDefaultReplReadline = makeDefaultReplReadline;
|
|
31
41
|
exports.replProcessAnswer = replProcessAnswer;
|
|
32
42
|
exports.repl = repl;
|
|
33
43
|
exports.loadReplHistory = loadReplHistory;
|
|
@@ -88,15 +98,18 @@ function replCompleter(line) {
|
|
|
88
98
|
// if no command is already typed, just return all commands that match
|
|
89
99
|
return [replCompleterKeywords().filter(k => k.startsWith(line)).map(k => `${k} `), line];
|
|
90
100
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
function makeDefaultReplReadline() {
|
|
102
|
+
return {
|
|
103
|
+
input: process.stdin,
|
|
104
|
+
output: process.stdout,
|
|
105
|
+
tabSize: 4,
|
|
106
|
+
terminal: true,
|
|
107
|
+
history: loadReplHistory(defaultHistoryFile),
|
|
108
|
+
removeHistoryDuplicates: true,
|
|
109
|
+
completer: replCompleter
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
;
|
|
100
113
|
async function replProcessStatement(output, statement, parser, allowRSessionAccess) {
|
|
101
114
|
if (statement.startsWith(':')) {
|
|
102
115
|
const command = statement.slice(1).split(' ')[0].toLowerCase();
|
|
@@ -147,12 +160,11 @@ async function replProcessAnswer(output, expr, parser, allowRSessionAccess) {
|
|
|
147
160
|
* For the execution, this function makes use of {@link replProcessAnswer}.
|
|
148
161
|
*
|
|
149
162
|
*/
|
|
150
|
-
async function repl({ parser = new shell_1.RShell({ revive: 2 /* RShellReviveOptions.Always */ }), rl = readline.createInterface(
|
|
163
|
+
async function repl({ parser = new shell_1.RShell({ revive: 2 /* RShellReviveOptions.Always */ }), rl = readline.createInterface(makeDefaultReplReadline()), output = repl_main_1.standardReplOutput, historyFile = defaultHistoryFile, allowRSessionAccess = false }) {
|
|
151
164
|
if (historyFile) {
|
|
152
165
|
rl.on('history', h => fs_1.default.writeFileSync(historyFile, h.join('\n'), { encoding: 'utf-8' }));
|
|
153
166
|
}
|
|
154
167
|
// the incredible repl :D, we kill it with ':quit'
|
|
155
|
-
// eslint-disable-next-line no-constant-condition,@typescript-eslint/no-unnecessary-condition
|
|
156
168
|
while (true) {
|
|
157
169
|
await new Promise((resolve, reject) => {
|
|
158
170
|
rl.question((0, prompt_1.prompt)(), answer => {
|
|
@@ -166,9 +178,16 @@ async function repl({ parser = new shell_1.RShell({ revive: 2 /* RShellReviveOpt
|
|
|
166
178
|
}
|
|
167
179
|
}
|
|
168
180
|
function loadReplHistory(historyFile) {
|
|
169
|
-
|
|
181
|
+
try {
|
|
182
|
+
if (!fs_1.default.existsSync(historyFile)) {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
return fs_1.default.readFileSync(historyFile, { encoding: 'utf-8' }).split('\n');
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
log_1.log.error(`Failed to load repl history from ${historyFile}: ${e?.message}`);
|
|
189
|
+
log_1.log.error(e?.stack);
|
|
170
190
|
return undefined;
|
|
171
191
|
}
|
|
172
|
-
return fs_1.default.readFileSync(historyFile, { encoding: 'utf-8' }).split('\n');
|
|
173
192
|
}
|
|
174
193
|
//# sourceMappingURL=core.js.map
|
|
@@ -6,7 +6,8 @@ const repl_version_1 = require("./commands/repl-version");
|
|
|
6
6
|
async function versionReplString(parser) {
|
|
7
7
|
const version = await (0, repl_version_1.retrieveVersionInformation)(parser);
|
|
8
8
|
const rVersion = version.r === 'none' ? '' : version.r === 'unknown' ? ', R version unknown' : `, R v${version.r}`;
|
|
9
|
-
|
|
9
|
+
const treeSitterVer = parser.name === 'tree-sitter' ? `, R grammar v${parser.treeSitterVersion()}` : '';
|
|
10
|
+
return `flowR repl using flowR v${version.flowr}${rVersion}${treeSitterVer} (${version.engine} engine)`;
|
|
10
11
|
}
|
|
11
12
|
async function printVersionRepl(parser) {
|
|
12
13
|
console.log(await versionReplString(parser));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.baseMessage = void 0;
|
|
27
37
|
/**
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.responseExecuteReplEndMessage = exports.responseExecuteReplIntermediateMessage = exports.requestExecuteReplExpressionMessage = void 0;
|
|
27
37
|
const Joi = __importStar(require("joi"));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.responseSliceMessage = exports.requestSliceMessage = void 0;
|
|
27
37
|
const Joi = __importStar(require("joi"));
|
|
@@ -21,7 +21,6 @@ const time_1 = require("../../util/time");
|
|
|
21
21
|
const tar_1 = require("tar");
|
|
22
22
|
const ansi_1 = require("../../util/ansi");
|
|
23
23
|
function compressFolder(folder, target) {
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
|
25
24
|
return (0, tar_1.create)({
|
|
26
25
|
gzip: true,
|
|
27
26
|
file: target,
|
package/config.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface FlowrConfigOptions extends MergeableRecord {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
|
-
* The engines to use for interacting with R code. Currently supports {@link TreeSitterEngineConfig} and {@link RShellEngineConfig}.
|
|
32
|
+
* The engines to use for interacting with R code. Currently, supports {@link TreeSitterEngineConfig} and {@link RShellEngineConfig}.
|
|
33
33
|
* An empty array means all available engines will be used.
|
|
34
34
|
*/
|
|
35
35
|
readonly engines: readonly EngineConfig[];
|
|
@@ -37,7 +37,7 @@ export interface FlowrConfigOptions extends MergeableRecord {
|
|
|
37
37
|
* The default engine to use for interacting with R code. If this is undefined, an arbitrary engine from {@link engines} will be used.
|
|
38
38
|
*/
|
|
39
39
|
readonly defaultEngine?: EngineConfig['type'];
|
|
40
|
-
/** How to resolve constants, constraints, cells,
|
|
40
|
+
/** How to resolve constants, constraints, cells, … */
|
|
41
41
|
readonly solver: {
|
|
42
42
|
/**
|
|
43
43
|
* How to resolve variables and their values
|
package/config.js
CHANGED
|
@@ -110,7 +110,13 @@ function amendConfig(amendment) {
|
|
|
110
110
|
function getConfig() {
|
|
111
111
|
// lazy-load the config based on the current settings
|
|
112
112
|
if (currentConfig === undefined) {
|
|
113
|
-
|
|
113
|
+
try {
|
|
114
|
+
setConfig(loadConfigFromFile(configFile, configWorkingDirectory));
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
log_1.log.error(`Failed to load config: ${e.message}`);
|
|
118
|
+
setConfig(exports.defaultConfigOptions);
|
|
119
|
+
}
|
|
114
120
|
}
|
|
115
121
|
return currentConfig;
|
|
116
122
|
}
|
|
@@ -17,8 +17,10 @@ import type { AstIdMap } from '../../r-bridge/lang-4.x/ast/model/processing/deco
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function resolveByName(name: Identifier, environment: REnvironmentInformation, target?: ReferenceType): IdentifierDefinition[] | undefined;
|
|
19
19
|
export declare function resolvesToBuiltInConstant(name: Identifier | undefined, environment: REnvironmentInformation, wantedValue: unknown): Ternary;
|
|
20
|
+
/** Please use {@link resolveValueOfVariable} */
|
|
20
21
|
export declare function resolveToConstants(name: Identifier | undefined, environment: REnvironmentInformation): unknown[] | undefined;
|
|
21
22
|
export declare function getAliases(sourceIds: readonly NodeId[], dataflow: DataflowGraph, environment: REnvironmentInformation): NodeId[] | undefined;
|
|
23
|
+
/** Please use {@link resolveValueOfVariable} */
|
|
22
24
|
export declare function resolveToValues(identifier: Identifier | undefined, environment: REnvironmentInformation, idMap?: AstIdMap): unknown[] | undefined;
|
|
23
25
|
/**
|
|
24
26
|
* Convenience function using the variable resolver as specified within the configuration file
|
|
@@ -90,6 +90,7 @@ function resolvesToBuiltInConstant(name, environment, wantedValue) {
|
|
|
90
90
|
return some ? logic_1.Ternary.Maybe : logic_1.Ternary.Never;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
/** Please use {@link resolveValueOfVariable} */
|
|
93
94
|
function resolveToConstants(name, environment) {
|
|
94
95
|
if (name === undefined) {
|
|
95
96
|
return undefined;
|
|
@@ -147,6 +148,7 @@ function getAliases(sourceIds, dataflow, environment) {
|
|
|
147
148
|
}
|
|
148
149
|
return [...definitions];
|
|
149
150
|
}
|
|
151
|
+
/** Please use {@link resolveValueOfVariable} */
|
|
150
152
|
function resolveToValues(identifier, environment, idMap) {
|
|
151
153
|
if (identifier === undefined) {
|
|
152
154
|
return undefined;
|
|
@@ -47,4 +47,4 @@ export interface AssignmentToSymbolParameters<OtherInfo> extends AssignmentConfi
|
|
|
47
47
|
export declare function markAsAssignment(information: {
|
|
48
48
|
environment: REnvironmentInformation;
|
|
49
49
|
graph: DataflowGraph;
|
|
50
|
-
}, nodeToDefine: InGraphIdentifierDefinition, sourceIds: readonly NodeId[], rootIdOfAssignment: NodeId, config?: AssignmentConfiguration
|
|
50
|
+
}, nodeToDefine: InGraphIdentifierDefinition, sourceIds: readonly NodeId[], rootIdOfAssignment: NodeId, config?: AssignmentConfiguration): void;
|
|
@@ -69,7 +69,7 @@ Requests for the [REPL](#message-request-repl) are independent of that.
|
|
|
69
69
|
The request allows the server to analyze a file and prepare it for slicing.
|
|
70
70
|
The message can contain a \`filetoken\`, which is used to identify the file in later slice or lineage requests (if you do not add one, the request will not be stored and therefore, it is not available for subsequent requests).
|
|
71
71
|
|
|
72
|
-
>
|
|
72
|
+
> **Please note!**\\
|
|
73
73
|
> If you want to send and process a lot of analysis requests, but do not want to slice them, please do not pass the \`filetoken\` field. This will save the server a lot of memory allocation.
|
|
74
74
|
|
|
75
75
|
Furthermore, the request must contain either a \`content\` field to directly pass the file's content or a \`filepath\` field which contains the path to the file (this path must be accessible for the server to be useful).
|
|
@@ -420,7 +420,6 @@ See [above](#message-request-file-analysis) for the general structure of the res
|
|
|
420
420
|
{
|
|
421
421
|
type: 'compound',
|
|
422
422
|
query: 'call-context',
|
|
423
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- otherwise we would have to carry generic typing information through the test infrastrcuture
|
|
424
423
|
commonArguments: {
|
|
425
424
|
kind: 'visualize',
|
|
426
425
|
subkind: 'text',
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.autoGenHeader = autoGenHeader;
|
|
4
|
+
exports.fileNameForGenHeader = fileNameForGenHeader;
|
|
4
5
|
const version_1 = require("../../util/version");
|
|
5
6
|
const doc_files_1 = require("./doc-files");
|
|
6
7
|
function autoGenHeader({ rVersion, filename, purpose, currentDateAndTime = new Date().toISOString().replace('T', ', ').replace(/\.\d+Z$/, ' UTC') }) {
|
|
8
|
+
return `_This document was generated from '${fileNameForGenHeader(filename)}' on ${currentDateAndTime} presenting an overview of flowR's ${purpose} (v${(0, version_1.flowrVersion)().format()}${rVersion ? ', using R v' + rVersion : ''}). Please do not edit this file/wiki page directly._`;
|
|
9
|
+
}
|
|
10
|
+
function fileNameForGenHeader(filename) {
|
|
7
11
|
const shortenFilename = filename.replace(/^.*src\//, 'src/');
|
|
8
|
-
return
|
|
12
|
+
return (0, doc_files_1.linkFlowRSourceFile)(shortenFilename);
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=doc-auto-gen.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface BenchmarkData {
|
|
2
|
+
readonly lastUpdate: number;
|
|
3
|
+
readonly repoUrl: string;
|
|
4
|
+
readonly entries: Record<string, [BenchmarkElement]>;
|
|
5
|
+
}
|
|
6
|
+
interface BenchmarkElement {
|
|
7
|
+
readonly commit: Record<string, unknown>;
|
|
8
|
+
readonly date: number;
|
|
9
|
+
readonly tool: string;
|
|
10
|
+
readonly benches: BenchmarkElementBench[];
|
|
11
|
+
}
|
|
12
|
+
interface BenchmarkElementBench {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly value: number;
|
|
15
|
+
readonly unit: string;
|
|
16
|
+
readonly range: number;
|
|
17
|
+
readonly extra: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function loadBenchmarkData(): Promise<BenchmarkData>;
|
|
20
|
+
export declare function getLatestBenchmark(suite: string): Promise<BenchmarkElement>;
|
|
21
|
+
export declare function getLastBenchmarkUpdate(): Promise<number>;
|
|
22
|
+
export declare function getLatestDfAnalysisTime(suite: string): Promise<number>;
|
|
23
|
+
export {};
|