@scriptc/compiler 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/scriptc-node-fallback.d.ts +832 -55
- package/dist/backend/cycle-analysis.js +6 -1
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/executable-features.js +1 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/literals.d.ts +7 -0
- package/dist/backend/literals.js +32 -0
- package/dist/backend/literals.js.map +1 -1
- package/dist/backend/literals.test.js +17 -1
- package/dist/backend/literals.test.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +15 -4
- package/dist/backend/llvm/alloc.js +63 -25
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +62 -2
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/appended-array-literals.d.ts +2 -0
- package/dist/backend/llvm/appended-array-literals.js +109 -0
- package/dist/backend/llvm/appended-array-literals.js.map +1 -0
- package/dist/backend/llvm/appended-array-literals.test.d.ts +1 -0
- package/dist/backend/llvm/appended-array-literals.test.js +90 -0
- package/dist/backend/llvm/appended-array-literals.test.js.map +1 -0
- 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 +11 -1
- package/dist/backend/llvm/call-lifetimes.js +74 -4
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +54 -0
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/classes.js +97 -38
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +2 -2
- package/dist/backend/llvm/common.d.ts +1 -1
- package/dist/backend/llvm/common.js +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +5 -0
- package/dist/backend/llvm/dense-array-access.js +18 -13
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +15 -2
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +6 -0
- package/dist/backend/llvm/dyn.js +84 -11
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +108 -16
- package/dist/backend/llvm/emitter.js +598 -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 +174 -7
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +11 -0
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.d.ts +8 -0
- package/dist/backend/llvm/expr-callbacks.js +96 -2
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +12 -1
- package/dist/backend/llvm/expr-calls.js +133 -54
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.d.ts +7 -0
- package/dist/backend/llvm/expr-containers.js +80 -22
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-context.d.ts +2 -0
- package/dist/backend/llvm/expr-control.d.ts +8 -0
- package/dist/backend/llvm/expr-control.js +103 -69
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +21 -10
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.d.ts +7 -0
- package/dist/backend/llvm/expr-primitives.js +53 -51
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +19 -5
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.d.ts +8 -0
- package/dist/backend/llvm/expr-stream-bridges.js +111 -39
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +49 -1
- package/dist/backend/llvm/expr-stream-bridges.test.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/int32-abi.d.ts +18 -2
- package/dist/backend/llvm/int32-abi.js +23 -2
- package/dist/backend/llvm/int32-abi.js.map +1 -1
- package/dist/backend/llvm/int32-abi.test.js +75 -1
- package/dist/backend/llvm/int32-abi.test.js.map +1 -1
- 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/lib-dispatch.js +170 -28
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +181 -5
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +9 -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.js +208 -9
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +97 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +12 -6
- 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 +26 -2
- package/dist/backend/llvm/local-union-storage.js +132 -12
- package/dist/backend/llvm/local-union-storage.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +107 -1
- 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 +20 -0
- package/dist/backend/llvm/map-number-lookup.js +66 -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 +102 -0
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.js +1 -0
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +4 -0
- package/dist/backend/llvm/publish.js +3 -1
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/record-results.d.ts +29 -0
- package/dist/backend/llvm/record-results.js +260 -0
- package/dist/backend/llvm/record-results.js.map +1 -0
- package/dist/backend/llvm/reference-effects.js +15 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +29 -9
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +68 -0
- package/dist/backend/llvm/regions.js +314 -0
- package/dist/backend/llvm/regions.js.map +1 -0
- package/dist/backend/llvm/regions.test.d.ts +1 -0
- package/dist/backend/llvm/regions.test.js +173 -0
- package/dist/backend/llvm/regions.test.js.map +1 -0
- 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 +86 -13
- package/dist/backend/llvm/shapes.js +208 -54
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +68 -9
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/split-loops.js +1 -1
- package/dist/backend/llvm/split-loops.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +29 -0
- package/dist/backend/llvm/stack-objects.js +142 -0
- package/dist/backend/llvm/stack-objects.js.map +1 -0
- package/dist/backend/llvm/stack-objects.test.d.ts +1 -0
- package/dist/backend/llvm/stack-objects.test.js +255 -0
- package/dist/backend/llvm/stack-objects.test.js.map +1 -0
- package/dist/backend/llvm/string-reads.d.ts +4 -1
- package/dist/backend/llvm/string-reads.js +89 -9
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.js +5 -4
- package/dist/backend/llvm/switch-dispatch.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +13 -0
- package/dist/backend/llvm/walkers.js +108 -10
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +10 -4
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +7 -2
- package/dist/backend/native/executable.js +28 -2
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/library.js +1 -1
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +3 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +1 -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/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-core.d.ts +1 -0
- package/dist/backend/runtime-pack-core.js +1 -0
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack.test.js +1 -1
- package/dist/backend/target-diagnostics.js +17 -0
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +16 -0
- package/dist/backend/target-diagnostics.test.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.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 +12 -0
- package/dist/frontend/experimental-import.js +63 -0
- package/dist/frontend/experimental-import.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/builtin-calls.d.ts +6 -1
- package/dist/frontend/lowering/builtin-calls.js +36 -0
- package/dist/frontend/lowering/builtin-calls.js.map +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.js +3 -2
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/console.d.ts +16 -6
- package/dist/frontend/lowering/builtins/console.js +33 -9
- package/dist/frontend/lowering/builtins/console.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.js +415 -120
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.js +20 -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/json.d.ts +2 -2
- package/dist/frontend/lowering/builtins/json.js +13 -4
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- 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 +60 -12
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +1 -0
- package/dist/frontend/lowering/builtins/numbers.js +17 -0
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.d.ts +18 -0
- package/dist/frontend/lowering/builtins/operating-system.js +361 -1
- package/dist/frontend/lowering/builtins/operating-system.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 +122 -17
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +109 -2
- package/dist/frontend/lowering/builtins/promises.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/text-codecs.d.ts +3 -4
- package/dist/frontend/lowering/builtins/text-codecs.js +3 -4
- package/dist/frontend/lowering/builtins/text-codecs.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 +20 -2
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/checked-promise-all.d.ts +10 -3
- package/dist/frontend/lowering/checked-promise-all.js +52 -6
- package/dist/frontend/lowering/checked-promise-all.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +8 -3
- package/dist/frontend/lowering/class-dynamic-dispatch.js +159 -32
- 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 +33 -6
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +8 -4
- package/dist/frontend/lowering/containers/array-construction.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/array-pipelines.js +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.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/containers/string-and-regexp.js +91 -0
- package/dist/frontend/lowering/containers/string-and-regexp.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/cycle-initialization.d.ts +18 -2
- package/dist/frontend/lowering/cycle-initialization.js +166 -12
- package/dist/frontend/lowering/cycle-initialization.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.js +7 -2
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.test.js +28 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -1
- package/dist/frontend/lowering/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 +21 -68
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/generator-delegation.d.ts +8 -0
- package/dist/frontend/lowering/generator-delegation.js +231 -10
- package/dist/frontend/lowering/generator-delegation.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/lifetime-regions.d.ts +11 -0
- package/dist/frontend/lowering/lifetime-regions.js +216 -0
- package/dist/frontend/lowering/lifetime-regions.js.map +1 -0
- package/dist/frontend/lowering/lower-array-sort.d.ts +40 -3
- package/dist/frontend/lowering/lower-array-sort.js +661 -194
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +103 -4
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +2 -2
- package/dist/frontend/lowering/lower-async-iteration.d.ts +6 -3
- package/dist/frontend/lowering/lower-async-iteration.js +248 -2
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +173 -111
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +12 -5
- package/dist/frontend/lowering/lower-classes.js +156 -11
- 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-console.d.ts +13 -0
- package/dist/frontend/lowering/lower-console.js +460 -4
- package/dist/frontend/lowering/lower-console.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +6 -0
- package/dist/frontend/lowering/lower-event-emitter.js +124 -38
- package/dist/frontend/lowering/lower-event-emitter.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 +247 -42
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +15 -7
- package/dist/frontend/lowering/lower-generators.js +183 -99
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +8 -1
- package/dist/frontend/lowering/lower-inspect.js +247 -28
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +1 -1
- package/dist/frontend/lowering/lower-modules.js +27 -17
- 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.js +39 -14
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +11 -1
- package/dist/frontend/lowering/lower-stdlib.js +45 -4
- 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 +112 -23
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +234 -22
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +45 -6
- package/dist/frontend/lowering/lowerer.js +360 -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/regex-span-reads.d.ts +12 -0
- package/dist/frontend/lowering/regex-span-reads.js +164 -0
- package/dist/frontend/lowering/regex-span-reads.js.map +1 -0
- 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 +7 -3
- package/dist/frontend/lowering/surfaces.js +385 -32
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/var-hoisting.d.ts +3 -0
- package/dist/frontend/lowering/var-hoisting.js +261 -0
- package/dist/frontend/lowering/var-hoisting.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 +6 -5
- package/dist/frontend/program.js +42 -22
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +13 -0
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/resolve.js +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 +2 -2
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +28 -1
- package/dist/frontend/type-mapper.js +288 -30
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.js +6 -4
- 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 +108 -2
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +436 -53
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/function-references.test.js +1 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/int32-slots.js +2 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/intrinsic-signatures.js +2 -0
- package/dist/ir/intrinsic-signatures.js.map +1 -1
- package/dist/ir/ir.d.ts +129 -36
- package/dist/ir/ir.js +42 -1
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +1 -0
- package/dist/ir/runtime-features.js +116 -5
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.js +1 -2
- package/dist/ir/scalar-records.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 +250 -34
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +125 -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/prepare.js +3 -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 +537 -142
|
@@ -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;
|
|
@@ -86,12 +106,14 @@ declare namespace NodeJS {
|
|
|
86
106
|
* util.inspect rendering — so the parameters are unknown[], like stock
|
|
87
107
|
* lib's console; values inspect cannot render statically (functions inside
|
|
88
108
|
* composites, class hierarchies, `any`) fence per argument with a hint.
|
|
109
|
+
* assert, count/countReset, dir/dirxml, group/groupCollapsed/groupEnd,
|
|
110
|
+
* table, time/timeEnd/timeLog, clear, and the inspector-only
|
|
111
|
+
* profile/profileEnd/timeStamp lower on the global console.
|
|
89
112
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* tsc cannot reproduce. */
|
|
113
|
+
* trace is declared too — not because it lowers, but so a program that
|
|
114
|
+
* typechecks under its own tsc reaches the per-site SC2020 fence naming
|
|
115
|
+
* the member and the supported surface, instead of dying on a
|
|
116
|
+
* fallback-manufactured type error its own tsc cannot reproduce. */
|
|
95
117
|
declare const console: {
|
|
96
118
|
log(...args: unknown[]): void;
|
|
97
119
|
info(...args: unknown[]): void;
|
|
@@ -112,13 +134,15 @@ declare const console: {
|
|
|
112
134
|
timeEnd(label?: string): void;
|
|
113
135
|
timeLog(label?: string, ...data: unknown[]): void;
|
|
114
136
|
timeStamp(label?: string): void;
|
|
137
|
+
profile(label?: string): void;
|
|
138
|
+
profileEnd(label?: string): void;
|
|
115
139
|
trace(...data: unknown[]): void;
|
|
116
140
|
Console: typeof import("node:console").Console;
|
|
117
141
|
};
|
|
118
142
|
|
|
119
143
|
// node:console exports the global instance's bound methods and the Console
|
|
120
144
|
// constructor: instances over process.stdout/process.stderr or node:stream
|
|
121
|
-
// writables lower their log/info/debug/error/warn members;
|
|
145
|
+
// writables lower their log/info/debug/error/warn members; their remaining
|
|
122
146
|
// methods are declared so unsupported uses reach named fences.
|
|
123
147
|
type ScriptcConsoleMethods = typeof console;
|
|
124
148
|
declare module "node:console" {
|
|
@@ -145,6 +169,8 @@ declare module "node:console" {
|
|
|
145
169
|
export const timeEnd: ScriptcConsoleMethods["timeEnd"];
|
|
146
170
|
export const timeLog: ScriptcConsoleMethods["timeLog"];
|
|
147
171
|
export const timeStamp: ScriptcConsoleMethods["timeStamp"];
|
|
172
|
+
export const profile: ScriptcConsoleMethods["profile"];
|
|
173
|
+
export const profileEnd: ScriptcConsoleMethods["profileEnd"];
|
|
148
174
|
export const trace: ScriptcConsoleMethods["trace"];
|
|
149
175
|
const defaultConsole: ScriptcConsoleMethods & { Console: typeof Console };
|
|
150
176
|
export default defaultConsole;
|
|
@@ -223,12 +249,26 @@ declare var process: {
|
|
|
223
249
|
readonly execPath: string;
|
|
224
250
|
getuid?(): number;
|
|
225
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;
|
|
226
262
|
/* signal admits null (Node treats it as the SIGTERM default) — real
|
|
227
263
|
* callers forward a `string | null` result field. */
|
|
228
264
|
kill(pid: number, signal?: string | number | null): true;
|
|
229
265
|
env: { [name: string]: string | undefined };
|
|
230
266
|
/** Numeric writes set the status returned by ordinary program exit. */
|
|
231
267
|
exitCode?: number;
|
|
268
|
+
/* Silence and throw DeprecationWarnings (util.deprecate,
|
|
269
|
+
* process.emitWarning); undefined until assigned. */
|
|
270
|
+
noDeprecation?: boolean;
|
|
271
|
+
throwDeprecation?: boolean;
|
|
232
272
|
/* `never`, like @types/node: code behind an early-exit guard narrows
|
|
233
273
|
* (`if (!x) process.exit(1)` proves x afterwards) — typed `void` the
|
|
234
274
|
* guard narrows nothing and correct programs fail preflight. The
|
|
@@ -245,6 +285,7 @@ declare var process: {
|
|
|
245
285
|
cpuUsage(previousValue?: NodeJS.CpuUsage): NodeJS.CpuUsage;
|
|
246
286
|
threadCpuUsage(previousValue?: NodeJS.CpuUsage): NodeJS.CpuUsage;
|
|
247
287
|
resourceUsage(): NodeJS.ResourceUsage;
|
|
288
|
+
memoryUsage: NodeJS.MemoryUsageFn;
|
|
248
289
|
availableMemory(): number;
|
|
249
290
|
constrainedMemory(): number;
|
|
250
291
|
/* The loop's own bookkeeping: 'Timeout' per armed timer, 'Immediate'
|
|
@@ -830,6 +871,44 @@ declare var Response: {
|
|
|
830
871
|
json(data: unknown, init?: ResponseInit): Response;
|
|
831
872
|
redirect(url: string | URL, status?: number): Response;
|
|
832
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
|
+
};
|
|
833
912
|
interface Request {
|
|
834
913
|
readonly method: string;
|
|
835
914
|
readonly url: string;
|
|
@@ -1024,10 +1103,48 @@ declare module "diagnostics_channel" {
|
|
|
1024
1103
|
* anchored monotonic clock (Node's timeOrigin for a compiled program),
|
|
1025
1104
|
* fractional milliseconds. The .bind(performance) spelling lowers to the
|
|
1026
1105
|
* same clock as a plain () => number function value (the mockable-clock idiom's
|
|
1027
|
-
* getTimestamp)
|
|
1106
|
+
* getTimestamp). mark, measure, the getEntries family and the clears run
|
|
1107
|
+
* over the thread's performance timeline with Node's validation; everything
|
|
1108
|
+
* else fences per member. */
|
|
1028
1109
|
declare module "node:perf_hooks" {
|
|
1110
|
+
export type EntryType = "mark" | "measure";
|
|
1111
|
+
export class PerformanceEntry {
|
|
1112
|
+
protected constructor();
|
|
1113
|
+
readonly duration: number;
|
|
1114
|
+
readonly name: string;
|
|
1115
|
+
readonly startTime: number;
|
|
1116
|
+
readonly entryType: EntryType;
|
|
1117
|
+
toJSON(): any;
|
|
1118
|
+
}
|
|
1119
|
+
export class PerformanceMark extends PerformanceEntry {
|
|
1120
|
+
readonly detail: any;
|
|
1121
|
+
readonly duration: 0;
|
|
1122
|
+
readonly entryType: "mark";
|
|
1123
|
+
}
|
|
1124
|
+
export class PerformanceMeasure extends PerformanceEntry {
|
|
1125
|
+
readonly detail: any;
|
|
1126
|
+
readonly entryType: "measure";
|
|
1127
|
+
}
|
|
1128
|
+
export interface MarkOptions {
|
|
1129
|
+
detail?: unknown | undefined;
|
|
1130
|
+
startTime?: number | undefined;
|
|
1131
|
+
}
|
|
1132
|
+
export interface MeasureOptions {
|
|
1133
|
+
detail?: unknown;
|
|
1134
|
+
duration?: number | undefined;
|
|
1135
|
+
end?: number | string | undefined;
|
|
1136
|
+
start?: number | string | undefined;
|
|
1137
|
+
}
|
|
1029
1138
|
export interface Performance {
|
|
1030
1139
|
now(): number;
|
|
1140
|
+
mark(name: string, options?: MarkOptions): PerformanceMark;
|
|
1141
|
+
measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
|
|
1142
|
+
measure(name: string, options: MeasureOptions): PerformanceMeasure;
|
|
1143
|
+
getEntries(): PerformanceEntry[];
|
|
1144
|
+
getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
|
|
1145
|
+
getEntriesByType(type: EntryType): PerformanceEntry[];
|
|
1146
|
+
clearMarks(name?: string): void;
|
|
1147
|
+
clearMeasures(name?: string): void;
|
|
1031
1148
|
}
|
|
1032
1149
|
export const performance: Performance;
|
|
1033
1150
|
}
|
|
@@ -1170,6 +1287,9 @@ declare module "node:fs" {
|
|
|
1170
1287
|
options: string | { encoding?: string | null } | null,
|
|
1171
1288
|
): string | Buffer;
|
|
1172
1289
|
export function chownSync(path: string, uid: number, gid: number): void;
|
|
1290
|
+
export function lchownSync(path: string, uid: number, gid: number): void;
|
|
1291
|
+
export function fchownSync(fd: number, uid: number, gid: number): void;
|
|
1292
|
+
export function truncateSync(path: string, len?: number): void;
|
|
1173
1293
|
/* The 2-argument form only (Node's mode flags have no lowering). The
|
|
1174
1294
|
* destination is created or truncated carrying the SOURCE's mode. */
|
|
1175
1295
|
export function copyFileSync(src: string, dest: string): void;
|
|
@@ -1207,6 +1327,51 @@ declare module "node:fs" {
|
|
|
1207
1327
|
* fences by name at the call site; undocumented keys drop like Node. */
|
|
1208
1328
|
options: { withFileTypes: true; recursive?: boolean; [option: string]: unknown },
|
|
1209
1329
|
): Dirent[];
|
|
1330
|
+
/* fs.globSync / fs.glob: Node's glob walk over the file system. Patterns
|
|
1331
|
+
* are minimatch globs (case-insensitive on macOS and Windows); results
|
|
1332
|
+
* are relative to cwd unless the pattern is absolute. withFileTypes must
|
|
1333
|
+
* be a literal so the result type is known. */
|
|
1334
|
+
export interface GlobOptions {
|
|
1335
|
+
cwd?: string | URL;
|
|
1336
|
+
exclude?: readonly string[] | ((fileName: string) => boolean);
|
|
1337
|
+
followSymlinks?: boolean;
|
|
1338
|
+
withFileTypes?: false;
|
|
1339
|
+
}
|
|
1340
|
+
export interface GlobOptionsWithFileTypes {
|
|
1341
|
+
cwd?: string | URL;
|
|
1342
|
+
exclude?: readonly string[];
|
|
1343
|
+
followSymlinks?: boolean;
|
|
1344
|
+
withFileTypes: true;
|
|
1345
|
+
}
|
|
1346
|
+
export function globSync(pattern: string | readonly string[], options?: GlobOptions): string[];
|
|
1347
|
+
export function globSync(
|
|
1348
|
+
pattern: string | readonly string[],
|
|
1349
|
+
options: GlobOptionsWithFileTypes,
|
|
1350
|
+
): Dirent[];
|
|
1351
|
+
export function glob(
|
|
1352
|
+
pattern: string | readonly string[],
|
|
1353
|
+
callback: (err: NodeJS.ErrnoException | null, matches?: string[]) => void,
|
|
1354
|
+
): void;
|
|
1355
|
+
export function glob(
|
|
1356
|
+
pattern: string | readonly string[],
|
|
1357
|
+
options: GlobOptions,
|
|
1358
|
+
callback: (err: NodeJS.ErrnoException | null, matches?: string[]) => void,
|
|
1359
|
+
): void;
|
|
1360
|
+
/* fs.Dir: an open directory stream (opendirSync, fs.promises.opendir)
|
|
1361
|
+
* read one Dirent at a time in OS order; utf8 names, no recursive walk. */
|
|
1362
|
+
export interface Dir {
|
|
1363
|
+
readonly path: string;
|
|
1364
|
+
readSync(): Dirent | null;
|
|
1365
|
+
read(): Promise<Dirent | null>;
|
|
1366
|
+
closeSync(): void;
|
|
1367
|
+
close(): Promise<void>;
|
|
1368
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
|
|
1369
|
+
}
|
|
1370
|
+
export interface OpenDirOptions {
|
|
1371
|
+
encoding?: "utf8" | "utf-8";
|
|
1372
|
+
bufferSize?: number;
|
|
1373
|
+
}
|
|
1374
|
+
export function opendirSync(path: string, options?: OpenDirOptions): Dir;
|
|
1210
1375
|
export function accessSync(path: string, mode?: number): void;
|
|
1211
1376
|
export function mkdtempSync(prefix: string): string;
|
|
1212
1377
|
export const constants: {
|
|
@@ -1233,14 +1398,28 @@ declare module "node:fs" {
|
|
|
1233
1398
|
isFile(): boolean;
|
|
1234
1399
|
isDirectory(): boolean;
|
|
1235
1400
|
isSymbolicLink(): boolean;
|
|
1401
|
+
isBlockDevice(): boolean;
|
|
1402
|
+
isCharacterDevice(): boolean;
|
|
1403
|
+
isFIFO(): boolean;
|
|
1404
|
+
isSocket(): boolean;
|
|
1236
1405
|
readonly dev: number;
|
|
1406
|
+
readonly mode: number;
|
|
1407
|
+
readonly nlink: number;
|
|
1408
|
+
readonly uid: number;
|
|
1409
|
+
readonly gid: number;
|
|
1410
|
+
readonly rdev: number;
|
|
1411
|
+
readonly blksize: number;
|
|
1237
1412
|
readonly ino: number;
|
|
1238
1413
|
readonly size: number;
|
|
1239
1414
|
readonly blocks: number;
|
|
1240
|
-
readonly nlink: number;
|
|
1241
1415
|
readonly atimeMs: number;
|
|
1242
1416
|
readonly mtimeMs: number;
|
|
1243
1417
|
readonly ctimeMs: number;
|
|
1418
|
+
readonly birthtimeMs: number;
|
|
1419
|
+
readonly atime: Date;
|
|
1420
|
+
readonly mtime: Date;
|
|
1421
|
+
readonly ctime: Date;
|
|
1422
|
+
readonly birthtime: Date;
|
|
1244
1423
|
}
|
|
1245
1424
|
export function statSync(path: string): Stats;
|
|
1246
1425
|
export function lstatSync(path: string): Stats;
|
|
@@ -1529,6 +1708,10 @@ declare module "fs/promises" {
|
|
|
1529
1708
|
mtime: number | string | Date,
|
|
1530
1709
|
): Promise<void>;
|
|
1531
1710
|
export function readFile(path: string, encoding: "utf8" | "utf-8"): Promise<string>;
|
|
1711
|
+
export function readFile(
|
|
1712
|
+
path: string,
|
|
1713
|
+
options: BufferEncoding | { encoding: BufferEncoding },
|
|
1714
|
+
): Promise<string>;
|
|
1532
1715
|
export function readFile(path: string): Promise<Buffer>;
|
|
1533
1716
|
export function writeFile(
|
|
1534
1717
|
path: string,
|
|
@@ -1555,6 +1738,15 @@ declare module "fs/promises" {
|
|
|
1555
1738
|
[option: string]: unknown;
|
|
1556
1739
|
},
|
|
1557
1740
|
): Promise<import("node:fs").Dirent[]>;
|
|
1741
|
+
/* The async iterator form of fs.globSync: iterate it with for await. */
|
|
1742
|
+
export function glob(
|
|
1743
|
+
pattern: string | readonly string[],
|
|
1744
|
+
options?: import("node:fs").GlobOptions,
|
|
1745
|
+
): AsyncIterableIterator<string>;
|
|
1746
|
+
export function glob(
|
|
1747
|
+
pattern: string | readonly string[],
|
|
1748
|
+
options: import("node:fs").GlobOptionsWithFileTypes,
|
|
1749
|
+
): AsyncIterableIterator<import("node:fs").Dirent>;
|
|
1558
1750
|
export function rm(path: string): Promise<void>;
|
|
1559
1751
|
export function stat(path: string): Promise<import("node:fs").Stats>;
|
|
1560
1752
|
export function statfs(
|
|
@@ -1573,7 +1765,19 @@ declare module "fs/promises" {
|
|
|
1573
1765
|
export function lstat(path: string): Promise<import("node:fs").Stats>;
|
|
1574
1766
|
export function unlink(path: string): Promise<void>;
|
|
1575
1767
|
export function chmod(path: string, mode: number): Promise<void>;
|
|
1768
|
+
export function chown(path: string, uid: number, gid: number): Promise<void>;
|
|
1769
|
+
export function lchown(path: string, uid: number, gid: number): Promise<void>;
|
|
1770
|
+
export function access(path: string, mode?: number): Promise<void>;
|
|
1771
|
+
export function truncate(path: string, len?: number): Promise<void>;
|
|
1772
|
+
export function appendFile(path: string, data: string | Uint8Array): Promise<void>;
|
|
1773
|
+
export function copyFile(src: string, dest: string): Promise<void>;
|
|
1774
|
+
export function mkdtemp(prefix: string): Promise<string>;
|
|
1775
|
+
export function rmdir(path: string): Promise<void>;
|
|
1576
1776
|
export function rename(oldPath: string, newPath: string): Promise<void>;
|
|
1777
|
+
export function opendir(
|
|
1778
|
+
path: string,
|
|
1779
|
+
options?: import("node:fs").OpenDirOptions,
|
|
1780
|
+
): Promise<import("node:fs").Dir>;
|
|
1577
1781
|
}
|
|
1578
1782
|
declare module "node:fs/promises" {
|
|
1579
1783
|
export * from "fs/promises";
|
|
@@ -1583,7 +1787,7 @@ declare module "node:fs/promises" {
|
|
|
1583
1787
|
* on posix triples, path.win32 under a win32 triple, with the posix and
|
|
1584
1788
|
* win32 namespaces answering their own platform anywhere. Every function
|
|
1585
1789
|
* is a pure string algorithm matching Node's implementations
|
|
1586
|
-
*
|
|
1790
|
+
* exactly; join/resolve are variadic like Node's. */
|
|
1587
1791
|
declare module "path" {
|
|
1588
1792
|
export function join(...paths: string[]): string;
|
|
1589
1793
|
export function resolve(...paths: string[]): string;
|
|
@@ -1594,6 +1798,27 @@ declare module "path" {
|
|
|
1594
1798
|
export function isAbsolute(path: string): boolean;
|
|
1595
1799
|
export function relative(from: string, to: string): string;
|
|
1596
1800
|
export function toNamespacedPath(path: string): string;
|
|
1801
|
+
/* matchesGlob() is Node's glob matcher: brace expansion, extglobs, POSIX
|
|
1802
|
+
* classes and the ** and dot rules. */
|
|
1803
|
+
export function matchesGlob(path: string, pattern: string): boolean;
|
|
1804
|
+
/* parse() splits a path into its root, directory, base, extension and
|
|
1805
|
+
* name; format() joins those fields back (Node's `||` defaults). */
|
|
1806
|
+
export interface ParsedPath {
|
|
1807
|
+
root: string;
|
|
1808
|
+
dir: string;
|
|
1809
|
+
base: string;
|
|
1810
|
+
ext: string;
|
|
1811
|
+
name: string;
|
|
1812
|
+
}
|
|
1813
|
+
export interface FormatInputPathObject {
|
|
1814
|
+
root?: string | undefined;
|
|
1815
|
+
dir?: string | undefined;
|
|
1816
|
+
base?: string | undefined;
|
|
1817
|
+
ext?: string | undefined;
|
|
1818
|
+
name?: string | undefined;
|
|
1819
|
+
}
|
|
1820
|
+
export function parse(path: string): ParsedPath;
|
|
1821
|
+
export function format(pathObject: FormatInputPathObject): string;
|
|
1597
1822
|
/* The union @types/node declares: the bare module answers the TARGET
|
|
1598
1823
|
* platform's value (a compile-time constant — "\\"/";" under a win32
|
|
1599
1824
|
* triple, "/"/":" everywhere else). */
|
|
@@ -1619,6 +1844,9 @@ declare module "path/posix" {
|
|
|
1619
1844
|
export function isAbsolute(path: string): boolean;
|
|
1620
1845
|
export function relative(from: string, to: string): string;
|
|
1621
1846
|
export function toNamespacedPath(path: string): string;
|
|
1847
|
+
export function matchesGlob(path: string, pattern: string): boolean;
|
|
1848
|
+
export function parse(path: string): import("path").ParsedPath;
|
|
1849
|
+
export function format(pathObject: import("path").FormatInputPathObject): string;
|
|
1622
1850
|
export const sep: "/";
|
|
1623
1851
|
export const delimiter: ":";
|
|
1624
1852
|
}
|
|
@@ -1635,6 +1863,9 @@ declare module "path/win32" {
|
|
|
1635
1863
|
export function isAbsolute(path: string): boolean;
|
|
1636
1864
|
export function relative(from: string, to: string): string;
|
|
1637
1865
|
export function toNamespacedPath(path: string): string;
|
|
1866
|
+
export function matchesGlob(path: string, pattern: string): boolean;
|
|
1867
|
+
export function parse(path: string): import("path").ParsedPath;
|
|
1868
|
+
export function format(pathObject: import("path").FormatInputPathObject): string;
|
|
1638
1869
|
export const sep: "\\";
|
|
1639
1870
|
export const delimiter: ";";
|
|
1640
1871
|
}
|
|
@@ -1692,6 +1923,237 @@ declare module "os" {
|
|
|
1692
1923
|
}
|
|
1693
1924
|
export type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
|
|
1694
1925
|
export function networkInterfaces(): { [name: string]: NetworkInterfaceInfo[] | undefined };
|
|
1926
|
+
/* Host facts, libuv's answers: model/speed/times per logical CPU, the
|
|
1927
|
+
* host name, the 1/5/15-minute load averages, uptime in seconds, free
|
|
1928
|
+
* memory in bytes, process.arch, uname's machine and version fields,
|
|
1929
|
+
* the byte order, and a process's scheduling priority (an omitted pid
|
|
1930
|
+
* is the current process). Shapes mirror @types/node's. */
|
|
1931
|
+
export interface CpuInfo {
|
|
1932
|
+
model: string;
|
|
1933
|
+
speed: number;
|
|
1934
|
+
times: {
|
|
1935
|
+
user: number;
|
|
1936
|
+
nice: number;
|
|
1937
|
+
sys: number;
|
|
1938
|
+
idle: number;
|
|
1939
|
+
irq: number;
|
|
1940
|
+
};
|
|
1941
|
+
}
|
|
1942
|
+
export function cpus(): CpuInfo[];
|
|
1943
|
+
export function hostname(): string;
|
|
1944
|
+
export function loadavg(): number[];
|
|
1945
|
+
export function uptime(): number;
|
|
1946
|
+
export function freemem(): number;
|
|
1947
|
+
export function arch(): string;
|
|
1948
|
+
export function machine(): string;
|
|
1949
|
+
export function version(): string;
|
|
1950
|
+
export function endianness(): "BE" | "LE";
|
|
1951
|
+
export function getPriority(pid?: number): number;
|
|
1952
|
+
/* The TARGET platform's null device ("\\\\.\\nul" under a win32 triple). */
|
|
1953
|
+
export const devNull: string;
|
|
1954
|
+
/* The platform's constants: null-prototype objects with read-only
|
|
1955
|
+
* members, `signals` frozen (Node's internalBinding('constants').os). */
|
|
1956
|
+
export type SignalConstants = {
|
|
1957
|
+
[
|
|
1958
|
+
key in
|
|
1959
|
+
| "SIGABRT"
|
|
1960
|
+
| "SIGALRM"
|
|
1961
|
+
| "SIGBUS"
|
|
1962
|
+
| "SIGCHLD"
|
|
1963
|
+
| "SIGCONT"
|
|
1964
|
+
| "SIGFPE"
|
|
1965
|
+
| "SIGHUP"
|
|
1966
|
+
| "SIGILL"
|
|
1967
|
+
| "SIGINT"
|
|
1968
|
+
| "SIGIO"
|
|
1969
|
+
| "SIGIOT"
|
|
1970
|
+
| "SIGKILL"
|
|
1971
|
+
| "SIGPIPE"
|
|
1972
|
+
| "SIGPOLL"
|
|
1973
|
+
| "SIGPROF"
|
|
1974
|
+
| "SIGPWR"
|
|
1975
|
+
| "SIGQUIT"
|
|
1976
|
+
| "SIGSEGV"
|
|
1977
|
+
| "SIGSTKFLT"
|
|
1978
|
+
| "SIGSTOP"
|
|
1979
|
+
| "SIGSYS"
|
|
1980
|
+
| "SIGTERM"
|
|
1981
|
+
| "SIGTRAP"
|
|
1982
|
+
| "SIGTSTP"
|
|
1983
|
+
| "SIGTTIN"
|
|
1984
|
+
| "SIGTTOU"
|
|
1985
|
+
| "SIGUNUSED"
|
|
1986
|
+
| "SIGURG"
|
|
1987
|
+
| "SIGUSR1"
|
|
1988
|
+
| "SIGUSR2"
|
|
1989
|
+
| "SIGVTALRM"
|
|
1990
|
+
| "SIGWINCH"
|
|
1991
|
+
| "SIGXCPU"
|
|
1992
|
+
| "SIGXFSZ"
|
|
1993
|
+
| "SIGBREAK"
|
|
1994
|
+
| "SIGLOST"
|
|
1995
|
+
| "SIGINFO"
|
|
1996
|
+
]: number;
|
|
1997
|
+
};
|
|
1998
|
+
export namespace constants {
|
|
1999
|
+
const UV_UDP_REUSEADDR: number;
|
|
2000
|
+
namespace signals {}
|
|
2001
|
+
const signals: SignalConstants;
|
|
2002
|
+
namespace errno {
|
|
2003
|
+
const E2BIG: number;
|
|
2004
|
+
const EACCES: number;
|
|
2005
|
+
const EADDRINUSE: number;
|
|
2006
|
+
const EADDRNOTAVAIL: number;
|
|
2007
|
+
const EAFNOSUPPORT: number;
|
|
2008
|
+
const EAGAIN: number;
|
|
2009
|
+
const EALREADY: number;
|
|
2010
|
+
const EBADF: number;
|
|
2011
|
+
const EBADMSG: number;
|
|
2012
|
+
const EBUSY: number;
|
|
2013
|
+
const ECANCELED: number;
|
|
2014
|
+
const ECHILD: number;
|
|
2015
|
+
const ECONNABORTED: number;
|
|
2016
|
+
const ECONNREFUSED: number;
|
|
2017
|
+
const ECONNRESET: number;
|
|
2018
|
+
const EDEADLK: number;
|
|
2019
|
+
const EDESTADDRREQ: number;
|
|
2020
|
+
const EDOM: number;
|
|
2021
|
+
const EDQUOT: number;
|
|
2022
|
+
const EEXIST: number;
|
|
2023
|
+
const EFAULT: number;
|
|
2024
|
+
const EFBIG: number;
|
|
2025
|
+
const EHOSTUNREACH: number;
|
|
2026
|
+
const EIDRM: number;
|
|
2027
|
+
const EILSEQ: number;
|
|
2028
|
+
const EINPROGRESS: number;
|
|
2029
|
+
const EINTR: number;
|
|
2030
|
+
const EINVAL: number;
|
|
2031
|
+
const EIO: number;
|
|
2032
|
+
const EISCONN: number;
|
|
2033
|
+
const EISDIR: number;
|
|
2034
|
+
const ELOOP: number;
|
|
2035
|
+
const EMFILE: number;
|
|
2036
|
+
const EMLINK: number;
|
|
2037
|
+
const EMSGSIZE: number;
|
|
2038
|
+
const EMULTIHOP: number;
|
|
2039
|
+
const ENAMETOOLONG: number;
|
|
2040
|
+
const ENETDOWN: number;
|
|
2041
|
+
const ENETRESET: number;
|
|
2042
|
+
const ENETUNREACH: number;
|
|
2043
|
+
const ENFILE: number;
|
|
2044
|
+
const ENOBUFS: number;
|
|
2045
|
+
const ENODATA: number;
|
|
2046
|
+
const ENODEV: number;
|
|
2047
|
+
const ENOENT: number;
|
|
2048
|
+
const ENOEXEC: number;
|
|
2049
|
+
const ENOLCK: number;
|
|
2050
|
+
const ENOLINK: number;
|
|
2051
|
+
const ENOMEM: number;
|
|
2052
|
+
const ENOMSG: number;
|
|
2053
|
+
const ENOPROTOOPT: number;
|
|
2054
|
+
const ENOSPC: number;
|
|
2055
|
+
const ENOSR: number;
|
|
2056
|
+
const ENOSTR: number;
|
|
2057
|
+
const ENOSYS: number;
|
|
2058
|
+
const ENOTCONN: number;
|
|
2059
|
+
const ENOTDIR: number;
|
|
2060
|
+
const ENOTEMPTY: number;
|
|
2061
|
+
const ENOTSOCK: number;
|
|
2062
|
+
const ENOTSUP: number;
|
|
2063
|
+
const ENOTTY: number;
|
|
2064
|
+
const ENXIO: number;
|
|
2065
|
+
const EOPNOTSUPP: number;
|
|
2066
|
+
const EOVERFLOW: number;
|
|
2067
|
+
const EPERM: number;
|
|
2068
|
+
const EPIPE: number;
|
|
2069
|
+
const EPROTO: number;
|
|
2070
|
+
const EPROTONOSUPPORT: number;
|
|
2071
|
+
const EPROTOTYPE: number;
|
|
2072
|
+
const ERANGE: number;
|
|
2073
|
+
const EROFS: number;
|
|
2074
|
+
const ESPIPE: number;
|
|
2075
|
+
const ESRCH: number;
|
|
2076
|
+
const ESTALE: number;
|
|
2077
|
+
const ETIME: number;
|
|
2078
|
+
const ETIMEDOUT: number;
|
|
2079
|
+
const ETXTBSY: number;
|
|
2080
|
+
const EWOULDBLOCK: number;
|
|
2081
|
+
const EXDEV: number;
|
|
2082
|
+
const WSAEINTR: number;
|
|
2083
|
+
const WSAEBADF: number;
|
|
2084
|
+
const WSAEACCES: number;
|
|
2085
|
+
const WSAEFAULT: number;
|
|
2086
|
+
const WSAEINVAL: number;
|
|
2087
|
+
const WSAEMFILE: number;
|
|
2088
|
+
const WSAEWOULDBLOCK: number;
|
|
2089
|
+
const WSAEINPROGRESS: number;
|
|
2090
|
+
const WSAEALREADY: number;
|
|
2091
|
+
const WSAENOTSOCK: number;
|
|
2092
|
+
const WSAEDESTADDRREQ: number;
|
|
2093
|
+
const WSAEMSGSIZE: number;
|
|
2094
|
+
const WSAEPROTOTYPE: number;
|
|
2095
|
+
const WSAENOPROTOOPT: number;
|
|
2096
|
+
const WSAEPROTONOSUPPORT: number;
|
|
2097
|
+
const WSAESOCKTNOSUPPORT: number;
|
|
2098
|
+
const WSAEOPNOTSUPP: number;
|
|
2099
|
+
const WSAEPFNOSUPPORT: number;
|
|
2100
|
+
const WSAEAFNOSUPPORT: number;
|
|
2101
|
+
const WSAEADDRINUSE: number;
|
|
2102
|
+
const WSAEADDRNOTAVAIL: number;
|
|
2103
|
+
const WSAENETDOWN: number;
|
|
2104
|
+
const WSAENETUNREACH: number;
|
|
2105
|
+
const WSAENETRESET: number;
|
|
2106
|
+
const WSAECONNABORTED: number;
|
|
2107
|
+
const WSAECONNRESET: number;
|
|
2108
|
+
const WSAENOBUFS: number;
|
|
2109
|
+
const WSAEISCONN: number;
|
|
2110
|
+
const WSAENOTCONN: number;
|
|
2111
|
+
const WSAESHUTDOWN: number;
|
|
2112
|
+
const WSAETOOMANYREFS: number;
|
|
2113
|
+
const WSAETIMEDOUT: number;
|
|
2114
|
+
const WSAECONNREFUSED: number;
|
|
2115
|
+
const WSAELOOP: number;
|
|
2116
|
+
const WSAENAMETOOLONG: number;
|
|
2117
|
+
const WSAEHOSTDOWN: number;
|
|
2118
|
+
const WSAEHOSTUNREACH: number;
|
|
2119
|
+
const WSAENOTEMPTY: number;
|
|
2120
|
+
const WSAEPROCLIM: number;
|
|
2121
|
+
const WSAEUSERS: number;
|
|
2122
|
+
const WSAEDQUOT: number;
|
|
2123
|
+
const WSAESTALE: number;
|
|
2124
|
+
const WSAEREMOTE: number;
|
|
2125
|
+
const WSASYSNOTREADY: number;
|
|
2126
|
+
const WSAVERNOTSUPPORTED: number;
|
|
2127
|
+
const WSANOTINITIALISED: number;
|
|
2128
|
+
const WSAEDISCON: number;
|
|
2129
|
+
const WSAENOMORE: number;
|
|
2130
|
+
const WSAECANCELLED: number;
|
|
2131
|
+
const WSAEINVALIDPROCTABLE: number;
|
|
2132
|
+
const WSAEINVALIDPROVIDER: number;
|
|
2133
|
+
const WSAEPROVIDERFAILEDINIT: number;
|
|
2134
|
+
const WSASYSCALLFAILURE: number;
|
|
2135
|
+
const WSASERVICE_NOT_FOUND: number;
|
|
2136
|
+
const WSATYPE_NOT_FOUND: number;
|
|
2137
|
+
const WSA_E_NO_MORE: number;
|
|
2138
|
+
const WSA_E_CANCELLED: number;
|
|
2139
|
+
const WSAEREFUSED: number;
|
|
2140
|
+
}
|
|
2141
|
+
namespace dlopen {
|
|
2142
|
+
const RTLD_LAZY: number;
|
|
2143
|
+
const RTLD_NOW: number;
|
|
2144
|
+
const RTLD_GLOBAL: number;
|
|
2145
|
+
const RTLD_LOCAL: number;
|
|
2146
|
+
const RTLD_DEEPBIND: number;
|
|
2147
|
+
}
|
|
2148
|
+
namespace priority {
|
|
2149
|
+
const PRIORITY_LOW: number;
|
|
2150
|
+
const PRIORITY_BELOW_NORMAL: number;
|
|
2151
|
+
const PRIORITY_NORMAL: number;
|
|
2152
|
+
const PRIORITY_ABOVE_NORMAL: number;
|
|
2153
|
+
const PRIORITY_HIGH: number;
|
|
2154
|
+
const PRIORITY_HIGHEST: number;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
1695
2157
|
}
|
|
1696
2158
|
declare module "node:os" {
|
|
1697
2159
|
export * from "os";
|
|
@@ -1761,7 +2223,10 @@ declare var URLSearchParams: {
|
|
|
1761
2223
|
/* node:url — the file-URL bridge pair. fileURLToPath accepts a URL value
|
|
1762
2224
|
* or a URL string and throws Node's TypeErrors (non-file scheme, encoded
|
|
1763
2225
|
* slashes, non-empty host); pathToFileURL resolves the path and percent-
|
|
1764
|
-
* encodes it into a file: URL.
|
|
2226
|
+
* encodes it into a file: URL. The legacy API: parse() answers a Url
|
|
2227
|
+
* object, format() serializes a Url-shaped object, a string, or a URL,
|
|
2228
|
+
* resolve() resolves one URL string against another, and the domain pair
|
|
2229
|
+
* converts a hostname to and from its Punycode form. */
|
|
1765
2230
|
declare module "url" {
|
|
1766
2231
|
export type URL = globalThis.URL;
|
|
1767
2232
|
export type URLSearchParams = globalThis.URLSearchParams;
|
|
@@ -1770,6 +2235,65 @@ declare module "url" {
|
|
|
1770
2235
|
export function fileURLToPath(url: string | URL, options?: { windows?: boolean }): string;
|
|
1771
2236
|
export function fileURLToPathBuffer(url: string | URL, options?: { windows?: boolean }): Buffer;
|
|
1772
2237
|
export function pathToFileURL(path: string, options?: { windows?: boolean }): URL;
|
|
2238
|
+
export interface UrlObject {
|
|
2239
|
+
auth?: string | null | undefined;
|
|
2240
|
+
hash?: string | null | undefined;
|
|
2241
|
+
host?: string | null | undefined;
|
|
2242
|
+
hostname?: string | null | undefined;
|
|
2243
|
+
href?: string | null | undefined;
|
|
2244
|
+
pathname?: string | null | undefined;
|
|
2245
|
+
protocol?: string | null | undefined;
|
|
2246
|
+
search?: string | null | undefined;
|
|
2247
|
+
slashes?: boolean | null | undefined;
|
|
2248
|
+
port?: string | number | null | undefined;
|
|
2249
|
+
query?: string | null | import("querystring").ParsedUrlQueryInput | undefined;
|
|
2250
|
+
}
|
|
2251
|
+
export interface Url {
|
|
2252
|
+
auth: string | null;
|
|
2253
|
+
hash: string | null;
|
|
2254
|
+
host: string | null;
|
|
2255
|
+
hostname: string | null;
|
|
2256
|
+
href: string;
|
|
2257
|
+
path: string | null;
|
|
2258
|
+
pathname: string | null;
|
|
2259
|
+
protocol: string | null;
|
|
2260
|
+
search: string | null;
|
|
2261
|
+
slashes: boolean | null;
|
|
2262
|
+
port: string | null;
|
|
2263
|
+
query: string | null | import("querystring").ParsedUrlQuery;
|
|
2264
|
+
}
|
|
2265
|
+
export interface UrlWithParsedQuery extends Url {
|
|
2266
|
+
query: import("querystring").ParsedUrlQuery;
|
|
2267
|
+
}
|
|
2268
|
+
export interface UrlWithStringQuery extends Url {
|
|
2269
|
+
query: string | null;
|
|
2270
|
+
}
|
|
2271
|
+
export interface URLFormatOptions {
|
|
2272
|
+
auth?: boolean | undefined;
|
|
2273
|
+
fragment?: boolean | undefined;
|
|
2274
|
+
search?: boolean | undefined;
|
|
2275
|
+
unicode?: boolean | undefined;
|
|
2276
|
+
}
|
|
2277
|
+
export function parse(
|
|
2278
|
+
urlString: string,
|
|
2279
|
+
parseQueryString?: false,
|
|
2280
|
+
slashesDenoteHost?: boolean,
|
|
2281
|
+
): UrlWithStringQuery;
|
|
2282
|
+
export function parse(
|
|
2283
|
+
urlString: string,
|
|
2284
|
+
parseQueryString: true,
|
|
2285
|
+
slashesDenoteHost?: boolean,
|
|
2286
|
+
): UrlWithParsedQuery;
|
|
2287
|
+
export function parse(
|
|
2288
|
+
urlString: string,
|
|
2289
|
+
parseQueryString: boolean,
|
|
2290
|
+
slashesDenoteHost?: boolean,
|
|
2291
|
+
): Url;
|
|
2292
|
+
export function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
2293
|
+
export function format(urlObject: UrlObject | string): string;
|
|
2294
|
+
export function resolve(from: string, to: string): string;
|
|
2295
|
+
export function domainToASCII(domain: string): string;
|
|
2296
|
+
export function domainToUnicode(domain: string): string;
|
|
1773
2297
|
}
|
|
1774
2298
|
declare module "node:url" {
|
|
1775
2299
|
export * from "url";
|
|
@@ -1777,34 +2301,127 @@ declare module "node:url" {
|
|
|
1777
2301
|
|
|
1778
2302
|
/* node:crypto: the static hashing/MAC/random/key-derivation utility slice. */
|
|
1779
2303
|
declare module "crypto" {
|
|
1780
|
-
export
|
|
2304
|
+
export type KeyObjectType = "secret" | "public" | "private";
|
|
2305
|
+
export interface JsonWebKey {
|
|
2306
|
+
kty?: string;
|
|
2307
|
+
k?: string;
|
|
2308
|
+
}
|
|
2309
|
+
export interface JwkKeyExportOptions {
|
|
2310
|
+
format: "jwk";
|
|
2311
|
+
}
|
|
2312
|
+
export interface KeyExportOptions {
|
|
2313
|
+
format?: "buffer" | undefined;
|
|
2314
|
+
}
|
|
2315
|
+
/** Secret keys only; the asymmetric key types are not available. */
|
|
2316
|
+
export class KeyObject {
|
|
2317
|
+
private constructor();
|
|
2318
|
+
type: KeyObjectType;
|
|
2319
|
+
symmetricKeySize?: number;
|
|
2320
|
+
asymmetricKeyType?: string;
|
|
2321
|
+
export(options?: KeyExportOptions): Buffer;
|
|
2322
|
+
export(options: JwkKeyExportOptions): JsonWebKey;
|
|
2323
|
+
equals(otherKeyObject: KeyObject): boolean;
|
|
2324
|
+
}
|
|
2325
|
+
export function createSecretKey(key: ArrayBufferView | ArrayBufferLike): KeyObject;
|
|
2326
|
+
export function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
|
|
2327
|
+
export function generateKeySync(type: "hmac" | "aes", options: { length: number }): KeyObject;
|
|
2328
|
+
export function generateKey(
|
|
2329
|
+
type: "hmac" | "aes",
|
|
2330
|
+
options: { length: number },
|
|
2331
|
+
callback: (err: Error | null, key: KeyObject) => void,
|
|
2332
|
+
): void;
|
|
2333
|
+
export interface RandomUUIDOptions {
|
|
2334
|
+
disableEntropyCache?: boolean | undefined;
|
|
2335
|
+
}
|
|
2336
|
+
export function randomUUID(options?: RandomUUIDOptions): string;
|
|
2337
|
+
export function randomUUIDv7(options?: RandomUUIDOptions): string;
|
|
1781
2338
|
export function randomBytes(size: number): Buffer;
|
|
2339
|
+
export type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
|
|
2340
|
+
export type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
|
|
2341
|
+
export type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
|
|
2342
|
+
export type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
2343
|
+
export interface HashOptions {
|
|
2344
|
+
outputLength?: number | undefined;
|
|
2345
|
+
}
|
|
1782
2346
|
export interface Hash {
|
|
1783
|
-
|
|
2347
|
+
copy(options?: HashOptions): Hash;
|
|
2348
|
+
update(data: string | ArrayBufferView): Hash;
|
|
2349
|
+
update(data: string, inputEncoding: Encoding): Hash;
|
|
1784
2350
|
digest(): Buffer;
|
|
1785
|
-
digest(encoding:
|
|
1786
|
-
copy(): Hash;
|
|
2351
|
+
digest(encoding: BinaryToTextEncoding): string;
|
|
1787
2352
|
}
|
|
1788
2353
|
export interface Hmac {
|
|
1789
|
-
update(data: string |
|
|
2354
|
+
update(data: string | ArrayBufferView): Hmac;
|
|
2355
|
+
update(data: string, inputEncoding: Encoding): Hmac;
|
|
1790
2356
|
digest(): Buffer;
|
|
1791
|
-
digest(encoding:
|
|
2357
|
+
digest(encoding: BinaryToTextEncoding): string;
|
|
2358
|
+
}
|
|
2359
|
+
export function createHash(algorithm: string, options?: HashOptions): Hash;
|
|
2360
|
+
export function createHmac(
|
|
2361
|
+
algorithm: string,
|
|
2362
|
+
key: BinaryLike | KeyObject,
|
|
2363
|
+
options?: { encoding?: BufferEncoding | undefined },
|
|
2364
|
+
): Hmac;
|
|
2365
|
+
export interface OneShotDigestOptions {
|
|
2366
|
+
outputEncoding?: BinaryToTextEncoding | "buffer" | undefined;
|
|
2367
|
+
outputLength?: number | undefined;
|
|
2368
|
+
}
|
|
2369
|
+
export interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
|
|
2370
|
+
outputEncoding?: BinaryToTextEncoding | undefined;
|
|
2371
|
+
}
|
|
2372
|
+
export interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
|
|
2373
|
+
outputEncoding: "buffer";
|
|
1792
2374
|
}
|
|
1793
|
-
export function createHash(algorithm: string): Hash;
|
|
1794
|
-
export function createHmac(algorithm: string, key: string | Uint8Array): Hmac;
|
|
1795
2375
|
export function hash(
|
|
1796
2376
|
algorithm: string,
|
|
1797
|
-
data: string |
|
|
1798
|
-
|
|
2377
|
+
data: string | ArrayBufferView,
|
|
2378
|
+
options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding,
|
|
1799
2379
|
): string;
|
|
1800
|
-
export function
|
|
1801
|
-
|
|
2380
|
+
export function hash(
|
|
2381
|
+
algorithm: string,
|
|
2382
|
+
data: string | ArrayBufferView,
|
|
2383
|
+
options: OneShotDigestOptionsWithBufferEncoding | "buffer",
|
|
2384
|
+
): Buffer;
|
|
2385
|
+
export function hash(
|
|
2386
|
+
algorithm: string,
|
|
2387
|
+
data: string | ArrayBufferView,
|
|
2388
|
+
options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
|
|
2389
|
+
): string | Buffer;
|
|
2390
|
+
export function timingSafeEqual(
|
|
2391
|
+
a: ArrayBufferView | ArrayBufferLike,
|
|
2392
|
+
b: ArrayBufferView | ArrayBufferLike,
|
|
2393
|
+
): boolean;
|
|
2394
|
+
export function randomFillSync<T extends ArrayBufferView | ArrayBufferLike>(
|
|
1802
2395
|
buffer: T,
|
|
1803
2396
|
offset?: number,
|
|
1804
2397
|
size?: number,
|
|
1805
2398
|
): T;
|
|
2399
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2400
|
+
buffer: T,
|
|
2401
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2402
|
+
): void;
|
|
2403
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2404
|
+
buffer: T,
|
|
2405
|
+
offset: number,
|
|
2406
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2407
|
+
): void;
|
|
2408
|
+
export function randomFill<T extends ArrayBufferView | ArrayBufferLike>(
|
|
2409
|
+
buffer: T,
|
|
2410
|
+
offset: number,
|
|
2411
|
+
size: number,
|
|
2412
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2413
|
+
): void;
|
|
1806
2414
|
export function randomInt(max: number): number;
|
|
1807
2415
|
export function randomInt(min: number, max: number): number;
|
|
2416
|
+
export function randomInt(
|
|
2417
|
+
max: number,
|
|
2418
|
+
callback: (err: Error | null, value: number) => void,
|
|
2419
|
+
): void;
|
|
2420
|
+
export function randomInt(
|
|
2421
|
+
min: number,
|
|
2422
|
+
max: number,
|
|
2423
|
+
callback: (err: Error | null, value: number) => void,
|
|
2424
|
+
): void;
|
|
1808
2425
|
export function pbkdf2Sync(
|
|
1809
2426
|
password: string | Uint8Array,
|
|
1810
2427
|
salt: string | Uint8Array,
|
|
@@ -1855,14 +2472,14 @@ declare module "crypto" {
|
|
|
1855
2472
|
): void;
|
|
1856
2473
|
export function hkdfSync(
|
|
1857
2474
|
digest: string,
|
|
1858
|
-
ikm: BinaryLike,
|
|
2475
|
+
ikm: BinaryLike | KeyObject,
|
|
1859
2476
|
salt: BinaryLike,
|
|
1860
2477
|
info: BinaryLike,
|
|
1861
2478
|
keylen: number,
|
|
1862
2479
|
): ArrayBuffer;
|
|
1863
2480
|
export function hkdf(
|
|
1864
2481
|
digest: string,
|
|
1865
|
-
ikm: BinaryLike,
|
|
2482
|
+
ikm: BinaryLike | KeyObject,
|
|
1866
2483
|
salt: BinaryLike,
|
|
1867
2484
|
info: BinaryLike,
|
|
1868
2485
|
keylen: number,
|
|
@@ -1892,7 +2509,7 @@ declare module "crypto" {
|
|
|
1892
2509
|
* stance). Every ACCESS bakes as its literal at lowering; the object
|
|
1893
2510
|
* itself never materializes (bare crypto.constants value uses fence). */
|
|
1894
2511
|
export interface CryptoConstants {
|
|
1895
|
-
readonly OPENSSL_VERSION_NUMBER:
|
|
2512
|
+
readonly OPENSSL_VERSION_NUMBER: 810549376;
|
|
1896
2513
|
readonly SSL_OP_ALL: 2147485776;
|
|
1897
2514
|
readonly SSL_OP_ALLOW_NO_DHE_KEX: 1024;
|
|
1898
2515
|
readonly SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: 262144;
|
|
@@ -1932,6 +2549,7 @@ declare module "crypto" {
|
|
|
1932
2549
|
readonly DH_UNABLE_TO_CHECK_GENERATOR: 4;
|
|
1933
2550
|
readonly DH_NOT_SUITABLE_GENERATOR: 8;
|
|
1934
2551
|
readonly RSA_PKCS1_PADDING: 1;
|
|
2552
|
+
readonly RSA_SSLV23_PADDING: 2;
|
|
1935
2553
|
readonly RSA_NO_PADDING: 3;
|
|
1936
2554
|
readonly RSA_PKCS1_OAEP_PADDING: 4;
|
|
1937
2555
|
readonly RSA_X931_PADDING: 5;
|
|
@@ -2191,6 +2809,60 @@ declare module "util" {
|
|
|
2191
2809
|
options?: { validateStream?: boolean; stream?: unknown },
|
|
2192
2810
|
): string;
|
|
2193
2811
|
export function parseEnv(content: string): { [key: string]: string | undefined };
|
|
2812
|
+
export function inherits(constructor: unknown, superConstructor: unknown): void;
|
|
2813
|
+
export interface DeprecateOptions {
|
|
2814
|
+
modifyPrototype?: boolean;
|
|
2815
|
+
}
|
|
2816
|
+
export function deprecate<T extends Function>(
|
|
2817
|
+
fn: T,
|
|
2818
|
+
msg: string,
|
|
2819
|
+
code?: string,
|
|
2820
|
+
options?: DeprecateOptions,
|
|
2821
|
+
): T;
|
|
2822
|
+
/* The callback receives null on success and the rejection reason
|
|
2823
|
+
* otherwise (falsy reasons arrive as ERR_FALSY_VALUE_REJECTION). */
|
|
2824
|
+
export function callbackify(
|
|
2825
|
+
fn: () => Promise<void>,
|
|
2826
|
+
): (callback: (err: NodeJS.ErrnoException | null) => void) => void;
|
|
2827
|
+
export function callbackify<TResult>(
|
|
2828
|
+
fn: () => Promise<TResult>,
|
|
2829
|
+
): (callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
2830
|
+
export function callbackify<T1>(
|
|
2831
|
+
fn: (arg1: T1) => Promise<void>,
|
|
2832
|
+
): (arg1: T1, callback: (err: NodeJS.ErrnoException | null) => void) => void;
|
|
2833
|
+
export function callbackify<T1, TResult>(
|
|
2834
|
+
fn: (arg1: T1) => Promise<TResult>,
|
|
2835
|
+
): (arg1: T1, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
2836
|
+
export function callbackify<T1, T2>(
|
|
2837
|
+
fn: (arg1: T1, arg2: T2) => Promise<void>,
|
|
2838
|
+
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null) => void) => void;
|
|
2839
|
+
export function callbackify<T1, T2, TResult>(
|
|
2840
|
+
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
|
|
2841
|
+
): (
|
|
2842
|
+
arg1: T1,
|
|
2843
|
+
arg2: T2,
|
|
2844
|
+
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
|
2845
|
+
) => void;
|
|
2846
|
+
export function callbackify<T1, T2, T3>(
|
|
2847
|
+
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
|
|
2848
|
+
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null) => void) => void;
|
|
2849
|
+
export function callbackify<T1, T2, T3, TResult>(
|
|
2850
|
+
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
|
|
2851
|
+
): (
|
|
2852
|
+
arg1: T1,
|
|
2853
|
+
arg2: T2,
|
|
2854
|
+
arg3: T3,
|
|
2855
|
+
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
|
2856
|
+
) => void;
|
|
2857
|
+
export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
|
|
2858
|
+
export interface DebugLogger extends DebugLoggerFunction {
|
|
2859
|
+
enabled: boolean;
|
|
2860
|
+
}
|
|
2861
|
+
export function debuglog(
|
|
2862
|
+
section: string,
|
|
2863
|
+
callback?: (fn: DebugLoggerFunction) => void,
|
|
2864
|
+
): DebugLogger;
|
|
2865
|
+
export { debuglog as debug };
|
|
2194
2866
|
export type TextEncoder = globalThis.TextEncoder;
|
|
2195
2867
|
export type TextDecoder = globalThis.TextDecoder;
|
|
2196
2868
|
export var TextEncoder: typeof globalThis.TextEncoder;
|
|
@@ -2580,29 +3252,82 @@ declare module "node:querystring" {
|
|
|
2580
3252
|
* on("close", cb). An open interface keeps the process alive until
|
|
2581
3253
|
* close()/EOF, Node's semantics; lines split on \n and \r\n. */
|
|
2582
3254
|
declare module "readline" {
|
|
3255
|
+
/* The non-terminal Interface over process.stdin or a stream input
|
|
3256
|
+
* (scr_readline.c). Listener registrations are statements: chaining
|
|
3257
|
+
* on()/once() results has no lowering. */
|
|
2583
3258
|
export interface Interface extends Disposable {
|
|
2584
3259
|
question(query: string, callback: (answer: string) => void): void;
|
|
2585
3260
|
close(): void;
|
|
2586
|
-
|
|
3261
|
+
pause(): this;
|
|
3262
|
+
resume(): this;
|
|
3263
|
+
prompt(preserveCursor?: boolean): void;
|
|
3264
|
+
setPrompt(prompt: string): void;
|
|
3265
|
+
getPrompt(): string;
|
|
3266
|
+
write(data: string): void;
|
|
3267
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
3268
|
+
on(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3269
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
3270
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
3271
|
+
once(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3272
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
3273
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
3274
|
+
addListener(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3275
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3276
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
2587
3277
|
[Symbol.dispose](): void;
|
|
2588
3278
|
}
|
|
2589
|
-
export
|
|
3279
|
+
export interface ReadLineOptions {
|
|
2590
3280
|
input: unknown;
|
|
2591
3281
|
output?: unknown;
|
|
2592
3282
|
terminal?: boolean;
|
|
2593
|
-
/* crlfDelay:
|
|
2594
|
-
*
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2597
|
-
*
|
|
3283
|
+
/* Node's crlfDelay: a \n arriving within this many ms (at least 100)
|
|
3284
|
+
* after a line ended by \r is dropped. completer and the history
|
|
3285
|
+
* knobs fence by name (no interactive terminal). The options-record
|
|
3286
|
+
* stance (see http.RequestOptions) admits every key; the walk
|
|
3287
|
+
* decides. */
|
|
2598
3288
|
crlfDelay?: number;
|
|
2599
3289
|
completer?: unknown;
|
|
3290
|
+
signal?: AbortSignal;
|
|
2600
3291
|
[option: string]: unknown;
|
|
2601
|
-
}
|
|
3292
|
+
}
|
|
3293
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
3294
|
+
export function createInterface(input: unknown, output?: unknown): Interface;
|
|
2602
3295
|
}
|
|
2603
3296
|
declare module "node:readline" {
|
|
2604
3297
|
export * from "readline";
|
|
2605
3298
|
}
|
|
3299
|
+
declare module "readline/promises" {
|
|
3300
|
+
import { ReadLineOptions } from "readline";
|
|
3301
|
+
/* The readline Interface with the promise question: it resolves with
|
|
3302
|
+
* the next line, rejects with an AbortError when options.signal aborts,
|
|
3303
|
+
* and with ERR_USE_AFTER_CLOSE after close(). */
|
|
3304
|
+
export interface Interface extends Disposable {
|
|
3305
|
+
question(query: string, options?: { signal?: AbortSignal }): Promise<string>;
|
|
3306
|
+
close(): void;
|
|
3307
|
+
pause(): this;
|
|
3308
|
+
resume(): this;
|
|
3309
|
+
prompt(preserveCursor?: boolean): void;
|
|
3310
|
+
setPrompt(prompt: string): void;
|
|
3311
|
+
getPrompt(): string;
|
|
3312
|
+
write(data: string): void;
|
|
3313
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
3314
|
+
on(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3315
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
3316
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
3317
|
+
once(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3318
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
3319
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
3320
|
+
addListener(event: "close" | "pause" | "resume", listener: () => void): this;
|
|
3321
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3322
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
3323
|
+
[Symbol.dispose](): void;
|
|
3324
|
+
}
|
|
3325
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
3326
|
+
export function createInterface(input: unknown, output?: unknown): Interface;
|
|
3327
|
+
}
|
|
3328
|
+
declare module "node:readline/promises" {
|
|
3329
|
+
export * from "readline/promises";
|
|
3330
|
+
}
|
|
2606
3331
|
|
|
2607
3332
|
/* node:zlib — the one-shot zlib/raw/gzip codecs lower for string/Buffer
|
|
2608
3333
|
* inputs with Node's default options; libz links only into zlib-using
|
|
@@ -2686,6 +3411,9 @@ declare module "node:zlib" {
|
|
|
2686
3411
|
* 'error'. */
|
|
2687
3412
|
declare module "net" {
|
|
2688
3413
|
export interface Socket {
|
|
3414
|
+
/* Whether the socket keeps the event loop alive (ref'd by default). */
|
|
3415
|
+
ref(): void;
|
|
3416
|
+
unref(): void;
|
|
2689
3417
|
readonly remoteAddress: string | undefined;
|
|
2690
3418
|
/* true once the fd is gone (destroy() or full close) — Node's flag. */
|
|
2691
3419
|
readonly destroyed: boolean;
|
|
@@ -2750,6 +3478,9 @@ declare module "net" {
|
|
|
2750
3478
|
once(event: "session", listener: (session: Buffer) => void): void;
|
|
2751
3479
|
}
|
|
2752
3480
|
export interface Server {
|
|
3481
|
+
/* Whether the server keeps the event loop alive (ref'd by default). */
|
|
3482
|
+
ref(): void;
|
|
3483
|
+
unref(): void;
|
|
2753
3484
|
readonly listening: boolean;
|
|
2754
3485
|
/* Node answers the server itself (`return this` chaining). */
|
|
2755
3486
|
listen(port: number, callback?: () => void): Server;
|
|
@@ -2944,7 +3675,8 @@ declare module "http" {
|
|
|
2944
3675
|
destroy(): void;
|
|
2945
3676
|
setTimeout(msecs: number, callback?: () => void): this;
|
|
2946
3677
|
/* setEncoding('utf8'): 'data' delivers strings (other real encodings
|
|
2947
|
-
*
|
|
3678
|
+
* throw a "not supported yet" Error at runtime; unknown names throw
|
|
3679
|
+
* ERR_UNKNOWN_ENCODING). */
|
|
2948
3680
|
setEncoding(encoding: string): void;
|
|
2949
3681
|
/* The proxy legs: the body streams into a ServerResponse, a
|
|
2950
3682
|
* ClientRequest, or a raw Socket; natural end ends the destination. */
|
|
@@ -3181,7 +3913,7 @@ declare module "node:http" {
|
|
|
3181
3913
|
* that behaves exactly like a net socket (write/end/destroy/pipe and the
|
|
3182
3914
|
* data/end/close/error events are the same lowered surface). cert/key
|
|
3183
3915
|
* are PEM strings or Buffers. Handshake failures tear the socket down
|
|
3184
|
-
*
|
|
3916
|
+
* without emitting an event, Node's default for 'tlsClientError' with no listener. */
|
|
3185
3917
|
declare module "tls" {
|
|
3186
3918
|
import { Server, Socket } from "net";
|
|
3187
3919
|
export { Server };
|
|
@@ -4126,6 +4858,10 @@ declare module "buffer" {
|
|
|
4126
4858
|
export const kMaxLength: number;
|
|
4127
4859
|
export const kStringMaxLength: number;
|
|
4128
4860
|
export const Buffer: BufferConstructor;
|
|
4861
|
+
export type Blob = globalThis.Blob;
|
|
4862
|
+
export type File = globalThis.File;
|
|
4863
|
+
export const Blob: typeof globalThis.Blob;
|
|
4864
|
+
export const File: typeof globalThis.File;
|
|
4129
4865
|
}
|
|
4130
4866
|
declare module "node:buffer" {
|
|
4131
4867
|
export * from "buffer";
|
|
@@ -4210,16 +4946,20 @@ declare module "events" {
|
|
|
4210
4946
|
class EventEmitter {
|
|
4211
4947
|
constructor();
|
|
4212
4948
|
static defaultMaxListeners: number;
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4949
|
+
/* Listeners registered under this symbol observe 'error' emits first
|
|
4950
|
+
* (an emit with no 'error' listener still throws). */
|
|
4951
|
+
static readonly errorMonitor: unique symbol;
|
|
4952
|
+
static addAbortListener(signal: AbortSignal, listener: (event: Event) => void): Disposable;
|
|
4953
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4954
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4955
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4956
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4957
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4958
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4959
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
4960
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
4961
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
4962
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
4223
4963
|
/* Declared as zero-parameter closures so the RESULT is statically
|
|
4224
4964
|
* consumable (.length, indexing, identity): the lowering only admits
|
|
4225
4965
|
* these calls for events whose argument tuple is empty — a listener
|
|
@@ -4273,7 +5013,7 @@ declare module "stream" {
|
|
|
4273
5013
|
emitClose?: boolean;
|
|
4274
5014
|
captureRejections?: boolean;
|
|
4275
5015
|
defaultEncoding?: string;
|
|
4276
|
-
signal?:
|
|
5016
|
+
signal?: AbortSignal;
|
|
4277
5017
|
}
|
|
4278
5018
|
interface WritableOptions {
|
|
4279
5019
|
highWaterMark?: number;
|
|
@@ -4293,7 +5033,7 @@ declare module "stream" {
|
|
|
4293
5033
|
autoDestroy?: boolean;
|
|
4294
5034
|
emitClose?: boolean;
|
|
4295
5035
|
captureRejections?: boolean;
|
|
4296
|
-
signal?:
|
|
5036
|
+
signal?: AbortSignal;
|
|
4297
5037
|
}
|
|
4298
5038
|
interface DuplexOptions {
|
|
4299
5039
|
highWaterMark?: number;
|
|
@@ -4322,7 +5062,7 @@ declare module "stream" {
|
|
|
4322
5062
|
writable?: boolean;
|
|
4323
5063
|
defaultEncoding?: string;
|
|
4324
5064
|
writev?(this: Duplex, chunks: unknown[], callback: (error?: Error | null) => void): void;
|
|
4325
|
-
signal?:
|
|
5065
|
+
signal?: AbortSignal;
|
|
4326
5066
|
}
|
|
4327
5067
|
interface TransformOptions {
|
|
4328
5068
|
highWaterMark?: number;
|
|
@@ -4358,7 +5098,7 @@ declare module "stream" {
|
|
|
4358
5098
|
readable?: boolean;
|
|
4359
5099
|
writable?: boolean;
|
|
4360
5100
|
defaultEncoding?: string;
|
|
4361
|
-
signal?:
|
|
5101
|
+
signal?: AbortSignal;
|
|
4362
5102
|
}
|
|
4363
5103
|
|
|
4364
5104
|
class Readable extends EventEmitter {
|
|
@@ -4602,15 +5342,34 @@ declare module "stream" {
|
|
|
4602
5342
|
constructor(opts?: TransformOptions);
|
|
4603
5343
|
}
|
|
4604
5344
|
|
|
5345
|
+
/* addAbortSignal(signal, stream): the stream, destroyed with an
|
|
5346
|
+
* AbortError (cause: signal.reason) when the signal aborts. */
|
|
5347
|
+
function addAbortSignal<T extends Readable | Writable>(signal: AbortSignal, stream: T): T;
|
|
4605
5348
|
/* Declared so requires typecheck; each fences at its use site. */
|
|
4606
5349
|
function pipeline(...streams: unknown[]): unknown;
|
|
5350
|
+
/* finished's options: readable/writable choose which ends count,
|
|
5351
|
+
* error: false ignores 'error' events, signal aborts the wait. */
|
|
5352
|
+
interface FinishedOptions {
|
|
5353
|
+
readable?: boolean;
|
|
5354
|
+
writable?: boolean;
|
|
5355
|
+
error?: boolean;
|
|
5356
|
+
signal?: AbortSignal;
|
|
5357
|
+
}
|
|
4607
5358
|
function finished(stream: unknown, callback: (err?: Error | null) => void): () => void;
|
|
5359
|
+
function finished(
|
|
5360
|
+
stream: unknown,
|
|
5361
|
+
options: FinishedOptions | null,
|
|
5362
|
+
callback: (err?: Error | null) => void,
|
|
5363
|
+
): () => void;
|
|
4608
5364
|
/* Folds to the TARGET platform's default at compile time (win32 16384,
|
|
4609
5365
|
* else 65536 — Node's own state.js split); literal argument only. */
|
|
4610
5366
|
function getDefaultHighWaterMark(objectMode: boolean): number;
|
|
4611
5367
|
namespace promises {
|
|
4612
5368
|
function pipeline(...streams: unknown[]): Promise<void>;
|
|
4613
|
-
function finished(
|
|
5369
|
+
function finished(
|
|
5370
|
+
stream: unknown,
|
|
5371
|
+
options?: FinishedOptions & { cleanup?: boolean },
|
|
5372
|
+
): Promise<void>;
|
|
4614
5373
|
}
|
|
4615
5374
|
class Stream extends EventEmitter {}
|
|
4616
5375
|
|
|
@@ -4621,12 +5380,19 @@ declare module "stream" {
|
|
|
4621
5380
|
Transform,
|
|
4622
5381
|
PassThrough,
|
|
4623
5382
|
Stream,
|
|
5383
|
+
addAbortSignal,
|
|
4624
5384
|
pipeline,
|
|
4625
5385
|
finished,
|
|
4626
5386
|
getDefaultHighWaterMark,
|
|
4627
5387
|
promises,
|
|
4628
5388
|
};
|
|
4629
|
-
export type {
|
|
5389
|
+
export type {
|
|
5390
|
+
ReadableOptions,
|
|
5391
|
+
WritableOptions,
|
|
5392
|
+
DuplexOptions,
|
|
5393
|
+
TransformOptions,
|
|
5394
|
+
FinishedOptions,
|
|
5395
|
+
};
|
|
4630
5396
|
}
|
|
4631
5397
|
declare module "node:stream" {
|
|
4632
5398
|
import stream = require("stream");
|
|
@@ -4636,9 +5402,20 @@ declare module "stream/promises" {
|
|
|
4636
5402
|
/* The promise forms of finished/pipeline: a void promise the stream's
|
|
4637
5403
|
* terminal point settles (rejected with the error, or
|
|
4638
5404
|
* ERR_STREAM_PREMATURE_CLOSE on an early close). Stream arguments are
|
|
4639
|
-
* the lowered surface — iterables/generators/functions fence per site.
|
|
5405
|
+
* the lowered surface — iterables/generators/functions fence per site.
|
|
5406
|
+
* pipeline's trailing { signal, end } object and finished's options
|
|
5407
|
+
* (readable, writable, error, cleanup, signal) are supported. */
|
|
4640
5408
|
function pipeline(...streams: unknown[]): Promise<void>;
|
|
4641
|
-
function finished(
|
|
5409
|
+
function finished(
|
|
5410
|
+
stream: unknown,
|
|
5411
|
+
options?: {
|
|
5412
|
+
readable?: boolean;
|
|
5413
|
+
writable?: boolean;
|
|
5414
|
+
error?: boolean;
|
|
5415
|
+
cleanup?: boolean;
|
|
5416
|
+
signal?: AbortSignal;
|
|
5417
|
+
} | null,
|
|
5418
|
+
): Promise<void>;
|
|
4642
5419
|
export { pipeline, finished };
|
|
4643
5420
|
}
|
|
4644
5421
|
declare module "node:stream/promises" {
|
|
@@ -4652,8 +5429,8 @@ declare module "stream/consumers" {
|
|
|
4652
5429
|
* with the parse's SyntaxError), buffer (the concatenated bytes;
|
|
4653
5430
|
* string chunks contribute their utf8 bytes, Node's Blob rule).
|
|
4654
5431
|
* Stream errors reject; an early close rejects with
|
|
4655
|
-
* ERR_STREAM_PREMATURE_CLOSE. arrayBuffer
|
|
4656
|
-
*
|
|
5432
|
+
* ERR_STREAM_PREMATURE_CLOSE. arrayBuffer answers an ArrayBuffer over
|
|
5433
|
+
* the bytes; blob fences per site. */
|
|
4657
5434
|
function text(stream: unknown): Promise<string>;
|
|
4658
5435
|
function json(stream: unknown): Promise<unknown>;
|
|
4659
5436
|
function buffer(stream: unknown): Promise<Buffer>;
|