@scriptc/compiler 0.4.1 → 0.4.3
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/ambient/scriptc-node-fallback.d.ts +977 -113
- package/dist/backend/cycle-analysis.d.ts +5 -1
- package/dist/backend/cycle-analysis.js +6 -4
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-analysis.test.js +55 -0
- package/dist/backend/cycle-analysis.test.js.map +1 -1
- package/dist/backend/cycle-mutability.d.ts +9 -1
- package/dist/backend/cycle-mutability.js +21 -3
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.js +6 -1
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/immutability.d.ts +7 -3
- package/dist/backend/immutability.js +33 -29
- package/dist/backend/immutability.js.map +1 -1
- package/dist/backend/library-pack.js +5 -0
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +23 -4
- package/dist/backend/llvm/alloc.js +61 -8
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/appended-array-literals.d.ts +2 -1
- package/dist/backend/llvm/appended-array-literals.js +44 -36
- package/dist/backend/llvm/appended-array-literals.js.map +1 -1
- package/dist/backend/llvm/appended-array-literals.test.js +4 -3
- package/dist/backend/llvm/appended-array-literals.test.js.map +1 -1
- package/dist/backend/llvm/array-search.d.ts +4 -3
- package/dist/backend/llvm/array-search.js +23 -10
- package/dist/backend/llvm/array-search.js.map +1 -1
- package/dist/backend/llvm/blocks.d.ts +1 -1
- package/dist/backend/llvm/blocks.js +2 -2
- package/dist/backend/llvm/blocks.js.map +1 -1
- package/dist/backend/llvm/byte-windows.js +2 -0
- package/dist/backend/llvm/byte-windows.js.map +1 -1
- package/dist/backend/llvm/bytes-alias.d.ts +6 -1
- package/dist/backend/llvm/bytes-alias.js +8 -2
- package/dist/backend/llvm/bytes-alias.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.d.ts +70 -7
- package/dist/backend/llvm/bytes-loop-versions.js +567 -30
- package/dist/backend/llvm/bytes-loop-versions.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.test.js +389 -2
- package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -1
- package/dist/backend/llvm/checked-value-lifetimes.js +2 -0
- package/dist/backend/llvm/checked-value-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +74 -1
- package/dist/backend/llvm/classes.js +364 -54
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +384 -17
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +10 -6
- package/dist/backend/llvm/common.js +10 -6
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.d.ts +2 -1
- package/dist/backend/llvm/constant-callbacks.js +91 -56
- package/dist/backend/llvm/constant-callbacks.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.test.js +4 -4
- package/dist/backend/llvm/constant-callbacks.test.js.map +1 -1
- package/dist/backend/llvm/counted-loops.d.ts +11 -1
- package/dist/backend/llvm/counted-loops.js +80 -23
- package/dist/backend/llvm/counted-loops.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +39 -8
- package/dist/backend/llvm/dense-array-access.js +222 -52
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +36 -0
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dense-array-loops.d.ts +35 -16
- package/dist/backend/llvm/dense-array-loops.js +237 -12
- package/dist/backend/llvm/dense-array-loops.js.map +1 -1
- package/dist/backend/llvm/dense-array-loops.test.js +140 -15
- package/dist/backend/llvm/dense-array-loops.test.js.map +1 -1
- package/dist/backend/llvm/dyn-handle-tags.test.js +6 -1
- package/dist/backend/llvm/dyn-handle-tags.test.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +51 -1
- package/dist/backend/llvm/dyn.js +683 -69
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +33 -26
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-journal.d.ts +93 -0
- package/dist/backend/llvm/emit-journal.js +170 -0
- package/dist/backend/llvm/emit-journal.js.map +1 -0
- package/dist/backend/llvm/emit-module.js +208 -34
- package/dist/backend/llvm/emit-module.js.map +1 -1
- package/dist/backend/llvm/emit-statements.d.ts +0 -27
- package/dist/backend/llvm/emit-statements.js +577 -93
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter-state.d.ts +7 -0
- package/dist/backend/llvm/emitter-state.js +14 -0
- package/dist/backend/llvm/emitter-state.js.map +1 -0
- package/dist/backend/llvm/emitter.d.ts +314 -49
- package/dist/backend/llvm/emitter.js +1241 -129
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +54 -5
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +19 -0
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +5 -2
- package/dist/backend/llvm/expr-bytes.js +144 -52
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.js +47 -0
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +1 -1
- package/dist/backend/llvm/expr-calls.js +62 -36
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.d.ts +14 -2
- package/dist/backend/llvm/expr-containers.js +148 -40
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-context.d.ts +14 -0
- package/dist/backend/llvm/expr-control.js +2 -3
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +71 -16
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +126 -36
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +11 -6
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
- package/dist/backend/llvm/expr-records.d.ts +12 -0
- package/dist/backend/llvm/expr-records.js +106 -0
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.d.ts +2 -2
- package/dist/backend/llvm/expr-stream-bridges.js +225 -64
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +2 -2
- package/dist/backend/llvm/expr-stream-callbacks.js +200 -50
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/int32-kind-loops.d.ts +39 -0
- package/dist/backend/llvm/int32-kind-loops.js +106 -0
- package/dist/backend/llvm/int32-kind-loops.js.map +1 -0
- package/dist/backend/llvm/integer-or-nan-indexes.test.d.ts +1 -0
- package/dist/backend/llvm/integer-or-nan-indexes.test.js +118 -0
- package/dist/backend/llvm/integer-or-nan-indexes.test.js.map +1 -0
- package/dist/backend/llvm/integer-values.d.ts +20 -1
- package/dist/backend/llvm/integer-values.js +71 -0
- package/dist/backend/llvm/integer-values.js.map +1 -1
- package/dist/backend/llvm/js-ic.d.ts +1 -1
- package/dist/backend/llvm/js-ic.js +1 -1
- package/dist/backend/llvm/js-ic.js.map +1 -1
- package/dist/backend/llvm/key-orders.d.ts +7 -0
- package/dist/backend/llvm/key-orders.js +33 -0
- package/dist/backend/llvm/key-orders.js.map +1 -0
- package/dist/backend/llvm/lib-connect.js +4 -0
- package/dist/backend/llvm/lib-connect.js.map +1 -1
- package/dist/backend/llvm/lib-datagram.js +11 -0
- package/dist/backend/llvm/lib-datagram.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +90 -2
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +65 -4
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-http2.d.ts +4 -0
- package/dist/backend/llvm/lib-http2.js +24 -17
- package/dist/backend/llvm/lib-http2.js.map +1 -1
- package/dist/backend/llvm/lib-lookup.js +16 -6
- package/dist/backend/llvm/lib-lookup.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +65 -14
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +126 -3
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +97 -30
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/lib-tls.js +23 -0
- package/dist/backend/llvm/lib-tls.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +181 -64
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +28 -0
- package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
- package/dist/backend/llvm/loop-state.d.ts +33 -0
- package/dist/backend/llvm/loop-state.js +42 -0
- package/dist/backend/llvm/loop-state.js.map +1 -0
- package/dist/backend/llvm/map-number-lookup.d.ts +26 -8
- package/dist/backend/llvm/map-number-lookup.js +91 -31
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.js +55 -0
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.js +4 -2
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.d.ts +2 -1
- package/dist/backend/llvm/nullable-unions.js +15 -3
- package/dist/backend/llvm/nullable-unions.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +18 -1
- package/dist/backend/llvm/publish.js +76 -25
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/publish.test.js +3 -0
- package/dist/backend/llvm/publish.test.js.map +1 -1
- package/dist/backend/llvm/receivers.js +7 -2
- package/dist/backend/llvm/receivers.js.map +1 -1
- package/dist/backend/llvm/record-results.d.ts +1 -9
- package/dist/backend/llvm/record-results.js +2 -11
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/reference-writes.d.ts +7 -2
- package/dist/backend/llvm/reference-writes.js +91 -72
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regex-matchers.js +161 -14
- package/dist/backend/llvm/regex-matchers.js.map +1 -1
- package/dist/backend/llvm/regex-matchers.test.js +18 -0
- package/dist/backend/llvm/regex-matchers.test.js.map +1 -1
- package/dist/backend/llvm/running-extrema.d.ts +11 -0
- package/dist/backend/llvm/running-extrema.js +115 -0
- package/dist/backend/llvm/running-extrema.js.map +1 -0
- package/dist/backend/llvm/running-extrema.test.d.ts +1 -0
- package/dist/backend/llvm/running-extrema.test.js +89 -0
- package/dist/backend/llvm/running-extrema.test.js.map +1 -0
- package/dist/backend/llvm/shapes.d.ts +79 -21
- package/dist/backend/llvm/shapes.js +233 -42
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +53 -7
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/speculative-integers.d.ts +6 -0
- package/dist/backend/llvm/speculative-integers.js +2 -2
- package/dist/backend/llvm/speculative-integers.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +3 -2
- package/dist/backend/llvm/stack-objects.js +5 -2
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +2 -1
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/string-reads.d.ts +15 -0
- package/dist/backend/llvm/string-reads.js +128 -0
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/walk-borrows.d.ts +3 -0
- package/dist/backend/llvm/walk-borrows.js +46 -41
- package/dist/backend/llvm/walk-borrows.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +3 -0
- package/dist/backend/llvm/walkers.js +88 -65
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/llvm/wasm-modules.d.ts +6 -5
- package/dist/backend/llvm/wasm-modules.js +32 -9
- package/dist/backend/llvm/wasm-modules.js.map +1 -1
- package/dist/backend/llvm/wrapping-sums.d.ts +16 -1
- package/dist/backend/llvm/wrapping-sums.js +126 -0
- package/dist/backend/llvm/wrapping-sums.js.map +1 -1
- package/dist/backend/mangle.d.ts +3 -0
- package/dist/backend/mangle.js +5 -0
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/may-throw.d.ts +8 -10
- package/dist/backend/may-throw.js +14 -10
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +27 -4
- package/dist/backend/native/executable.js +31 -8
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/library.js +1 -0
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +1 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +11 -6
- package/dist/backend/native-codegen.js +36 -9
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +0 -23
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +18 -4
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/optimization.d.ts +2 -2
- package/dist/backend/publication.d.ts +12 -1
- package/dist/backend/publication.js +37 -14
- package/dist/backend/publication.js.map +1 -1
- package/dist/backend/publication.test.js +30 -0
- package/dist/backend/publication.test.js.map +1 -1
- package/dist/backend/result-slots.d.ts +16 -0
- package/dist/backend/result-slots.js +23 -0
- package/dist/backend/result-slots.js.map +1 -0
- package/dist/backend/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-core.d.ts +2 -1
- package/dist/backend/runtime-pack-core.js +2 -1
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +5 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.d.ts +0 -21
- package/dist/backend/runtime-pack.js +0 -29
- package/dist/backend/runtime-pack.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +10 -69
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/stack-observations.d.ts +2 -1
- package/dist/backend/stack-observations.js +67 -42
- package/dist/backend/stack-observations.js.map +1 -1
- package/dist/backend/target-diagnostics.js +33 -1
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/warm-cache.js +4 -0
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/cli/command.js +26 -6
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/usage.d.ts +5 -1
- package/dist/cli/usage.js +10 -5
- package/dist/cli/usage.js.map +1 -1
- package/dist/compat/fetch-profile.js +1 -1
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/contracts/check.js +5 -4
- package/dist/contracts/check.js.map +1 -1
- package/dist/contracts/int32-elements.js +10 -2
- package/dist/contracts/int32-elements.js.map +1 -1
- package/dist/coverage/report.d.ts +7 -2
- package/dist/coverage/report.js +30 -3
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/verdict-cache.d.ts +1 -0
- package/dist/coverage/verdict-cache.js +4 -0
- package/dist/coverage/verdict-cache.js.map +1 -1
- package/dist/coverage/verdict-semantic.js +4 -0
- package/dist/coverage/verdict-semantic.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +4 -0
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/dynamic-tier.d.ts +40 -0
- package/dist/diagnostics/dynamic-tier.js +57 -0
- package/dist/diagnostics/dynamic-tier.js.map +1 -0
- package/dist/diagnostics/envelope.d.ts +5 -1
- package/dist/diagnostics/envelope.js +6 -2
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +25 -1
- package/dist/executable/executable-cache.js +60 -7
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +46 -3
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +3 -1
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +1 -0
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/decl-projection.d.ts +41 -0
- package/dist/frontend/decl-projection.js +854 -0
- package/dist/frontend/decl-projection.js.map +1 -0
- package/dist/frontend/decl-projection.test.d.ts +1 -0
- package/dist/frontend/decl-projection.test.js +30 -0
- package/dist/frontend/decl-projection.test.js.map +1 -0
- package/dist/frontend/dispose-hook.d.ts +2 -0
- package/dist/frontend/dispose-hook.js +14 -0
- package/dist/frontend/dispose-hook.js.map +1 -0
- package/dist/frontend/dts-paths.d.ts +15 -0
- package/dist/frontend/dts-paths.js +25 -0
- package/dist/frontend/dts-paths.js.map +1 -1
- package/dist/frontend/input-tracker.d.ts +6 -0
- package/dist/frontend/input-tracker.js +51 -28
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/input-tracker.test.js +19 -0
- package/dist/frontend/input-tracker.test.js.map +1 -1
- package/dist/frontend/jsx-entities.d.ts +4 -0
- package/dist/frontend/jsx-entities.js +259 -0
- package/dist/frontend/jsx-entities.js.map +1 -0
- package/dist/frontend/jsx-source.d.ts +71 -0
- package/dist/frontend/jsx-source.js +781 -0
- package/dist/frontend/jsx-source.js.map +1 -0
- package/dist/frontend/jsx-source.test.d.ts +1 -0
- package/dist/frontend/jsx-source.test.js +200 -0
- package/dist/frontend/jsx-source.test.js.map +1 -0
- package/dist/frontend/literal-values.test.js +8 -9
- package/dist/frontend/literal-values.test.js.map +1 -1
- package/dist/frontend/lowering/array-indexed-mutation.js +2 -1
- package/dist/frontend/lowering/array-indexed-mutation.js.map +1 -1
- package/dist/frontend/lowering/array-values.js +103 -4
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/binding-analysis.d.ts +1 -1
- package/dist/frontend/lowering/binding-analysis.js +2 -2
- package/dist/frontend/lowering/binding-analysis.js.map +1 -1
- package/dist/frontend/lowering/builtins/arguments.d.ts +3 -0
- package/dist/frontend/lowering/builtins/arguments.js +30 -15
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/atomics.js +10 -6
- package/dist/frontend/lowering/builtins/atomics.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-async.js +2 -1
- package/dist/frontend/lowering/builtins/child-process-async.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.js +46 -15
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js +2 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process.js +13 -2
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +4 -2
- package/dist/frontend/lowering/builtins/crypto.js +136 -5
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/date-classes.d.ts +46 -0
- package/dist/frontend/lowering/builtins/date-classes.js +477 -0
- package/dist/frontend/lowering/builtins/date-classes.js.map +1 -0
- package/dist/frontend/lowering/builtins/dates.d.ts +11 -1
- package/dist/frontend/lowering/builtins/dates.js +55 -26
- package/dist/frontend/lowering/builtins/dates.js.map +1 -1
- package/dist/frontend/lowering/builtins/dh.d.ts +15 -0
- package/dist/frontend/lowering/builtins/dh.js +151 -0
- package/dist/frontend/lowering/builtins/dh.js.map +1 -0
- package/dist/frontend/lowering/builtins/disposable-stack.js +2 -1
- package/dist/frontend/lowering/builtins/disposable-stack.js.map +1 -1
- package/dist/frontend/lowering/builtins/ecdh.d.ts +12 -1
- package/dist/frontend/lowering/builtins/ecdh.js +7 -7
- package/dist/frontend/lowering/builtins/ecdh.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.d.ts +15 -0
- package/dist/frontend/lowering/builtins/errors.js +110 -0
- package/dist/frontend/lowering/builtins/errors.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.js +23 -17
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem.js +6 -4
- package/dist/frontend/lowering/builtins/filesystem.js.map +1 -1
- package/dist/frontend/lowering/builtins/fs-paths.d.ts +15 -0
- package/dist/frontend/lowering/builtins/fs-paths.js +209 -0
- package/dist/frontend/lowering/builtins/fs-paths.js.map +1 -0
- package/dist/frontend/lowering/builtins/global-namespace-keys.d.ts +3 -0
- package/dist/frontend/lowering/builtins/global-namespace-keys.js +122 -0
- package/dist/frontend/lowering/builtins/global-namespace-keys.js.map +1 -0
- package/dist/frontend/lowering/builtins/hash-stream.d.ts +16 -4
- package/dist/frontend/lowering/builtins/hash-stream.js +86 -23
- package/dist/frontend/lowering/builtins/hash-stream.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +2 -1
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/key-object.d.ts +2 -1
- package/dist/frontend/lowering/builtins/key-object.js +20 -7
- package/dist/frontend/lowering/builtins/key-object.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-calls.js +11 -4
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.js +18 -6
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.js +4 -3
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/performance.js +3 -2
- package/dist/frontend/lowering/builtins/performance.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.js +3 -2
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.d.ts +6 -0
- package/dist/frontend/lowering/builtins/promises.js +91 -4
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/promisify-callback.js +2 -1
- package/dist/frontend/lowering/builtins/promisify-callback.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +7 -2
- package/dist/frontend/lowering/builtins/readline.js +58 -9
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/strings.js +13 -5
- package/dist/frontend/lowering/builtins/strings.js.map +1 -1
- package/dist/frontend/lowering/builtins/text-codecs.js +2 -1
- package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -1
- package/dist/frontend/lowering/builtins/timers.js +1 -1
- package/dist/frontend/lowering/builtins/timers.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.js +28 -4
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/builtins/v8.js +2 -1
- package/dist/frontend/lowering/builtins/v8.js.map +1 -1
- package/dist/frontend/lowering/builtins/webassembly.js +6 -3
- package/dist/frontend/lowering/builtins/webassembly.js.map +1 -1
- package/dist/frontend/lowering/builtins/webcrypto.js +39 -20
- package/dist/frontend/lowering/builtins/webcrypto.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.js +2 -1
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.js +13 -6
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/caught-value-dispatch.d.ts +18 -1
- package/dist/frontend/lowering/caught-value-dispatch.js +201 -32
- package/dist/frontend/lowering/caught-value-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-assertions.js +3 -2
- package/dist/frontend/lowering/class-assertions.js.map +1 -1
- package/dist/frontend/lowering/class-callbacks.d.ts +5 -2
- package/dist/frontend/lowering/class-callbacks.js +82 -12
- package/dist/frontend/lowering/class-callbacks.js.map +1 -1
- package/dist/frontend/lowering/class-construction.d.ts +6 -2
- package/dist/frontend/lowering/class-construction.js +25 -16
- package/dist/frontend/lowering/class-construction.js.map +1 -1
- package/dist/frontend/lowering/class-descriptors.js +1 -1
- package/dist/frontend/lowering/class-descriptors.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +73 -2
- package/dist/frontend/lowering/class-dynamic-dispatch.js +1334 -259
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +124 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-iterables.d.ts +2 -1
- package/dist/frontend/lowering/class-iterables.js +9 -1
- package/dist/frontend/lowering/class-iterables.js.map +1 -1
- package/dist/frontend/lowering/class-method-mutations.js +35 -9
- package/dist/frontend/lowering/class-method-mutations.js.map +1 -1
- package/dist/frontend/lowering/class-method-values.js +1 -1
- package/dist/frontend/lowering/class-method-values.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.d.ts +7 -0
- package/dist/frontend/lowering/class-protocols.js +64 -4
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.d.ts +5 -0
- package/dist/frontend/lowering/class-prototypes.js +67 -5
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.d.ts +9 -3
- package/dist/frontend/lowering/class-runtime-statics.js +29 -4
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
- package/dist/frontend/lowering/class-to-primitive.js +25 -5
- package/dist/frontend/lowering/class-to-primitive.js.map +1 -1
- package/dist/frontend/lowering/class-unions.js +2 -1
- package/dist/frontend/lowering/class-unions.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +6 -5
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +48 -1
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +99 -8
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.js +8 -7
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/collection-ingestion.js +2 -1
- package/dist/frontend/lowering/collection-ingestion.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callback-call.js +2 -2
- package/dist/frontend/lowering/containers/array-callback-call.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.d.ts +7 -0
- package/dist/frontend/lowering/containers/array-callbacks.js +352 -31
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-concat.js +12 -1
- package/dist/frontend/lowering/containers/array-concat.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +25 -4
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +21 -5
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.js +21 -9
- package/dist/frontend/lowering/containers/array-pipelines.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.d.ts +1 -1
- package/dist/frontend/lowering/containers/bytes.js +131 -29
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.js +55 -2
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-grouping.js +3 -2
- package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +15 -9
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/filter-predicates.d.ts +6 -0
- package/dist/frontend/lowering/containers/filter-predicates.js +205 -0
- package/dist/frontend/lowering/containers/filter-predicates.js.map +1 -0
- package/dist/frontend/lowering/containers/indexed-objects.d.ts +0 -12
- package/dist/frontend/lowering/containers/indexed-objects.js +54 -14
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/containers/iterator-helpers.d.ts +32 -1
- package/dist/frontend/lowering/containers/iterator-helpers.js +6 -5
- package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.js +87 -14
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/containers/string-replacement.js +45 -20
- package/dist/frontend/lowering/containers/string-replacement.js.map +1 -1
- package/dist/frontend/lowering/cycle-initialization.js +25 -4
- package/dist/frontend/lowering/cycle-initialization.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.d.ts +18 -1
- package/dist/frontend/lowering/deferred-module-initializers.js +226 -115
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.test.js +28 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -1
- package/dist/frontend/lowering/dispatch-sites.d.ts +59 -0
- package/dist/frontend/lowering/dispatch-sites.js +218 -0
- package/dist/frontend/lowering/dispatch-sites.js.map +1 -0
- package/dist/frontend/lowering/dispatch-sites.test.d.ts +1 -0
- package/dist/frontend/lowering/dispatch-sites.test.js +59 -0
- package/dist/frontend/lowering/dispatch-sites.test.js.map +1 -0
- package/dist/frontend/lowering/divergences.js +9 -1
- package/dist/frontend/lowering/divergences.js.map +1 -1
- package/dist/frontend/lowering/dyn-streams.d.ts +3 -0
- package/dist/frontend/lowering/dyn-streams.js +1 -1
- package/dist/frontend/lowering/dyn-streams.js.map +1 -1
- package/dist/frontend/lowering/dynamic-tier.d.ts +25 -0
- package/dist/frontend/lowering/dynamic-tier.js +327 -0
- package/dist/frontend/lowering/dynamic-tier.js.map +1 -0
- package/dist/frontend/lowering/error-methods.js +51 -2
- package/dist/frontend/lowering/error-methods.js.map +1 -1
- package/dist/frontend/lowering/expressions/array-literals.js +62 -0
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +81 -5
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +107 -14
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/identifiers.js +79 -11
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.js +130 -6
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +3 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.d.ts +10 -3
- package/dist/frontend/lowering/expressions/object-literals.js +164 -56
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +17 -5
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +0 -4
- package/dist/frontend/lowering/expressions/property-access.js +211 -17
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.js +267 -30
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/union-fields.js +4 -0
- package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.js +85 -12
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/frozen-records.d.ts +28 -0
- package/dist/frontend/lowering/frozen-records.js +322 -0
- package/dist/frontend/lowering/frozen-records.js.map +1 -0
- package/dist/frontend/lowering/function-returns.js +49 -0
- package/dist/frontend/lowering/function-returns.js.map +1 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +6 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.js +20 -30
- package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +42 -1
- package/dist/frontend/lowering/generic-functions.js +455 -20
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/intern-tables.js +2 -1
- package/dist/frontend/lowering/intern-tables.js.map +1 -1
- package/dist/frontend/lowering/iterable-values.d.ts +49 -0
- package/dist/frontend/lowering/iterable-values.js +297 -0
- package/dist/frontend/lowering/iterable-values.js.map +1 -0
- package/dist/frontend/lowering/iterator-adapters.js +195 -9
- package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
- package/dist/frontend/lowering/js-class-fields.d.ts +8 -0
- package/dist/frontend/lowering/js-class-fields.js +45 -10
- package/dist/frontend/lowering/js-class-fields.js.map +1 -1
- package/dist/frontend/lowering/js-dynamic-objects.js +3 -2
- package/dist/frontend/lowering/js-dynamic-objects.js.map +1 -1
- package/dist/frontend/lowering/json-require.js +2 -1
- package/dist/frontend/lowering/json-require.js.map +1 -1
- package/dist/frontend/lowering/key-order-witness.d.ts +24 -4
- package/dist/frontend/lowering/key-order-witness.js +790 -25
- package/dist/frontend/lowering/key-order-witness.js.map +1 -1
- package/dist/frontend/lowering/key-order-witness.test.js +466 -10
- package/dist/frontend/lowering/key-order-witness.test.js.map +1 -1
- package/dist/frontend/lowering/lifetime-regions.js +2 -1
- package/dist/frontend/lowering/lifetime-regions.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +6 -5
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.js +7 -2
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +11 -0
- package/dist/frontend/lowering/lower-calls.js +776 -126
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +29 -2
- package/dist/frontend/lowering/lower-classes.js +581 -46
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +6 -3
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +14 -0
- package/dist/frontend/lowering/lower-event-emitter.js +267 -20
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +19 -2
- package/dist/frontend/lowering/lower-exprs.js +126 -13
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.d.ts +11 -0
- package/dist/frontend/lowering/lower-functions.js +387 -72
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.js +41 -31
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-global-value.js +6 -3
- package/dist/frontend/lowering/lower-global-value.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +28 -12
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +2 -1
- package/dist/frontend/lowering/lower-mixins.js.map +1 -1
- package/dist/frontend/lowering/lower-mock.js +2 -1
- package/dist/frontend/lowering/lower-mock.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +47 -5
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.test.js +2 -2
- package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +2 -1
- package/dist/frontend/lowering/lower-namespaces.js +9 -4
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +10 -0
- package/dist/frontend/lowering/lower-server.js +239 -61
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +5 -0
- package/dist/frontend/lowering/lower-stdlib.js +42 -10
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +23 -0
- package/dist/frontend/lowering/lower-stmts.js +622 -68
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +20 -2
- package/dist/frontend/lowering/lower-stream.js +2055 -318
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +4 -3
- package/dist/frontend/lowering/lower-timers.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +197 -29
- package/dist/frontend/lowering/lowerer.js +862 -84
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +21 -9
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/module-namespace-elements.d.ts +11 -1
- package/dist/frontend/lowering/module-namespace-elements.js +82 -5
- package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
- package/dist/frontend/lowering/narrowing-stability.js +5 -0
- package/dist/frontend/lowering/narrowing-stability.js.map +1 -1
- package/dist/frontend/lowering/native-ffi.js +1 -1
- package/dist/frontend/lowering/native-ffi.js.map +1 -1
- package/dist/frontend/lowering/new-target.d.ts +12 -0
- package/dist/frontend/lowering/new-target.js +280 -0
- package/dist/frontend/lowering/new-target.js.map +1 -0
- package/dist/frontend/lowering/object-enumeration-receiver.js +2 -1
- package/dist/frontend/lowering/object-enumeration-receiver.js.map +1 -1
- package/dist/frontend/lowering/pairs-snapshot.js +2 -1
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
- package/dist/frontend/lowering/private-brands.d.ts +9 -0
- package/dist/frontend/lowering/private-brands.js +66 -15
- package/dist/frontend/lowering/private-brands.js.map +1 -1
- package/dist/frontend/lowering/promise-executor-adapter.js +2 -1
- package/dist/frontend/lowering/promise-executor-adapter.js.map +1 -1
- package/dist/frontend/lowering/require-initialization.js +2 -1
- package/dist/frontend/lowering/require-initialization.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-elements.d.ts +5 -0
- package/dist/frontend/lowering/runtime-optional-elements.js +17 -1
- package/dist/frontend/lowering/runtime-optional-elements.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-records.d.ts +2 -0
- package/dist/frontend/lowering/runtime-optional-records.js +18 -5
- package/dist/frontend/lowering/runtime-optional-records.js.map +1 -1
- package/dist/frontend/lowering/site-dependencies.d.ts +35 -0
- package/dist/frontend/lowering/site-dependencies.js +84 -0
- package/dist/frontend/lowering/site-dependencies.js.map +1 -0
- package/dist/frontend/lowering/site-dependencies.test.d.ts +1 -0
- package/dist/frontend/lowering/site-dependencies.test.js +53 -0
- package/dist/frontend/lowering/site-dependencies.test.js.map +1 -0
- package/dist/frontend/lowering/stable-names.d.ts +11 -0
- package/dist/frontend/lowering/stable-names.js +35 -0
- package/dist/frontend/lowering/stable-names.js.map +1 -0
- package/dist/frontend/lowering/static-typeof.d.ts +2 -2
- package/dist/frontend/lowering/static-typeof.js +42 -3
- package/dist/frontend/lowering/static-typeof.js.map +1 -1
- package/dist/frontend/lowering/strict-equality.js +2 -1
- package/dist/frontend/lowering/strict-equality.js.map +1 -1
- package/dist/frontend/lowering/structural-positions.d.ts +32 -0
- package/dist/frontend/lowering/structural-positions.js +108 -0
- package/dist/frontend/lowering/structural-positions.js.map +1 -0
- package/dist/frontend/lowering/surfaces.d.ts +3 -0
- package/dist/frontend/lowering/surfaces.js +60 -32
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/undefined-index.d.ts +27 -0
- package/dist/frontend/lowering/undefined-index.js +82 -0
- package/dist/frontend/lowering/undefined-index.js.map +1 -0
- package/dist/frontend/lowering/var-hoisting.js +66 -16
- package/dist/frontend/lowering/var-hoisting.js.map +1 -1
- package/dist/frontend/lowering/width-lift.d.ts +18 -0
- package/dist/frontend/npm-static-bundled-chunks.js +9 -11
- package/dist/frontend/npm-static-bundled-chunks.js.map +1 -1
- package/dist/frontend/npm-static-bundled-chunks.test.js +6 -5
- package/dist/frontend/npm-static-bundled-chunks.test.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +9 -1
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/npm-static-tsc-helpers.d.ts +5 -0
- package/dist/frontend/npm-static-tsc-helpers.js +106 -0
- package/dist/frontend/npm-static-tsc-helpers.js.map +1 -0
- package/dist/frontend/npm-static-tsc-helpers.test.d.ts +1 -0
- package/dist/frontend/npm-static-tsc-helpers.test.js +58 -0
- package/dist/frontend/npm-static-tsc-helpers.test.js.map +1 -0
- package/dist/frontend/npm-static-type-exports-host.d.ts +8 -0
- package/dist/frontend/npm-static-type-exports-host.js +214 -0
- package/dist/frontend/npm-static-type-exports-host.js.map +1 -0
- package/dist/frontend/npm-static-type-exports-host.test.d.ts +1 -0
- package/dist/frontend/npm-static-type-exports-host.test.js +53 -0
- package/dist/frontend/npm-static-type-exports-host.test.js.map +1 -0
- package/dist/frontend/npm-static-type-exports.d.ts +52 -0
- package/dist/frontend/npm-static-type-exports.js +261 -0
- package/dist/frontend/npm-static-type-exports.js.map +1 -0
- package/dist/frontend/npm-static-type-exports.test.d.ts +1 -0
- package/dist/frontend/npm-static-type-exports.test.js +103 -0
- package/dist/frontend/npm-static-type-exports.test.js.map +1 -0
- package/dist/frontend/npm-static-umd.d.ts +6 -0
- package/dist/frontend/npm-static-umd.js +203 -0
- package/dist/frontend/npm-static-umd.js.map +1 -0
- package/dist/frontend/npm-static-umd.test.d.ts +1 -0
- package/dist/frontend/npm-static-umd.test.js +105 -0
- package/dist/frontend/npm-static-umd.test.js.map +1 -0
- package/dist/frontend/npm-static.d.ts +8 -0
- package/dist/frontend/npm-static.js +51 -22
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/package-shims.d.ts +3 -0
- package/dist/frontend/package-shims.js +71 -8
- package/dist/frontend/package-shims.js.map +1 -1
- package/dist/frontend/pipeline.js +18 -10
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/process-fork.d.ts +25 -0
- package/dist/frontend/process-fork.js +2 -0
- package/dist/frontend/process-fork.js.map +1 -0
- package/dist/frontend/program.d.ts +21 -1
- package/dist/frontend/program.js +586 -74
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +44 -4
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/services.d.ts +6 -0
- package/dist/frontend/services.js +18 -0
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/token-equivalence.d.ts +3 -0
- package/dist/frontend/token-equivalence.js +409 -0
- package/dist/frontend/token-equivalence.js.map +1 -0
- package/dist/frontend/token-equivalence.test.d.ts +1 -0
- package/dist/frontend/token-equivalence.test.js +67 -0
- package/dist/frontend/token-equivalence.test.js.map +1 -0
- package/dist/frontend/ts7/ast-node.d.ts +43 -7
- package/dist/frontend/ts7/ast-node.js +1176 -129
- package/dist/frontend/ts7/ast-node.js.map +1 -1
- package/dist/frontend/ts7/ast-node.test.js +84 -0
- package/dist/frontend/ts7/ast-node.test.js.map +1 -1
- package/dist/frontend/ts7/ast-wire.d.ts +29 -3
- package/dist/frontend/ts7/ast-wire.js +144 -31
- package/dist/frontend/ts7/ast-wire.js.map +1 -1
- package/dist/frontend/ts7/ast-wire.test.js +23 -0
- package/dist/frontend/ts7/ast-wire.test.js.map +1 -1
- package/dist/frontend/ts7/ast.d.ts +23 -2
- package/dist/frontend/ts7/ast.js +143 -2
- package/dist/frontend/ts7/ast.js.map +1 -1
- package/dist/frontend/ts7/checker-backend.d.ts +3 -4
- package/dist/frontend/ts7/checker-backend.js +2 -2
- package/dist/frontend/ts7/checker-backend.js.map +1 -1
- package/dist/frontend/ts7/checker-backend.test.js +5 -9
- package/dist/frontend/ts7/checker-backend.test.js.map +1 -1
- package/dist/frontend/ts7/checker.d.ts +17 -1
- package/dist/frontend/ts7/checker.js +82 -1
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/checker.test.js +9 -6
- package/dist/frontend/ts7/checker.test.js.map +1 -1
- package/dist/frontend/ts7/enums.d.ts +3 -3
- package/dist/frontend/ts7/enums.generated.d.ts +10 -0
- package/dist/frontend/ts7/enums.generated.js +21 -0
- package/dist/frontend/ts7/enums.generated.js.map +1 -1
- package/dist/frontend/ts7/enums.js +19 -0
- package/dist/frontend/ts7/enums.js.map +1 -1
- package/dist/frontend/ts7/lib-diagnostics.d.ts +24 -0
- package/dist/frontend/ts7/lib-diagnostics.js +307 -0
- package/dist/frontend/ts7/lib-diagnostics.js.map +1 -0
- package/dist/frontend/ts7/lib-diagnostics.test.d.ts +1 -0
- package/dist/frontend/ts7/lib-diagnostics.test.js +199 -0
- package/dist/frontend/ts7/lib-diagnostics.test.js.map +1 -0
- package/dist/frontend/ts7/program-host.d.ts +7 -0
- package/dist/frontend/ts7/program-host.js +30 -4
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/semantic-checker.d.ts +10 -0
- package/dist/frontend/ts7/semantic-checker.js +25 -20
- package/dist/frontend/ts7/semantic-checker.js.map +1 -1
- package/dist/frontend/ts7/semantic-json.d.ts +13 -0
- package/dist/frontend/ts7/semantic-json.js +146 -0
- package/dist/frontend/ts7/semantic-json.js.map +1 -1
- package/dist/frontend/ts7/semantic-json.test.js +57 -1
- package/dist/frontend/ts7/semantic-json.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.d.ts +15 -0
- package/dist/frontend/ts7/semantic-model.js +67 -19
- package/dist/frontend/ts7/semantic-model.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.test.js +3 -2
- package/dist/frontend/ts7/semantic-model.test.js.map +1 -1
- package/dist/frontend/ts7/session.d.ts +14 -1
- package/dist/frontend/ts7/session.js +23 -1
- package/dist/frontend/ts7/session.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +1 -1
- package/dist/frontend/tsc-codes.js +7 -0
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +51 -7
- package/dist/frontend/type-mapper.js +456 -43
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/frontend/type-mapper.test.js +1 -1
- package/dist/frontend/type-mapper.test.js.map +1 -1
- package/dist/frontend-process-args.d.ts +4 -0
- package/dist/frontend-process-args.js +52 -0
- package/dist/frontend-process-args.js.map +1 -0
- package/dist/frontend-process-args.test.d.ts +1 -0
- package/dist/frontend-process-args.test.js +47 -0
- package/dist/frontend-process-args.test.js.map +1 -0
- package/dist/frontend-process.d.ts +1 -0
- package/dist/frontend-process.js +23 -0
- package/dist/frontend-process.js.map +1 -0
- package/dist/heap-collection.d.ts +16 -0
- package/dist/heap-collection.js +42 -0
- package/dist/heap-collection.js.map +1 -0
- package/dist/heap-collection.test.d.ts +1 -0
- package/dist/heap-collection.test.js +59 -0
- package/dist/heap-collection.test.js.map +1 -0
- package/dist/heap-pressure.d.ts +2 -0
- package/dist/heap-pressure.js +12 -0
- package/dist/heap-pressure.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +435 -89
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.js +5 -3
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/array-length-stability.d.ts +4 -0
- package/dist/ir/array-length-stability.js +26 -6
- package/dist/ir/array-length-stability.js.map +1 -1
- package/dist/ir/array-length-stability.test.js +49 -0
- package/dist/ir/array-length-stability.test.js.map +1 -1
- package/dist/ir/builtin-effects.d.ts +7 -0
- package/dist/ir/builtin-effects.js +80 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +7 -1
- package/dist/ir/builtin-signatures.js +303 -21
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/callback-specialization.d.ts +2 -1
- package/dist/ir/callback-specialization.js +23 -18
- package/dist/ir/callback-specialization.js.map +1 -1
- package/dist/ir/char-unit-locals.d.ts +19 -0
- package/dist/ir/char-unit-locals.js +185 -0
- package/dist/ir/char-unit-locals.js.map +1 -0
- package/dist/ir/char-unit-locals.test.d.ts +1 -0
- package/dist/ir/char-unit-locals.test.js +94 -0
- package/dist/ir/char-unit-locals.test.js.map +1 -0
- package/dist/ir/final-fields.d.ts +3 -1
- package/dist/ir/final-fields.js +15 -17
- package/dist/ir/final-fields.js.map +1 -1
- package/dist/ir/function-references.d.ts +2 -0
- package/dist/ir/function-references.js +2 -0
- package/dist/ir/function-references.js.map +1 -1
- package/dist/ir/function-references.test.js +5 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/initializer-bindings.d.ts +2 -1
- package/dist/ir/initializer-bindings.js +27 -20
- package/dist/ir/initializer-bindings.js.map +1 -1
- package/dist/ir/int32-arrays.d.ts +108 -0
- package/dist/ir/int32-arrays.js +831 -0
- package/dist/ir/int32-arrays.js.map +1 -0
- package/dist/ir/int32-slots.d.ts +36 -6
- package/dist/ir/int32-slots.js +370 -171
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/int32-slots.test.js +3 -1
- package/dist/ir/int32-slots.test.js.map +1 -1
- package/dist/ir/integer-loop-facts.d.ts +9 -4
- package/dist/ir/integer-loop-facts.js +93 -18
- package/dist/ir/integer-loop-facts.js.map +1 -1
- package/dist/ir/integer-loops.d.ts +49 -0
- package/dist/ir/integer-loops.js +202 -40
- package/dist/ir/integer-loops.js.map +1 -1
- package/dist/ir/integer-loops.test.js +211 -1
- package/dist/ir/integer-loops.test.js.map +1 -1
- package/dist/ir/integer-ranges.d.ts +5 -0
- package/dist/ir/integer-ranges.js +125 -12
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +94 -0
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/ir.d.ts +87 -9
- package/dist/ir/ir.js +61 -2
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +21 -1
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/js-ic.d.ts +19 -2
- package/dist/ir/js-ic.js +95 -11
- package/dist/ir/js-ic.js.map +1 -1
- package/dist/ir/js-ic.test.js +188 -0
- package/dist/ir/js-ic.test.js.map +1 -1
- package/dist/ir/node-index.d.ts +57 -0
- package/dist/ir/node-index.js +215 -0
- package/dist/ir/node-index.js.map +1 -0
- package/dist/ir/paired-while-loops.d.ts +25 -0
- package/dist/ir/paired-while-loops.js +335 -0
- package/dist/ir/paired-while-loops.js.map +1 -0
- package/dist/ir/paired-while-loops.test.d.ts +1 -0
- package/dist/ir/paired-while-loops.test.js +163 -0
- package/dist/ir/paired-while-loops.test.js.map +1 -0
- package/dist/ir/parameter-versions.d.ts +25 -0
- package/dist/ir/parameter-versions.js +300 -0
- package/dist/ir/parameter-versions.js.map +1 -0
- package/dist/ir/runtime-features.d.ts +60 -15
- package/dist/ir/runtime-features.js +276 -35
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/serialize.d.ts +12 -2
- package/dist/ir/serialize.js +16 -3
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/serialize.test.js +17 -0
- package/dist/ir/serialize.test.js.map +1 -1
- package/dist/ir/tiers.js +1 -0
- package/dist/ir/tiers.js.map +1 -1
- package/dist/ir/traverse.d.ts +2 -0
- package/dist/ir/traverse.js +29 -5
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/validate.js +171 -45
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/ir-policy.js +12 -0
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-cache.d.ts +2 -0
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/prepare.js +2 -0
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cache.d.ts +6 -1
- package/dist/native/cache.js +28 -5
- package/dist/native/cache.js.map +1 -1
- package/dist/native/cache.test.js +16 -2
- package/dist/native/cache.test.js.map +1 -1
- package/dist/native/cli.js +26 -1
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +8 -6
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/executable-cache.d.ts +1 -1
- package/dist/native/executable-cache.js +2 -2
- package/dist/native/executable-cache.js.map +1 -1
- package/dist/native/prepare.d.ts +3 -1
- package/dist/native/prepare.js +123 -31
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/prepare.test.js +78 -18
- package/dist/native/prepare.test.js.map +1 -1
- package/dist/native/sanitizer.test.js +6 -1
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/native/text-file.d.ts +13 -3
- package/dist/native/text-file.js +63 -9
- package/dist/native/text-file.js.map +1 -1
- package/dist/native/text-file.test.d.ts +1 -0
- package/dist/native/text-file.test.js +49 -0
- package/dist/native/text-file.test.js.map +1 -0
- package/dist/native/toolchain.js +4 -4
- package/dist/native/toolchain.js.map +1 -1
- package/dist/native/toolchain.test.js +3 -3
- package/dist/native/toolchain.test.js.map +1 -1
- package/dist/startup-cache.d.ts +1 -0
- package/dist/startup-cache.js +1 -0
- package/dist/startup-cache.js.map +1 -1
- package/dist/text-parts.d.ts +7 -0
- package/dist/text-parts.js +44 -0
- package/dist/text-parts.js.map +1 -1
- package/dist/text-parts.test.d.ts +1 -0
- package/dist/text-parts.test.js +46 -0
- package/dist/text-parts.test.js.map +1 -0
- package/dist/timing.d.ts +9 -2
- package/dist/timing.js +7 -4
- package/dist/timing.js.map +1 -1
- package/dist/wasm/translate.d.ts +4 -0
- package/dist/wasm/translate.js +2 -2
- package/dist/wasm/translate.js.map +1 -1
- package/package.json +21 -21
- package/shims/chalk/v5.ts +688 -0
- package/shims/hono-node-server/v2.ts +645 -0
- package/shims/hot-shots/client.ts +1126 -0
- package/shims/hot-shots/v8-unix-dgram.ts +8 -0
- package/shims/hot-shots/v8.ts +8 -0
- package/shims/undici/core/client.ts +4 -4
- package/surface-manifest.json +44 -52
|
@@ -544,12 +544,17 @@ declare var DOMException: {
|
|
|
544
544
|
readonly prototype: DOMException;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
|
-
/* WebCrypto
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
547
|
+
/* WebCrypto (scr_webcrypto.c): crypto.subtle's importKey, generateKey and
|
|
548
|
+
* exportKey for HMAC and AES keys (importKey also for PBKDF2 and HKDF
|
|
549
|
+
* keys), AES-GCM/CBC/CTR encrypt and decrypt, wrapKey and unwrapKey of
|
|
550
|
+
* secret keys (AES-KW or those ciphers), PBKDF2 and HKDF deriveBits and
|
|
551
|
+
* deriveKey, HMAC sign/verify, generateKey, importKey, exportKey, sign
|
|
552
|
+
* and verify for ECDSA, Ed25519, RSASSA-PKCS1-v1_5 and RSA-PSS, and the
|
|
553
|
+
* SHA-1/SHA-2 digests, typed as exactly that surface (the declarations
|
|
554
|
+
* mirror @types/node's webcrypto shapes), plus the global's randomUUID and
|
|
555
|
+
* getRandomValues. Every other SubtleCrypto method and crypto member is
|
|
556
|
+
* absent, so a use is an honest type error. CryptoKey values are native
|
|
557
|
+
* handles whose four members read through the handle. */
|
|
553
558
|
declare var crypto: Crypto;
|
|
554
559
|
/* The Crypto and SubtleCrypto constructors (feature probes only) stay
|
|
555
560
|
* `unknown`; the values keep this declaration order. */
|
|
@@ -582,9 +587,44 @@ interface HmacImportParams extends Algorithm {
|
|
|
582
587
|
hash: HashAlgorithmIdentifier;
|
|
583
588
|
length?: number;
|
|
584
589
|
}
|
|
590
|
+
interface HmacKeyGenParams extends Algorithm {
|
|
591
|
+
hash: HashAlgorithmIdentifier;
|
|
592
|
+
length?: number;
|
|
593
|
+
}
|
|
594
|
+
interface AesKeyGenParams extends Algorithm {
|
|
595
|
+
length: number;
|
|
596
|
+
}
|
|
597
|
+
interface AesGcmParams extends Algorithm {
|
|
598
|
+
additionalData?: BufferSource;
|
|
599
|
+
iv: BufferSource;
|
|
600
|
+
tagLength?: number;
|
|
601
|
+
}
|
|
602
|
+
interface AesCbcParams extends Algorithm {
|
|
603
|
+
iv: BufferSource;
|
|
604
|
+
}
|
|
605
|
+
interface AesCtrParams extends Algorithm {
|
|
606
|
+
counter: BufferSource;
|
|
607
|
+
length: number;
|
|
608
|
+
}
|
|
609
|
+
interface Pbkdf2Params extends Algorithm {
|
|
610
|
+
hash: HashAlgorithmIdentifier;
|
|
611
|
+
iterations: number;
|
|
612
|
+
salt: BufferSource;
|
|
613
|
+
}
|
|
614
|
+
interface HkdfParams extends Algorithm {
|
|
615
|
+
hash: HashAlgorithmIdentifier;
|
|
616
|
+
info: BufferSource;
|
|
617
|
+
salt: BufferSource;
|
|
618
|
+
}
|
|
619
|
+
interface AesDerivedKeyParams extends Algorithm {
|
|
620
|
+
length: number;
|
|
621
|
+
}
|
|
585
622
|
interface KeyAlgorithm {
|
|
586
623
|
name: string;
|
|
587
624
|
}
|
|
625
|
+
interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
626
|
+
length: number;
|
|
627
|
+
}
|
|
588
628
|
interface HmacKeyAlgorithm extends KeyAlgorithm {
|
|
589
629
|
hash: KeyAlgorithm;
|
|
590
630
|
length: number;
|
|
@@ -623,34 +663,136 @@ interface JsonWebKey {
|
|
|
623
663
|
x?: string;
|
|
624
664
|
y?: string;
|
|
625
665
|
}
|
|
626
|
-
|
|
627
|
-
|
|
666
|
+
interface EcKeyGenParams extends Algorithm {
|
|
667
|
+
namedCurve: string;
|
|
668
|
+
}
|
|
669
|
+
interface EcKeyImportParams extends Algorithm {
|
|
670
|
+
namedCurve: string;
|
|
671
|
+
}
|
|
672
|
+
interface EcdsaParams extends Algorithm {
|
|
673
|
+
hash: HashAlgorithmIdentifier;
|
|
674
|
+
}
|
|
675
|
+
interface RsaHashedKeyGenParams extends Algorithm {
|
|
676
|
+
modulusLength: number;
|
|
677
|
+
publicExponent: Uint8Array;
|
|
678
|
+
hash: HashAlgorithmIdentifier;
|
|
679
|
+
}
|
|
680
|
+
interface RsaHashedImportParams extends Algorithm {
|
|
681
|
+
hash: HashAlgorithmIdentifier;
|
|
682
|
+
}
|
|
683
|
+
interface RsaPssParams extends Algorithm {
|
|
684
|
+
saltLength: number;
|
|
685
|
+
}
|
|
686
|
+
interface EcKeyAlgorithm extends KeyAlgorithm {
|
|
687
|
+
namedCurve: string;
|
|
688
|
+
}
|
|
689
|
+
interface RsaHashedKeyAlgorithm extends KeyAlgorithm {
|
|
690
|
+
modulusLength: number;
|
|
691
|
+
publicExponent: Uint8Array;
|
|
692
|
+
hash: KeyAlgorithm;
|
|
693
|
+
}
|
|
694
|
+
interface CryptoKeyPair {
|
|
695
|
+
privateKey: CryptoKey;
|
|
696
|
+
publicKey: CryptoKey;
|
|
697
|
+
}
|
|
698
|
+
/* HMAC and AES keys generate, import and export as 'raw' and 'jwk'
|
|
699
|
+
* (PBKDF2 and HKDF keys import as 'raw'); ECDSA and RSA keys generate,
|
|
700
|
+
* import and export as 'spki', 'pkcs8' and 'jwk', and ECDSA public keys as
|
|
701
|
+
* 'raw'. */
|
|
628
702
|
interface SubtleCrypto {
|
|
703
|
+
decrypt(
|
|
704
|
+
algorithm: AesGcmParams | AesCbcParams | AesCtrParams,
|
|
705
|
+
key: CryptoKey,
|
|
706
|
+
data: BufferSource,
|
|
707
|
+
): Promise<ArrayBuffer>;
|
|
708
|
+
deriveBits(
|
|
709
|
+
algorithm: Pbkdf2Params | HkdfParams,
|
|
710
|
+
baseKey: CryptoKey,
|
|
711
|
+
length?: number | null,
|
|
712
|
+
): Promise<ArrayBuffer>;
|
|
713
|
+
deriveKey(
|
|
714
|
+
algorithm: Pbkdf2Params | HkdfParams,
|
|
715
|
+
baseKey: CryptoKey,
|
|
716
|
+
derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams,
|
|
717
|
+
extractable: boolean,
|
|
718
|
+
keyUsages: readonly KeyUsage[],
|
|
719
|
+
): Promise<CryptoKey>;
|
|
629
720
|
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
|
721
|
+
encrypt(
|
|
722
|
+
algorithm: AesGcmParams | AesCbcParams | AesCtrParams,
|
|
723
|
+
key: CryptoKey,
|
|
724
|
+
data: BufferSource,
|
|
725
|
+
): Promise<ArrayBuffer>;
|
|
726
|
+
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
727
|
+
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
728
|
+
generateKey(
|
|
729
|
+
algorithm: EcKeyGenParams | RsaHashedKeyGenParams | "Ed25519" | { name: "Ed25519" },
|
|
730
|
+
extractable: boolean,
|
|
731
|
+
keyUsages: readonly KeyUsage[],
|
|
732
|
+
): Promise<CryptoKeyPair>;
|
|
733
|
+
generateKey(
|
|
734
|
+
algorithm: AesKeyGenParams | HmacKeyGenParams,
|
|
735
|
+
extractable: boolean,
|
|
736
|
+
keyUsages: readonly KeyUsage[],
|
|
737
|
+
): Promise<CryptoKey>;
|
|
630
738
|
importKey(
|
|
631
739
|
format: "jwk",
|
|
632
740
|
keyData: JsonWebKey,
|
|
633
|
-
algorithm: AlgorithmIdentifier | HmacImportParams,
|
|
741
|
+
algorithm: AlgorithmIdentifier | HmacImportParams | EcKeyImportParams | RsaHashedImportParams,
|
|
634
742
|
extractable: boolean,
|
|
635
743
|
keyUsages: readonly KeyUsage[],
|
|
636
744
|
): Promise<CryptoKey>;
|
|
637
745
|
importKey(
|
|
638
746
|
format: Exclude<KeyFormat, "jwk">,
|
|
639
747
|
keyData: BufferSource,
|
|
640
|
-
algorithm: AlgorithmIdentifier | HmacImportParams,
|
|
748
|
+
algorithm: AlgorithmIdentifier | HmacImportParams | EcKeyImportParams | RsaHashedImportParams,
|
|
749
|
+
extractable: boolean,
|
|
750
|
+
keyUsages: readonly KeyUsage[],
|
|
751
|
+
): Promise<CryptoKey>;
|
|
752
|
+
sign(
|
|
753
|
+
algorithm: AlgorithmIdentifier | EcdsaParams | RsaPssParams,
|
|
754
|
+
key: CryptoKey,
|
|
755
|
+
data: BufferSource,
|
|
756
|
+
): Promise<ArrayBuffer>;
|
|
757
|
+
unwrapKey(
|
|
758
|
+
format: KeyFormat,
|
|
759
|
+
wrappedKey: BufferSource,
|
|
760
|
+
unwrappingKey: CryptoKey,
|
|
761
|
+
unwrapAlgorithm: AlgorithmIdentifier | AesGcmParams | AesCbcParams | AesCtrParams,
|
|
762
|
+
unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams,
|
|
641
763
|
extractable: boolean,
|
|
642
764
|
keyUsages: readonly KeyUsage[],
|
|
643
765
|
): Promise<CryptoKey>;
|
|
644
|
-
sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
645
766
|
verify(
|
|
646
|
-
algorithm: AlgorithmIdentifier,
|
|
767
|
+
algorithm: AlgorithmIdentifier | EcdsaParams | RsaPssParams,
|
|
647
768
|
key: CryptoKey,
|
|
648
769
|
signature: BufferSource,
|
|
649
770
|
data: BufferSource,
|
|
650
771
|
): Promise<boolean>;
|
|
772
|
+
wrapKey(
|
|
773
|
+
format: KeyFormat,
|
|
774
|
+
key: CryptoKey,
|
|
775
|
+
wrappingKey: CryptoKey,
|
|
776
|
+
wrapAlgorithm: AlgorithmIdentifier | AesGcmParams | AesCbcParams | AesCtrParams,
|
|
777
|
+
): Promise<ArrayBuffer>;
|
|
651
778
|
}
|
|
652
779
|
interface Crypto {
|
|
653
780
|
readonly subtle: SubtleCrypto;
|
|
781
|
+
getRandomValues<
|
|
782
|
+
T extends
|
|
783
|
+
| Int8Array
|
|
784
|
+
| Uint8Array
|
|
785
|
+
| Uint8ClampedArray
|
|
786
|
+
| Int16Array
|
|
787
|
+
| Uint16Array
|
|
788
|
+
| Int32Array
|
|
789
|
+
| Uint32Array
|
|
790
|
+
| BigInt64Array
|
|
791
|
+
| BigUint64Array,
|
|
792
|
+
>(
|
|
793
|
+
typedArray: T,
|
|
794
|
+
): T;
|
|
795
|
+
randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
|
|
654
796
|
}
|
|
655
797
|
|
|
656
798
|
/* Capability-gated globals harness code probes behind feature guards
|
|
@@ -964,6 +1106,34 @@ declare var ReadableStream: {
|
|
|
964
1106
|
from(iterable: string): ReadableStream<string>;
|
|
965
1107
|
readonly prototype: ReadableStream<unknown>;
|
|
966
1108
|
};
|
|
1109
|
+
/* The writable side of a TransformStream and its writer. The
|
|
1110
|
+
* WritableStream constructor has no native lowering; writable streams come
|
|
1111
|
+
* from `new TransformStream()`. */
|
|
1112
|
+
interface WritableStreamDefaultWriter<W = unknown> {
|
|
1113
|
+
readonly closed: Promise<void>;
|
|
1114
|
+
readonly desiredSize: number | null;
|
|
1115
|
+
readonly ready: Promise<void>;
|
|
1116
|
+
abort(reason?: unknown): Promise<void>;
|
|
1117
|
+
close(): Promise<void>;
|
|
1118
|
+
releaseLock(): void;
|
|
1119
|
+
write(chunk?: W): Promise<void>;
|
|
1120
|
+
}
|
|
1121
|
+
interface WritableStream<W = unknown> {
|
|
1122
|
+
readonly locked: boolean;
|
|
1123
|
+
abort(reason?: unknown): Promise<void>;
|
|
1124
|
+
close(): Promise<void>;
|
|
1125
|
+
getWriter(): WritableStreamDefaultWriter<W>;
|
|
1126
|
+
}
|
|
1127
|
+
/* The identity transform: chunks written to `writable` are read from
|
|
1128
|
+
* `readable`, and a write completes when its chunk is read. */
|
|
1129
|
+
interface TransformStream<I = unknown, O = unknown> {
|
|
1130
|
+
readonly readable: ReadableStream<O>;
|
|
1131
|
+
readonly writable: WritableStream<I>;
|
|
1132
|
+
}
|
|
1133
|
+
declare var TransformStream: {
|
|
1134
|
+
new <I = unknown, O = I>(): TransformStream<I, O>;
|
|
1135
|
+
readonly prototype: TransformStream<unknown, unknown>;
|
|
1136
|
+
};
|
|
967
1137
|
|
|
968
1138
|
/* fetch, typed as the native JSON + readable-stream slice: one URL, an
|
|
969
1139
|
* optional init with the members CLI requests carry, and a Response
|
|
@@ -1379,13 +1549,13 @@ interface ImportMeta {
|
|
|
1379
1549
|
* `recursive`); empty directories go through `rmdirSync`. */
|
|
1380
1550
|
declare module "node:fs" {
|
|
1381
1551
|
import { Readable, Writable } from "stream";
|
|
1382
|
-
export function readFileSync(path: string | number, encoding: BufferEncoding): string;
|
|
1552
|
+
export function readFileSync(path: string | number | URL, encoding: BufferEncoding): string;
|
|
1383
1553
|
export function readFileSync(
|
|
1384
|
-
path: string | number,
|
|
1554
|
+
path: string | number | URL,
|
|
1385
1555
|
options: { encoding: BufferEncoding },
|
|
1386
1556
|
): string;
|
|
1387
|
-
export function readFileSync(path: string | number): Buffer;
|
|
1388
|
-
export function readFileSync(path: string, options: unknown): string | Buffer;
|
|
1557
|
+
export function readFileSync(path: string | number | URL): Buffer;
|
|
1558
|
+
export function readFileSync(path: string | URL, options: unknown): string | Buffer;
|
|
1389
1559
|
/* Error-first callbacks select string or Buffer data from their encoding.
|
|
1390
1560
|
* Unknown options retain that union until the caller validates the value. */
|
|
1391
1561
|
export function readFile(
|
|
@@ -1397,7 +1567,7 @@ declare module "node:fs" {
|
|
|
1397
1567
|
* Node — an existing file keeps its permissions) and/or the utf8
|
|
1398
1568
|
* encoding spelling. */
|
|
1399
1569
|
export function writeFileSync(
|
|
1400
|
-
path: string,
|
|
1570
|
+
path: string | URL,
|
|
1401
1571
|
data: string,
|
|
1402
1572
|
/* The options-record stance (see http.RequestOptions): flag fences
|
|
1403
1573
|
* by name at the call site; undocumented keys drop like Node. */
|
|
@@ -1409,14 +1579,17 @@ declare module "node:fs" {
|
|
|
1409
1579
|
},
|
|
1410
1580
|
): void;
|
|
1411
1581
|
/* The bare-encoding spelling — the options record's encoding key alone. */
|
|
1412
|
-
export function writeFileSync(path: string, data: string, encoding: "utf8" | "utf-8"): void;
|
|
1413
|
-
export function writeFileSync(path: string, data: string | Uint8Array): void;
|
|
1414
|
-
export function appendFileSync(path: string, data: string | Uint8Array): void;
|
|
1582
|
+
export function writeFileSync(path: string | URL, data: string, encoding: "utf8" | "utf-8"): void;
|
|
1583
|
+
export function writeFileSync(path: string | URL, data: string | Uint8Array): void;
|
|
1584
|
+
export function appendFileSync(path: string | URL, data: string | Uint8Array): void;
|
|
1415
1585
|
export function existsSync(path: string): boolean;
|
|
1416
|
-
export function mkdirSync(path: string): void;
|
|
1417
|
-
export function mkdirSync(
|
|
1418
|
-
|
|
1419
|
-
|
|
1586
|
+
export function mkdirSync(path: string | URL): void;
|
|
1587
|
+
export function mkdirSync(
|
|
1588
|
+
path: string | URL,
|
|
1589
|
+
options: { recursive?: boolean; mode?: number },
|
|
1590
|
+
): void;
|
|
1591
|
+
export function unlinkSync(path: string | URL): void;
|
|
1592
|
+
export function chmodSync(path: string | URL, mode: number): void;
|
|
1420
1593
|
export function fchmodSync(fd: number, mode: number): void;
|
|
1421
1594
|
export function fsyncSync(fd: number): void;
|
|
1422
1595
|
export function linkSync(
|
|
@@ -1514,29 +1687,29 @@ declare module "node:fs" {
|
|
|
1514
1687
|
path: string | Uint8Array | URL,
|
|
1515
1688
|
options: string | { encoding?: string | null } | null,
|
|
1516
1689
|
): string | Buffer;
|
|
1517
|
-
export function chownSync(path: string, uid: number, gid: number): void;
|
|
1518
|
-
export function lchownSync(path: string, uid: number, gid: number): void;
|
|
1690
|
+
export function chownSync(path: string | URL, uid: number, gid: number): void;
|
|
1691
|
+
export function lchownSync(path: string | URL, uid: number, gid: number): void;
|
|
1519
1692
|
export function fchownSync(fd: number, uid: number, gid: number): void;
|
|
1520
|
-
export function truncateSync(path: string, len?: number): void;
|
|
1693
|
+
export function truncateSync(path: string | URL, len?: number): void;
|
|
1521
1694
|
/* The 2-argument form only (Node's mode flags have no lowering). The
|
|
1522
1695
|
* destination is created or truncated carrying the SOURCE's mode. */
|
|
1523
|
-
export function copyFileSync(src: string, dest: string): void;
|
|
1696
|
+
export function copyFileSync(src: string | URL, dest: string | URL): void;
|
|
1524
1697
|
export function rename(
|
|
1525
1698
|
oldPath: string,
|
|
1526
1699
|
newPath: string,
|
|
1527
1700
|
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1528
1701
|
): void;
|
|
1529
|
-
export function renameSync(oldPath: string, newPath: string): void;
|
|
1530
|
-
export function rmSync(path: string): void;
|
|
1702
|
+
export function renameSync(oldPath: string | URL, newPath: string | URL): void;
|
|
1703
|
+
export function rmSync(path: string | URL): void;
|
|
1531
1704
|
/* maxRetries/retryDelay are accepted no-ops (Node retries around
|
|
1532
1705
|
* EBUSY-class races; the synchronous lowering has no re-entrancy that
|
|
1533
1706
|
* needs them). */
|
|
1534
1707
|
export function rmSync(
|
|
1535
|
-
path: string,
|
|
1708
|
+
path: string | URL,
|
|
1536
1709
|
options: { recursive?: boolean; force?: boolean; maxRetries?: number; retryDelay?: number },
|
|
1537
1710
|
): void;
|
|
1538
|
-
export function rmdirSync(path: string): void;
|
|
1539
|
-
export function readdirSync(path: string): string[];
|
|
1711
|
+
export function rmdirSync(path: string | URL): void;
|
|
1712
|
+
export function readdirSync(path: string | URL): string[];
|
|
1540
1713
|
/* The withFileTypes form: Dirent rows (name + parentPath + the type
|
|
1541
1714
|
* probes — the honest subset of Node's Dirent surface). The type is
|
|
1542
1715
|
* interned explicitly in type-mapper.ts (the record's hidden %dtype field
|
|
@@ -1550,7 +1723,7 @@ declare module "node:fs" {
|
|
|
1550
1723
|
isSymbolicLink(): boolean;
|
|
1551
1724
|
}
|
|
1552
1725
|
export function readdirSync(
|
|
1553
|
-
path: string,
|
|
1726
|
+
path: string | URL,
|
|
1554
1727
|
/* The options-record stance (see http.RequestOptions): recursive
|
|
1555
1728
|
* fences by name at the call site; undocumented keys drop like Node. */
|
|
1556
1729
|
options: { withFileTypes: true; recursive?: boolean; [option: string]: unknown },
|
|
@@ -1599,7 +1772,7 @@ declare module "node:fs" {
|
|
|
1599
1772
|
encoding?: "utf8" | "utf-8";
|
|
1600
1773
|
bufferSize?: number;
|
|
1601
1774
|
}
|
|
1602
|
-
export function opendirSync(path: string, options?: OpenDirOptions): Dir;
|
|
1775
|
+
export function opendirSync(path: string | URL, options?: OpenDirOptions): Dir;
|
|
1603
1776
|
/* fs.ReadStream / fs.WriteStream: runtime Readable and Writable streams
|
|
1604
1777
|
* over a file (scr_fs_stream.c). The options are checked at runtime
|
|
1605
1778
|
* with Node's rules; flags and mode are checked when the file opens, so
|
|
@@ -1641,8 +1814,8 @@ declare module "node:fs" {
|
|
|
1641
1814
|
path: string | Buffer | URL,
|
|
1642
1815
|
options?: BufferEncoding | WriteStreamOptions,
|
|
1643
1816
|
): WriteStream;
|
|
1644
|
-
export function accessSync(path: string, mode?: number): void;
|
|
1645
|
-
export function mkdtempSync(prefix: string): string;
|
|
1817
|
+
export function accessSync(path: string | URL, mode?: number): void;
|
|
1818
|
+
export function mkdtempSync(prefix: string | URL): string;
|
|
1646
1819
|
export const constants: {
|
|
1647
1820
|
readonly F_OK: number;
|
|
1648
1821
|
readonly R_OK: number;
|
|
@@ -1745,34 +1918,34 @@ declare module "node:fs" {
|
|
|
1745
1918
|
bigint?: boolean;
|
|
1746
1919
|
throwIfNoEntry?: boolean;
|
|
1747
1920
|
}
|
|
1748
|
-
export function statSync(path: string, options?: undefined): Stats;
|
|
1921
|
+
export function statSync(path: string | URL, options?: undefined): Stats;
|
|
1749
1922
|
export function statSync(
|
|
1750
|
-
path: string,
|
|
1923
|
+
path: string | URL,
|
|
1751
1924
|
options: StatSyncOptions & { bigint?: false; throwIfNoEntry: false },
|
|
1752
1925
|
): Stats | undefined;
|
|
1753
1926
|
export function statSync(
|
|
1754
|
-
path: string,
|
|
1927
|
+
path: string | URL,
|
|
1755
1928
|
options: StatSyncOptions & { bigint?: false; throwIfNoEntry?: true },
|
|
1756
1929
|
): Stats;
|
|
1757
1930
|
/* bigint: true type-checks so the lowering can name it as unsupported. */
|
|
1758
|
-
export function statSync(path: string, options: StatSyncOptions & { bigint: true }): Stats;
|
|
1759
|
-
export function statSync(path: string, options: StatSyncOptions): Stats | undefined;
|
|
1760
|
-
export function lstatSync(path: string, options?: undefined): Stats;
|
|
1931
|
+
export function statSync(path: string | URL, options: StatSyncOptions & { bigint: true }): Stats;
|
|
1932
|
+
export function statSync(path: string | URL, options: StatSyncOptions): Stats | undefined;
|
|
1933
|
+
export function lstatSync(path: string | URL, options?: undefined): Stats;
|
|
1761
1934
|
export function lstatSync(
|
|
1762
|
-
path: string,
|
|
1935
|
+
path: string | URL,
|
|
1763
1936
|
options: StatSyncOptions & { bigint?: false; throwIfNoEntry: false },
|
|
1764
1937
|
): Stats | undefined;
|
|
1765
1938
|
export function lstatSync(
|
|
1766
|
-
path: string,
|
|
1939
|
+
path: string | URL,
|
|
1767
1940
|
options: StatSyncOptions & { bigint?: false; throwIfNoEntry?: true },
|
|
1768
1941
|
): Stats;
|
|
1769
1942
|
/* bigint: true type-checks so the lowering can name it as unsupported. */
|
|
1770
|
-
export function lstatSync(path: string, options: StatSyncOptions & { bigint: true }): Stats;
|
|
1771
|
-
export function lstatSync(path: string, options: StatSyncOptions): Stats | undefined;
|
|
1943
|
+
export function lstatSync(path: string | URL, options: StatSyncOptions & { bigint: true }): Stats;
|
|
1944
|
+
export function lstatSync(path: string | URL, options: StatSyncOptions): Stats | undefined;
|
|
1772
1945
|
/* The fd pair behind spawn's fd-stdio form: openSync(path, flags) →
|
|
1773
1946
|
* the raw fd. Numeric flags use an inline OR of the O_* constants. */
|
|
1774
|
-
export function openSync(path: string, flags: string): number;
|
|
1775
|
-
export function openSync(path: string, flags: number, mode?: number): number;
|
|
1947
|
+
export function openSync(path: string | URL, flags: string): number;
|
|
1948
|
+
export function openSync(path: string | URL, flags: number, mode?: number): number;
|
|
1776
1949
|
export function closeSync(fd: number): void;
|
|
1777
1950
|
export function fdatasyncSync(fd: number): void;
|
|
1778
1951
|
export function ftruncateSync(fd: number, len?: number): void;
|
|
@@ -1853,9 +2026,9 @@ declare module "node:fs" {
|
|
|
1853
2026
|
export function fstatSync(fd: number): Stats;
|
|
1854
2027
|
/* realpath(3) — resolves symlinks, `.`/`..`, throwing Node's fs error
|
|
1855
2028
|
* shapes for missing paths. */
|
|
1856
|
-
export function realpathSync(path: string): string;
|
|
2029
|
+
export function realpathSync(path: string | URL): string;
|
|
1857
2030
|
export namespace realpathSync {
|
|
1858
|
-
function native(path: string): string;
|
|
2031
|
+
function native(path: string | URL): string;
|
|
1859
2032
|
}
|
|
1860
2033
|
/* statfs(2)/statvfs(3) — the filesystem-capacity snapshot (the fields
|
|
1861
2034
|
* Node's statfsSync reports; bavail × bsize is the free-space probe). */
|
|
@@ -2128,6 +2301,10 @@ declare module "fs/promises" {
|
|
|
2128
2301
|
options: import("node:fs").GlobOptionsWithFileTypes,
|
|
2129
2302
|
): AsyncIterableIterator<import("node:fs").Dirent>;
|
|
2130
2303
|
export function rm(path: string): Promise<void>;
|
|
2304
|
+
export function rm(
|
|
2305
|
+
path: string,
|
|
2306
|
+
options: { recursive?: boolean; force?: boolean; maxRetries?: number; retryDelay?: number },
|
|
2307
|
+
): Promise<void>;
|
|
2131
2308
|
export function stat(path: string): Promise<import("node:fs").Stats>;
|
|
2132
2309
|
export function statfs(
|
|
2133
2310
|
path: string | Uint8Array | URL,
|
|
@@ -2686,8 +2863,20 @@ declare module "crypto" {
|
|
|
2686
2863
|
import { Transform } from "stream";
|
|
2687
2864
|
export type KeyObjectType = "secret" | "public" | "private";
|
|
2688
2865
|
export interface JsonWebKey {
|
|
2689
|
-
|
|
2866
|
+
crv?: string;
|
|
2867
|
+
d?: string;
|
|
2868
|
+
dp?: string;
|
|
2869
|
+
dq?: string;
|
|
2870
|
+
e?: string;
|
|
2690
2871
|
k?: string;
|
|
2872
|
+
kty?: string;
|
|
2873
|
+
n?: string;
|
|
2874
|
+
p?: string;
|
|
2875
|
+
q?: string;
|
|
2876
|
+
qi?: string;
|
|
2877
|
+
x?: string;
|
|
2878
|
+
y?: string;
|
|
2879
|
+
[key: string]: unknown;
|
|
2691
2880
|
}
|
|
2692
2881
|
export interface JwkKeyExportOptions {
|
|
2693
2882
|
format: "jwk";
|
|
@@ -2695,16 +2884,183 @@ declare module "crypto" {
|
|
|
2695
2884
|
export interface KeyExportOptions {
|
|
2696
2885
|
format?: "buffer" | undefined;
|
|
2697
2886
|
}
|
|
2698
|
-
|
|
2887
|
+
export type KeyFormat = "pem" | "der" | "jwk";
|
|
2888
|
+
export interface AsymmetricKeyExportOptions<T extends KeyFormat> {
|
|
2889
|
+
type: "pkcs1" | "spki" | "pkcs8" | "sec1";
|
|
2890
|
+
format: T;
|
|
2891
|
+
}
|
|
2892
|
+
export interface AsymmetricKeyDetails {
|
|
2893
|
+
modulusLength?: number;
|
|
2894
|
+
publicExponent?: bigint;
|
|
2895
|
+
namedCurve?: string;
|
|
2896
|
+
}
|
|
2897
|
+
/* Secret keys, and RSA and EC private and public keys. */
|
|
2699
2898
|
export class KeyObject {
|
|
2700
2899
|
private constructor();
|
|
2701
2900
|
type: KeyObjectType;
|
|
2702
2901
|
symmetricKeySize?: number;
|
|
2703
2902
|
asymmetricKeyType?: string;
|
|
2903
|
+
asymmetricKeyDetails?: AsymmetricKeyDetails;
|
|
2904
|
+
export(options: AsymmetricKeyExportOptions<"pem">): string | Buffer;
|
|
2905
|
+
export(options: AsymmetricKeyExportOptions<"der">): Buffer;
|
|
2704
2906
|
export(options?: KeyExportOptions): Buffer;
|
|
2705
2907
|
export(options: JwkKeyExportOptions): JsonWebKey;
|
|
2706
2908
|
equals(otherKeyObject: KeyObject): boolean;
|
|
2707
2909
|
}
|
|
2910
|
+
export interface PrivateKeyInput {
|
|
2911
|
+
key: string | Buffer;
|
|
2912
|
+
format?: "pem" | "der" | undefined;
|
|
2913
|
+
type?: "pkcs1" | "pkcs8" | "sec1" | undefined;
|
|
2914
|
+
encoding?: string | undefined;
|
|
2915
|
+
}
|
|
2916
|
+
export interface PublicKeyInput {
|
|
2917
|
+
key: string | Buffer;
|
|
2918
|
+
format?: "pem" | "der" | undefined;
|
|
2919
|
+
type?: "pkcs1" | "spki" | undefined;
|
|
2920
|
+
encoding?: string | undefined;
|
|
2921
|
+
}
|
|
2922
|
+
export interface JsonWebKeyInput {
|
|
2923
|
+
key: JsonWebKey;
|
|
2924
|
+
format: "jwk";
|
|
2925
|
+
}
|
|
2926
|
+
export function createPrivateKey(
|
|
2927
|
+
key: PrivateKeyInput | string | Buffer | JsonWebKeyInput,
|
|
2928
|
+
): KeyObject;
|
|
2929
|
+
export function createPublicKey(
|
|
2930
|
+
key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput,
|
|
2931
|
+
): KeyObject;
|
|
2932
|
+
export interface KeyPairKeyObjectResult {
|
|
2933
|
+
publicKey: KeyObject;
|
|
2934
|
+
privateKey: KeyObject;
|
|
2935
|
+
}
|
|
2936
|
+
export interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
2937
|
+
publicKey: T1;
|
|
2938
|
+
privateKey: T2;
|
|
2939
|
+
}
|
|
2940
|
+
export interface RSAKeyPairKeyObjectOptions {
|
|
2941
|
+
modulusLength: number;
|
|
2942
|
+
publicExponent?: number | undefined;
|
|
2943
|
+
}
|
|
2944
|
+
export interface ECKeyPairKeyObjectOptions {
|
|
2945
|
+
namedCurve: string;
|
|
2946
|
+
}
|
|
2947
|
+
export interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2948
|
+
modulusLength: number;
|
|
2949
|
+
publicExponent?: number | undefined;
|
|
2950
|
+
publicKeyEncoding: { type: "pkcs1" | "spki"; format: PubF };
|
|
2951
|
+
privateKeyEncoding: { type: "pkcs1" | "pkcs8"; format: PrivF };
|
|
2952
|
+
}
|
|
2953
|
+
export interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2954
|
+
namedCurve: string;
|
|
2955
|
+
publicKeyEncoding: { type: "pkcs1" | "spki"; format: PubF };
|
|
2956
|
+
privateKeyEncoding: { type: "sec1" | "pkcs8"; format: PrivF };
|
|
2957
|
+
}
|
|
2958
|
+
export function generateKeyPairSync(
|
|
2959
|
+
type: "rsa",
|
|
2960
|
+
options: RSAKeyPairOptions<"pem", "pem">,
|
|
2961
|
+
): KeyPairSyncResult<string, string>;
|
|
2962
|
+
export function generateKeyPairSync(
|
|
2963
|
+
type: "rsa",
|
|
2964
|
+
options: RSAKeyPairOptions<"der", "der">,
|
|
2965
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2966
|
+
export function generateKeyPairSync(
|
|
2967
|
+
type: "rsa",
|
|
2968
|
+
options: RSAKeyPairKeyObjectOptions,
|
|
2969
|
+
): KeyPairKeyObjectResult;
|
|
2970
|
+
export function generateKeyPairSync(
|
|
2971
|
+
type: "ec",
|
|
2972
|
+
options: ECKeyPairOptions<"pem", "pem">,
|
|
2973
|
+
): KeyPairSyncResult<string, string>;
|
|
2974
|
+
export function generateKeyPairSync(
|
|
2975
|
+
type: "ec",
|
|
2976
|
+
options: ECKeyPairOptions<"der", "der">,
|
|
2977
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2978
|
+
export function generateKeyPairSync(
|
|
2979
|
+
type: "ec",
|
|
2980
|
+
options: ECKeyPairKeyObjectOptions,
|
|
2981
|
+
): KeyPairKeyObjectResult;
|
|
2982
|
+
export interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2983
|
+
publicKeyEncoding: { type: "spki"; format: PubF };
|
|
2984
|
+
privateKeyEncoding: { type: "pkcs8"; format: PrivF };
|
|
2985
|
+
}
|
|
2986
|
+
export function generateKeyPairSync(
|
|
2987
|
+
type: "ed25519",
|
|
2988
|
+
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
2989
|
+
): KeyPairSyncResult<string, string>;
|
|
2990
|
+
export function generateKeyPairSync(
|
|
2991
|
+
type: "ed25519",
|
|
2992
|
+
options: ED25519KeyPairOptions<"der", "der">,
|
|
2993
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2994
|
+
export function generateKeyPairSync(type: "ed25519", options?: {}): KeyPairKeyObjectResult;
|
|
2995
|
+
export function generateKeyPair(
|
|
2996
|
+
type: "ed25519",
|
|
2997
|
+
options: {} | undefined,
|
|
2998
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2999
|
+
): void;
|
|
3000
|
+
export function generateKeyPair(
|
|
3001
|
+
type: "rsa",
|
|
3002
|
+
options: RSAKeyPairKeyObjectOptions,
|
|
3003
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3004
|
+
): void;
|
|
3005
|
+
export function generateKeyPair(
|
|
3006
|
+
type: "ec",
|
|
3007
|
+
options: ECKeyPairKeyObjectOptions,
|
|
3008
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3009
|
+
): void;
|
|
3010
|
+
export interface SigningOptions {
|
|
3011
|
+
padding?: number | undefined;
|
|
3012
|
+
saltLength?: number | undefined;
|
|
3013
|
+
dsaEncoding?: "der" | "ieee-p1363" | undefined;
|
|
3014
|
+
}
|
|
3015
|
+
export interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
|
|
3016
|
+
export interface SignKeyObjectInput extends SigningOptions {
|
|
3017
|
+
key: KeyObject;
|
|
3018
|
+
}
|
|
3019
|
+
export interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
|
|
3020
|
+
export interface VerifyKeyObjectInput extends SigningOptions {
|
|
3021
|
+
key: KeyObject;
|
|
3022
|
+
}
|
|
3023
|
+
export function sign(
|
|
3024
|
+
algorithm: string | null | undefined,
|
|
3025
|
+
data: ArrayBufferView,
|
|
3026
|
+
key: KeyObject | string | Buffer | SignKeyObjectInput | SignPrivateKeyInput,
|
|
3027
|
+
): Buffer;
|
|
3028
|
+
export function verify(
|
|
3029
|
+
algorithm: string | null | undefined,
|
|
3030
|
+
data: ArrayBufferView,
|
|
3031
|
+
key: KeyObject | string | Buffer | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
|
3032
|
+
signature: ArrayBufferView,
|
|
3033
|
+
): boolean;
|
|
3034
|
+
/* Sign and Verify accumulate update() data; they are not usable as
|
|
3035
|
+
* writable streams. */
|
|
3036
|
+
export class Sign {
|
|
3037
|
+
private constructor();
|
|
3038
|
+
update(data: string | ArrayBufferView): this;
|
|
3039
|
+
update(data: string, inputEncoding: Encoding): this;
|
|
3040
|
+
sign(
|
|
3041
|
+
privateKey: KeyObject | string | Buffer | SignKeyObjectInput | SignPrivateKeyInput,
|
|
3042
|
+
): Buffer;
|
|
3043
|
+
sign(
|
|
3044
|
+
privateKey: KeyObject | string | Buffer | SignKeyObjectInput | SignPrivateKeyInput,
|
|
3045
|
+
outputFormat: BinaryToTextEncoding,
|
|
3046
|
+
): string;
|
|
3047
|
+
}
|
|
3048
|
+
export class Verify {
|
|
3049
|
+
private constructor();
|
|
3050
|
+
update(data: string | ArrayBufferView): this;
|
|
3051
|
+
update(data: string, inputEncoding: Encoding): this;
|
|
3052
|
+
verify(
|
|
3053
|
+
object: KeyObject | string | Buffer | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
|
3054
|
+
signature: ArrayBufferView,
|
|
3055
|
+
): boolean;
|
|
3056
|
+
verify(
|
|
3057
|
+
object: KeyObject | string | Buffer | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
|
3058
|
+
signature: string,
|
|
3059
|
+
signatureEncoding?: BinaryToTextEncoding,
|
|
3060
|
+
): boolean;
|
|
3061
|
+
}
|
|
3062
|
+
export function createSign(algorithm: string): Sign;
|
|
3063
|
+
export function createVerify(algorithm: string): Verify;
|
|
2708
3064
|
export function createSecretKey(key: ArrayBufferView | ArrayBufferLike): KeyObject;
|
|
2709
3065
|
export function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
|
|
2710
3066
|
export function generateKeySync(type: "hmac" | "aes", options: { length: number }): KeyObject;
|
|
@@ -2777,8 +3133,7 @@ declare module "crypto" {
|
|
|
2777
3133
|
b: ArrayBufferView | ArrayBufferLike,
|
|
2778
3134
|
): boolean;
|
|
2779
3135
|
/* WebCrypto's getRandomValues (also the webcrypto object's): integer
|
|
2780
|
-
* typed arrays, filled in place and returned.
|
|
2781
|
-
* unknown in fallback builds. */
|
|
3136
|
+
* typed arrays, filled in place and returned. */
|
|
2782
3137
|
type RandomValuesArray =
|
|
2783
3138
|
| Int8Array
|
|
2784
3139
|
| Uint8Array
|
|
@@ -2790,9 +3145,9 @@ declare module "crypto" {
|
|
|
2790
3145
|
| BigInt64Array
|
|
2791
3146
|
| BigUint64Array;
|
|
2792
3147
|
export function getRandomValues<T extends RandomValuesArray>(typedArray: T): T;
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
3148
|
+
/* The WebCrypto global's object and its SubtleCrypto. */
|
|
3149
|
+
export const webcrypto: Crypto;
|
|
3150
|
+
export const subtle: SubtleCrypto;
|
|
2796
3151
|
export function randomFillSync<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2797
3152
|
buffer: T,
|
|
2798
3153
|
offset?: number,
|
|
@@ -2844,18 +3199,24 @@ declare module "crypto" {
|
|
|
2844
3199
|
callback: (error: Error | null, buffer: Buffer) => void,
|
|
2845
3200
|
): void;
|
|
2846
3201
|
export type BinaryLike = string | ArrayBuffer | ArrayBufferView;
|
|
2847
|
-
/* Cipheriv/Decipheriv: aes-128/192/256 in cbc, ctr,
|
|
2848
|
-
*
|
|
3202
|
+
/* Cipheriv/Decipheriv: aes-128/192/256 in cbc, ctr, gcm, ccm, ecb, cfb,
|
|
3203
|
+
* cfb8, cfb1, and ofb modes and their key wraps, des-ede3 and des-ede,
|
|
3204
|
+
* chacha20, and chacha20-poly1305. Both are Transforms: written chunks go
|
|
3205
|
+
* through update(), and the end pushes final(). */
|
|
3206
|
+
export type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
|
|
2849
3207
|
export type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
2850
3208
|
export type CipherChaCha20Poly1305Types = "chacha20-poly1305";
|
|
2851
3209
|
export type CipherKey = BinaryLike | KeyObject;
|
|
3210
|
+
export interface CipherCCMOptions {
|
|
3211
|
+
authTagLength: number;
|
|
3212
|
+
}
|
|
2852
3213
|
export interface CipherGCMOptions {
|
|
2853
3214
|
authTagLength?: number;
|
|
2854
3215
|
}
|
|
2855
3216
|
export interface CipherChaCha20Poly1305Options {
|
|
2856
3217
|
authTagLength?: number;
|
|
2857
3218
|
}
|
|
2858
|
-
export interface Cipheriv {
|
|
3219
|
+
export interface Cipheriv extends Transform {
|
|
2859
3220
|
update(data: string | ArrayBufferView): Buffer;
|
|
2860
3221
|
update(data: string, inputEncoding: BufferEncoding): Buffer;
|
|
2861
3222
|
update(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: BufferEncoding): string;
|
|
@@ -2868,6 +3229,10 @@ declare module "crypto" {
|
|
|
2868
3229
|
final(outputEncoding: BufferEncoding): string;
|
|
2869
3230
|
setAutoPadding(autoPadding?: boolean): this;
|
|
2870
3231
|
}
|
|
3232
|
+
export interface CipherCCM extends Cipheriv {
|
|
3233
|
+
setAAD(buffer: ArrayBufferView, options: { plaintextLength: number }): this;
|
|
3234
|
+
getAuthTag(): Buffer;
|
|
3235
|
+
}
|
|
2871
3236
|
export interface CipherGCM extends Cipheriv {
|
|
2872
3237
|
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2873
3238
|
getAuthTag(): Buffer;
|
|
@@ -2876,7 +3241,7 @@ declare module "crypto" {
|
|
|
2876
3241
|
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2877
3242
|
getAuthTag(): Buffer;
|
|
2878
3243
|
}
|
|
2879
|
-
export interface Decipheriv {
|
|
3244
|
+
export interface Decipheriv extends Transform {
|
|
2880
3245
|
update(data: ArrayBufferView): Buffer;
|
|
2881
3246
|
update(data: string, inputEncoding: BufferEncoding): Buffer;
|
|
2882
3247
|
update(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: BufferEncoding): string;
|
|
@@ -2889,6 +3254,10 @@ declare module "crypto" {
|
|
|
2889
3254
|
final(outputEncoding: BufferEncoding): string;
|
|
2890
3255
|
setAutoPadding(autoPadding?: boolean): this;
|
|
2891
3256
|
}
|
|
3257
|
+
export interface DecipherCCM extends Decipheriv {
|
|
3258
|
+
setAuthTag(buffer: ArrayBufferView): this;
|
|
3259
|
+
setAAD(buffer: ArrayBufferView, options: { plaintextLength: number }): this;
|
|
3260
|
+
}
|
|
2892
3261
|
export interface DecipherGCM extends Decipheriv {
|
|
2893
3262
|
setAuthTag(buffer: ArrayBufferView): this;
|
|
2894
3263
|
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
@@ -2897,6 +3266,12 @@ declare module "crypto" {
|
|
|
2897
3266
|
setAuthTag(buffer: ArrayBufferView): this;
|
|
2898
3267
|
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2899
3268
|
}
|
|
3269
|
+
export function createCipheriv(
|
|
3270
|
+
algorithm: CipherCCMTypes,
|
|
3271
|
+
key: CipherKey,
|
|
3272
|
+
iv: BinaryLike,
|
|
3273
|
+
options: CipherCCMOptions,
|
|
3274
|
+
): CipherCCM;
|
|
2900
3275
|
export function createCipheriv(
|
|
2901
3276
|
algorithm: CipherGCMTypes,
|
|
2902
3277
|
key: CipherKey,
|
|
@@ -2915,6 +3290,12 @@ declare module "crypto" {
|
|
|
2915
3290
|
iv: BinaryLike | null,
|
|
2916
3291
|
options?: { authTagLength?: number },
|
|
2917
3292
|
): Cipheriv;
|
|
3293
|
+
export function createDecipheriv(
|
|
3294
|
+
algorithm: CipherCCMTypes,
|
|
3295
|
+
key: CipherKey,
|
|
3296
|
+
iv: BinaryLike,
|
|
3297
|
+
options: CipherCCMOptions,
|
|
3298
|
+
): DecipherCCM;
|
|
2918
3299
|
export function createDecipheriv(
|
|
2919
3300
|
algorithm: CipherGCMTypes,
|
|
2920
3301
|
key: CipherKey,
|
|
@@ -2961,6 +3342,123 @@ declare module "crypto" {
|
|
|
2961
3342
|
setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
|
|
2962
3343
|
}
|
|
2963
3344
|
export function createECDH(curveName: string): ECDH;
|
|
3345
|
+
export class DiffieHellman {
|
|
3346
|
+
private constructor();
|
|
3347
|
+
generateKeys(): Buffer;
|
|
3348
|
+
generateKeys(encoding: BinaryToTextEncoding): string;
|
|
3349
|
+
computeSecret(
|
|
3350
|
+
otherPublicKey: ArrayBufferView,
|
|
3351
|
+
inputEncoding?: null,
|
|
3352
|
+
outputEncoding?: null,
|
|
3353
|
+
): Buffer;
|
|
3354
|
+
computeSecret(
|
|
3355
|
+
otherPublicKey: string,
|
|
3356
|
+
inputEncoding: BinaryToTextEncoding,
|
|
3357
|
+
outputEncoding?: null,
|
|
3358
|
+
): Buffer;
|
|
3359
|
+
computeSecret(
|
|
3360
|
+
otherPublicKey: ArrayBufferView,
|
|
3361
|
+
inputEncoding: null,
|
|
3362
|
+
outputEncoding: BinaryToTextEncoding,
|
|
3363
|
+
): string;
|
|
3364
|
+
computeSecret(
|
|
3365
|
+
otherPublicKey: string,
|
|
3366
|
+
inputEncoding: BinaryToTextEncoding,
|
|
3367
|
+
outputEncoding: BinaryToTextEncoding,
|
|
3368
|
+
): string;
|
|
3369
|
+
getPrime(): Buffer;
|
|
3370
|
+
getPrime(encoding: BinaryToTextEncoding): string;
|
|
3371
|
+
getGenerator(): Buffer;
|
|
3372
|
+
getGenerator(encoding: BinaryToTextEncoding): string;
|
|
3373
|
+
getPublicKey(): Buffer;
|
|
3374
|
+
getPublicKey(encoding: BinaryToTextEncoding): string;
|
|
3375
|
+
getPrivateKey(): Buffer;
|
|
3376
|
+
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
3377
|
+
setPublicKey(publicKey: ArrayBufferView): void;
|
|
3378
|
+
setPublicKey(publicKey: string, encoding: BufferEncoding): void;
|
|
3379
|
+
setPrivateKey(privateKey: ArrayBufferView): void;
|
|
3380
|
+
setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
|
|
3381
|
+
verifyError: number;
|
|
3382
|
+
}
|
|
3383
|
+
export type DiffieHellmanGroup = Omit<DiffieHellman, "setPublicKey" | "setPrivateKey">;
|
|
3384
|
+
export function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
|
|
3385
|
+
export function createDiffieHellman(
|
|
3386
|
+
prime: ArrayBuffer | ArrayBufferView,
|
|
3387
|
+
generator?: number | ArrayBuffer | ArrayBufferView,
|
|
3388
|
+
): DiffieHellman;
|
|
3389
|
+
export function createDiffieHellman(
|
|
3390
|
+
prime: ArrayBuffer | ArrayBufferView,
|
|
3391
|
+
generator: string,
|
|
3392
|
+
generatorEncoding: BinaryToTextEncoding,
|
|
3393
|
+
): DiffieHellman;
|
|
3394
|
+
export function createDiffieHellman(
|
|
3395
|
+
prime: string,
|
|
3396
|
+
primeEncoding: BinaryToTextEncoding,
|
|
3397
|
+
generator?: number | ArrayBuffer | ArrayBufferView,
|
|
3398
|
+
): DiffieHellman;
|
|
3399
|
+
export function createDiffieHellman(
|
|
3400
|
+
prime: string,
|
|
3401
|
+
primeEncoding: BinaryToTextEncoding,
|
|
3402
|
+
generator: string,
|
|
3403
|
+
generatorEncoding: BinaryToTextEncoding,
|
|
3404
|
+
): DiffieHellman;
|
|
3405
|
+
export function getDiffieHellman(groupName: string): DiffieHellmanGroup;
|
|
3406
|
+
export function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
|
|
3407
|
+
export type LargeNumberLike = ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
|
|
3408
|
+
export interface GeneratePrimeOptions {
|
|
3409
|
+
add?: LargeNumberLike | undefined;
|
|
3410
|
+
rem?: LargeNumberLike | undefined;
|
|
3411
|
+
safe?: boolean | undefined;
|
|
3412
|
+
bigint?: boolean | undefined;
|
|
3413
|
+
}
|
|
3414
|
+
export interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
|
|
3415
|
+
bigint: true;
|
|
3416
|
+
}
|
|
3417
|
+
export interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
|
|
3418
|
+
bigint?: false | undefined;
|
|
3419
|
+
}
|
|
3420
|
+
export function generatePrime(
|
|
3421
|
+
size: number,
|
|
3422
|
+
callback: (err: Error | null, prime: ArrayBuffer) => void,
|
|
3423
|
+
): void;
|
|
3424
|
+
export function generatePrime(
|
|
3425
|
+
size: number,
|
|
3426
|
+
options: GeneratePrimeOptionsBigInt,
|
|
3427
|
+
callback: (err: Error | null, prime: bigint) => void,
|
|
3428
|
+
): void;
|
|
3429
|
+
export function generatePrime(
|
|
3430
|
+
size: number,
|
|
3431
|
+
options: GeneratePrimeOptionsArrayBuffer,
|
|
3432
|
+
callback: (err: Error | null, prime: ArrayBuffer) => void,
|
|
3433
|
+
): void;
|
|
3434
|
+
export function generatePrime(
|
|
3435
|
+
size: number,
|
|
3436
|
+
options: GeneratePrimeOptions,
|
|
3437
|
+
callback: (err: Error | null, prime: ArrayBuffer | bigint) => void,
|
|
3438
|
+
): void;
|
|
3439
|
+
export function generatePrimeSync(size: number): ArrayBuffer;
|
|
3440
|
+
export function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
|
|
3441
|
+
export function generatePrimeSync(
|
|
3442
|
+
size: number,
|
|
3443
|
+
options: GeneratePrimeOptionsArrayBuffer,
|
|
3444
|
+
): ArrayBuffer;
|
|
3445
|
+
export function generatePrimeSync(
|
|
3446
|
+
size: number,
|
|
3447
|
+
options: GeneratePrimeOptions,
|
|
3448
|
+
): ArrayBuffer | bigint;
|
|
3449
|
+
export interface CheckPrimeOptions {
|
|
3450
|
+
checks?: number | undefined;
|
|
3451
|
+
}
|
|
3452
|
+
export function checkPrime(
|
|
3453
|
+
value: LargeNumberLike,
|
|
3454
|
+
callback: (err: Error | null, result: boolean) => void,
|
|
3455
|
+
): void;
|
|
3456
|
+
export function checkPrime(
|
|
3457
|
+
value: LargeNumberLike,
|
|
3458
|
+
options: CheckPrimeOptions,
|
|
3459
|
+
callback: (err: Error | null, result: boolean) => void,
|
|
3460
|
+
): void;
|
|
3461
|
+
export function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
|
|
2964
3462
|
export interface ScryptOptions {
|
|
2965
3463
|
N?: number;
|
|
2966
3464
|
r?: number;
|
|
@@ -3022,6 +3520,34 @@ declare module "crypto" {
|
|
|
3022
3520
|
* per member like http2.constants. */
|
|
3023
3521
|
export function getFips(): 1 | 0;
|
|
3024
3522
|
export function getCiphers(): string[];
|
|
3523
|
+
export type CipherMode =
|
|
3524
|
+
| "cbc"
|
|
3525
|
+
| "ccm"
|
|
3526
|
+
| "cfb"
|
|
3527
|
+
| "ctr"
|
|
3528
|
+
| "ecb"
|
|
3529
|
+
| "gcm"
|
|
3530
|
+
| "ocb"
|
|
3531
|
+
| "ofb"
|
|
3532
|
+
| "stream"
|
|
3533
|
+
| "wrap"
|
|
3534
|
+
| "xts";
|
|
3535
|
+
export interface CipherInfoOptions {
|
|
3536
|
+
keyLength?: number | undefined;
|
|
3537
|
+
ivLength?: number | undefined;
|
|
3538
|
+
}
|
|
3539
|
+
export interface CipherInfo {
|
|
3540
|
+
name: string;
|
|
3541
|
+
nid: number;
|
|
3542
|
+
blockSize?: number | undefined;
|
|
3543
|
+
ivLength?: number | undefined;
|
|
3544
|
+
keyLength: number;
|
|
3545
|
+
mode: CipherMode;
|
|
3546
|
+
}
|
|
3547
|
+
export function getCipherInfo(
|
|
3548
|
+
nameOrNid: string | number,
|
|
3549
|
+
options?: CipherInfoOptions,
|
|
3550
|
+
): CipherInfo | undefined;
|
|
3025
3551
|
export function getHashes(): string[];
|
|
3026
3552
|
export function getCurves(): string[];
|
|
3027
3553
|
/* Node v24 crypto.constants, literal-typed (the Http2Constants
|
|
@@ -3122,7 +3648,8 @@ declare module "child_process" {
|
|
|
3122
3648
|
* killSignal at the deadline and the result carries error: ETIMEDOUT +
|
|
3123
3649
|
* the signal, never a throw), killSignal (a signal NAME literal),
|
|
3124
3650
|
* stdio ("ignore"/"inherit"/"pipe" or a 3-tuple of those — captures
|
|
3125
|
-
* read "" for non-piped streams),
|
|
3651
|
+
* read "" for non-piped streams), env (replaces the child's
|
|
3652
|
+
* environment), and windowsHide (a POSIX no-op). */
|
|
3126
3653
|
export function spawnSync(
|
|
3127
3654
|
command: string,
|
|
3128
3655
|
args?: string[],
|
|
@@ -3131,6 +3658,7 @@ declare module "child_process" {
|
|
|
3131
3658
|
timeout?: number;
|
|
3132
3659
|
killSignal?: string;
|
|
3133
3660
|
stdio?: "pipe" | "ignore" | "inherit" | ("pipe" | "ignore" | "inherit")[];
|
|
3661
|
+
env?: { [k: string]: string | undefined };
|
|
3134
3662
|
windowsHide?: boolean;
|
|
3135
3663
|
},
|
|
3136
3664
|
): SpawnSyncReturns;
|
|
@@ -3164,20 +3692,20 @@ declare module "child_process" {
|
|
|
3164
3692
|
|
|
3165
3693
|
export interface ChildProcess extends Disposable {
|
|
3166
3694
|
ref(): void;
|
|
3167
|
-
on(event: "spawn", listener: () => void):
|
|
3168
|
-
once(event: "spawn", listener: () => void):
|
|
3695
|
+
on(event: "spawn", listener: () => void): this;
|
|
3696
|
+
once(event: "spawn", listener: () => void): this;
|
|
3169
3697
|
/* The exit listener may also take Node's second parameter — the
|
|
3170
3698
|
* terminating signal's name, null for a normal exit. */
|
|
3171
|
-
on(event: "exit", listener: (code: number | null, signal: string | null) => void):
|
|
3172
|
-
on(event: "close", listener: (code: number | null, signal: string | null) => void):
|
|
3173
|
-
on(event: "error", listener: (err: Error) => void):
|
|
3174
|
-
once(event: "exit", listener: (code: number | null, signal: string | null) => void):
|
|
3175
|
-
once(event: "close", listener: (code: number | null, signal: string | null) => void):
|
|
3176
|
-
once(event: "error", listener: (err: Error) => void):
|
|
3177
|
-
on(event: "message", listener: (message: any) => void):
|
|
3178
|
-
on(event: "disconnect", listener: () => void):
|
|
3179
|
-
once(event: "message", listener: (message: any) => void):
|
|
3180
|
-
once(event: "disconnect", listener: () => void):
|
|
3699
|
+
on(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
|
|
3700
|
+
on(event: "close", listener: (code: number | null, signal: string | null) => void): this;
|
|
3701
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
3702
|
+
once(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
|
|
3703
|
+
once(event: "close", listener: (code: number | null, signal: string | null) => void): this;
|
|
3704
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
3705
|
+
on(event: "message", listener: (message: any) => void): this;
|
|
3706
|
+
on(event: "disconnect", listener: () => void): this;
|
|
3707
|
+
once(event: "message", listener: (message: any) => void): this;
|
|
3708
|
+
once(event: "disconnect", listener: () => void): this;
|
|
3181
3709
|
/* The lifecycle members, Node's exact shapes: pid is undefined exactly
|
|
3182
3710
|
* when the spawn failed; exitCode is null while running, the code
|
|
3183
3711
|
* after a normal exit, null for a signal death, and -errno once a
|
|
@@ -3390,9 +3918,8 @@ declare module "util" {
|
|
|
3390
3918
|
export type TextDecoder = globalThis.TextDecoder;
|
|
3391
3919
|
export var TextEncoder: typeof globalThis.TextEncoder;
|
|
3392
3920
|
export var TextDecoder: typeof globalThis.TextDecoder;
|
|
3393
|
-
/* stream.pipeline's
|
|
3394
|
-
* every other target
|
|
3395
|
-
* other target is assignable to it. */
|
|
3921
|
+
/* stream.pipeline's overload comes first: its __promisify__ member keeps
|
|
3922
|
+
* every other target out of it. */
|
|
3396
3923
|
export function promisify(
|
|
3397
3924
|
fn: typeof import("node:stream").pipeline,
|
|
3398
3925
|
): typeof import("node:stream/promises").pipeline;
|
|
@@ -4771,8 +5298,8 @@ declare module "net" {
|
|
|
4771
5298
|
* unshift — read answers exactly n buffered bytes or null. */
|
|
4772
5299
|
read(size?: number): Buffer | null;
|
|
4773
5300
|
unshift(chunk: Uint8Array): void;
|
|
4774
|
-
/* secureConnect/session are TLS-socket events declared on the
|
|
4775
|
-
* socket surface (the lowering collapses TLSSocket onto this kind):
|
|
5301
|
+
/* secureConnect/secure/session are TLS-socket events declared on the
|
|
5302
|
+
* shared socket surface (the lowering collapses TLSSocket onto this kind):
|
|
4776
5303
|
* the runtime gates on the transport, so a plain socket's
|
|
4777
5304
|
* registration never fires — Node's exact split. 'session' fires
|
|
4778
5305
|
* once with the serialized session (the received-ticket event). */
|
|
@@ -4780,7 +5307,15 @@ declare module "net" {
|
|
|
4780
5307
|
/* After setEncoding the chunk is a string. */
|
|
4781
5308
|
on(event: "data", listener: (chunk: string) => void): void;
|
|
4782
5309
|
on(
|
|
4783
|
-
event:
|
|
5310
|
+
event:
|
|
5311
|
+
| "end"
|
|
5312
|
+
| "connect"
|
|
5313
|
+
| "ready"
|
|
5314
|
+
| "timeout"
|
|
5315
|
+
| "readable"
|
|
5316
|
+
| "finish"
|
|
5317
|
+
| "secureConnect"
|
|
5318
|
+
| "secure",
|
|
4784
5319
|
listener: () => void,
|
|
4785
5320
|
): void;
|
|
4786
5321
|
on(event: "close", listener: (hadError: boolean) => void): void;
|
|
@@ -4796,7 +5331,15 @@ declare module "net" {
|
|
|
4796
5331
|
/* After setEncoding the chunk is a string. */
|
|
4797
5332
|
addListener(event: "data", listener: (chunk: string) => void): void;
|
|
4798
5333
|
addListener(
|
|
4799
|
-
event:
|
|
5334
|
+
event:
|
|
5335
|
+
| "end"
|
|
5336
|
+
| "connect"
|
|
5337
|
+
| "ready"
|
|
5338
|
+
| "timeout"
|
|
5339
|
+
| "readable"
|
|
5340
|
+
| "finish"
|
|
5341
|
+
| "secureConnect"
|
|
5342
|
+
| "secure",
|
|
4800
5343
|
listener: () => void,
|
|
4801
5344
|
): void;
|
|
4802
5345
|
addListener(event: "close", listener: (hadError: boolean) => void): void;
|
|
@@ -4811,7 +5354,15 @@ declare module "net" {
|
|
|
4811
5354
|
/* After setEncoding the chunk is a string. */
|
|
4812
5355
|
once(event: "data", listener: (chunk: string) => void): void;
|
|
4813
5356
|
once(
|
|
4814
|
-
event:
|
|
5357
|
+
event:
|
|
5358
|
+
| "end"
|
|
5359
|
+
| "connect"
|
|
5360
|
+
| "ready"
|
|
5361
|
+
| "timeout"
|
|
5362
|
+
| "readable"
|
|
5363
|
+
| "finish"
|
|
5364
|
+
| "secureConnect"
|
|
5365
|
+
| "secure",
|
|
4815
5366
|
listener: () => void,
|
|
4816
5367
|
): void;
|
|
4817
5368
|
once(event: "close", listener: (hadError: boolean) => void): void;
|
|
@@ -4862,9 +5413,10 @@ declare module "net" {
|
|
|
4862
5413
|
on(event: "timeout", listener: (socket: Socket) => void): void;
|
|
4863
5414
|
on(event: "error", listener: (err: Error) => void): void;
|
|
4864
5415
|
/* The WebSocket handover: fires INSTEAD of 'request' for
|
|
4865
|
-
* Connection: upgrade requests, with the raw socket + head bytes
|
|
5416
|
+
* Connection: upgrade requests, with the raw socket + head bytes;
|
|
5417
|
+
* 'connect' is its twin for CONNECT requests (HTTP tunneling). */
|
|
4866
5418
|
on(
|
|
4867
|
-
event: "upgrade",
|
|
5419
|
+
event: "upgrade" | "connect",
|
|
4868
5420
|
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
4869
5421
|
): void;
|
|
4870
5422
|
/* http.createServer(handler)'s event twin (a no-parser net server
|
|
@@ -4880,7 +5432,7 @@ declare module "net" {
|
|
|
4880
5432
|
addListener(event: "timeout", listener: (socket: Socket) => void): void;
|
|
4881
5433
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
4882
5434
|
addListener(
|
|
4883
|
-
event: "upgrade",
|
|
5435
|
+
event: "upgrade" | "connect",
|
|
4884
5436
|
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
4885
5437
|
): void;
|
|
4886
5438
|
addListener(
|
|
@@ -4893,7 +5445,7 @@ declare module "net" {
|
|
|
4893
5445
|
once(event: "timeout", listener: (socket: Socket) => void): void;
|
|
4894
5446
|
once(event: "error", listener: (err: Error) => void): void;
|
|
4895
5447
|
once(
|
|
4896
|
-
event: "upgrade",
|
|
5448
|
+
event: "upgrade" | "connect",
|
|
4897
5449
|
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
4898
5450
|
): void;
|
|
4899
5451
|
once(
|
|
@@ -5089,6 +5641,7 @@ declare module "http" {
|
|
|
5089
5641
|
readonly trailersDistinct: { [name: string]: string[] | undefined };
|
|
5090
5642
|
readonly rawTrailers: string[];
|
|
5091
5643
|
resume(): void;
|
|
5644
|
+
pause(): void;
|
|
5092
5645
|
destroy(): void;
|
|
5093
5646
|
setTimeout(msecs: number, callback?: () => void): this;
|
|
5094
5647
|
/* setEncoding('utf8'): 'data' delivers strings (other real encodings
|
|
@@ -5364,6 +5917,7 @@ declare module "tls" {
|
|
|
5364
5917
|
* split — authorizationError is the verify-failure CODE STRING
|
|
5365
5918
|
* (DEPTH_ZERO_SELF_SIGNED_CERT, ...), or null. */
|
|
5366
5919
|
export interface TLSSocket extends Socket {
|
|
5920
|
+
readonly encrypted: true;
|
|
5367
5921
|
authorized: boolean;
|
|
5368
5922
|
authorizationError: string | null;
|
|
5369
5923
|
/* null before the handshake, then the negotiated protocol or false */
|
|
@@ -5375,6 +5929,21 @@ declare module "tls" {
|
|
|
5375
5929
|
/* whether the handshake resumed a cached session */
|
|
5376
5930
|
isSessionReused(): boolean;
|
|
5377
5931
|
}
|
|
5932
|
+
/** new tls.TLSSocket(socket, options): the server-mode wrap of an open
|
|
5933
|
+
* socket (a server connection or an http CONNECT socket). The options
|
|
5934
|
+
* record reads at runtime; isServer, cert, key, secureContext,
|
|
5935
|
+
* ALPNProtocols, minVersion and maxVersion are implemented. */
|
|
5936
|
+
export interface TLSSocketOptions {
|
|
5937
|
+
isServer?: boolean;
|
|
5938
|
+
cert?: string | Uint8Array;
|
|
5939
|
+
key?: string | Uint8Array;
|
|
5940
|
+
secureContext?: SecureContext;
|
|
5941
|
+
ALPNProtocols?: string[] | Uint8Array;
|
|
5942
|
+
minVersion?: string;
|
|
5943
|
+
maxVersion?: string;
|
|
5944
|
+
[option: string]: unknown;
|
|
5945
|
+
}
|
|
5946
|
+
export const TLSSocket: new (socket: Socket, options: TLSSocketOptions) => TLSSocket;
|
|
5378
5947
|
export interface CipherNameAndProtocol {
|
|
5379
5948
|
name: string;
|
|
5380
5949
|
standardName: string;
|
|
@@ -5383,12 +5952,14 @@ declare module "tls" {
|
|
|
5383
5952
|
export const DEFAULT_MIN_VERSION: string;
|
|
5384
5953
|
export const DEFAULT_MAX_VERSION: string;
|
|
5385
5954
|
/** tls.connect options — the RUNTIME options record (members read at
|
|
5386
|
-
* runtime; port/host/rejectUnauthorized/ca/servername are the
|
|
5955
|
+
* runtime; port/host/socket/rejectUnauthorized/ca/servername are the
|
|
5387
5956
|
* honestly-implemented set, every other documented member throws the
|
|
5388
5957
|
* runtime fence — the options-record stance's divergence-66 shape). */
|
|
5389
5958
|
export interface ConnectionOptions {
|
|
5390
5959
|
port?: number;
|
|
5391
5960
|
host?: string;
|
|
5961
|
+
/* an open socket to run the client handshake over */
|
|
5962
|
+
socket?: Socket;
|
|
5392
5963
|
rejectUnauthorized?: boolean;
|
|
5393
5964
|
ca?: string | Uint8Array | ReadonlyArray<string | Uint8Array>;
|
|
5394
5965
|
servername?: string;
|
|
@@ -5496,6 +6067,7 @@ declare module "http2" {
|
|
|
5496
6067
|
export interface Http2Stream {
|
|
5497
6068
|
on(event: "error" | "close", listener: (err: Error) => void): void;
|
|
5498
6069
|
once(event: "error" | "close", listener: (err: Error) => void): void;
|
|
6070
|
+
addListener(event: "error" | "close", listener: (err: Error) => void): void;
|
|
5499
6071
|
destroy(): void;
|
|
5500
6072
|
}
|
|
5501
6073
|
export interface Http2ServerRequest {
|
|
@@ -5596,11 +6168,6 @@ declare module "http2" {
|
|
|
5596
6168
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
5597
6169
|
): void;
|
|
5598
6170
|
on(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
5599
|
-
once(
|
|
5600
|
-
event: "stream",
|
|
5601
|
-
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
5602
|
-
): void;
|
|
5603
|
-
once(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
5604
6171
|
/* HTTP CONNECT (and, in Node, the h2 extended CONNECT — which the
|
|
5605
6172
|
* allowHTTP1 lowering never sees): the second argument is the raw
|
|
5606
6173
|
* socket on HTTP/1.1 connections; narrow with instanceof. */
|
|
@@ -5618,6 +6185,42 @@ declare module "http2" {
|
|
|
5618
6185
|
): void;
|
|
5619
6186
|
once(event: "error", listener: (err: Error) => void): void;
|
|
5620
6187
|
once(event: "close", listener: () => void): void;
|
|
6188
|
+
once(event: "sessionError", listener: (err: Error, session: ServerHttp2Session) => void): void;
|
|
6189
|
+
once(
|
|
6190
|
+
event: "stream",
|
|
6191
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
6192
|
+
): void;
|
|
6193
|
+
once(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
6194
|
+
once(
|
|
6195
|
+
event: "connect",
|
|
6196
|
+
listener: (
|
|
6197
|
+
req: Http2ServerRequest | import("http").IncomingMessage,
|
|
6198
|
+
resOrSocket: Http2ServerResponse | Socket,
|
|
6199
|
+
) => void,
|
|
6200
|
+
): void;
|
|
6201
|
+
addListener(event: "connection", listener: (socket: Socket) => void): void;
|
|
6202
|
+
addListener(
|
|
6203
|
+
event: "request",
|
|
6204
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
6205
|
+
): void;
|
|
6206
|
+
addListener(event: "error", listener: (err: Error) => void): void;
|
|
6207
|
+
addListener(event: "close", listener: () => void): void;
|
|
6208
|
+
addListener(
|
|
6209
|
+
event: "sessionError",
|
|
6210
|
+
listener: (err: Error, session: ServerHttp2Session) => void,
|
|
6211
|
+
): void;
|
|
6212
|
+
addListener(
|
|
6213
|
+
event: "stream",
|
|
6214
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
6215
|
+
): void;
|
|
6216
|
+
addListener(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
6217
|
+
addListener(
|
|
6218
|
+
event: "connect",
|
|
6219
|
+
listener: (
|
|
6220
|
+
req: Http2ServerRequest | import("http").IncomingMessage,
|
|
6221
|
+
resOrSocket: Http2ServerResponse | Socket,
|
|
6222
|
+
) => void,
|
|
6223
|
+
): void;
|
|
5621
6224
|
}
|
|
5622
6225
|
export interface SecureServerOptions {
|
|
5623
6226
|
allowHTTP1?: boolean;
|
|
@@ -5959,6 +6562,28 @@ declare module "http2" {
|
|
|
5959
6562
|
listener: (errorCode: number, lastStreamID: number, opaqueData?: Uint8Array) => void,
|
|
5960
6563
|
): void;
|
|
5961
6564
|
once(event: "localSettings" | "remoteSettings", listener: (settings: any) => void): void;
|
|
6565
|
+
once(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
6566
|
+
once(event: "ping", listener: (payload: Uint8Array) => void): void;
|
|
6567
|
+
addListener(event: "close" | "timeout", listener: () => void): void;
|
|
6568
|
+
addListener(event: "error", listener: (err: Error) => void): void;
|
|
6569
|
+
addListener(
|
|
6570
|
+
event: "connect",
|
|
6571
|
+
listener: (session: Http2Session, socket: import("net").Socket) => void,
|
|
6572
|
+
): void;
|
|
6573
|
+
addListener(
|
|
6574
|
+
event: "stream",
|
|
6575
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
6576
|
+
): void;
|
|
6577
|
+
addListener(
|
|
6578
|
+
event: "goaway",
|
|
6579
|
+
listener: (errorCode: number, lastStreamID: number, opaqueData?: Uint8Array) => void,
|
|
6580
|
+
): void;
|
|
6581
|
+
addListener(event: "localSettings" | "remoteSettings", listener: (settings: any) => void): void;
|
|
6582
|
+
addListener(
|
|
6583
|
+
event: "frameError",
|
|
6584
|
+
listener: (type: number, code: number, id: number) => void,
|
|
6585
|
+
): void;
|
|
6586
|
+
addListener(event: "ping", listener: (payload: Uint8Array) => void): void;
|
|
5962
6587
|
}
|
|
5963
6588
|
|
|
5964
6589
|
export interface ClientHttp2Session extends Http2Session {
|
|
@@ -6036,7 +6661,30 @@ declare module "http2" {
|
|
|
6036
6661
|
listener: () => void,
|
|
6037
6662
|
): void;
|
|
6038
6663
|
once(event: "error", listener: (err: Error) => void): void;
|
|
6664
|
+
once(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
6039
6665
|
once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6666
|
+
addListener(event: "data", listener: (chunk: any) => void): void;
|
|
6667
|
+
addListener(
|
|
6668
|
+
event:
|
|
6669
|
+
| "end"
|
|
6670
|
+
| "close"
|
|
6671
|
+
| "aborted"
|
|
6672
|
+
| "ready"
|
|
6673
|
+
| "timeout"
|
|
6674
|
+
| "drain"
|
|
6675
|
+
| "finish"
|
|
6676
|
+
| "wantTrailers",
|
|
6677
|
+
listener: () => void,
|
|
6678
|
+
): void;
|
|
6679
|
+
addListener(event: "error", listener: (err: Error) => void): void;
|
|
6680
|
+
addListener(
|
|
6681
|
+
event: "frameError",
|
|
6682
|
+
listener: (type: number, code: number, id: number) => void,
|
|
6683
|
+
): void;
|
|
6684
|
+
addListener(
|
|
6685
|
+
event: "trailers",
|
|
6686
|
+
listener: (trailers: IncomingHttpHeaders, flags: number) => void,
|
|
6687
|
+
): void;
|
|
6040
6688
|
respond(
|
|
6041
6689
|
headers?: OutgoingHttpHeaders,
|
|
6042
6690
|
options?: { endStream?: boolean; waitForTrailers?: boolean },
|
|
@@ -6086,6 +6734,7 @@ declare module "http2" {
|
|
|
6086
6734
|
on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6087
6735
|
once(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6088
6736
|
once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6737
|
+
once(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6089
6738
|
once(event: "data", listener: (chunk: any) => void): void;
|
|
6090
6739
|
once(
|
|
6091
6740
|
event:
|
|
@@ -6100,6 +6749,42 @@ declare module "http2" {
|
|
|
6100
6749
|
listener: () => void,
|
|
6101
6750
|
): void;
|
|
6102
6751
|
once(event: "error", listener: (err: Error) => void): void;
|
|
6752
|
+
once(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
6753
|
+
once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
6754
|
+
addListener(
|
|
6755
|
+
event: "response",
|
|
6756
|
+
listener: (headers: IncomingHttpHeaders, flags: number) => void,
|
|
6757
|
+
): void;
|
|
6758
|
+
addListener(
|
|
6759
|
+
event: "push",
|
|
6760
|
+
listener: (headers: IncomingHttpHeaders, flags: number) => void,
|
|
6761
|
+
): void;
|
|
6762
|
+
addListener(
|
|
6763
|
+
event: "headers",
|
|
6764
|
+
listener: (headers: IncomingHttpHeaders, flags: number) => void,
|
|
6765
|
+
): void;
|
|
6766
|
+
addListener(event: "data", listener: (chunk: any) => void): void;
|
|
6767
|
+
addListener(
|
|
6768
|
+
event:
|
|
6769
|
+
| "end"
|
|
6770
|
+
| "close"
|
|
6771
|
+
| "aborted"
|
|
6772
|
+
| "ready"
|
|
6773
|
+
| "timeout"
|
|
6774
|
+
| "drain"
|
|
6775
|
+
| "finish"
|
|
6776
|
+
| "wantTrailers",
|
|
6777
|
+
listener: () => void,
|
|
6778
|
+
): void;
|
|
6779
|
+
addListener(event: "error", listener: (err: Error) => void): void;
|
|
6780
|
+
addListener(
|
|
6781
|
+
event: "frameError",
|
|
6782
|
+
listener: (type: number, code: number, id: number) => void,
|
|
6783
|
+
): void;
|
|
6784
|
+
addListener(
|
|
6785
|
+
event: "trailers",
|
|
6786
|
+
listener: (trailers: IncomingHttpHeaders, flags: number) => void,
|
|
6787
|
+
): void;
|
|
6103
6788
|
}
|
|
6104
6789
|
|
|
6105
6790
|
export interface Http2Server {
|
|
@@ -6134,6 +6819,24 @@ declare module "http2" {
|
|
|
6134
6819
|
): void;
|
|
6135
6820
|
once(event: "error", listener: (err: Error) => void): void;
|
|
6136
6821
|
once(event: "close" | "listening" | "timeout", listener: () => void): void;
|
|
6822
|
+
once(event: "connection", listener: (socket: import("net").Socket) => void): void;
|
|
6823
|
+
once(event: "sessionError", listener: (err: Error, session: ServerHttp2Session) => void): void;
|
|
6824
|
+
addListener(
|
|
6825
|
+
event: "stream",
|
|
6826
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
6827
|
+
): void;
|
|
6828
|
+
addListener(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
6829
|
+
addListener(
|
|
6830
|
+
event: "request",
|
|
6831
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
6832
|
+
): void;
|
|
6833
|
+
addListener(event: "error", listener: (err: Error) => void): void;
|
|
6834
|
+
addListener(event: "close" | "listening" | "timeout", listener: () => void): void;
|
|
6835
|
+
addListener(event: "connection", listener: (socket: import("net").Socket) => void): void;
|
|
6836
|
+
addListener(
|
|
6837
|
+
event: "sessionError",
|
|
6838
|
+
listener: (err: Error, session: ServerHttp2Session) => void,
|
|
6839
|
+
): void;
|
|
6137
6840
|
}
|
|
6138
6841
|
|
|
6139
6842
|
export interface ServerOptions {
|
|
@@ -6623,11 +7326,10 @@ declare module "node:events" {
|
|
|
6623
7326
|
* write(chunk, enc, cb) {} })`, Duplex/Transform/PassThrough, push/read,
|
|
6624
7327
|
* flowing vs paused, write/end backpressure + 'drain', pipe/unpipe, and
|
|
6625
7328
|
* destroy — with Node's event orderings. Chunks are BYTES (Buffer), with
|
|
6626
|
-
*
|
|
6627
|
-
*
|
|
6628
|
-
*
|
|
6629
|
-
*
|
|
6630
|
-
* events carry per-class FORCED argument tuples ('data' is one Buffer,
|
|
7329
|
+
* strings converted at push/write like Node, and any value on an
|
|
7330
|
+
* object-mode side (objectMode, readableObjectMode, writableObjectMode —
|
|
7331
|
+
* the object-mode constructor overloads come first). The runtime-fired
|
|
7332
|
+
* events carry per-class FORCED argument tuples ('data' is one chunk,
|
|
6631
7333
|
* 'error' one Error, 'pipe'/'unpipe' one Readable, the rest empty) — the
|
|
6632
7334
|
* overloads below hand tsc the same contract so unannotated listener
|
|
6633
7335
|
* parameters contextually type in .js sources. */
|
|
@@ -6658,7 +7360,11 @@ declare module "stream" {
|
|
|
6658
7360
|
encoding: string,
|
|
6659
7361
|
callback: (error?: Error | null) => void,
|
|
6660
7362
|
): void;
|
|
6661
|
-
writev?(
|
|
7363
|
+
writev?(
|
|
7364
|
+
this: Writable,
|
|
7365
|
+
chunks: Array<{ chunk: any; encoding: string }>,
|
|
7366
|
+
callback: (error?: Error | null) => void,
|
|
7367
|
+
): void;
|
|
6662
7368
|
final?(this: Writable, callback: (error?: Error | null) => void): void;
|
|
6663
7369
|
destroy?(this: Writable, error: Error | null, callback: (error?: Error | null) => void): void;
|
|
6664
7370
|
construct?(this: Writable, callback: (error?: Error | null) => void): void;
|
|
@@ -6693,7 +7399,11 @@ declare module "stream" {
|
|
|
6693
7399
|
readable?: boolean;
|
|
6694
7400
|
writable?: boolean;
|
|
6695
7401
|
defaultEncoding?: string;
|
|
6696
|
-
writev?(
|
|
7402
|
+
writev?(
|
|
7403
|
+
this: Duplex,
|
|
7404
|
+
chunks: Array<{ chunk: any; encoding: string }>,
|
|
7405
|
+
callback: (error?: Error | null) => void,
|
|
7406
|
+
): void;
|
|
6697
7407
|
signal?: AbortSignal;
|
|
6698
7408
|
}
|
|
6699
7409
|
interface TransformOptions {
|
|
@@ -6733,6 +7443,81 @@ declare module "stream" {
|
|
|
6733
7443
|
signal?: AbortSignal;
|
|
6734
7444
|
}
|
|
6735
7445
|
|
|
7446
|
+
/* Object-mode options (objectMode: true, or a Duplex's or Transform's
|
|
7447
|
+
* readableObjectMode / writableObjectMode): chunks and completion data
|
|
7448
|
+
* are any values, and an object-mode write's encoding argument reaches
|
|
7449
|
+
* write/transform as passed (undefined when absent, null when a
|
|
7450
|
+
* callback took its place). The constructors take these before the
|
|
7451
|
+
* byte-mode options, so a byte-mode stream's callbacks keep Buffer
|
|
7452
|
+
* chunks. */
|
|
7453
|
+
type ObjectModeEncoding = string | null | undefined;
|
|
7454
|
+
type ObjectModeFlag =
|
|
7455
|
+
| { objectMode: true }
|
|
7456
|
+
| { readableObjectMode: true }
|
|
7457
|
+
| { writableObjectMode: true };
|
|
7458
|
+
interface ObjectWritableOptions extends Omit<WritableOptions, "objectMode" | "write"> {
|
|
7459
|
+
objectMode: true;
|
|
7460
|
+
write?(
|
|
7461
|
+
this: Writable,
|
|
7462
|
+
chunk: any,
|
|
7463
|
+
encoding: ObjectModeEncoding,
|
|
7464
|
+
callback: (error?: Error | null) => void,
|
|
7465
|
+
): void;
|
|
7466
|
+
}
|
|
7467
|
+
type ObjectDuplexOptions = Omit<DuplexOptions, "write"> & {
|
|
7468
|
+
write?(
|
|
7469
|
+
this: Duplex,
|
|
7470
|
+
chunk: any,
|
|
7471
|
+
encoding: ObjectModeEncoding,
|
|
7472
|
+
callback: (error?: Error | null) => void,
|
|
7473
|
+
): void;
|
|
7474
|
+
} & ObjectModeFlag;
|
|
7475
|
+
type ObjectTransformOptions = Omit<TransformOptions, "transform" | "flush" | "write"> & {
|
|
7476
|
+
transform?(
|
|
7477
|
+
this: Transform,
|
|
7478
|
+
chunk: any,
|
|
7479
|
+
encoding: ObjectModeEncoding,
|
|
7480
|
+
callback: (error?: Error | null, data?: any) => void,
|
|
7481
|
+
): void;
|
|
7482
|
+
flush?(this: Transform, callback: (error?: Error | null, data?: any) => void): void;
|
|
7483
|
+
write?(
|
|
7484
|
+
this: Transform,
|
|
7485
|
+
chunk: any,
|
|
7486
|
+
encoding: ObjectModeEncoding,
|
|
7487
|
+
callback: (error?: Error | null) => void,
|
|
7488
|
+
): void;
|
|
7489
|
+
} & ObjectModeFlag;
|
|
7490
|
+
|
|
7491
|
+
/* decodeStrings: false — a string write reaches write/transform as the
|
|
7492
|
+
* string with its encoding (Buffers keep 'buffer'). */
|
|
7493
|
+
interface StringWritableOptions extends Omit<WritableOptions, "decodeStrings" | "write"> {
|
|
7494
|
+
decodeStrings: false;
|
|
7495
|
+
write?(
|
|
7496
|
+
this: Writable,
|
|
7497
|
+
chunk: string | Buffer,
|
|
7498
|
+
encoding: string,
|
|
7499
|
+
callback: (error?: Error | null) => void,
|
|
7500
|
+
): void;
|
|
7501
|
+
}
|
|
7502
|
+
type StringDuplexOptions = Omit<DuplexOptions, "decodeStrings" | "write"> & {
|
|
7503
|
+
decodeStrings: false;
|
|
7504
|
+
write?(
|
|
7505
|
+
this: Duplex,
|
|
7506
|
+
chunk: string | Buffer,
|
|
7507
|
+
encoding: string,
|
|
7508
|
+
callback: (error?: Error | null) => void,
|
|
7509
|
+
): void;
|
|
7510
|
+
};
|
|
7511
|
+
type StringTransformOptions = Omit<TransformOptions, "decodeStrings" | "transform"> & {
|
|
7512
|
+
decodeStrings: false;
|
|
7513
|
+
transform?(
|
|
7514
|
+
this: Transform,
|
|
7515
|
+
chunk: string | Buffer,
|
|
7516
|
+
encoding: string,
|
|
7517
|
+
callback: (error?: Error | null, data?: Buffer | string) => void,
|
|
7518
|
+
): void;
|
|
7519
|
+
};
|
|
7520
|
+
|
|
6736
7521
|
/* The operators' options: concurrency and highWaterMark bound map's
|
|
6737
7522
|
* in-flight callbacks and queued results. */
|
|
6738
7523
|
interface ArrayOptions {
|
|
@@ -6751,9 +7536,16 @@ declare module "stream" {
|
|
|
6751
7536
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
6752
7537
|
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
6753
7538
|
iterator(options?: { destroyOnReturn?: boolean }): AsyncIterableIterator<any>;
|
|
7539
|
+
/* compose(this, stage), destroyed when options.signal aborts. */
|
|
7540
|
+
compose(stage: ComposeStage, options?: { signal: AbortSignal }): Duplex;
|
|
6754
7541
|
push(chunk: Buffer | string | null, encoding?: string): boolean;
|
|
7542
|
+
/* An object-mode stream's values. */
|
|
7543
|
+
push(chunk: any, encoding?: string): boolean;
|
|
6755
7544
|
unshift(chunk: Buffer | string, encoding?: string): void;
|
|
6756
|
-
|
|
7545
|
+
unshift(chunk: any, encoding?: string): void;
|
|
7546
|
+
/* A Buffer, a string once encoded, an object-mode value, or null (as
|
|
7547
|
+
* @types/node types it). */
|
|
7548
|
+
read(size?: number): any;
|
|
6757
7549
|
pause(): this;
|
|
6758
7550
|
resume(): this;
|
|
6759
7551
|
isPaused(): boolean;
|
|
@@ -6771,6 +7563,16 @@ declare module "stream" {
|
|
|
6771
7563
|
readonly destroyed: boolean;
|
|
6772
7564
|
readonly errored: Error | null;
|
|
6773
7565
|
static from(iterable: unknown, options?: ReadableOptions): Readable;
|
|
7566
|
+
/* A Readable over a web ReadableStream's reader. */
|
|
7567
|
+
static fromWeb(
|
|
7568
|
+
readableStream: globalThis.ReadableStream,
|
|
7569
|
+
options?: {
|
|
7570
|
+
encoding?: string;
|
|
7571
|
+
highWaterMark?: number;
|
|
7572
|
+
objectMode?: boolean;
|
|
7573
|
+
signal?: AbortSignal;
|
|
7574
|
+
},
|
|
7575
|
+
): Readable;
|
|
6774
7576
|
/* The Readable operators: chunks are strings or Buffers, map and
|
|
6775
7577
|
* flatMap callbacks return strings or Buffers (flatMap: arrays of
|
|
6776
7578
|
* them, or strings), and callbacks that declare the options argument
|
|
@@ -6859,6 +7661,8 @@ declare module "stream" {
|
|
|
6859
7661
|
}
|
|
6860
7662
|
|
|
6861
7663
|
class Writable extends EventEmitter {
|
|
7664
|
+
constructor(opts: ObjectWritableOptions);
|
|
7665
|
+
constructor(opts: StringWritableOptions);
|
|
6862
7666
|
constructor(opts?: WritableOptions);
|
|
6863
7667
|
/* The underscore-method surface (see Readable). */
|
|
6864
7668
|
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
|
@@ -6874,9 +7678,19 @@ declare module "stream" {
|
|
|
6874
7678
|
encoding: string,
|
|
6875
7679
|
callback?: (error?: Error | null) => void,
|
|
6876
7680
|
): boolean;
|
|
7681
|
+
/* An object-mode stream's values (the encoding argument reaches
|
|
7682
|
+
* _write as passed). */
|
|
7683
|
+
write(chunk: any, callback?: (error?: Error | null) => void): boolean;
|
|
7684
|
+
write(
|
|
7685
|
+
chunk: any,
|
|
7686
|
+
encoding: ObjectModeEncoding,
|
|
7687
|
+
callback?: (error?: Error | null) => void,
|
|
7688
|
+
): boolean;
|
|
6877
7689
|
end(callback?: () => void): this;
|
|
6878
7690
|
end(chunk: Buffer | string, callback?: () => void): this;
|
|
6879
7691
|
end(chunk: Buffer | string, encoding: string, callback?: () => void): this;
|
|
7692
|
+
end(chunk: any, callback?: () => void): this;
|
|
7693
|
+
end(chunk: any, encoding: ObjectModeEncoding, callback?: () => void): this;
|
|
6880
7694
|
cork(): void;
|
|
6881
7695
|
uncork(): void;
|
|
6882
7696
|
setDefaultEncoding(encoding: string): this;
|
|
@@ -6926,6 +7740,11 @@ declare module "stream" {
|
|
|
6926
7740
|
* mirrors @types/node: extends Readable, the writable half declared
|
|
6927
7741
|
* again. The lowering treats both halves as first-class. */
|
|
6928
7742
|
class Duplex extends Readable {
|
|
7743
|
+
/* Duplex.from: an async generator function, an iterable, a string or
|
|
7744
|
+
* a stream (duplexify.js). */
|
|
7745
|
+
static from(body: unknown): Duplex;
|
|
7746
|
+
constructor(opts: ObjectDuplexOptions);
|
|
7747
|
+
constructor(opts: StringDuplexOptions);
|
|
6929
7748
|
constructor(opts?: DuplexOptions);
|
|
6930
7749
|
/* The underscore-method surface (see Readable). */
|
|
6931
7750
|
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
|
@@ -6940,9 +7759,19 @@ declare module "stream" {
|
|
|
6940
7759
|
encoding: string,
|
|
6941
7760
|
callback?: (error?: Error | null) => void,
|
|
6942
7761
|
): boolean;
|
|
7762
|
+
/* An object-mode stream's values (the encoding argument reaches
|
|
7763
|
+
* _write as passed). */
|
|
7764
|
+
write(chunk: any, callback?: (error?: Error | null) => void): boolean;
|
|
7765
|
+
write(
|
|
7766
|
+
chunk: any,
|
|
7767
|
+
encoding: ObjectModeEncoding,
|
|
7768
|
+
callback?: (error?: Error | null) => void,
|
|
7769
|
+
): boolean;
|
|
6943
7770
|
end(callback?: () => void): this;
|
|
6944
7771
|
end(chunk: Buffer | string, callback?: () => void): this;
|
|
6945
7772
|
end(chunk: Buffer | string, encoding: string, callback?: () => void): this;
|
|
7773
|
+
end(chunk: any, callback?: () => void): this;
|
|
7774
|
+
end(chunk: any, encoding: ObjectModeEncoding, callback?: () => void): this;
|
|
6946
7775
|
cork(): void;
|
|
6947
7776
|
uncork(): void;
|
|
6948
7777
|
setDefaultEncoding(encoding: string): this;
|
|
@@ -7014,27 +7843,56 @@ declare module "stream" {
|
|
|
7014
7843
|
}
|
|
7015
7844
|
|
|
7016
7845
|
class Transform extends Duplex {
|
|
7846
|
+
constructor(opts: ObjectTransformOptions);
|
|
7847
|
+
constructor(opts: StringTransformOptions);
|
|
7017
7848
|
constructor(opts?: TransformOptions);
|
|
7018
7849
|
/* The underscore-method surface (see Readable). */
|
|
7019
7850
|
_transform(
|
|
7020
7851
|
chunk: any,
|
|
7021
7852
|
encoding: string,
|
|
7022
|
-
callback: (error?: Error | null, data?:
|
|
7853
|
+
callback: (error?: Error | null, data?: any) => void,
|
|
7023
7854
|
): void;
|
|
7024
|
-
_flush(callback: (error?: Error | null, data?:
|
|
7855
|
+
_flush(callback: (error?: Error | null, data?: any) => void): void;
|
|
7025
7856
|
}
|
|
7026
7857
|
class PassThrough extends Transform {
|
|
7858
|
+
constructor(opts: ObjectTransformOptions);
|
|
7859
|
+
constructor(opts: StringTransformOptions);
|
|
7027
7860
|
constructor(opts?: TransformOptions);
|
|
7028
7861
|
}
|
|
7029
7862
|
|
|
7030
7863
|
/* addAbortSignal(signal, stream): the stream, destroyed with an
|
|
7031
7864
|
* AbortError (cause: signal.reason) when the signal aborts. */
|
|
7032
7865
|
function addAbortSignal<T extends Readable | Writable>(signal: AbortSignal, stream: T): T;
|
|
7033
|
-
/*
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7866
|
+
/* pipeline(...stages, callback): the last stream, or the object-mode
|
|
7867
|
+
* PassThrough that a function destination feeds. */
|
|
7868
|
+
type PipelineResult<T extends unknown[]> = T extends [
|
|
7869
|
+
...unknown[],
|
|
7870
|
+
infer D,
|
|
7871
|
+
(...args: any[]) => unknown,
|
|
7872
|
+
]
|
|
7873
|
+
? D extends (...args: any[]) => unknown
|
|
7874
|
+
? PassThrough
|
|
7875
|
+
: D
|
|
7876
|
+
: unknown;
|
|
7877
|
+
function pipeline<T extends unknown[]>(...streams: T): PipelineResult<T>;
|
|
7878
|
+
/* util.promisify's pipeline overload matches only pipeline itself: a
|
|
7879
|
+
* generic signature alone admits every function. */
|
|
7880
|
+
namespace pipeline {
|
|
7881
|
+
const __promisify__: typeof promises.pipeline;
|
|
7882
|
+
}
|
|
7883
|
+
/* A compose stage: a stream, an async generator function over the
|
|
7884
|
+
* previous stage, or (first) an iterable, async iterable or web
|
|
7885
|
+
* ReadableStream. */
|
|
7886
|
+
type ComposeStage =
|
|
7887
|
+
| Readable
|
|
7888
|
+
| Writable
|
|
7889
|
+
| Iterable<unknown>
|
|
7890
|
+
| AsyncIterable<unknown>
|
|
7891
|
+
| globalThis.ReadableStream
|
|
7892
|
+
| ((source: any, options?: { signal: AbortSignal }) => unknown);
|
|
7893
|
+
/* compose(...streams): a Duplex that writes to the first stage and
|
|
7894
|
+
* reads from the last, with the stages running as a pipeline. */
|
|
7895
|
+
function compose(...streams: ComposeStage[]): Duplex;
|
|
7038
7896
|
/* finished's options: readable/writable choose which ends count,
|
|
7039
7897
|
* error: false ignores 'error' events, signal aborts the wait. */
|
|
7040
7898
|
interface FinishedOptions {
|
|
@@ -7053,13 +7911,20 @@ declare module "stream" {
|
|
|
7053
7911
|
* else 65536 — Node's own state.js split); literal argument only. */
|
|
7054
7912
|
function getDefaultHighWaterMark(objectMode: boolean): number;
|
|
7055
7913
|
/* The promise pipeline's result: a last stage that is an async
|
|
7056
|
-
* function resolves the promise with its value
|
|
7914
|
+
* function resolves the promise with its value (before the options
|
|
7915
|
+
* argument, when one follows). */
|
|
7057
7916
|
type PipelinePromise<T extends unknown[]> = T extends [
|
|
7058
7917
|
...unknown[],
|
|
7059
7918
|
(...args: any[]) => Promise<infer P>,
|
|
7060
7919
|
]
|
|
7061
7920
|
? Promise<P>
|
|
7062
|
-
:
|
|
7921
|
+
: T extends [
|
|
7922
|
+
...unknown[],
|
|
7923
|
+
(...args: any[]) => Promise<infer P>,
|
|
7924
|
+
{ signal?: AbortSignal; end?: boolean },
|
|
7925
|
+
]
|
|
7926
|
+
? Promise<P>
|
|
7927
|
+
: Promise<void>;
|
|
7063
7928
|
namespace promises {
|
|
7064
7929
|
function pipeline<T extends unknown[]>(...streams: T): PipelinePromise<T>;
|
|
7065
7930
|
function finished(
|
|
@@ -7089,6 +7954,7 @@ declare module "stream" {
|
|
|
7089
7954
|
DuplexOptions,
|
|
7090
7955
|
TransformOptions,
|
|
7091
7956
|
FinishedOptions,
|
|
7957
|
+
PipelinePromise,
|
|
7092
7958
|
};
|
|
7093
7959
|
}
|
|
7094
7960
|
declare module "node:stream" {
|
|
@@ -7103,9 +7969,7 @@ declare module "stream/promises" {
|
|
|
7103
7969
|
* pipeline's trailing { signal, end } object and finished's options
|
|
7104
7970
|
* (readable, writable, error, cleanup, signal) are supported. A last
|
|
7105
7971
|
* stage that is an async function resolves the promise with its value. */
|
|
7106
|
-
function pipeline<T extends unknown[]>(
|
|
7107
|
-
...streams: T
|
|
7108
|
-
): T extends [...unknown[], (...args: any[]) => Promise<infer P>] ? Promise<P> : Promise<void>;
|
|
7972
|
+
function pipeline<T extends unknown[]>(...streams: T): import("stream").PipelinePromise<T>;
|
|
7109
7973
|
function finished(
|
|
7110
7974
|
stream: unknown,
|
|
7111
7975
|
options?: {
|