@eagleoutice/flowr 2.10.10 → 2.11.0
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 +37 -29
- package/cli/common/options.d.ts +2 -108
- package/cli/common/options.js +3 -27
- package/cli/common/scripts-info.d.ts +2 -123
- package/cli/common/scripts-info.js +0 -17
- package/cli/flowr-main-options.d.ts +5 -0
- package/cli/flowr-main-options.js +10 -0
- package/cli/flowr.js +1 -1
- package/cli/repl/print-version.d.ts +3 -1
- package/cli/repl/print-version.js +21 -2
- package/cli/repl/server/connection.d.ts +2 -0
- package/cli/repl/server/connection.js +40 -31
- package/cli/script-core/summarizer-core.js +13 -32
- package/cli/wiki.d.ts +2 -1
- package/cli/wiki.js +2 -0
- package/config.d.ts +13 -0
- package/config.js +8 -0
- package/control-flow/semantic-cfg-guided-visitor.js +1 -0
- package/core/steps/pipeline/default-pipelines.d.ts +146 -146
- package/data/pkgdb/pkgdb-latest.json.br +0 -0
- package/data/pkgdb/pkgdb-tiny.json.br +0 -0
- package/dataflow/environments/append.d.ts +1 -2
- package/dataflow/environments/append.js +3 -10
- package/dataflow/environments/apply-kill.d.ts +21 -0
- package/dataflow/environments/apply-kill.js +155 -0
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in.d.ts +2 -0
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +63 -3
- package/dataflow/environments/default-builtin-config.js +40 -8
- package/dataflow/environments/environment.d.ts +49 -32
- package/dataflow/environments/environment.js +133 -18
- package/dataflow/environments/identifier.d.ts +10 -0
- package/dataflow/environments/identifier.js +23 -0
- package/dataflow/environments/overwrite.js +2 -10
- package/dataflow/environments/resolve-by-name.d.ts +1 -1
- package/dataflow/environments/resolve-by-name.js +10 -2
- package/dataflow/environments/scoping.d.ts +9 -2
- package/dataflow/environments/scoping.js +15 -2
- package/dataflow/extractor.js +23 -2
- package/dataflow/graph/df-helper.d.ts +8 -0
- package/dataflow/graph/df-helper.js +8 -0
- package/dataflow/graph/graph.d.ts +4 -1
- package/dataflow/graph/graph.js +5 -1
- package/dataflow/info.d.ts +26 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +19 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +7 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +9 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +30 -47
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +17 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +8 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +9 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +37 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +391 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +131 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +25 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +94 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +10 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +30 -0
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +279 -0
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +17 -0
- package/documentation/data/faq/faqs.js +3 -0
- package/documentation/data/interface/doc-writing-code.js +4 -80
- package/documentation/doc-util/doc-structure.js +1 -2
- package/documentation/wiki-core.js +2 -1
- package/documentation/wiki-dataflow-graph.js +35 -1
- package/documentation/wiki-interface.js +3 -2
- package/documentation/wiki-linter.js +2 -0
- package/documentation/wiki-overview.js +1 -14
- package/documentation/wiki-package-database.d.ts +9 -0
- package/documentation/wiki-package-database.js +63 -0
- package/documentation/wiki-query.js +1 -0
- package/linter/linter-rules.d.ts +23 -0
- package/linter/linter-rules.js +3 -1
- package/linter/rules/absolute-path.js +2 -1
- package/linter/rules/undefined-symbol.d.ts +39 -0
- package/linter/rules/undefined-symbol.js +80 -0
- package/package.json +3 -4
- package/project/cache/flowr-analyzer-cache.d.ts +2 -0
- package/project/cache/flowr-analyzer-cache.js +9 -1
- package/project/context/flowr-analyzer-dependencies-context.d.ts +16 -8
- package/project/context/flowr-analyzer-dependencies-context.js +36 -4
- package/project/context/flowr-analyzer-environment-context.d.ts +2 -4
- package/project/context/flowr-analyzer-environment-context.js +3 -4
- 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/flowr-analyzer-builder.js +3 -0
- package/project/flowr-analyzer.d.ts +2 -1
- package/project/flowr-analyzer.js +3 -1
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +13 -15
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +36 -13
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +27 -0
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +41 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +18 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +62 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-pkgdb-plugin.d.ts +63 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-pkgdb-plugin.js +174 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +10 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +6 -0
- package/project/plugins/package-version-plugins/package.d.ts +3 -0
- package/project/plugins/package-version-plugins/package.js +12 -0
- package/project/plugins/package-version-plugins/pkgdb.d.ts +133 -0
- package/project/plugins/package-version-plugins/pkgdb.js +370 -0
- package/project/plugins/plugin-registry.d.ts +4 -1
- package/project/plugins/plugin-registry.js +7 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +8 -0
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -0
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +8 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +31 -3
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +3 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +3 -2
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/other-path-functions.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/other-path-functions.js +27 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +5 -4
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +3 -1
- package/queries/catalog/linter-query/linter-query-executor.js +1 -0
- package/r-bridge/data/data.d.ts +2 -2
- package/r-bridge/data/data.js +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +13 -4
- package/search/search-executor/search-enrichers.d.ts +1 -1
- package/search/search-executor/search-enrichers.js +7 -4
- package/util/mermaid/mermaid.d.ts +4 -0
- package/util/mermaid/mermaid.js +8 -1
- package/util/version.js +10 -2
- package/cli/common/features.d.ts +0 -9
- package/cli/common/features.js +0 -35
- package/cli/script-core/statistics-core.d.ts +0 -6
- package/cli/script-core/statistics-core.js +0 -104
- package/cli/script-core/statistics-helper-core.d.ts +0 -6
- package/cli/script-core/statistics-helper-core.js +0 -86
- package/cli/statistics-app.d.ts +0 -11
- package/cli/statistics-app.js +0 -16
- package/cli/statistics-helper-app.d.ts +0 -11
- package/cli/statistics-helper-app.js +0 -14
- package/statistics/features/common-syntax-probability.d.ts +0 -38
- package/statistics/features/common-syntax-probability.js +0 -169
- package/statistics/features/feature.d.ts +0 -179
- package/statistics/features/feature.js +0 -38
- package/statistics/features/post-processing.d.ts +0 -18
- package/statistics/features/post-processing.js +0 -26
- package/statistics/features/supported/assignments/assignments.d.ts +0 -12
- package/statistics/features/supported/assignments/assignments.js +0 -56
- package/statistics/features/supported/assignments/post-process.d.ts +0 -6
- package/statistics/features/supported/assignments/post-process.js +0 -126
- package/statistics/features/supported/comments/comments.d.ts +0 -18
- package/statistics/features/supported/comments/comments.js +0 -143
- package/statistics/features/supported/comments/post-process.d.ts +0 -6
- package/statistics/features/supported/comments/post-process.js +0 -51
- package/statistics/features/supported/control-flow/control-flow.d.ts +0 -17
- package/statistics/features/supported/control-flow/control-flow.js +0 -69
- package/statistics/features/supported/control-flow/post-process.d.ts +0 -6
- package/statistics/features/supported/control-flow/post-process.js +0 -66
- package/statistics/features/supported/data-access/data-access.d.ts +0 -15
- package/statistics/features/supported/data-access/data-access.js +0 -122
- package/statistics/features/supported/data-access/post-process.d.ts +0 -6
- package/statistics/features/supported/data-access/post-process.js +0 -108
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +0 -34
- package/statistics/features/supported/defined-functions/defined-functions.js +0 -145
- package/statistics/features/supported/defined-functions/post-process.d.ts +0 -6
- package/statistics/features/supported/defined-functions/post-process.js +0 -168
- package/statistics/features/supported/expression-list/post-process.d.ts +0 -6
- package/statistics/features/supported/expression-list/post-process.js +0 -45
- package/statistics/features/supported/expression-list/statistics-expression-list.d.ts +0 -9
- package/statistics/features/supported/expression-list/statistics-expression-list.js +0 -37
- package/statistics/features/supported/loops/loops.d.ts +0 -20
- package/statistics/features/supported/loops/loops.js +0 -81
- package/statistics/features/supported/loops/post-process.d.ts +0 -6
- package/statistics/features/supported/loops/post-process.js +0 -73
- package/statistics/features/supported/used-functions/post-process.d.ts +0 -6
- package/statistics/features/supported/used-functions/post-process.js +0 -176
- package/statistics/features/supported/used-functions/used-functions.d.ts +0 -24
- package/statistics/features/supported/used-functions/used-functions.js +0 -99
- package/statistics/features/supported/used-packages/post-process.d.ts +0 -6
- package/statistics/features/supported/used-packages/post-process.js +0 -122
- package/statistics/features/supported/used-packages/used-packages.d.ts +0 -16
- package/statistics/features/supported/used-packages/used-packages.js +0 -140
- package/statistics/features/supported/values/post-process.d.ts +0 -6
- package/statistics/features/supported/values/post-process.js +0 -73
- package/statistics/features/supported/values/values.d.ts +0 -14
- package/statistics/features/supported/values/values.js +0 -111
- package/statistics/features/supported/variables/post-process.d.ts +0 -15
- package/statistics/features/supported/variables/post-process.js +0 -126
- package/statistics/features/supported/variables/variables.d.ts +0 -15
- package/statistics/features/supported/variables/variables.js +0 -62
- package/statistics/meta-statistics.d.ts +0 -32
- package/statistics/meta-statistics.js +0 -16
- package/statistics/output/file-provider.d.ts +0 -36
- package/statistics/output/file-provider.js +0 -96
- package/statistics/output/print-stats.d.ts +0 -29
- package/statistics/output/print-stats.js +0 -81
- package/statistics/output/statistics-file.d.ts +0 -36
- package/statistics/output/statistics-file.js +0 -68
- package/statistics/statistics.d.ts +0 -29
- package/statistics/statistics.js +0 -108
- package/statistics/summarizer/auto-detect.d.ts +0 -5
- package/statistics/summarizer/auto-detect.js +0 -34
- package/statistics/summarizer/first-phase/process.d.ts +0 -6
- package/statistics/summarizer/first-phase/process.js +0 -81
- package/statistics/summarizer/post-process/clusterer.d.ts +0 -25
- package/statistics/summarizer/post-process/clusterer.js +0 -40
- package/statistics/summarizer/post-process/file-based-count.d.ts +0 -16
- package/statistics/summarizer/post-process/file-based-count.js +0 -47
- package/statistics/summarizer/post-process/histogram.d.ts +0 -57
- package/statistics/summarizer/post-process/histogram.js +0 -126
- package/statistics/summarizer/post-process/post-process-output.d.ts +0 -14
- package/statistics/summarizer/post-process/post-process-output.js +0 -102
- package/statistics/summarizer/second-phase/process.d.ts +0 -15
- package/statistics/summarizer/second-phase/process.js +0 -118
- package/statistics/summarizer/summarizer.d.ts +0 -34
- package/statistics/summarizer/summarizer.js +0 -141
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
|
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
26
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
27
|
-
flowR repl
|
|
27
|
+
flowR repl v2.10.10, R grammar v14 (tree-sitter engine, pkg-db: latest/2026-05-23)
|
|
28
28
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -33,13 +33,13 @@ It offers a wide variety of features, for example:
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
Query: linter (
|
|
36
|
+
Query: linter (24 ms)
|
|
37
37
|
╰ Deprecated Functions (deprecated-functions):
|
|
38
|
-
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs:
|
|
38
|
+
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0
|
|
39
39
|
╰ File Path Validity (file-path-validity):
|
|
40
40
|
╰ certain:
|
|
41
41
|
╰ Path `/root/x.txt` at 1.1-23
|
|
42
|
-
╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs:
|
|
42
|
+
╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 22, processTimeMs: 0
|
|
43
43
|
╰ Seeded Randomness (seeded-randomness):
|
|
44
44
|
╰ Metadata: consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0
|
|
45
45
|
╰ Absolute Paths (absolute-file-paths):
|
|
@@ -53,7 +53,7 @@ It offers a wide variety of features, for example:
|
|
|
53
53
|
╰ Network Functions (network-functions):
|
|
54
54
|
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
|
|
55
55
|
╰ Dataframe Access Validation (dataframe-access-validation):
|
|
56
|
-
╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs:
|
|
56
|
+
╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1
|
|
57
57
|
╰ Dead Code (dead-code):
|
|
58
58
|
╰ Metadata: searchTimeMs: 0, processTimeMs: 0
|
|
59
59
|
╰ Useless Loops (useless-loop):
|
|
@@ -74,7 +74,9 @@ It offers a wide variety of features, for example:
|
|
|
74
74
|
╰ Metadata: testFilesFound: 0, testCallsFound: 0, searchTimeMs: 0, processTimeMs: 0
|
|
75
75
|
╰ No Leaked Credentials (no-leaked-credentials):
|
|
76
76
|
╰ Metadata: totalChecked: 0, searchTimeMs: 0, processTimeMs: 0
|
|
77
|
-
|
|
77
|
+
╰ Undefined Symbol (undefined-symbol):
|
|
78
|
+
╰ Metadata: totalCalls: 1, searchTimeMs: 0, processTimeMs: 0
|
|
79
|
+
All queries together required ≈24 ms (1ms accuracy, total 24 ms)
|
|
78
80
|
```
|
|
79
81
|
|
|
80
82
|
|
|
@@ -96,19 +98,19 @@ It offers a wide variety of features, for example:
|
|
|
96
98
|
|
|
97
99
|
_Results (prettified and summarized):_
|
|
98
100
|
|
|
99
|
-
Query: **linter** (
|
|
101
|
+
Query: **linter** (27 ms)\
|
|
100
102
|
╰ **Deprecated Functions** (deprecated-functions):\
|
|
101
|
-
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs:
|
|
103
|
+
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0</code>\
|
|
102
104
|
╰ **File Path Validity** (file-path-validity):\
|
|
103
105
|
╰ certain:\
|
|
104
106
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
105
|
-
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs:
|
|
107
|
+
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 25, processTimeMs: 0</code>\
|
|
106
108
|
╰ **Seeded Randomness** (seeded-randomness):\
|
|
107
109
|
╰ _Metadata_: <code>consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
108
110
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
109
111
|
╰ certain:\
|
|
110
112
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
111
|
-
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs:
|
|
113
|
+
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
112
114
|
╰ **Unused Definitions** (unused-definitions):\
|
|
113
115
|
╰ _Metadata_: <code>totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
114
116
|
╰ **Naming Convention** (naming-convention):\
|
|
@@ -116,7 +118,7 @@ It offers a wide variety of features, for example:
|
|
|
116
118
|
╰ **Network Functions** (network-functions):\
|
|
117
119
|
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
118
120
|
╰ **Dataframe Access Validation** (dataframe-access-validation):\
|
|
119
|
-
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs:
|
|
121
|
+
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1</code>\
|
|
120
122
|
╰ **Dead Code** (dead-code):\
|
|
121
123
|
╰ _Metadata_: <code>searchTimeMs: 0, processTimeMs: 0</code>\
|
|
122
124
|
╰ **Useless Loops** (useless-loop):\
|
|
@@ -137,11 +139,13 @@ It offers a wide variety of features, for example:
|
|
|
137
139
|
╰ _Metadata_: <code>testFilesFound: 0, testCallsFound: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
138
140
|
╰ **No Leaked Credentials** (no-leaked-credentials):\
|
|
139
141
|
╰ _Metadata_: <code>totalChecked: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
140
|
-
|
|
142
|
+
╰ **Undefined Symbol** (undefined-symbol):\
|
|
143
|
+
╰ _Metadata_: <code>totalCalls: 1, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
144
|
+
_All queries together required ≈27 ms (1ms accuracy, total 27 ms)_
|
|
141
145
|
|
|
142
146
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
143
147
|
|
|
144
|
-
The analysis required
|
|
148
|
+
The analysis required _27.1 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
145
149
|
|
|
146
150
|
In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
|
|
147
151
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -158,7 +162,7 @@ It offers a wide variety of features, for example:
|
|
|
158
162
|
".meta": {
|
|
159
163
|
"totalCalls": 0,
|
|
160
164
|
"totalFunctionDefinitions": 0,
|
|
161
|
-
"searchTimeMs":
|
|
165
|
+
"searchTimeMs": 1,
|
|
162
166
|
"processTimeMs": 0
|
|
163
167
|
}
|
|
164
168
|
},
|
|
@@ -181,7 +185,7 @@ It offers a wide variety of features, for example:
|
|
|
181
185
|
"totalUnknown": 0,
|
|
182
186
|
"totalWritesBeforeAlways": 0,
|
|
183
187
|
"totalValid": 0,
|
|
184
|
-
"searchTimeMs":
|
|
188
|
+
"searchTimeMs": 25,
|
|
185
189
|
"processTimeMs": 0
|
|
186
190
|
}
|
|
187
191
|
},
|
|
@@ -213,7 +217,7 @@ It offers a wide variety of features, for example:
|
|
|
213
217
|
".meta": {
|
|
214
218
|
"totalConsidered": 1,
|
|
215
219
|
"totalUnknown": 0,
|
|
216
|
-
"searchTimeMs":
|
|
220
|
+
"searchTimeMs": 0,
|
|
217
221
|
"processTimeMs": 0
|
|
218
222
|
}
|
|
219
223
|
},
|
|
@@ -250,7 +254,7 @@ It offers a wide variety of features, for example:
|
|
|
250
254
|
"numAccesses": 0,
|
|
251
255
|
"totalAccessed": 0,
|
|
252
256
|
"searchTimeMs": 0,
|
|
253
|
-
"processTimeMs":
|
|
257
|
+
"processTimeMs": 1
|
|
254
258
|
}
|
|
255
259
|
},
|
|
256
260
|
"dead-code": {
|
|
@@ -335,14 +339,22 @@ It offers a wide variety of features, for example:
|
|
|
335
339
|
"searchTimeMs": 0,
|
|
336
340
|
"processTimeMs": 0
|
|
337
341
|
}
|
|
342
|
+
},
|
|
343
|
+
"undefined-symbol": {
|
|
344
|
+
"results": [],
|
|
345
|
+
".meta": {
|
|
346
|
+
"totalCalls": 1,
|
|
347
|
+
"searchTimeMs": 0,
|
|
348
|
+
"processTimeMs": 0
|
|
349
|
+
}
|
|
338
350
|
}
|
|
339
351
|
},
|
|
340
352
|
".meta": {
|
|
341
|
-
"timing":
|
|
353
|
+
"timing": 27
|
|
342
354
|
}
|
|
343
355
|
},
|
|
344
356
|
".meta": {
|
|
345
|
-
"timing":
|
|
357
|
+
"timing": 27
|
|
346
358
|
}
|
|
347
359
|
}
|
|
348
360
|
```
|
|
@@ -365,7 +377,6 @@ It offers a wide variety of features, for example:
|
|
|
365
377
|
|
|
366
378
|
|
|
367
379
|
</details>
|
|
368
|
-
|
|
369
380
|
|
|
370
381
|
|
|
371
382
|
* 🍕 **program slicing**\
|
|
@@ -407,7 +418,7 @@ It offers a wide variety of features, for example:
|
|
|
407
418
|
|
|
408
419
|
```shell
|
|
409
420
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
410
|
-
flowR repl
|
|
421
|
+
flowR repl v2.10.10, R grammar v14 (tree-sitter engine, pkg-db: latest/2026-05-23)
|
|
411
422
|
R> :query @static-slice (11@sum) file://test/testfiles/example.R
|
|
412
423
|
```
|
|
413
424
|
|
|
@@ -421,7 +432,7 @@ It offers a wide variety of features, for example:
|
|
|
421
432
|
N <- 10
|
|
422
433
|
for(i in 1:(N-1)) sum <- sum + i + w
|
|
423
434
|
sum
|
|
424
|
-
All queries together required ≈1 ms (1ms accuracy, total
|
|
435
|
+
All queries together required ≈1 ms (1ms accuracy, total 2 ms)
|
|
425
436
|
```
|
|
426
437
|
|
|
427
438
|
|
|
@@ -434,7 +445,6 @@ It offers a wide variety of features, for example:
|
|
|
434
445
|
|
|
435
446
|
|
|
436
447
|
</details>
|
|
437
|
-
|
|
438
448
|
|
|
439
449
|
* 📚 **dependency analysis**\
|
|
440
450
|
Given your analysis project, flowR offers a plethora of so-called [queries](https://github.com/flowr-analysis/flowr/wiki/query-api) to get more information about your code.
|
|
@@ -451,11 +461,10 @@ It offers a wide variety of features, for example:
|
|
|
451
461
|
|
|
452
462
|
|
|
453
463
|
|
|
454
|
-
</details>
|
|
455
|
-
|
|
464
|
+
</details>
|
|
456
465
|
|
|
457
466
|
* 🚀 **fast call-graph, data-, and control-flow graphs**\
|
|
458
|
-
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
467
|
+
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">107.1 ms</span></i> (as of Jul 2, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
|
|
459
468
|
_flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
|
|
460
469
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) for more details on the [dataflow graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) as well as [call graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph#perspectives-cg).
|
|
461
470
|
|
|
@@ -491,7 +500,7 @@ It offers a wide variety of features, for example:
|
|
|
491
500
|
|
|
492
501
|
```shell
|
|
493
502
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
494
|
-
flowR repl
|
|
503
|
+
flowR repl v2.10.10, R grammar v14 (tree-sitter engine, pkg-db: latest/2026-05-23)
|
|
495
504
|
R> :dataflow* test/testfiles/example.R
|
|
496
505
|
```
|
|
497
506
|
|
|
@@ -804,7 +813,7 @@ It offers a wide variety of features, for example:
|
|
|
804
813
|
```
|
|
805
814
|
|
|
806
815
|
|
|
807
|
-
(The analysis required _1.
|
|
816
|
+
(The analysis required _1.3 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
808
817
|
|
|
809
818
|
|
|
810
819
|
|
|
@@ -815,7 +824,6 @@ It offers a wide variety of features, for example:
|
|
|
815
824
|
|
|
816
825
|
|
|
817
826
|
</details>
|
|
818
|
-
|
|
819
827
|
|
|
820
828
|
If you want to use flowR and the features it provides, feel free to check out the:
|
|
821
829
|
|
package/cli/common/options.d.ts
CHANGED
|
@@ -282,112 +282,6 @@ export declare const slicerOptions: [{
|
|
|
282
282
|
readonly type: BooleanConstructor;
|
|
283
283
|
readonly description: "Instead of human-readable output, dump a lot of json with the results of all intermediate steps.";
|
|
284
284
|
}];
|
|
285
|
-
export declare const statisticOptions: [{
|
|
286
|
-
readonly name: "verbose";
|
|
287
|
-
readonly alias: "v";
|
|
288
|
-
readonly type: BooleanConstructor;
|
|
289
|
-
readonly description: "Run with verbose logging";
|
|
290
|
-
}, {
|
|
291
|
-
readonly name: "help";
|
|
292
|
-
readonly alias: "h";
|
|
293
|
-
readonly type: BooleanConstructor;
|
|
294
|
-
readonly description: "Print this usage guide";
|
|
295
|
-
}, {
|
|
296
|
-
readonly name: "limit";
|
|
297
|
-
readonly alias: "l";
|
|
298
|
-
readonly type: NumberConstructor;
|
|
299
|
-
readonly description: "Limit the number of files to process";
|
|
300
|
-
}, {
|
|
301
|
-
readonly name: "input";
|
|
302
|
-
readonly alias: "i";
|
|
303
|
-
readonly type: StringConstructor;
|
|
304
|
-
readonly description: "Pass a folder or file as src to read from";
|
|
305
|
-
readonly multiple: true;
|
|
306
|
-
readonly defaultOption: true;
|
|
307
|
-
readonly defaultValue: readonly [];
|
|
308
|
-
readonly typeLabel: "{underline files/folders}";
|
|
309
|
-
}, {
|
|
310
|
-
readonly name: "output-dir";
|
|
311
|
-
readonly alias: "o";
|
|
312
|
-
readonly type: StringConstructor;
|
|
313
|
-
readonly description: "Folder to write the output to";
|
|
314
|
-
readonly defaultValue: `${string}/statistics-out/${string}`;
|
|
315
|
-
readonly typeLabel: "{underline folder}";
|
|
316
|
-
}, {
|
|
317
|
-
readonly name: "dump-json";
|
|
318
|
-
readonly type: BooleanConstructor;
|
|
319
|
-
readonly description: "Write JSON output during the extraction";
|
|
320
|
-
readonly typeLabel: "{underline folder}";
|
|
321
|
-
}, {
|
|
322
|
-
readonly name: "no-ansi";
|
|
323
|
-
readonly type: BooleanConstructor;
|
|
324
|
-
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
325
|
-
}, {
|
|
326
|
-
readonly name: "parallel";
|
|
327
|
-
readonly alias: "p";
|
|
328
|
-
readonly type: StringConstructor;
|
|
329
|
-
readonly description: "Number of parallel executors (defaults to {italic max(cpu.count-1, 1)})";
|
|
330
|
-
readonly defaultValue: number;
|
|
331
|
-
readonly typeLabel: "{underline number}";
|
|
332
|
-
}, {
|
|
333
|
-
readonly name: "features";
|
|
334
|
-
readonly type: StringConstructor;
|
|
335
|
-
readonly description: `Features to track, supported are "all" or ${string}`;
|
|
336
|
-
readonly multiple: true;
|
|
337
|
-
readonly defaultValue: "all";
|
|
338
|
-
readonly typeLabel: "{underline names}";
|
|
339
|
-
}];
|
|
340
|
-
export declare const statisticHelperOptions: [{
|
|
341
|
-
readonly name: "verbose";
|
|
342
|
-
readonly alias: "v";
|
|
343
|
-
readonly type: BooleanConstructor;
|
|
344
|
-
readonly description: "Run with verbose logging";
|
|
345
|
-
}, {
|
|
346
|
-
readonly name: "help";
|
|
347
|
-
readonly alias: "h";
|
|
348
|
-
readonly type: BooleanConstructor;
|
|
349
|
-
readonly description: "Print this usage guide";
|
|
350
|
-
}, {
|
|
351
|
-
readonly name: "input";
|
|
352
|
-
readonly alias: "i";
|
|
353
|
-
readonly type: StringConstructor;
|
|
354
|
-
readonly description: "Pass single file as src to read from";
|
|
355
|
-
readonly multiple: false;
|
|
356
|
-
readonly defaultOption: true;
|
|
357
|
-
readonly typeLabel: "{underline file}";
|
|
358
|
-
}, {
|
|
359
|
-
readonly name: "output-dir";
|
|
360
|
-
readonly alias: "o";
|
|
361
|
-
readonly type: StringConstructor;
|
|
362
|
-
readonly description: "Folder to write the output to";
|
|
363
|
-
readonly typeLabel: "{underline folder}";
|
|
364
|
-
}, {
|
|
365
|
-
readonly name: "root-dir";
|
|
366
|
-
readonly type: StringConstructor;
|
|
367
|
-
readonly description: "Root dir for the statistics files";
|
|
368
|
-
readonly defaultValue: "";
|
|
369
|
-
}, {
|
|
370
|
-
readonly name: "compress";
|
|
371
|
-
readonly type: BooleanConstructor;
|
|
372
|
-
readonly description: "Compress the output folder to a single file";
|
|
373
|
-
readonly defaultValue: false;
|
|
374
|
-
}, {
|
|
375
|
-
readonly name: "dump-json";
|
|
376
|
-
readonly type: BooleanConstructor;
|
|
377
|
-
readonly description: "Write JSON output during the extraction";
|
|
378
|
-
readonly typeLabel: "{underline folder}";
|
|
379
|
-
}, {
|
|
380
|
-
readonly name: "no-ansi";
|
|
381
|
-
readonly type: BooleanConstructor;
|
|
382
|
-
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
383
|
-
}, {
|
|
384
|
-
readonly name: "features";
|
|
385
|
-
readonly type: StringConstructor;
|
|
386
|
-
readonly description: `Features to track, supported are "all" or ${string}`;
|
|
387
|
-
readonly multiple: true;
|
|
388
|
-
readonly defaultValue: "all";
|
|
389
|
-
readonly typeLabel: "{underline names}";
|
|
390
|
-
}];
|
|
391
285
|
export declare const summarizerOptions: [{
|
|
392
286
|
readonly name: "verbose";
|
|
393
287
|
readonly alias: "v";
|
|
@@ -402,7 +296,7 @@ export declare const summarizerOptions: [{
|
|
|
402
296
|
readonly name: "type";
|
|
403
297
|
readonly alias: "t";
|
|
404
298
|
readonly type: StringConstructor;
|
|
405
|
-
readonly description: "Manually specify if you want to post-process benchmark results
|
|
299
|
+
readonly description: "Manually specify if you want to post-process benchmark results (defaults to auto).";
|
|
406
300
|
readonly defaultValue: "auto";
|
|
407
301
|
}, {
|
|
408
302
|
readonly name: "graph";
|
|
@@ -428,7 +322,7 @@ export declare const summarizerOptions: [{
|
|
|
428
322
|
readonly name: "input";
|
|
429
323
|
readonly alias: "i";
|
|
430
324
|
readonly type: StringConstructor;
|
|
431
|
-
readonly description: "The {italic output} produced by the benchmark
|
|
325
|
+
readonly description: "The {italic output} produced by the benchmark";
|
|
432
326
|
readonly defaultOption: true;
|
|
433
327
|
readonly multiple: false;
|
|
434
328
|
readonly typeLabel: "{underline file.json/output}";
|
package/cli/common/options.js
CHANGED
|
@@ -3,10 +3,9 @@ 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.summarizerOptions = exports.
|
|
6
|
+
exports.summarizerOptions = exports.slicerOptions = exports.exportQuadsOptions = exports.benchmarkHelperOptions = exports.benchmarkOptions = void 0;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const time_1 = require("../../util/text/time");
|
|
9
|
-
const feature_1 = require("../../statistics/features/feature");
|
|
10
9
|
/**
|
|
11
10
|
* This string contains a string representation of the time this module was loaded.
|
|
12
11
|
*/
|
|
@@ -66,38 +65,15 @@ exports.slicerOptions = [
|
|
|
66
65
|
{ name: 'no-magic-comments', alias: 'm', type: Boolean, description: 'Disable the effects of magic comments which force lines to be included.' },
|
|
67
66
|
{ name: 'api', type: Boolean, description: 'Instead of human-readable output, dump a lot of json with the results of all intermediate steps.' },
|
|
68
67
|
];
|
|
69
|
-
const featureNameList = Array.from(feature_1.allFeatureNames).map(s => `"${s}"`).join(', ');
|
|
70
|
-
exports.statisticOptions = [
|
|
71
|
-
{ name: 'verbose', alias: 'v', type: Boolean, description: 'Run with verbose logging' },
|
|
72
|
-
{ name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide' },
|
|
73
|
-
{ name: 'limit', alias: 'l', type: Number, description: 'Limit the number of files to process' },
|
|
74
|
-
{ name: 'input', alias: 'i', type: String, description: 'Pass a folder or file as src to read from', multiple: true, defaultOption: true, defaultValue: [], typeLabel: '{underline files/folders}' },
|
|
75
|
-
{ name: 'output-dir', alias: 'o', type: String, description: 'Folder to write the output to', defaultValue: `${process.cwd()}/statistics-out/${(0, time_1.date2string)(new Date())}`, typeLabel: '{underline folder}' },
|
|
76
|
-
{ name: 'dump-json', type: Boolean, description: 'Write JSON output during the extraction', typeLabel: '{underline folder}' },
|
|
77
|
-
{ name: 'no-ansi', type: Boolean, description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.' },
|
|
78
|
-
{ name: 'parallel', alias: 'p', type: String, description: 'Number of parallel executors (defaults to {italic max(cpu.count-1, 1)})', defaultValue: Math.max(os_1.default.cpus().length - 1, 1), typeLabel: '{underline number}' },
|
|
79
|
-
{ name: 'features', type: String, description: `Features to track, supported are "all" or ${featureNameList}`, multiple: true, defaultValue: 'all', typeLabel: '{underline names}' },
|
|
80
|
-
];
|
|
81
|
-
exports.statisticHelperOptions = [
|
|
82
|
-
{ name: 'verbose', alias: 'v', type: Boolean, description: 'Run with verbose logging' },
|
|
83
|
-
{ name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide' },
|
|
84
|
-
{ name: 'input', alias: 'i', type: String, description: 'Pass single file as src to read from', multiple: false, defaultOption: true, typeLabel: '{underline file}' },
|
|
85
|
-
{ name: 'output-dir', alias: 'o', type: String, description: 'Folder to write the output to', typeLabel: '{underline folder}' },
|
|
86
|
-
{ name: 'root-dir', type: String, description: 'Root dir for the statistics files', defaultValue: '' },
|
|
87
|
-
{ name: 'compress', type: Boolean, description: 'Compress the output folder to a single file', defaultValue: false },
|
|
88
|
-
{ name: 'dump-json', type: Boolean, description: 'Write JSON output during the extraction', typeLabel: '{underline folder}' },
|
|
89
|
-
{ name: 'no-ansi', type: Boolean, description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.' },
|
|
90
|
-
{ name: 'features', type: String, description: `Features to track, supported are "all" or ${featureNameList}`, multiple: true, defaultValue: 'all', typeLabel: '{underline names}' },
|
|
91
|
-
];
|
|
92
68
|
exports.summarizerOptions = [
|
|
93
69
|
{ name: 'verbose', alias: 'v', type: Boolean, description: 'Run with verbose logging' },
|
|
94
70
|
{ name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide' },
|
|
95
|
-
{ name: 'type', alias: 't', type: String, description: 'Manually specify if you want to post-process benchmark results
|
|
71
|
+
{ name: 'type', alias: 't', type: String, description: 'Manually specify if you want to post-process benchmark results (defaults to auto).', defaultValue: 'auto' },
|
|
96
72
|
{ name: 'graph', alias: 'g', type: Boolean, description: 'Produce data to be used for visualizing benchmarks over time' },
|
|
97
73
|
{ name: 'categorize', type: Boolean, description: 'Categorize the results (e.g., "test", "example", ...)', defaultValue: false },
|
|
98
74
|
{ name: 'project-skip', type: Number, description: 'Skip the first n folders to find the location of projects', defaultValue: 0 },
|
|
99
75
|
{ name: 'ultimate-only', alias: 'u', type: Boolean, description: 'Only perform the second summary-stage, with this, the input is used to find the summary-output.' },
|
|
100
|
-
{ name: 'input', alias: 'i', type: String, description: 'The {italic output} produced by the benchmark
|
|
76
|
+
{ name: 'input', alias: 'i', type: String, description: 'The {italic output} produced by the benchmark', defaultOption: true, multiple: false, typeLabel: '{underline file.json/output}' },
|
|
101
77
|
{ name: 'output', alias: 'o', type: String, description: 'Basename of the summaries (defaults to {italic <input>-summary})', typeLabel: '{underline file}' },
|
|
102
78
|
];
|
|
103
79
|
//# sourceMappingURL=options.js.map
|
|
@@ -309,7 +309,7 @@ declare const _scripts: {
|
|
|
309
309
|
readonly name: "type";
|
|
310
310
|
readonly alias: "t";
|
|
311
311
|
readonly type: StringConstructor;
|
|
312
|
-
readonly description: "Manually specify if you want to post-process benchmark results
|
|
312
|
+
readonly description: "Manually specify if you want to post-process benchmark results (defaults to auto).";
|
|
313
313
|
readonly defaultValue: "auto";
|
|
314
314
|
}, {
|
|
315
315
|
readonly name: "graph";
|
|
@@ -335,7 +335,7 @@ declare const _scripts: {
|
|
|
335
335
|
readonly name: "input";
|
|
336
336
|
readonly alias: "i";
|
|
337
337
|
readonly type: StringConstructor;
|
|
338
|
-
readonly description: "The {italic output} produced by the benchmark
|
|
338
|
+
readonly description: "The {italic output} produced by the benchmark";
|
|
339
339
|
readonly defaultOption: true;
|
|
340
340
|
readonly multiple: false;
|
|
341
341
|
readonly typeLabel: "{underline file.json/output}";
|
|
@@ -387,127 +387,6 @@ declare const _scripts: {
|
|
|
387
387
|
}];
|
|
388
388
|
type: string;
|
|
389
389
|
};
|
|
390
|
-
stats: {
|
|
391
|
-
toolName: string;
|
|
392
|
-
target: string;
|
|
393
|
-
description: string;
|
|
394
|
-
options: [{
|
|
395
|
-
readonly name: "verbose";
|
|
396
|
-
readonly alias: "v";
|
|
397
|
-
readonly type: BooleanConstructor;
|
|
398
|
-
readonly description: "Run with verbose logging";
|
|
399
|
-
}, {
|
|
400
|
-
readonly name: "help";
|
|
401
|
-
readonly alias: "h";
|
|
402
|
-
readonly type: BooleanConstructor;
|
|
403
|
-
readonly description: "Print this usage guide";
|
|
404
|
-
}, {
|
|
405
|
-
readonly name: "limit";
|
|
406
|
-
readonly alias: "l";
|
|
407
|
-
readonly type: NumberConstructor;
|
|
408
|
-
readonly description: "Limit the number of files to process";
|
|
409
|
-
}, {
|
|
410
|
-
readonly name: "input";
|
|
411
|
-
readonly alias: "i";
|
|
412
|
-
readonly type: StringConstructor;
|
|
413
|
-
readonly description: "Pass a folder or file as src to read from";
|
|
414
|
-
readonly multiple: true;
|
|
415
|
-
readonly defaultOption: true;
|
|
416
|
-
readonly defaultValue: readonly [];
|
|
417
|
-
readonly typeLabel: "{underline files/folders}";
|
|
418
|
-
}, {
|
|
419
|
-
readonly name: "output-dir";
|
|
420
|
-
readonly alias: "o";
|
|
421
|
-
readonly type: StringConstructor;
|
|
422
|
-
readonly description: "Folder to write the output to";
|
|
423
|
-
readonly defaultValue: `${string}/statistics-out/${string}`;
|
|
424
|
-
readonly typeLabel: "{underline folder}";
|
|
425
|
-
}, {
|
|
426
|
-
readonly name: "dump-json";
|
|
427
|
-
readonly type: BooleanConstructor;
|
|
428
|
-
readonly description: "Write JSON output during the extraction";
|
|
429
|
-
readonly typeLabel: "{underline folder}";
|
|
430
|
-
}, {
|
|
431
|
-
readonly name: "no-ansi";
|
|
432
|
-
readonly type: BooleanConstructor;
|
|
433
|
-
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
434
|
-
}, {
|
|
435
|
-
readonly name: "parallel";
|
|
436
|
-
readonly alias: "p";
|
|
437
|
-
readonly type: StringConstructor;
|
|
438
|
-
readonly description: "Number of parallel executors (defaults to {italic max(cpu.count-1, 1)})";
|
|
439
|
-
readonly defaultValue: number;
|
|
440
|
-
readonly typeLabel: "{underline number}";
|
|
441
|
-
}, {
|
|
442
|
-
readonly name: "features";
|
|
443
|
-
readonly type: StringConstructor;
|
|
444
|
-
readonly description: `Features to track, supported are "all" or ${string}`;
|
|
445
|
-
readonly multiple: true;
|
|
446
|
-
readonly defaultValue: "all";
|
|
447
|
-
readonly typeLabel: "{underline names}";
|
|
448
|
-
}];
|
|
449
|
-
usageExample: string;
|
|
450
|
-
type: string;
|
|
451
|
-
};
|
|
452
|
-
'stats-helper': {
|
|
453
|
-
toolName: string;
|
|
454
|
-
target: string;
|
|
455
|
-
description: string;
|
|
456
|
-
options: [{
|
|
457
|
-
readonly name: "verbose";
|
|
458
|
-
readonly alias: "v";
|
|
459
|
-
readonly type: BooleanConstructor;
|
|
460
|
-
readonly description: "Run with verbose logging";
|
|
461
|
-
}, {
|
|
462
|
-
readonly name: "help";
|
|
463
|
-
readonly alias: "h";
|
|
464
|
-
readonly type: BooleanConstructor;
|
|
465
|
-
readonly description: "Print this usage guide";
|
|
466
|
-
}, {
|
|
467
|
-
readonly name: "input";
|
|
468
|
-
readonly alias: "i";
|
|
469
|
-
readonly type: StringConstructor;
|
|
470
|
-
readonly description: "Pass single file as src to read from";
|
|
471
|
-
readonly multiple: false;
|
|
472
|
-
readonly defaultOption: true;
|
|
473
|
-
readonly typeLabel: "{underline file}";
|
|
474
|
-
}, {
|
|
475
|
-
readonly name: "output-dir";
|
|
476
|
-
readonly alias: "o";
|
|
477
|
-
readonly type: StringConstructor;
|
|
478
|
-
readonly description: "Folder to write the output to";
|
|
479
|
-
readonly typeLabel: "{underline folder}";
|
|
480
|
-
}, {
|
|
481
|
-
readonly name: "root-dir";
|
|
482
|
-
readonly type: StringConstructor;
|
|
483
|
-
readonly description: "Root dir for the statistics files";
|
|
484
|
-
readonly defaultValue: "";
|
|
485
|
-
}, {
|
|
486
|
-
readonly name: "compress";
|
|
487
|
-
readonly type: BooleanConstructor;
|
|
488
|
-
readonly description: "Compress the output folder to a single file";
|
|
489
|
-
readonly defaultValue: false;
|
|
490
|
-
}, {
|
|
491
|
-
readonly name: "dump-json";
|
|
492
|
-
readonly type: BooleanConstructor;
|
|
493
|
-
readonly description: "Write JSON output during the extraction";
|
|
494
|
-
readonly typeLabel: "{underline folder}";
|
|
495
|
-
}, {
|
|
496
|
-
readonly name: "no-ansi";
|
|
497
|
-
readonly type: BooleanConstructor;
|
|
498
|
-
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
499
|
-
}, {
|
|
500
|
-
readonly name: "features";
|
|
501
|
-
readonly type: StringConstructor;
|
|
502
|
-
readonly description: `Features to track, supported are "all" or ${string}`;
|
|
503
|
-
readonly multiple: true;
|
|
504
|
-
readonly defaultValue: "all";
|
|
505
|
-
readonly typeLabel: "{underline names}";
|
|
506
|
-
}];
|
|
507
|
-
usageExample: string;
|
|
508
|
-
type: string;
|
|
509
|
-
masterScripts: string[];
|
|
510
|
-
};
|
|
511
390
|
};
|
|
512
391
|
export declare const scripts: Record<keyof typeof _scripts, ScriptInformation>;
|
|
513
392
|
/**
|
|
@@ -48,23 +48,6 @@ const _scripts = {
|
|
|
48
48
|
usageExample: 'export-quads "example.R" --output "example.quads"',
|
|
49
49
|
options: options_1.exportQuadsOptions,
|
|
50
50
|
type: 'master script',
|
|
51
|
-
},
|
|
52
|
-
'stats': {
|
|
53
|
-
toolName: 'stats',
|
|
54
|
-
target: 'statistics-app',
|
|
55
|
-
description: 'Generate usage Statistics for R scripts',
|
|
56
|
-
options: options_1.statisticOptions,
|
|
57
|
-
usageExample: 'stats -i example.R --output-dir "output-folder/"',
|
|
58
|
-
type: 'master script',
|
|
59
|
-
},
|
|
60
|
-
'stats-helper': {
|
|
61
|
-
toolName: 'stats-helper',
|
|
62
|
-
target: 'statistics-helper-app',
|
|
63
|
-
description: 'Generate usage Statistics for a single R script (parallel helper for stats)',
|
|
64
|
-
options: options_1.statisticHelperOptions,
|
|
65
|
-
usageExample: 'stats-helper -i example.R --output-dir "output-folder/"',
|
|
66
|
-
type: 'helper script',
|
|
67
|
-
masterScripts: ['stats']
|
|
68
51
|
}
|
|
69
52
|
};
|
|
70
53
|
exports.scripts = _scripts;
|
|
@@ -105,3 +105,8 @@ export declare const flowrMainOptionDefinitions: [{
|
|
|
105
105
|
readonly multiple: false;
|
|
106
106
|
}];
|
|
107
107
|
export declare const defaultConfigFile = "flowr.json";
|
|
108
|
+
/**
|
|
109
|
+
* Arguments to forward to a sub-script: everything the user passed except the script name token,
|
|
110
|
+
* which (being the default option) may appear before or after the main flowR options.
|
|
111
|
+
*/
|
|
112
|
+
export declare function getScriptArguments(script: string, argv?: readonly string[]): string[];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultConfigFile = exports.flowrMainOptionDefinitions = void 0;
|
|
4
4
|
exports.getScriptsText = getScriptsText;
|
|
5
|
+
exports.getScriptArguments = getScriptArguments;
|
|
5
6
|
const scripts_info_1 = require("./common/scripts-info");
|
|
6
7
|
let _scriptsText;
|
|
7
8
|
/**
|
|
@@ -128,4 +129,13 @@ exports.flowrMainOptionDefinitions = [
|
|
|
128
129
|
}
|
|
129
130
|
];
|
|
130
131
|
exports.defaultConfigFile = 'flowr.json';
|
|
132
|
+
/**
|
|
133
|
+
* Arguments to forward to a sub-script: everything the user passed except the script name token,
|
|
134
|
+
* which (being the default option) may appear before or after the main flowR options.
|
|
135
|
+
*/
|
|
136
|
+
function getScriptArguments(script, argv = process.argv) {
|
|
137
|
+
const passedArgs = argv.slice(2);
|
|
138
|
+
const scriptIndex = passedArgs.indexOf(script);
|
|
139
|
+
return scriptIndex < 0 ? [...passedArgs] : [...passedArgs.slice(0, scriptIndex), ...passedArgs.slice(scriptIndex + 1)];
|
|
140
|
+
}
|
|
131
141
|
//# sourceMappingURL=flowr-main-options.js.map
|
package/cli/flowr.js
CHANGED
|
@@ -152,7 +152,7 @@ async function mainRepl() {
|
|
|
152
152
|
(0, assert_1.guard)(target !== undefined, `Unknown script target "${options.script}", pick one of ${(0, flowr_main_options_1.getScriptsText)()}.`);
|
|
153
153
|
console.log(`Running script '${ansi_1.formatter.format(options.script, { style: 1 /* FontStyles.Bold */ })}'`);
|
|
154
154
|
log_1.log.debug(`Script maps to "${target}"`);
|
|
155
|
-
await (0, execute_1.waitOnScript)(`${__dirname}/${target}`, process.argv
|
|
155
|
+
await (0, execute_1.waitOnScript)(`${__dirname}/${target}`, (0, flowr_main_options_1.getScriptArguments)(options.script, process.argv), undefined, true);
|
|
156
156
|
return (0, proc_1.exitSafe)(0);
|
|
157
157
|
}
|
|
158
158
|
if (options.help) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { KnownParser } from '../../r-bridge/parser';
|
|
2
|
+
/** a short `, package database: <scope> <date>` suffix for the bundled database, or empty if none */
|
|
3
|
+
export declare function pkgDbReplSuffix(): string;
|
|
2
4
|
/**
|
|
3
|
-
* Returns a version string for the REPL including flowR and
|
|
5
|
+
* Returns a version string for the REPL including flowR, R, and the package database in use.
|
|
4
6
|
*/
|
|
5
7
|
export declare function versionReplString(parser: KnownParser): Promise<string>;
|
|
6
8
|
/**
|