@eagleoutice/flowr 2.17.4 → 2.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -52
- package/abstract-interpretation/absint-inference.js +1 -2
- package/abstract-interpretation/data-frame/arguments.d.ts +14 -3
- package/abstract-interpretation/data-frame/arguments.js +34 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.js +7 -15
- package/abstract-interpretation/data-frame/resolve-args.d.ts +2 -2
- package/abstract-interpretation/data-frame/semantics.d.ts +8 -1
- package/abstract-interpretation/data-frame/semantics.js +14 -6
- package/abstract-interpretation/domains/state-abstract-domain.js +28 -18
- package/abstract-interpretation/domains/state-map.d.ts +43 -0
- package/abstract-interpretation/domains/state-map.js +147 -0
- package/benchmark/slicer.d.ts +1 -1
- package/benchmark/slicer.js +8 -7
- package/cli/repl/commands/repl-dataflow.js +5 -5
- package/cli/repl/commands/repl-execute.js +3 -2
- package/cli/repl/commands/repl-parse.js +2 -1
- package/cli/repl/print-version.d.ts +1 -1
- package/cli/repl/print-version.js +2 -1
- package/cli/repl/server/connection.d.ts +1 -1
- package/cli/repl/server/connection.js +7 -9
- package/cli/slicer-app.js +2 -1
- package/clones/algorithms/baxter-ast.d.ts +33 -0
- package/clones/algorithms/baxter-ast.js +70 -0
- package/clones/algorithms/greedy-string-tiling.d.ts +17 -0
- package/clones/algorithms/greedy-string-tiling.js +56 -0
- package/clones/algorithms/winnowing.d.ts +27 -0
- package/clones/algorithms/winnowing.js +66 -0
- package/clones/clone-ast.d.ts +75 -0
- package/clones/clone-ast.js +174 -0
- package/clones/clone-dataflow.d.ts +11 -0
- package/clones/clone-dataflow.js +83 -0
- package/clones/clone-detector.d.ts +116 -0
- package/clones/clone-detector.js +200 -0
- package/clones/clone-index.d.ts +54 -0
- package/clones/clone-index.js +56 -0
- package/config.d.ts +21 -2
- package/config.js +7 -1
- package/control-flow/basic-cfg-guided-visitor.js +1 -2
- package/control-flow/happens-before.d.ts +2 -0
- package/control-flow/happens-before.js +15 -9
- package/control-flow/simple-visitor.js +2 -4
- package/core/steps/all/core/00-parse.js +2 -1
- package/core/steps/all/core/01-parse-tree-sitter.js +2 -1
- package/core/steps/all/core/10-normalize.js +2 -1
- package/core/steps/all/core/11-normalize-tree-sitter.js +2 -1
- package/core/steps/all/static-slicing/00-slice.js +2 -1
- package/core/steps/all/static-slicing/10-reconstruct.js +2 -1
- package/core/steps/pipeline/create-pipeline.js +1 -2
- package/core/steps/pipeline/default-pipelines.d.ts +1 -1
- package/core/steps/pipeline/default-pipelines.js +5 -4
- package/core/steps/pipeline-step.d.ts +3 -1
- package/core/steps/pipeline-step.js +5 -0
- package/data/r-base-primitives.generated.d.ts +2 -1
- package/dataflow/cluster.js +1 -2
- package/dataflow/environments/ambient-state-name.d.ts +14 -22
- package/dataflow/environments/ambient-state-name.js +4 -18
- package/dataflow/environments/apply-kill.d.ts +9 -20
- package/dataflow/environments/apply-kill.js +51 -25
- package/dataflow/environments/built-in-config.d.ts +7 -15
- package/dataflow/environments/built-in-config.js +15 -16
- package/dataflow/environments/built-in-eval-name.d.ts +5 -6
- package/dataflow/environments/built-in-eval-name.js +4 -5
- package/dataflow/environments/built-in-kinds.d.ts +111 -0
- package/dataflow/environments/built-in-kinds.js +35 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +11 -0
- package/dataflow/environments/built-in-props.d.ts +62 -175
- package/dataflow/environments/built-in-props.js +42 -154
- package/dataflow/environments/built-in.d.ts +37 -73
- package/dataflow/environments/built-in.js +41 -62
- package/dataflow/environments/data-masking-functions.d.ts +2 -2
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +7 -0
- package/dataflow/environments/default-builtin-config/base-functions.js +339 -0
- package/dataflow/environments/default-builtin-config/base-language.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/base-language.js +66 -0
- package/dataflow/environments/default-builtin-config/base-operators.d.ts +58 -0
- package/dataflow/environments/default-builtin-config/base-operators.js +169 -0
- package/dataflow/environments/default-builtin-config/database-access.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/database-access.js +16 -0
- package/dataflow/environments/default-builtin-config/define-helpers.d.ts +45 -0
- package/dataflow/environments/default-builtin-config/define-helpers.js +50 -0
- package/dataflow/environments/default-builtin-config/dev-tooling.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/dev-tooling.js +63 -0
- package/dataflow/environments/default-builtin-config/file-io.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/file-io.js +81 -0
- package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/graphics-devices.js +57 -0
- package/dataflow/environments/default-builtin-config/index.d.ts +18 -0
- package/dataflow/environments/default-builtin-config/index.js +114 -0
- package/dataflow/environments/default-builtin-config/media-formats.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/media-formats.js +41 -0
- package/dataflow/environments/default-builtin-config/misc-packages.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/misc-packages.js +18 -0
- package/dataflow/environments/default-builtin-config/network-access.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/network-access.js +47 -0
- package/dataflow/environments/default-builtin-config/object-systems.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/object-systems.js +39 -0
- package/dataflow/environments/default-builtin-config/package-data-table.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-data-table.js +18 -0
- package/dataflow/environments/default-builtin-config/package-spatial.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-spatial.js +32 -0
- package/dataflow/environments/default-builtin-config/package-tidyverse.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-tidyverse.js +96 -0
- package/dataflow/environments/default-builtin-config/package-utils.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-utils.js +35 -0
- package/dataflow/environments/default-builtin-config/package-withr.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-withr.js +41 -0
- package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/parallel-execution.js +31 -0
- package/dataflow/environments/default-builtin-config/session-interactive.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/session-interactive.js +31 -0
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +267 -0
- package/dataflow/environments/default-builtin-config/shared-configs.js +483 -0
- package/dataflow/environments/default-builtin-config/shared-signatures.d.ts +21 -0
- package/dataflow/environments/default-builtin-config/shared-signatures.js +32 -0
- package/dataflow/environments/default-builtin-config/statistics.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/statistics.js +32 -0
- package/dataflow/environments/default-builtin-config/unit-testing.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/unit-testing.js +13 -0
- package/dataflow/environments/environment.d.ts +28 -52
- package/dataflow/environments/environment.js +24 -71
- package/dataflow/environments/group-generics.d.ts +12 -19
- package/dataflow/environments/group-generics.js +17 -14
- package/dataflow/environments/identifier.d.ts +72 -427
- package/dataflow/environments/identifier.js +34 -145
- package/dataflow/environments/pkg-name.d.ts +197 -0
- package/dataflow/environments/pkg-name.js +3 -0
- package/dataflow/environments/query-fn-props.d.ts +27 -76
- package/dataflow/environments/query-fn-props.js +34 -95
- package/dataflow/environments/resolve-by-name.d.ts +6 -16
- package/dataflow/environments/resolve-by-name.js +23 -35
- package/dataflow/environments/scoping.d.ts +5 -5
- package/dataflow/environments/scoping.js +13 -5
- package/dataflow/eval/resolve/alias-tracking.d.ts +31 -68
- package/dataflow/eval/resolve/alias-tracking.js +611 -126
- package/dataflow/eval/resolve/match-arguments.d.ts +5 -3
- package/dataflow/eval/resolve/resolve-argument.d.ts +11 -11
- package/dataflow/eval/resolve/resolve-argument.js +25 -30
- package/dataflow/eval/resolve/resolve-field.d.ts +10 -0
- package/dataflow/eval/resolve/resolve-field.js +127 -0
- package/dataflow/eval/resolve/resolve-replacement.d.ts +10 -0
- package/dataflow/eval/resolve/resolve-replacement.js +80 -0
- package/dataflow/eval/resolve/resolve-strings.d.ts +2 -2
- package/dataflow/eval/resolve/resolve.d.ts +13 -10
- package/dataflow/eval/resolve/resolve.js +81 -32
- package/dataflow/eval/values/general.d.ts +6 -24
- package/dataflow/eval/values/general.js +12 -29
- package/dataflow/eval/values/lists/list-constants.d.ts +11 -0
- package/dataflow/eval/values/lists/list-constants.js +65 -0
- package/dataflow/eval/values/r-value.d.ts +20 -23
- package/dataflow/eval/values/r-value.js +22 -17
- package/dataflow/extractor.d.ts +2 -10
- package/dataflow/extractor.js +100 -46
- package/dataflow/fn/argument-roles.d.ts +2 -4
- package/dataflow/fn/argument-roles.js +49 -23
- package/dataflow/fn/class-declaration.d.ts +36 -52
- package/dataflow/fn/class-declaration.js +22 -56
- package/dataflow/fn/condition-handlers.d.ts +2 -1
- package/dataflow/fn/dispatch.d.ts +70 -0
- package/dataflow/fn/dispatch.js +434 -0
- package/dataflow/fn/exceptions-of-function.d.ts +1 -2
- package/dataflow/fn/exceptions-of-function.js +36 -106
- package/dataflow/fn/frame-reflection.d.ts +1 -3
- package/dataflow/fn/frame-reflection.js +8 -16
- package/dataflow/fn/function-props.d.ts +2 -5
- package/dataflow/fn/function-props.js +27 -36
- package/dataflow/fn/function-semantics.d.ts +14 -26
- package/dataflow/fn/function-semantics.js +4 -18
- package/dataflow/fn/higher-order-function.js +2 -4
- package/dataflow/fn/strict-function.d.ts +10 -35
- package/dataflow/fn/strict-function.js +126 -138
- package/dataflow/graph/ambient-access.d.ts +51 -0
- package/dataflow/graph/ambient-access.js +80 -0
- package/dataflow/graph/call-graph.d.ts +9 -29
- package/dataflow/graph/call-graph.js +17 -41
- package/dataflow/graph/closure-frames.d.ts +46 -0
- package/dataflow/graph/closure-frames.js +225 -0
- package/dataflow/graph/dataflowgraph-builder.d.ts +25 -96
- package/dataflow/graph/dataflowgraph-builder.js +29 -97
- package/dataflow/graph/df-helper.d.ts +48 -188
- package/dataflow/graph/df-helper.js +107 -208
- package/dataflow/graph/diff-dataflow-graph.d.ts +5 -15
- package/dataflow/graph/diff-dataflow-graph.js +25 -25
- package/dataflow/graph/edge.js +1 -1
- package/dataflow/graph/graph-helper.d.ts +10 -46
- package/dataflow/graph/graph-helper.js +16 -50
- package/dataflow/graph/graph.d.ts +44 -97
- package/dataflow/graph/graph.js +83 -79
- package/dataflow/graph/match-args.d.ts +21 -88
- package/dataflow/graph/match-args.js +284 -97
- package/dataflow/graph/vertex.d.ts +101 -128
- package/dataflow/graph/vertex.js +23 -20
- package/dataflow/hooks.d.ts +7 -14
- package/dataflow/hooks.js +15 -13
- package/dataflow/info.d.ts +2 -17
- package/dataflow/internal/dispatch-linking.d.ts +71 -0
- package/dataflow/internal/dispatch-linking.js +332 -0
- package/dataflow/internal/linker.d.ts +48 -50
- package/dataflow/internal/linker.js +457 -155
- package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -46
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +7 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +10 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +23 -75
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +263 -97
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +10 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +66 -45
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +15 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +82 -62
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +15 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +416 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +37 -54
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +192 -111
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +60 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +80 -76
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +1 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +4 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +436 -140
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +18 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +90 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +5 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +9 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +3 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +9 -24
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +10 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +8 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +20 -28
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +17 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +117 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +5 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +8 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +18 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +7 -25
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +31 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +4 -18
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +13 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +18 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +130 -65
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +38 -30
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +584 -114
- package/dataflow/internal/process/functions/call/common.d.ts +8 -24
- package/dataflow/internal/process/functions/call/common.js +24 -24
- package/dataflow/internal/process/functions/call/deferred.d.ts +7 -27
- package/dataflow/internal/process/functions/call/deferred.js +6 -27
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +6 -26
- package/dataflow/internal/process/functions/call/known-call-handling.js +6 -16
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +14 -35
- package/dataflow/internal/process/functions/call/nse.d.ts +2 -9
- package/dataflow/internal/process/functions/call/nse.js +6 -13
- package/dataflow/internal/process/functions/call/quoted.d.ts +4 -15
- package/dataflow/internal/process/functions/call/quoted.js +26 -62
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +3 -6
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +29 -11
- package/dataflow/internal/process/functions/process-parameter.js +1 -1
- package/dataflow/internal/program-order.d.ts +3 -10
- package/dataflow/internal/program-order.js +19 -10
- package/dataflow/origin/dfg-get-origin.js +2 -1
- package/documentation/data/faq/faqs.js +16 -1
- package/documentation/data/interface/doc-writing-code.js +5 -7
- package/documentation/doc-capabilities.js +3 -3
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-code.d.ts +0 -5
- package/documentation/doc-util/doc-code.js +2 -22
- package/documentation/doc-util/doc-query.d.ts +1 -2
- package/documentation/doc-util/doc-query.js +4 -5
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/wiki-analyzer.js +4 -3
- package/documentation/wiki-core.js +5 -5
- package/documentation/wiki-dataflow-graph.js +6 -0
- package/documentation/wiki-interface.js +2 -1
- package/documentation/wiki-linter.js +15 -3
- package/documentation/wiki-linting-and-testing.js +15 -2
- package/documentation/wiki-query.js +111 -29
- package/index.d.ts +3 -1
- package/index.js +6 -3
- package/linter/linter-executor.js +1 -1
- package/linter/linter-rules.d.ts +37 -8
- package/linter/linter-rules.js +8 -1
- package/linter/linter-util.d.ts +3 -3
- package/linter/linter-util.js +1 -1
- package/linter/rules/cmd-check/bogus-return.d.ts +2 -1
- package/linter/rules/cmd-check/call-arguments.d.ts +3 -2
- package/linter/rules/cmd-check/call-arguments.js +5 -5
- package/linter/rules/cmd-check/cmd-check-util.d.ts +9 -8
- package/linter/rules/cmd-check/dependency-declaration.d.ts +2 -1
- package/linter/rules/cmd-check/dependency-declaration.js +1 -1
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +3 -2
- package/linter/rules/cmd-check/documentation-mismatch.js +2 -1
- package/linter/rules/cmd-check/file-checks.d.ts +2 -2
- package/linter/rules/cmd-check/foreign-function-calls.d.ts +2 -1
- package/linter/rules/cmd-check/global-environment-modification.d.ts +6 -5
- package/linter/rules/cmd-check/namespace-tampering.d.ts +2 -1
- package/linter/rules/cmd-check/non-ascii-code.js +1 -1
- package/linter/rules/cmd-check/package-files.d.ts +2 -2
- package/linter/rules/cmd-check/package-hooks.d.ts +5 -4
- package/linter/rules/cmd-check/package-runtime.js +2 -2
- package/linter/rules/cmd-check/rd-files.js +2 -1
- package/linter/rules/cmd-check/s-three-method-consistency.d.ts +3 -2
- package/linter/rules/cmd-check/s-three-method-consistency.js +2 -1
- package/linter/rules/code-clones.d.ts +57 -0
- package/linter/rules/code-clones.js +53 -0
- package/linter/rules/deprecated-functions.js +3 -6
- package/linter/rules/file-path-validity.js +6 -4
- package/linter/rules/function-finder-util.d.ts +4 -2
- package/linter/rules/naming-convention.d.ts +6 -5
- package/linter/rules/naming-convention.js +2 -3
- package/linter/rules/no-leaked-credentials.d.ts +2 -1
- package/linter/rules/no-leaked-credentials.js +1 -1
- package/linter/rules/overwritten-file.d.ts +2 -1
- package/linter/rules/problematic-inputs.d.ts +2 -1
- package/linter/rules/problematic-inputs.js +3 -3
- package/linter/rules/process-state-in-session.d.ts +7 -6
- package/linter/rules/process-state-in-session.js +1 -1
- package/linter/rules/roxygen-arguments.d.ts +1 -1
- package/linter/rules/secret-exfiltration.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +3 -3
- package/linter/rules/unclosed-connection.js +1 -2
- package/linter/rules/undefined-symbol-util.d.ts +3 -2
- package/linter/rules/undefined-symbol.d.ts +3 -2
- package/linter/rules/unescaped-arguments.d.ts +1 -1
- package/linter/rules/unescaped-arguments.js +6 -8
- package/linter/rules/unused-definition.d.ts +4 -3
- package/linter/rules/unused-definition.js +10 -12
- package/linter/rules/unused-import.d.ts +6 -5
- package/package.json +1 -1
- package/project/attached-packages.d.ts +5 -4
- package/project/cache/flowr-analyzer-cache.d.ts +14 -1
- package/project/cache/flowr-analyzer-cache.js +40 -3
- package/project/context/flowr-analyzer-dependencies-context.d.ts +12 -12
- package/project/context/flowr-analyzer-environment-context.d.ts +3 -3
- package/project/context/flowr-analyzer-environment-context.js +3 -3
- package/project/context/flowr-analyzer-functions-context.d.ts +9 -7
- package/project/context/flowr-analyzer-gas-context.d.ts +25 -0
- package/project/context/flowr-analyzer-gas-context.js +34 -4
- package/project/dependency-version-space.d.ts +30 -29
- package/project/dependency-version-space.js +1 -2
- package/project/flowr-analyzer-builder.d.ts +2 -3
- package/project/flowr-analyzer.d.ts +35 -3
- package/project/flowr-analyzer.js +11 -5
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +15 -14
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +5 -4
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +2 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +2 -1
- package/project/plugins/package-version-plugins/package.d.ts +6 -5
- package/project/sigdb/build.js +1 -1
- package/project/sigdb/decode.d.ts +8 -7
- package/project/sigdb/decode.js +1 -2
- package/project/sigdb/dict.d.ts +2 -1
- package/project/sigdb/dict.js +2 -2
- package/project/sigdb/index-format.d.ts +2 -1
- package/project/sigdb/manifest.d.ts +1 -1
- package/project/sigdb/memory-source.d.ts +18 -17
- package/project/sigdb/on-demand/package-sources.d.ts +4 -3
- package/project/sigdb/on-demand/recoverer.d.ts +2 -1
- package/project/sigdb/on-demand/remote-sources.d.ts +2 -1
- package/project/sigdb/reader.d.ts +85 -80
- package/project/sigdb/reader.js +0 -4
- package/project/sigdb/schema.d.ts +9 -8
- package/project/sigdb/signature-db.d.ts +6 -6
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +6 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +50 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +54 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-format.js +45 -0
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +2 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +3 -2
- package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +6 -0
- package/queries/catalog/code-clones-query/code-clones-query-executor.js +38 -0
- package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +54 -0
- package/queries/catalog/code-clones-query/code-clones-query-format.js +73 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -3
- package/queries/catalog/dependencies-query/data-flow.d.ts +5 -4
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +5 -2
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +5 -5
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +3 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +6 -4
- package/queries/catalog/dependencies-query/implicit-echo.js +2 -1
- package/queries/catalog/dice-query/dice-query-format.d.ts +1 -0
- package/queries/catalog/dice-query/dice-query-format.js +1 -0
- package/queries/catalog/does-call-query/does-call-query-executor.js +1 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +1 -0
- package/queries/catalog/function-info-query/function-info-query-format.d.ts +2 -1
- package/queries/catalog/function-info-query/function-origin.d.ts +3 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +3 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +5 -4
- 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/input-sources-query/input-sources-query-executor.js +7 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +9 -9
- package/queries/catalog/input-sources-query/simple-input-classifier.js +1 -1
- package/queries/catalog/linter-query/linter-query-executor.js +4 -1
- package/queries/catalog/linter-query/linter-query-format.js +3 -2
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -0
- package/queries/catalog/origin-query/origin-query-format.js +1 -0
- package/queries/catalog/project-query/project-query-format.d.ts +2 -1
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +1 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +9 -6
- package/queries/catalog/signature-query/signature-query-executor.js +14 -15
- package/queries/catalog/signature-query/signature-query-format.d.ts +21 -20
- package/queries/catalog/signature-query/signature-query-render.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +9 -5
- package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
- package/queries/query-function-filter.d.ts +1 -1
- package/queries/query.d.ts +59 -8
- package/queries/query.js +59 -37
- package/r-bridge/data/data.d.ts +39 -28
- package/r-bridge/data/data.js +37 -28
- package/r-bridge/lang-4.x/ast/model/model.d.ts +10 -1
- package/r-bridge/lang-4.x/ast/model/model.js +30 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +25 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +2 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -2
- 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-comment.d.ts +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-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -3
- 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-if-then-else.d.ts +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-logical.d.ts +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-number.d.ts +1 -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-pipe.d.ts +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-string.d.ts +5 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -7
- 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-unary-op.d.ts +3 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -5
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +7 -2
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +14 -6
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/visitor.js +2 -2
- package/r-bridge/lang-4.x/ast/model/type.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/type.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -2
- package/r-bridge/parser.d.ts +8 -2
- package/r-bridge/parser.js +6 -0
- package/r-bridge/shell-executor.d.ts +2 -2
- package/r-bridge/shell-executor.js +3 -2
- package/r-bridge/shell.d.ts +2 -2
- package/r-bridge/shell.js +3 -2
- package/reconstruct/auto-select/magic-comments.js +1 -1
- package/reconstruct/reconstruct.d.ts +0 -5
- package/reconstruct/reconstruct.js +6 -5
- package/search/flowr-search-builder.d.ts +14 -0
- package/search/flowr-search-builder.js +7 -0
- package/search/flowr-search-executor.js +2 -2
- package/search/flowr-search-filters.js +8 -9
- package/search/flowr-search.js +1 -1
- package/search/search-executor/search-enrichers.d.ts +2 -0
- package/search/search-executor/search-enrichers.js +6 -1
- package/search/search-executor/search-generators.d.ts +2 -2
- package/search/search-executor/search-generators.js +13 -8
- package/search/search-executor/search-mappers.js +1 -1
- package/search/search-executor/search-transformer.d.ts +2 -2
- package/search/search-executor/search-transformer.js +6 -6
- package/slicing/criterion/parse.d.ts +2 -1
- package/slicing/criterion/parse.js +2 -1
- package/slicing/static/removal-slice.js +2 -1
- package/slicing/static/slice-call.d.ts +30 -4
- package/slicing/static/slice-call.js +74 -9
- package/slicing/static/slicer-types.d.ts +2 -1
- package/slicing/static/static-slicer.js +66 -11
- package/slicing/static/visiting-queue.d.ts +2 -0
- package/slicing/static/visiting-queue.js +4 -0
- package/taint-analysis/builder/report-template.d.ts +3 -3
- package/util/arg-matching.d.ts +1 -1
- package/util/collections/relation.d.ts +23 -0
- package/util/collections/relation.js +63 -0
- package/util/fixpoint.d.ts +65 -0
- package/util/fixpoint.js +216 -0
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
- package/util/json.d.ts +4 -0
- package/util/json.js +12 -3
- package/util/mermaid/cfg.js +1 -2
- package/util/mermaid/dfg.d.ts +1 -1
- package/util/mermaid/dfg.js +1 -1
- package/util/mermaid/mermaid.d.ts +2 -1
- package/util/monoid.d.ts +26 -0
- package/util/monoid.js +31 -0
- package/util/prefix.d.ts +1 -1
- package/util/r-base-packages.d.ts +10 -7
- package/util/r-base-packages.js +11 -6
- package/util/r-package-urls.d.ts +10 -9
- package/util/r-value.js +2 -1
- package/util/r-version-order.d.ts +2 -0
- package/util/r-version-order.js +19 -0
- package/util/r-version.d.ts +2 -1
- package/util/r-version.js +2 -14
- package/util/range.d.ts +38 -29
- package/util/range.js +10 -5
- package/util/simple-df/dfg-ascii.js +2 -2
- package/util/text/ansi.d.ts +13 -9
- package/util/text/ansi.js +4 -6
- package/util/text/strings.d.ts +10 -3
- package/util/text/strings.js +10 -1
- package/util/version.d.ts +1 -1
- package/util/version.js +2 -1
- package/dataflow/environments/default-builtin-config.d.ts +0 -8874
- package/dataflow/environments/default-builtin-config.js +0 -1737
- package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -33
- package/r-bridge/lang-4.x/ast/model/operators.js +0 -54
- package/taint-analysis/eval/eval.d.ts +0 -1
- package/taint-analysis/eval/eval.js +0 -124
- package/taint-analysis/eval/instrumentation.d.ts +0 -59
- package/taint-analysis/eval/instrumentation.js +0 -124
|
@@ -47,6 +47,7 @@ function diceQueryCompleter(line, startingNewArg, _config) {
|
|
|
47
47
|
exports.DiceQueryDefinition = {
|
|
48
48
|
title: 'Dice Query',
|
|
49
49
|
executor: dice_query_executor_1.executeDiceQuery,
|
|
50
|
+
perQueryResults: true,
|
|
50
51
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => (0, slice_query_options_1.summarizeSliceResults)(formatter, 'dice', queryResults, result, (_, q) => q ? `Dice from {${q.from.join(', ')}} to {${q.to.join(', ')}}` : 'Dice'),
|
|
51
52
|
fromLine: diceQueryLineParser,
|
|
52
53
|
completer: diceQueryCompleter,
|
|
@@ -76,8 +76,7 @@ function makeCallMatcher(constraint) {
|
|
|
76
76
|
function findCallersMatchingConstraints(cg, start, constraints, expandDeps) {
|
|
77
77
|
const visited = new Set();
|
|
78
78
|
const toVisit = [start];
|
|
79
|
-
|
|
80
|
-
const cur = toVisit.pop();
|
|
79
|
+
for (let cur; (cur = toVisit.pop()) !== undefined;) {
|
|
81
80
|
if (visited.has(cur)) {
|
|
82
81
|
continue;
|
|
83
82
|
}
|
|
@@ -56,6 +56,7 @@ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly stri
|
|
|
56
56
|
export declare const DoesCallQueryDefinition: {
|
|
57
57
|
readonly title: "Does-Call Query";
|
|
58
58
|
readonly executor: typeof executeDoesCallQuery;
|
|
59
|
+
readonly perQueryResults: true;
|
|
59
60
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
60
61
|
readonly fromLine: typeof doesCallQueryLineParser;
|
|
61
62
|
readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
|
|
@@ -71,6 +71,7 @@ function doesCallQueryLineParser(output, line, _config) {
|
|
|
71
71
|
exports.DoesCallQueryDefinition = {
|
|
72
72
|
title: 'Does-Call Query',
|
|
73
73
|
executor: does_call_query_executor_1.executeDoesCallQuery,
|
|
74
|
+
perQueryResults: true,
|
|
74
75
|
asciiSummarizer: async (formatter, processed, queryResults, result) => {
|
|
75
76
|
const out = queryResults;
|
|
76
77
|
result.push(`Query: ${(0, ansi_1.bold)('does-call', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
1
2
|
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
|
|
2
3
|
import Joi from 'joi';
|
|
3
4
|
import type { ParsedQueryLine } from '../../query';
|
|
@@ -17,7 +18,7 @@ export interface FunctionInfoQuery extends BaseQueryFormat {
|
|
|
17
18
|
/** the bare function/symbol name to look up */
|
|
18
19
|
readonly name: string;
|
|
19
20
|
/** restrict the package list to these names; every exporting package when omitted */
|
|
20
|
-
readonly packages?: readonly
|
|
21
|
+
readonly packages?: readonly BrandedNamespace[];
|
|
21
22
|
}
|
|
22
23
|
/** what the signature database states about `name` in one exporting package */
|
|
23
24
|
export interface FunctionInfoPackageHit {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
1
2
|
import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
|
|
2
3
|
/**
|
|
3
4
|
* flowR's own modeling of one built-in entry naming a function, read off the built-in definitions the analyzer
|
|
@@ -7,7 +8,7 @@ import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flow
|
|
|
7
8
|
export interface BuiltinModel {
|
|
8
9
|
readonly kind: 'function' | 'constant' | 'replacement';
|
|
9
10
|
/** the package the entry names it under, e.g. `stats` for `sd`; `undefined` for an unqualified entry like most of `base` */
|
|
10
|
-
readonly namespace?:
|
|
11
|
+
readonly namespace?: BrandedNamespace;
|
|
11
12
|
/** {@link BuiltInProcName} value, for a `function` entry */
|
|
12
13
|
readonly processor?: string;
|
|
13
14
|
readonly assumePrimitive: boolean;
|
|
@@ -19,4 +20,4 @@ export interface BuiltinModel {
|
|
|
19
20
|
readonly configKeys: readonly string[];
|
|
20
21
|
}
|
|
21
22
|
/** every built-in the analyzer states for the bare name `name`, one entry per namespace it is declared under, empty when it states none */
|
|
22
|
-
export declare function builtinModelsOf(name:
|
|
23
|
+
export declare function builtinModelsOf(name: BrandedIdentifier, ctx: ReadOnlyFlowrAnalyzerContext): readonly BuiltinModel[];
|
|
@@ -98,7 +98,7 @@ function mergeQueries(queries) {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
/** format version range string from survivors and declared constraints, honest about gaps */
|
|
101
|
-
function rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap) {
|
|
101
|
+
function rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap) {
|
|
102
102
|
if (survivors.length === 0) {
|
|
103
103
|
if (unsatisfiable) {
|
|
104
104
|
return declaredConstraints.join(' ') || '<contradiction>';
|
|
@@ -127,7 +127,7 @@ function guessPackage(name, cap, surviving, evidence, { used, linkedWith, couple
|
|
|
127
127
|
package: name,
|
|
128
128
|
base: surviving.base,
|
|
129
129
|
declaredConstraints,
|
|
130
|
-
range: rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap),
|
|
130
|
+
range: rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap),
|
|
131
131
|
minVersion: survivors.length > 0 ? survivors[0] : undefined,
|
|
132
132
|
maxVersion: survivors.length > 0 ? survivors[survivors.length - 1] : undefined,
|
|
133
133
|
candidateCount: survivors.length,
|
|
@@ -261,7 +261,7 @@ async function executeGuessDepVersionsQuery({ analyzer }, queries) {
|
|
|
261
261
|
const versions = s.survivors.map(e => e.ver);
|
|
262
262
|
return (0, objects_1.compactRecord)({
|
|
263
263
|
package: alt,
|
|
264
|
-
range: rangeString(versions, false, s.unsatisfiable, s.declaredRange, s.declaredConstraints, cap),
|
|
264
|
+
range: rangeString(versions, { nonContiguous: false, unsatisfiable: s.unsatisfiable }, s.declaredRange, s.declaredConstraints, cap),
|
|
265
265
|
minVersion: versions[0],
|
|
266
266
|
maxVersion: versions[versions.length - 1],
|
|
267
267
|
candidateCount: versions.length,
|
|
@@ -3,6 +3,7 @@ import Joi from 'joi';
|
|
|
3
3
|
import type { ParsedQueryLine } from '../../query';
|
|
4
4
|
import { type OutputFormatter } from '../../../util/text/ansi';
|
|
5
5
|
import { type VersionString } from '../../../util/r-version';
|
|
6
|
+
import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
6
7
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
7
8
|
import { VersionSelection, type FlowrConfig } from '../../../config';
|
|
8
9
|
import { executeGuessDepVersionsQuery } from './guess-dep-versions-query-executor';
|
|
@@ -20,7 +21,7 @@ import type { RVersionOrigin } from '../../../project/context/flowr-analyzer-con
|
|
|
20
21
|
export interface GuessDepVersionsQuery extends BaseQueryFormat {
|
|
21
22
|
readonly type: 'guess-dep-versions';
|
|
22
23
|
/** restrict the guess to these packages; omit to guess for every declared and used dependency */
|
|
23
|
-
readonly packages?: readonly
|
|
24
|
+
readonly packages?: readonly BrandedNamespace[];
|
|
24
25
|
/** only consider versions released on or before this day, written `YYYY.MM.DD` (also `YYYY` or `YYYY.MM`) */
|
|
25
26
|
readonly date?: string;
|
|
26
27
|
/** cap the number of candidate versions listed per dependency in the result (default {@link DefaultCandidateCap}) */
|
|
@@ -39,7 +40,7 @@ export interface GuessExplodeOptions {
|
|
|
39
40
|
/** iterate each dependency's versions newest-first (default) or oldest-first */
|
|
40
41
|
readonly order?: 'newest' | 'oldest';
|
|
41
42
|
/** a version to prefer per dependency when it survives the constraints (package name to version) */
|
|
42
|
-
readonly prefer?: Readonly<Record<
|
|
43
|
+
readonly prefer?: Readonly<Record<BrandedNamespace, VersionString>>;
|
|
43
44
|
/** cap the number of combinations considered; the ones that cannot be loaded together are skipped, not returned */
|
|
44
45
|
readonly limit?: number;
|
|
45
46
|
}
|
|
@@ -105,7 +106,7 @@ export interface GuessedDependency {
|
|
|
105
106
|
/** set when the constraints contradict each other so that no version can satisfy them all */
|
|
106
107
|
readonly unsatisfiable?: boolean;
|
|
107
108
|
/** the other packages this one shares a version with, so its range is not independent of theirs */
|
|
108
|
-
readonly linkedWith?: readonly
|
|
109
|
+
readonly linkedWith?: readonly BrandedNamespace[];
|
|
109
110
|
/**
|
|
110
111
|
* The other packages whose version requirements this one's version choice interacts with, so the two cannot be
|
|
111
112
|
* picked independently (`A 0.2.5` requiring `B == 0.2.1` while `A 0.3.0` requires `B == 0.3.2`). A partner marked
|
|
@@ -140,7 +141,7 @@ export interface GuessedDependency {
|
|
|
140
141
|
*/
|
|
141
142
|
readonly orphan?: boolean;
|
|
142
143
|
/** the undefined orphan function names that inferred this package (only set when {@link orphan}), e.g. `['ggplot']` */
|
|
143
|
-
readonly orphanFunctions?: readonly
|
|
144
|
+
readonly orphanFunctions?: readonly BrandedIdentifier[];
|
|
144
145
|
/** per {@link orphanFunctions} entry, where the undefined call is and why it was pinned on this package */
|
|
145
146
|
readonly orphanEvidence?: readonly OrphanEvidenceView[];
|
|
146
147
|
/**
|
|
@@ -29,6 +29,7 @@ export declare const HappensBeforeKey: {
|
|
|
29
29
|
export declare const HappensBeforeQueryDefinition: {
|
|
30
30
|
readonly title: "Happens-Before Query";
|
|
31
31
|
readonly executor: typeof executeHappensBefore;
|
|
32
|
+
readonly perQueryResults: true;
|
|
32
33
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
33
34
|
readonly schema: Joi.ObjectSchema<any>;
|
|
34
35
|
};
|
|
@@ -28,6 +28,7 @@ exports.HappensBeforeKey = {
|
|
|
28
28
|
exports.HappensBeforeQueryDefinition = {
|
|
29
29
|
title: 'Happens-Before Query',
|
|
30
30
|
executor: happens_before_query_executor_1.executeHappensBefore,
|
|
31
|
+
perQueryResults: true,
|
|
31
32
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
32
33
|
const out = queryResults;
|
|
33
34
|
result.push((0, query_print_1.queryHeader)('happens-before', formatter, out['.meta'].timing));
|
|
@@ -22,8 +22,7 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
|
|
|
22
22
|
const results = {};
|
|
23
23
|
const nast = await analyzer.normalize();
|
|
24
24
|
const df = await analyzer.dataflow();
|
|
25
|
-
const
|
|
26
|
-
const defaultConfig = addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
|
|
25
|
+
const defaultConfig = await analyzer.derive(resolveDefaultConfig, () => resolveDefaultConfig(analyzer));
|
|
27
26
|
const packages = unqualifiedPackages(analyzer, df.environment);
|
|
28
27
|
for (const query of queries) {
|
|
29
28
|
const criteria = Array.isArray(query.criterion)
|
|
@@ -47,6 +46,11 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
|
|
|
47
46
|
results
|
|
48
47
|
};
|
|
49
48
|
}
|
|
49
|
+
/** The default classifier config with the configured entries added, its searches (e.g. linter rules) resolved. */
|
|
50
|
+
async function resolveDefaultConfig(analyzer) {
|
|
51
|
+
const ctx = analyzer.inspectContext();
|
|
52
|
+
return addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
|
|
53
|
+
}
|
|
50
54
|
/**
|
|
51
55
|
* The packages whose exports are usable without a namespace: those R has on its search path at the end of the
|
|
52
56
|
* program, the ones the project declares, and the base packages R attaches on startup.
|
|
@@ -87,7 +91,7 @@ async function resolveSearches(analyzer, config) {
|
|
|
87
91
|
}
|
|
88
92
|
else if (value === undefined || Array.isArray(value)) {
|
|
89
93
|
// entries may be written as `pkg::fn` strings in the configuration, which only mean the namespaced function once parsed
|
|
90
|
-
result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(e) : e);
|
|
94
|
+
result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(String(e)) : e);
|
|
91
95
|
}
|
|
92
96
|
else {
|
|
93
97
|
const searchResult = await (0, flowr_search_executor_1.runSearch)(value, analyzer);
|
|
@@ -3,7 +3,7 @@ import { InputTraceType, InputType } from './input-types';
|
|
|
3
3
|
export { InputTraceType, InputType } from './input-types';
|
|
4
4
|
import type { DataflowGraph } from '../../../dataflow/graph/graph';
|
|
5
5
|
import type { MergeableRecord } from '../../../util/objects';
|
|
6
|
-
import { Identifier } from '../../../dataflow/environments/identifier';
|
|
6
|
+
import { Identifier, type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
7
7
|
import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
|
|
8
8
|
import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
|
|
9
9
|
/**
|
|
@@ -13,18 +13,18 @@ import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface LinkedInputObject {
|
|
15
15
|
/** the name of the object, e.g. `input` */
|
|
16
|
-
readonly name:
|
|
16
|
+
readonly name: BrandedIdentifier;
|
|
17
17
|
/** how reads of the object (or of its fields) are to be classified */
|
|
18
18
|
readonly type: InputType;
|
|
19
19
|
/**
|
|
20
20
|
* If given, the object only counts as linked if the function binding it declares all of these parameters as well
|
|
21
21
|
* (e.g., shiny's `function(input, output, session)`). Without this, every `input` would be treated as the framework's.
|
|
22
22
|
*/
|
|
23
|
-
readonly withParams?: readonly
|
|
23
|
+
readonly withParams?: readonly BrandedIdentifier[];
|
|
24
24
|
/** the package that has to be attached for this object to exist, e.g. `shiny` */
|
|
25
25
|
readonly requires?: string;
|
|
26
26
|
/** if given, only these fields are inputs (`session$clientData` is, `session$userData` is not) and the object itself is none */
|
|
27
|
-
readonly fields?: readonly
|
|
27
|
+
readonly fields?: readonly BrandedIdentifier[];
|
|
28
28
|
/** how the framework declares the entries of this object, so a read of `input$n` links to the `textInput("n", ...)` defining it */
|
|
29
29
|
readonly declaredBy?: LinkedInputDeclaration;
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@ export interface LinkedInputDeclaration {
|
|
|
33
33
|
/** the declaring calls, e.g. shiny's `textInput`, `selectInput`, ... */
|
|
34
34
|
readonly calls: readonly Identifier[];
|
|
35
35
|
/** the name of the argument holding the entry's name */
|
|
36
|
-
readonly argName:
|
|
36
|
+
readonly argName: BrandedIdentifier;
|
|
37
37
|
/** the index of that argument when it is passed positionally */
|
|
38
38
|
readonly argIdx: number;
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ export interface LinkedInputEntryPoint {
|
|
|
45
45
|
/** the call taking the function, e.g. `shiny::shinyApp` */
|
|
46
46
|
readonly call: Identifier;
|
|
47
47
|
/** the name of the argument holding the function */
|
|
48
|
-
readonly argName:
|
|
48
|
+
readonly argName: BrandedIdentifier;
|
|
49
49
|
/** the index of that argument when it is passed positionally */
|
|
50
50
|
readonly argIdx: number;
|
|
51
51
|
/** which {@link LinkedInputObject} the framework binds to each parameter, by position; `undefined` leaves one alone */
|
|
@@ -55,7 +55,7 @@ export interface LinkedInputEntryPoint {
|
|
|
55
55
|
export interface NarrowingFunction {
|
|
56
56
|
readonly call: Identifier;
|
|
57
57
|
/** the name of the bounding argument */
|
|
58
|
-
readonly argName:
|
|
58
|
+
readonly argName: BrandedIdentifier;
|
|
59
59
|
/** the index of the bounding argument when it is passed positionally */
|
|
60
60
|
readonly argIdx: number;
|
|
61
61
|
}
|
|
@@ -79,7 +79,7 @@ export interface InputSource extends MergeableRecord {
|
|
|
79
79
|
* Argument name when this source originates from a named argument of the criterion function call,
|
|
80
80
|
* or the accessed field when it originates from a {@link LinkedInputObject} (e.g. `n` for `input$n`).
|
|
81
81
|
*/
|
|
82
|
-
name?:
|
|
82
|
+
name?: BrandedIdentifier;
|
|
83
83
|
/** the concrete scalar value when the source is a constant or a pure alias of one */
|
|
84
84
|
value?: ConstantValue;
|
|
85
85
|
/** where the framework entry this source reads is declared, e.g. the `textInput("n", ...)` behind an `input$n` */
|
|
@@ -135,4 +135,4 @@ export interface InputClassifierConfig<Functions extends InputClassifierFunction
|
|
|
135
135
|
* For the scope escape analysis, pass on the full, non-reduced DFG as `fullDfg`, and the packages attached in the
|
|
136
136
|
* program as `packages` so that bare calls only match the entries of packages that are actually in scope.
|
|
137
137
|
*/
|
|
138
|
-
export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<
|
|
138
|
+
export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<BrandedNamespace>, environment?: REnvironmentInformation): InputSources;
|
|
@@ -819,7 +819,7 @@ function isBoundAsLinkedObject(node, obj, idMap) {
|
|
|
819
819
|
return true;
|
|
820
820
|
}
|
|
821
821
|
for (const fn of enclosingFunctions(node, idMap)) {
|
|
822
|
-
const params = new Set(fn.parameters.map(p => p.name.content));
|
|
822
|
+
const params = new Set(fn.parameters.map(p => identifier_1.Identifier.getName(p.name.content)));
|
|
823
823
|
if (params.has(obj.name)) {
|
|
824
824
|
return obj.withParams.every(p => params.has(p));
|
|
825
825
|
}
|
|
@@ -45,7 +45,10 @@ async function executeLinterQuery({ analyzer }, queries) {
|
|
|
45
45
|
results.results[ruleName] = { error: new Error(`skipped due to resource pressure (gas: critical), see ${gas_1.GasWikiRef}`) };
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
/* the first rule may be the one to compute the graph, the others share the walks for call targets in it */
|
|
49
|
+
const run = () => (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
|
|
50
|
+
const graph = analyzer.peekDataflow()?.graph;
|
|
51
|
+
results.results[ruleName] = await (graph === undefined ? run() : graph.sharingTargetWalks(run));
|
|
49
52
|
}
|
|
50
53
|
/* rendered here, not when printing, so an api client gets it too */
|
|
51
54
|
const format = queries.map(q => q.format).find(assert_1.isNotUndefined);
|
|
@@ -46,7 +46,8 @@ function linterQueryLineParser(output, line, _config) {
|
|
|
46
46
|
let tags = undefined;
|
|
47
47
|
const rest = [...line];
|
|
48
48
|
while (rest.length > 0 && [rulesPrefix, formatPrefix, tagsPrefix].some(p => rest[0].startsWith(p))) {
|
|
49
|
-
const argument = rest
|
|
49
|
+
const argument = rest[0];
|
|
50
|
+
rest.shift();
|
|
50
51
|
if (argument.startsWith(formatPrefix)) {
|
|
51
52
|
format = formatFromInput(output, argument);
|
|
52
53
|
continue;
|
|
@@ -173,7 +174,7 @@ exports.LinterQueryDefinition = {
|
|
|
173
174
|
/** cap on findings shown per certainty before collapsing to a `+N more` line; the full set is in `:query*` JSON */
|
|
174
175
|
const MaxFindingsShown = 10;
|
|
175
176
|
function addLintingRuleResult(ruleName, results, result, formatter) {
|
|
176
|
-
const rule = linter_rules_1.
|
|
177
|
+
const rule = (0, linter_rules_1.getLintingRule)(ruleName);
|
|
177
178
|
const header = `${(0, ansi_1.bold)(rule.info.name, formatter)} (${ruleName})`;
|
|
178
179
|
if (linter_format_1.LintingResults.isError(results)) {
|
|
179
180
|
result.push(` ╰ ${header}:`);
|
|
@@ -20,6 +20,7 @@ declare function originQueryLineParser(output: ReplOutput, line: readonly string
|
|
|
20
20
|
export declare const OriginQueryDefinition: {
|
|
21
21
|
readonly title: "Origin Query";
|
|
22
22
|
readonly executor: typeof executeOriginQuery;
|
|
23
|
+
readonly perQueryResults: true;
|
|
23
24
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
24
25
|
readonly fromLine: typeof originQueryLineParser;
|
|
25
26
|
readonly completer: typeof criteriaQueryCompleter;
|
|
@@ -25,6 +25,7 @@ function originQueryLineParser(output, line, _config) {
|
|
|
25
25
|
exports.OriginQueryDefinition = {
|
|
26
26
|
title: 'Origin Query',
|
|
27
27
|
executor: origin_query_executor_1.executeOriginQuery,
|
|
28
|
+
perQueryResults: true,
|
|
28
29
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
29
30
|
const out = queryResults;
|
|
30
31
|
result.push((0, query_print_1.queryHeader)('origin', formatter, out['.meta'].timing));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
1
2
|
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
|
|
2
3
|
import { executeProjectQuery } from './project-query-executor';
|
|
3
4
|
import Joi from 'joi';
|
|
@@ -29,7 +30,7 @@ export interface ProjectDependencyStats {
|
|
|
29
30
|
readonly covered: number;
|
|
30
31
|
/** The first few runtime dependencies with the version the signature database resolved them to, if any. */
|
|
31
32
|
readonly first: {
|
|
32
|
-
name:
|
|
33
|
+
name: BrandedNamespace;
|
|
33
34
|
base: boolean;
|
|
34
35
|
dbVersion?: string;
|
|
35
36
|
}[];
|
|
@@ -25,6 +25,7 @@ export declare function fdefBoundaryParser(argument: string): boolean;
|
|
|
25
25
|
export declare const ProvenanceQueryDefinition: {
|
|
26
26
|
readonly title: "Provenance Query";
|
|
27
27
|
readonly executor: typeof executeProvenanceQuery;
|
|
28
|
+
readonly perQueryResults: true;
|
|
28
29
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
29
30
|
readonly fromLine: (output: import("../../../cli/repl/commands/repl-main").ReplOutput, line: readonly string[], _config: import("../../..").FlowrConfig) => import("../../query").ParsedQueryLine<"provenance">;
|
|
30
31
|
readonly completer: typeof criteriaQueryCompleter;
|
|
@@ -21,6 +21,7 @@ function fdefBoundaryParser(argument) {
|
|
|
21
21
|
exports.ProvenanceQueryDefinition = {
|
|
22
22
|
title: 'Provenance Query',
|
|
23
23
|
executor: provenance_query_executor_1.executeProvenanceQuery,
|
|
24
|
+
perQueryResults: true,
|
|
24
25
|
asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
|
|
25
26
|
const out = queryResults;
|
|
26
27
|
const df = await analyzer.dataflow();
|
|
@@ -21,6 +21,7 @@ declare function resolveValueLineParser(output: ReplOutput, line: readonly strin
|
|
|
21
21
|
export declare const ResolveValueQueryDefinition: {
|
|
22
22
|
readonly title: "Resolve Value Query";
|
|
23
23
|
readonly executor: typeof executeResolveValueQuery;
|
|
24
|
+
readonly perQueryResults: true;
|
|
24
25
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
25
26
|
readonly fromLine: typeof resolveValueLineParser;
|
|
26
27
|
readonly completer: typeof criteriaQueryCompleter;
|
|
@@ -29,6 +29,7 @@ function resolveValueLineParser(output, line, _config) {
|
|
|
29
29
|
exports.ResolveValueQueryDefinition = {
|
|
30
30
|
title: 'Resolve Value Query',
|
|
31
31
|
executor: resolve_value_query_executor_1.executeResolveValueQuery,
|
|
32
|
+
perQueryResults: true,
|
|
32
33
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
33
34
|
const out = queryResults;
|
|
34
35
|
if (out === undefined || typeof out !== 'object' || !('.meta' in out)) {
|
|
@@ -2,24 +2,27 @@ import type { BasicQueryData } from '../../base-query-format';
|
|
|
2
2
|
import type { SignatureQuery, SignatureQueryResult, SignaturePackageView, SignatureFunctionView } from './signature-query-format';
|
|
3
3
|
import { type PackageSignatureSource } from '../../../project/sigdb/reader';
|
|
4
4
|
import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
|
|
5
|
+
import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
|
|
5
6
|
import type { CommandCompletions } from '../../../cli/repl/completion';
|
|
6
7
|
import { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl } from '../../../util/r-package-urls';
|
|
7
8
|
export { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl };
|
|
9
|
+
/** where a package's documentation and sources live */
|
|
10
|
+
type DocOrigin = {
|
|
11
|
+
readonly base: boolean;
|
|
12
|
+
readonly cran: boolean;
|
|
13
|
+
};
|
|
8
14
|
/**
|
|
9
15
|
* Best-effort documentation link: R's own manual for a base package, rdrr.io's `/cran/<pkg>/man/<fn>` for CRAN.
|
|
10
16
|
* Base R skips rdrr.io since it serves an older release, so anything R has gained since is a dead link there.
|
|
11
17
|
*/
|
|
12
|
-
export declare function helpPageUrl(pkg:
|
|
13
|
-
base: boolean;
|
|
14
|
-
cran: boolean;
|
|
15
|
-
}): string | undefined;
|
|
18
|
+
export declare function helpPageUrl(pkg: BrandedNamespace, fn: BrandedIdentifier, opts: DocOrigin): string | undefined;
|
|
16
19
|
/**
|
|
17
20
|
* The detailed view of a single function within a package: signature, properties, definition location, call
|
|
18
21
|
* graph, and for a CRAN package a deep link into the read-only mirror; `version` defaults to the source's latest.
|
|
19
22
|
*/
|
|
20
|
-
export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg:
|
|
23
|
+
export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: BrandedNamespace, fnName: BrandedIdentifier, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
|
|
21
24
|
/** the full view of a package: version, kind, export breakdown, dependencies, and every function's view */
|
|
22
|
-
export declare function signaturePackageInfo(src: PackageSignatureSource, pkg:
|
|
25
|
+
export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: BrandedNamespace, resolved?: string): SignaturePackageView | undefined;
|
|
23
26
|
/**
|
|
24
27
|
* Tab-completer for `:query \@signature` / `:signature query`: package names in the first position, a package's
|
|
25
28
|
* function names in the second (and after `pkg::`). Version specs and flags are left alone. Enumerating functions
|
|
@@ -125,28 +125,28 @@ function manPageUrl(pkg, topic, version, opts) {
|
|
|
125
125
|
return opts.cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, `man/${topic}.Rd`) : undefined;
|
|
126
126
|
}
|
|
127
127
|
/** the doc links for a function: its help topic (else its name), or none when it is proven undocumented (`no-doc`) */
|
|
128
|
-
function docUrlsFor(pkg, fn, version,
|
|
128
|
+
function docUrlsFor(pkg, fn, version, opts) {
|
|
129
129
|
if (fn.props.includes('no-doc')) {
|
|
130
130
|
return {};
|
|
131
131
|
}
|
|
132
132
|
const topic = fn.topic ?? fn.name;
|
|
133
|
-
return (0, objects_1.compactRecord)({ docUrl: helpPageUrl(pkg, topic,
|
|
133
|
+
return (0, objects_1.compactRecord)({ docUrl: helpPageUrl(pkg, topic, opts), manUrl: manPageUrl(pkg, topic, version, opts) });
|
|
134
134
|
}
|
|
135
135
|
/** the source link of a definition: the CRAN mirror at its version tag, or the R sources mirror for a base package */
|
|
136
|
-
function sourceUrlFor(pkg, fn, version,
|
|
136
|
+
function sourceUrlFor(pkg, fn, version, opts) {
|
|
137
137
|
if (!fn.file) {
|
|
138
138
|
return undefined;
|
|
139
139
|
}
|
|
140
|
-
if (base) {
|
|
140
|
+
if (opts.base) {
|
|
141
141
|
return (0, r_package_urls_1.rSourceUrl)(pkg, version, fn.file, fn.line);
|
|
142
142
|
}
|
|
143
|
-
return cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, fn.file, fn.line) : undefined;
|
|
143
|
+
return opts.cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, fn.file, fn.line) : undefined;
|
|
144
144
|
}
|
|
145
145
|
/** the trailing fields shared by every function view: definition location, source link, and documentation links */
|
|
146
|
-
function locationFields(pkg, fn, version,
|
|
146
|
+
function locationFields(pkg, fn, version, opts) {
|
|
147
147
|
return {
|
|
148
|
-
...(0, objects_1.compactRecord)({ file: fn.file, line: fn.line >= 0 ? fn.line : undefined, sourceUrl: sourceUrlFor(pkg, fn, version,
|
|
149
|
-
...docUrlsFor(pkg, fn, version,
|
|
148
|
+
...(0, objects_1.compactRecord)({ file: fn.file, line: fn.line >= 0 ? fn.line : undefined, sourceUrl: sourceUrlFor(pkg, fn, version, opts) }),
|
|
149
|
+
...docUrlsFor(pkg, fn, version, opts)
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
/** the view of one {@link BuiltInFnInfo}: every declared parameter with what it is used for, and what comes back */
|
|
@@ -233,7 +233,7 @@ function decodedToView(pkg, fn, version, opts) {
|
|
|
233
233
|
properties: fn.props,
|
|
234
234
|
parameters: fn.signature.map(p => (0, objects_1.compactRecord)({ name: p.name, props: p.props, default: p.default })),
|
|
235
235
|
callees: fn.callees,
|
|
236
|
-
...locationFields(pkg, fn, version, opts
|
|
236
|
+
...locationFields(pkg, fn, version, opts)
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
@@ -366,8 +366,7 @@ function signatureCallGraphUrl(src, pkg, version, root, maxNodes) {
|
|
|
366
366
|
const edges = [];
|
|
367
367
|
const seen = new Set();
|
|
368
368
|
const queue = [{ owner: pkg, ver: version, name: root, id: rootId }];
|
|
369
|
-
|
|
370
|
-
const cur = queue.pop();
|
|
369
|
+
for (let cur = queue.pop(); cur !== undefined && nodes.size < maxNodes; cur = queue.pop()) {
|
|
371
370
|
const key = `${cur.owner}::${cur.name}`;
|
|
372
371
|
if (seen.has(key)) {
|
|
373
372
|
continue;
|
|
@@ -456,7 +455,7 @@ function suggest(candidates, query, limit = 6) {
|
|
|
456
455
|
const out = [];
|
|
457
456
|
for (const c of candidates) {
|
|
458
457
|
if (c.toLowerCase().includes(needle)) {
|
|
459
|
-
out.push(c);
|
|
458
|
+
out.push(String(c));
|
|
460
459
|
if (out.length >= limit) {
|
|
461
460
|
break;
|
|
462
461
|
}
|
|
@@ -495,13 +494,13 @@ function matchedParamPreview(fn, q) {
|
|
|
495
494
|
return { preview, matched };
|
|
496
495
|
}
|
|
497
496
|
/** a compact view for a wildcard search hit (signature/call-graph omitted; the JSON dump carries those per name) */
|
|
498
|
-
function compactMatch(pkg, fn, version,
|
|
497
|
+
function compactMatch(pkg, fn, version, opts, params) {
|
|
499
498
|
return {
|
|
500
499
|
package: pkg,
|
|
501
500
|
name: fn.name,
|
|
502
501
|
exported: fn.exported,
|
|
503
502
|
...(version !== undefined ? { version } : {}),
|
|
504
|
-
...locationFields(pkg, fn, version,
|
|
503
|
+
...locationFields(pkg, fn, version, opts),
|
|
505
504
|
...(params && params.preview.length > 0 ? { parameters: params.preview } : {}),
|
|
506
505
|
...(params && params.matched.length > 0 ? { matchedParameters: params.matched } : {})
|
|
507
506
|
};
|
|
@@ -755,7 +754,7 @@ function searchSources(sources, allNames, q, literalFunction = false) {
|
|
|
755
754
|
exports = s.lookup(pkg, v) ?? s.lookup(pkg);
|
|
756
755
|
looked = true;
|
|
757
756
|
}
|
|
758
|
-
matches.push(compactMatch(pkg, fn, exports?.version, base, (exports?.cran ?? false) && !base, matchedParamPreview(fn, q)));
|
|
757
|
+
matches.push(compactMatch(pkg, fn, exports?.version, { base, cran: (exports?.cran ?? false) && !base }, matchedParamPreview(fn, q)));
|
|
759
758
|
}
|
|
760
759
|
if (truncated) {
|
|
761
760
|
break;
|