@eagleoutice/flowr 2.14.0 → 2.14.2
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 +169 -91
- package/abstract-interpretation/absint-visitor.d.ts +91 -25
- package/abstract-interpretation/absint-visitor.js +235 -74
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
- package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
- package/abstract-interpretation/data-frame/resolve-args.js +6 -4
- package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
- package/abstract-interpretation/domains/partial-product-domain.js +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-range-domain.js +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
- package/benchmark/calibration.d.ts +18 -11
- package/benchmark/calibration.js +37 -27
- package/benchmark/slicer.d.ts +9 -2
- package/benchmark/slicer.js +44 -37
- package/benchmark/stats/count-comments.d.ts +16 -0
- package/benchmark/stats/count-comments.js +30 -0
- package/benchmark/stats/print.js +2 -0
- package/benchmark/stats/size-of.d.ts +7 -3
- package/benchmark/stats/size-of.js +7 -3
- package/benchmark/stats/stats.d.ts +7 -0
- package/benchmark/summarizer/first-phase/process.js +2 -19
- package/benchmark/summarizer/second-phase/graph.js +13 -3
- package/benchmark/summarizer/second-phase/process.js +2 -0
- package/cli/benchmark-app.js +4 -1
- package/cli/benchmark-helper-app.d.ts +1 -0
- package/cli/benchmark-helper-app.js +2 -2
- package/cli/common/options.d.ts +5 -0
- package/cli/common/options.js +1 -0
- package/cli/common/scripts-info.d.ts +5 -0
- package/cli/repl/commands/repl-dataflow.js +70 -27
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/core.js +1 -1
- package/cli/repl/execute.d.ts +2 -2
- package/cli/repl/execute.js +2 -2
- package/cli/repl/parser/slice-query-parser.js +2 -1
- package/cli/repl/server/connection.d.ts +4 -0
- package/cli/repl/server/connection.js +19 -16
- package/cli/repl/server/messages/message-analysis.d.ts +1 -1
- package/config.d.ts +6 -0
- package/config.js +12 -9
- package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
- package/control-flow/basic-cfg-guided-visitor.js +37 -24
- package/control-flow/cfg-dead-code.js +44 -33
- package/control-flow/cfg-properties.js +2 -2
- package/control-flow/cfg-simplification.js +6 -5
- package/control-flow/cfg-to-basic-blocks.js +11 -13
- package/control-flow/control-flow-graph.d.ts +179 -189
- package/control-flow/control-flow-graph.js +400 -263
- package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
- package/control-flow/dfg-cfg-guided-visitor.js +17 -13
- package/control-flow/diff-cfg.js +6 -14
- package/control-flow/happens-before.js +5 -4
- package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
- package/control-flow/semantic-cfg-guided-visitor.js +6 -26
- package/control-flow/simple-visitor.js +14 -15
- package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
- package/control-flow/useless-loop.js +18 -14
- package/core/steps/all/core/20-dataflow.d.ts +1 -3
- package/core/steps/pipeline/default-pipelines.d.ts +141 -157
- package/dataflow/cluster.js +7 -0
- package/dataflow/environments/apply-kill.d.ts +6 -0
- package/dataflow/environments/apply-kill.js +64 -32
- package/dataflow/environments/built-in-props.d.ts +10 -2
- package/dataflow/environments/built-in-props.js +9 -1
- package/dataflow/environments/built-in.d.ts +6 -3
- package/dataflow/environments/built-in.js +8 -5
- package/dataflow/environments/clone.d.ts +3 -3
- package/dataflow/environments/clone.js +5 -5
- package/dataflow/environments/default-builtin-config.d.ts +188 -8
- package/dataflow/environments/default-builtin-config.js +112 -39
- package/dataflow/environments/environment.d.ts +9 -1
- package/dataflow/environments/environment.js +25 -7
- package/dataflow/environments/identifier.d.ts +12 -1
- package/dataflow/environments/identifier.js +4 -1
- package/dataflow/environments/query-fn-props.d.ts +6 -0
- package/dataflow/environments/query-fn-props.js +20 -0
- package/dataflow/environments/resolve-by-name.d.ts +7 -0
- package/dataflow/environments/resolve-by-name.js +26 -2
- package/dataflow/environments/resolve-helper.d.ts +3 -1
- package/dataflow/environments/resolve-helper.js +2 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
- package/dataflow/eval/resolve/alias-tracking.js +2 -2
- package/dataflow/eval/resolve/match-arguments.js +7 -5
- package/dataflow/eval/resolve/node-value.d.ts +3 -1
- package/dataflow/eval/resolve/node-value.js +12 -0
- package/dataflow/eval/resolve/resolve-argument.js +5 -4
- package/dataflow/eval/resolve/resolve-operators.js +10 -7
- package/dataflow/eval/resolve/resolve-strings.js +2 -2
- package/dataflow/eval/resolve/resolve-working-directory.d.ts +1 -1
- package/dataflow/eval/resolve/resolve-working-directory.js +5 -5
- package/dataflow/eval/resolve/resolve.js +3 -2
- package/dataflow/eval/values/general.js +8 -5
- package/dataflow/extractor.d.ts +1 -4
- package/dataflow/extractor.js +11 -10
- package/dataflow/fn/exceptions-of-function.d.ts +6 -2
- package/dataflow/fn/exceptions-of-function.js +85 -38
- package/dataflow/fn/strict-function.d.ts +40 -0
- package/dataflow/fn/strict-function.js +339 -0
- package/dataflow/graph/call-graph.js +2 -2
- package/dataflow/graph/df-helper.d.ts +17 -2
- package/dataflow/graph/df-helper.js +19 -3
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +19 -2
- package/dataflow/graph/edge.d.ts +38 -2
- package/dataflow/graph/edge.js +32 -2
- package/dataflow/graph/graph.d.ts +32 -5
- package/dataflow/graph/graph.js +65 -4
- package/dataflow/graph/match-args.d.ts +69 -0
- package/dataflow/graph/match-args.js +167 -0
- package/dataflow/info.d.ts +40 -0
- package/dataflow/info.js +28 -1
- package/dataflow/internal/control-flow.d.ts +102 -0
- package/dataflow/internal/control-flow.js +200 -0
- package/dataflow/internal/linker.d.ts +6 -31
- package/dataflow/internal/linker.js +24 -81
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +8 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +27 -20
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +35 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +8 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +97 -33
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +12 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +15 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +45 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +19 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +29 -8
- package/dataflow/internal/process/functions/call/common.js +5 -6
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +23 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
- package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
- package/dataflow/internal/process/functions/call/nse.js +6 -1
- package/dataflow/internal/process/functions/call/quoted.js +2 -2
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
- package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/process-argument.js +12 -4
- package/dataflow/internal/process/functions/process-parameter.js +13 -0
- package/dataflow/internal/process/process-named-call.d.ts +2 -2
- package/dataflow/internal/process/process-named-call.js +9 -7
- package/documentation/data/server/doc-data-server-messages.js +4 -4
- package/documentation/doc-readme.js +45 -0
- package/documentation/doc-util/doc-cfg.d.ts +8 -7
- package/documentation/doc-util/doc-cfg.js +10 -10
- package/documentation/doc-util/doc-playground.d.ts +12 -0
- package/documentation/doc-util/doc-playground.js +21 -0
- package/documentation/doc-util/doc-query.d.ts +4 -1
- package/documentation/doc-util/doc-query.js +4 -2
- package/documentation/wiki-absint.d.ts +3 -4
- package/documentation/wiki-absint.js +12 -5
- package/documentation/wiki-analyzer.js +2 -2
- package/documentation/wiki-cfg.js +101 -106
- package/documentation/wiki-core.js +1 -1
- package/documentation/wiki-dataflow-graph.js +85 -53
- package/documentation/wiki-linter.js +16 -1
- package/documentation/wiki-linting-and-testing.js +1 -16
- package/documentation/wiki-mk/doc-maker.js +6 -4
- package/documentation/wiki-query.js +67 -4
- package/documentation/wiki-signature-database.js +28 -2
- package/linter/linter-fix.d.ts +16 -0
- package/linter/linter-fix.js +104 -0
- package/linter/linter-format.d.ts +18 -1
- package/linter/linter-format.js +31 -1
- package/linter/linter-output.js +47 -11
- package/linter/linter-rules.d.ts +64 -9
- package/linter/linter-rules.js +5 -1
- package/linter/rules/absolute-path.js +4 -2
- package/linter/rules/dataframe-access-validation.js +6 -7
- package/linter/rules/deprecated-functions.d.ts +107 -10
- package/linter/rules/deprecated-functions.js +309 -23
- package/linter/rules/file-path-validity.js +5 -4
- package/linter/rules/function-finder-util.d.ts +6 -0
- package/linter/rules/function-finder-util.js +21 -13
- package/linter/rules/naming-convention.js +1 -1
- package/linter/rules/network-functions.d.ts +3 -3
- package/linter/rules/stop-with-call-arg.js +2 -2
- package/linter/rules/unclosed-connection.d.ts +44 -0
- package/linter/rules/unclosed-connection.js +200 -0
- package/linter/rules/undefined-symbol-util.js +6 -4
- package/linter/rules/undefined-symbol.js +2 -2
- package/linter/rules/unused-definition.js +8 -4
- package/linter/rules/unused-import.d.ts +60 -0
- package/linter/rules/unused-import.js +179 -0
- package/package.json +5 -8
- package/project/attached-packages.js +2 -1
- package/project/cache/flowr-analyzer-cache.d.ts +2 -5
- package/project/cache/flowr-analyzer-cache.js +4 -7
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
- package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
- package/project/cache/flowr-cache.d.ts +9 -0
- package/project/cache/flowr-cache.js +19 -0
- package/project/context/flowr-analyzer-context.d.ts +7 -3
- package/project/context/flowr-analyzer-context.js +15 -9
- package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
- package/project/context/flowr-analyzer-dependencies-context.js +9 -14
- package/project/context/flowr-analyzer-files-context.js +15 -17
- package/project/context/flowr-analyzer-meta-context.js +2 -12
- package/project/dependency-version-space.d.ts +3 -10
- package/project/dependency-version-space.js +10 -9
- package/project/flowr-analyzer.d.ts +4 -6
- package/project/flowr-analyzer.js +4 -5
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
- package/project/plugins/file-plugins/files/flowr-description-file.js +1 -1
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +23 -35
- package/project/plugins/file-plugins/files/flowr-news-file.d.ts +1 -1
- package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
- package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +5 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +33 -6
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
- package/project/sigdb/build.d.ts +2 -2
- package/project/sigdb/decode.d.ts +0 -5
- package/project/sigdb/decode.js +0 -8
- package/project/sigdb/index-format.d.ts +4 -4
- package/project/sigdb/manifest.d.ts +5 -3
- package/project/sigdb/manifest.js +50 -9
- package/project/sigdb/reader.d.ts +48 -13
- package/project/sigdb/reader.js +3 -2
- package/project/sigdb/schema.d.ts +5 -3
- package/project/sigdb/schema.js +2 -2
- package/project/sigdb/signature-db.d.ts +69 -0
- package/project/sigdb/signature-db.js +54 -0
- package/project/sigdb/signature-match.d.ts +10 -5
- package/project/sigdb/signature-match.js +13 -8
- package/queries/catalog/absint-query/absint-query-executor.js +1 -2
- package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
- package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
- package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
- package/queries/catalog/dependencies-query/link-devices.js +2 -8
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -0
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +6 -0
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +25 -0
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +31 -0
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +56 -0
- package/queries/catalog/signature-query/signature-query-executor.js +4 -3
- package/queries/catalog/slice-query-options.d.ts +1 -1
- package/queries/catalog/slice-query-options.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
- package/queries/query-function-filter.d.ts +8 -2
- package/queries/query-function-filter.js +11 -1
- package/queries/query.d.ts +11 -1
- package/queries/query.js +2 -0
- package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/model.js +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
- package/reconstruct/inline/source-inline-map.js +3 -3
- package/reconstruct/reconstruct.js +6 -4
- package/search/flowr-search-builder.d.ts +8 -8
- package/search/flowr-search-builder.js +4 -4
- package/search/flowr-search-filters.d.ts +2 -2
- package/search/flowr-search-filters.js +4 -15
- package/search/search-executor/search-enrichers.d.ts +6 -4
- package/search/search-executor/search-enrichers.js +44 -5
- package/slicing/criterion/filters/all-variables.js +2 -1
- package/slicing/criterion/parse.d.ts +2 -2
- package/slicing/criterion/parse.js +10 -8
- package/slicing/static/fingerprint.js +1 -1
- package/slicing/static/slice-call.js +2 -2
- package/util/arg-matching.d.ts +3 -0
- package/util/arg-matching.js +12 -1
- package/util/collections/arrays.d.ts +0 -4
- package/util/collections/arrays.js +4 -26
- package/util/diff-graph.d.ts +1 -1
- package/util/diff-graph.js +17 -3
- package/util/diff.d.ts +6 -0
- package/util/mermaid/ast.d.ts +1 -1
- package/util/mermaid/ast.js +5 -4
- package/util/mermaid/cfg.js +130 -24
- package/util/mermaid/dfg.js +31 -10
- package/util/mermaid/mermaid.js +2 -0
- package/util/objects.d.ts +21 -0
- package/util/objects.js +60 -0
- package/util/prefix.d.ts +1 -1
- package/util/simple-df/dfg-ascii.js +14 -3
- package/util/text/name-rank.d.ts +1 -1
- package/util/text/name-rank.js +1 -1
- package/util/text/playground-link.d.ts +131 -0
- package/util/text/playground-link.js +214 -0
- package/util/text/strings.js +7 -3
- package/util/version.js +1 -1
- package/control-flow/cfg-builder.d.ts +0 -30
- package/control-flow/cfg-builder.js +0 -79
- package/control-flow/extract-cfg.d.ts +0 -36
- package/control-flow/extract-cfg.js +0 -693
- package/project/cfg-kind.d.ts +0 -21
- package/project/cfg-kind.js +0 -26
|
@@ -4,35 +4,22 @@ exports.FlowrAnalyzerMetaTestFilesPlugin = void 0;
|
|
|
4
4
|
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
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
const TestPathPattern = /tests?/i;
|
|
9
8
|
/**
|
|
10
9
|
* This plugin provides supports for the identification of test files.
|
|
11
10
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
12
11
|
*/
|
|
13
|
-
class FlowrAnalyzerMetaTestFilesPlugin extends flowr_analyzer_file_plugin_1.
|
|
12
|
+
class FlowrAnalyzerMetaTestFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
14
13
|
name = 'flowr-analyzer-test-files-plugin';
|
|
15
14
|
description = 'Loads test files.';
|
|
16
15
|
version = new semver_1.SemVer('0.1.0');
|
|
17
|
-
|
|
16
|
+
roles = [flowr_file_1.FileRole.Test];
|
|
18
17
|
/**
|
|
19
18
|
* Creates a new instance of the TEST file plugin.
|
|
20
19
|
* @param pathPattern - The pathPattern to identify TEST files, see {@link TestPathPattern} for the default pathPattern.
|
|
21
20
|
*/
|
|
22
21
|
constructor(pathPattern = TestPathPattern) {
|
|
23
|
-
super();
|
|
24
|
-
this.pathPattern = pathPattern;
|
|
25
|
-
}
|
|
26
|
-
applies(file) {
|
|
27
|
-
return this.pathPattern.test((0, built_in_source_1.platformDirname)(file.toString()));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Processes the given file, assigning it the {@link FileRole.Test} role.
|
|
31
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
32
|
-
*/
|
|
33
|
-
process(_ctx, file) {
|
|
34
|
-
file.assignRole(flowr_file_1.FileRole.Test);
|
|
35
|
-
return [file, true];
|
|
22
|
+
super(pathPattern, flowr_analyzer_file_plugin_1.PathPart.Dirname);
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
exports.FlowrAnalyzerMetaTestFilesPlugin = FlowrAnalyzerMetaTestFilesPlugin;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowrAnalyzerRoleFilePlugin } from './flowr-analyzer-file-plugin';
|
|
2
2
|
import { SemVer } from 'semver';
|
|
3
|
-
import
|
|
4
|
-
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
5
|
-
import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
3
|
+
import { FileRole } from '../../context/flowr-file';
|
|
6
4
|
/**
|
|
7
5
|
* This plugin provides supports for the loading of Vignette files.
|
|
8
6
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
9
7
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerMetaVignetteFilesPlugin extends
|
|
8
|
+
export declare class FlowrAnalyzerMetaVignetteFilesPlugin extends FlowrAnalyzerRoleFilePlugin {
|
|
11
9
|
readonly name = "flowr-analyzer-vignette-files-plugin";
|
|
12
10
|
readonly description = "Loads vignette files.";
|
|
13
11
|
readonly version: SemVer;
|
|
14
|
-
|
|
12
|
+
protected readonly roles: FileRole[];
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the VIGNETTE file plugin.
|
|
17
15
|
* @param pathPattern - The pathPattern to identify VIGNETTE files, see {@link VignettePathPattern} for the default pathPattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(pathPattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Processes the given file, assigning it the {@link FileRole.Vignette} role.
|
|
23
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
24
|
-
*/
|
|
25
|
-
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
26
18
|
}
|
|
@@ -4,35 +4,22 @@ exports.FlowrAnalyzerMetaVignetteFilesPlugin = void 0;
|
|
|
4
4
|
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
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
const VignettePathPattern = /vignettes?/i;
|
|
9
8
|
/**
|
|
10
9
|
* This plugin provides supports for the loading of Vignette files.
|
|
11
10
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
12
11
|
*/
|
|
13
|
-
class FlowrAnalyzerMetaVignetteFilesPlugin extends flowr_analyzer_file_plugin_1.
|
|
12
|
+
class FlowrAnalyzerMetaVignetteFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
14
13
|
name = 'flowr-analyzer-vignette-files-plugin';
|
|
15
14
|
description = 'Loads vignette files.';
|
|
16
15
|
version = new semver_1.SemVer('0.1.0');
|
|
17
|
-
|
|
16
|
+
roles = [flowr_file_1.FileRole.Vignette];
|
|
18
17
|
/**
|
|
19
18
|
* Creates a new instance of the VIGNETTE file plugin.
|
|
20
19
|
* @param pathPattern - The pathPattern to identify VIGNETTE files, see {@link VignettePathPattern} for the default pathPattern.
|
|
21
20
|
*/
|
|
22
21
|
constructor(pathPattern = VignettePathPattern) {
|
|
23
|
-
super();
|
|
24
|
-
this.pathPattern = pathPattern;
|
|
25
|
-
}
|
|
26
|
-
applies(file) {
|
|
27
|
-
return this.pathPattern.test((0, built_in_source_1.platformDirname)(file.toString()));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Processes the given file, assigning it the {@link FileRole.Vignette} role.
|
|
31
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
32
|
-
*/
|
|
33
|
-
process(_ctx, file) {
|
|
34
|
-
file.assignRole(flowr_file_1.FileRole.Vignette);
|
|
35
|
-
return [file, true];
|
|
22
|
+
super(pathPattern, flowr_analyzer_file_plugin_1.PathPart.Dirname);
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
exports.FlowrAnalyzerMetaVignetteFilesPlugin = FlowrAnalyzerMetaVignetteFilesPlugin;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowrAnalyzerRoleFilePlugin } from './flowr-analyzer-file-plugin';
|
|
2
2
|
import { SemVer } from 'semver';
|
|
3
|
-
import
|
|
4
|
-
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
5
|
-
import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
3
|
+
import { FileRole } from '../../context/flowr-file';
|
|
6
4
|
/**
|
|
7
5
|
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
8
6
|
* plugins that read them can look them up by role instead of scanning every project file.
|
|
9
7
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerVirtualEnvFilePlugin extends
|
|
8
|
+
export declare class FlowrAnalyzerVirtualEnvFilePlugin extends FlowrAnalyzerRoleFilePlugin {
|
|
11
9
|
readonly name = "flowr-analyzer-virtualenv-files-plugin";
|
|
12
10
|
readonly description = "Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).";
|
|
13
11
|
readonly version: SemVer;
|
|
14
|
-
|
|
12
|
+
protected readonly roles: FileRole[];
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the virtual-environment file plugin.
|
|
17
15
|
* @param pathPattern - The pattern to identify lockfiles, see {@link VirtualEnvFilePattern} for the default.
|
|
18
16
|
*/
|
|
19
17
|
constructor(pathPattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Processes the given file, assigning it the {@link FileRole.VirtualEnv} role. The file may still be
|
|
23
|
-
* relevant to other plugins, so this returns the `true` flag to keep the loader chain going.
|
|
24
|
-
*/
|
|
25
|
-
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
26
18
|
}
|
|
@@ -4,36 +4,23 @@ exports.FlowrAnalyzerVirtualEnvFilePlugin = void 0;
|
|
|
4
4
|
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
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
/** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`, `uvr.lock`, `packrat.lock`). */
|
|
9
8
|
const VirtualEnvFilePattern = /^(renv|rv|uvr|packrat)\.lock$/i;
|
|
10
9
|
/**
|
|
11
10
|
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
12
11
|
* plugins that read them can look them up by role instead of scanning every project file.
|
|
13
12
|
*/
|
|
14
|
-
class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
13
|
+
class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
15
14
|
name = 'flowr-analyzer-virtualenv-files-plugin';
|
|
16
15
|
description = 'Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).';
|
|
17
16
|
version = new semver_1.SemVer('0.1.0');
|
|
18
|
-
|
|
17
|
+
roles = [flowr_file_1.FileRole.VirtualEnv];
|
|
19
18
|
/**
|
|
20
19
|
* Creates a new instance of the virtual-environment file plugin.
|
|
21
20
|
* @param pathPattern - The pattern to identify lockfiles, see {@link VirtualEnvFilePattern} for the default.
|
|
22
21
|
*/
|
|
23
22
|
constructor(pathPattern = VirtualEnvFilePattern) {
|
|
24
|
-
super();
|
|
25
|
-
this.pathPattern = pathPattern;
|
|
26
|
-
}
|
|
27
|
-
applies(file) {
|
|
28
|
-
return this.pathPattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Processes the given file, assigning it the {@link FileRole.VirtualEnv} role. The file may still be
|
|
32
|
-
* relevant to other plugins, so this returns the `true` flag to keep the loader chain going.
|
|
33
|
-
*/
|
|
34
|
-
process(_ctx, file) {
|
|
35
|
-
file.assignRole(flowr_file_1.FileRole.VirtualEnv);
|
|
36
|
-
return [file, true];
|
|
23
|
+
super(pathPattern);
|
|
37
24
|
}
|
|
38
25
|
}
|
|
39
26
|
exports.FlowrAnalyzerVirtualEnvFilePlugin = FlowrAnalyzerVirtualEnvFilePlugin;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrJupyterFile } from '../files/flowr-jupyter-file';
|
|
7
6
|
/**
|
|
8
7
|
* The plugin provides support for Jupyter (`.ipynb`) files
|
|
9
8
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerJupyterFilePlugin extends
|
|
9
|
+
export declare class FlowrAnalyzerJupyterFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly name = "ipynb-file-plugin";
|
|
12
11
|
readonly description = "Parses Jupyter files";
|
|
13
12
|
readonly version: SemVer;
|
|
14
|
-
private readonly pattern;
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the Jupyter file plugin.
|
|
17
15
|
* @param filePattern - The pattern to identify Jupyter files, see {@link IpynbPattern} for the default pattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(filePattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
18
|
protected process(_ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrJupyterFile;
|
|
22
19
|
}
|
|
@@ -3,27 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowrAnalyzerJupyterFilePlugin = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
7
6
|
const flowr_jupyter_file_1 = require("../files/flowr-jupyter-file");
|
|
8
7
|
const IpynbPattern = /\.ipynb$/i;
|
|
9
8
|
/**
|
|
10
9
|
* The plugin provides support for Jupyter (`.ipynb`) files
|
|
11
10
|
*/
|
|
12
|
-
class FlowrAnalyzerJupyterFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
11
|
+
class FlowrAnalyzerJupyterFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
13
12
|
name = 'ipynb-file-plugin';
|
|
14
13
|
description = 'Parses Jupyter files';
|
|
15
14
|
version = new semver_1.SemVer('0.1.0');
|
|
16
|
-
pattern;
|
|
17
15
|
/**
|
|
18
16
|
* Creates a new instance of the Jupyter file plugin.
|
|
19
17
|
* @param filePattern - The pattern to identify Jupyter files, see {@link IpynbPattern} for the default pattern.
|
|
20
18
|
*/
|
|
21
19
|
constructor(filePattern = IpynbPattern) {
|
|
22
|
-
super();
|
|
23
|
-
this.pattern = filePattern;
|
|
24
|
-
}
|
|
25
|
-
applies(file) {
|
|
26
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
+
super(filePattern);
|
|
27
21
|
}
|
|
28
22
|
process(_ctx, arg) {
|
|
29
23
|
return flowr_jupyter_file_1.FlowrJupyterFile.from(arg);
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrRMarkdownFile } from '../files/flowr-rmarkdown-file';
|
|
7
6
|
/**
|
|
8
7
|
* Common base of the plugins reading an R Markdown flavor, which differ only in the files they claim.
|
|
9
8
|
*/
|
|
10
|
-
export declare abstract class FlowrAnalyzerRMarkdownFilePlugin extends
|
|
9
|
+
export declare abstract class FlowrAnalyzerRMarkdownFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly version: SemVer;
|
|
12
|
-
private readonly pattern;
|
|
13
|
-
protected constructor(filePattern: RegExp);
|
|
14
|
-
applies(file: PathLike): boolean;
|
|
15
11
|
protected process(ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrRMarkdownFile;
|
|
16
12
|
}
|
|
@@ -4,20 +4,11 @@ exports.FlowrAnalyzerRMarkdownFilePlugin = void 0;
|
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
6
|
const flowr_rmarkdown_file_1 = require("../files/flowr-rmarkdown-file");
|
|
7
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
/**
|
|
9
8
|
* Common base of the plugins reading an R Markdown flavor, which differ only in the files they claim.
|
|
10
9
|
*/
|
|
11
|
-
class FlowrAnalyzerRMarkdownFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
10
|
+
class FlowrAnalyzerRMarkdownFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
12
11
|
version = new semver_1.SemVer('0.1.0');
|
|
13
|
-
pattern;
|
|
14
|
-
constructor(filePattern) {
|
|
15
|
-
super();
|
|
16
|
-
this.pattern = filePattern;
|
|
17
|
-
}
|
|
18
|
-
applies(file) {
|
|
19
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
-
}
|
|
21
12
|
process(ctx, arg) {
|
|
22
13
|
return flowr_rmarkdown_file_1.FlowrRMarkdownFile.from(arg, ctx);
|
|
23
14
|
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrSweaveFile } from '../files/flowr-sweave-file';
|
|
7
6
|
/**
|
|
8
7
|
* The plugin provides support for Sweave (`.Rnw`) files
|
|
9
8
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerSweaveFilePlugin extends
|
|
9
|
+
export declare class FlowrAnalyzerSweaveFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly name = "sweave-file-plugin";
|
|
12
11
|
readonly description = "Parses R Sweave files";
|
|
13
12
|
readonly version: SemVer;
|
|
14
|
-
private readonly pattern;
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the Sweave file plugin.
|
|
17
15
|
* @param filePattern - The pattern to identify Sweave files, see {@link SweavePattern} for the default pattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(filePattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
18
|
protected process(_ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrSweaveFile;
|
|
22
19
|
}
|
|
@@ -3,27 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowrAnalyzerSweaveFilePlugin = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
7
6
|
const flowr_sweave_file_1 = require("../files/flowr-sweave-file");
|
|
8
7
|
const SweavePattern = /\.Rnw$/i;
|
|
9
8
|
/**
|
|
10
9
|
* The plugin provides support for Sweave (`.Rnw`) files
|
|
11
10
|
*/
|
|
12
|
-
class FlowrAnalyzerSweaveFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
11
|
+
class FlowrAnalyzerSweaveFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
13
12
|
name = 'sweave-file-plugin';
|
|
14
13
|
description = 'Parses R Sweave files';
|
|
15
14
|
version = new semver_1.SemVer('0.1.0');
|
|
16
|
-
pattern;
|
|
17
15
|
/**
|
|
18
16
|
* Creates a new instance of the Sweave file plugin.
|
|
19
17
|
* @param filePattern - The pattern to identify Sweave files, see {@link SweavePattern} for the default pattern.
|
|
20
18
|
*/
|
|
21
19
|
constructor(filePattern = SweavePattern) {
|
|
22
|
-
super();
|
|
23
|
-
this.pattern = filePattern;
|
|
24
|
-
}
|
|
25
|
-
applies(file) {
|
|
26
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
+
super(filePattern);
|
|
27
21
|
}
|
|
28
22
|
process(_ctx, arg) {
|
|
29
23
|
return flowr_sweave_file_1.FlowrSweaveFile.from(arg);
|
package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js
CHANGED
|
@@ -11,6 +11,7 @@ const flowr_file_1 = require("../../context/flowr-file");
|
|
|
11
11
|
const flowr_description_file_1 = require("../file-plugins/files/flowr-description-file");
|
|
12
12
|
const flowr_namespace_file_1 = require("../file-plugins/files/flowr-namespace-file");
|
|
13
13
|
const log_1 = require("../../../util/log");
|
|
14
|
+
const arrays_1 = require("../../../util/collections/arrays");
|
|
14
15
|
const fs_1 = __importDefault(require("fs"));
|
|
15
16
|
const path_1 = __importDefault(require("path"));
|
|
16
17
|
exports.libraryLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-package-versions-library-plugin' });
|
|
@@ -38,7 +39,7 @@ function libraryRoots(opts, projectRoot) {
|
|
|
38
39
|
const local = opts.useProjectLibrary === false || projectRoot === undefined ? [] :
|
|
39
40
|
['renv/library', 'renv/staging', 'packrat/lib'].map(d => path_1.default.join(projectRoot, d))
|
|
40
41
|
.flatMap(d => [d, ...libraryDirs(d, opts.maxDepth ?? 3)]);
|
|
41
|
-
return
|
|
42
|
+
return (0, arrays_1.uniqueArray)([...fromEnv, ...local]).filter(d => d.length > 0);
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* The package installed under `name` in one of `roots`, read from its own `DESCRIPTION` and `NAMESPACE`.
|
package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare class FlowrAnalyzerPackageVersionsSigDbPlugin extends FlowrAnalyz
|
|
|
52
52
|
/** the `additionalPaths` the current {@link sources} were assembled with, so a later config resolves a rebuild */
|
|
53
53
|
private sourcesKey;
|
|
54
54
|
private analyzerCtx;
|
|
55
|
-
/** `packagesExporting` answers, merged across the source set and self-filtered; the
|
|
55
|
+
/** `packagesExporting` answers, merged across the source set and self-filtered; the per-source half is {@link exportOwners} */
|
|
56
56
|
private exportsByName;
|
|
57
57
|
/** `pkg@assumedR` keys already reported via {@link baseVersionFor}'s fallback, so the info is logged once */
|
|
58
58
|
private readonly baseFallbacksLogged;
|
|
@@ -97,10 +97,10 @@ export declare class FlowrAnalyzerPackageVersionsSigDbPlugin extends FlowrAnalyz
|
|
|
97
97
|
/**
|
|
98
98
|
* Packages in the loaded sources (respecting `self`-package exclusion) that export `name`, **most downloaded
|
|
99
99
|
* first**, so whoever has to pick one (or show only a few) starts with the package a script most likely means.
|
|
100
|
-
* Backed by {@link
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
100
|
+
* Backed by {@link exportOwners}, which memoizes per *source* (and hence shares across every analyzer mounting
|
|
101
|
+
* the same bundle), so the repeated hint lookups of a linter run scan every package once per distinct name
|
|
102
|
+
* rather than once per call. Self-package exclusion is applied here rather than in that memo, which keeps the
|
|
103
|
+
* memo analyzer-independent.
|
|
104
104
|
*/
|
|
105
105
|
packagesExporting(name: string): readonly string[];
|
|
106
106
|
/**
|
package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js
CHANGED
|
@@ -112,6 +112,27 @@ function reconstructS3Generics(exported) {
|
|
|
112
112
|
}
|
|
113
113
|
/** the built {@link ExportIndex} of each source, see {@link ExportIndex.of} for why it is keyed by the source */
|
|
114
114
|
const exportIndices = new WeakMap();
|
|
115
|
+
/**
|
|
116
|
+
* `name -> the packages of a source exporting it`, filled one name at a time as it is asked for and shared by
|
|
117
|
+
* every analyzer mounting that source. The eager {@link ExportIndex} answers the same question with no scan at
|
|
118
|
+
* all, but it holds every export name of the bundle (~1.1M for the shipped one); a lint run asks for a few
|
|
119
|
+
* hundred distinct names, so this keeps the memo proportional to what was actually asked instead.
|
|
120
|
+
*/
|
|
121
|
+
const exportOwnersBySource = new WeakMap();
|
|
122
|
+
/** The packages of `src` exporting `name`, most downloaded first, scanning only the first time a name is asked. */
|
|
123
|
+
function exportOwners(src, name) {
|
|
124
|
+
let byName = exportOwnersBySource.get(src);
|
|
125
|
+
if (byName === undefined) {
|
|
126
|
+
byName = new Map();
|
|
127
|
+
exportOwnersBySource.set(src, byName);
|
|
128
|
+
}
|
|
129
|
+
let owners = byName.get(name);
|
|
130
|
+
if (owners === undefined) {
|
|
131
|
+
owners = src.packagesExporting(name);
|
|
132
|
+
byName.set(name, owners);
|
|
133
|
+
}
|
|
134
|
+
return owners;
|
|
135
|
+
}
|
|
115
136
|
/**
|
|
116
137
|
* The reverse `export name -> packages exporting it` view of a signature source, each entry ordered by download
|
|
117
138
|
* count (descending, ties by name) so whoever has to pick one exporter starts with the package a script most
|
|
@@ -125,6 +146,10 @@ const exportIndices = new WeakMap();
|
|
|
125
146
|
*/
|
|
126
147
|
exports.ExportIndex = {
|
|
127
148
|
name: 'ExportIndex',
|
|
149
|
+
/* not what `packagesExporting` uses: building this reads every package blob of the bundle to hold every export
|
|
150
|
+
* name (~1.1M for the shipped one), which measured both slower and ~330MB heavier than the few hundred scans
|
|
151
|
+
* {@link exportOwners} does for the names a run actually asks about. Kept for a caller that needs the whole
|
|
152
|
+
* reverse mapping at once. */
|
|
128
153
|
/** The index of `src`, built on first use and shared by every later caller; see {@link ExportIndex}. */
|
|
129
154
|
of(src) {
|
|
130
155
|
const cached = exportIndices.get(src);
|
|
@@ -177,7 +202,7 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
|
|
|
177
202
|
/** the `additionalPaths` the current {@link sources} were assembled with, so a later config resolves a rebuild */
|
|
178
203
|
sourcesKey;
|
|
179
204
|
analyzerCtx;
|
|
180
|
-
/** `packagesExporting` answers, merged across the source set and self-filtered; the
|
|
205
|
+
/** `packagesExporting` answers, merged across the source set and self-filtered; the per-source half is {@link exportOwners} */
|
|
181
206
|
exportsByName = new Map();
|
|
182
207
|
/** `pkg@assumedR` keys already reported via {@link baseVersionFor}'s fallback, so the info is logged once */
|
|
183
208
|
baseFallbacksLogged = new Set();
|
|
@@ -306,10 +331,10 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
|
|
|
306
331
|
/**
|
|
307
332
|
* Packages in the loaded sources (respecting `self`-package exclusion) that export `name`, **most downloaded
|
|
308
333
|
* first**, so whoever has to pick one (or show only a few) starts with the package a script most likely means.
|
|
309
|
-
* Backed by {@link
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
334
|
+
* Backed by {@link exportOwners}, which memoizes per *source* (and hence shares across every analyzer mounting
|
|
335
|
+
* the same bundle), so the repeated hint lookups of a linter run scan every package once per distinct name
|
|
336
|
+
* rather than once per call. Self-package exclusion is applied here rather than in that memo, which keeps the
|
|
337
|
+
* memo analyzer-independent.
|
|
313
338
|
*/
|
|
314
339
|
packagesExporting(name) {
|
|
315
340
|
if (!(0, config_1.isSigDbEnabled)(this.analyzerCtx?.config)) {
|
|
@@ -323,7 +348,9 @@ class FlowrAnalyzerPackageVersionsSigDbPlugin extends flowr_analyzer_package_ver
|
|
|
323
348
|
const seen = new Set();
|
|
324
349
|
const owners = [];
|
|
325
350
|
for (const src of sources) {
|
|
326
|
-
|
|
351
|
+
/* memoized per source, not per analyzer: the same handful of unresolved names comes back for every
|
|
352
|
+
* file the linter walks, and a miss is a scan over every package of the bundle */
|
|
353
|
+
for (const pkg of exportOwners(src, name)) {
|
|
327
354
|
if (!seen.has(pkg) && !this.isSelfPackage(pkg)) {
|
|
328
355
|
seen.add(pkg);
|
|
329
356
|
owners.push(pkg);
|
|
@@ -96,7 +96,7 @@ class FlowrAnalyzerFullProjectDiscoveryPlugin extends FlowrAnalyzerProjectDiscov
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
exports.FlowrAnalyzerFullProjectDiscoveryPlugin = FlowrAnalyzerFullProjectDiscoveryPlugin;
|
|
99
|
-
// noise directories pruned from the scoped walk on top of `ignorePathsWith`: build output, checks, rendered docs and packaged data
|
|
99
|
+
// noise directories pruned from the scoped walk on top of `ignorePathsWith`: build output, checks, rendered docs, and packaged data
|
|
100
100
|
const noiseDirs = /(^|\/)(\.git|\.svn|\.hg|node_modules|__pycache__|\.Rproj\.user|\.uvr|[^/]*\.Rcheck|(packrat|renv|rv)\/(lib|library|src|staging|sandbox|bundles|cache)[^/]*|build|dist|_build|_site|_book|\.quarto|\.cache|Rtmp[^/]*|man|inst\/(extdata|doc))(\/|$)/i;
|
|
101
101
|
// binary/data blobs, dropped even inside an otherwise kept directory
|
|
102
102
|
const noiseFiles = /\.(rds|rda|rdata|rd|png|jpe?g|gif|svg|pdf|ico|zip|tar|t?gz|bz2|xz|so|o|a|dll|dylib|exe|jar|woff2?|ttf|eot|feather|parquet|xls[xm]?|docx?|pptx?)$/i;
|
|
@@ -120,7 +120,7 @@ function resolveRules(override) {
|
|
|
120
120
|
exclude: (override?.exclude ?? []).map(glob_1.globMatcher)
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
/** over-approximating default: R sources, role metadata and `tests/`/`vignettes/` count as project files */
|
|
123
|
+
/** over-approximating default: R sources, role metadata, and `tests/`/`vignettes/` count as project files */
|
|
124
124
|
function keptByDefault(rel) {
|
|
125
125
|
const base = path_1.default.basename(rel);
|
|
126
126
|
return exports.discoverRSourcesRegex.test(rel) || metadataFilePatterns.some(p => p.test(base)) || testOrVignetteDir.test(rel);
|
package/project/sigdb/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SigDbMagic, SigDbSchema, type PkgBlob, type SigDb, type SigDbFeatures, type
|
|
1
|
+
import { SigDbMagic, SigDbSchema, type PkgBlob, type SigDb, type SigDbFeatures, type SigDbPkgMetaIndex, type SigDbShard, type SigDbTier, type SigVersionInfo } from './schema';
|
|
2
2
|
import { type SigDbIndex, type SigShardIndexWire } from './index-format';
|
|
3
3
|
import { type SigDbManifest, type SigDbShardRef, type SigDbDictRef } from './manifest';
|
|
4
4
|
/** per-package metadata handed to {@link SigDbBuilder.addPackage} (everything but `latest` defaults) */
|
|
@@ -73,7 +73,7 @@ export interface ShardedSigDb {
|
|
|
73
73
|
strings: string[];
|
|
74
74
|
dictHash: string;
|
|
75
75
|
/** package name to metadata, shared by every shard */
|
|
76
|
-
meta:
|
|
76
|
+
meta: SigDbPkgMetaIndex;
|
|
77
77
|
shards: SigShard[];
|
|
78
78
|
}
|
|
79
79
|
/** options for {@link SigDbBuilder.build} */
|
|
@@ -38,11 +38,6 @@ export interface DecodedFunction {
|
|
|
38
38
|
/** the Rd help topic (man-page name) documenting this function, when it differs from {@link name} */
|
|
39
39
|
readonly topic?: string;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The formal parameter names of a known signature, ready for `RFunctionCall.matchArgumentsToParameters`: the
|
|
43
|
-
* `...` parameter is excluded so partial (`pmatch`) matches against the remaining names stay unambiguous.
|
|
44
|
-
*/
|
|
45
|
-
export declare function signatureParameterNames(signature: readonly SigParameter[]): string[];
|
|
46
41
|
/**
|
|
47
42
|
* The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
|
|
48
43
|
* version's set) is expanded, names outside the set stay as leaves. Deduplicated and ascending.
|
package/project/sigdb/decode.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.blobTuple = void 0;
|
|
4
4
|
exports.cranBlobUrl = cranBlobUrl;
|
|
5
5
|
exports.tupleToBlob = tupleToBlob;
|
|
6
|
-
exports.signatureParameterNames = signatureParameterNames;
|
|
7
6
|
exports.transitiveCallees = transitiveCallees;
|
|
8
7
|
exports.decodeFunction = decodeFunction;
|
|
9
8
|
exports.decodeDependencies = decodeDependencies;
|
|
@@ -38,13 +37,6 @@ exports.blobTuple = blobTuple;
|
|
|
38
37
|
function tupleToBlob(t) {
|
|
39
38
|
return { sigs: t[0], cgs: t[1], fns: t[2], versions: t[3], noncran: t[4]?.length ? t[4] : undefined, deps: t[5] ?? [], depsByVersion: t[6] ?? {}, dates: t[7] ?? {} };
|
|
40
39
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The formal parameter names of a known signature, ready for `RFunctionCall.matchArgumentsToParameters`: the
|
|
43
|
-
* `...` parameter is excluded so partial (`pmatch`) matches against the remaining names stay unambiguous.
|
|
44
|
-
*/
|
|
45
|
-
function signatureParameterNames(signature) {
|
|
46
|
-
return signature.map(p => p.name).filter(n => n !== '...');
|
|
47
|
-
}
|
|
48
40
|
/**
|
|
49
41
|
* The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
|
|
50
42
|
* version's set) is expanded, names outside the set stay as leaves. Deduplicated and ascending.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SigDbPkgMetaIndex } from './schema';
|
|
2
2
|
/** a byte range `[startByte, bytes]` in the plain `.ndjson` */
|
|
3
3
|
export type ByteRange = [startByte: number, bytes: number];
|
|
4
4
|
/**
|
|
@@ -16,7 +16,7 @@ export interface SigDbIndex {
|
|
|
16
16
|
/** package name to blob index */
|
|
17
17
|
pkgs: Record<string, number>;
|
|
18
18
|
/** package name to metadata */
|
|
19
|
-
meta:
|
|
19
|
+
meta: SigDbPkgMetaIndex;
|
|
20
20
|
}
|
|
21
21
|
/** the on-disk (compact) form of a {@link SigDbIndex}: short keys, `meta` optional (hoisted into a manifest) */
|
|
22
22
|
export interface SigDbIndexWire {
|
|
@@ -24,7 +24,7 @@ export interface SigDbIndexWire {
|
|
|
24
24
|
d: ByteRange;
|
|
25
25
|
b: ByteRange[];
|
|
26
26
|
p: Record<string, number>;
|
|
27
|
-
m?:
|
|
27
|
+
m?: SigDbPkgMetaIndex;
|
|
28
28
|
}
|
|
29
29
|
/** the on-disk (compact) index of a blob-only shard (no dictionary of its own; it shares a dictionary file) */
|
|
30
30
|
export interface SigShardIndexWire {
|
|
@@ -35,6 +35,6 @@ export interface SigShardIndexWire {
|
|
|
35
35
|
/** encode an index to its compact on-disk form; omit `meta` when it is hoisted elsewhere (a manifest) */
|
|
36
36
|
export declare function encodeIndex(i: SigDbIndex, withMeta?: boolean): SigDbIndexWire;
|
|
37
37
|
/** decode a compact index; `meta` falls back to a hoisted map, and `dict` to empty (a blob-only shard) */
|
|
38
|
-
export declare function decodeIndex(w: SigDbIndexWire | SigShardIndexWire, meta?:
|
|
38
|
+
export declare function decodeIndex(w: SigDbIndexWire | SigShardIndexWire, meta?: SigDbPkgMetaIndex): SigDbIndex;
|
|
39
39
|
/** read a plain bundle's sidecar `.idx` file and decode it */
|
|
40
40
|
export declare function readSigDbIndex(plainFile: string): SigDbIndex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SigDbPkgMetaIndex, type SigDbShard, type SigDbTier } from './schema';
|
|
2
2
|
import type { ByteRange, SigDbIndexWire, SigShardIndexWire } from './index-format';
|
|
3
3
|
export declare const SigDbManifestMagic = "flowr-sigdb-manifest";
|
|
4
4
|
export declare const SigDbManifestSchema = 2;
|
|
@@ -39,7 +39,7 @@ export interface SigDbManifest {
|
|
|
39
39
|
generated: number;
|
|
40
40
|
cranBase?: string;
|
|
41
41
|
/** package metadata, hoisted here once and shared by every shard (they hold overlapping package sets) */
|
|
42
|
-
meta?:
|
|
42
|
+
meta?: SigDbPkgMetaIndex;
|
|
43
43
|
/** shared string dictionaries; a shard references one by id (they are stored once, not per shard) */
|
|
44
44
|
dicts?: SigDbDictRef[];
|
|
45
45
|
shards: SigDbShardRef[];
|
|
@@ -57,12 +57,14 @@ export declare function readManifestDate(manifestFile: string): string | undefin
|
|
|
57
57
|
export type SigDbScope = 'base' | 'current' | 'full';
|
|
58
58
|
/**
|
|
59
59
|
* Location of a bundled sigdb **manifest**, found by walking up from several roots (this module,
|
|
60
|
-
* `$FLOWR_SIGDB_DIR`, the working directory) across the dev (`src`), build (`dist`) and data-mount
|
|
60
|
+
* `$FLOWR_SIGDB_DIR`, the working directory) across the dev (`src`), build (`dist`), and data-mount
|
|
61
61
|
* layouts. With no `scope` it returns the richest available (`full` > `current` > `base`), so a
|
|
62
62
|
* container that ships the full set uses it automatically while a plain npm install falls back to the
|
|
63
63
|
* bundled `base`. Node only (needs `fs`); pass `searchRoots` to override where it looks.
|
|
64
64
|
*/
|
|
65
65
|
export declare function defaultSigDbPath(scope?: SigDbScope, searchRoots?: readonly string[]): string | undefined;
|
|
66
|
+
/** Forget what {@link defaultSigDbPaths} discovered, so the next call scans the filesystem again. */
|
|
67
|
+
export declare function clearDefaultSigDbPathsMemo(): void;
|
|
66
68
|
/**
|
|
67
69
|
* Every distinct sigdb bundle discoverable in the search dirs (see {@link defaultSigDbPath}) -- not just the
|
|
68
70
|
* richest scope. So dropping an extra bundle next to the shipped default (a downloaded full-history
|