@scriptc/compiler 0.3.2 → 0.3.4
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 +1202 -64
- package/dist/backend/cycle-analysis.js +6 -1
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-mutability.d.ts +5 -0
- package/dist/backend/cycle-mutability.js +62 -3
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.js +1 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/library-pack.js +1 -0
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/llvm/alloc.js +24 -10
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +47 -1
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/array-search.d.ts +8 -0
- package/dist/backend/llvm/array-search.js +52 -0
- package/dist/backend/llvm/array-search.js.map +1 -0
- package/dist/backend/llvm/array-search.test.d.ts +1 -0
- package/dist/backend/llvm/array-search.test.js +72 -0
- package/dist/backend/llvm/array-search.test.js.map +1 -0
- package/dist/backend/llvm/call-lifetimes.d.ts +12 -1
- package/dist/backend/llvm/call-lifetimes.js +41 -11
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +85 -1
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/classes.js +87 -36
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +6 -1
- package/dist/backend/llvm/common.js +8 -1
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +5 -0
- package/dist/backend/llvm/dense-array-access.js +3 -3
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +44 -1
- package/dist/backend/llvm/dyn.js +251 -36
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +77 -14
- package/dist/backend/llvm/emitter.js +461 -108
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +26 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +52 -1
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +9 -0
- package/dist/backend/llvm/expr-bytes.js +169 -63
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.js +16 -2
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +3 -1
- package/dist/backend/llvm/expr-calls.js +57 -2
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +57 -19
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +19 -8
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +28 -30
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +8 -4
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +35 -32
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +13 -2
- package/dist/backend/llvm/expr-stream-callbacks.js +80 -5
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/inline-unions.d.ts +48 -0
- package/dist/backend/llvm/inline-unions.js +134 -0
- package/dist/backend/llvm/inline-unions.js.map +1 -0
- package/dist/backend/llvm/inline-unions.test.d.ts +1 -0
- package/dist/backend/llvm/inline-unions.test.js +124 -0
- package/dist/backend/llvm/inline-unions.test.js.map +1 -0
- package/dist/backend/llvm/integer-remainder.d.ts +28 -5
- package/dist/backend/llvm/integer-remainder.js +80 -9
- package/dist/backend/llvm/integer-remainder.js.map +1 -1
- package/dist/backend/llvm/intern-tables.test.d.ts +1 -0
- package/dist/backend/llvm/intern-tables.test.js +77 -0
- package/dist/backend/llvm/intern-tables.test.js.map +1 -0
- package/dist/backend/llvm/lib-datagram.js +10 -0
- package/dist/backend/llvm/lib-datagram.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +255 -29
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +176 -7
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +25 -6
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +2 -2
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.d.ts +5 -0
- package/dist/backend/llvm/lib-shared.js +212 -1
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +184 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/lib-test.js +9 -0
- package/dist/backend/llvm/lib-test.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +7 -3
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +6 -3
- package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.d.ts +2 -0
- package/dist/backend/llvm/local-union-storage.js +5 -0
- package/dist/backend/llvm/local-union-storage.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +1 -0
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
- package/dist/backend/llvm/loop-array-borrows.d.ts +8 -2
- package/dist/backend/llvm/loop-array-borrows.js +93 -13
- package/dist/backend/llvm/loop-array-borrows.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +24 -0
- package/dist/backend/llvm/map-number-lookup.js +88 -0
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.d.ts +1 -0
- package/dist/backend/llvm/map-number-lookup.test.js +158 -0
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.d.ts +9 -0
- package/dist/backend/llvm/map-read-lifetimes.js +90 -1
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +129 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +9 -0
- package/dist/backend/llvm/publish.js +25 -4
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/record-results.d.ts +8 -5
- package/dist/backend/llvm/record-results.js +20 -12
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +13 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +19 -2
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +5 -1
- package/dist/backend/llvm/regions.js +24 -10
- package/dist/backend/llvm/regions.js.map +1 -1
- package/dist/backend/llvm/serialized-ir-emission.test.js +2 -0
- package/dist/backend/llvm/serialized-ir-emission.test.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +56 -10
- package/dist/backend/llvm/shapes.js +178 -39
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +61 -3
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/stack-objects.js +16 -4
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/stack-objects.test.js +3 -0
- package/dist/backend/llvm/stack-objects.test.js.map +1 -1
- package/dist/backend/llvm/string-reads.js +2 -2
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/string-slices.js +2 -2
- package/dist/backend/llvm/string-slices.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +11 -0
- package/dist/backend/llvm/walkers.js +106 -10
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +13 -4
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +5 -2
- package/dist/backend/native/executable.js +27 -8
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +2 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-codegen-core.d.ts +4 -4
- package/dist/backend/native-codegen-core.js +4 -6
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.test.js +7 -8
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +3 -0
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +1 -1
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/publication.js +3 -1
- package/dist/backend/publication.js.map +1 -1
- package/dist/backend/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-targets.test.js +2 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +2 -1
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/target-diagnostics.js +11 -1
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +4 -1
- package/dist/backend/target-diagnostics.test.js.map +1 -1
- package/dist/backend/warm-cache.js +1 -0
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/compat/fetch-profile.js +4 -4
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/contracts/check.js +2 -0
- package/dist/contracts/check.js.map +1 -1
- package/dist/coverage/report.js +1 -1
- package/dist/coverage/report.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +6 -5
- package/dist/diagnostics/diagnostic.js +7 -6
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +1 -0
- package/dist/executable/executable-cache.js +1 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +1 -0
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +1 -1
- package/dist/frontend/builtin-modules.js +1 -0
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/comptime-node.js +2 -2
- package/dist/frontend/comptime-node.js.map +1 -1
- package/dist/frontend/experimental-import.d.ts +5 -1
- package/dist/frontend/experimental-import.js +28 -3
- package/dist/frontend/experimental-import.js.map +1 -1
- package/dist/frontend/lowering/assert-instances.d.ts +38 -0
- package/dist/frontend/lowering/assert-instances.js +269 -0
- package/dist/frontend/lowering/assert-instances.js.map +1 -0
- package/dist/frontend/lowering/binding-analysis.d.ts +1 -1
- package/dist/frontend/lowering/binding-analysis.js +1 -1
- package/dist/frontend/lowering/builtins/arguments.d.ts +4 -0
- package/dist/frontend/lowering/builtins/arguments.js +8 -4
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/blob.d.ts +20 -0
- package/dist/frontend/lowering/builtins/blob.js +167 -0
- package/dist/frontend/lowering/builtins/blob.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process-async.d.ts +2 -2
- package/dist/frontend/lowering/builtins/child-process-async.js +2 -2
- package/dist/frontend/lowering/builtins/child-process-methods.js +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/compression.d.ts +18 -0
- package/dist/frontend/lowering/builtins/compression.js +178 -4
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.js +7 -2
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +6 -0
- package/dist/frontend/lowering/builtins/crypto.js +526 -121
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.js +23 -0
- package/dist/frontend/lowering/builtins/errors.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +10 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +89 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem.d.ts +16 -7
- package/dist/frontend/lowering/builtins/filesystem.js +97 -15
- package/dist/frontend/lowering/builtins/filesystem.js.map +1 -1
- package/dist/frontend/lowering/builtins/fs-glob.d.ts +23 -0
- package/dist/frontend/lowering/builtins/fs-glob.js +224 -0
- package/dist/frontend/lowering/builtins/fs-glob.js.map +1 -0
- package/dist/frontend/lowering/builtins/key-object.d.ts +13 -0
- package/dist/frontend/lowering/builtins/key-object.js +56 -0
- package/dist/frontend/lowering/builtins/key-object.js.map +1 -0
- package/dist/frontend/lowering/builtins/module-calls.js +44 -11
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/performance.d.ts +25 -3
- package/dist/frontend/lowering/builtins/performance.js +340 -5
- package/dist/frontend/lowering/builtins/performance.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +2 -2
- package/dist/frontend/lowering/builtins/process.js +107 -14
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/properties.d.ts +0 -7
- package/dist/frontend/lowering/builtins/properties.js +39 -11
- package/dist/frontend/lowering/builtins/properties.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +23 -8
- package/dist/frontend/lowering/builtins/readline.js +266 -90
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/timers.d.ts +3 -0
- package/dist/frontend/lowering/builtins/timers.js +109 -23
- package/dist/frontend/lowering/builtins/timers.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.d.ts +8 -0
- package/dist/frontend/lowering/builtins/url.js +36 -0
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.js +1 -1
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.js +26 -2
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +2 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +171 -13
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +1 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-protocol-dispatch.d.ts +45 -0
- package/dist/frontend/lowering/class-protocol-dispatch.js +516 -0
- package/dist/frontend/lowering/class-protocol-dispatch.js.map +1 -0
- package/dist/frontend/lowering/coercions/structural-plans.js +2 -1
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +3 -3
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/collation-repertoire.js +6 -5
- package/dist/frontend/lowering/collation-repertoire.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +4 -7
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.d.ts +0 -7
- package/dist/frontend/lowering/containers/array-methods.js +43 -2
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +38 -26
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/for-of.d.ts +1 -1
- package/dist/frontend/lowering/containers/for-of.js +5 -1
- package/dist/frontend/lowering/containers/for-of.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/crypto-tables.d.ts +3 -3
- package/dist/frontend/lowering/crypto-tables.js +77 -12
- package/dist/frontend/lowering/crypto-tables.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +10 -0
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +16 -12
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +2 -2
- package/dist/frontend/lowering/generic-functions.js +2 -2
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/http2-constants.js +1 -1
- package/dist/frontend/lowering/intern-tables.d.ts +13 -0
- package/dist/frontend/lowering/intern-tables.js +536 -0
- package/dist/frontend/lowering/intern-tables.js.map +1 -0
- package/dist/frontend/lowering/lower-array-sort.d.ts +12 -1
- package/dist/frontend/lowering/lower-array-sort.js +561 -191
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +4 -2
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +702 -63
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.d.ts +6 -3
- package/dist/frontend/lowering/lower-async-iteration.js +259 -4
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +118 -12
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +11 -2
- package/dist/frontend/lowering/lower-classes.js +76 -9
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +1 -1
- package/dist/frontend/lowering/lower-comptime.js +4 -4
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +77 -52
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-event-target.d.ts +63 -0
- package/dist/frontend/lowering/lower-event-target.js +362 -0
- package/dist/frontend/lowering/lower-event-target.js.map +1 -0
- package/dist/frontend/lowering/lower-expando.js +2 -2
- package/dist/frontend/lowering/lower-exprs.js +124 -22
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +6 -0
- package/dist/frontend/lowering/lower-inspect.js +240 -49
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +1 -1
- package/dist/frontend/lowering/lower-mock.d.ts +11 -0
- package/dist/frontend/lowering/lower-mock.js +504 -0
- package/dist/frontend/lowering/lower-mock.js.map +1 -0
- package/dist/frontend/lowering/lower-modules.d.ts +1 -1
- package/dist/frontend/lowering/lower-modules.js +14 -3
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +2 -2
- package/dist/frontend/lowering/lower-namespaces.js +2 -2
- package/dist/frontend/lowering/lower-server.d.ts +3 -0
- package/dist/frontend/lowering/lower-server.js +419 -44
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +7 -1
- package/dist/frontend/lowering/lower-stdlib.js +10 -3
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +2 -2
- package/dist/frontend/lowering/lower-stmts.js +69 -14
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +10 -6
- package/dist/frontend/lowering/lower-stream.js +1020 -49
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.js +86 -8
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +45 -5
- package/dist/frontend/lowering/lowerer.js +317 -48
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/native-ffi.js +2 -2
- package/dist/frontend/lowering/native-ffi.js.map +1 -1
- package/dist/frontend/lowering/pairs-snapshot.d.ts +6 -0
- package/dist/frontend/lowering/pairs-snapshot.js +49 -0
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-records.d.ts +115 -0
- package/dist/frontend/lowering/runtime-optional-records.js +715 -0
- package/dist/frontend/lowering/runtime-optional-records.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-records.test.d.ts +1 -0
- package/dist/frontend/lowering/runtime-optional-records.test.js +175 -0
- package/dist/frontend/lowering/runtime-optional-records.test.js.map +1 -0
- package/dist/frontend/lowering/surfaces.d.ts +11 -3
- package/dist/frontend/lowering/surfaces.js +334 -37
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/zlib-constants.d.ts +1 -0
- package/dist/frontend/lowering/zlib-constants.js +181 -0
- package/dist/frontend/lowering/zlib-constants.js.map +1 -0
- package/dist/frontend/mock-shapes.d.ts +10 -0
- package/dist/frontend/mock-shapes.js +76 -0
- package/dist/frontend/mock-shapes.js.map +1 -0
- package/dist/frontend/module-syntax.d.ts +1 -1
- package/dist/frontend/module-syntax.js +1 -1
- package/dist/frontend/npm-static-prune.js +1 -1
- package/dist/frontend/npm-static-prune.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +4 -3
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/pipeline.js +6 -4
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/program.d.ts +3 -3
- package/dist/frontend/program.js +25 -18
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/resolve.d.ts +4 -0
- package/dist/frontend/resolve.js +15 -1
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/ts7/adapter.js +1 -1
- package/dist/frontend/ts7/ast-bytes.d.ts +1 -1
- package/dist/frontend/ts7/ast-bytes.js +1 -1
- package/dist/frontend/ts7/semantic-json.d.ts +1 -1
- package/dist/frontend/ts7/semantic-json.js +1 -1
- package/dist/frontend/ts7/semantic-json.js.map +1 -1
- package/dist/frontend/ts7/world-check.js +1 -1
- package/dist/frontend/tsc-codes.js +3 -2
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +21 -1
- package/dist/frontend/type-mapper.js +245 -27
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.d.ts +12 -6
- package/dist/ir/analysis.js +26 -10
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/analysis.test.js +15 -3
- package/dist/ir/analysis.test.js.map +1 -1
- package/dist/ir/builtin-effects.js +115 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +438 -46
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/int32-slots.js +1 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/ir.d.ts +84 -17
- package/dist/ir/ir.js +54 -1
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +1 -0
- package/dist/ir/runtime-features.js +111 -7
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/serialize.js +1 -1
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/traverse.js +1 -0
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/validate.js +295 -14
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +60 -0
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/fence-eval.d.ts +1 -1
- package/dist/library/fence-eval.js +5 -4
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/ir-policy.js +11 -4
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-profile.js +13 -13
- package/dist/library/library-profile.js.map +1 -1
- package/dist/library/prepare.js +1 -1
- package/dist/library/prepare.js.map +1 -1
- package/dist/library/sidecar.js +3 -3
- package/dist/library/sidecar.js.map +1 -1
- package/dist/native/cli.js +1 -0
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +1 -3
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/prepare.js +4 -2
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.test.js +1 -0
- package/dist/native/sanitizer.test.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +1279 -221
|
@@ -36,6 +36,26 @@ declare namespace NodeJS {
|
|
|
36
36
|
user: number;
|
|
37
37
|
system: number;
|
|
38
38
|
}
|
|
39
|
+
interface MemoryUsage {
|
|
40
|
+
rss: number;
|
|
41
|
+
heapTotal: number;
|
|
42
|
+
heapUsed: number;
|
|
43
|
+
external: number;
|
|
44
|
+
arrayBuffers: number;
|
|
45
|
+
}
|
|
46
|
+
/* process.memoryUsage(): rss from the OS, heapTotal/heapUsed from the
|
|
47
|
+
* runtime heap's own accounting; external and arrayBuffers are 0. */
|
|
48
|
+
interface MemoryUsageFn {
|
|
49
|
+
(): MemoryUsage;
|
|
50
|
+
rss(): number;
|
|
51
|
+
}
|
|
52
|
+
interface ProcessRelease {
|
|
53
|
+
name: string;
|
|
54
|
+
sourceUrl?: string | undefined;
|
|
55
|
+
headersUrl?: string | undefined;
|
|
56
|
+
libUrl?: string | undefined;
|
|
57
|
+
lts?: string | undefined;
|
|
58
|
+
}
|
|
39
59
|
interface ResourceUsage {
|
|
40
60
|
userCPUTime: number;
|
|
41
61
|
systemCPUTime: number;
|
|
@@ -229,6 +249,16 @@ declare var process: {
|
|
|
229
249
|
readonly execPath: string;
|
|
230
250
|
getuid?(): number;
|
|
231
251
|
getgid?(): number;
|
|
252
|
+
geteuid?(): number;
|
|
253
|
+
getegid?(): number;
|
|
254
|
+
getgroups?(): number[];
|
|
255
|
+
readonly ppid: number;
|
|
256
|
+
/* libuv's process title: argv[0] until set; a write is truncated to
|
|
257
|
+
* the original argument area on POSIX and sets the console title on
|
|
258
|
+
* Windows. */
|
|
259
|
+
title: string;
|
|
260
|
+
argv0: string;
|
|
261
|
+
readonly release: NodeJS.ProcessRelease;
|
|
232
262
|
/* signal admits null (Node treats it as the SIGTERM default) — real
|
|
233
263
|
* callers forward a `string | null` result field. */
|
|
234
264
|
kill(pid: number, signal?: string | number | null): true;
|
|
@@ -255,6 +285,7 @@ declare var process: {
|
|
|
255
285
|
cpuUsage(previousValue?: NodeJS.CpuUsage): NodeJS.CpuUsage;
|
|
256
286
|
threadCpuUsage(previousValue?: NodeJS.CpuUsage): NodeJS.CpuUsage;
|
|
257
287
|
resourceUsage(): NodeJS.ResourceUsage;
|
|
288
|
+
memoryUsage: NodeJS.MemoryUsageFn;
|
|
258
289
|
availableMemory(): number;
|
|
259
290
|
constrainedMemory(): number;
|
|
260
291
|
/* The loop's own bookkeeping: 'Timeout' per armed timer, 'Immediate'
|
|
@@ -840,6 +871,44 @@ declare var Response: {
|
|
|
840
871
|
json(data: unknown, init?: ResponseInit): Response;
|
|
841
872
|
redirect(url: string | URL, status?: number): Response;
|
|
842
873
|
};
|
|
874
|
+
/* Blob and File (node:buffer, also globals): immutable bytes with a
|
|
875
|
+
* content type. Sources are copied when the Blob is built. */
|
|
876
|
+
interface BlobPropertyBag {
|
|
877
|
+
endings?: "transparent" | "native";
|
|
878
|
+
type?: string;
|
|
879
|
+
}
|
|
880
|
+
interface FilePropertyBag extends BlobPropertyBag {
|
|
881
|
+
lastModified?: number;
|
|
882
|
+
}
|
|
883
|
+
interface Blob {
|
|
884
|
+
readonly size: number;
|
|
885
|
+
readonly type: string;
|
|
886
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
887
|
+
text(): Promise<string>;
|
|
888
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
889
|
+
bytes(): Promise<Uint8Array>;
|
|
890
|
+
stream(): ReadableStream<Uint8Array>;
|
|
891
|
+
textStream(): ReadableStream<string>;
|
|
892
|
+
}
|
|
893
|
+
declare var Blob: {
|
|
894
|
+
new (
|
|
895
|
+
sources?: readonly (string | ArrayBuffer | ArrayBufferView | Blob)[],
|
|
896
|
+
options?: BlobPropertyBag,
|
|
897
|
+
): Blob;
|
|
898
|
+
readonly prototype: Blob;
|
|
899
|
+
};
|
|
900
|
+
interface File extends Blob {
|
|
901
|
+
readonly name: string;
|
|
902
|
+
readonly lastModified: number;
|
|
903
|
+
}
|
|
904
|
+
declare var File: {
|
|
905
|
+
new (
|
|
906
|
+
sources: readonly (string | ArrayBuffer | ArrayBufferView | Blob)[],
|
|
907
|
+
fileName: string,
|
|
908
|
+
options?: FilePropertyBag,
|
|
909
|
+
): File;
|
|
910
|
+
readonly prototype: File;
|
|
911
|
+
};
|
|
843
912
|
interface Request {
|
|
844
913
|
readonly method: string;
|
|
845
914
|
readonly url: string;
|
|
@@ -923,14 +992,22 @@ declare module "timers" {
|
|
|
923
992
|
}
|
|
924
993
|
|
|
925
994
|
/* node:timers/promises — the promisified pair the Node test harness leans
|
|
926
|
-
* on (`await setTimeout(ms)` as a sleep). setTimeout
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* declared surface that fences per site. */
|
|
995
|
+
* on (`await setTimeout(ms)` as a sleep). setTimeout and setImmediate
|
|
996
|
+
* settle with their resolve value (undefined without one) from the shared
|
|
997
|
+
* timer heap and the immediate queue; setInterval(delay, value) lowers to a
|
|
998
|
+
* typed async iterator. The options object takes `ref`; AbortSignal
|
|
999
|
+
* options remain declared surface that fences per site. */
|
|
931
1000
|
declare module "node:timers/promises" {
|
|
932
|
-
export
|
|
933
|
-
|
|
1001
|
+
export interface TimerOptions {
|
|
1002
|
+
ref?: boolean;
|
|
1003
|
+
signal?: AbortSignal;
|
|
1004
|
+
}
|
|
1005
|
+
export function setTimeout<T = void>(
|
|
1006
|
+
delay?: number,
|
|
1007
|
+
value?: T,
|
|
1008
|
+
options?: TimerOptions,
|
|
1009
|
+
): Promise<T>;
|
|
1010
|
+
export function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
|
|
934
1011
|
export function setInterval<T = unknown>(
|
|
935
1012
|
delay?: number,
|
|
936
1013
|
value?: T,
|
|
@@ -1034,10 +1111,48 @@ declare module "diagnostics_channel" {
|
|
|
1034
1111
|
* anchored monotonic clock (Node's timeOrigin for a compiled program),
|
|
1035
1112
|
* fractional milliseconds. The .bind(performance) spelling lowers to the
|
|
1036
1113
|
* same clock as a plain () => number function value (the mockable-clock idiom's
|
|
1037
|
-
* getTimestamp)
|
|
1114
|
+
* getTimestamp). mark, measure, the getEntries family and the clears run
|
|
1115
|
+
* over the thread's performance timeline with Node's validation; everything
|
|
1116
|
+
* else fences per member. */
|
|
1038
1117
|
declare module "node:perf_hooks" {
|
|
1118
|
+
export type EntryType = "mark" | "measure";
|
|
1119
|
+
export class PerformanceEntry {
|
|
1120
|
+
protected constructor();
|
|
1121
|
+
readonly duration: number;
|
|
1122
|
+
readonly name: string;
|
|
1123
|
+
readonly startTime: number;
|
|
1124
|
+
readonly entryType: EntryType;
|
|
1125
|
+
toJSON(): any;
|
|
1126
|
+
}
|
|
1127
|
+
export class PerformanceMark extends PerformanceEntry {
|
|
1128
|
+
readonly detail: any;
|
|
1129
|
+
readonly duration: 0;
|
|
1130
|
+
readonly entryType: "mark";
|
|
1131
|
+
}
|
|
1132
|
+
export class PerformanceMeasure extends PerformanceEntry {
|
|
1133
|
+
readonly detail: any;
|
|
1134
|
+
readonly entryType: "measure";
|
|
1135
|
+
}
|
|
1136
|
+
export interface MarkOptions {
|
|
1137
|
+
detail?: unknown | undefined;
|
|
1138
|
+
startTime?: number | undefined;
|
|
1139
|
+
}
|
|
1140
|
+
export interface MeasureOptions {
|
|
1141
|
+
detail?: unknown;
|
|
1142
|
+
duration?: number | undefined;
|
|
1143
|
+
end?: number | string | undefined;
|
|
1144
|
+
start?: number | string | undefined;
|
|
1145
|
+
}
|
|
1039
1146
|
export interface Performance {
|
|
1040
1147
|
now(): number;
|
|
1148
|
+
mark(name: string, options?: MarkOptions): PerformanceMark;
|
|
1149
|
+
measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
|
|
1150
|
+
measure(name: string, options: MeasureOptions): PerformanceMeasure;
|
|
1151
|
+
getEntries(): PerformanceEntry[];
|
|
1152
|
+
getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
|
|
1153
|
+
getEntriesByType(type: EntryType): PerformanceEntry[];
|
|
1154
|
+
clearMarks(name?: string): void;
|
|
1155
|
+
clearMeasures(name?: string): void;
|
|
1041
1156
|
}
|
|
1042
1157
|
export const performance: Performance;
|
|
1043
1158
|
}
|
|
@@ -1180,6 +1295,9 @@ declare module "node:fs" {
|
|
|
1180
1295
|
options: string | { encoding?: string | null } | null,
|
|
1181
1296
|
): string | Buffer;
|
|
1182
1297
|
export function chownSync(path: string, uid: number, gid: number): void;
|
|
1298
|
+
export function lchownSync(path: string, uid: number, gid: number): void;
|
|
1299
|
+
export function fchownSync(fd: number, uid: number, gid: number): void;
|
|
1300
|
+
export function truncateSync(path: string, len?: number): void;
|
|
1183
1301
|
/* The 2-argument form only (Node's mode flags have no lowering). The
|
|
1184
1302
|
* destination is created or truncated carrying the SOURCE's mode. */
|
|
1185
1303
|
export function copyFileSync(src: string, dest: string): void;
|
|
@@ -1217,6 +1335,51 @@ declare module "node:fs" {
|
|
|
1217
1335
|
* fences by name at the call site; undocumented keys drop like Node. */
|
|
1218
1336
|
options: { withFileTypes: true; recursive?: boolean; [option: string]: unknown },
|
|
1219
1337
|
): Dirent[];
|
|
1338
|
+
/* fs.globSync / fs.glob: Node's glob walk over the file system. Patterns
|
|
1339
|
+
* are minimatch globs (case-insensitive on macOS and Windows); results
|
|
1340
|
+
* are relative to cwd unless the pattern is absolute. withFileTypes must
|
|
1341
|
+
* be a literal so the result type is known. */
|
|
1342
|
+
export interface GlobOptions {
|
|
1343
|
+
cwd?: string | URL;
|
|
1344
|
+
exclude?: readonly string[] | ((fileName: string) => boolean);
|
|
1345
|
+
followSymlinks?: boolean;
|
|
1346
|
+
withFileTypes?: false;
|
|
1347
|
+
}
|
|
1348
|
+
export interface GlobOptionsWithFileTypes {
|
|
1349
|
+
cwd?: string | URL;
|
|
1350
|
+
exclude?: readonly string[];
|
|
1351
|
+
followSymlinks?: boolean;
|
|
1352
|
+
withFileTypes: true;
|
|
1353
|
+
}
|
|
1354
|
+
export function globSync(pattern: string | readonly string[], options?: GlobOptions): string[];
|
|
1355
|
+
export function globSync(
|
|
1356
|
+
pattern: string | readonly string[],
|
|
1357
|
+
options: GlobOptionsWithFileTypes,
|
|
1358
|
+
): Dirent[];
|
|
1359
|
+
export function glob(
|
|
1360
|
+
pattern: string | readonly string[],
|
|
1361
|
+
callback: (err: NodeJS.ErrnoException | null, matches?: string[]) => void,
|
|
1362
|
+
): void;
|
|
1363
|
+
export function glob(
|
|
1364
|
+
pattern: string | readonly string[],
|
|
1365
|
+
options: GlobOptions,
|
|
1366
|
+
callback: (err: NodeJS.ErrnoException | null, matches?: string[]) => void,
|
|
1367
|
+
): void;
|
|
1368
|
+
/* fs.Dir: an open directory stream (opendirSync, fs.promises.opendir)
|
|
1369
|
+
* read one Dirent at a time in OS order; utf8 names, no recursive walk. */
|
|
1370
|
+
export interface Dir {
|
|
1371
|
+
readonly path: string;
|
|
1372
|
+
readSync(): Dirent | null;
|
|
1373
|
+
read(): Promise<Dirent | null>;
|
|
1374
|
+
closeSync(): void;
|
|
1375
|
+
close(): Promise<void>;
|
|
1376
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
|
|
1377
|
+
}
|
|
1378
|
+
export interface OpenDirOptions {
|
|
1379
|
+
encoding?: "utf8" | "utf-8";
|
|
1380
|
+
bufferSize?: number;
|
|
1381
|
+
}
|
|
1382
|
+
export function opendirSync(path: string, options?: OpenDirOptions): Dir;
|
|
1220
1383
|
export function accessSync(path: string, mode?: number): void;
|
|
1221
1384
|
export function mkdtempSync(prefix: string): string;
|
|
1222
1385
|
export const constants: {
|
|
@@ -1243,14 +1406,28 @@ declare module "node:fs" {
|
|
|
1243
1406
|
isFile(): boolean;
|
|
1244
1407
|
isDirectory(): boolean;
|
|
1245
1408
|
isSymbolicLink(): boolean;
|
|
1409
|
+
isBlockDevice(): boolean;
|
|
1410
|
+
isCharacterDevice(): boolean;
|
|
1411
|
+
isFIFO(): boolean;
|
|
1412
|
+
isSocket(): boolean;
|
|
1246
1413
|
readonly dev: number;
|
|
1414
|
+
readonly mode: number;
|
|
1415
|
+
readonly nlink: number;
|
|
1416
|
+
readonly uid: number;
|
|
1417
|
+
readonly gid: number;
|
|
1418
|
+
readonly rdev: number;
|
|
1419
|
+
readonly blksize: number;
|
|
1247
1420
|
readonly ino: number;
|
|
1248
1421
|
readonly size: number;
|
|
1249
1422
|
readonly blocks: number;
|
|
1250
|
-
readonly nlink: number;
|
|
1251
1423
|
readonly atimeMs: number;
|
|
1252
1424
|
readonly mtimeMs: number;
|
|
1253
1425
|
readonly ctimeMs: number;
|
|
1426
|
+
readonly birthtimeMs: number;
|
|
1427
|
+
readonly atime: Date;
|
|
1428
|
+
readonly mtime: Date;
|
|
1429
|
+
readonly ctime: Date;
|
|
1430
|
+
readonly birthtime: Date;
|
|
1254
1431
|
}
|
|
1255
1432
|
export function statSync(path: string): Stats;
|
|
1256
1433
|
export function lstatSync(path: string): Stats;
|
|
@@ -1539,6 +1716,10 @@ declare module "fs/promises" {
|
|
|
1539
1716
|
mtime: number | string | Date,
|
|
1540
1717
|
): Promise<void>;
|
|
1541
1718
|
export function readFile(path: string, encoding: "utf8" | "utf-8"): Promise<string>;
|
|
1719
|
+
export function readFile(
|
|
1720
|
+
path: string,
|
|
1721
|
+
options: BufferEncoding | { encoding: BufferEncoding },
|
|
1722
|
+
): Promise<string>;
|
|
1542
1723
|
export function readFile(path: string): Promise<Buffer>;
|
|
1543
1724
|
export function writeFile(
|
|
1544
1725
|
path: string,
|
|
@@ -1565,6 +1746,15 @@ declare module "fs/promises" {
|
|
|
1565
1746
|
[option: string]: unknown;
|
|
1566
1747
|
},
|
|
1567
1748
|
): Promise<import("node:fs").Dirent[]>;
|
|
1749
|
+
/* The async iterator form of fs.globSync: iterate it with for await. */
|
|
1750
|
+
export function glob(
|
|
1751
|
+
pattern: string | readonly string[],
|
|
1752
|
+
options?: import("node:fs").GlobOptions,
|
|
1753
|
+
): AsyncIterableIterator<string>;
|
|
1754
|
+
export function glob(
|
|
1755
|
+
pattern: string | readonly string[],
|
|
1756
|
+
options: import("node:fs").GlobOptionsWithFileTypes,
|
|
1757
|
+
): AsyncIterableIterator<import("node:fs").Dirent>;
|
|
1568
1758
|
export function rm(path: string): Promise<void>;
|
|
1569
1759
|
export function stat(path: string): Promise<import("node:fs").Stats>;
|
|
1570
1760
|
export function statfs(
|
|
@@ -1583,7 +1773,19 @@ declare module "fs/promises" {
|
|
|
1583
1773
|
export function lstat(path: string): Promise<import("node:fs").Stats>;
|
|
1584
1774
|
export function unlink(path: string): Promise<void>;
|
|
1585
1775
|
export function chmod(path: string, mode: number): Promise<void>;
|
|
1776
|
+
export function chown(path: string, uid: number, gid: number): Promise<void>;
|
|
1777
|
+
export function lchown(path: string, uid: number, gid: number): Promise<void>;
|
|
1778
|
+
export function access(path: string, mode?: number): Promise<void>;
|
|
1779
|
+
export function truncate(path: string, len?: number): Promise<void>;
|
|
1780
|
+
export function appendFile(path: string, data: string | Uint8Array): Promise<void>;
|
|
1781
|
+
export function copyFile(src: string, dest: string): Promise<void>;
|
|
1782
|
+
export function mkdtemp(prefix: string): Promise<string>;
|
|
1783
|
+
export function rmdir(path: string): Promise<void>;
|
|
1586
1784
|
export function rename(oldPath: string, newPath: string): Promise<void>;
|
|
1785
|
+
export function opendir(
|
|
1786
|
+
path: string,
|
|
1787
|
+
options?: import("node:fs").OpenDirOptions,
|
|
1788
|
+
): Promise<import("node:fs").Dir>;
|
|
1587
1789
|
}
|
|
1588
1790
|
declare module "node:fs/promises" {
|
|
1589
1791
|
export * from "fs/promises";
|
|
@@ -1593,7 +1795,7 @@ declare module "node:fs/promises" {
|
|
|
1593
1795
|
* on posix triples, path.win32 under a win32 triple, with the posix and
|
|
1594
1796
|
* win32 namespaces answering their own platform anywhere. Every function
|
|
1595
1797
|
* is a pure string algorithm matching Node's implementations
|
|
1596
|
-
*
|
|
1798
|
+
* exactly; join/resolve are variadic like Node's. */
|
|
1597
1799
|
declare module "path" {
|
|
1598
1800
|
export function join(...paths: string[]): string;
|
|
1599
1801
|
export function resolve(...paths: string[]): string;
|
|
@@ -2029,7 +2231,10 @@ declare var URLSearchParams: {
|
|
|
2029
2231
|
/* node:url — the file-URL bridge pair. fileURLToPath accepts a URL value
|
|
2030
2232
|
* or a URL string and throws Node's TypeErrors (non-file scheme, encoded
|
|
2031
2233
|
* slashes, non-empty host); pathToFileURL resolves the path and percent-
|
|
2032
|
-
* encodes it into a file: URL.
|
|
2234
|
+
* encodes it into a file: URL. The legacy API: parse() answers a Url
|
|
2235
|
+
* object, format() serializes a Url-shaped object, a string, or a URL,
|
|
2236
|
+
* resolve() resolves one URL string against another, and the domain pair
|
|
2237
|
+
* converts a hostname to and from its Punycode form. */
|
|
2033
2238
|
declare module "url" {
|
|
2034
2239
|
export type URL = globalThis.URL;
|
|
2035
2240
|
export type URLSearchParams = globalThis.URLSearchParams;
|
|
@@ -2038,6 +2243,65 @@ declare module "url" {
|
|
|
2038
2243
|
export function fileURLToPath(url: string | URL, options?: { windows?: boolean }): string;
|
|
2039
2244
|
export function fileURLToPathBuffer(url: string | URL, options?: { windows?: boolean }): Buffer;
|
|
2040
2245
|
export function pathToFileURL(path: string, options?: { windows?: boolean }): URL;
|
|
2246
|
+
export interface UrlObject {
|
|
2247
|
+
auth?: string | null | undefined;
|
|
2248
|
+
hash?: string | null | undefined;
|
|
2249
|
+
host?: string | null | undefined;
|
|
2250
|
+
hostname?: string | null | undefined;
|
|
2251
|
+
href?: string | null | undefined;
|
|
2252
|
+
pathname?: string | null | undefined;
|
|
2253
|
+
protocol?: string | null | undefined;
|
|
2254
|
+
search?: string | null | undefined;
|
|
2255
|
+
slashes?: boolean | null | undefined;
|
|
2256
|
+
port?: string | number | null | undefined;
|
|
2257
|
+
query?: string | null | import("querystring").ParsedUrlQueryInput | undefined;
|
|
2258
|
+
}
|
|
2259
|
+
export interface Url {
|
|
2260
|
+
auth: string | null;
|
|
2261
|
+
hash: string | null;
|
|
2262
|
+
host: string | null;
|
|
2263
|
+
hostname: string | null;
|
|
2264
|
+
href: string;
|
|
2265
|
+
path: string | null;
|
|
2266
|
+
pathname: string | null;
|
|
2267
|
+
protocol: string | null;
|
|
2268
|
+
search: string | null;
|
|
2269
|
+
slashes: boolean | null;
|
|
2270
|
+
port: string | null;
|
|
2271
|
+
query: string | null | import("querystring").ParsedUrlQuery;
|
|
2272
|
+
}
|
|
2273
|
+
export interface UrlWithParsedQuery extends Url {
|
|
2274
|
+
query: import("querystring").ParsedUrlQuery;
|
|
2275
|
+
}
|
|
2276
|
+
export interface UrlWithStringQuery extends Url {
|
|
2277
|
+
query: string | null;
|
|
2278
|
+
}
|
|
2279
|
+
export interface URLFormatOptions {
|
|
2280
|
+
auth?: boolean | undefined;
|
|
2281
|
+
fragment?: boolean | undefined;
|
|
2282
|
+
search?: boolean | undefined;
|
|
2283
|
+
unicode?: boolean | undefined;
|
|
2284
|
+
}
|
|
2285
|
+
export function parse(
|
|
2286
|
+
urlString: string,
|
|
2287
|
+
parseQueryString?: false,
|
|
2288
|
+
slashesDenoteHost?: boolean,
|
|
2289
|
+
): UrlWithStringQuery;
|
|
2290
|
+
export function parse(
|
|
2291
|
+
urlString: string,
|
|
2292
|
+
parseQueryString: true,
|
|
2293
|
+
slashesDenoteHost?: boolean,
|
|
2294
|
+
): UrlWithParsedQuery;
|
|
2295
|
+
export function parse(
|
|
2296
|
+
urlString: string,
|
|
2297
|
+
parseQueryString: boolean,
|
|
2298
|
+
slashesDenoteHost?: boolean,
|
|
2299
|
+
): Url;
|
|
2300
|
+
export function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
2301
|
+
export function format(urlObject: UrlObject | string): string;
|
|
2302
|
+
export function resolve(from: string, to: string): string;
|
|
2303
|
+
export function domainToASCII(domain: string): string;
|
|
2304
|
+
export function domainToUnicode(domain: string): string;
|
|
2041
2305
|
}
|
|
2042
2306
|
declare module "node:url" {
|
|
2043
2307
|
export * from "url";
|
|
@@ -2045,34 +2309,127 @@ declare module "node:url" {
|
|
|
2045
2309
|
|
|
2046
2310
|
/* node:crypto: the static hashing/MAC/random/key-derivation utility slice. */
|
|
2047
2311
|
declare module "crypto" {
|
|
2048
|
-
export
|
|
2312
|
+
export type KeyObjectType = "secret" | "public" | "private";
|
|
2313
|
+
export interface JsonWebKey {
|
|
2314
|
+
kty?: string;
|
|
2315
|
+
k?: string;
|
|
2316
|
+
}
|
|
2317
|
+
export interface JwkKeyExportOptions {
|
|
2318
|
+
format: "jwk";
|
|
2319
|
+
}
|
|
2320
|
+
export interface KeyExportOptions {
|
|
2321
|
+
format?: "buffer" | undefined;
|
|
2322
|
+
}
|
|
2323
|
+
/** Secret keys only; the asymmetric key types are not available. */
|
|
2324
|
+
export class KeyObject {
|
|
2325
|
+
private constructor();
|
|
2326
|
+
type: KeyObjectType;
|
|
2327
|
+
symmetricKeySize?: number;
|
|
2328
|
+
asymmetricKeyType?: string;
|
|
2329
|
+
export(options?: KeyExportOptions): Buffer;
|
|
2330
|
+
export(options: JwkKeyExportOptions): JsonWebKey;
|
|
2331
|
+
equals(otherKeyObject: KeyObject): boolean;
|
|
2332
|
+
}
|
|
2333
|
+
export function createSecretKey(key: ArrayBufferView | ArrayBufferLike): KeyObject;
|
|
2334
|
+
export function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
|
|
2335
|
+
export function generateKeySync(type: "hmac" | "aes", options: { length: number }): KeyObject;
|
|
2336
|
+
export function generateKey(
|
|
2337
|
+
type: "hmac" | "aes",
|
|
2338
|
+
options: { length: number },
|
|
2339
|
+
callback: (err: Error | null, key: KeyObject) => void,
|
|
2340
|
+
): void;
|
|
2341
|
+
export interface RandomUUIDOptions {
|
|
2342
|
+
disableEntropyCache?: boolean | undefined;
|
|
2343
|
+
}
|
|
2344
|
+
export function randomUUID(options?: RandomUUIDOptions): string;
|
|
2345
|
+
export function randomUUIDv7(options?: RandomUUIDOptions): string;
|
|
2049
2346
|
export function randomBytes(size: number): Buffer;
|
|
2347
|
+
export type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
|
|
2348
|
+
export type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
|
|
2349
|
+
export type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
|
|
2350
|
+
export type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
2351
|
+
export interface HashOptions {
|
|
2352
|
+
outputLength?: number | undefined;
|
|
2353
|
+
}
|
|
2050
2354
|
export interface Hash {
|
|
2051
|
-
|
|
2355
|
+
copy(options?: HashOptions): Hash;
|
|
2356
|
+
update(data: string | ArrayBufferView): Hash;
|
|
2357
|
+
update(data: string, inputEncoding: Encoding): Hash;
|
|
2052
2358
|
digest(): Buffer;
|
|
2053
|
-
digest(encoding:
|
|
2054
|
-
copy(): Hash;
|
|
2359
|
+
digest(encoding: BinaryToTextEncoding): string;
|
|
2055
2360
|
}
|
|
2056
2361
|
export interface Hmac {
|
|
2057
|
-
update(data: string |
|
|
2362
|
+
update(data: string | ArrayBufferView): Hmac;
|
|
2363
|
+
update(data: string, inputEncoding: Encoding): Hmac;
|
|
2058
2364
|
digest(): Buffer;
|
|
2059
|
-
digest(encoding:
|
|
2365
|
+
digest(encoding: BinaryToTextEncoding): string;
|
|
2366
|
+
}
|
|
2367
|
+
export function createHash(algorithm: string, options?: HashOptions): Hash;
|
|
2368
|
+
export function createHmac(
|
|
2369
|
+
algorithm: string,
|
|
2370
|
+
key: BinaryLike | KeyObject,
|
|
2371
|
+
options?: { encoding?: BufferEncoding | undefined },
|
|
2372
|
+
): Hmac;
|
|
2373
|
+
export interface OneShotDigestOptions {
|
|
2374
|
+
outputEncoding?: BinaryToTextEncoding | "buffer" | undefined;
|
|
2375
|
+
outputLength?: number | undefined;
|
|
2376
|
+
}
|
|
2377
|
+
export interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
|
|
2378
|
+
outputEncoding?: BinaryToTextEncoding | undefined;
|
|
2379
|
+
}
|
|
2380
|
+
export interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
|
|
2381
|
+
outputEncoding: "buffer";
|
|
2060
2382
|
}
|
|
2061
|
-
export function createHash(algorithm: string): Hash;
|
|
2062
|
-
export function createHmac(algorithm: string, key: string | Uint8Array): Hmac;
|
|
2063
2383
|
export function hash(
|
|
2064
2384
|
algorithm: string,
|
|
2065
|
-
data: string |
|
|
2066
|
-
|
|
2385
|
+
data: string | ArrayBufferView,
|
|
2386
|
+
options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding,
|
|
2067
2387
|
): string;
|
|
2068
|
-
export function
|
|
2069
|
-
|
|
2388
|
+
export function hash(
|
|
2389
|
+
algorithm: string,
|
|
2390
|
+
data: string | ArrayBufferView,
|
|
2391
|
+
options: OneShotDigestOptionsWithBufferEncoding | "buffer",
|
|
2392
|
+
): Buffer;
|
|
2393
|
+
export function hash(
|
|
2394
|
+
algorithm: string,
|
|
2395
|
+
data: string | ArrayBufferView,
|
|
2396
|
+
options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
|
|
2397
|
+
): string | Buffer;
|
|
2398
|
+
export function timingSafeEqual(
|
|
2399
|
+
a: ArrayBufferView | ArrayBufferLike,
|
|
2400
|
+
b: ArrayBufferView | ArrayBufferLike,
|
|
2401
|
+
): boolean;
|
|
2402
|
+
export function randomFillSync<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2070
2403
|
buffer: T,
|
|
2071
2404
|
offset?: number,
|
|
2072
2405
|
size?: number,
|
|
2073
2406
|
): T;
|
|
2407
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2408
|
+
buffer: T,
|
|
2409
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2410
|
+
): void;
|
|
2411
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2412
|
+
buffer: T,
|
|
2413
|
+
offset: number,
|
|
2414
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2415
|
+
): void;
|
|
2416
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2417
|
+
buffer: T,
|
|
2418
|
+
offset: number,
|
|
2419
|
+
size: number,
|
|
2420
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2421
|
+
): void;
|
|
2074
2422
|
export function randomInt(max: number): number;
|
|
2075
2423
|
export function randomInt(min: number, max: number): number;
|
|
2424
|
+
export function randomInt(
|
|
2425
|
+
max: number,
|
|
2426
|
+
callback: (err: Error | null, value: number) => void,
|
|
2427
|
+
): void;
|
|
2428
|
+
export function randomInt(
|
|
2429
|
+
min: number,
|
|
2430
|
+
max: number,
|
|
2431
|
+
callback: (err: Error | null, value: number) => void,
|
|
2432
|
+
): void;
|
|
2076
2433
|
export function pbkdf2Sync(
|
|
2077
2434
|
password: string | Uint8Array,
|
|
2078
2435
|
salt: string | Uint8Array,
|
|
@@ -2093,6 +2450,95 @@ declare module "crypto" {
|
|
|
2093
2450
|
callback: (error: Error | null, buffer: Buffer) => void,
|
|
2094
2451
|
): void;
|
|
2095
2452
|
export type BinaryLike = string | ArrayBuffer | ArrayBufferView;
|
|
2453
|
+
/* Cipheriv/Decipheriv: aes-128/192/256 in cbc, ctr, and gcm modes and
|
|
2454
|
+
* chacha20-poly1305. The stream.Transform members are not declared. */
|
|
2455
|
+
export type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
2456
|
+
export type CipherChaCha20Poly1305Types = "chacha20-poly1305";
|
|
2457
|
+
export type CipherKey = BinaryLike | KeyObject;
|
|
2458
|
+
export interface CipherGCMOptions {
|
|
2459
|
+
authTagLength?: number;
|
|
2460
|
+
}
|
|
2461
|
+
export interface CipherChaCha20Poly1305Options {
|
|
2462
|
+
authTagLength?: number;
|
|
2463
|
+
}
|
|
2464
|
+
export interface Cipheriv {
|
|
2465
|
+
update(data: string | ArrayBufferView): Buffer;
|
|
2466
|
+
update(data: string, inputEncoding: BufferEncoding): Buffer;
|
|
2467
|
+
update(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: BufferEncoding): string;
|
|
2468
|
+
update(
|
|
2469
|
+
data: string,
|
|
2470
|
+
inputEncoding: BufferEncoding | undefined,
|
|
2471
|
+
outputEncoding: BufferEncoding,
|
|
2472
|
+
): string;
|
|
2473
|
+
final(): Buffer;
|
|
2474
|
+
final(outputEncoding: BufferEncoding): string;
|
|
2475
|
+
setAutoPadding(autoPadding?: boolean): this;
|
|
2476
|
+
}
|
|
2477
|
+
export interface CipherGCM extends Cipheriv {
|
|
2478
|
+
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2479
|
+
getAuthTag(): Buffer;
|
|
2480
|
+
}
|
|
2481
|
+
export interface CipherChaCha20Poly1305 extends Cipheriv {
|
|
2482
|
+
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2483
|
+
getAuthTag(): Buffer;
|
|
2484
|
+
}
|
|
2485
|
+
export interface Decipheriv {
|
|
2486
|
+
update(data: ArrayBufferView): Buffer;
|
|
2487
|
+
update(data: string, inputEncoding: BufferEncoding): Buffer;
|
|
2488
|
+
update(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: BufferEncoding): string;
|
|
2489
|
+
update(
|
|
2490
|
+
data: string,
|
|
2491
|
+
inputEncoding: BufferEncoding | undefined,
|
|
2492
|
+
outputEncoding: BufferEncoding,
|
|
2493
|
+
): string;
|
|
2494
|
+
final(): Buffer;
|
|
2495
|
+
final(outputEncoding: BufferEncoding): string;
|
|
2496
|
+
setAutoPadding(autoPadding?: boolean): this;
|
|
2497
|
+
}
|
|
2498
|
+
export interface DecipherGCM extends Decipheriv {
|
|
2499
|
+
setAuthTag(buffer: ArrayBufferView): this;
|
|
2500
|
+
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2501
|
+
}
|
|
2502
|
+
export interface DecipherChaCha20Poly1305 extends Decipheriv {
|
|
2503
|
+
setAuthTag(buffer: ArrayBufferView): this;
|
|
2504
|
+
setAAD(buffer: ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
2505
|
+
}
|
|
2506
|
+
export function createCipheriv(
|
|
2507
|
+
algorithm: CipherGCMTypes,
|
|
2508
|
+
key: CipherKey,
|
|
2509
|
+
iv: BinaryLike,
|
|
2510
|
+
options?: CipherGCMOptions,
|
|
2511
|
+
): CipherGCM;
|
|
2512
|
+
export function createCipheriv(
|
|
2513
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
2514
|
+
key: CipherKey,
|
|
2515
|
+
iv: BinaryLike,
|
|
2516
|
+
options?: CipherChaCha20Poly1305Options,
|
|
2517
|
+
): CipherChaCha20Poly1305;
|
|
2518
|
+
export function createCipheriv(
|
|
2519
|
+
algorithm: string,
|
|
2520
|
+
key: CipherKey,
|
|
2521
|
+
iv: BinaryLike | null,
|
|
2522
|
+
options?: { authTagLength?: number },
|
|
2523
|
+
): Cipheriv;
|
|
2524
|
+
export function createDecipheriv(
|
|
2525
|
+
algorithm: CipherGCMTypes,
|
|
2526
|
+
key: CipherKey,
|
|
2527
|
+
iv: BinaryLike,
|
|
2528
|
+
options?: CipherGCMOptions,
|
|
2529
|
+
): DecipherGCM;
|
|
2530
|
+
export function createDecipheriv(
|
|
2531
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
2532
|
+
key: CipherKey,
|
|
2533
|
+
iv: BinaryLike,
|
|
2534
|
+
options?: CipherChaCha20Poly1305Options,
|
|
2535
|
+
): DecipherChaCha20Poly1305;
|
|
2536
|
+
export function createDecipheriv(
|
|
2537
|
+
algorithm: string,
|
|
2538
|
+
key: CipherKey,
|
|
2539
|
+
iv: BinaryLike | null,
|
|
2540
|
+
options?: { authTagLength?: number },
|
|
2541
|
+
): Decipheriv;
|
|
2096
2542
|
export interface ScryptOptions {
|
|
2097
2543
|
N?: number;
|
|
2098
2544
|
r?: number;
|
|
@@ -2123,14 +2569,14 @@ declare module "crypto" {
|
|
|
2123
2569
|
): void;
|
|
2124
2570
|
export function hkdfSync(
|
|
2125
2571
|
digest: string,
|
|
2126
|
-
ikm: BinaryLike,
|
|
2572
|
+
ikm: BinaryLike | KeyObject,
|
|
2127
2573
|
salt: BinaryLike,
|
|
2128
2574
|
info: BinaryLike,
|
|
2129
2575
|
keylen: number,
|
|
2130
2576
|
): ArrayBuffer;
|
|
2131
2577
|
export function hkdf(
|
|
2132
2578
|
digest: string,
|
|
2133
|
-
ikm: BinaryLike,
|
|
2579
|
+
ikm: BinaryLike | KeyObject,
|
|
2134
2580
|
salt: BinaryLike,
|
|
2135
2581
|
info: BinaryLike,
|
|
2136
2582
|
keylen: number,
|
|
@@ -2160,7 +2606,7 @@ declare module "crypto" {
|
|
|
2160
2606
|
* stance). Every ACCESS bakes as its literal at lowering; the object
|
|
2161
2607
|
* itself never materializes (bare crypto.constants value uses fence). */
|
|
2162
2608
|
export interface CryptoConstants {
|
|
2163
|
-
readonly OPENSSL_VERSION_NUMBER:
|
|
2609
|
+
readonly OPENSSL_VERSION_NUMBER: 810549376;
|
|
2164
2610
|
readonly SSL_OP_ALL: 2147485776;
|
|
2165
2611
|
readonly SSL_OP_ALLOW_NO_DHE_KEX: 1024;
|
|
2166
2612
|
readonly SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: 262144;
|
|
@@ -2200,6 +2646,7 @@ declare module "crypto" {
|
|
|
2200
2646
|
readonly DH_UNABLE_TO_CHECK_GENERATOR: 4;
|
|
2201
2647
|
readonly DH_NOT_SUITABLE_GENERATOR: 8;
|
|
2202
2648
|
readonly RSA_PKCS1_PADDING: 1;
|
|
2649
|
+
readonly RSA_SSLV23_PADDING: 2;
|
|
2203
2650
|
readonly RSA_NO_PADDING: 3;
|
|
2204
2651
|
readonly RSA_PKCS1_OAEP_PADDING: 4;
|
|
2205
2652
|
readonly RSA_X931_PADDING: 5;
|
|
@@ -2669,7 +3116,9 @@ declare module "node:test" {
|
|
|
2669
3116
|
}
|
|
2670
3117
|
interface TestContext {
|
|
2671
3118
|
readonly name: string;
|
|
3119
|
+
readonly fullName: string;
|
|
2672
3120
|
readonly assert: TestContextAssert;
|
|
3121
|
+
readonly mock: MockTracker;
|
|
2673
3122
|
test(name: string, fn?: TestFn): Promise<void>;
|
|
2674
3123
|
test(name: string, options: TestOptions, fn?: TestFn): Promise<void>;
|
|
2675
3124
|
skip(message?: string): void;
|
|
@@ -2719,10 +3168,45 @@ declare module "node:test" {
|
|
|
2719
3168
|
function after(fn: HookFn): void;
|
|
2720
3169
|
function beforeEach(fn: HookFn): void;
|
|
2721
3170
|
function afterEach(fn: HookFn): void;
|
|
3171
|
+
/* The mock function surface: mock.fn and t.mock.fn, with the calls log
|
|
3172
|
+
* and the implementation controls on fn.mock. */
|
|
3173
|
+
interface MockFunctionCall<
|
|
3174
|
+
F extends Function,
|
|
3175
|
+
ReturnType = F extends (...args: any) => infer T ? T : unknown,
|
|
3176
|
+
Args = F extends (...args: infer Y) => any ? Y : unknown[],
|
|
3177
|
+
> {
|
|
3178
|
+
arguments: Args;
|
|
3179
|
+
error: unknown | undefined;
|
|
3180
|
+
result: ReturnType | undefined;
|
|
3181
|
+
this: unknown;
|
|
3182
|
+
}
|
|
3183
|
+
interface MockFunctionContext<F extends Function> {
|
|
3184
|
+
readonly calls: MockFunctionCall<F>[];
|
|
3185
|
+
callCount(): number;
|
|
3186
|
+
mockImplementation(implementation: F): void;
|
|
3187
|
+
mockImplementationOnce(implementation: F, onCall?: number): void;
|
|
3188
|
+
resetCalls(): void;
|
|
3189
|
+
restore(): void;
|
|
3190
|
+
}
|
|
3191
|
+
type Mock<F extends Function> = F & { mock: MockFunctionContext<F> };
|
|
3192
|
+
interface MockTracker {
|
|
3193
|
+
fn<F extends Function = (...args: any[]) => undefined>(original?: F): Mock<F>;
|
|
3194
|
+
fn<F extends Function = (...args: any[]) => undefined, Implementation extends Function = F>(
|
|
3195
|
+
original?: F,
|
|
3196
|
+
implementation?: Implementation,
|
|
3197
|
+
): Mock<F | Implementation>;
|
|
3198
|
+
method<MockedObject extends object>(
|
|
3199
|
+
object: MockedObject,
|
|
3200
|
+
methodName: keyof MockedObject,
|
|
3201
|
+
implementation?: Function,
|
|
3202
|
+
): Mock<Function>;
|
|
3203
|
+
reset(): void;
|
|
3204
|
+
restoreAll(): void;
|
|
3205
|
+
}
|
|
3206
|
+
const mock: MockTracker;
|
|
2722
3207
|
/* Declared for typechecking only — every use fences (no lowering).
|
|
2723
3208
|
* `assert` is the module-level custom-assertion registry (v24's
|
|
2724
3209
|
* `const { assert } = require('node:test')`), not TestContext.assert. */
|
|
2725
|
-
const mock: unknown;
|
|
2726
3210
|
const assert: { register(name: string, fn: (...args: unknown[]) => unknown): void };
|
|
2727
3211
|
function run(options?: unknown): unknown;
|
|
2728
3212
|
function snapshot(...args: unknown[]): unknown;
|
|
@@ -2741,6 +3225,10 @@ declare module "node:test" {
|
|
|
2741
3225
|
snapshot,
|
|
2742
3226
|
TestContext,
|
|
2743
3227
|
TestOptions,
|
|
3228
|
+
Mock,
|
|
3229
|
+
MockFunctionContext,
|
|
3230
|
+
MockFunctionCall,
|
|
3231
|
+
MockTracker,
|
|
2744
3232
|
};
|
|
2745
3233
|
export default test;
|
|
2746
3234
|
}
|
|
@@ -2748,11 +3236,28 @@ declare module "node:test" {
|
|
|
2748
3236
|
declare module "assert" {
|
|
2749
3237
|
function assert(value: unknown, message?: string): void;
|
|
2750
3238
|
namespace assert {
|
|
3239
|
+
interface AssertionErrorOptions {
|
|
3240
|
+
message?: string | undefined;
|
|
3241
|
+
actual?: unknown;
|
|
3242
|
+
expected?: unknown;
|
|
3243
|
+
operator?: string | undefined;
|
|
3244
|
+
stackStartFn?: Function | undefined;
|
|
3245
|
+
diff?: "simple" | "full" | undefined;
|
|
3246
|
+
}
|
|
3247
|
+
class AssertionError extends Error {
|
|
3248
|
+
constructor(options: AssertionErrorOptions);
|
|
3249
|
+
actual: unknown;
|
|
3250
|
+
expected: unknown;
|
|
3251
|
+
generatedMessage: boolean;
|
|
3252
|
+
code: "ERR_ASSERTION";
|
|
3253
|
+
operator: string;
|
|
3254
|
+
}
|
|
2751
3255
|
function ok(value: unknown, message?: string): void;
|
|
2752
3256
|
function strictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2753
3257
|
function notStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2754
3258
|
function deepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2755
3259
|
function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
3260
|
+
function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2756
3261
|
function equal(actual: unknown, expected: unknown, message?: string): void;
|
|
2757
3262
|
function notEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2758
3263
|
function deepEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
@@ -2774,6 +3279,36 @@ declare module "assert" {
|
|
|
2774
3279
|
function doesNotMatch(value: string, regExp: RegExp, message?: string): void;
|
|
2775
3280
|
function ifError(value: unknown): void;
|
|
2776
3281
|
const strict: typeof import("assert/strict");
|
|
3282
|
+
interface AssertOptions {
|
|
3283
|
+
diff?: "simple" | "full" | undefined;
|
|
3284
|
+
strict?: boolean | undefined;
|
|
3285
|
+
skipPrototype?: boolean | undefined;
|
|
3286
|
+
}
|
|
3287
|
+
type AssertMethodNames =
|
|
3288
|
+
| "deepEqual"
|
|
3289
|
+
| "deepStrictEqual"
|
|
3290
|
+
| "doesNotMatch"
|
|
3291
|
+
| "doesNotReject"
|
|
3292
|
+
| "doesNotThrow"
|
|
3293
|
+
| "equal"
|
|
3294
|
+
| "fail"
|
|
3295
|
+
| "ifError"
|
|
3296
|
+
| "match"
|
|
3297
|
+
| "notDeepEqual"
|
|
3298
|
+
| "notDeepStrictEqual"
|
|
3299
|
+
| "notEqual"
|
|
3300
|
+
| "notStrictEqual"
|
|
3301
|
+
| "ok"
|
|
3302
|
+
| "partialDeepStrictEqual"
|
|
3303
|
+
| "rejects"
|
|
3304
|
+
| "strictEqual"
|
|
3305
|
+
| "throws";
|
|
3306
|
+
interface Assert extends Pick<typeof assert, AssertMethodNames> {}
|
|
3307
|
+
interface AssertStrict extends Pick<typeof strict, AssertMethodNames> {}
|
|
3308
|
+
const Assert: {
|
|
3309
|
+
new (options?: AssertOptions & { strict?: true | undefined }): AssertStrict;
|
|
3310
|
+
new (options: AssertOptions): Assert;
|
|
3311
|
+
};
|
|
2777
3312
|
}
|
|
2778
3313
|
export = assert;
|
|
2779
3314
|
}
|
|
@@ -2796,6 +3331,7 @@ declare module "assert/strict" {
|
|
|
2796
3331
|
function notStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2797
3332
|
function deepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2798
3333
|
function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
3334
|
+
function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
|
2799
3335
|
function fail(message?: string): never;
|
|
2800
3336
|
function throws(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
2801
3337
|
function doesNotThrow(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
@@ -2813,6 +3349,10 @@ declare module "assert/strict" {
|
|
|
2813
3349
|
function doesNotMatch(value: string, regExp: RegExp, message?: string): void;
|
|
2814
3350
|
function ifError(value: unknown): void;
|
|
2815
3351
|
const strict: typeof import("assert/strict");
|
|
3352
|
+
type AssertOptions = import("assert").AssertOptions;
|
|
3353
|
+
type Assert = import("assert").Assert;
|
|
3354
|
+
type AssertStrict = import("assert").AssertStrict;
|
|
3355
|
+
const Assert: typeof import("assert").Assert;
|
|
2816
3356
|
}
|
|
2817
3357
|
export = strict;
|
|
2818
3358
|
}
|
|
@@ -2902,36 +3442,92 @@ declare module "node:querystring" {
|
|
|
2902
3442
|
* on("close", cb). An open interface keeps the process alive until
|
|
2903
3443
|
* close()/EOF, Node's semantics; lines split on \n and \r\n. */
|
|
2904
3444
|
declare module "readline" {
|
|
3445
|
+
/* The non-terminal Interface over process.stdin or a stream input
|
|
3446
|
+
* (scr_readline.c). Listener registrations are statements: chaining
|
|
3447
|
+
* on()/once() results has no lowering. */
|
|
2905
3448
|
export interface Interface extends Disposable {
|
|
2906
3449
|
question(query: string, callback: (answer: string) => void): void;
|
|
2907
3450
|
close(): void;
|
|
2908
|
-
|
|
3451
|
+
pause(): this;
|
|
3452
|
+
resume(): this;
|
|
3453
|
+
prompt(preserveCursor?: boolean): void;
|
|
3454
|
+
setPrompt(prompt: string): void;
|
|
3455
|
+
getPrompt(): string;
|
|
3456
|
+
write(data: string): void;
|
|
3457
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
3458
|
+
on(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3459
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
3460
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
3461
|
+
once(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3462
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
3463
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
3464
|
+
addListener(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3465
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3466
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
2909
3467
|
[Symbol.dispose](): void;
|
|
2910
3468
|
}
|
|
2911
|
-
export
|
|
3469
|
+
export interface ReadLineOptions {
|
|
2912
3470
|
input: unknown;
|
|
2913
3471
|
output?: unknown;
|
|
2914
3472
|
terminal?: boolean;
|
|
2915
|
-
/* crlfDelay:
|
|
2916
|
-
*
|
|
2917
|
-
*
|
|
2918
|
-
*
|
|
2919
|
-
*
|
|
3473
|
+
/* Node's crlfDelay: a \n arriving within this many ms (at least 100)
|
|
3474
|
+
* after a line ended by \r is dropped. completer and the history
|
|
3475
|
+
* knobs fence by name (no interactive terminal). The options-record
|
|
3476
|
+
* stance (see http.RequestOptions) admits every key; the walk
|
|
3477
|
+
* decides. */
|
|
2920
3478
|
crlfDelay?: number;
|
|
2921
3479
|
completer?: unknown;
|
|
3480
|
+
signal?: AbortSignal;
|
|
2922
3481
|
[option: string]: unknown;
|
|
2923
|
-
}
|
|
3482
|
+
}
|
|
3483
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
3484
|
+
export function createInterface(input: unknown, output?: unknown): Interface;
|
|
2924
3485
|
}
|
|
2925
3486
|
declare module "node:readline" {
|
|
2926
3487
|
export * from "readline";
|
|
2927
3488
|
}
|
|
3489
|
+
declare module "readline/promises" {
|
|
3490
|
+
import { ReadLineOptions } from "readline";
|
|
3491
|
+
/* The readline Interface with the promise question: it resolves with
|
|
3492
|
+
* the next line, rejects with an AbortError when options.signal aborts,
|
|
3493
|
+
* and with ERR_USE_AFTER_CLOSE after close(). */
|
|
3494
|
+
export interface Interface extends Disposable {
|
|
3495
|
+
question(query: string, options?: { signal?: AbortSignal }): Promise<string>;
|
|
3496
|
+
close(): void;
|
|
3497
|
+
pause(): this;
|
|
3498
|
+
resume(): this;
|
|
3499
|
+
prompt(preserveCursor?: boolean): void;
|
|
3500
|
+
setPrompt(prompt: string): void;
|
|
3501
|
+
getPrompt(): string;
|
|
3502
|
+
write(data: string): void;
|
|
3503
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
3504
|
+
on(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3505
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
3506
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
3507
|
+
once(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3508
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
3509
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
3510
|
+
addListener(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3511
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3512
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
3513
|
+
[Symbol.dispose](): void;
|
|
3514
|
+
}
|
|
3515
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
3516
|
+
export function createInterface(input: unknown, output?: unknown): Interface;
|
|
3517
|
+
}
|
|
3518
|
+
declare module "node:readline/promises" {
|
|
3519
|
+
export * from "readline/promises";
|
|
3520
|
+
}
|
|
2928
3521
|
|
|
2929
3522
|
/* node:zlib — the one-shot zlib/raw/gzip codecs lower for string/Buffer
|
|
2930
3523
|
* inputs with Node's default options; libz links only into zlib-using
|
|
2931
3524
|
* binaries. Callback forms use the executable worker pool. Options stay
|
|
2932
|
-
* declared so reached uses receive a named SC2020 refusal
|
|
2933
|
-
*
|
|
3525
|
+
* declared so reached uses receive a named SC2020 refusal. The Deflate,
|
|
3526
|
+
* Inflate, Gzip, Gunzip, DeflateRaw, InflateRaw and Unzip streams are
|
|
3527
|
+
* runtime Transform streams; Brotli and Zstd remain outside the lowered
|
|
3528
|
+
* surface. */
|
|
2934
3529
|
declare module "zlib" {
|
|
3530
|
+
import { Transform } from "stream";
|
|
2935
3531
|
export interface ZlibOptions {
|
|
2936
3532
|
[option: string]: unknown;
|
|
2937
3533
|
}
|
|
@@ -2988,6 +3584,340 @@ declare module "zlib" {
|
|
|
2988
3584
|
export function crc32(data: string | Uint8Array, value?: number): number;
|
|
2989
3585
|
export function brotliCompressSync(data: string | Uint8Array): Buffer;
|
|
2990
3586
|
export function brotliDecompressSync(data: Uint8Array): Buffer;
|
|
3587
|
+
/* Brotli needs a codec the static runtime does not vendor: these are
|
|
3588
|
+
* declared so their uses receive the named refusal. */
|
|
3589
|
+
export function brotliCompress(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
3590
|
+
export function brotliDecompress(data: Uint8Array, callback: ZlibCallback): void;
|
|
3591
|
+
export function createBrotliCompress(options?: ZlibOptions): Transform;
|
|
3592
|
+
export function createBrotliDecompress(options?: ZlibOptions): Transform;
|
|
3593
|
+
export class BrotliCompress extends Transform {
|
|
3594
|
+
constructor(options?: ZlibOptions);
|
|
3595
|
+
}
|
|
3596
|
+
export class BrotliDecompress extends Transform {
|
|
3597
|
+
constructor(options?: ZlibOptions);
|
|
3598
|
+
}
|
|
3599
|
+
/* The stream classes: runtime Transform streams over the zlib engine
|
|
3600
|
+
* (scr_zlib_stream.c). createGzip(options) and new Gzip(options) build
|
|
3601
|
+
* the same stream; options are validated at runtime with Node's rules. */
|
|
3602
|
+
class ZlibBase extends Transform {
|
|
3603
|
+
readonly bytesWritten: number;
|
|
3604
|
+
flush(kind?: number, callback?: () => void): void;
|
|
3605
|
+
flush(callback: () => void): void;
|
|
3606
|
+
params(level: number, strategy: number, callback?: () => void): void;
|
|
3607
|
+
close(callback?: () => void): void;
|
|
3608
|
+
reset(): void;
|
|
3609
|
+
}
|
|
3610
|
+
export class Deflate extends ZlibBase {
|
|
3611
|
+
constructor(options?: ZlibOptions);
|
|
3612
|
+
}
|
|
3613
|
+
export class Inflate extends ZlibBase {
|
|
3614
|
+
constructor(options?: ZlibOptions);
|
|
3615
|
+
}
|
|
3616
|
+
export class Gzip extends ZlibBase {
|
|
3617
|
+
constructor(options?: ZlibOptions);
|
|
3618
|
+
}
|
|
3619
|
+
export class Gunzip extends ZlibBase {
|
|
3620
|
+
constructor(options?: ZlibOptions);
|
|
3621
|
+
}
|
|
3622
|
+
export class DeflateRaw extends ZlibBase {
|
|
3623
|
+
constructor(options?: ZlibOptions);
|
|
3624
|
+
}
|
|
3625
|
+
export class InflateRaw extends ZlibBase {
|
|
3626
|
+
constructor(options?: ZlibOptions);
|
|
3627
|
+
}
|
|
3628
|
+
export class Unzip extends ZlibBase {
|
|
3629
|
+
constructor(options?: ZlibOptions);
|
|
3630
|
+
}
|
|
3631
|
+
export function createDeflate(options?: ZlibOptions): Deflate;
|
|
3632
|
+
export function createInflate(options?: ZlibOptions): Inflate;
|
|
3633
|
+
export function createGzip(options?: ZlibOptions): Gzip;
|
|
3634
|
+
export function createGunzip(options?: ZlibOptions): Gunzip;
|
|
3635
|
+
export function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
|
|
3636
|
+
export function createInflateRaw(options?: ZlibOptions): InflateRaw;
|
|
3637
|
+
export function createUnzip(options?: ZlibOptions): Unzip;
|
|
3638
|
+
/* Node v24 zlib.constants, literal-typed (the CryptoConstants stance):
|
|
3639
|
+
* every access bakes as its literal; the object never materializes. The
|
|
3640
|
+
* members outside BROTLI_* are also module properties (zlib.Z_SYNC_FLUSH). */
|
|
3641
|
+
export interface ZlibConstants {
|
|
3642
|
+
readonly Z_NO_FLUSH: 0;
|
|
3643
|
+
readonly Z_PARTIAL_FLUSH: 1;
|
|
3644
|
+
readonly Z_SYNC_FLUSH: 2;
|
|
3645
|
+
readonly Z_FULL_FLUSH: 3;
|
|
3646
|
+
readonly Z_FINISH: 4;
|
|
3647
|
+
readonly Z_BLOCK: 5;
|
|
3648
|
+
readonly Z_OK: 0;
|
|
3649
|
+
readonly Z_STREAM_END: 1;
|
|
3650
|
+
readonly Z_NEED_DICT: 2;
|
|
3651
|
+
readonly Z_ERRNO: -1;
|
|
3652
|
+
readonly Z_STREAM_ERROR: -2;
|
|
3653
|
+
readonly Z_DATA_ERROR: -3;
|
|
3654
|
+
readonly Z_MEM_ERROR: -4;
|
|
3655
|
+
readonly Z_BUF_ERROR: -5;
|
|
3656
|
+
readonly Z_VERSION_ERROR: -6;
|
|
3657
|
+
readonly Z_NO_COMPRESSION: 0;
|
|
3658
|
+
readonly Z_BEST_SPEED: 1;
|
|
3659
|
+
readonly Z_BEST_COMPRESSION: 9;
|
|
3660
|
+
readonly Z_DEFAULT_COMPRESSION: -1;
|
|
3661
|
+
readonly Z_FILTERED: 1;
|
|
3662
|
+
readonly Z_HUFFMAN_ONLY: 2;
|
|
3663
|
+
readonly Z_RLE: 3;
|
|
3664
|
+
readonly Z_FIXED: 4;
|
|
3665
|
+
readonly Z_DEFAULT_STRATEGY: 0;
|
|
3666
|
+
readonly ZLIB_VERNUM: 4897;
|
|
3667
|
+
readonly DEFLATE: 1;
|
|
3668
|
+
readonly INFLATE: 2;
|
|
3669
|
+
readonly GZIP: 3;
|
|
3670
|
+
readonly GUNZIP: 4;
|
|
3671
|
+
readonly DEFLATERAW: 5;
|
|
3672
|
+
readonly INFLATERAW: 6;
|
|
3673
|
+
readonly UNZIP: 7;
|
|
3674
|
+
readonly BROTLI_DECODE: 8;
|
|
3675
|
+
readonly BROTLI_ENCODE: 9;
|
|
3676
|
+
readonly ZSTD_DECOMPRESS: 11;
|
|
3677
|
+
readonly ZSTD_COMPRESS: 10;
|
|
3678
|
+
readonly Z_MIN_WINDOWBITS: 8;
|
|
3679
|
+
readonly Z_MAX_WINDOWBITS: 15;
|
|
3680
|
+
readonly Z_DEFAULT_WINDOWBITS: 15;
|
|
3681
|
+
readonly Z_MIN_CHUNK: 64;
|
|
3682
|
+
readonly Z_MAX_CHUNK: number;
|
|
3683
|
+
readonly Z_DEFAULT_CHUNK: 16384;
|
|
3684
|
+
readonly Z_MIN_MEMLEVEL: 1;
|
|
3685
|
+
readonly Z_MAX_MEMLEVEL: 9;
|
|
3686
|
+
readonly Z_DEFAULT_MEMLEVEL: 8;
|
|
3687
|
+
readonly Z_MIN_LEVEL: -1;
|
|
3688
|
+
readonly Z_MAX_LEVEL: 9;
|
|
3689
|
+
readonly Z_DEFAULT_LEVEL: -1;
|
|
3690
|
+
readonly BROTLI_OPERATION_PROCESS: 0;
|
|
3691
|
+
readonly BROTLI_OPERATION_FLUSH: 1;
|
|
3692
|
+
readonly BROTLI_OPERATION_FINISH: 2;
|
|
3693
|
+
readonly BROTLI_OPERATION_EMIT_METADATA: 3;
|
|
3694
|
+
readonly BROTLI_PARAM_MODE: 0;
|
|
3695
|
+
readonly BROTLI_MODE_GENERIC: 0;
|
|
3696
|
+
readonly BROTLI_MODE_TEXT: 1;
|
|
3697
|
+
readonly BROTLI_MODE_FONT: 2;
|
|
3698
|
+
readonly BROTLI_DEFAULT_MODE: 0;
|
|
3699
|
+
readonly BROTLI_PARAM_QUALITY: 1;
|
|
3700
|
+
readonly BROTLI_MIN_QUALITY: 0;
|
|
3701
|
+
readonly BROTLI_MAX_QUALITY: 11;
|
|
3702
|
+
readonly BROTLI_DEFAULT_QUALITY: 11;
|
|
3703
|
+
readonly BROTLI_PARAM_LGWIN: 2;
|
|
3704
|
+
readonly BROTLI_MIN_WINDOW_BITS: 10;
|
|
3705
|
+
readonly BROTLI_MAX_WINDOW_BITS: 24;
|
|
3706
|
+
readonly BROTLI_LARGE_MAX_WINDOW_BITS: 30;
|
|
3707
|
+
readonly BROTLI_DEFAULT_WINDOW: 22;
|
|
3708
|
+
readonly BROTLI_PARAM_LGBLOCK: 3;
|
|
3709
|
+
readonly BROTLI_MIN_INPUT_BLOCK_BITS: 16;
|
|
3710
|
+
readonly BROTLI_MAX_INPUT_BLOCK_BITS: 24;
|
|
3711
|
+
readonly BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4;
|
|
3712
|
+
readonly BROTLI_PARAM_SIZE_HINT: 5;
|
|
3713
|
+
readonly BROTLI_PARAM_LARGE_WINDOW: 6;
|
|
3714
|
+
readonly BROTLI_PARAM_NPOSTFIX: 7;
|
|
3715
|
+
readonly BROTLI_PARAM_NDIRECT: 8;
|
|
3716
|
+
readonly BROTLI_DECODER_RESULT_ERROR: 0;
|
|
3717
|
+
readonly BROTLI_DECODER_RESULT_SUCCESS: 1;
|
|
3718
|
+
readonly BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2;
|
|
3719
|
+
readonly BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3;
|
|
3720
|
+
readonly BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0;
|
|
3721
|
+
readonly BROTLI_DECODER_PARAM_LARGE_WINDOW: 1;
|
|
3722
|
+
readonly BROTLI_DECODER_NO_ERROR: 0;
|
|
3723
|
+
readonly BROTLI_DECODER_SUCCESS: 1;
|
|
3724
|
+
readonly BROTLI_DECODER_NEEDS_MORE_INPUT: 2;
|
|
3725
|
+
readonly BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3;
|
|
3726
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1;
|
|
3727
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2;
|
|
3728
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3;
|
|
3729
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4;
|
|
3730
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5;
|
|
3731
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6;
|
|
3732
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7;
|
|
3733
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8;
|
|
3734
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9;
|
|
3735
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10;
|
|
3736
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11;
|
|
3737
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12;
|
|
3738
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13;
|
|
3739
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14;
|
|
3740
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15;
|
|
3741
|
+
readonly BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16;
|
|
3742
|
+
readonly BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19;
|
|
3743
|
+
readonly BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20;
|
|
3744
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21;
|
|
3745
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22;
|
|
3746
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25;
|
|
3747
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26;
|
|
3748
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27;
|
|
3749
|
+
readonly BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30;
|
|
3750
|
+
readonly BROTLI_DECODER_ERROR_UNREACHABLE: -31;
|
|
3751
|
+
readonly ZSTD_e_continue: 0;
|
|
3752
|
+
readonly ZSTD_e_flush: 1;
|
|
3753
|
+
readonly ZSTD_e_end: 2;
|
|
3754
|
+
readonly ZSTD_fast: 1;
|
|
3755
|
+
readonly ZSTD_dfast: 2;
|
|
3756
|
+
readonly ZSTD_greedy: 3;
|
|
3757
|
+
readonly ZSTD_lazy: 4;
|
|
3758
|
+
readonly ZSTD_lazy2: 5;
|
|
3759
|
+
readonly ZSTD_btlazy2: 6;
|
|
3760
|
+
readonly ZSTD_btopt: 7;
|
|
3761
|
+
readonly ZSTD_btultra: 8;
|
|
3762
|
+
readonly ZSTD_btultra2: 9;
|
|
3763
|
+
readonly ZSTD_c_compressionLevel: 100;
|
|
3764
|
+
readonly ZSTD_c_windowLog: 101;
|
|
3765
|
+
readonly ZSTD_c_hashLog: 102;
|
|
3766
|
+
readonly ZSTD_c_chainLog: 103;
|
|
3767
|
+
readonly ZSTD_c_searchLog: 104;
|
|
3768
|
+
readonly ZSTD_c_minMatch: 105;
|
|
3769
|
+
readonly ZSTD_c_targetLength: 106;
|
|
3770
|
+
readonly ZSTD_c_strategy: 107;
|
|
3771
|
+
readonly ZSTD_c_enableLongDistanceMatching: 160;
|
|
3772
|
+
readonly ZSTD_c_ldmHashLog: 161;
|
|
3773
|
+
readonly ZSTD_c_ldmMinMatch: 162;
|
|
3774
|
+
readonly ZSTD_c_ldmBucketSizeLog: 163;
|
|
3775
|
+
readonly ZSTD_c_ldmHashRateLog: 164;
|
|
3776
|
+
readonly ZSTD_c_contentSizeFlag: 200;
|
|
3777
|
+
readonly ZSTD_c_checksumFlag: 201;
|
|
3778
|
+
readonly ZSTD_c_dictIDFlag: 202;
|
|
3779
|
+
readonly ZSTD_c_nbWorkers: 400;
|
|
3780
|
+
readonly ZSTD_c_jobSize: 401;
|
|
3781
|
+
readonly ZSTD_c_overlapLog: 402;
|
|
3782
|
+
readonly ZSTD_d_windowLogMax: 100;
|
|
3783
|
+
readonly ZSTD_CLEVEL_DEFAULT: 3;
|
|
3784
|
+
readonly ZSTD_error_no_error: 0;
|
|
3785
|
+
readonly ZSTD_error_GENERIC: 1;
|
|
3786
|
+
readonly ZSTD_error_prefix_unknown: 10;
|
|
3787
|
+
readonly ZSTD_error_version_unsupported: 12;
|
|
3788
|
+
readonly ZSTD_error_frameParameter_unsupported: 14;
|
|
3789
|
+
readonly ZSTD_error_frameParameter_windowTooLarge: 16;
|
|
3790
|
+
readonly ZSTD_error_corruption_detected: 20;
|
|
3791
|
+
readonly ZSTD_error_checksum_wrong: 22;
|
|
3792
|
+
readonly ZSTD_error_literals_headerWrong: 24;
|
|
3793
|
+
readonly ZSTD_error_dictionary_corrupted: 30;
|
|
3794
|
+
readonly ZSTD_error_dictionary_wrong: 32;
|
|
3795
|
+
readonly ZSTD_error_dictionaryCreation_failed: 34;
|
|
3796
|
+
readonly ZSTD_error_parameter_unsupported: 40;
|
|
3797
|
+
readonly ZSTD_error_parameter_combination_unsupported: 41;
|
|
3798
|
+
readonly ZSTD_error_parameter_outOfBound: 42;
|
|
3799
|
+
readonly ZSTD_error_tableLog_tooLarge: 44;
|
|
3800
|
+
readonly ZSTD_error_maxSymbolValue_tooLarge: 46;
|
|
3801
|
+
readonly ZSTD_error_maxSymbolValue_tooSmall: 48;
|
|
3802
|
+
readonly ZSTD_error_stabilityCondition_notRespected: 50;
|
|
3803
|
+
readonly ZSTD_error_stage_wrong: 60;
|
|
3804
|
+
readonly ZSTD_error_init_missing: 62;
|
|
3805
|
+
readonly ZSTD_error_memory_allocation: 64;
|
|
3806
|
+
readonly ZSTD_error_workSpace_tooSmall: 66;
|
|
3807
|
+
readonly ZSTD_error_dstSize_tooSmall: 70;
|
|
3808
|
+
readonly ZSTD_error_srcSize_wrong: 72;
|
|
3809
|
+
readonly ZSTD_error_dstBuffer_null: 74;
|
|
3810
|
+
readonly ZSTD_error_noForwardProgress_destFull: 80;
|
|
3811
|
+
readonly ZSTD_error_noForwardProgress_inputEmpty: 82;
|
|
3812
|
+
}
|
|
3813
|
+
export const constants: ZlibConstants;
|
|
3814
|
+
export const Z_NO_FLUSH: 0;
|
|
3815
|
+
export const Z_PARTIAL_FLUSH: 1;
|
|
3816
|
+
export const Z_SYNC_FLUSH: 2;
|
|
3817
|
+
export const Z_FULL_FLUSH: 3;
|
|
3818
|
+
export const Z_FINISH: 4;
|
|
3819
|
+
export const Z_BLOCK: 5;
|
|
3820
|
+
export const Z_OK: 0;
|
|
3821
|
+
export const Z_STREAM_END: 1;
|
|
3822
|
+
export const Z_NEED_DICT: 2;
|
|
3823
|
+
export const Z_ERRNO: -1;
|
|
3824
|
+
export const Z_STREAM_ERROR: -2;
|
|
3825
|
+
export const Z_DATA_ERROR: -3;
|
|
3826
|
+
export const Z_MEM_ERROR: -4;
|
|
3827
|
+
export const Z_BUF_ERROR: -5;
|
|
3828
|
+
export const Z_VERSION_ERROR: -6;
|
|
3829
|
+
export const Z_NO_COMPRESSION: 0;
|
|
3830
|
+
export const Z_BEST_SPEED: 1;
|
|
3831
|
+
export const Z_BEST_COMPRESSION: 9;
|
|
3832
|
+
export const Z_DEFAULT_COMPRESSION: -1;
|
|
3833
|
+
export const Z_FILTERED: 1;
|
|
3834
|
+
export const Z_HUFFMAN_ONLY: 2;
|
|
3835
|
+
export const Z_RLE: 3;
|
|
3836
|
+
export const Z_FIXED: 4;
|
|
3837
|
+
export const Z_DEFAULT_STRATEGY: 0;
|
|
3838
|
+
export const ZLIB_VERNUM: 4897;
|
|
3839
|
+
export const DEFLATE: 1;
|
|
3840
|
+
export const INFLATE: 2;
|
|
3841
|
+
export const GZIP: 3;
|
|
3842
|
+
export const GUNZIP: 4;
|
|
3843
|
+
export const DEFLATERAW: 5;
|
|
3844
|
+
export const INFLATERAW: 6;
|
|
3845
|
+
export const UNZIP: 7;
|
|
3846
|
+
export const ZSTD_DECOMPRESS: 11;
|
|
3847
|
+
export const ZSTD_COMPRESS: 10;
|
|
3848
|
+
export const Z_MIN_WINDOWBITS: 8;
|
|
3849
|
+
export const Z_MAX_WINDOWBITS: 15;
|
|
3850
|
+
export const Z_DEFAULT_WINDOWBITS: 15;
|
|
3851
|
+
export const Z_MIN_CHUNK: 64;
|
|
3852
|
+
export const Z_MAX_CHUNK: number;
|
|
3853
|
+
export const Z_DEFAULT_CHUNK: 16384;
|
|
3854
|
+
export const Z_MIN_MEMLEVEL: 1;
|
|
3855
|
+
export const Z_MAX_MEMLEVEL: 9;
|
|
3856
|
+
export const Z_DEFAULT_MEMLEVEL: 8;
|
|
3857
|
+
export const Z_MIN_LEVEL: -1;
|
|
3858
|
+
export const Z_MAX_LEVEL: 9;
|
|
3859
|
+
export const Z_DEFAULT_LEVEL: -1;
|
|
3860
|
+
export const ZSTD_e_continue: 0;
|
|
3861
|
+
export const ZSTD_e_flush: 1;
|
|
3862
|
+
export const ZSTD_e_end: 2;
|
|
3863
|
+
export const ZSTD_fast: 1;
|
|
3864
|
+
export const ZSTD_dfast: 2;
|
|
3865
|
+
export const ZSTD_greedy: 3;
|
|
3866
|
+
export const ZSTD_lazy: 4;
|
|
3867
|
+
export const ZSTD_lazy2: 5;
|
|
3868
|
+
export const ZSTD_btlazy2: 6;
|
|
3869
|
+
export const ZSTD_btopt: 7;
|
|
3870
|
+
export const ZSTD_btultra: 8;
|
|
3871
|
+
export const ZSTD_btultra2: 9;
|
|
3872
|
+
export const ZSTD_c_compressionLevel: 100;
|
|
3873
|
+
export const ZSTD_c_windowLog: 101;
|
|
3874
|
+
export const ZSTD_c_hashLog: 102;
|
|
3875
|
+
export const ZSTD_c_chainLog: 103;
|
|
3876
|
+
export const ZSTD_c_searchLog: 104;
|
|
3877
|
+
export const ZSTD_c_minMatch: 105;
|
|
3878
|
+
export const ZSTD_c_targetLength: 106;
|
|
3879
|
+
export const ZSTD_c_strategy: 107;
|
|
3880
|
+
export const ZSTD_c_enableLongDistanceMatching: 160;
|
|
3881
|
+
export const ZSTD_c_ldmHashLog: 161;
|
|
3882
|
+
export const ZSTD_c_ldmMinMatch: 162;
|
|
3883
|
+
export const ZSTD_c_ldmBucketSizeLog: 163;
|
|
3884
|
+
export const ZSTD_c_ldmHashRateLog: 164;
|
|
3885
|
+
export const ZSTD_c_contentSizeFlag: 200;
|
|
3886
|
+
export const ZSTD_c_checksumFlag: 201;
|
|
3887
|
+
export const ZSTD_c_dictIDFlag: 202;
|
|
3888
|
+
export const ZSTD_c_nbWorkers: 400;
|
|
3889
|
+
export const ZSTD_c_jobSize: 401;
|
|
3890
|
+
export const ZSTD_c_overlapLog: 402;
|
|
3891
|
+
export const ZSTD_d_windowLogMax: 100;
|
|
3892
|
+
export const ZSTD_CLEVEL_DEFAULT: 3;
|
|
3893
|
+
export const ZSTD_error_no_error: 0;
|
|
3894
|
+
export const ZSTD_error_GENERIC: 1;
|
|
3895
|
+
export const ZSTD_error_prefix_unknown: 10;
|
|
3896
|
+
export const ZSTD_error_version_unsupported: 12;
|
|
3897
|
+
export const ZSTD_error_frameParameter_unsupported: 14;
|
|
3898
|
+
export const ZSTD_error_frameParameter_windowTooLarge: 16;
|
|
3899
|
+
export const ZSTD_error_corruption_detected: 20;
|
|
3900
|
+
export const ZSTD_error_checksum_wrong: 22;
|
|
3901
|
+
export const ZSTD_error_literals_headerWrong: 24;
|
|
3902
|
+
export const ZSTD_error_dictionary_corrupted: 30;
|
|
3903
|
+
export const ZSTD_error_dictionary_wrong: 32;
|
|
3904
|
+
export const ZSTD_error_dictionaryCreation_failed: 34;
|
|
3905
|
+
export const ZSTD_error_parameter_unsupported: 40;
|
|
3906
|
+
export const ZSTD_error_parameter_combination_unsupported: 41;
|
|
3907
|
+
export const ZSTD_error_parameter_outOfBound: 42;
|
|
3908
|
+
export const ZSTD_error_tableLog_tooLarge: 44;
|
|
3909
|
+
export const ZSTD_error_maxSymbolValue_tooLarge: 46;
|
|
3910
|
+
export const ZSTD_error_maxSymbolValue_tooSmall: 48;
|
|
3911
|
+
export const ZSTD_error_stabilityCondition_notRespected: 50;
|
|
3912
|
+
export const ZSTD_error_stage_wrong: 60;
|
|
3913
|
+
export const ZSTD_error_init_missing: 62;
|
|
3914
|
+
export const ZSTD_error_memory_allocation: 64;
|
|
3915
|
+
export const ZSTD_error_workSpace_tooSmall: 66;
|
|
3916
|
+
export const ZSTD_error_dstSize_tooSmall: 70;
|
|
3917
|
+
export const ZSTD_error_srcSize_wrong: 72;
|
|
3918
|
+
export const ZSTD_error_dstBuffer_null: 74;
|
|
3919
|
+
export const ZSTD_error_noForwardProgress_destFull: 80;
|
|
3920
|
+
export const ZSTD_error_noForwardProgress_inputEmpty: 82;
|
|
2991
3921
|
}
|
|
2992
3922
|
declare module "node:zlib" {
|
|
2993
3923
|
export * from "zlib";
|
|
@@ -3008,7 +3938,21 @@ declare module "node:zlib" {
|
|
|
3008
3938
|
* 'error'. */
|
|
3009
3939
|
declare module "net" {
|
|
3010
3940
|
export interface Socket {
|
|
3941
|
+
/* Whether the socket keeps the event loop alive (ref'd by default). */
|
|
3942
|
+
ref(): void;
|
|
3943
|
+
unref(): void;
|
|
3011
3944
|
readonly remoteAddress: string | undefined;
|
|
3945
|
+
/* The peer's fields are cached at first read, like remoteAddress; the
|
|
3946
|
+
* local ones are undefined while connecting and after close. */
|
|
3947
|
+
readonly remotePort: number | undefined;
|
|
3948
|
+
readonly remoteFamily: string | undefined;
|
|
3949
|
+
readonly localAddress: string | undefined;
|
|
3950
|
+
readonly localPort: number | undefined;
|
|
3951
|
+
readonly localFamily: string | undefined;
|
|
3952
|
+
readonly bytesRead: number;
|
|
3953
|
+
readonly connecting: boolean;
|
|
3954
|
+
readonly pending: boolean;
|
|
3955
|
+
readonly readyState: "opening" | "open" | "readOnly" | "writeOnly" | "closed";
|
|
3012
3956
|
/* true once the fd is gone (destroy() or full close) — Node's flag. */
|
|
3013
3957
|
readonly destroyed: boolean;
|
|
3014
3958
|
/* the write half is open: no end() yet, no FIN sent, fd alive. */
|
|
@@ -3018,8 +3962,11 @@ declare module "net" {
|
|
|
3018
3962
|
/* every byte the write paths accepted (buffered included — Node
|
|
3019
3963
|
* counts those too; plaintext on TLS sockets). */
|
|
3020
3964
|
readonly bytesWritten: number;
|
|
3021
|
-
write
|
|
3022
|
-
|
|
3965
|
+
/* write's callback runs once the data is flushed, with null; end's
|
|
3966
|
+
* once the socket finishes. */
|
|
3967
|
+
write(data: string | Uint8Array, callback?: (err?: Error | null) => void): void;
|
|
3968
|
+
end(callback?: () => void): void;
|
|
3969
|
+
end(data: string | Uint8Array, callback?: () => void): void;
|
|
3023
3970
|
destroy(): void;
|
|
3024
3971
|
/* Flow control: pause holds reads off (kernel/TCP backpressure is
|
|
3025
3972
|
* the buffer); resume flows — and discards without listeners, so
|
|
@@ -3028,6 +3975,8 @@ declare module "net" {
|
|
|
3028
3975
|
resume(): Socket;
|
|
3029
3976
|
/* TCP_NODELAY on the live fd; missing means true. Chains. */
|
|
3030
3977
|
setNoDelay(noDelay?: boolean): Socket;
|
|
3978
|
+
/* SO_KEEPALIVE with the initial delay in ms. Chains. */
|
|
3979
|
+
setKeepAlive(enable?: boolean, initialDelay?: number): Socket;
|
|
3031
3980
|
/* end() now, destroy once the FIN actually flushed. */
|
|
3032
3981
|
destroySoon(): void;
|
|
3033
3982
|
/* setEncoding('utf8'): 'data' delivers strings — the IncomingMessage
|
|
@@ -3038,7 +3987,8 @@ declare module "net" {
|
|
|
3038
3987
|
pipe(
|
|
3039
3988
|
destination: Socket | import("http").ServerResponse | import("http2").Http2ServerResponse,
|
|
3040
3989
|
): void;
|
|
3041
|
-
|
|
3990
|
+
/* The callback is a once('timeout') listener (removed again by 0). */
|
|
3991
|
+
setTimeout(ms: number, callback?: () => void): void;
|
|
3042
3992
|
/* The paused-mode demux surface: once('readable') + read(1) +
|
|
3043
3993
|
* unshift — read answers exactly n buffered bytes or null. */
|
|
3044
3994
|
read(size?: number): Buffer | null;
|
|
@@ -3049,30 +3999,47 @@ declare module "net" {
|
|
|
3049
3999
|
* registration never fires — Node's exact split. 'session' fires
|
|
3050
4000
|
* once with the serialized session (the received-ticket event). */
|
|
3051
4001
|
on(event: "data", listener: (chunk: Buffer) => void): void;
|
|
4002
|
+
/* After setEncoding the chunk is a string. */
|
|
4003
|
+
on(event: "data", listener: (chunk: string) => void): void;
|
|
3052
4004
|
on(
|
|
3053
|
-
event: "end" | "
|
|
4005
|
+
event: "end" | "connect" | "ready" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
3054
4006
|
listener: () => void,
|
|
3055
4007
|
): void;
|
|
4008
|
+
on(event: "close", listener: (hadError: boolean) => void): void;
|
|
3056
4009
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3057
4010
|
on(event: "session", listener: (session: Buffer) => void): void;
|
|
3058
4011
|
/* addListener IS on (Node aliases them) — the suite spells both. */
|
|
3059
4012
|
addListener(event: "data", listener: (chunk: Buffer) => void): void;
|
|
4013
|
+
/* After setEncoding the chunk is a string. */
|
|
4014
|
+
addListener(event: "data", listener: (chunk: string) => void): void;
|
|
3060
4015
|
addListener(
|
|
3061
|
-
event: "end" | "
|
|
4016
|
+
event: "end" | "connect" | "ready" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
3062
4017
|
listener: () => void,
|
|
3063
4018
|
): void;
|
|
4019
|
+
addListener(event: "close", listener: (hadError: boolean) => void): void;
|
|
3064
4020
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
3065
4021
|
addListener(event: "session", listener: (session: Buffer) => void): void;
|
|
3066
4022
|
once(event: "data", listener: (chunk: Buffer) => void): void;
|
|
4023
|
+
/* After setEncoding the chunk is a string. */
|
|
4024
|
+
once(event: "data", listener: (chunk: string) => void): void;
|
|
3067
4025
|
once(
|
|
3068
|
-
event: "end" | "
|
|
4026
|
+
event: "end" | "connect" | "ready" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
3069
4027
|
listener: () => void,
|
|
3070
4028
|
): void;
|
|
4029
|
+
once(event: "close", listener: (hadError: boolean) => void): void;
|
|
3071
4030
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3072
4031
|
once(event: "session", listener: (session: Buffer) => void): void;
|
|
3073
4032
|
}
|
|
3074
4033
|
export interface Server {
|
|
4034
|
+
/* Whether the server keeps the event loop alive (ref'd by default). */
|
|
4035
|
+
ref(): void;
|
|
4036
|
+
unref(): void;
|
|
3075
4037
|
readonly listening: boolean;
|
|
4038
|
+
/* Connections past this many are closed with a 'drop' event;
|
|
4039
|
+
* undefined (the default) or null lifts the cap. */
|
|
4040
|
+
maxConnections: number | undefined;
|
|
4041
|
+
/* cb(null, count) on the next tick. */
|
|
4042
|
+
getConnections(callback: (error: Error | null, count: number) => void): Server;
|
|
3076
4043
|
/* Node answers the server itself (`return this` chaining). */
|
|
3077
4044
|
listen(port: number, callback?: () => void): Server;
|
|
3078
4045
|
/* The positional bind address (the options form's host in argument
|
|
@@ -3094,6 +4061,7 @@ declare module "net" {
|
|
|
3094
4061
|
emit(event: "connection", socket: Socket): boolean;
|
|
3095
4062
|
on(event: "connection" | "secureConnection", listener: (socket: Socket) => void): void;
|
|
3096
4063
|
on(event: "close" | "listening", listener: () => void): void;
|
|
4064
|
+
on(event: "drop", listener: (data?: DropArgument) => void): void;
|
|
3097
4065
|
on(event: "timeout", listener: (socket: Socket) => void): void;
|
|
3098
4066
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3099
4067
|
/* The WebSocket handover: fires INSTEAD of 'request' for
|
|
@@ -3111,6 +4079,7 @@ declare module "net" {
|
|
|
3111
4079
|
/* addListener IS on (Node aliases them) — the suite spells both. */
|
|
3112
4080
|
addListener(event: "connection" | "secureConnection", listener: (socket: Socket) => void): void;
|
|
3113
4081
|
addListener(event: "close" | "listening", listener: () => void): void;
|
|
4082
|
+
addListener(event: "drop", listener: (data?: DropArgument) => void): void;
|
|
3114
4083
|
addListener(event: "timeout", listener: (socket: Socket) => void): void;
|
|
3115
4084
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
3116
4085
|
addListener(
|
|
@@ -3123,6 +4092,7 @@ declare module "net" {
|
|
|
3123
4092
|
): void;
|
|
3124
4093
|
once(event: "connection" | "secureConnection", listener: (socket: Socket) => void): void;
|
|
3125
4094
|
once(event: "close" | "listening", listener: () => void): void;
|
|
4095
|
+
once(event: "drop", listener: (data?: DropArgument) => void): void;
|
|
3126
4096
|
once(event: "timeout", listener: (socket: Socket) => void): void;
|
|
3127
4097
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3128
4098
|
once(
|
|
@@ -3134,6 +4104,20 @@ declare module "net" {
|
|
|
3134
4104
|
listener: (req: import("http").IncomingMessage, res: import("http").ServerResponse) => void,
|
|
3135
4105
|
): void;
|
|
3136
4106
|
}
|
|
4107
|
+
/* The 'drop' payload: the turned-away connection's addresses. */
|
|
4108
|
+
export interface DropArgument {
|
|
4109
|
+
localAddress?: string;
|
|
4110
|
+
localPort?: number;
|
|
4111
|
+
localFamily?: string;
|
|
4112
|
+
remoteAddress?: string;
|
|
4113
|
+
remotePort?: number;
|
|
4114
|
+
remoteFamily?: string;
|
|
4115
|
+
}
|
|
4116
|
+
export type AddressInfo = import("node:dgram").AddressInfo;
|
|
4117
|
+
/* Node's IPv4Reg and IPv6Reg tests: 4, 6, or 0 for isIP. */
|
|
4118
|
+
export function isIP(input: string): number;
|
|
4119
|
+
export function isIPv4(input: string): boolean;
|
|
4120
|
+
export function isIPv6(input: string): boolean;
|
|
3137
4121
|
/* The Socket VALUE — the `x instanceof net.Socket` narrowing target
|
|
3138
4122
|
* (the h2 compat 'connect' listener's test). Constructing bare sockets
|
|
3139
4123
|
* has no lowering; the construct signature exists for instanceof. */
|
|
@@ -3266,7 +4250,8 @@ declare module "http" {
|
|
|
3266
4250
|
destroy(): void;
|
|
3267
4251
|
setTimeout(msecs: number, callback?: () => void): this;
|
|
3268
4252
|
/* setEncoding('utf8'): 'data' delivers strings (other real encodings
|
|
3269
|
-
*
|
|
4253
|
+
* throw a "not supported yet" Error at runtime; unknown names throw
|
|
4254
|
+
* ERR_UNKNOWN_ENCODING). */
|
|
3270
4255
|
setEncoding(encoding: string): void;
|
|
3271
4256
|
/* The proxy legs: the body streams into a ServerResponse, a
|
|
3272
4257
|
* ClientRequest, or a raw Socket; natural end ends the destination. */
|
|
@@ -3298,8 +4283,11 @@ declare module "http" {
|
|
|
3298
4283
|
/* Node's writable head properties: the implicit head reads them. */
|
|
3299
4284
|
statusCode: number;
|
|
3300
4285
|
statusMessage: string | undefined;
|
|
3301
|
-
|
|
3302
|
-
|
|
4286
|
+
/* The value keeps its type: getHeader answers the number, string or
|
|
4287
|
+
* array that was set. */
|
|
4288
|
+
setHeader(name: string, value: number | string | readonly string[]): void;
|
|
4289
|
+
appendHeader(name: string, value: string | readonly string[]): void;
|
|
4290
|
+
getHeader(name: string): number | string | string[] | undefined;
|
|
3303
4291
|
getHeaderNames(): string[];
|
|
3304
4292
|
getRawHeaderNames(): string[];
|
|
3305
4293
|
getHeaders(): OutgoingHttpHeaders;
|
|
@@ -3503,7 +4491,7 @@ declare module "node:http" {
|
|
|
3503
4491
|
* that behaves exactly like a net socket (write/end/destroy/pipe and the
|
|
3504
4492
|
* data/end/close/error events are the same lowered surface). cert/key
|
|
3505
4493
|
* are PEM strings or Buffers. Handshake failures tear the socket down
|
|
3506
|
-
*
|
|
4494
|
+
* without emitting an event, Node's default for 'tlsClientError' with no listener. */
|
|
3507
4495
|
declare module "tls" {
|
|
3508
4496
|
import { Server, Socket } from "net";
|
|
3509
4497
|
export { Server };
|
|
@@ -4361,14 +5349,55 @@ declare module "node:dgram" {
|
|
|
4361
5349
|
* ENOTFOUND <hostname>") as the callback's Error argument, with "" for
|
|
4362
5350
|
* the address where Node passes undefined. */
|
|
4363
5351
|
declare module "dns" {
|
|
5352
|
+
export interface LookupAddress {
|
|
5353
|
+
address: string;
|
|
5354
|
+
family: number;
|
|
5355
|
+
}
|
|
5356
|
+
export interface LookupOptions {
|
|
5357
|
+
family?: number | "IPv4" | "IPv6";
|
|
5358
|
+
hints?: number;
|
|
5359
|
+
all?: boolean;
|
|
5360
|
+
order?: "ipv4first" | "ipv6first" | "verbatim";
|
|
5361
|
+
verbatim?: boolean;
|
|
5362
|
+
}
|
|
5363
|
+
export interface LookupOneOptions extends LookupOptions {
|
|
5364
|
+
all?: false;
|
|
5365
|
+
}
|
|
5366
|
+
export interface LookupAllOptions extends LookupOptions {
|
|
5367
|
+
all: true;
|
|
5368
|
+
}
|
|
5369
|
+
/* The callback comes with the other lookup deliveries (literal
|
|
5370
|
+
* addresses on the next tick); the options follow lib/dns.js. */
|
|
5371
|
+
export function lookup(
|
|
5372
|
+
hostname: string,
|
|
5373
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
5374
|
+
): void;
|
|
5375
|
+
export function lookup(
|
|
5376
|
+
hostname: string,
|
|
5377
|
+
family: number,
|
|
5378
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
5379
|
+
): void;
|
|
4364
5380
|
export function lookup(
|
|
4365
5381
|
hostname: string,
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
* name; undocumented keys drop like Node. */
|
|
4369
|
-
options: { family: number; [option: string]: unknown },
|
|
4370
|
-
callback: (err: Error | null, address: string, family: number) => void,
|
|
5382
|
+
options: LookupOneOptions,
|
|
5383
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
4371
5384
|
): void;
|
|
5385
|
+
export function lookup(
|
|
5386
|
+
hostname: string,
|
|
5387
|
+
options: LookupAllOptions,
|
|
5388
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
|
5389
|
+
): void;
|
|
5390
|
+
/* getnameinfo with NI_NAMEREQD: the host's name and the port's service
|
|
5391
|
+
* name (the number when it has none). */
|
|
5392
|
+
export function lookupService(
|
|
5393
|
+
address: string,
|
|
5394
|
+
port: number,
|
|
5395
|
+
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
|
5396
|
+
): void;
|
|
5397
|
+
/* The nameservers /etc/resolv.conf lists. */
|
|
5398
|
+
export function getServers(): string[];
|
|
5399
|
+
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
|
5400
|
+
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
|
4372
5401
|
}
|
|
4373
5402
|
declare module "node:dns" {
|
|
4374
5403
|
export * from "dns";
|
|
@@ -4448,6 +5477,10 @@ declare module "buffer" {
|
|
|
4448
5477
|
export const kMaxLength: number;
|
|
4449
5478
|
export const kStringMaxLength: number;
|
|
4450
5479
|
export const Buffer: BufferConstructor;
|
|
5480
|
+
export type Blob = globalThis.Blob;
|
|
5481
|
+
export type File = globalThis.File;
|
|
5482
|
+
export const Blob: typeof globalThis.Blob;
|
|
5483
|
+
export const File: typeof globalThis.File;
|
|
4451
5484
|
}
|
|
4452
5485
|
declare module "node:buffer" {
|
|
4453
5486
|
export * from "buffer";
|
|
@@ -4599,7 +5632,7 @@ declare module "stream" {
|
|
|
4599
5632
|
emitClose?: boolean;
|
|
4600
5633
|
captureRejections?: boolean;
|
|
4601
5634
|
defaultEncoding?: string;
|
|
4602
|
-
signal?:
|
|
5635
|
+
signal?: AbortSignal;
|
|
4603
5636
|
}
|
|
4604
5637
|
interface WritableOptions {
|
|
4605
5638
|
highWaterMark?: number;
|
|
@@ -4619,7 +5652,7 @@ declare module "stream" {
|
|
|
4619
5652
|
autoDestroy?: boolean;
|
|
4620
5653
|
emitClose?: boolean;
|
|
4621
5654
|
captureRejections?: boolean;
|
|
4622
|
-
signal?:
|
|
5655
|
+
signal?: AbortSignal;
|
|
4623
5656
|
}
|
|
4624
5657
|
interface DuplexOptions {
|
|
4625
5658
|
highWaterMark?: number;
|
|
@@ -4648,7 +5681,7 @@ declare module "stream" {
|
|
|
4648
5681
|
writable?: boolean;
|
|
4649
5682
|
defaultEncoding?: string;
|
|
4650
5683
|
writev?(this: Duplex, chunks: unknown[], callback: (error?: Error | null) => void): void;
|
|
4651
|
-
signal?:
|
|
5684
|
+
signal?: AbortSignal;
|
|
4652
5685
|
}
|
|
4653
5686
|
interface TransformOptions {
|
|
4654
5687
|
highWaterMark?: number;
|
|
@@ -4684,7 +5717,15 @@ declare module "stream" {
|
|
|
4684
5717
|
readable?: boolean;
|
|
4685
5718
|
writable?: boolean;
|
|
4686
5719
|
defaultEncoding?: string;
|
|
4687
|
-
signal?:
|
|
5720
|
+
signal?: AbortSignal;
|
|
5721
|
+
}
|
|
5722
|
+
|
|
5723
|
+
/* The operators' options: concurrency and highWaterMark bound map's
|
|
5724
|
+
* in-flight callbacks and queued results. */
|
|
5725
|
+
interface ArrayOptions {
|
|
5726
|
+
concurrency?: number;
|
|
5727
|
+
highWaterMark?: number;
|
|
5728
|
+
signal?: AbortSignal;
|
|
4688
5729
|
}
|
|
4689
5730
|
|
|
4690
5731
|
class Readable extends EventEmitter {
|
|
@@ -4717,6 +5758,51 @@ declare module "stream" {
|
|
|
4717
5758
|
readonly destroyed: boolean;
|
|
4718
5759
|
readonly errored: Error | null;
|
|
4719
5760
|
static from(iterable: unknown, options?: ReadableOptions): Readable;
|
|
5761
|
+
/* The Readable operators: chunks are strings or Buffers, map and
|
|
5762
|
+
* flatMap callbacks return strings or Buffers (flatMap: arrays of
|
|
5763
|
+
* them, or strings), and callbacks that declare the options argument
|
|
5764
|
+
* are refused. */
|
|
5765
|
+
map(
|
|
5766
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any,
|
|
5767
|
+
options?: ArrayOptions,
|
|
5768
|
+
): Readable;
|
|
5769
|
+
filter(
|
|
5770
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
5771
|
+
options?: ArrayOptions,
|
|
5772
|
+
): Readable;
|
|
5773
|
+
forEach(
|
|
5774
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>,
|
|
5775
|
+
options?: ArrayOptions,
|
|
5776
|
+
): Promise<void>;
|
|
5777
|
+
toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
|
|
5778
|
+
some(
|
|
5779
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
5780
|
+
options?: ArrayOptions,
|
|
5781
|
+
): Promise<boolean>;
|
|
5782
|
+
find(
|
|
5783
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
5784
|
+
options?: ArrayOptions,
|
|
5785
|
+
): Promise<any>;
|
|
5786
|
+
every(
|
|
5787
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
5788
|
+
options?: ArrayOptions,
|
|
5789
|
+
): Promise<boolean>;
|
|
5790
|
+
flatMap(
|
|
5791
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any,
|
|
5792
|
+
options?: ArrayOptions,
|
|
5793
|
+
): Readable;
|
|
5794
|
+
drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
|
|
5795
|
+
take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
|
|
5796
|
+
reduce<T = any>(
|
|
5797
|
+
fn: (previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T,
|
|
5798
|
+
initial?: undefined,
|
|
5799
|
+
options?: Pick<ArrayOptions, "signal">,
|
|
5800
|
+
): Promise<T>;
|
|
5801
|
+
reduce<T = any>(
|
|
5802
|
+
fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T,
|
|
5803
|
+
initial: T,
|
|
5804
|
+
options?: Pick<ArrayOptions, "signal">,
|
|
5805
|
+
): Promise<T>;
|
|
4720
5806
|
on(event: "data", listener: (chunk: any) => void): this;
|
|
4721
5807
|
on(event: "end" | "close" | "readable" | "pause" | "resume", listener: () => void): this;
|
|
4722
5808
|
on(event: "error", listener: (err: Error) => void): this;
|
|
@@ -4928,15 +6014,45 @@ declare module "stream" {
|
|
|
4928
6014
|
constructor(opts?: TransformOptions);
|
|
4929
6015
|
}
|
|
4930
6016
|
|
|
6017
|
+
/* addAbortSignal(signal, stream): the stream, destroyed with an
|
|
6018
|
+
* AbortError (cause: signal.reason) when the signal aborts. */
|
|
6019
|
+
function addAbortSignal<T extends Readable | Writable>(signal: AbortSignal, stream: T): T;
|
|
4931
6020
|
/* Declared so requires typecheck; each fences at its use site. */
|
|
4932
6021
|
function pipeline(...streams: unknown[]): unknown;
|
|
6022
|
+
/* compose(...streams): a Duplex that writes to the first stream and
|
|
6023
|
+
* reads from the last, with the streams running as a pipeline. */
|
|
6024
|
+
function compose(...streams: Array<Readable | Writable>): Duplex;
|
|
6025
|
+
/* finished's options: readable/writable choose which ends count,
|
|
6026
|
+
* error: false ignores 'error' events, signal aborts the wait. */
|
|
6027
|
+
interface FinishedOptions {
|
|
6028
|
+
readable?: boolean;
|
|
6029
|
+
writable?: boolean;
|
|
6030
|
+
error?: boolean;
|
|
6031
|
+
signal?: AbortSignal;
|
|
6032
|
+
}
|
|
4933
6033
|
function finished(stream: unknown, callback: (err?: Error | null) => void): () => void;
|
|
6034
|
+
function finished(
|
|
6035
|
+
stream: unknown,
|
|
6036
|
+
options: FinishedOptions | null,
|
|
6037
|
+
callback: (err?: Error | null) => void,
|
|
6038
|
+
): () => void;
|
|
4934
6039
|
/* Folds to the TARGET platform's default at compile time (win32 16384,
|
|
4935
6040
|
* else 65536 — Node's own state.js split); literal argument only. */
|
|
4936
6041
|
function getDefaultHighWaterMark(objectMode: boolean): number;
|
|
6042
|
+
/* The promise pipeline's result: a last stage that is an async
|
|
6043
|
+
* function resolves the promise with its value. */
|
|
6044
|
+
type PipelinePromise<T extends unknown[]> = T extends [
|
|
6045
|
+
...unknown[],
|
|
6046
|
+
(...args: any[]) => Promise<infer P>,
|
|
6047
|
+
]
|
|
6048
|
+
? Promise<P>
|
|
6049
|
+
: Promise<void>;
|
|
4937
6050
|
namespace promises {
|
|
4938
|
-
function pipeline(...streams:
|
|
4939
|
-
function finished(
|
|
6051
|
+
function pipeline<T extends unknown[]>(...streams: T): PipelinePromise<T>;
|
|
6052
|
+
function finished(
|
|
6053
|
+
stream: unknown,
|
|
6054
|
+
options?: FinishedOptions & { cleanup?: boolean },
|
|
6055
|
+
): Promise<void>;
|
|
4940
6056
|
}
|
|
4941
6057
|
class Stream extends EventEmitter {}
|
|
4942
6058
|
|
|
@@ -4947,12 +6063,20 @@ declare module "stream" {
|
|
|
4947
6063
|
Transform,
|
|
4948
6064
|
PassThrough,
|
|
4949
6065
|
Stream,
|
|
6066
|
+
addAbortSignal,
|
|
4950
6067
|
pipeline,
|
|
6068
|
+
compose,
|
|
4951
6069
|
finished,
|
|
4952
6070
|
getDefaultHighWaterMark,
|
|
4953
6071
|
promises,
|
|
4954
6072
|
};
|
|
4955
|
-
export type {
|
|
6073
|
+
export type {
|
|
6074
|
+
ReadableOptions,
|
|
6075
|
+
WritableOptions,
|
|
6076
|
+
DuplexOptions,
|
|
6077
|
+
TransformOptions,
|
|
6078
|
+
FinishedOptions,
|
|
6079
|
+
};
|
|
4956
6080
|
}
|
|
4957
6081
|
declare module "node:stream" {
|
|
4958
6082
|
import stream = require("stream");
|
|
@@ -4962,9 +6086,23 @@ declare module "stream/promises" {
|
|
|
4962
6086
|
/* The promise forms of finished/pipeline: a void promise the stream's
|
|
4963
6087
|
* terminal point settles (rejected with the error, or
|
|
4964
6088
|
* ERR_STREAM_PREMATURE_CLOSE on an early close). Stream arguments are
|
|
4965
|
-
* the lowered surface — iterables/generators/functions fence per site.
|
|
4966
|
-
|
|
4967
|
-
|
|
6089
|
+
* the lowered surface — iterables/generators/functions fence per site.
|
|
6090
|
+
* pipeline's trailing { signal, end } object and finished's options
|
|
6091
|
+
* (readable, writable, error, cleanup, signal) are supported. A last
|
|
6092
|
+
* stage that is an async function resolves the promise with its value. */
|
|
6093
|
+
function pipeline<T extends unknown[]>(
|
|
6094
|
+
...streams: T
|
|
6095
|
+
): T extends [...unknown[], (...args: any[]) => Promise<infer P>] ? Promise<P> : Promise<void>;
|
|
6096
|
+
function finished(
|
|
6097
|
+
stream: unknown,
|
|
6098
|
+
options?: {
|
|
6099
|
+
readable?: boolean;
|
|
6100
|
+
writable?: boolean;
|
|
6101
|
+
error?: boolean;
|
|
6102
|
+
cleanup?: boolean;
|
|
6103
|
+
signal?: AbortSignal;
|
|
6104
|
+
} | null,
|
|
6105
|
+
): Promise<void>;
|
|
4968
6106
|
export { pipeline, finished };
|
|
4969
6107
|
}
|
|
4970
6108
|
declare module "node:stream/promises" {
|
|
@@ -4978,8 +6116,8 @@ declare module "stream/consumers" {
|
|
|
4978
6116
|
* with the parse's SyntaxError), buffer (the concatenated bytes;
|
|
4979
6117
|
* string chunks contribute their utf8 bytes, Node's Blob rule).
|
|
4980
6118
|
* Stream errors reject; an early close rejects with
|
|
4981
|
-
* ERR_STREAM_PREMATURE_CLOSE. arrayBuffer
|
|
4982
|
-
*
|
|
6119
|
+
* ERR_STREAM_PREMATURE_CLOSE. arrayBuffer answers an ArrayBuffer over
|
|
6120
|
+
* the bytes; blob fences per site. */
|
|
4983
6121
|
function text(stream: unknown): Promise<string>;
|
|
4984
6122
|
function json(stream: unknown): Promise<unknown>;
|
|
4985
6123
|
function buffer(stream: unknown): Promise<Buffer>;
|