@eagleoutice/flowr 2.12.3 → 2.13.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 +38 -91
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
- package/abstract-interpretation/data-frame/semantics.js +12 -16
- package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
- package/abstract-interpretation/domains/abstract-domain.js +146 -6
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
- package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
- package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
- package/abstract-interpretation/domains/interval-domain.js +111 -146
- package/abstract-interpretation/domains/lattice.d.ts +3 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
- package/abstract-interpretation/domains/partial-product-domain.js +21 -54
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +4 -4
- package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
- package/abstract-interpretation/domains/set-range-domain.js +141 -200
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
- package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
- package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
- package/abstract-interpretation/domains/singleton-domain.js +33 -72
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
- package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
- package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
- package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
- package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
- package/benchmark/slicer.d.ts +2 -2
- package/benchmark/slicer.js +6 -5
- package/cli/common/options.d.ts +10 -0
- package/cli/common/options.js +2 -0
- package/cli/common/scripts-info.d.ts +10 -0
- package/cli/flowr-main-options.d.ts +4 -0
- package/cli/flowr-main-options.js +5 -0
- package/cli/flowr.d.ts +5 -0
- package/cli/flowr.js +15 -7
- package/cli/repl/commands/repl-query.js +42 -20
- package/cli/repl/commands/repl-signature.js +2 -2
- package/cli/repl/core.d.ts +14 -5
- package/cli/repl/core.js +32 -17
- package/cli/repl/parser/slice-query-parser.d.ts +69 -8
- package/cli/repl/parser/slice-query-parser.js +82 -13
- package/cli/repl/path-input.d.ts +6 -0
- package/cli/repl/path-input.js +41 -0
- package/cli/repl/print-version.js +3 -5
- package/cli/slicer-app.d.ts +2 -0
- package/cli/slicer-app.js +2 -1
- package/config.d.ts +54 -6
- package/config.js +133 -12
- package/control-flow/control-flow-graph.d.ts +3 -2
- package/control-flow/control-flow-graph.js +34 -14
- package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
- package/control-flow/semantic-cfg-guided-visitor.js +3 -0
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
- package/data/r-base-packages.generated.d.ts +1 -1
- package/data/r-base-packages.generated.js +3 -3
- package/data/sigdb/sigdb.remote.json +53 -53
- 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 +3 -5
- package/dataflow/environments/default-builtin-config.js +2 -2
- package/dataflow/environments/environment.d.ts +9 -0
- package/dataflow/environments/environment.js +28 -7
- package/dataflow/environments/identifier.d.ts +1 -2
- package/dataflow/environments/identifier.js +1 -5
- package/dataflow/extractor.js +1 -2
- package/dataflow/graph/dataflowgraph-builder.js +42 -3
- package/dataflow/graph/df-helper.d.ts +15 -0
- package/dataflow/graph/df-helper.js +20 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
- package/documentation/data/faq/faqs.js +12 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +2 -2
- package/documentation/doc-util/doc-files.js +4 -7
- package/documentation/doc-util/doc-query.d.ts +12 -9
- package/documentation/doc-util/doc-query.js +63 -28
- package/documentation/wiki-absint.js +1 -4
- package/documentation/wiki-analyzer.js +8 -3
- package/documentation/wiki-cfg.js +3 -2
- package/documentation/wiki-dataflow-graph.js +14 -4
- package/documentation/wiki-interface.js +29 -16
- package/documentation/wiki-mk/doc-maker.js +1 -1
- package/documentation/wiki-query.js +189 -30
- package/documentation/wiki-signature-database.d.ts +1 -1
- package/documentation/wiki-signature-database.js +53 -27
- package/linter/linter-output.d.ts +24 -0
- package/linter/linter-output.js +117 -0
- package/linter/linter-rules.d.ts +2 -4
- package/linter/rules/dataframe-access-validation.js +4 -4
- package/linter/rules/deprecated-functions.d.ts +2 -4
- package/linter/rules/deprecated-functions.js +58 -3
- package/linter/rules/undefined-symbol.js +18 -10
- package/linter/rules/unused-definition.js +24 -0
- package/package.json +5 -2
- package/project/context/flowr-analyzer-context.d.ts +59 -1
- package/project/context/flowr-analyzer-context.js +118 -3
- package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
- package/project/context/flowr-analyzer-dependencies-context.js +33 -3
- package/project/context/flowr-analyzer-files-context.d.ts +32 -0
- package/project/context/flowr-analyzer-files-context.js +132 -14
- package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
- package/project/context/flowr-analyzer-loading-order-context.js +20 -0
- package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
- package/project/context/flowr-analyzer-meta-context.js +64 -23
- package/project/context/flowr-file.d.ts +7 -0
- package/project/context/flowr-file.js +7 -0
- package/project/context/project-kind.d.ts +22 -0
- package/project/context/project-kind.js +27 -0
- package/project/dependency-version-space.d.ts +166 -0
- package/project/dependency-version-space.js +564 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/flowr-analyzer.d.ts +4 -0
- package/project/flowr-analyzer.js +5 -0
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
- package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
- package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
- package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
- package/project/plugins/flowr-analyzer-plugin.js +5 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
- package/project/plugins/package-version-plugins/package.d.ts +4 -1
- package/project/plugins/package-version-plugins/package.js +8 -5
- package/project/plugins/plugin-registry.d.ts +11 -3
- package/project/plugins/plugin-registry.js +24 -5
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
- package/project/sigdb/build.js +12 -2
- package/project/sigdb/decode.d.ts +7 -0
- package/project/sigdb/decode.js +35 -4
- package/project/sigdb/decompress.d.ts +2 -0
- package/project/sigdb/decompress.js +5 -0
- package/project/sigdb/manifest.d.ts +5 -0
- package/project/sigdb/manifest.js +37 -6
- package/project/sigdb/reader.d.ts +82 -2
- package/project/sigdb/reader.js +226 -14
- package/project/sigdb/schema.d.ts +31 -5
- package/project/sigdb/schema.js +7 -3
- package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
- package/project/sigdb/sigdb-version.js +119 -0
- package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
- package/queries/catalog/absint-query/absint-query-format.js +2 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
- package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
- package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
- package/queries/catalog/config-query/config-query-executor.js +15 -6
- package/queries/catalog/config-query/config-query-format.d.ts +18 -4
- package/queries/catalog/config-query/config-query-format.js +246 -96
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
- package/queries/catalog/dice-query/dice-query-executor.js +6 -9
- package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
- package/queries/catalog/dice-query/dice-query-format.js +10 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
- package/queries/catalog/files-query/files-query-format.d.ts +2 -0
- package/queries/catalog/files-query/files-query-format.js +2 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +277 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +119 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +331 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
- package/queries/catalog/linter-query/linter-query-executor.js +11 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
- package/queries/catalog/linter-query/linter-query-format.js +44 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
- package/queries/catalog/origin-query/origin-query-format.js +2 -0
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
- package/queries/catalog/project-query/project-query-executor.js +19 -62
- package/queries/catalog/project-query/project-query-format.d.ts +7 -18
- package/queries/catalog/project-query/project-query-format.js +3 -18
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -0
- package/queries/catalog/search-query/search-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
- package/queries/catalog/signature-query/signature-query-executor.js +267 -57
- package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
- package/queries/catalog/signature-query/signature-query-format.js +41 -5
- package/queries/catalog/signature-query/signature-query-render.js +48 -6
- package/queries/catalog/slice-query-options.d.ts +49 -0
- package/queries/catalog/slice-query-options.js +50 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
- package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
- package/queries/query-print.js +3 -1
- package/queries/query.d.ts +63 -3
- package/queries/query.js +9 -2
- package/r-bridge/data/data.d.ts +16 -0
- package/r-bridge/data/data.js +20 -0
- package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
- package/reconstruct/reconstruct.d.ts +18 -1
- package/reconstruct/reconstruct.js +42 -19
- package/slicing/criterion/parse.d.ts +4 -0
- package/slicing/criterion/parse.js +4 -0
- package/slicing/static/slice-call.js +17 -9
- package/slicing/static/static-slicer.d.ts +1 -1
- package/slicing/static/static-slicer.js +5 -4
- package/util/files.d.ts +19 -1
- package/util/files.js +45 -3
- package/util/glob.d.ts +19 -0
- package/util/glob.js +67 -0
- package/util/log.d.ts +12 -0
- package/util/log.js +17 -1
- package/util/logic.d.ts +6 -0
- package/util/logic.js +31 -1
- package/util/mermaid/dfg.js +17 -12
- package/util/mermaid/mermaid.js +2 -2
- package/util/objects.d.ts +5 -0
- package/util/objects.js +8 -0
- package/util/r-version.d.ts +9 -1
- package/util/r-version.js +27 -2
- package/util/schema.d.ts +16 -0
- package/util/schema.js +89 -4
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +27 -3
- package/util/text/strings.d.ts +9 -0
- package/util/text/strings.js +29 -0
- package/util/version.js +79 -6
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
- package/project/sigdb/version.js +0 -55
|
@@ -10,7 +10,7 @@ export declare const descriptionFileLog: import("tslog").Logger<import("tslog").
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class FlowrAnalyzerDescriptionFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
12
12
|
readonly name = "flowr-analyzer-description-file-plugin";
|
|
13
|
-
readonly description = "
|
|
13
|
+
readonly description = "Reads DESCRIPTION files into key-value pairs.";
|
|
14
14
|
readonly version: SemVer;
|
|
15
15
|
private readonly pattern;
|
|
16
16
|
/**
|
|
@@ -14,7 +14,7 @@ const DescriptionFilePattern = /^DESCRIPTION(\.(txt|in))?$/i;
|
|
|
14
14
|
*/
|
|
15
15
|
class FlowrAnalyzerDescriptionFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
16
16
|
name = 'flowr-analyzer-description-file-plugin';
|
|
17
|
-
description = '
|
|
17
|
+
description = 'Reads DESCRIPTION files into key-value pairs.';
|
|
18
18
|
version = new semver_1.SemVer('0.1.0');
|
|
19
19
|
pattern;
|
|
20
20
|
/**
|
|
@@ -26,7 +26,7 @@ class FlowrAnalyzerFilePlugin extends flowr_analyzer_plugin_1.FlowrAnalyzerPlugi
|
|
|
26
26
|
exports.FlowrAnalyzerFilePlugin = FlowrAnalyzerFilePlugin;
|
|
27
27
|
class DefaultFlowrAnalyzerFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
28
28
|
name = 'default-file-plugin';
|
|
29
|
-
description = '
|
|
29
|
+
description = 'Assigns the default .r/.R files, nothing else.';
|
|
30
30
|
version = new semver_1.SemVer('0.0.0');
|
|
31
31
|
applies() {
|
|
32
32
|
return true;
|
|
@@ -9,7 +9,7 @@ import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class FlowrAnalyzerMetaInstFilesPlugin extends FlowrAnalyzerFilePlugin {
|
|
11
11
|
readonly name = "flowr-analyzer-inst-files-plugin";
|
|
12
|
-
readonly description = "
|
|
12
|
+
readonly description = "Loads installed files.";
|
|
13
13
|
readonly version: SemVer;
|
|
14
14
|
private readonly pathPattern;
|
|
15
15
|
/**
|
|
@@ -12,7 +12,7 @@ const InstPathPattern = /(^|\/)inst(\/|$)/;
|
|
|
12
12
|
*/
|
|
13
13
|
class FlowrAnalyzerMetaInstFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
14
14
|
name = 'flowr-analyzer-inst-files-plugin';
|
|
15
|
-
description = '
|
|
15
|
+
description = 'Loads installed files.';
|
|
16
16
|
version = new semver_1.SemVer('0.1.0');
|
|
17
17
|
pathPattern;
|
|
18
18
|
/**
|
|
@@ -8,7 +8,7 @@ import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class FlowrAnalyzerLicenseFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
10
10
|
readonly name = "flowr-analyzer-license-files-plugin";
|
|
11
|
-
readonly description = "
|
|
11
|
+
readonly description = "Loads license files.";
|
|
12
12
|
readonly version: SemVer;
|
|
13
13
|
private readonly pathPattern;
|
|
14
14
|
/**
|
|
@@ -11,7 +11,7 @@ const FileNamePattern = /license(\.md|\.txt)?$/i;
|
|
|
11
11
|
*/
|
|
12
12
|
class FlowrAnalyzerLicenseFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
13
13
|
name = 'flowr-analyzer-license-files-plugin';
|
|
14
|
-
description = '
|
|
14
|
+
description = 'Loads license files.';
|
|
15
15
|
version = new semver_1.SemVer('0.1.0');
|
|
16
16
|
pathPattern;
|
|
17
17
|
/**
|
|
@@ -9,7 +9,7 @@ import { FlowrNamespaceFile } from './files/flowr-namespace-file';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class FlowrAnalyzerNamespaceFilesPlugin extends FlowrAnalyzerFilePlugin {
|
|
11
11
|
readonly name = "flowr-analyzer-namespace-file-plugin";
|
|
12
|
-
readonly description = "
|
|
12
|
+
readonly description = "Reads NAMESPACE files into the NAMESPACE format.";
|
|
13
13
|
readonly version: SemVer;
|
|
14
14
|
private readonly pattern;
|
|
15
15
|
/**
|
|
@@ -12,7 +12,7 @@ const NamespaceFilePattern = /^NAMESPACE(\.txt)?$/i;
|
|
|
12
12
|
*/
|
|
13
13
|
class FlowrAnalyzerNamespaceFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
14
14
|
name = 'flowr-analyzer-namespace-file-plugin';
|
|
15
|
-
description = '
|
|
15
|
+
description = 'Reads NAMESPACE files into the NAMESPACE format.';
|
|
16
16
|
version = new semver_1.SemVer('0.1.0');
|
|
17
17
|
pattern;
|
|
18
18
|
/**
|
|
@@ -10,7 +10,7 @@ import { FlowrNewsFile } from './files/flowr-news-file';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class FlowrAnalyzerNewsFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
12
12
|
readonly name = "flowr-analyzer-news-file-plugin";
|
|
13
|
-
readonly description = "
|
|
13
|
+
readonly description = "Reads NEWS files into version chunks.";
|
|
14
14
|
readonly version: SemVer;
|
|
15
15
|
private readonly pattern;
|
|
16
16
|
/**
|
|
@@ -13,7 +13,7 @@ const NewsFilePattern = /^NEWS(\.(rd|md))?$/i;
|
|
|
13
13
|
*/
|
|
14
14
|
class FlowrAnalyzerNewsFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
15
15
|
name = 'flowr-analyzer-news-file-plugin';
|
|
16
|
-
description = '
|
|
16
|
+
description = 'Reads NEWS files into version chunks.';
|
|
17
17
|
version = new semver_1.SemVer('0.1.0');
|
|
18
18
|
pattern;
|
|
19
19
|
/**
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
import { FlowrRDAFile } from './files/flowr-rda-file';
|
|
7
|
+
/**
|
|
8
|
+
* This plugin provides support for R workspace files (`.rda`/`.RData`), exposing their top-level objects.
|
|
9
|
+
* @see https://rdrr.io/r/base/load.html
|
|
10
|
+
*/
|
|
11
|
+
export declare class FlowrAnalyzerRdaFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
12
|
+
readonly name = "flowr-analyzer-rda-file-plugin";
|
|
13
|
+
readonly description = "Reads RDA/RData workspace files into their contained R objects.";
|
|
14
|
+
readonly version: SemVer;
|
|
15
|
+
private readonly pattern;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new instance of the RDA file plugin.
|
|
18
|
+
* @param filePattern - The pattern to identify RDA files, see {@link RdaFilePattern} for the default pattern.
|
|
19
|
+
*/
|
|
20
|
+
constructor(filePattern?: RegExp);
|
|
21
|
+
applies(file: PathLike): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Processes the given file, assigning it the {@link FileRole.Data} role.
|
|
24
|
+
*/
|
|
25
|
+
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): FlowrRDAFile;
|
|
26
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerRdaFilePlugin = 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 flowr_rda_file_1 = require("./files/flowr-rda-file");
|
|
9
|
+
const RdaFilePattern = /\.(rda|rdata)$/i;
|
|
10
|
+
/**
|
|
11
|
+
* This plugin provides support for R workspace files (`.rda`/`.RData`), exposing their top-level objects.
|
|
12
|
+
* @see https://rdrr.io/r/base/load.html
|
|
13
|
+
*/
|
|
14
|
+
class FlowrAnalyzerRdaFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
15
|
+
name = 'flowr-analyzer-rda-file-plugin';
|
|
16
|
+
description = 'Reads RDA/RData workspace files into their contained R objects.';
|
|
17
|
+
version = new semver_1.SemVer('0.1.0');
|
|
18
|
+
pattern;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new instance of the RDA file plugin.
|
|
21
|
+
* @param filePattern - The pattern to identify RDA files, see {@link RdaFilePattern} for the default pattern.
|
|
22
|
+
*/
|
|
23
|
+
constructor(filePattern = RdaFilePattern) {
|
|
24
|
+
super();
|
|
25
|
+
this.pattern = filePattern;
|
|
26
|
+
}
|
|
27
|
+
applies(file) {
|
|
28
|
+
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Processes the given file, assigning it the {@link FileRole.Data} role.
|
|
32
|
+
*/
|
|
33
|
+
process(_ctx, file) {
|
|
34
|
+
return flowr_rda_file_1.FlowrRDAFile.from(file, flowr_file_1.FileRole.Data);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.FlowrAnalyzerRdaFilePlugin = FlowrAnalyzerRdaFilePlugin;
|
|
38
|
+
//# sourceMappingURL=flowr-analyzer-rda-file-plugin.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/** `Rprofile.site` is the site-wide, `.Rprofile` the user/project profile. */
|
|
7
|
+
export declare const RprofileFilePattern: RegExp;
|
|
8
|
+
/** {@link FlowrAnalyzerLoadingOrderRprofilePlugin} moves the tagged files to the front of the loading order. */
|
|
9
|
+
export declare class FlowrAnalyzerRprofileFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
10
|
+
readonly name = "flowr-analyzer-rprofile-file-plugin";
|
|
11
|
+
readonly description = "Marks R startup profiles (.Rprofile, Rprofile.site).";
|
|
12
|
+
readonly version: SemVer;
|
|
13
|
+
private readonly pathPattern;
|
|
14
|
+
constructor(pathPattern?: RegExp);
|
|
15
|
+
applies(file: PathLike): boolean;
|
|
16
|
+
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerRprofileFilePlugin = exports.RprofileFilePattern = 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
|
+
/** `Rprofile.site` is the site-wide, `.Rprofile` the user/project profile. */
|
|
9
|
+
exports.RprofileFilePattern = /^(\.Rprofile|Rprofile\.site)$/i;
|
|
10
|
+
/** {@link FlowrAnalyzerLoadingOrderRprofilePlugin} moves the tagged files to the front of the loading order. */
|
|
11
|
+
class FlowrAnalyzerRprofileFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
12
|
+
name = 'flowr-analyzer-rprofile-file-plugin';
|
|
13
|
+
description = 'Marks R startup profiles (.Rprofile, Rprofile.site).';
|
|
14
|
+
version = new semver_1.SemVer('0.1.0');
|
|
15
|
+
pathPattern;
|
|
16
|
+
constructor(pathPattern = exports.RprofileFilePattern) {
|
|
17
|
+
super();
|
|
18
|
+
this.pathPattern = pathPattern;
|
|
19
|
+
}
|
|
20
|
+
applies(file) {
|
|
21
|
+
return this.pathPattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
22
|
+
}
|
|
23
|
+
process(_ctx, file) {
|
|
24
|
+
file.assignRole(flowr_file_1.FileRole.Startup);
|
|
25
|
+
file.assignRole(flowr_file_1.FileRole.Source);
|
|
26
|
+
return [file, true];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.FlowrAnalyzerRprofileFilePlugin = FlowrAnalyzerRprofileFilePlugin;
|
|
30
|
+
//# sourceMappingURL=flowr-analyzer-rprofile-file-plugin.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
* Tags an rv project's `rproject.toml` with the {@link FileRole.Manifest} role and lifts it to a
|
|
8
|
+
* {@link FlowrRProjectFile}, so the meta plugin reading it can look it up by role.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FlowrAnalyzerRProjectFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
11
|
+
readonly name = "flowr-analyzer-rproject-file-plugin";
|
|
12
|
+
readonly description = "Marks the rproject.toml manifest of an rv project.";
|
|
13
|
+
readonly version: SemVer;
|
|
14
|
+
private readonly pathPattern;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new instance of the rproject file plugin.
|
|
17
|
+
* @param pathPattern - The pattern to identify the manifest, see {@link RProjectFilePattern} for the default.
|
|
18
|
+
*/
|
|
19
|
+
constructor(pathPattern?: RegExp);
|
|
20
|
+
applies(file: PathLike): boolean;
|
|
21
|
+
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerRProjectFilePlugin = 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 flowr_rproject_file_1 = require("./files/flowr-rproject-file");
|
|
9
|
+
/** The manifest of an rv project. */
|
|
10
|
+
const RProjectFilePattern = /^rproject\.toml$/i;
|
|
11
|
+
/**
|
|
12
|
+
* Tags an rv project's `rproject.toml` with the {@link FileRole.Manifest} role and lifts it to a
|
|
13
|
+
* {@link FlowrRProjectFile}, so the meta plugin reading it can look it up by role.
|
|
14
|
+
*/
|
|
15
|
+
class FlowrAnalyzerRProjectFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
16
|
+
name = 'flowr-analyzer-rproject-file-plugin';
|
|
17
|
+
description = 'Marks the rproject.toml manifest of an rv project.';
|
|
18
|
+
version = new semver_1.SemVer('0.1.0');
|
|
19
|
+
pathPattern;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new instance of the rproject file plugin.
|
|
22
|
+
* @param pathPattern - The pattern to identify the manifest, see {@link RProjectFilePattern} for the default.
|
|
23
|
+
*/
|
|
24
|
+
constructor(pathPattern = RProjectFilePattern) {
|
|
25
|
+
super();
|
|
26
|
+
this.pathPattern = pathPattern;
|
|
27
|
+
}
|
|
28
|
+
applies(file) {
|
|
29
|
+
return this.pathPattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
30
|
+
}
|
|
31
|
+
process(_ctx, file) {
|
|
32
|
+
return [flowr_rproject_file_1.FlowrRProjectFile.from(file, flowr_file_1.FileRole.Manifest), true];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.FlowrAnalyzerRProjectFilePlugin = FlowrAnalyzerRProjectFilePlugin;
|
|
36
|
+
//# sourceMappingURL=flowr-analyzer-rproject-file-plugin.js.map
|
|
@@ -9,7 +9,7 @@ import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class FlowrAnalyzerMetaTestFilesPlugin extends FlowrAnalyzerFilePlugin {
|
|
11
11
|
readonly name = "flowr-analyzer-test-files-plugin";
|
|
12
|
-
readonly description = "
|
|
12
|
+
readonly description = "Loads test files.";
|
|
13
13
|
readonly version: SemVer;
|
|
14
14
|
private readonly pathPattern;
|
|
15
15
|
/**
|
|
@@ -12,7 +12,7 @@ const TestPathPattern = /tests?/i;
|
|
|
12
12
|
*/
|
|
13
13
|
class FlowrAnalyzerMetaTestFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
14
14
|
name = 'flowr-analyzer-test-files-plugin';
|
|
15
|
-
description = '
|
|
15
|
+
description = 'Loads test files.';
|
|
16
16
|
version = new semver_1.SemVer('0.1.0');
|
|
17
17
|
pathPattern;
|
|
18
18
|
/**
|
|
@@ -9,7 +9,7 @@ import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class FlowrAnalyzerMetaVignetteFilesPlugin extends FlowrAnalyzerFilePlugin {
|
|
11
11
|
readonly name = "flowr-analyzer-vignette-files-plugin";
|
|
12
|
-
readonly description = "
|
|
12
|
+
readonly description = "Loads vignette files.";
|
|
13
13
|
readonly version: SemVer;
|
|
14
14
|
private readonly pathPattern;
|
|
15
15
|
/**
|
|
@@ -12,7 +12,7 @@ const VignettePathPattern = /vignettes?/i;
|
|
|
12
12
|
*/
|
|
13
13
|
class FlowrAnalyzerMetaVignetteFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
14
14
|
name = 'flowr-analyzer-vignette-files-plugin';
|
|
15
|
-
description = '
|
|
15
|
+
description = 'Loads vignette files.';
|
|
16
16
|
version = new semver_1.SemVer('0.1.0');
|
|
17
17
|
pathPattern;
|
|
18
18
|
/**
|
|
@@ -4,13 +4,12 @@ import type { PathLike } from 'fs';
|
|
|
4
4
|
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
5
5
|
import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
6
6
|
/**
|
|
7
|
-
* Tags a project's virtual-environment lockfiles
|
|
8
|
-
*
|
|
9
|
-
* by role instead of scanning every project file.
|
|
7
|
+
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
8
|
+
* plugins that read them can look them up by role instead of scanning every project file.
|
|
10
9
|
*/
|
|
11
10
|
export declare class FlowrAnalyzerVirtualEnvFilePlugin extends FlowrAnalyzerFilePlugin {
|
|
12
11
|
readonly name = "flowr-analyzer-virtualenv-files-plugin";
|
|
13
|
-
readonly description = "
|
|
12
|
+
readonly description = "Marks virtual-environment lockfiles (renv.lock, rv.lock).";
|
|
14
13
|
readonly version: SemVer;
|
|
15
14
|
private readonly pathPattern;
|
|
16
15
|
/**
|
|
@@ -5,16 +5,15 @@ const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
|
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
7
7
|
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
|
-
/** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`). */
|
|
9
|
-
const VirtualEnvFilePattern = /^(renv|rv)\.lock$/i;
|
|
8
|
+
/** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`, `packrat.lock`). */
|
|
9
|
+
const VirtualEnvFilePattern = /^(renv|rv|packrat)\.lock$/i;
|
|
10
10
|
/**
|
|
11
|
-
* Tags a project's virtual-environment lockfiles
|
|
12
|
-
*
|
|
13
|
-
* by role instead of scanning every project file.
|
|
11
|
+
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
12
|
+
* plugins that read them can look them up by role instead of scanning every project file.
|
|
14
13
|
*/
|
|
15
14
|
class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin {
|
|
16
15
|
name = 'flowr-analyzer-virtualenv-files-plugin';
|
|
17
|
-
description = '
|
|
16
|
+
description = 'Marks virtual-environment lockfiles (renv.lock, rv.lock).';
|
|
18
17
|
version = new semver_1.SemVer('0.1.0');
|
|
19
18
|
pathPattern;
|
|
20
19
|
/**
|
|
@@ -75,6 +75,11 @@ class FlowrAnalyzerPlugin {
|
|
|
75
75
|
processor(context, args) {
|
|
76
76
|
const now = Date.now();
|
|
77
77
|
try {
|
|
78
|
+
// record activation before running: many plugins contribute by mutating the context and return `void`, so
|
|
79
|
+
// a return value is not a reliable signal -- a plugin activated if its processor ran for this analysis
|
|
80
|
+
if (context.config.repl.showPlugins) {
|
|
81
|
+
context.activatedPlugins.add(this.constructor.name);
|
|
82
|
+
}
|
|
78
83
|
const result = this.process(context, args);
|
|
79
84
|
const duration = Date.now() - now;
|
|
80
85
|
(0, log_1.expensiveTrace)(generalPluginLog, () => `Plugin ${this.name} (v${this.version.format()}, ${this.type}) executed in ${duration}ms.`);
|
|
@@ -8,7 +8,7 @@ import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context'
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class FlowrAnalyzerLoadingOrderDescriptionFilePlugin extends FlowrAnalyzerLoadingOrderPlugin {
|
|
10
10
|
readonly name = "flowr-analyzer-package-version-description-file-plugin";
|
|
11
|
-
readonly description = "
|
|
11
|
+
readonly description = "Orders the files by the Collate field of a DESCRIPTION file.";
|
|
12
12
|
readonly version: SemVer;
|
|
13
13
|
process(ctx: FlowrAnalyzerContext): void;
|
|
14
14
|
}
|
|
@@ -12,7 +12,7 @@ const flowr_file_1 = require("../../context/flowr-file");
|
|
|
12
12
|
*/
|
|
13
13
|
class FlowrAnalyzerLoadingOrderDescriptionFilePlugin extends flowr_analyzer_loading_order_plugin_1.FlowrAnalyzerLoadingOrderPlugin {
|
|
14
14
|
name = 'flowr-analyzer-package-version-description-file-plugin';
|
|
15
|
-
description = '
|
|
15
|
+
description = 'Orders the files by the Collate field of a DESCRIPTION file.';
|
|
16
16
|
version = new semver_1.SemVer('0.1.0');
|
|
17
17
|
process(ctx) {
|
|
18
18
|
const descFiles = ctx.files.getFilesByRole(flowr_file_1.FileRole.Description);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SemVer } from 'semver';
|
|
2
|
+
import { FlowrAnalyzerLoadingOrderPlugin } from './flowr-analyzer-loading-order-plugin';
|
|
3
|
+
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
4
|
+
export declare const implicitSourcesLog: import("tslog").Logger<import("tslog").ILogObj>;
|
|
5
|
+
/**
|
|
6
|
+
* Orders the files given by `project.implicitSources`, which is already specialized for the project kind.
|
|
7
|
+
* Files that are no implicit sources stay in front, as the implicit entry points consume them.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FlowrAnalyzerLoadingOrderImplicitSourcesPlugin extends FlowrAnalyzerLoadingOrderPlugin {
|
|
10
|
+
readonly name = "flowr-analyzer-loading-order-implicit-sources-plugin";
|
|
11
|
+
readonly description = "Orders the files a framework loads implicitly, as configured by project.implicitSources.";
|
|
12
|
+
readonly version: SemVer;
|
|
13
|
+
process(ctx: FlowrAnalyzerContext): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerLoadingOrderImplicitSourcesPlugin = exports.implicitSourcesLog = void 0;
|
|
4
|
+
const semver_1 = require("semver");
|
|
5
|
+
const flowr_analyzer_loading_order_plugin_1 = require("./flowr-analyzer-loading-order-plugin");
|
|
6
|
+
const log_1 = require("../../../util/log");
|
|
7
|
+
const glob_1 = require("../../../util/glob");
|
|
8
|
+
exports.implicitSourcesLog = log_1.log.getSubLogger({ name: 'loading-order-implicit-sources' });
|
|
9
|
+
/**
|
|
10
|
+
* Orders the files given by `project.implicitSources`, which is already specialized for the project kind.
|
|
11
|
+
* Files that are no implicit sources stay in front, as the implicit entry points consume them.
|
|
12
|
+
*/
|
|
13
|
+
class FlowrAnalyzerLoadingOrderImplicitSourcesPlugin extends flowr_analyzer_loading_order_plugin_1.FlowrAnalyzerLoadingOrderPlugin {
|
|
14
|
+
name = 'flowr-analyzer-loading-order-implicit-sources-plugin';
|
|
15
|
+
description = 'Orders the files a framework loads implicitly, as configured by project.implicitSources.';
|
|
16
|
+
version = new semver_1.SemVer('0.1.0');
|
|
17
|
+
process(ctx) {
|
|
18
|
+
const kind = ctx.projectKind();
|
|
19
|
+
const implicit = ctx.config.project.implicitSources;
|
|
20
|
+
if (!implicit || implicit.length === 0) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const unordered = ctx.files.loadingOrder.getUnorderedRequests();
|
|
24
|
+
const files = unordered.filter(r => r.request === 'file');
|
|
25
|
+
/* node sets keep insertion order! */
|
|
26
|
+
const ordered = new Set();
|
|
27
|
+
const unmatched = [];
|
|
28
|
+
for (const entry of implicit) {
|
|
29
|
+
const matches = (0, glob_1.globMatcher)(entry);
|
|
30
|
+
let matched = false;
|
|
31
|
+
for (const file of files) {
|
|
32
|
+
if (matches(file.content)) {
|
|
33
|
+
ordered.add(file);
|
|
34
|
+
matched = true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!matched) {
|
|
38
|
+
unmatched.push(`'${entry}'`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (unmatched.length > 0) {
|
|
42
|
+
exports.implicitSourcesLog.warn(`No file of the ${kind} project matches the implicit source(s) ${unmatched.join(', ')}, ignoring them.`);
|
|
43
|
+
}
|
|
44
|
+
if (ordered.size === 0) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const rest = unordered.filter(r => !ordered.has(r));
|
|
48
|
+
exports.implicitSourcesLog.debug(`Ordering implicit sources of ${kind} project: ${[...ordered].map(s => s.content).join(', ')}`);
|
|
49
|
+
ctx.files.loadingOrder.addGuess([...rest, ...ordered]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.FlowrAnalyzerLoadingOrderImplicitSourcesPlugin = FlowrAnalyzerLoadingOrderImplicitSourcesPlugin;
|
|
53
|
+
//# sourceMappingURL=flowr-analyzer-loading-order-implicit-sources-plugin.js.map
|
|
@@ -24,7 +24,7 @@ exports.FlowrAnalyzerLoadingOrderPlugin = FlowrAnalyzerLoadingOrderPlugin;
|
|
|
24
24
|
*/
|
|
25
25
|
class DefaultFlowrAnalyzerLoadingOrderPlugin extends FlowrAnalyzerLoadingOrderPlugin {
|
|
26
26
|
name = 'default-loading-order-plugin';
|
|
27
|
-
description = '
|
|
27
|
+
description = 'Does nothing, the default loading order plugin.';
|
|
28
28
|
version = new semver_1.SemVer('0.0.0');
|
|
29
29
|
process() {
|
|
30
30
|
/* we always *have* to have a loading order, this plugin does not have to guess to rely on chronological order */
|
package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SemVer } from 'semver';
|
|
2
|
+
import { FlowrAnalyzerLoadingOrderPlugin } from './flowr-analyzer-loading-order-plugin';
|
|
3
|
+
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
4
|
+
/**
|
|
5
|
+
* Moves the R startup profiles ({@link FileRole.Startup}, tagged by {@link FlowrAnalyzerRprofileFilePlugin})
|
|
6
|
+
* to the front of the loading order, as R evaluates them before any project code.
|
|
7
|
+
*
|
|
8
|
+
* This refines the orders the other loading-order plugins produced, so register it after them.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FlowrAnalyzerLoadingOrderRprofilePlugin extends FlowrAnalyzerLoadingOrderPlugin {
|
|
11
|
+
readonly name = "flowr-analyzer-loading-order-rprofile-plugin";
|
|
12
|
+
readonly description = "Loads the R startup profiles (.Rprofile, Rprofile.site) before any project code.";
|
|
13
|
+
readonly version: SemVer;
|
|
14
|
+
process(ctx: FlowrAnalyzerContext): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowrAnalyzerLoadingOrderRprofilePlugin = void 0;
|
|
4
|
+
const semver_1 = require("semver");
|
|
5
|
+
const flowr_analyzer_loading_order_plugin_1 = require("./flowr-analyzer-loading-order-plugin");
|
|
6
|
+
const flowr_file_1 = require("../../context/flowr-file");
|
|
7
|
+
/** `Rprofile.site` is evaluated before the project's `.Rprofile`, mirroring R's startup sequence. */
|
|
8
|
+
function startupRank(path) {
|
|
9
|
+
return /Rprofile\.site$/i.test(path) ? 0 : 1;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Moves the R startup profiles ({@link FileRole.Startup}, tagged by {@link FlowrAnalyzerRprofileFilePlugin})
|
|
13
|
+
* to the front of the loading order, as R evaluates them before any project code.
|
|
14
|
+
*
|
|
15
|
+
* This refines the orders the other loading-order plugins produced, so register it after them.
|
|
16
|
+
*/
|
|
17
|
+
class FlowrAnalyzerLoadingOrderRprofilePlugin extends flowr_analyzer_loading_order_plugin_1.FlowrAnalyzerLoadingOrderPlugin {
|
|
18
|
+
name = 'flowr-analyzer-loading-order-rprofile-plugin';
|
|
19
|
+
description = 'Loads the R startup profiles (.Rprofile, Rprofile.site) before any project code.';
|
|
20
|
+
version = new semver_1.SemVer('0.1.0');
|
|
21
|
+
process(ctx) {
|
|
22
|
+
const startup = new Set(ctx.files.getFilesByRole(flowr_file_1.FileRole.Startup).map(f => f.path()));
|
|
23
|
+
if (startup.size === 0) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const requests = ctx.files.loadingOrder.getUnorderedRequests()
|
|
27
|
+
.filter((r) => r.request === 'file' && startup.has(r.content))
|
|
28
|
+
.sort((a, b) => startupRank(a.content) - startupRank(b.content));
|
|
29
|
+
ctx.files.loadingOrder.prependToOrder(requests);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.FlowrAnalyzerLoadingOrderRprofilePlugin = FlowrAnalyzerLoadingOrderRprofilePlugin;
|
|
33
|
+
//# sourceMappingURL=flowr-analyzer-loading-order-rprofile-plugin.js.map
|
package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context'
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class FlowrAnalyzerMetaDescriptionFilePlugin extends FlowrAnalyzerPackageVersionsPlugin {
|
|
8
8
|
readonly name = "flowr-analyzer-meta-file-plugin";
|
|
9
|
-
readonly description = "
|
|
9
|
+
readonly description = "Extracts package meta information from DESCRIPTION files.";
|
|
10
10
|
readonly version: SemVer;
|
|
11
11
|
process(ctx: FlowrAnalyzerContext): void;
|
|
12
12
|
}
|
package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js
CHANGED
|
@@ -5,12 +5,13 @@ const flowr_analyzer_package_versions_plugin_1 = require("./flowr-analyzer-packa
|
|
|
5
5
|
const flowr_analyzer_description_file_plugin_1 = require("../file-plugins/flowr-analyzer-description-file-plugin");
|
|
6
6
|
const semver_1 = require("semver");
|
|
7
7
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
8
|
+
const flowr_analyzer_meta_context_1 = require("../../context/flowr-analyzer-meta-context");
|
|
8
9
|
/**
|
|
9
10
|
* This plugin extracts package meta information from R `DESCRIPTION` files.
|
|
10
11
|
*/
|
|
11
12
|
class FlowrAnalyzerMetaDescriptionFilePlugin extends flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin {
|
|
12
13
|
name = 'flowr-analyzer-meta-file-plugin';
|
|
13
|
-
description = '
|
|
14
|
+
description = 'Extracts package meta information from DESCRIPTION files.';
|
|
14
15
|
version = new semver_1.SemVer('0.1.0');
|
|
15
16
|
process(ctx) {
|
|
16
17
|
const descFiles = ctx.files.getFilesByRole(flowr_file_1.FileRole.Description);
|
|
@@ -24,18 +25,22 @@ class FlowrAnalyzerMetaDescriptionFilePlugin extends flowr_analyzer_package_vers
|
|
|
24
25
|
/** this will do the caching etc. for me */
|
|
25
26
|
const deps = descFiles[0];
|
|
26
27
|
const pkg = deps.packageName();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
ctx.meta.contribute({
|
|
29
|
+
name: pkg,
|
|
30
|
+
// a DESCRIPTION marks a real package, so its name is also the namespace `a::b` resolves against
|
|
31
|
+
namespace: pkg,
|
|
32
|
+
version: deps.version(),
|
|
33
|
+
title: deps.packageTitle(),
|
|
34
|
+
authors: deps.authors(),
|
|
35
|
+
encoding: deps.content().get('Encoding')?.[0],
|
|
36
|
+
licenses: deps.license(),
|
|
37
|
+
declares: {
|
|
38
|
+
imports: deps.imports(),
|
|
39
|
+
depends: deps.depends(),
|
|
40
|
+
suggests: deps.suggests(),
|
|
41
|
+
linkingTo: deps.linkingTo()
|
|
42
|
+
}
|
|
43
|
+
}, flowr_analyzer_meta_context_1.MetaPriority.Description);
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
exports.FlowrAnalyzerMetaDescriptionFilePlugin = FlowrAnalyzerMetaDescriptionFilePlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FlowrAnalyzerPackageVersionsPlugin } from './flowr-analyzer-package-versions-plugin';
|
|
2
|
+
import { SemVer } from 'semver';
|
|
3
|
+
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
4
|
+
/**
|
|
5
|
+
* Extracts the project metadata and the declared dependencies from the `rproject.toml` of an rv project.
|
|
6
|
+
* The name is contributed without a namespace: an rv project is no package, so `a::b` must not resolve against it.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FlowrAnalyzerMetaRProjectFilePlugin extends FlowrAnalyzerPackageVersionsPlugin {
|
|
9
|
+
readonly name = "flowr-analyzer-meta-rproject-file-plugin";
|
|
10
|
+
readonly description = "Extracts project meta information and dependencies from an rproject.toml.";
|
|
11
|
+
readonly version: SemVer;
|
|
12
|
+
process(ctx: FlowrAnalyzerContext): void;
|
|
13
|
+
}
|