diff --git a/cli/js/40_testing.js b/cli/js/40_testing.js index 7ea52a5fcb..5077af1209 100644 --- a/cli/js/40_testing.js +++ b/cli/js/40_testing.js @@ -3,9 +3,9 @@ const core = globalThis.Deno.core; const ops = core.ops; const internals = globalThis.__bootstrap.internals; -import { setExitHandler } from "internal:runtime/js/30_os.js"; +import { setExitHandler } from "internal:runtime/30_os.js"; import { Console } from "internal:deno_console/02_console.js"; -import { serializePermissions } from "internal:runtime/js/10_permissions.js"; +import { serializePermissions } from "internal:runtime/10_permissions.js"; import { assert } from "internal:deno_web/00_infra.js"; const primordials = globalThis.__bootstrap.primordials; const { @@ -1424,6 +1424,6 @@ internals.testing = { enableBench, }; -import { denoNs } from "internal:runtime/js/90_deno_ns.js"; +import { denoNs } from "internal:runtime/90_deno_ns.js"; denoNs.bench = bench; denoNs.test = test; diff --git a/cli/tests/testdata/run/internal_dynamic_import.ts b/cli/tests/testdata/run/internal_dynamic_import.ts index 3fb2791e37..940c22e597 100644 --- a/cli/tests/testdata/run/internal_dynamic_import.ts +++ b/cli/tests/testdata/run/internal_dynamic_import.ts @@ -1 +1 @@ -await import("internal:runtime/js/01_build.js"); +await import("internal:runtime/01_build.js"); diff --git a/cli/tests/testdata/run/internal_dynamic_import.ts.out b/cli/tests/testdata/run/internal_dynamic_import.ts.out index fa98b8733c..3f74f95658 100644 --- a/cli/tests/testdata/run/internal_dynamic_import.ts.out +++ b/cli/tests/testdata/run/internal_dynamic_import.ts.out @@ -1,4 +1,4 @@ error: Uncaught TypeError: Cannot load internal module from external code -await import("internal:runtime/js/01_build.js"); +await import("internal:runtime/01_build.js"); ^ at [WILDCARD]/internal_dynamic_import.ts:1:1 diff --git a/cli/tests/testdata/run/internal_import.ts b/cli/tests/testdata/run/internal_import.ts index 666b68769a..eb38d973c5 100644 --- a/cli/tests/testdata/run/internal_import.ts +++ b/cli/tests/testdata/run/internal_import.ts @@ -1 +1 @@ -import "internal:runtime/js/01_build.js"; +import "internal:runtime/01_build.js"; diff --git a/cli/tests/testdata/run/internal_import.ts.out b/cli/tests/testdata/run/internal_import.ts.out index 142308a385..5fba0dfc00 100644 --- a/cli/tests/testdata/run/internal_import.ts.out +++ b/cli/tests/testdata/run/internal_import.ts.out @@ -1,4 +1,4 @@ -error: Unsupported scheme "internal" for module "internal:runtime/js/01_build.js". Supported schemes: [ +error: Unsupported scheme "internal" for module "internal:runtime/01_build.js". Supported schemes: [ "data", "blob", "file", diff --git a/cli/tests/testdata/run/worker_drop_handle_race.js.out b/cli/tests/testdata/run/worker_drop_handle_race.js.out index c47db83ace..d78535944e 100644 --- a/cli/tests/testdata/run/worker_drop_handle_race.js.out +++ b/cli/tests/testdata/run/worker_drop_handle_race.js.out @@ -5,4 +5,4 @@ error: Uncaught (in worker "") Error at Object.action (internal:deno_web/02_timers.js:[WILDCARD]) at handleTimerMacrotask (internal:deno_web/02_timers.js:[WILDCARD]) error: Uncaught (in promise) Error: Unhandled error in child worker. - at Worker.#pollControl (internal:runtime/js/11_workers.js:[WILDCARD]) + at Worker.#pollControl (internal:runtime/11_workers.js:[WILDCARD]) diff --git a/cli/tests/testdata/test/steps/failing_steps.out b/cli/tests/testdata/test/steps/failing_steps.out index 998c70aa27..a63058999d 100644 --- a/cli/tests/testdata/test/steps/failing_steps.out +++ b/cli/tests/testdata/test/steps/failing_steps.out @@ -37,13 +37,13 @@ failing step in failing test ... FAILED ([WILDCARD]) nested failure => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: 1 test step failed. - at runTest (internal:cli/js/40_testing.js:[WILDCARD]) - at async runTests (internal:cli/js/40_testing.js:[WILDCARD]) + at runTest (internal:cli/40_testing.js:[WILDCARD]) + at async runTests (internal:cli/40_testing.js:[WILDCARD]) multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: 2 test steps failed. - at runTest (internal:cli/js/40_testing.js:[WILDCARD]) - at async runTests (internal:cli/js/40_testing.js:[WILDCARD]) + at runTest (internal:cli/40_testing.js:[WILDCARD]) + at async runTests (internal:cli/40_testing.js:[WILDCARD]) failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: Fail test. diff --git a/core/extensions.rs b/core/extensions.rs index f84ab0a91a..4f68ecf6c2 100644 --- a/core/extensions.rs +++ b/core/extensions.rs @@ -323,7 +323,7 @@ macro_rules! include_js_files { (dir $dir:literal, $($file:literal,)+) => { vec![ $($crate::ExtensionFileSource { - specifier: concat!($dir, "/", $file).to_string(), + specifier: concat!($file).to_string(), code: $crate::ExtensionFileSourceCode::IncludedInBinary( include_str!(concat!($dir, "/", $file) )), @@ -349,7 +349,7 @@ macro_rules! include_js_files { (dir $dir:literal, $($file:literal,)+) => { vec![ $($crate::ExtensionFileSource { - specifier: concat!($dir, "/", $file).to_string(), + specifier: concat!($file).to_string(), code: $crate::ExtensionFileSourceCode::LoadedFromFsDuringSnapshot( std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join($dir).join($file) ), diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 74d5bdd923..444dffeec5 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -364,7 +364,7 @@ pub fn init_polyfill() -> Extension { Extension::builder(env!("CARGO_PKG_NAME")) .esm(esm_files) - .esm_entry_point("internal:deno_node/polyfills/module_all.ts") + .esm_entry_point("internal:deno_node/module_all.ts") .ops(vec![ crypto::op_node_create_hash::decl(), crypto::op_node_hash_update::decl(), diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs index 18faa6ea5b..59f22606a8 100644 --- a/ext/node/polyfill.rs +++ b/ext/node/polyfill.rs @@ -21,75 +21,75 @@ pub struct NodeModulePolyfill { pub static SUPPORTED_BUILTIN_NODE_MODULES: &[NodeModulePolyfill] = &[ NodeModulePolyfill { name: "assert", - specifier: "internal:deno_node/polyfills/assert.ts", + specifier: "internal:deno_node/assert.ts", }, NodeModulePolyfill { name: "assert/strict", - specifier: "internal:deno_node/polyfills/assert/strict.ts", + specifier: "internal:deno_node/assert/strict.ts", }, NodeModulePolyfill { name: "async_hooks", - specifier: "internal:deno_node/polyfills/async_hooks.ts", + specifier: "internal:deno_node/async_hooks.ts", }, NodeModulePolyfill { name: "buffer", - specifier: "internal:deno_node/polyfills/buffer.ts", + specifier: "internal:deno_node/buffer.ts", }, NodeModulePolyfill { name: "child_process", - specifier: "internal:deno_node/polyfills/child_process.ts", + specifier: "internal:deno_node/child_process.ts", }, NodeModulePolyfill { name: "cluster", - specifier: "internal:deno_node/polyfills/cluster.ts", + specifier: "internal:deno_node/cluster.ts", }, NodeModulePolyfill { name: "console", - specifier: "internal:deno_node/polyfills/console.ts", + specifier: "internal:deno_node/console.ts", }, NodeModulePolyfill { name: "constants", - specifier: "internal:deno_node/polyfills/constants.ts", + specifier: "internal:deno_node/constants.ts", }, NodeModulePolyfill { name: "crypto", - specifier: "internal:deno_node/polyfills/crypto.ts", + specifier: "internal:deno_node/crypto.ts", }, NodeModulePolyfill { name: "dgram", - specifier: "internal:deno_node/polyfills/dgram.ts", + specifier: "internal:deno_node/dgram.ts", }, NodeModulePolyfill { name: "dns", - specifier: "internal:deno_node/polyfills/dns.ts", + specifier: "internal:deno_node/dns.ts", }, NodeModulePolyfill { name: "dns/promises", - specifier: "internal:deno_node/polyfills/dns/promises.ts", + specifier: "internal:deno_node/dns/promises.ts", }, NodeModulePolyfill { name: "domain", - specifier: "internal:deno_node/polyfills/domain.ts", + specifier: "internal:deno_node/domain.ts", }, NodeModulePolyfill { name: "events", - specifier: "internal:deno_node/polyfills/events.ts", + specifier: "internal:deno_node/events.ts", }, NodeModulePolyfill { name: "fs", - specifier: "internal:deno_node/polyfills/fs.ts", + specifier: "internal:deno_node/fs.ts", }, NodeModulePolyfill { name: "fs/promises", - specifier: "internal:deno_node/polyfills/fs/promises.ts", + specifier: "internal:deno_node/fs/promises.ts", }, NodeModulePolyfill { name: "http", - specifier: "internal:deno_node/polyfills/http.ts", + specifier: "internal:deno_node/http.ts", }, NodeModulePolyfill { name: "https", - specifier: "internal:deno_node/polyfills/https.ts", + specifier: "internal:deno_node/https.ts", }, NodeModulePolyfill { name: "module", @@ -97,106 +97,106 @@ pub static SUPPORTED_BUILTIN_NODE_MODULES: &[NodeModulePolyfill] = &[ }, NodeModulePolyfill { name: "net", - specifier: "internal:deno_node/polyfills/net.ts", + specifier: "internal:deno_node/net.ts", }, NodeModulePolyfill { name: "os", - specifier: "internal:deno_node/polyfills/os.ts", + specifier: "internal:deno_node/os.ts", }, NodeModulePolyfill { name: "path", - specifier: "internal:deno_node/polyfills/path.ts", + specifier: "internal:deno_node/path.ts", }, NodeModulePolyfill { name: "path/posix", - specifier: "internal:deno_node/polyfills/path/posix.ts", + specifier: "internal:deno_node/path/posix.ts", }, NodeModulePolyfill { name: "path/win32", - specifier: "internal:deno_node/polyfills/path/win32.ts", + specifier: "internal:deno_node/path/win32.ts", }, NodeModulePolyfill { name: "perf_hooks", - specifier: "internal:deno_node/polyfills/perf_hooks.ts", + specifier: "internal:deno_node/perf_hooks.ts", }, NodeModulePolyfill { name: "process", - specifier: "internal:deno_node/polyfills/process.ts", + specifier: "internal:deno_node/process.ts", }, NodeModulePolyfill { name: "querystring", - specifier: "internal:deno_node/polyfills/querystring.ts", + specifier: "internal:deno_node/querystring.ts", }, NodeModulePolyfill { name: "readline", - specifier: "internal:deno_node/polyfills/readline.ts", + specifier: "internal:deno_node/readline.ts", }, NodeModulePolyfill { name: "stream", - specifier: "internal:deno_node/polyfills/stream.ts", + specifier: "internal:deno_node/stream.ts", }, NodeModulePolyfill { name: "stream/consumers", - specifier: "internal:deno_node/polyfills/stream/consumers.mjs", + specifier: "internal:deno_node/stream/consumers.mjs", }, NodeModulePolyfill { name: "stream/promises", - specifier: "internal:deno_node/polyfills/stream/promises.mjs", + specifier: "internal:deno_node/stream/promises.mjs", }, NodeModulePolyfill { name: "stream/web", - specifier: "internal:deno_node/polyfills/stream/web.ts", + specifier: "internal:deno_node/stream/web.ts", }, NodeModulePolyfill { name: "string_decoder", - specifier: "internal:deno_node/polyfills/string_decoder.ts", + specifier: "internal:deno_node/string_decoder.ts", }, NodeModulePolyfill { name: "sys", - specifier: "internal:deno_node/polyfills/sys.ts", + specifier: "internal:deno_node/sys.ts", }, NodeModulePolyfill { name: "timers", - specifier: "internal:deno_node/polyfills/timers.ts", + specifier: "internal:deno_node/timers.ts", }, NodeModulePolyfill { name: "timers/promises", - specifier: "internal:deno_node/polyfills/timers/promises.ts", + specifier: "internal:deno_node/timers/promises.ts", }, NodeModulePolyfill { name: "tls", - specifier: "internal:deno_node/polyfills/tls.ts", + specifier: "internal:deno_node/tls.ts", }, NodeModulePolyfill { name: "tty", - specifier: "internal:deno_node/polyfills/tty.ts", + specifier: "internal:deno_node/tty.ts", }, NodeModulePolyfill { name: "url", - specifier: "internal:deno_node/polyfills/url.ts", + specifier: "internal:deno_node/url.ts", }, NodeModulePolyfill { name: "util", - specifier: "internal:deno_node/polyfills/util.ts", + specifier: "internal:deno_node/util.ts", }, NodeModulePolyfill { name: "util/types", - specifier: "internal:deno_node/polyfills/util/types.ts", + specifier: "internal:deno_node/util/types.ts", }, NodeModulePolyfill { name: "v8", - specifier: "internal:deno_node/polyfills/v8.ts", + specifier: "internal:deno_node/v8.ts", }, NodeModulePolyfill { name: "vm", - specifier: "internal:deno_node/polyfills/vm.ts", + specifier: "internal:deno_node/vm.ts", }, NodeModulePolyfill { name: "worker_threads", - specifier: "internal:deno_node/polyfills/worker_threads.ts", + specifier: "internal:deno_node/worker_threads.ts", }, NodeModulePolyfill { name: "zlib", - specifier: "internal:deno_node/polyfills/zlib.ts", + specifier: "internal:deno_node/zlib.ts", }, ]; diff --git a/ext/node/polyfills/_events.mjs b/ext/node/polyfills/_events.mjs index cd9871a6ca..09bde5c007 100644 --- a/ext/node/polyfills/_events.mjs +++ b/ext/node/polyfills/_events.mjs @@ -24,21 +24,21 @@ const kRejection = Symbol.for("nodejs.rejection"); -import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; +import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; import { AbortError, // kEnhanceStackBeforeInspector, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, ERR_UNHANDLED_ERROR, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { validateAbortSignal, validateBoolean, validateFunction, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { spliceOne } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { spliceOne } from "internal:deno_node/_utils.ts"; const kCapture = Symbol("kCapture"); const kErrorMonitor = Symbol("events.errorMonitor"); diff --git a/ext/node/polyfills/_fs/_fs_access.ts b/ext/node/polyfills/_fs/_fs_access.ts index 9450c2f011..ae7c0d5e98 100644 --- a/ext/node/polyfills/_fs/_fs_access.ts +++ b/ext/node/polyfills/_fs/_fs_access.ts @@ -3,15 +3,15 @@ import { type CallbackWithError, makeCallback, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; import { getValidatedPath, getValidMode, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function access( path: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_appendFile.ts b/ext/node/polyfills/_fs/_fs_appendFile.ts index d47afe81b6..d460600ccb 100644 --- a/ext/node/polyfills/_fs/_fs_appendFile.ts +++ b/ext/node/polyfills/_fs/_fs_appendFile.ts @@ -4,17 +4,17 @@ import { isFd, maybeCallback, WriteFileOptions, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Encodings } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { Encodings } from "internal:deno_node/_utils.ts"; import { copyObject, getOptions, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; import { writeFile, writeFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_writeFile.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_fs/_fs_writeFile.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * TODO: Also accept 'data' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_chmod.ts b/ext/node/polyfills/_fs/_fs_chmod.ts index 3a19e5622b..d27bff562e 100644 --- a/ext/node/polyfills/_fs/_fs_chmod.ts +++ b/ext/node/polyfills/_fs/_fs_chmod.ts @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import * as pathModule from "internal:deno_node/polyfills/path.ts"; -import { parseFileMode } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import * as pathModule from "internal:deno_node/path.ts"; +import { parseFileMode } from "internal:deno_node/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function chmod( path: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_chown.ts b/ext/node/polyfills/_fs/_fs_chown.ts index 55a469fbaf..d3323c1731 100644 --- a/ext/node/polyfills/_fs/_fs_chown.ts +++ b/ext/node/polyfills/_fs/_fs_chown.ts @@ -2,15 +2,15 @@ import { type CallbackWithError, makeCallback, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; import { getValidatedPath, kMaxUserId, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import * as pathModule from "internal:deno_node/polyfills/path.ts"; -import { validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import * as pathModule from "internal:deno_node/path.ts"; +import { validateInteger } from "internal:deno_node/internal/validators.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * Asynchronously changes the owner and group diff --git a/ext/node/polyfills/_fs/_fs_close.ts b/ext/node/polyfills/_fs/_fs_close.ts index ff6082980b..6c3200614c 100644 --- a/ext/node/polyfills/_fs/_fs_close.ts +++ b/ext/node/polyfills/_fs/_fs_close.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { getValidatedFd } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { getValidatedFd } from "internal:deno_node/internal/fs/utils.mjs"; export function close(fd: number, callback: CallbackWithError) { fd = getValidatedFd(fd); diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts index 1e9f0f2668..9b4a982bd5 100644 --- a/ext/node/polyfills/_fs/_fs_common.ts +++ b/ext/node/polyfills/_fs/_fs_common.ts @@ -7,15 +7,15 @@ import { O_RDWR, O_TRUNC, O_WRONLY, -} from "internal:deno_node/polyfills/_fs/_fs_constants.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import type { ErrnoException } from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_fs/_fs_constants.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import type { ErrnoException } from "internal:deno_node/_global.d.ts"; import { BinaryEncodings, Encodings, notImplemented, TextEncodings, -} from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_utils.ts"; export type CallbackWithError = (err: ErrnoException | null) => void; @@ -212,7 +212,7 @@ export function getOpenOptions( return openOptions; } -export { isUint32 as isFd } from "internal:deno_node/polyfills/internal/validators.mjs"; +export { isUint32 as isFd } from "internal:deno_node/internal/validators.mjs"; export function maybeCallback(cb: unknown) { validateFunction(cb, "cb"); diff --git a/ext/node/polyfills/_fs/_fs_constants.ts b/ext/node/polyfills/_fs/_fs_constants.ts index 761f6a9b7a..8064b576f5 100644 --- a/ext/node/polyfills/_fs/_fs_constants.ts +++ b/ext/node/polyfills/_fs/_fs_constants.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; export const { F_OK, diff --git a/ext/node/polyfills/_fs/_fs_copy.ts b/ext/node/polyfills/_fs/_fs_copy.ts index 0971da1eb9..1b83bc4024 100644 --- a/ext/node/polyfills/_fs/_fs_copy.ts +++ b/ext/node/polyfills/_fs/_fs_copy.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { makeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { makeCallback } from "internal:deno_node/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getValidatedPath, getValidMode, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function copyFile( src: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_dir.ts b/ext/node/polyfills/_fs/_fs_dir.ts index e135472414..6e53da2e96 100644 --- a/ext/node/polyfills/_fs/_fs_dir.ts +++ b/ext/node/polyfills/_fs/_fs_dir.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import Dirent from "internal:deno_node/polyfills/_fs/_fs_dirent.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { ERR_MISSING_ARGS } from "internal:deno_node/polyfills/internal/errors.ts"; +import Dirent from "internal:deno_node/_fs/_fs_dirent.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { ERR_MISSING_ARGS } from "internal:deno_node/internal/errors.ts"; import { TextDecoder } from "internal:deno_web/08_text_encoding.js"; export default class Dir { diff --git a/ext/node/polyfills/_fs/_fs_dirent.ts b/ext/node/polyfills/_fs/_fs_dirent.ts index 5a7c243bf4..ace83087c8 100644 --- a/ext/node/polyfills/_fs/_fs_dirent.ts +++ b/ext/node/polyfills/_fs/_fs_dirent.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export default class Dirent { constructor(private entry: Deno.DirEntry) {} diff --git a/ext/node/polyfills/_fs/_fs_exists.ts b/ext/node/polyfills/_fs/_fs_exists.ts index 9b0f183034..21b0e99c13 100644 --- a/ext/node/polyfills/_fs/_fs_exists.ts +++ b/ext/node/polyfills/_fs/_fs_exists.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; type ExistsCallback = (exists: boolean) => void; diff --git a/ext/node/polyfills/_fs/_fs_fdatasync.ts b/ext/node/polyfills/_fs/_fs_fdatasync.ts index 325ac30da6..6ee586b715 100644 --- a/ext/node/polyfills/_fs/_fs_fdatasync.ts +++ b/ext/node/polyfills/_fs/_fs_fdatasync.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function fdatasync( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_fstat.ts b/ext/node/polyfills/_fs/_fs_fstat.ts index ab9cbead46..c1f7547ff2 100644 --- a/ext/node/polyfills/_fs/_fs_fstat.ts +++ b/ext/node/polyfills/_fs/_fs_fstat.ts @@ -6,7 +6,7 @@ import { statCallbackBigInt, statOptions, Stats, -} from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; +} from "internal:deno_node/_fs/_fs_stat.ts"; export function fstat(fd: number, callback: statCallback): void; export function fstat( diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts index 02be24abcf..da81b27534 100644 --- a/ext/node/polyfills/_fs/_fs_fsync.ts +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function fsync( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_ftruncate.ts b/ext/node/polyfills/_fs/_fs_ftruncate.ts index 9c7bfbd016..b2f88c3d60 100644 --- a/ext/node/polyfills/_fs/_fs_ftruncate.ts +++ b/ext/node/polyfills/_fs/_fs_ftruncate.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function ftruncate( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_futimes.ts b/ext/node/polyfills/_fs/_fs_futimes.ts index 60f06bc34e..2aa3df786e 100644 --- a/ext/node/polyfills/_fs/_fs_futimes.ts +++ b/ext/node/polyfills/_fs/_fs_futimes.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; function getValidTime( time: number | string | Date, diff --git a/ext/node/polyfills/_fs/_fs_link.ts b/ext/node/polyfills/_fs/_fs_link.ts index eb95a10f6d..153b182956 100644 --- a/ext/node/polyfills/_fs/_fs_link.ts +++ b/ext/node/polyfills/_fs/_fs_link.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_lstat.ts b/ext/node/polyfills/_fs/_fs_lstat.ts index c85f82a11b..7acf595d5c 100644 --- a/ext/node/polyfills/_fs/_fs_lstat.ts +++ b/ext/node/polyfills/_fs/_fs_lstat.ts @@ -6,8 +6,8 @@ import { statCallbackBigInt, statOptions, Stats, -} from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_fs/_fs_stat.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function lstat(path: string | URL, callback: statCallback): void; export function lstat( diff --git a/ext/node/polyfills/_fs/_fs_mkdir.ts b/ext/node/polyfills/_fs/_fs_mkdir.ts index ac4b782591..e5aada61f2 100644 --- a/ext/node/polyfills/_fs/_fs_mkdir.ts +++ b/ext/node/polyfills/_fs/_fs_mkdir.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { validateBoolean } from "internal:deno_node/polyfills/internal/validators.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { validateBoolean } from "internal:deno_node/internal/validators.mjs"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_mkdtemp.ts b/ext/node/polyfills/_fs/_fs_mkdtemp.ts index de227b216e..bf80d3b744 100644 --- a/ext/node/polyfills/_fs/_fs_mkdtemp.ts +++ b/ext/node/polyfills/_fs/_fs_mkdtemp.ts @@ -5,16 +5,13 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { existsSync } from "internal:deno_node/polyfills/_fs/_fs_exists.ts"; -import { - mkdir, - mkdirSync, -} from "internal:deno_node/polyfills/_fs/_fs_mkdir.ts"; +import { existsSync } from "internal:deno_node/_fs/_fs_exists.ts"; +import { mkdir, mkdirSync } from "internal:deno_node/_fs/_fs_mkdir.ts"; import { ERR_INVALID_ARG_TYPE, ERR_INVALID_OPT_VALUE_ENCODING, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export type mkdtempCallback = ( err: Error | null, diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts index e703da56fd..06f3caa4b8 100644 --- a/ext/node/polyfills/_fs/_fs_open.ts +++ b/ext/node/polyfills/_fs/_fs_open.ts @@ -6,13 +6,13 @@ import { O_RDWR, O_TRUNC, O_WRONLY, -} from "internal:deno_node/polyfills/_fs/_fs_constants.ts"; -import { getOpenOptions } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { parseFileMode } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/_fs/_fs_constants.ts"; +import { getOpenOptions } from "internal:deno_node/_fs/_fs_common.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { parseFileMode } from "internal:deno_node/internal/validators.mjs"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; function existsSync(filePath: string | URL): boolean { try { diff --git a/ext/node/polyfills/_fs/_fs_opendir.ts b/ext/node/polyfills/_fs/_fs_opendir.ts index 5ee13f9519..a14f12f15d 100644 --- a/ext/node/polyfills/_fs/_fs_opendir.ts +++ b/ext/node/polyfills/_fs/_fs_opendir.ts @@ -1,17 +1,17 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import Dir from "internal:deno_node/polyfills/_fs/_fs_dir.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import Dir from "internal:deno_node/_fs/_fs_dir.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getOptions, getValidatedPath, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; import { validateFunction, validateInteger, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/validators.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** These options aren't funcitonally used right now, as `Dir` doesn't yet support them. * However, these values are still validated. diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts index d744458298..8aeebfecba 100644 --- a/ext/node/polyfills/_fs/_fs_read.ts +++ b/ext/node/polyfills/_fs/_fs_read.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { validateOffsetLengthRead, validatePosition, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; import { validateBuffer, validateInteger, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; type readOptions = { buffer: Buffer | Uint8Array; diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index 6c5e9fb8bc..24f58f6d17 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -4,15 +4,15 @@ import { FileOptionsArgument, getEncoding, TextOptionsArgument, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; import { BinaryEncodings, Encodings, TextEncodings, -} from "internal:deno_node/polyfills/_utils.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_utils.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function maybeDecode(data: Uint8Array, encoding: TextEncodings): string; function maybeDecode( diff --git a/ext/node/polyfills/_fs/_fs_readdir.ts b/ext/node/polyfills/_fs/_fs_readdir.ts index f6cfae4f73..af828c2c0a 100644 --- a/ext/node/polyfills/_fs/_fs_readdir.ts +++ b/ext/node/polyfills/_fs/_fs_readdir.ts @@ -4,12 +4,12 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { asyncIterableToCallback } from "internal:deno_node/polyfills/_fs/_fs_watch.ts"; -import Dirent from "internal:deno_node/polyfills/_fs/_fs_dirent.ts"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { asyncIterableToCallback } from "internal:deno_node/_fs/_fs_watch.ts"; +import Dirent from "internal:deno_node/_fs/_fs_dirent.ts"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function toDirent(val: Deno.DirEntry): Dirent { return new Dirent(val); diff --git a/ext/node/polyfills/_fs/_fs_readlink.ts b/ext/node/polyfills/_fs/_fs_readlink.ts index 07d1b6f6f1..69cd9d2d93 100644 --- a/ext/node/polyfills/_fs/_fs_readlink.ts +++ b/ext/node/polyfills/_fs/_fs_readlink.ts @@ -5,9 +5,9 @@ import { intoCallbackAPIWithIntercept, MaybeEmpty, notImplemented, -} from "internal:deno_node/polyfills/_utils.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_utils.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type ReadlinkCallback = ( err: MaybeEmpty, diff --git a/ext/node/polyfills/_fs/_fs_realpath.ts b/ext/node/polyfills/_fs/_fs_realpath.ts index 5892b2c0f4..7254f8a286 100644 --- a/ext/node/polyfills/_fs/_fs_realpath.ts +++ b/ext/node/polyfills/_fs/_fs_realpath.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type Options = { encoding: string }; type Callback = (err: Error | null, path?: string) => void; diff --git a/ext/node/polyfills/_fs/_fs_rename.ts b/ext/node/polyfills/_fs/_fs_rename.ts index 3f8b5bd7e3..10ec900781 100644 --- a/ext/node/polyfills/_fs/_fs_rename.ts +++ b/ext/node/polyfills/_fs/_fs_rename.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function rename( oldPath: string | URL, diff --git a/ext/node/polyfills/_fs/_fs_rm.ts b/ext/node/polyfills/_fs/_fs_rm.ts index 80ba0b5f8d..dbbe121796 100644 --- a/ext/node/polyfills/_fs/_fs_rm.ts +++ b/ext/node/polyfills/_fs/_fs_rm.ts @@ -2,9 +2,9 @@ import { validateRmOptions, validateRmOptionsSync, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type rmOptions = { force?: boolean; diff --git a/ext/node/polyfills/_fs/_fs_rmdir.ts b/ext/node/polyfills/_fs/_fs_rmdir.ts index ba753a7432..186f924471 100644 --- a/ext/node/polyfills/_fs/_fs_rmdir.ts +++ b/ext/node/polyfills/_fs/_fs_rmdir.ts @@ -5,14 +5,14 @@ import { validateRmdirOptions, validateRmOptions, validateRmOptionsSync, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { toNamespacedPath } from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { toNamespacedPath } from "internal:deno_node/path.ts"; import { denoErrorToNodeError, ERR_FS_RMDIR_ENOTDIR, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type rmdirOptions = { maxRetries?: number; diff --git a/ext/node/polyfills/_fs/_fs_stat.ts b/ext/node/polyfills/_fs/_fs_stat.ts index 3a006084df..3a496cb408 100644 --- a/ext/node/polyfills/_fs/_fs_stat.ts +++ b/ext/node/polyfills/_fs/_fs_stat.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export type statOptions = { bigint: boolean; diff --git a/ext/node/polyfills/_fs/_fs_symlink.ts b/ext/node/polyfills/_fs/_fs_symlink.ts index c8652885fb..abaa780ae9 100644 --- a/ext/node/polyfills/_fs/_fs_symlink.ts +++ b/ext/node/polyfills/_fs/_fs_symlink.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type SymlinkType = "file" | "dir"; diff --git a/ext/node/polyfills/_fs/_fs_truncate.ts b/ext/node/polyfills/_fs/_fs_truncate.ts index 105555abcf..9cdbbdbf33 100644 --- a/ext/node/polyfills/_fs/_fs_truncate.ts +++ b/ext/node/polyfills/_fs/_fs_truncate.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function truncate( path: string | URL, diff --git a/ext/node/polyfills/_fs/_fs_unlink.ts b/ext/node/polyfills/_fs/_fs_unlink.ts index ed43bb1b31..b54edc7173 100644 --- a/ext/node/polyfills/_fs/_fs_unlink.ts +++ b/ext/node/polyfills/_fs/_fs_unlink.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function unlink(path: string | URL, callback: (err?: Error) => void) { if (!callback) throw new Error("No callback function supplied"); diff --git a/ext/node/polyfills/_fs/_fs_utimes.ts b/ext/node/polyfills/_fs/_fs_utimes.ts index 7423a1060e..1e104a4632 100644 --- a/ext/node/polyfills/_fs/_fs_utimes.ts +++ b/ext/node/polyfills/_fs/_fs_utimes.ts @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function getValidTime( time: number | string | Date, diff --git a/ext/node/polyfills/_fs/_fs_watch.ts b/ext/node/polyfills/_fs/_fs_watch.ts index 79f226126a..7924eeeed8 100644 --- a/ext/node/polyfills/_fs/_fs_watch.ts +++ b/ext/node/polyfills/_fs/_fs_watch.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { basename } from "internal:deno_node/polyfills/path.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { promisify } from "internal:deno_node/polyfills/util.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { stat, Stats } from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; -import { Stats as StatsClass } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { delay } from "internal:deno_node/polyfills/_util/async.ts"; +import { basename } from "internal:deno_node/path.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { promisify } from "internal:deno_node/util.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { stat, Stats } from "internal:deno_node/_fs/_fs_stat.ts"; +import { Stats as StatsClass } from "internal:deno_node/internal/fs/utils.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { delay } from "internal:deno_node/_util/async.ts"; const statPromisified = promisify(stat); const statAsync = async (filename: string): Promise => { diff --git a/ext/node/polyfills/_fs/_fs_write.d.ts b/ext/node/polyfills/_fs/_fs_write.d.ts index eb6dbcc95d..cfa97c5fc4 100644 --- a/ext/node/polyfills/_fs/_fs_write.d.ts +++ b/ext/node/polyfills/_fs/_fs_write.d.ts @@ -4,7 +4,7 @@ import { BufferEncoding, ErrnoException, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; /** * Write `buffer` to the file specified by `fd`. If `buffer` is a normal object, it diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs index d44a729216..110e7dfb85 100644 --- a/ext/node/polyfills/_fs/_fs_write.mjs +++ b/ext/node/polyfills/_fs/_fs_write.mjs @@ -1,15 +1,15 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { validateEncoding, validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { validateEncoding, validateInteger } from "internal:deno_node/internal/validators.mjs"; import { getValidatedFd, showStringCoercionDeprecation, validateOffsetLengthWrite, validateStringAfterArrayBufferView, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { maybeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; +import { maybeCallback } from "internal:deno_node/_fs/_fs_common.ts"; export function writeSync(fd, buffer, offset, length, position) { fd = getValidatedFd(fd); diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index 3cad5f947c..d3f0d35df8 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Encodings } from "internal:deno_node/polyfills/_utils.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Encodings } from "internal:deno_node/_utils.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { CallbackWithError, checkEncoding, @@ -9,17 +9,17 @@ import { getOpenOptions, isFileOptions, WriteFileOptions, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; import { AbortError, denoErrorToNodeError, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { showStringCoercionDeprecation, validateStringAfterArrayBufferView, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; interface Writer { write(p: Uint8Array): Promise; diff --git a/ext/node/polyfills/_fs/_fs_writev.d.ts b/ext/node/polyfills/_fs/_fs_writev.d.ts index d828bf6771..909b955d1f 100644 --- a/ext/node/polyfills/_fs/_fs_writev.d.ts +++ b/ext/node/polyfills/_fs/_fs_writev.d.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d9df51e34526f48bef4e2546a006157b391ad96c/types/node/fs.d.ts -import { ErrnoException } from "internal:deno_node/polyfills/_global.d.ts"; +import { ErrnoException } from "internal:deno_node/_global.d.ts"; /** * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. diff --git a/ext/node/polyfills/_fs/_fs_writev.mjs b/ext/node/polyfills/_fs/_fs_writev.mjs index ffc67c81ae..49d0b9a214 100644 --- a/ext/node/polyfills/_fs/_fs_writev.mjs +++ b/ext/node/polyfills/_fs/_fs_writev.mjs @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { validateBufferArray } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { getValidatedFd } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { maybeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { validateBufferArray } from "internal:deno_node/internal/fs/utils.mjs"; +import { getValidatedFd } from "internal:deno_node/internal/fs/utils.mjs"; +import { maybeCallback } from "internal:deno_node/_fs/_fs_common.ts"; export function writev(fd, buffers, position, callback) { const innerWritev = async (fd, buffers, position) => { diff --git a/ext/node/polyfills/_global.d.ts b/ext/node/polyfills/_global.d.ts index 4b017c4044..bf88c64ff9 100644 --- a/ext/node/polyfills/_global.d.ts +++ b/ext/node/polyfills/_global.d.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { EventEmitter } from "internal:deno_node/polyfills/_events.d.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { EventEmitter } from "internal:deno_node/_events.d.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; /** One of: * | "ascii" diff --git a/ext/node/polyfills/_http_agent.mjs b/ext/node/polyfills/_http_agent.mjs index 20c1eaf0bf..8878a95843 100644 --- a/ext/node/polyfills/_http_agent.mjs +++ b/ext/node/polyfills/_http_agent.mjs @@ -1,23 +1,23 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import * as net from "internal:deno_node/polyfills/net.ts"; -import EventEmitter from "internal:deno_node/polyfills/events.ts"; -import { debuglog } from "internal:deno_node/polyfills/internal/util/debuglog.ts"; +import * as net from "internal:deno_node/net.ts"; +import EventEmitter from "internal:deno_node/events.ts"; +import { debuglog } from "internal:deno_node/internal/util/debuglog.ts"; let debug = debuglog("http", (fn) => { debug = fn; }); -import { AsyncResource } from "internal:deno_node/polyfills/async_hooks.ts"; -import { symbols } from "internal:deno_node/polyfills/internal/async_hooks.ts"; +import { AsyncResource } from "internal:deno_node/async_hooks.ts"; +import { symbols } from "internal:deno_node/internal/async_hooks.ts"; // deno-lint-ignore camelcase const { async_id_symbol } = symbols; -import { ERR_OUT_OF_RANGE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { once } from "internal:deno_node/polyfills/internal/util.mjs"; +import { ERR_OUT_OF_RANGE } from "internal:deno_node/internal/errors.ts"; +import { once } from "internal:deno_node/internal/util.mjs"; import { validateNumber, validateOneOf, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; const kOnKeylog = Symbol("onkeylog"); const kRequestOptions = Symbol("requestOptions"); diff --git a/ext/node/polyfills/_http_outgoing.ts b/ext/node/polyfills/_http_outgoing.ts index cb0312d4a8..801570dd69 100644 --- a/ext/node/polyfills/_http_outgoing.ts +++ b/ext/node/polyfills/_http_outgoing.ts @@ -1,27 +1,27 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { getDefaultHighWaterMark } from "internal:deno_node/polyfills/internal/streams/state.mjs"; -import assert from "internal:deno_node/polyfills/internal/assert.mjs"; -import EE from "internal:deno_node/polyfills/events.ts"; -import { Stream } from "internal:deno_node/polyfills/stream.ts"; -import { deprecate } from "internal:deno_node/polyfills/util.ts"; -import type { Socket } from "internal:deno_node/polyfills/net.ts"; +import { getDefaultHighWaterMark } from "internal:deno_node/internal/streams/state.mjs"; +import assert from "internal:deno_node/internal/assert.mjs"; +import EE from "internal:deno_node/events.ts"; +import { Stream } from "internal:deno_node/stream.ts"; +import { deprecate } from "internal:deno_node/util.ts"; +import type { Socket } from "internal:deno_node/net.ts"; import { kNeedDrain, kOutHeaders, utcDate, -} from "internal:deno_node/polyfills/internal/http.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/http.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { _checkInvalidHeaderChar as checkInvalidHeaderChar, _checkIsHttpToken as checkIsHttpToken, chunkExpression as RE_TE_CHUNKED, -} from "internal:deno_node/polyfills/_http_common.ts"; +} from "internal:deno_node/_http_common.ts"; import { defaultTriggerAsyncIdScope, symbols, -} from "internal:deno_node/polyfills/internal/async_hooks.ts"; +} from "internal:deno_node/internal/async_hooks.ts"; // deno-lint-ignore camelcase const { async_id_symbol } = symbols; import { @@ -39,11 +39,11 @@ import { ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END, hideStackFrames, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isUint8Array } from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; +import { isUint8Array } from "internal:deno_node/internal/util/types.ts"; -import { debuglog } from "internal:deno_node/polyfills/internal/util/debuglog.ts"; +import { debuglog } from "internal:deno_node/internal/util/debuglog.ts"; let debug = debuglog("http", (fn) => { debug = fn; }); diff --git a/ext/node/polyfills/_next_tick.ts b/ext/node/polyfills/_next_tick.ts index 72a6fc1203..74a594af61 100644 --- a/ext/node/polyfills/_next_tick.ts +++ b/ext/node/polyfills/_next_tick.ts @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. -import { core } from "internal:deno_node/polyfills/_core.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { _exiting } from "internal:deno_node/polyfills/_process/exiting.ts"; -import { FixedQueue } from "internal:deno_node/polyfills/internal/fixed_queue.ts"; +import { core } from "internal:deno_node/_core.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { _exiting } from "internal:deno_node/_process/exiting.ts"; +import { FixedQueue } from "internal:deno_node/internal/fixed_queue.ts"; interface Tock { callback: (...args: Array) => void; diff --git a/ext/node/polyfills/_pako.mjs b/ext/node/polyfills/_pako.mjs index 2447ef03bb..cb0c6e307f 100644 --- a/ext/node/polyfills/_pako.mjs +++ b/ext/node/polyfills/_pako.mjs @@ -418,7 +418,7 @@ const gen_bitlen = (s, desc) => // deflate_state *s; /* Now recompute all bit lengths, scanning in increasing frequency. * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all * lengths instead of fixing only the wrong ones. This idea is taken - * from "internal:deno_node/polyfills/ar" written by Haruhiko Okumura.) + * from "internal:deno_node/ar" written by Haruhiko Okumura.) */ for (bits = max_length; bits !== 0; bits--) { n = s.bl_count[bits]; diff --git a/ext/node/polyfills/_process/process.ts b/ext/node/polyfills/_process/process.ts index 24a4ae1a2b..3bcf6dcf99 100644 --- a/ext/node/polyfills/_process/process.ts +++ b/ext/node/polyfills/_process/process.ts @@ -4,10 +4,10 @@ // The following are all the process APIs that don't depend on the stream module // They have to be split this way to prevent a circular dependency -import { build } from "internal:runtime/js/01_build.js"; -import { nextTick as _nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; -import { _exiting } from "internal:deno_node/polyfills/_process/exiting.ts"; -import * as fs from "internal:runtime/js/30_fs.js"; +import { build } from "internal:runtime/01_build.js"; +import { nextTick as _nextTick } from "internal:deno_node/_next_tick.ts"; +import { _exiting } from "internal:deno_node/_process/exiting.ts"; +import * as fs from "internal:runtime/30_fs.js"; /** Returns the operating system CPU architecture for which the Deno binary was compiled */ export function arch(): string { diff --git a/ext/node/polyfills/_process/streams.mjs b/ext/node/polyfills/_process/streams.mjs index b27f75e2d8..da6895dbb7 100644 --- a/ext/node/polyfills/_process/streams.mjs +++ b/ext/node/polyfills/_process/streams.mjs @@ -1,17 +1,17 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { clearLine, clearScreenDown, cursorTo, moveCursor, -} from "internal:deno_node/polyfills/internal/readline/callbacks.mjs"; -import { Duplex, Readable, Writable } from "internal:deno_node/polyfills/stream.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import { fs as fsConstants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import * as files from "internal:runtime/js/40_files.js"; +} from "internal:deno_node/internal/readline/callbacks.mjs"; +import { Duplex, Readable, Writable } from "internal:deno_node/stream.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import { fs as fsConstants } from "internal:deno_node/internal_binding/constants.ts"; +import * as files from "internal:runtime/40_files.js"; // https://github.com/nodejs/node/blob/00738314828074243c9a52a228ab4c68b04259ef/lib/internal/bootstrap/switches/is_main_thread.js#L41 export function createWritableStdioStream(writer, name) { diff --git a/ext/node/polyfills/_readline.d.ts b/ext/node/polyfills/_readline.d.ts index e3caea92bf..389e6abfee 100644 --- a/ext/node/polyfills/_readline.d.ts +++ b/ext/node/polyfills/_readline.d.ts @@ -3,22 +3,19 @@ // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/cd61f5b4d3d143108569ec3f88adc0eb34b961c4/types/node/readline.d.ts -import { - Abortable, - EventEmitter, -} from "internal:deno_node/polyfills/_events.d.ts"; -import * as promises from "internal:deno_node/polyfills/readline/promises.ts"; +import { Abortable, EventEmitter } from "internal:deno_node/_events.d.ts"; +import * as promises from "internal:deno_node/readline/promises.ts"; import { ReadableStream, WritableStream, -} from "internal:deno_node/polyfills/_global.d.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/_global.d.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import type { AsyncCompleter, Completer, CompleterResult, ReadLineOptions, -} from "internal:deno_node/polyfills/_readline_shared_types.d.ts"; +} from "internal:deno_node/_readline_shared_types.d.ts"; /** * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. diff --git a/ext/node/polyfills/_readline.mjs b/ext/node/polyfills/_readline.mjs index 0665dbcf31..cd344dd6db 100644 --- a/ext/node/polyfills/_readline.mjs +++ b/ext/node/polyfills/_readline.mjs @@ -27,13 +27,13 @@ import { clearScreenDown, cursorTo, moveCursor, -} from "internal:deno_node/polyfills/internal/readline/callbacks.mjs"; -import { emitKeypressEvents } from "internal:deno_node/polyfills/internal/readline/emitKeypressEvents.mjs"; -import promises from "internal:deno_node/polyfills/readline/promises.ts"; -import { validateAbortSignal } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { AbortError } from "internal:deno_node/polyfills/internal/errors.ts"; -import process from "internal:deno_node/polyfills/process.ts"; +} from "internal:deno_node/internal/readline/callbacks.mjs"; +import { emitKeypressEvents } from "internal:deno_node/internal/readline/emitKeypressEvents.mjs"; +import promises from "internal:deno_node/readline/promises.ts"; +import { validateAbortSignal } from "internal:deno_node/internal/validators.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { AbortError } from "internal:deno_node/internal/errors.ts"; +import process from "internal:deno_node/process.ts"; import { Interface as _Interface, @@ -71,7 +71,7 @@ import { kWordLeft, kWordRight, kWriteToOutput, -} from "internal:deno_node/polyfills/internal/readline/interface.mjs"; +} from "internal:deno_node/internal/readline/interface.mjs"; function Interface(input, output, completer, terminal) { if (!(this instanceof Interface)) { diff --git a/ext/node/polyfills/_readline_shared_types.d.ts b/ext/node/polyfills/_readline_shared_types.d.ts index 2744839164..a2cfa1a0b6 100644 --- a/ext/node/polyfills/_readline_shared_types.d.ts +++ b/ext/node/polyfills/_readline_shared_types.d.ts @@ -7,7 +7,7 @@ import type { ReadableStream, WritableStream, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; export type Completer = (line: string) => CompleterResult; export type AsyncCompleter = ( diff --git a/ext/node/polyfills/_stream.d.ts b/ext/node/polyfills/_stream.d.ts index 33ebda23c2..d5929c74e5 100644 --- a/ext/node/polyfills/_stream.d.ts +++ b/ext/node/polyfills/_stream.d.ts @@ -3,11 +3,8 @@ // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/4f538975138678878fed5b2555c0672aa578ab7d/types/node/stream.d.ts -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { - Abortable, - EventEmitter, -} from "internal:deno_node/polyfills/_events.d.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { Abortable, EventEmitter } from "internal:deno_node/_events.d.ts"; import { Buffered, BufferEncoding, @@ -15,7 +12,7 @@ import { ReadableStream, ReadWriteStream, WritableStream, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; export class Stream extends EventEmitter { pipe( diff --git a/ext/node/polyfills/_stream.mjs b/ext/node/polyfills/_stream.mjs index 955c652e46..1efe6c698e 100644 --- a/ext/node/polyfills/_stream.mjs +++ b/ext/node/polyfills/_stream.mjs @@ -2,12 +2,12 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-fmt-ignore-file // deno-lint-ignore-file -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; import { AbortController } from "internal:deno_web/03_abort_signal.js"; import { Blob } from "internal:deno_web/09_file.js"; /* esm.sh - esbuild bundle(readable-stream@4.2.0) es2022 production */ -const __process$ = { nextTick };import __buffer$ from "internal:deno_node/polyfills/buffer.ts";import __string_decoder$ from "internal:deno_node/polyfills/string_decoder.ts";import __events$ from "internal:deno_node/polyfills/events.ts";var pi=Object.create;var Bt=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var yi=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,Si=Object.prototype.hasOwnProperty;var E=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of yi(t))!Si.call(e,i)&&i!==n&&Bt(e,i,{get:()=>t[i],enumerable:!(r=wi(t,i))||r.enumerable});return e};var Ri=(e,t,n)=>(n=e!=null?pi(gi(e)):{},Ei(t||!e||!e.__esModule?Bt(n,"default",{value:e,enumerable:!0}):n,e));var m=g((Yf,Gt)=>{"use strict";Gt.exports={ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Uint8Array}});var j=g((Kf,Je)=>{"use strict";var Ai=__buffer$,mi=Object.getPrototypeOf(async function(){}).constructor,Ht=Blob||Ai.Blob,Ti=typeof Ht<"u"?function(t){return t instanceof Ht}:function(t){return!1},Xe=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let r=0;rtypeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of yi(t))!Si.call(e,i)&&i!==n&&Bt(e,i,{get:()=>t[i],enumerable:!(r=wi(t,i))||r.enumerable});return e};var Ri=(e,t,n)=>(n=e!=null?pi(gi(e)):{},Ei(t||!e||!e.__esModule?Bt(n,"default",{value:e,enumerable:!0}):n,e));var m=g((Yf,Gt)=>{"use strict";Gt.exports={ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Uint8Array}});var j=g((Kf,Je)=>{"use strict";var Ai=__buffer$,mi=Object.getPrototypeOf(async function(){}).constructor,Ht=Blob||Ai.Blob,Ti=typeof Ht<"u"?function(t){return t instanceof Ht}:function(t){return!1},Xe=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let r=0;r{e=r,t=i}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((r,...i)=>r?n(r):t(...i))})},debuglog(){return function(){}},format(e,...t){return e.replace(/%([sdifj])/g,function(...[n,r]){let i=t.shift();return r==="f"?i.toFixed(6):r==="j"?JSON.stringify(i):r==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction(e){return e instanceof mi},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:Ti};Je.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var O=g((zf,Kt)=>{"use strict";var{format:Ii,inspect:Re,AggregateError:Mi}=j(),Ni=globalThis.AggregateError||Mi,Di=Symbol("kIsNodeError"),Oi=["string","function","number","object","Function","Object","boolean","bigint","symbol"],qi=/^([A-Z][a-z0-9]*)+$/,xi="__node_internal_",Ae={};function X(e,t){if(!e)throw new Ae.ERR_INTERNAL_ASSERTION(t)}function Vt(e){let t="",n=e.length,r=e[0]==="-"?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function Li(e,t,n){if(typeof t=="function")return X(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);let r=(t.match(/%[dfijoOs]/g)||[]).length;return X(r===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${r}).`),n.length===0?t:Ii(t,...n)}function N(e,t,n){n||(n=Error);class r extends n{constructor(...o){super(Li(e,t,o))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[Di]=!0,Ae[e]=r}function Yt(e){let t=xi+e.name;return Object.defineProperty(e,"name",{value:t}),e}function Pi(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new Ni([t,e],t.message);return n.code=t.code,n}return e||t}var Qe=class extends Error{constructor(t="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new Ae.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};N("ERR_ASSERTION","%s",Error);N("ERR_INVALID_ARG_TYPE",(e,t,n)=>{X(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";e.endsWith(" argument")?r+=`${e} `:r+=`"${e}" ${e.includes(".")?"property":"argument"} `,r+="must be ";let i=[],o=[],l=[];for(let f of t)X(typeof f=="string","All expected entries have to be of type string"),Oi.includes(f)?i.push(f.toLowerCase()):qi.test(f)?o.push(f):(X(f!=="object",'The value "object" should be written as "Object"'),l.push(f));if(o.length>0){let f=i.indexOf("object");f!==-1&&(i.splice(i,f,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:r+=`of type ${i[0]}`;break;case 2:r+=`one of type ${i[0]} or ${i[1]}`;break;default:{let f=i.pop();r+=`one of type ${i.join(", ")}, or ${f}`}}(o.length>0||l.length>0)&&(r+=" or ")}if(o.length>0){switch(o.length){case 1:r+=`an instance of ${o[0]}`;break;case 2:r+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let f=o.pop();r+=`an instance of ${o.join(", ")}, or ${f}`}}l.length>0&&(r+=" or ")}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(r+="an "),r+=`${l[0]}`;break;case 2:r+=`one of ${l[0]} or ${l[1]}`;break;default:{let f=l.pop();r+=`one of ${l.join(", ")}, or ${f}`}}if(n==null)r+=`. Received ${n}`;else if(typeof n=="function"&&n.name)r+=`. Received function ${n.name}`;else if(typeof n=="object"){var u;(u=n.constructor)!==null&&u!==void 0&&u.name?r+=`. Received an instance of ${n.constructor.name}`:r+=`. Received ${Re(n,{depth:-1})}`}else{let f=Re(n,{colors:!1});f.length>25&&(f=`${f.slice(0,25)}...`),r+=`. Received type ${typeof n} (${f})`}return r},TypeError);N("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let r=Re(t);return r.length>128&&(r=r.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${r}`},TypeError);N("ERR_INVALID_RETURN_VALUE",(e,t,n)=>{var r;let i=n!=null&&(r=n.constructor)!==null&&r!==void 0&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${e} to be returned from the "${t}" function but got ${i}.`},TypeError);N("ERR_MISSING_ARGS",(...e)=>{X(e.length>0,"At least one arg needs to be specified");let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(r=>`"${r}"`).join(" or "),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}break}return`${t} must be specified`},TypeError);N("ERR_OUT_OF_RANGE",(e,t,n)=>{X(t,'Missing "range" argument');let r;return Number.isInteger(n)&&Math.abs(n)>2**32?r=Vt(String(n)):typeof n=="bigint"?(r=String(n),(n>2n**32n||n<-(2n**32n))&&(r=Vt(r)),r+="n"):r=Re(n),`The value of "${e}" is out of range. It must be ${t}. Received ${r}`},RangeError);N("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);N("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);N("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);N("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);N("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);N("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);N("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);N("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);N("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);N("ERR_STREAM_WRITE_AFTER_END","write after end",Error);N("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Kt.exports={AbortError:Qe,aggregateTwoErrors:Yt(Pi),hideStackFrames:Yt,codes:Ae}});var _e=g((Xf,nn)=>{"use strict";var{ArrayIsArray:Jt,ArrayPrototypeIncludes:Qt,ArrayPrototypeJoin:Zt,ArrayPrototypeMap:ki,NumberIsInteger:et,NumberIsNaN:Wi,NumberMAX_SAFE_INTEGER:Ci,NumberMIN_SAFE_INTEGER:ji,NumberParseInt:$i,ObjectPrototypeHasOwnProperty:vi,RegExpPrototypeExec:Fi,String:Ui,StringPrototypeToUpperCase:Bi,StringPrototypeTrim:Gi}=m(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:Hi,ERR_INVALID_ARG_TYPE:q,ERR_INVALID_ARG_VALUE:me,ERR_OUT_OF_RANGE:J,ERR_UNKNOWN_SIGNAL:zt}}=O(),{normalizeEncoding:Vi}=j(),{isAsyncFunction:Yi,isArrayBufferView:Ki}=j().types,Xt={};function zi(e){return e===(e|0)}function Xi(e){return e===e>>>0}var Ji=/^[0-7]+$/,Qi="must be a 32-bit unsigned integer or an octal string";function Zi(e,t,n){if(typeof e>"u"&&(e=n),typeof e=="string"){if(Fi(Ji,e)===null)throw new me(t,e,Qi);e=$i(e,8)}return en(e,t),e}var eo=k((e,t,n=ji,r=Ci)=>{if(typeof e!="number")throw new q(t,"number",e);if(!et(e))throw new J(t,"an integer",e);if(er)throw new J(t,`>= ${n} && <= ${r}`,e)}),to=k((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!="number")throw new q(t,"number",e);if(!et(e))throw new J(t,"an integer",e);if(er)throw new J(t,`>= ${n} && <= ${r}`,e)}),en=k((e,t,n=!1)=>{if(typeof e!="number")throw new q(t,"number",e);if(!et(e))throw new J(t,"an integer",e);let r=n?1:0,i=4294967295;if(ei)throw new J(t,`>= ${r} && <= ${i}`,e)});function tn(e,t){if(typeof e!="string")throw new q(t,"string",e)}function no(e,t,n=void 0,r){if(typeof e!="number")throw new q(t,"number",e);if(n!=null&&er||(n!=null||r!=null)&&Wi(e))throw new J(t,`${n!=null?`>= ${n}`:""}${n!=null&&r!=null?" && ":""}${r!=null?`<= ${r}`:""}`,e)}var ro=k((e,t,n)=>{if(!Qt(n,e)){let r=Zt(ki(n,o=>typeof o=="string"?`'${o}'`:Ui(o)),", "),i="must be one of: "+r;throw new me(t,e,i)}});function io(e,t){if(typeof e!="boolean")throw new q(t,"boolean",e)}function Ze(e,t,n){return e==null||!vi(e,t)?n:e[t]}var oo=k((e,t,n=null)=>{let r=Ze(n,"allowArray",!1),i=Ze(n,"allowFunction",!1);if(!Ze(n,"nullable",!1)&&e===null||!r&&Jt(e)||typeof e!="object"&&(!i||typeof e!="function"))throw new q(t,"Object",e)}),lo=k((e,t,n=0)=>{if(!Jt(e))throw new q(t,"Array",e);if(e.length{if(!Ki(e))throw new q(t,["Buffer","TypedArray","DataView"],e)});function uo(e,t){let n=Vi(t),r=e.length;if(n==="hex"&&r%2!==0)throw new me("encoding",t,`is invalid for data of length ${r}`)}function so(e,t="Port",n=!0){if(typeof e!="number"&&typeof e!="string"||typeof e=="string"&&Gi(e).length===0||+e!==+e>>>0||e>65535||e===0&&!n)throw new Hi(t,e,n);return e|0}var co=k((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new q(t,"AbortSignal",e)}),ho=k((e,t)=>{if(typeof e!="function")throw new q(t,"Function",e)}),bo=k((e,t)=>{if(typeof e!="function"||Yi(e))throw new q(t,"Function",e)}),_o=k((e,t)=>{if(e!==void 0)throw new q(t,"undefined",e)});function po(e,t,n){if(!Qt(n,e))throw new q(t,`('${Zt(n,"|")}')`,e)}nn.exports={isInt32:zi,isUint32:Xi,parseFileMode:Zi,validateArray:lo,validateBoolean:io,validateBuffer:fo,validateEncoding:uo,validateFunction:ho,validateInt32:to,validateInteger:eo,validateNumber:no,validateObject:oo,validateOneOf:ro,validatePlainFunction:bo,validatePort:so,validateSignalName:ao,validateString:tn,validateUint32:en,validateUndefined:_o,validateUnion:po,validateAbortSignal:co}});var V=g((Jf,_n)=>{"use strict";var{Symbol:Te,SymbolAsyncIterator:rn,SymbolIterator:on}=m(),ln=Te("kDestroyed"),an=Te("kIsErrored"),tt=Te("kIsReadable"),fn=Te("kIsDisturbed");function Ie(e,t=!1){var n;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((n=e._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!e._writableState||e._readableState))}function Me(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function wo(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Q(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function yo(e,t){return e==null?!1:t===!0?typeof e[rn]=="function":t===!1?typeof e[on]=="function":typeof e[rn]=="function"||typeof e[on]=="function"}function Ne(e){if(!Q(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[ln]||r!=null&&r.destroyed)}function un(e){if(!Me(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended!="boolean"?null:t.ended}function go(e,t){if(!Me(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished!="boolean"?null:!!(n.finished||t===!1&&n.ended===!0&&n.length===0)}function So(e){if(!Ie(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended!="boolean"?null:t.ended}function sn(e,t){if(!Ie(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted!="boolean"?null:!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0)}function dn(e){return e&&e[tt]!=null?e[tt]:typeof e?.readable!="boolean"?null:Ne(e)?!1:Ie(e)&&e.readable&&!sn(e)}function cn(e){return typeof e?.writable!="boolean"?null:Ne(e)?!1:Me(e)&&e.writable&&!un(e)}function Eo(e,t){return Q(e)?Ne(e)?!0:!(t?.readable!==!1&&dn(e)||t?.writable!==!1&&cn(e)):null}function Ro(e){var t,n;return Q(e)?e.writableErrored?e.writableErrored:(t=(n=e._writableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function Ao(e){var t,n;return Q(e)?e.readableErrored?e.readableErrored:(t=(n=e._readableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function mo(e){if(!Q(e))return null;if(typeof e.closed=="boolean")return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed=="boolean"||typeof n?.closed=="boolean"?t?.closed||n?.closed:typeof e._closed=="boolean"&&hn(e)?e._closed:null}function hn(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function bn(e){return typeof e._sent100=="boolean"&&hn(e)}function To(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function Io(e){if(!Q(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&bn(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function Mo(e){var t;return!!(e&&((t=e[fn])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function No(e){var t,n,r,i,o,l,u,f,a,c;return!!(e&&((t=(n=(r=(i=(o=(l=e[an])!==null&&l!==void 0?l:e.readableErrored)!==null&&o!==void 0?o:e.writableErrored)!==null&&i!==void 0?i:(u=e._readableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&r!==void 0?r:(f=e._writableState)===null||f===void 0?void 0:f.errorEmitted)!==null&&n!==void 0?n:(a=e._readableState)===null||a===void 0?void 0:a.errored)!==null&&t!==void 0?t:(c=e._writableState)===null||c===void 0?void 0:c.errored))}_n.exports={kDestroyed:ln,isDisturbed:Mo,kIsDisturbed:fn,isErrored:No,kIsErrored:an,isReadable:dn,kIsReadable:tt,isClosed:mo,isDestroyed:Ne,isDuplexNodeStream:wo,isFinished:Eo,isIterable:yo,isReadableNodeStream:Ie,isReadableEnded:So,isReadableFinished:sn,isReadableErrored:Ao,isNodeStream:Q,isWritable:cn,isWritableNodeStream:Me,isWritableEnded:un,isWritableFinished:go,isWritableErrored:Ro,isServerRequest:To,isServerResponse:bn,willEmitClose:Io}});var Y=g((Qf,rt)=>{var oe=__process$,{AbortError:Do,codes:Oo}=O(),{ERR_INVALID_ARG_TYPE:qo,ERR_STREAM_PREMATURE_CLOSE:pn}=Oo,{kEmptyObject:wn,once:yn}=j(),{validateAbortSignal:xo,validateFunction:Lo,validateObject:Po}=_e(),{Promise:ko}=m(),{isClosed:Wo,isReadable:gn,isReadableNodeStream:nt,isReadableFinished:Sn,isReadableErrored:Co,isWritable:En,isWritableNodeStream:Rn,isWritableFinished:An,isWritableErrored:jo,isNodeStream:$o,willEmitClose:vo}=V();function Fo(e){return e.setHeader&&typeof e.abort=="function"}var Uo=()=>{};function mn(e,t,n){var r,i;arguments.length===2?(n=t,t=wn):t==null?t=wn:Po(t,"options"),Lo(n,"callback"),xo(t.signal,"options.signal"),n=yn(n);let o=(r=t.readable)!==null&&r!==void 0?r:nt(e),l=(i=t.writable)!==null&&i!==void 0?i:Rn(e);if(!$o(e))throw new qo("stream","Stream",e);let u=e._writableState,f=e._readableState,a=()=>{e.writable||b()},c=vo(e)&&nt(e)===o&&Rn(e)===l,s=An(e,!1),b=()=>{s=!0,e.destroyed&&(c=!1),!(c&&(!e.readable||o))&&(!o||d)&&n.call(e)},d=Sn(e,!1),h=()=>{d=!0,e.destroyed&&(c=!1),!(c&&(!e.writable||l))&&(!l||s)&&n.call(e)},D=M=>{n.call(e,M)},L=Wo(e),_=()=>{L=!0;let M=jo(e)||Co(e);if(M&&typeof M!="boolean")return n.call(e,M);if(o&&!d&&nt(e,!0)&&!Sn(e,!1))return n.call(e,new pn);if(l&&!s&&!An(e,!1))return n.call(e,new pn);n.call(e)},p=()=>{e.req.on("finish",b)};Fo(e)?(e.on("complete",b),c||e.on("abort",_),e.req?p():e.on("request",p)):l&&!u&&(e.on("end",a),e.on("close",a)),!c&&typeof e.aborted=="boolean"&&e.on("aborted",_),e.on("end",h),e.on("finish",b),t.error!==!1&&e.on("error",D),e.on("close",_),L?oe.nextTick(_):u!=null&&u.errorEmitted||f!=null&&f.errorEmitted?c||oe.nextTick(_):(!o&&(!c||gn(e))&&(s||En(e)===!1)||!l&&(!c||En(e))&&(d||gn(e)===!1)||f&&e.req&&e.aborted)&&oe.nextTick(_);let I=()=>{n=Uo,e.removeListener("aborted",_),e.removeListener("complete",b),e.removeListener("abort",_),e.removeListener("request",p),e.req&&e.req.removeListener("finish",b),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",b),e.removeListener("end",h),e.removeListener("error",D),e.removeListener("close",_)};if(t.signal&&!L){let M=()=>{let F=n;I(),F.call(e,new Do(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)oe.nextTick(M);else{let F=n;n=yn((...re)=>{t.signal.removeEventListener("abort",M),F.apply(e,re)}),t.signal.addEventListener("abort",M)}}return I}function Bo(e,t){return new ko((n,r)=>{mn(e,t,i=>{i?r(i):n()})})}rt.exports=mn;rt.exports.finished=Bo});var xn=g((Zf,lt)=>{"use strict";var Nn=AbortController,{codes:{ERR_INVALID_ARG_TYPE:pe,ERR_MISSING_ARGS:Go,ERR_OUT_OF_RANGE:Ho},AbortError:$}=O(),{validateAbortSignal:le,validateInteger:Vo,validateObject:ae}=_e(),Yo=m().Symbol("kWeak"),{finished:Ko}=Y(),{ArrayPrototypePush:zo,MathFloor:Xo,Number:Jo,NumberIsNaN:Qo,Promise:Tn,PromiseReject:In,PromisePrototypeThen:Zo,Symbol:Dn}=m(),De=Dn("kEmpty"),Mn=Dn("kEof");function Oe(e,t){if(typeof e!="function")throw new pe("fn",["Function","AsyncFunction"],e);t!=null&&ae(t,"options"),t?.signal!=null&&le(t.signal,"options.signal");let n=1;return t?.concurrency!=null&&(n=Xo(t.concurrency)),Vo(n,"concurrency",1),async function*(){var i,o;let l=new Nn,u=this,f=[],a=l.signal,c={signal:a},s=()=>l.abort();t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted&&s(),t==null||(o=t.signal)===null||o===void 0||o.addEventListener("abort",s);let b,d,h=!1;function D(){h=!0}async function L(){try{for await(let I of u){var _;if(h)return;if(a.aborted)throw new $;try{I=e(I,c)}catch(M){I=In(M)}I!==De&&(typeof((_=I)===null||_===void 0?void 0:_.catch)=="function"&&I.catch(D),f.push(I),b&&(b(),b=null),!h&&f.length&&f.length>=n&&await new Tn(M=>{d=M}))}f.push(Mn)}catch(I){let M=In(I);Zo(M,void 0,D),f.push(M)}finally{var p;h=!0,b&&(b(),b=null),t==null||(p=t.signal)===null||p===void 0||p.removeEventListener("abort",s)}}L();try{for(;;){for(;f.length>0;){let _=await f[0];if(_===Mn)return;if(a.aborted)throw new $;_!==De&&(yield _),f.shift(),d&&(d(),d=null)}await new Tn(_=>{b=_})}}finally{l.abort(),h=!0,d&&(d(),d=null)}}.call(this)}function el(e=void 0){return e!=null&&ae(e,"options"),e?.signal!=null&&le(e.signal,"options.signal"),async function*(){let n=0;for await(let i of this){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new $({cause:e.signal.reason});yield[n++,i]}}.call(this)}async function On(e,t=void 0){for await(let n of ot.call(this,e,t))return!0;return!1}async function tl(e,t=void 0){if(typeof e!="function")throw new pe("fn",["Function","AsyncFunction"],e);return!await On.call(this,async(...n)=>!await e(...n),t)}async function nl(e,t){for await(let n of ot.call(this,e,t))return n}async function rl(e,t){if(typeof e!="function")throw new pe("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i),De}for await(let r of Oe.call(this,n,t));}function ot(e,t){if(typeof e!="function")throw new pe("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i)?r:De}return Oe.call(this,n,t)}var it=class extends Go{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function il(e,t,n){var r;if(typeof e!="function")throw new pe("reducer",["Function","AsyncFunction"],e);n!=null&&ae(n,"options"),n?.signal!=null&&le(n.signal,"options.signal");let i=arguments.length>1;if(n!=null&&(r=n.signal)!==null&&r!==void 0&&r.aborted){let a=new $(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await Ko(this.destroy(a)),a}let o=new Nn,l=o.signal;if(n!=null&&n.signal){let a={once:!0,[Yo]:this};n.signal.addEventListener("abort",()=>o.abort(),a)}let u=!1;try{for await(let a of this){var f;if(u=!0,n!=null&&(f=n.signal)!==null&&f!==void 0&&f.aborted)throw new $;i?t=await e(t,a,{signal:l}):(t=a,i=!0)}if(!u&&!i)throw new it}finally{o.abort()}return t}async function ol(e){e!=null&&ae(e,"options"),e?.signal!=null&&le(e.signal,"options.signal");let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new $(void 0,{cause:e.signal.reason});zo(t,r)}return t}function ll(e,t){let n=Oe.call(this,e,t);return async function*(){for await(let i of n)yield*i}.call(this)}function qn(e){if(e=Jo(e),Qo(e))return 0;if(e<0)throw new Ho("number",">= 0",e);return e}function al(e,t=void 0){return t!=null&&ae(t,"options"),t?.signal!=null&&le(t.signal,"options.signal"),e=qn(e),async function*(){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new $;for await(let o of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new $;e--<=0&&(yield o)}}.call(this)}function fl(e,t=void 0){return t!=null&&ae(t,"options"),t?.signal!=null&&le(t.signal,"options.signal"),e=qn(e),async function*(){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new $;for await(let o of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new $;if(e-- >0)yield o;else return}}.call(this)}lt.exports.streamReturningOperators={asIndexedPairs:el,drop:al,filter:ot,flatMap:ll,map:Oe,take:fl};lt.exports.promiseReturningOperators={every:tl,forEach:rl,reduce:il,toArray:ol,some:On,find:nl}});var Z=g((eu,vn)=>{"use strict";var K=__process$,{aggregateTwoErrors:ul,codes:{ERR_MULTIPLE_CALLBACK:sl},AbortError:dl}=O(),{Symbol:kn}=m(),{kDestroyed:cl,isDestroyed:hl,isFinished:bl,isServerRequest:_l}=V(),Wn=kn("kDestroy"),at=kn("kConstruct");function Cn(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function pl(e,t){let n=this._readableState,r=this._writableState,i=r||n;return r&&r.destroyed||n&&n.destroyed?(typeof t=="function"&&t(),this):(Cn(e,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),i.constructed?Ln(this,e,t):this.once(Wn,function(o){Ln(this,ul(o,e),t)}),this)}function Ln(e,t,n){let r=!1;function i(o){if(r)return;r=!0;let l=e._readableState,u=e._writableState;Cn(o,u,l),u&&(u.closed=!0),l&&(l.closed=!0),typeof n=="function"&&n(o),o?K.nextTick(wl,e,o):K.nextTick(jn,e)}try{e._destroy(t||null,i)}catch(o){i(o)}}function wl(e,t){ft(e,t),jn(e)}function jn(e){let t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n&&n.emitClose||t&&t.emitClose)&&e.emit("close")}function ft(e,t){let n=e._readableState,r=e._writableState;r&&r.errorEmitted||n&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function yl(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function ut(e,t,n){let r=e._readableState,i=e._writableState;if(i&&i.destroyed||r&&r.destroyed)return this;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),r&&!r.errored&&(r.errored=t),n?K.nextTick(ft,e,t):ft(e,t))}function gl(e,t){if(typeof e._construct!="function")return;let n=e._readableState,r=e._writableState;n&&(n.constructed=!1),r&&(r.constructed=!1),e.once(at,t),!(e.listenerCount(at)>1)&&K.nextTick(Sl,e)}function Sl(e){let t=!1;function n(r){if(t){ut(e,r??new sl);return}t=!0;let i=e._readableState,o=e._writableState,l=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),l.destroyed?e.emit(Wn,r):r?ut(e,r,!0):K.nextTick(El,e)}try{e._construct(n)}catch(r){n(r)}}function El(e){e.emit(at)}function Pn(e){return e&&e.setHeader&&typeof e.abort=="function"}function $n(e){e.emit("close")}function Rl(e,t){e.emit("error",t),K.nextTick($n,e)}function Al(e,t){!e||hl(e)||(!t&&!bl(e)&&(t=new dl),_l(e)?(e.socket=null,e.destroy(t)):Pn(e)?e.abort():Pn(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?K.nextTick(Rl,e,t):K.nextTick($n,e),e.destroyed||(e[cl]=!0))}vn.exports={construct:gl,destroyer:Al,destroy:pl,undestroy:yl,errorOrDestroy:ut}});var Le=g((tu,Un)=>{"use strict";var{ArrayIsArray:ml,ObjectSetPrototypeOf:Fn}=m(),{EventEmitter:qe}=__events$;function xe(e){qe.call(this,e)}Fn(xe.prototype,qe.prototype);Fn(xe,qe);xe.prototype.pipe=function(e,t){let n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",l),n.on("close",u));let o=!1;function l(){o||(o=!0,e.end())}function u(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function f(c){a(),qe.listenerCount(this,"error")===0&&this.emit("error",c)}st(n,"error",f),st(e,"error",f);function a(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",l),n.removeListener("close",u),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",a),n.removeListener("close",a),e.removeListener("close",a)}return n.on("end",a),n.on("close",a),e.on("close",a),e.emit("pipe",n),e};function st(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):ml(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}Un.exports={Stream:xe,prependListener:st}});var ke=g((nu,Pe)=>{"use strict";var{AbortError:Tl,codes:Il}=O(),Ml=Y(),{ERR_INVALID_ARG_TYPE:Bn}=Il,Nl=(e,t)=>{if(typeof e!="object"||!("aborted"in e))throw new Bn(t,"AbortSignal",e)};function Dl(e){return!!(e&&typeof e.pipe=="function")}Pe.exports.addAbortSignal=function(t,n){if(Nl(t,"signal"),!Dl(n))throw new Bn("stream","stream.Stream",n);return Pe.exports.addAbortSignalNoValidate(t,n)};Pe.exports.addAbortSignalNoValidate=function(e,t){if(typeof e!="object"||!("aborted"in e))return t;let n=()=>{t.destroy(new Tl(void 0,{cause:e.reason}))};return e.aborted?n():(e.addEventListener("abort",n),Ml(t,()=>e.removeEventListener("abort",n))),t}});var Vn=g((iu,Hn)=>{"use strict";var{StringPrototypeSlice:Gn,SymbolIterator:Ol,TypedArrayPrototypeSet:We,Uint8Array:ql}=m(),{Buffer:dt}=__buffer$,{inspect:xl}=j();Hn.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){let n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(t){let n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}shift(){if(this.length===0)return;let t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let n=this.head,r=""+n.data;for(;(n=n.next)!==null;)r+=t+n.data;return r}concat(t){if(this.length===0)return dt.alloc(0);let n=dt.allocUnsafe(t>>>0),r=this.head,i=0;for(;r;)We(n,r.data,i),i+=r.data.length,r=r.next;return n}consume(t,n){let r=this.head.data;if(to.length)n+=o,t-=o.length;else{t===o.length?(n+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(n+=Gn(o,0,t),this.head=r,r.data=Gn(o,t));break}++i}while((r=r.next)!==null);return this.length-=i,n}_getBuffer(t){let n=dt.allocUnsafe(t),r=t,i=this.head,o=0;do{let l=i.data;if(t>l.length)We(n,l,r-t),t-=l.length;else{t===l.length?(We(n,l,r-t),++o,i.next?this.head=i.next:this.head=this.tail=null):(We(n,new ql(l.buffer,l.byteOffset,t),r-t),this.head=i,i.data=l.slice(t));break}++o}while((i=i.next)!==null);return this.length-=o,n}[Symbol.for("nodejs.util.inspect.custom")](t,n){return xl(this,{...n,depth:0,customInspect:!1})}}});var Ce=g((ou,Kn)=>{"use strict";var{MathFloor:Ll,NumberIsInteger:Pl}=m(),{ERR_INVALID_ARG_VALUE:kl}=O().codes;function Wl(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function Yn(e){return e?16:16*1024}function Cl(e,t,n,r){let i=Wl(t,r,n);if(i!=null){if(!Pl(i)||i<0){let o=r?`options.${n}`:"options.highWaterMark";throw new kl(o,i)}return Ll(i)}return Yn(e.objectMode)}Kn.exports={getHighWaterMark:Cl,getDefaultHighWaterMark:Yn}});var ct=g((lu,Qn)=>{"use strict";var zn=__process$,{PromisePrototypeThen:jl,SymbolAsyncIterator:Xn,SymbolIterator:Jn}=m(),{Buffer:$l}=__buffer$,{ERR_INVALID_ARG_TYPE:vl,ERR_STREAM_NULL_VALUES:Fl}=O().codes;function Ul(e,t,n){let r;if(typeof t=="string"||t instanceof $l)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let i;if(t&&t[Xn])i=!0,r=t[Xn]();else if(t&&t[Jn])i=!1,r=t[Jn]();else throw new vl("iterable",["Iterable"],t);let o=new e({objectMode:!0,highWaterMark:1,...n}),l=!1;o._read=function(){l||(l=!0,f())},o._destroy=function(a,c){jl(u(a),()=>zn.nextTick(c,a),s=>zn.nextTick(c,s||a))};async function u(a){let c=a!=null,s=typeof r.throw=="function";if(c&&s){let{value:b,done:d}=await r.throw(a);if(await b,d)return}if(typeof r.return=="function"){let{value:b}=await r.return();await b}}async function f(){for(;;){try{let{value:a,done:c}=i?await r.next():r.next();if(c)o.push(null);else{let s=a&&typeof a.then=="function"?await a:a;if(s===null)throw l=!1,new Fl;if(o.push(s))continue;l=!1}}catch(a){o.destroy(a)}break}}return o}Qn.exports=Ul});var we=g((au,dr)=>{var W=__process$,{ArrayPrototypeIndexOf:Bl,NumberIsInteger:Gl,NumberIsNaN:Hl,NumberParseInt:Vl,ObjectDefineProperties:tr,ObjectKeys:Yl,ObjectSetPrototypeOf:nr,Promise:Kl,SafeSet:zl,SymbolAsyncIterator:Xl,Symbol:Jl}=m();dr.exports=w;w.ReadableState=yt;var{EventEmitter:Ql}=__events$,{Stream:z,prependListener:Zl}=Le(),{Buffer:ht}=__buffer$,{addAbortSignal:ea}=ke(),ta=Y(),y=j().debuglog("stream",e=>{y=e}),na=Vn(),ue=Z(),{getHighWaterMark:ra,getDefaultHighWaterMark:ia}=Ce(),{aggregateTwoErrors:Zn,codes:{ERR_INVALID_ARG_TYPE:oa,ERR_METHOD_NOT_IMPLEMENTED:la,ERR_OUT_OF_RANGE:aa,ERR_STREAM_PUSH_AFTER_EOF:fa,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:ua}}=O(),{validateObject:sa}=_e(),ee=Jl("kPaused"),{StringDecoder:rr}=__string_decoder$,da=ct();nr(w.prototype,z.prototype);nr(w,z);var bt=()=>{},{errorOrDestroy:fe}=ue;function yt(e,t,n){typeof n!="boolean"&&(n=t instanceof v()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.readableObjectMode)),this.highWaterMark=e?ra(this,e,"readableHighWaterMark",n):ia(!1),this.buffer=new na,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[ee]=null,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new rr(e.encoding),this.encoding=e.encoding)}function w(e){if(!(this instanceof w))return new w(e);let t=this instanceof v();this._readableState=new yt(e,this,t),e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.construct=="function"&&(this._construct=e.construct),e.signal&&!t&&ea(e.signal,this)),z.call(this,e),ue.construct(this,()=>{this._readableState.needReadable&&je(this,this._readableState)})}w.prototype.destroy=ue.destroy;w.prototype._undestroy=ue.undestroy;w.prototype._destroy=function(e,t){t(e)};w.prototype[Ql.captureRejectionSymbol]=function(e){this.destroy(e)};w.prototype.push=function(e,t){return ir(this,e,t,!1)};w.prototype.unshift=function(e,t){return ir(this,e,t,!0)};function ir(e,t,n,r){y("readableAddChunk",t);let i=e._readableState,o;if(i.objectMode||(typeof t=="string"?(n=n||i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=ht.from(t,n).toString(i.encoding):(t=ht.from(t,n),n=""))):t instanceof ht?n="":z._isUint8Array(t)?(t=z._uint8ArrayToBuffer(t),n=""):t!=null&&(o=new oa("chunk",["string","Buffer","Uint8Array"],t))),o)fe(e,o);else if(t===null)i.reading=!1,ba(e,i);else if(i.objectMode||t&&t.length>0)if(r)if(i.endEmitted)fe(e,new ua);else{if(i.destroyed||i.errored)return!1;_t(e,i,t,!0)}else if(i.ended)fe(e,new fa);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?_t(e,i,t,!1):je(e,i)):_t(e,i,t,!1)}else r||(i.reading=!1,je(e,i));return!i.ended&&(i.length0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&$e(e)),je(e,t)}w.prototype.isPaused=function(){let e=this._readableState;return e[ee]===!0||e.flowing===!1};w.prototype.setEncoding=function(e){let t=new rr(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r="";for(let i of n)r+=t.write(i);return n.clear(),r!==""&&n.push(r),this._readableState.length=r.length,this};var ca=1073741824;function ha(e){if(e>ca)throw new aa("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function er(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:Hl(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}w.prototype.read=function(e){y("read",e),e===void 0?e=NaN:Gl(e)||(e=Vl(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=ha(e)),e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return y("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?pt(this):$e(this),null;if(e=er(e,t),e===0&&t.ended)return t.length===0&&pt(this),null;let r=t.needReadable;if(y("need readable",r),(t.length===0||t.length-e0?i=ur(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&pt(this)),i!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit("data",i)),i};function ba(e,t){if(y("onEofChunk"),!t.ended){if(t.decoder){let n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?$e(e):(t.needReadable=!1,t.emittedReadable=!0,or(e))}}function $e(e){let t=e._readableState;y("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,W.nextTick(or,e))}function or(e){let t=e._readableState;y("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ar(e)}function je(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,W.nextTick(_a,e,t))}function _a(e,t){for(;!t.reading&&!t.ended&&(t.length1&&r.pipes.includes(e)&&(y("false write response, pause",r.awaitDrainWriters.size),r.awaitDrainWriters.add(e)),n.pause()),f||(f=pa(n,e),e.on("drain",f))}n.on("data",b);function b(_){y("ondata");let p=e.write(_);y("dest.write",p),p===!1&&s()}function d(_){if(y("onerror",_),L(),e.removeListener("error",d),e.listenerCount("error")===0){let p=e._writableState||e._readableState;p&&!p.errorEmitted?fe(e,_):e.emit("error",_)}}Zl(e,"error",d);function h(){e.removeListener("finish",D),L()}e.once("close",h);function D(){y("onfinish"),e.removeListener("close",h),L()}e.once("finish",D);function L(){y("unpipe"),n.unpipe(e)}return e.emit("pipe",n),e.writableNeedDrain===!0?r.flowing&&s():r.flowing||(y("pipe resume"),n.resume()),e};function pa(e,t){return function(){let r=e._readableState;r.awaitDrainWriters===t?(y("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(y("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),(!r.awaitDrainWriters||r.awaitDrainWriters.size===0)&&e.listenerCount("data")&&e.resume()}}w.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let i=t.pipes;t.pipes=[],this.pause();for(let o=0;o0,r.flowing!==!1&&this.resume()):e==="readable"&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,y("on readable",r.length,r.reading),r.length?$e(this):r.reading||W.nextTick(wa,this)),n};w.prototype.addListener=w.prototype.on;w.prototype.removeListener=function(e,t){let n=z.prototype.removeListener.call(this,e,t);return e==="readable"&&W.nextTick(lr,this),n};w.prototype.off=w.prototype.removeListener;w.prototype.removeAllListeners=function(e){let t=z.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&W.nextTick(lr,this),t};function lr(e){let t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&t[ee]===!1?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function wa(e){y("readable nexttick read 0"),e.read(0)}w.prototype.resume=function(){let e=this._readableState;return e.flowing||(y("resume"),e.flowing=!e.readableListening,ya(this,e)),e[ee]=!1,this};function ya(e,t){t.resumeScheduled||(t.resumeScheduled=!0,W.nextTick(ga,e,t))}function ga(e,t){y("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ar(e),t.flowing&&!t.reading&&e.read(0)}w.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ee]=!0,this};function ar(e){let t=e._readableState;for(y("flow",t.flowing);t.flowing&&e.read()!==null;);}w.prototype.wrap=function(e){let t=!1;e.on("data",r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())}),e.on("end",()=>{this.push(null)}),e.on("error",r=>{fe(this,r)}),e.on("close",()=>{this.destroy()}),e.on("destroy",()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=Yl(e);for(let r=1;r{i=l?Zn(i,l):null,n(),n=bt});try{for(;;){let l=e.destroyed?null:e.read();if(l!==null)yield l;else{if(i)throw i;if(i===null)return;await new Kl(r)}}}catch(l){throw i=Zn(i,l),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?ue.destroyer(e,null):(e.off("readable",r),o())}}tr(w.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){!this._readableState||(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});tr(yt.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[ee]!==!1},set(e){this[ee]=!!e}}});w._fromList=ur;function ur(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(t.decoder?n=t.buffer.join(""):t.buffer.length===1?n=t.buffer.first():n=t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function pt(e){let t=e._readableState;y("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,W.nextTick(Ea,t,e))}function Ea(e,t){if(y("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit("end"),t.writable&&t.allowHalfOpen===!1)W.nextTick(Ra,t);else if(e.autoDestroy){let n=t._writableState;(!n||n.autoDestroy&&(n.finished||n.writable===!1))&&t.destroy()}}}function Ra(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}w.from=function(e,t){return da(w,e,t)};var wt;function sr(){return wt===void 0&&(wt={}),wt}w.fromWeb=function(e,t){return sr().newStreamReadableFromReadableStream(e,t)};w.toWeb=function(e,t){return sr().newReadableStreamFromStreamReadable(e,t)};w.wrap=function(e,t){var n,r;return new w({objectMode:(n=(r=e.readableObjectMode)!==null&&r!==void 0?r:e.objectMode)!==null&&n!==void 0?n:!0,...t,destroy(i,o){ue.destroyer(e,i),o(i)}}).wrap(e)}});var Tt=g((fu,Ar)=>{var te=__process$,{ArrayPrototypeSlice:br,Error:Aa,FunctionPrototypeSymbolHasInstance:_r,ObjectDefineProperty:pr,ObjectDefineProperties:ma,ObjectSetPrototypeOf:wr,StringPrototypeToLowerCase:Ta,Symbol:Ia,SymbolHasInstance:Ma}=m();Ar.exports=S;S.WritableState=Se;var{EventEmitter:Na}=__events$,ye=Le().Stream,{Buffer:ve}=__buffer$,Be=Z(),{addAbortSignal:Da}=ke(),{getHighWaterMark:Oa,getDefaultHighWaterMark:qa}=Ce(),{ERR_INVALID_ARG_TYPE:xa,ERR_METHOD_NOT_IMPLEMENTED:La,ERR_MULTIPLE_CALLBACK:yr,ERR_STREAM_CANNOT_PIPE:Pa,ERR_STREAM_DESTROYED:ge,ERR_STREAM_ALREADY_FINISHED:ka,ERR_STREAM_NULL_VALUES:Wa,ERR_STREAM_WRITE_AFTER_END:Ca,ERR_UNKNOWN_ENCODING:gr}=O().codes,{errorOrDestroy:se}=Be;wr(S.prototype,ye.prototype);wr(S,ye);function Et(){}var de=Ia("kOnFinished");function Se(e,t,n){typeof n!="boolean"&&(n=t instanceof v()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?Oa(this,e,"writableHighWaterMark",n):qa(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(e&&e.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=$a.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Ue(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[de]=[]}function Ue(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}Se.prototype.getBuffer=function(){return br(this.buffered,this.bufferedIndex)};pr(Se.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function S(e){let t=this instanceof v();if(!t&&!_r(S,this))return new S(e);this._writableState=new Se(e,this,t),e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final),typeof e.construct=="function"&&(this._construct=e.construct),e.signal&&Da(e.signal,this)),ye.call(this,e),Be.construct(this,()=>{let n=this._writableState;n.writing||At(this,n),mt(this,n)})}pr(S,Ma,{__proto__:null,value:function(e){return _r(this,e)?!0:this!==S?!1:e&&e._writableState instanceof Se}});S.prototype.pipe=function(){se(this,new Pa)};function Sr(e,t,n,r){let i=e._writableState;if(typeof n=="function")r=n,n=i.defaultEncoding;else{if(!n)n=i.defaultEncoding;else if(n!=="buffer"&&!ve.isEncoding(n))throw new gr(n);typeof r!="function"&&(r=Et)}if(t===null)throw new Wa;if(!i.objectMode)if(typeof t=="string")i.decodeStrings!==!1&&(t=ve.from(t,n),n="buffer");else if(t instanceof ve)n="buffer";else if(ye._isUint8Array(t))t=ye._uint8ArrayToBuffer(t),n="buffer";else throw new xa("chunk",["string","Buffer","Uint8Array"],t);let o;return i.ending?o=new Ca:i.destroyed&&(o=new ge("write")),o?(te.nextTick(r,o),se(e,o,!0),o):(i.pendingcb++,ja(e,i,t,n,r))}S.prototype.write=function(e,t,n){return Sr(this,e,t,n)===!0};S.prototype.cork=function(){this._writableState.corked++};S.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||At(this,e))};S.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=Ta(t)),!ve.isEncoding(t))throw new gr(t);return this._writableState.defaultEncoding=t,this};function ja(e,t,n,r,i){let o=t.objectMode?1:n.length;t.length+=o;let l=t.lengthn.bufferedIndex&&At(e,n),r?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===i?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:i,stream:e,state:n},te.nextTick(va,n.afterWriteTickInfo)):Er(e,n,1,i))}function va({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,Er(e,t,n,r)}function Er(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));n-- >0;)t.pendingcb--,r();t.destroyed&&Rt(t),mt(e,t)}function Rt(e){if(e.writing)return;for(let i=e.bufferedIndex;i1&&e._writev){t.pendingcb-=o-1;let u=t.allNoop?Et:a=>{for(let c=l;c256?(n.splice(0,l),t.bufferedIndex=0):t.bufferedIndex=l}t.bufferProcessing=!1}S.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new La("_write()")};S.prototype._writev=null;S.prototype.end=function(e,t,n){let r=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let i;if(e!=null){let o=Sr(this,e,t);o instanceof Aa&&(i=o)}return r.corked&&(r.corked=1,this.uncork()),i||(!r.errored&&!r.ending?(r.ending=!0,mt(this,r,!0),r.ended=!0):r.finished?i=new ka("end"):r.destroyed&&(i=new ge("end"))),typeof n=="function"&&(i||r.finished?te.nextTick(n,i):r[de].push(n)),this};function Fe(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function Fa(e,t){let n=!1;function r(i){if(n){se(e,i??yr());return}if(n=!0,t.pendingcb--,i){let o=t[de].splice(0);for(let l=0;l{Fe(i)?St(r,i):i.pendingcb--},e,t)):Fe(t)&&(t.pendingcb++,St(e,t))))}function St(e,t){t.pendingcb--,t.finished=!0;let n=t[de].splice(0);for(let r=0;r{var It=__process$,Ga=__buffer$,{isReadable:Ha,isWritable:Va,isIterable:mr,isNodeStream:Ya,isReadableNodeStream:Tr,isWritableNodeStream:Ir,isDuplexNodeStream:Ka}=V(),Mr=Y(),{AbortError:Lr,codes:{ERR_INVALID_ARG_TYPE:za,ERR_INVALID_RETURN_VALUE:Nr}}=O(),{destroyer:ce}=Z(),Xa=v(),Ja=we(),{createDeferredPromise:Dr}=j(),Or=ct(),qr=Blob||Ga.Blob,Qa=typeof qr<"u"?function(t){return t instanceof qr}:function(t){return!1},Za=AbortController,{FunctionPrototypeCall:xr}=m(),ne=class extends Xa{constructor(t){super(t),t?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};Pr.exports=function e(t,n){if(Ka(t))return t;if(Tr(t))return Ge({readable:t});if(Ir(t))return Ge({writable:t});if(Ya(t))return Ge({writable:!1,readable:!1});if(typeof t=="function"){let{value:i,write:o,final:l,destroy:u}=ef(t);if(mr(i))return Or(ne,i,{objectMode:!0,write:o,final:l,destroy:u});let f=i?.then;if(typeof f=="function"){let a,c=xr(f,i,s=>{if(s!=null)throw new Nr("nully","body",s)},s=>{ce(a,s)});return a=new ne({objectMode:!0,readable:!1,write:o,final(s){l(async()=>{try{await c,It.nextTick(s,null)}catch(b){It.nextTick(s,b)}})},destroy:u})}throw new Nr("Iterable, AsyncIterable or AsyncFunction",n,i)}if(Qa(t))return e(t.arrayBuffer());if(mr(t))return Or(ne,t,{objectMode:!0,writable:!1});if(typeof t?.writable=="object"||typeof t?.readable=="object"){let i=t!=null&&t.readable?Tr(t?.readable)?t?.readable:e(t.readable):void 0,o=t!=null&&t.writable?Ir(t?.writable)?t?.writable:e(t.writable):void 0;return Ge({readable:i,writable:o})}let r=t?.then;if(typeof r=="function"){let i;return xr(r,t,o=>{o!=null&&i.push(o),i.push(null)},o=>{ce(i,o)}),i=new ne({objectMode:!0,writable:!1,read(){}})}throw new za(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)};function ef(e){let{promise:t,resolve:n}=Dr(),r=new Za,i=r.signal;return{value:e(async function*(){for(;;){let l=t;t=null;let{chunk:u,done:f,cb:a}=await l;if(It.nextTick(a),f)return;if(i.aborted)throw new Lr(void 0,{cause:i.reason});({promise:t,resolve:n}=Dr()),yield u}}(),{signal:i}),write(l,u,f){let a=n;n=null,a({chunk:l,done:!1,cb:f})},final(l){let u=n;n=null,u({done:!0,cb:l})},destroy(l,u){r.abort(),u(l)}}}function Ge(e){let t=e.readable&&typeof e.readable.read!="function"?Ja.wrap(e.readable):e.readable,n=e.writable,r=!!Ha(t),i=!!Va(n),o,l,u,f,a;function c(s){let b=f;f=null,b?b(s):s?a.destroy(s):!r&&!i&&a.destroy()}return a=new ne({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(Mr(n,s=>{i=!1,s&&ce(t,s),c(s)}),a._write=function(s,b,d){n.write(s,b)?d():o=d},a._final=function(s){n.end(),l=s},n.on("drain",function(){if(o){let s=o;o=null,s()}}),n.on("finish",function(){if(l){let s=l;l=null,s()}})),r&&(Mr(t,s=>{r=!1,s&&ce(t,s),c(s)}),t.on("readable",function(){if(u){let s=u;u=null,s()}}),t.on("end",function(){a.push(null)}),a._read=function(){for(;;){let s=t.read();if(s===null){u=a._read;return}if(!a.push(s))return}}),a._destroy=function(s,b){!s&&f!==null&&(s=new Lr),u=null,o=null,l=null,f===null?b(s):(f=b,ce(n,s),ce(t,s))},a}});var v=g((su,jr)=>{"use strict";var{ObjectDefineProperties:tf,ObjectGetOwnPropertyDescriptor:B,ObjectKeys:nf,ObjectSetPrototypeOf:Wr}=m();jr.exports=C;var Dt=we(),x=Tt();Wr(C.prototype,Dt.prototype);Wr(C,Dt);{let e=nf(x.prototype);for(let t=0;t{"use strict";var{ObjectSetPrototypeOf:$r,Symbol:rf}=m();vr.exports=G;var{ERR_METHOD_NOT_IMPLEMENTED:of}=O().codes,qt=v(),{getHighWaterMark:lf}=Ce();$r(G.prototype,qt.prototype);$r(G,qt);var Ee=rf("kCallback");function G(e){if(!(this instanceof G))return new G(e);let t=e?lf(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),qt.call(this,e),this._readableState.sync=!1,this[Ee]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",af)}function Ot(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function af(){this._final!==Ot&&Ot.call(this)}G.prototype._final=Ot;G.prototype._transform=function(e,t,n){throw new of("_transform()")};G.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,o=r.length;this._transform(e,t,(l,u)=>{if(l){n(l);return}u!=null&&this.push(u),i.ended||o===r.length||r.length{"use strict";var{ObjectSetPrototypeOf:Fr}=m();Ur.exports=he;var Lt=xt();Fr(he.prototype,Lt.prototype);Fr(he,Lt);function he(e){if(!(this instanceof he))return new he(e);Lt.call(this,e)}he.prototype._transform=function(e,t,n){n(null,e)}});var Ye=g((hu,zr)=>{var He=__process$,{ArrayIsArray:ff,Promise:uf,SymbolAsyncIterator:sf}=m(),Ve=Y(),{once:df}=j(),cf=Z(),Br=v(),{aggregateTwoErrors:hf,codes:{ERR_INVALID_ARG_TYPE:Yr,ERR_INVALID_RETURN_VALUE:kt,ERR_MISSING_ARGS:bf,ERR_STREAM_DESTROYED:_f,ERR_STREAM_PREMATURE_CLOSE:pf},AbortError:wf}=O(),{validateFunction:yf,validateAbortSignal:gf}=_e(),{isIterable:be,isReadable:Wt,isReadableNodeStream:$t,isNodeStream:Gr}=V(),Sf=AbortController,Ct,jt;function Hr(e,t,n){let r=!1;e.on("close",()=>{r=!0});let i=Ve(e,{readable:t,writable:n},o=>{r=!o});return{destroy:o=>{r||(r=!0,cf.destroyer(e,o||new _f("pipe")))},cleanup:i}}function Ef(e){return yf(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Rf(e){if(be(e))return e;if($t(e))return Af(e);throw new Yr("val",["Readable","Iterable","AsyncIterable"],e)}async function*Af(e){jt||(jt=we()),yield*jt.prototype[sf].call(e)}async function Vr(e,t,n,{end:r}){let i,o=null,l=a=>{if(a&&(i=a),o){let c=o;o=null,c()}},u=()=>new uf((a,c)=>{i?c(i):o=()=>{i?c(i):a()}});t.on("drain",l);let f=Ve(t,{readable:!1},l);try{t.writableNeedDrain&&await u();for await(let a of e)t.write(a)||await u();r&&t.end(),await u(),n()}catch(a){n(i!==a?hf(i,a):a)}finally{f(),t.off("drain",l)}}function mf(...e){return Kr(e,df(Ef(e)))}function Kr(e,t,n){if(e.length===1&&ff(e[0])&&(e=e[0]),e.length<2)throw new bf("streams");let r=new Sf,i=r.signal,o=n?.signal,l=[];gf(o,"options.signal");function u(){d(new wf)}o?.addEventListener("abort",u);let f,a,c=[],s=0;function b(_){d(_,--s===0)}function d(_,p){if(_&&(!f||f.code==="ERR_STREAM_PREMATURE_CLOSE")&&(f=_),!(!f&&!p)){for(;c.length;)c.shift()(f);o?.removeEventListener("abort",u),r.abort(),p&&(f||l.forEach(I=>I()),He.nextTick(t,f,a))}}let h;for(let _=0;_0,F=I||n?.end!==!1,re=_===e.length-1;if(Gr(p)){let P=function(U){U&&U.name!=="AbortError"&&U.code!=="ERR_STREAM_PREMATURE_CLOSE"&&b(U)};var L=P;if(F){let{destroy:U,cleanup:ze}=Hr(p,I,M);c.push(U),Wt(p)&&re&&l.push(ze)}p.on("error",P),Wt(p)&&re&&l.push(()=>{p.removeListener("error",P)})}if(_===0)if(typeof p=="function"){if(h=p({signal:i}),!be(h))throw new kt("Iterable, AsyncIterable or Stream","source",h)}else be(p)||$t(p)?h=p:h=Br.from(p);else if(typeof p=="function")if(h=Rf(h),h=p(h,{signal:i}),I){if(!be(h,!0))throw new kt("AsyncIterable",`transform[${_-1}]`,h)}else{var D;Ct||(Ct=Pt());let P=new Ct({objectMode:!0}),U=(D=h)===null||D===void 0?void 0:D.then;if(typeof U=="function")s++,U.call(h,ie=>{a=ie,ie!=null&&P.write(ie),F&&P.end(),He.nextTick(b)},ie=>{P.destroy(ie),He.nextTick(b,ie)});else if(be(h,!0))s++,Vr(h,P,b,{end:F});else throw new kt("AsyncIterable or Promise","destination",h);h=P;let{destroy:ze,cleanup:_i}=Hr(h,!1,!0);c.push(ze),re&&l.push(_i)}else if(Gr(p)){if($t(h)){s+=2;let P=Tf(h,p,b,{end:F});Wt(p)&&re&&l.push(P)}else if(be(h))s++,Vr(h,p,b,{end:F});else throw new Yr("val",["Readable","Iterable","AsyncIterable"],h);h=p}else h=Br.from(p)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&He.nextTick(u),h}function Tf(e,t,n,{end:r}){let i=!1;return t.on("close",()=>{i||n(new pf)}),e.pipe(t,{end:r}),r?e.once("end",()=>{i=!0,t.end()}):n(),Ve(e,{readable:!0,writable:!1},o=>{let l=e._readableState;o&&o.code==="ERR_STREAM_PREMATURE_CLOSE"&&l&&l.ended&&!l.errored&&!l.errorEmitted?e.once("end",n).once("error",n):n(o)}),Ve(t,{readable:!1,writable:!0},n)}zr.exports={pipelineImpl:Kr,pipeline:mf}});var ei=g((bu,Zr)=>{"use strict";var{pipeline:If}=Ye(),Ke=v(),{destroyer:Mf}=Z(),{isNodeStream:Nf,isReadable:Xr,isWritable:Jr}=V(),{AbortError:Df,codes:{ERR_INVALID_ARG_VALUE:Qr,ERR_MISSING_ARGS:Of}}=O();Zr.exports=function(...t){if(t.length===0)throw new Of("streams");if(t.length===1)return Ke.from(t[0]);let n=[...t];if(typeof t[0]=="function"&&(t[0]=Ke.from(t[0])),typeof t[t.length-1]=="function"){let d=t.length-1;t[d]=Ke.from(t[d])}for(let d=0;d0&&!Jr(t[d]))throw new Qr(`streams[${d}]`,n[d],"must be writable")}let r,i,o,l,u;function f(d){let h=l;l=null,h?h(d):d?u.destroy(d):!b&&!s&&u.destroy()}let a=t[0],c=If(t,f),s=!!Jr(a),b=!!Xr(c);return u=new Ke({writableObjectMode:!!(a!=null&&a.writableObjectMode),readableObjectMode:!!(c!=null&&c.writableObjectMode),writable:s,readable:b}),s&&(u._write=function(d,h,D){a.write(d,h)?D():r=D},u._final=function(d){a.end(),i=d},a.on("drain",function(){if(r){let d=r;r=null,d()}}),c.on("finish",function(){if(i){let d=i;i=null,d()}})),b&&(c.on("readable",function(){if(o){let d=o;o=null,d()}}),c.on("end",function(){u.push(null)}),u._read=function(){for(;;){let d=c.read();if(d===null){o=u._read;return}if(!u.push(d))return}}),u._destroy=function(d,h){!d&&l!==null&&(d=new Df),o=null,r=null,i=null,l===null?h(d):(l=h,Mf(c,d))},u}});var vt=g((_u,ti)=>{"use strict";var{ArrayPrototypePop:qf,Promise:xf}=m(),{isIterable:Lf,isNodeStream:Pf}=V(),{pipelineImpl:kf}=Ye(),{finished:Wf}=Y();function Cf(...e){return new xf((t,n)=>{let r,i,o=e[e.length-1];if(o&&typeof o=="object"&&!Pf(o)&&!Lf(o)){let l=qf(e);r=l.signal,i=l.end}kf(e,(l,u)=>{l?n(l):t(u)},{signal:r,end:i})})}ti.exports={finished:Wf,pipeline:Cf}});var di=g((pu,si)=>{var{Buffer:jf}=__buffer$,{ObjectDefineProperty:H,ObjectKeys:ii,ReflectApply:oi}=m(),{promisify:{custom:li}}=j(),{streamReturningOperators:ni,promiseReturningOperators:ri}=xn(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:ai}}=O(),$f=ei(),{pipeline:fi}=Ye(),{destroyer:vf}=Z(),ui=Y(),Ft=vt(),Ut=V(),R=si.exports=Le().Stream;R.isDisturbed=Ut.isDisturbed;R.isErrored=Ut.isErrored;R.isReadable=Ut.isReadable;R.Readable=we();for(let e of ii(ni)){let n=function(...r){if(new.target)throw ai();return R.Readable.from(oi(t,this,r))};Uf=n;let t=ni[e];H(n,"name",{__proto__:null,value:t.name}),H(n,"length",{__proto__:null,value:t.length}),H(R.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}var Uf;for(let e of ii(ri)){let n=function(...i){if(new.target)throw ai();return oi(t,this,i)};Uf=n;let t=ri[e];H(n,"name",{__proto__:null,value:t.name}),H(n,"length",{__proto__:null,value:t.length}),H(R.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}var Uf;R.Writable=Tt();R.Duplex=v();R.Transform=xt();R.PassThrough=Pt();R.pipeline=fi;var{addAbortSignal:Ff}=ke();R.addAbortSignal=Ff;R.finished=ui;R.destroy=vf;R.compose=$f;H(R,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return Ft}});H(fi,li,{__proto__:null,enumerable:!0,get(){return Ft.pipeline}});H(ui,li,{__proto__:null,enumerable:!0,get(){return Ft.finished}});R.Stream=R;R._isUint8Array=function(t){return t instanceof Uint8Array};R._uint8ArrayToBuffer=function(t){return jf.from(t.buffer,t.byteOffset,t.byteLength)}});var ci=g((wu,A)=>{"use strict";var T=di(),Bf=vt(),Gf=T.Readable.destroy;A.exports=T.Readable;A.exports._uint8ArrayToBuffer=T._uint8ArrayToBuffer;A.exports._isUint8Array=T._isUint8Array;A.exports.isDisturbed=T.isDisturbed;A.exports.isErrored=T.isErrored;A.exports.isReadable=T.isReadable;A.exports.Readable=T.Readable;A.exports.Writable=T.Writable;A.exports.Duplex=T.Duplex;A.exports.Transform=T.Transform;A.exports.PassThrough=T.PassThrough;A.exports.addAbortSignal=T.addAbortSignal;A.exports.finished=T.finished;A.exports.destroy=T.destroy;A.exports.destroy=Gf;A.exports.pipeline=T.pipeline;A.exports.compose=T.compose;Object.defineProperty(T,"promises",{configurable:!0,enumerable:!0,get(){return Bf}});A.exports.Stream=T.Stream;A.exports.default=A.exports});var bi=Ri(ci()),{_uint8ArrayToBuffer:yu,_isUint8Array:gu,isDisturbed:Su,isErrored:Eu,isReadable:Ru,Readable:Au,Writable:mu,Duplex:Tu,Transform:Iu,PassThrough:Mu,addAbortSignal:Nu,finished:Du,destroy:Ou,pipeline:qu,compose:xu,Stream:Lu}=bi,{default:hi,...Hf}=bi,Pu=hi!==void 0?hi:Hf;export{Tu as Duplex,Mu as PassThrough,Au as Readable,Lu as Stream,Iu as Transform,mu as Writable,gu as _isUint8Array,yu as _uint8ArrayToBuffer,Nu as addAbortSignal,xu as compose,Pu as default,Ou as destroy,Du as finished,Su as isDisturbed,Eu as isErrored,Ru as isReadable,qu as pipeline}; /* End esm.sh bundle */ @@ -21,18 +21,18 @@ import { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_STREAM_PREMATURE_CLOSE, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { destroy } from "internal:deno_node/polyfills/internal/streams/destroy.mjs"; -import finished from "internal:deno_node/polyfills/internal/streams/end-of-stream.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { destroy } from "internal:deno_node/internal/streams/destroy.mjs"; +import finished from "internal:deno_node/internal/streams/end-of-stream.mjs"; import { isDestroyed, isReadable, isReadableEnded, isWritable, isWritableEnded, -} from "internal:deno_node/polyfills/internal/streams/utils.mjs"; -import { createDeferredPromise, kEmptyObject } from "internal:deno_node/polyfills/internal/util.mjs"; -import { validateBoolean, validateObject } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/streams/utils.mjs"; +import { createDeferredPromise, kEmptyObject } from "internal:deno_node/internal/util.mjs"; +import { validateBoolean, validateObject } from "internal:deno_node/internal/validators.mjs"; const process = __process$; const { Buffer } = __buffer$; diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index 2cec7b129a..77b0d0e82a 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -5,25 +5,25 @@ import { ObjectAssign, StringPrototypeReplace, -} from "internal:deno_node/polyfills/internal/primordials.mjs"; -import assert from "internal:deno_node/polyfills/internal/assert.mjs"; -import * as net from "internal:deno_node/polyfills/net.ts"; -import { createSecureContext } from "internal:deno_node/polyfills/_tls_common.ts"; -import { kStreamBaseField } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { connResetException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { emitWarning } from "internal:deno_node/polyfills/process.ts"; -import { debuglog } from "internal:deno_node/polyfills/internal/util/debuglog.ts"; +} from "internal:deno_node/internal/primordials.mjs"; +import assert from "internal:deno_node/internal/assert.mjs"; +import * as net from "internal:deno_node/net.ts"; +import { createSecureContext } from "internal:deno_node/_tls_common.ts"; +import { kStreamBaseField } from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { connResetException } from "internal:deno_node/internal/errors.ts"; +import { emitWarning } from "internal:deno_node/process.ts"; +import { debuglog } from "internal:deno_node/internal/util/debuglog.ts"; import { constants as TCPConstants, TCP, -} from "internal:deno_node/polyfills/internal_binding/tcp_wrap.ts"; +} from "internal:deno_node/internal_binding/tcp_wrap.ts"; import { constants as PipeConstants, Pipe, -} from "internal:deno_node/polyfills/internal_binding/pipe_wrap.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { kEmptyObject } from "internal:deno_node/polyfills/internal/util.mjs"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +} from "internal:deno_node/internal_binding/pipe_wrap.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { kEmptyObject } from "internal:deno_node/internal/util.mjs"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; const kConnectOptions = Symbol("connect-options"); const kIsVerified = Symbol("verified"); diff --git a/ext/node/polyfills/_util/_util_callbackify.ts b/ext/node/polyfills/_util/_util_callbackify.ts index fe83a227d0..84ec0274d7 100644 --- a/ext/node/polyfills/_util/_util_callbackify.ts +++ b/ext/node/polyfills/_util/_util_callbackify.ts @@ -23,7 +23,7 @@ // These are simplified versions of the "real" errors in Node. -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; class NodeFalsyValueRejectionError extends Error { public reason: unknown; diff --git a/ext/node/polyfills/_util/std_asserts.ts b/ext/node/polyfills/_util/std_asserts.ts index 8c4c80078d..bd0a4fc6fd 100644 --- a/ext/node/polyfills/_util/std_asserts.ts +++ b/ext/node/polyfills/_util/std_asserts.ts @@ -1,12 +1,12 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // vendored from std/testing/asserts.ts -import { red } from "internal:deno_node/polyfills/_util/std_fmt_colors.ts"; +import { red } from "internal:deno_node/_util/std_fmt_colors.ts"; import { buildMessage, diff, diffstr, -} from "internal:deno_node/polyfills/_util/std_testing_diff.ts"; +} from "internal:deno_node/_util/std_testing_diff.ts"; /** Converts the input into a string. Objects, Sets and Maps are sorted so as to * make tests less flaky */ diff --git a/ext/node/polyfills/_util/std_testing_diff.ts b/ext/node/polyfills/_util/std_testing_diff.ts index 766b5efdc4..a536f70baa 100644 --- a/ext/node/polyfills/_util/std_testing_diff.ts +++ b/ext/node/polyfills/_util/std_testing_diff.ts @@ -9,7 +9,7 @@ import { green, red, white, -} from "internal:deno_node/polyfills/_util/std_fmt_colors.ts"; +} from "internal:deno_node/_util/std_fmt_colors.ts"; interface FarthestPoint { y: number; diff --git a/ext/node/polyfills/_utils.ts b/ext/node/polyfills/_utils.ts index 85398ead99..a6e8b03fcb 100644 --- a/ext/node/polyfills/_utils.ts +++ b/ext/node/polyfills/_utils.ts @@ -4,8 +4,8 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { errorMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; +import { errorMap } from "internal:deno_node/internal_binding/uv.ts"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; export type BinaryEncodings = "binary"; diff --git a/ext/node/polyfills/_zlib.mjs b/ext/node/polyfills/_zlib.mjs index 0b1cb2d5f2..281746105a 100644 --- a/ext/node/polyfills/_zlib.mjs +++ b/ext/node/polyfills/_zlib.mjs @@ -4,13 +4,13 @@ // deno-lint-ignore-file -import { Buffer, kMaxLength } from "internal:deno_node/polyfills/buffer.ts"; -import { Transform } from "internal:deno_node/polyfills/stream.ts"; -import * as binding from "internal:deno_node/polyfills/_zlib_binding.mjs"; -import util from "internal:deno_node/polyfills/util.ts"; -import { ok as assert } from "internal:deno_node/polyfills/assert.ts"; -import { zlib as zlibConstants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +import { Buffer, kMaxLength } from "internal:deno_node/buffer.ts"; +import { Transform } from "internal:deno_node/stream.ts"; +import * as binding from "internal:deno_node/_zlib_binding.mjs"; +import util from "internal:deno_node/util.ts"; +import { ok as assert } from "internal:deno_node/assert.ts"; +import { zlib as zlibConstants } from "internal:deno_node/internal_binding/constants.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; var kRangeErrorMessage = "Cannot create final Buffer. It would be larger " + "than 0x" + kMaxLength.toString(16) + " bytes"; diff --git a/ext/node/polyfills/_zlib_binding.mjs b/ext/node/polyfills/_zlib_binding.mjs index 0286fefd59..11ccd6b91c 100644 --- a/ext/node/polyfills/_zlib_binding.mjs +++ b/ext/node/polyfills/_zlib_binding.mjs @@ -4,9 +4,9 @@ // deno-lint-ignore-file -import assert from "internal:deno_node/polyfills/assert.ts"; -import { constants, zlib_deflate, zlib_inflate, Zstream } from "internal:deno_node/polyfills/_pako.mjs"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +import assert from "internal:deno_node/assert.ts"; +import { constants, zlib_deflate, zlib_inflate, Zstream } from "internal:deno_node/_pako.mjs"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; export const Z_NO_FLUSH = constants.Z_NO_FLUSH; export const Z_PARTIAL_FLUSH = constants.Z_PARTIAL_FLUSH; diff --git a/ext/node/polyfills/assert.ts b/ext/node/polyfills/assert.ts index 2d5e86e587..cbe622ba45 100644 --- a/ext/node/polyfills/assert.ts +++ b/ext/node/polyfills/assert.ts @@ -3,17 +3,17 @@ import { AssertionError, AssertionErrorConstructorOptions, -} from "internal:deno_node/polyfills/assertion_error.ts"; -import * as asserts from "internal:deno_node/polyfills/_util/std_asserts.ts"; -import { inspect } from "internal:deno_node/polyfills/util.ts"; +} from "internal:deno_node/assertion_error.ts"; +import * as asserts from "internal:deno_node/_util/std_asserts.ts"; +import { inspect } from "internal:deno_node/util.ts"; import { ERR_AMBIGUOUS_ARGUMENT, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE, ERR_MISSING_ARGS, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { isDeepEqual } from "internal:deno_node/polyfills/internal/util/comparisons.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { isDeepEqual } from "internal:deno_node/internal/util/comparisons.ts"; function innerFail(obj: { actual?: unknown; diff --git a/ext/node/polyfills/assert/strict.ts b/ext/node/polyfills/assert/strict.ts index eab0f4e78d..9443b10c99 100644 --- a/ext/node/polyfills/assert/strict.ts +++ b/ext/node/polyfills/assert/strict.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { strict } from "internal:deno_node/polyfills/assert.ts"; +import { strict } from "internal:deno_node/assert.ts"; export { AssertionError, @@ -20,7 +20,7 @@ export { rejects, strictEqual, throws, -} from "internal:deno_node/polyfills/assert.ts"; +} from "internal:deno_node/assert.ts"; export { strict }; export default strict; diff --git a/ext/node/polyfills/assertion_error.ts b/ext/node/polyfills/assertion_error.ts index f2e221f202..b38a4c854e 100644 --- a/ext/node/polyfills/assertion_error.ts +++ b/ext/node/polyfills/assertion_error.ts @@ -21,8 +21,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { inspect } from "internal:deno_node/polyfills/util.ts"; -import { stripColor as removeColors } from "internal:deno_node/polyfills/_util/std_fmt_colors.ts"; +import { inspect } from "internal:deno_node/util.ts"; +import { stripColor as removeColors } from "internal:deno_node/_util/std_fmt_colors.ts"; function getConsoleWidth(): number { try { @@ -44,7 +44,7 @@ const { keys: ObjectKeys, } = Object; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; let blue = ""; let green = ""; diff --git a/ext/node/polyfills/async_hooks.ts b/ext/node/polyfills/async_hooks.ts index 295f01ec85..5c10e3ee77 100644 --- a/ext/node/polyfills/async_hooks.ts +++ b/ext/node/polyfills/async_hooks.ts @@ -4,8 +4,8 @@ // This implementation is inspired by "workerd" AsyncLocalStorage implementation: // https://github.com/cloudflare/workerd/blob/77fd0ed6ddba184414f0216508fc62b06e716cab/src/workerd/api/node/async-hooks.c++#L9 -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { core } from "internal:deno_node/polyfills/_core.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { core } from "internal:deno_node/_core.ts"; function assert(cond: boolean) { if (!cond) throw new Error("Assertion failed"); diff --git a/ext/node/polyfills/buffer.ts b/ext/node/polyfills/buffer.ts index 8a4426c97a..423fdb2ca3 100644 --- a/ext/node/polyfills/buffer.ts +++ b/ext/node/polyfills/buffer.ts @@ -10,4 +10,4 @@ export { kMaxLength, kStringMaxLength, SlowBuffer, -} from "internal:deno_node/polyfills/internal/buffer.mjs"; +} from "internal:deno_node/internal/buffer.mjs"; diff --git a/ext/node/polyfills/child_process.ts b/ext/node/polyfills/child_process.ts index cc0e17ffbd..fdcf32bca1 100644 --- a/ext/node/polyfills/child_process.ts +++ b/ext/node/polyfills/child_process.ts @@ -2,7 +2,7 @@ // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html -import { core } from "internal:deno_node/polyfills/_core.ts"; +import { core } from "internal:deno_node/_core.ts"; import { ChildProcess, ChildProcessOptions, @@ -12,13 +12,13 @@ import { type SpawnSyncOptions, type SpawnSyncResult, stdioStringToArray, -} from "internal:deno_node/polyfills/internal/child_process.ts"; +} from "internal:deno_node/internal/child_process.ts"; import { validateAbortSignal, validateFunction, validateObject, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; import { ERR_CHILD_PROCESS_IPC_REQUIRED, ERR_CHILD_PROCESS_STDIO_MAXBUFFER, @@ -26,7 +26,7 @@ import { ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, genericNodeError, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { ArrayIsArray, ArrayPrototypeJoin, @@ -34,18 +34,15 @@ import { ArrayPrototypeSlice, ObjectAssign, StringPrototypeSlice, -} from "internal:deno_node/polyfills/internal/primordials.mjs"; -import { - getSystemErrorName, - promisify, -} from "internal:deno_node/polyfills/util.ts"; -import { createDeferredPromise } from "internal:deno_node/polyfills/internal/util.mjs"; -import process from "internal:deno_node/polyfills/process.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/primordials.mjs"; +import { getSystemErrorName, promisify } from "internal:deno_node/util.ts"; +import { createDeferredPromise } from "internal:deno_node/internal/util.mjs"; +import process from "internal:deno_node/process.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { convertToValidSignal, kEmptyObject, -} from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/util.mjs"; const MAX_BUFFER = 1024 * 1024; diff --git a/ext/node/polyfills/cluster.ts b/ext/node/polyfills/cluster.ts index 70d70384fa..be46e7df79 100644 --- a/ext/node/polyfills/cluster.ts +++ b/ext/node/polyfills/cluster.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; /** A Worker object contains all public information and method about a worker. * In the primary it can be obtained using cluster.workers. In a worker it can diff --git a/ext/node/polyfills/console.ts b/ext/node/polyfills/console.ts index f811f1a86c..f50b912a92 100644 --- a/ext/node/polyfills/console.ts +++ b/ext/node/polyfills/console.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Console } from "internal:deno_node/polyfills/internal/console/constructor.mjs"; -import { windowOrWorkerGlobalScope } from "internal:runtime/js/98_global_scope.js"; +import { Console } from "internal:deno_node/internal/console/constructor.mjs"; +import { windowOrWorkerGlobalScope } from "internal:runtime/98_global_scope.js"; // Don't rely on global `console` because during bootstrapping, it is pointing // to native `console` object provided by V8. const console = windowOrWorkerGlobalScope.console.value; diff --git a/ext/node/polyfills/constants.ts b/ext/node/polyfills/constants.ts index f934224060..c15c0f5b9c 100644 --- a/ext/node/polyfills/constants.ts +++ b/ext/node/polyfills/constants.ts @@ -2,8 +2,8 @@ // Based on: https://github.com/nodejs/node/blob/0646eda/lib/constants.js -import { constants as fsConstants } from "internal:deno_node/polyfills/fs.ts"; -import { constants as osConstants } from "internal:deno_node/polyfills/os.ts"; +import { constants as fsConstants } from "internal:deno_node/fs.ts"; +import { constants as osConstants } from "internal:deno_node/os.ts"; export default { ...fsConstants, diff --git a/ext/node/polyfills/crypto.ts b/ext/node/polyfills/crypto.ts index 8c179e916c..c30b2dcdf5 100644 --- a/ext/node/polyfills/crypto.ts +++ b/ext/node/polyfills/crypto.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { ERR_CRYPTO_FIPS_FORCED } from "internal:deno_node/polyfills/internal/errors.ts"; -import { crypto as constants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { getOptionValue } from "internal:deno_node/polyfills/internal/options.ts"; +import { ERR_CRYPTO_FIPS_FORCED } from "internal:deno_node/internal/errors.ts"; +import { crypto as constants } from "internal:deno_node/internal_binding/constants.ts"; +import { getOptionValue } from "internal:deno_node/internal/options.ts"; import { getFipsCrypto, setFipsCrypto, timingSafeEqual, -} from "internal:deno_node/polyfills/internal_binding/crypto.ts"; +} from "internal:deno_node/internal_binding/crypto.ts"; import { checkPrime, checkPrimeSync, @@ -19,36 +19,33 @@ import { randomFillSync, randomInt, randomUUID, -} from "internal:deno_node/polyfills/internal/crypto/random.ts"; +} from "internal:deno_node/internal/crypto/random.ts"; import type { CheckPrimeOptions, GeneratePrimeOptions, GeneratePrimeOptionsArrayBuffer, GeneratePrimeOptionsBigInt, LargeNumberLike, -} from "internal:deno_node/polyfills/internal/crypto/random.ts"; +} from "internal:deno_node/internal/crypto/random.ts"; import { pbkdf2, pbkdf2Sync, -} from "internal:deno_node/polyfills/internal/crypto/pbkdf2.ts"; +} from "internal:deno_node/internal/crypto/pbkdf2.ts"; import type { Algorithms, NormalizedAlgorithms, -} from "internal:deno_node/polyfills/internal/crypto/pbkdf2.ts"; +} from "internal:deno_node/internal/crypto/pbkdf2.ts"; import { scrypt, scryptSync, -} from "internal:deno_node/polyfills/internal/crypto/scrypt.ts"; -import { - hkdf, - hkdfSync, -} from "internal:deno_node/polyfills/internal/crypto/hkdf.ts"; +} from "internal:deno_node/internal/crypto/scrypt.ts"; +import { hkdf, hkdfSync } from "internal:deno_node/internal/crypto/hkdf.ts"; import { generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, -} from "internal:deno_node/polyfills/internal/crypto/keygen.ts"; +} from "internal:deno_node/internal/crypto/keygen.ts"; import type { BasePrivateKeyEncodingOptions, DSAKeyPairKeyObjectOptions, @@ -69,26 +66,26 @@ import type { X25519KeyPairOptions, X448KeyPairKeyObjectOptions, X448KeyPairOptions, -} from "internal:deno_node/polyfills/internal/crypto/keygen.ts"; +} from "internal:deno_node/internal/crypto/keygen.ts"; import { createPrivateKey, createPublicKey, createSecretKey, KeyObject, -} from "internal:deno_node/polyfills/internal/crypto/keys.ts"; +} from "internal:deno_node/internal/crypto/keys.ts"; import type { AsymmetricKeyDetails, JsonWebKeyInput, JwkKeyExportOptions, KeyExportOptions, KeyObjectType, -} from "internal:deno_node/polyfills/internal/crypto/keys.ts"; +} from "internal:deno_node/internal/crypto/keys.ts"; import { DiffieHellman, diffieHellman, DiffieHellmanGroup, ECDH, -} from "internal:deno_node/polyfills/internal/crypto/diffiehellman.ts"; +} from "internal:deno_node/internal/crypto/diffiehellman.ts"; import { Cipheriv, Decipheriv, @@ -97,7 +94,7 @@ import { privateEncrypt, publicDecrypt, publicEncrypt, -} from "internal:deno_node/polyfills/internal/crypto/cipher.ts"; +} from "internal:deno_node/internal/crypto/cipher.ts"; import type { Cipher, CipherCCM, @@ -114,7 +111,7 @@ import type { DecipherCCM, DecipherGCM, DecipherOCB, -} from "internal:deno_node/polyfills/internal/crypto/cipher.ts"; +} from "internal:deno_node/internal/crypto/cipher.ts"; import type { BinaryLike, BinaryToTextEncoding, @@ -127,13 +124,13 @@ import type { LegacyCharacterEncoding, PrivateKeyInput, PublicKeyInput, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; import { Sign, signOneShot, Verify, verifyOneShot, -} from "internal:deno_node/polyfills/internal/crypto/sig.ts"; +} from "internal:deno_node/internal/crypto/sig.ts"; import type { DSAEncoding, KeyLike, @@ -142,30 +139,30 @@ import type { SignPrivateKeyInput, VerifyKeyObjectInput, VerifyPublicKeyInput, -} from "internal:deno_node/polyfills/internal/crypto/sig.ts"; +} from "internal:deno_node/internal/crypto/sig.ts"; import { createHash, Hash, Hmac, -} from "internal:deno_node/polyfills/internal/crypto/hash.ts"; -import { X509Certificate } from "internal:deno_node/polyfills/internal/crypto/x509.ts"; +} from "internal:deno_node/internal/crypto/hash.ts"; +import { X509Certificate } from "internal:deno_node/internal/crypto/x509.ts"; import type { PeerCertificate, X509CheckOptions, -} from "internal:deno_node/polyfills/internal/crypto/x509.ts"; +} from "internal:deno_node/internal/crypto/x509.ts"; import { getCiphers, getCurves, getHashes, secureHeapUsed, setEngine, -} from "internal:deno_node/polyfills/internal/crypto/util.ts"; -import type { SecureHeapUsage } from "internal:deno_node/polyfills/internal/crypto/util.ts"; -import Certificate from "internal:deno_node/polyfills/internal/crypto/certificate.ts"; +} from "internal:deno_node/internal/crypto/util.ts"; +import type { SecureHeapUsage } from "internal:deno_node/internal/crypto/util.ts"; +import Certificate from "internal:deno_node/internal/crypto/certificate.ts"; import type { TransformOptions, WritableOptions, -} from "internal:deno_node/polyfills/_stream.d.ts"; +} from "internal:deno_node/_stream.d.ts"; import { crypto as webcrypto } from "internal:deno_crypto/00_crypto.js"; const fipsForced = getOptionValue("--force-fips"); diff --git a/ext/node/polyfills/dgram.ts b/ext/node/polyfills/dgram.ts index 222421eb00..7225f04972 100644 --- a/ext/node/polyfills/dgram.ts +++ b/ext/node/polyfills/dgram.ts @@ -20,13 +20,13 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { lookup as defaultLookup } from "internal:deno_node/polyfills/dns.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { lookup as defaultLookup } from "internal:deno_node/dns.ts"; import type { ErrnoException, NodeSystemErrorCtx, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { ERR_BUFFER_OUT_OF_BOUNDS, ERR_INVALID_ARG_TYPE, @@ -40,34 +40,28 @@ import { ERR_SOCKET_DGRAM_NOT_RUNNING, errnoException, exceptionWithHostPort, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import type { Abortable } from "internal:deno_node/polyfills/_events.d.ts"; -import { - kStateSymbol, - newHandle, -} from "internal:deno_node/polyfills/internal/dgram.ts"; -import type { SocketType } from "internal:deno_node/polyfills/internal/dgram.ts"; +} from "internal:deno_node/internal/errors.ts"; +import type { Abortable } from "internal:deno_node/_events.d.ts"; +import { kStateSymbol, newHandle } from "internal:deno_node/internal/dgram.ts"; +import type { SocketType } from "internal:deno_node/internal/dgram.ts"; import { asyncIdSymbol, defaultTriggerAsyncIdScope, ownerSymbol, -} from "internal:deno_node/polyfills/internal/async_hooks.ts"; -import { - SendWrap, - UDP, -} from "internal:deno_node/polyfills/internal_binding/udp_wrap.ts"; +} from "internal:deno_node/internal/async_hooks.ts"; +import { SendWrap, UDP } from "internal:deno_node/internal_binding/udp_wrap.ts"; import { isInt32, validateAbortSignal, validateNumber, validatePort, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { guessHandleType } from "internal:deno_node/polyfills/internal_binding/util.ts"; -import { os } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { nextTick } from "internal:deno_node/polyfills/process.ts"; -import { channel } from "internal:deno_node/polyfills/diagnostics_channel.ts"; -import { isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { guessHandleType } from "internal:deno_node/internal_binding/util.ts"; +import { os } from "internal:deno_node/internal_binding/constants.ts"; +import { nextTick } from "internal:deno_node/process.ts"; +import { channel } from "internal:deno_node/diagnostics_channel.ts"; +import { isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; const { UV_UDP_REUSEADDR, UV_UDP_IPV6ONLY } = os; @@ -247,8 +241,8 @@ export class Socket extends EventEmitter { * `EADDRINUSE` error will occur: * * ```js - * import cluster from "internal:deno_node/polyfills/cluster"; - * import dgram from "internal:deno_node/polyfills/dgram"; + * import cluster from "internal:deno_node/cluster"; + * import dgram from "internal:deno_node/dgram"; * * if (cluster.isPrimary) { * cluster.fork(); // Works ok. @@ -349,7 +343,7 @@ export class Socket extends EventEmitter { * Example of a UDP server listening on port 41234: * * ```js - * import dgram from "internal:deno_node/polyfills/dgram"; + * import dgram from "internal:deno_node/dgram"; * * const server = dgram.createSocket('udp4'); * @@ -798,8 +792,8 @@ export class Socket extends EventEmitter { * Example of sending a UDP packet to a port on `localhost`; * * ```js - * import dgram from "internal:deno_node/polyfills/dgram"; - * import { Buffer } from "internal:deno_node/polyfills/buffer"; + * import dgram from "internal:deno_node/dgram"; + * import { Buffer } from "internal:deno_node/buffer"; * * const message = Buffer.from('Some bytes'); * const client = dgram.createSocket('udp4'); @@ -812,8 +806,8 @@ export class Socket extends EventEmitter { * `127.0.0.1`; * * ```js - * import dgram from "internal:deno_node/polyfills/dgram"; - * import { Buffer } from "internal:deno_node/polyfills/buffer"; + * import dgram from "internal:deno_node/dgram"; + * import { Buffer } from "internal:deno_node/buffer"; * * const buf1 = Buffer.from('Some '); * const buf2 = Buffer.from('bytes'); @@ -832,8 +826,8 @@ export class Socket extends EventEmitter { * `localhost`: * * ```js - * import dgram from "internal:deno_node/polyfills/dgram"; - * import { Buffer } from "internal:deno_node/polyfills/buffer"; + * import dgram from "internal:deno_node/dgram"; + * import { Buffer } from "internal:deno_node/buffer"; * * const message = Buffer.from('Some bytes'); * const client = dgram.createSocket('udp4'); diff --git a/ext/node/polyfills/diagnostics_channel.ts b/ext/node/polyfills/diagnostics_channel.ts index c0918e4e24..880ae6f88d 100644 --- a/ext/node/polyfills/diagnostics_channel.ts +++ b/ext/node/polyfills/diagnostics_channel.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { nextTick } from "internal:deno_node/polyfills/process.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { nextTick } from "internal:deno_node/process.ts"; type Subscriber = (message: unknown, name?: string) => void; diff --git a/ext/node/polyfills/dns.ts b/ext/node/polyfills/dns.ts index 1626517f13..ef6321055a 100644 --- a/ext/node/polyfills/dns.ts +++ b/ext/node/polyfills/dns.ts @@ -20,16 +20,16 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; -import { customPromisifyArgs } from "internal:deno_node/polyfills/internal/util.mjs"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; +import { customPromisifyArgs } from "internal:deno_node/internal/util.mjs"; import { validateBoolean, validateFunction, validateNumber, validateOneOf, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isIP } from "internal:deno_node/polyfills/internal/net.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { isIP } from "internal:deno_node/internal/net.ts"; import { emitInvalidHostnameWarning, getDefaultResolver, @@ -42,7 +42,7 @@ import { setDefaultResolver, setDefaultResultOrder, validateHints, -} from "internal:deno_node/polyfills/internal/dns/utils.ts"; +} from "internal:deno_node/internal/dns/utils.ts"; import type { AnyAaaaRecord, AnyARecord, @@ -70,27 +70,27 @@ import type { ResolveWithTtlOptions, SoaRecord, SrvRecord, -} from "internal:deno_node/polyfills/internal/dns/utils.ts"; -import promisesBase from "internal:deno_node/polyfills/internal/dns/promises.ts"; -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/dns/utils.ts"; +import promisesBase from "internal:deno_node/internal/dns/promises.ts"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; import { dnsException, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { AI_ADDRCONFIG as ADDRCONFIG, AI_ALL as ALL, AI_V4MAPPED as V4MAPPED, -} from "internal:deno_node/polyfills/internal_binding/ares.ts"; +} from "internal:deno_node/internal_binding/ares.ts"; import { ChannelWrapQuery, getaddrinfo, GetAddrInfoReqWrap, QueryReqWrap, -} from "internal:deno_node/polyfills/internal_binding/cares_wrap.ts"; -import { toASCII } from "internal:deno_node/polyfills/punycode.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal_binding/cares_wrap.ts"; +import { toASCII } from "internal:deno_node/punycode.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; function onlookup( this: GetAddrInfoReqWrap, diff --git a/ext/node/polyfills/dns/promises.ts b/ext/node/polyfills/dns/promises.ts index 0de6a488bf..f8e83426d2 100644 --- a/ext/node/polyfills/dns/promises.ts +++ b/ext/node/polyfills/dns/promises.ts @@ -19,7 +19,7 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { promises } from "internal:deno_node/polyfills/dns.ts"; +import { promises } from "internal:deno_node/dns.ts"; export const { getServers, lookup, diff --git a/ext/node/polyfills/domain.ts b/ext/node/polyfills/domain.ts index ea0aed728d..391fcad121 100644 --- a/ext/node/polyfills/domain.ts +++ b/ext/node/polyfills/domain.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export function create() { notImplemented("domain.create"); diff --git a/ext/node/polyfills/events.ts b/ext/node/polyfills/events.ts index 5b43faa101..35e01d202f 100644 --- a/ext/node/polyfills/events.ts +++ b/ext/node/polyfills/events.ts @@ -11,4 +11,4 @@ export { on, once, setMaxListeners, -} from "internal:deno_node/polyfills/_events.mjs"; +} from "internal:deno_node/_events.mjs"; diff --git a/ext/node/polyfills/fs.ts b/ext/node/polyfills/fs.ts index b67d2facdf..a029d2b8c0 100644 --- a/ext/node/polyfills/fs.ts +++ b/ext/node/polyfills/fs.ts @@ -3,178 +3,153 @@ import { access, accessPromise, accessSync, -} from "internal:deno_node/polyfills/_fs/_fs_access.ts"; +} from "internal:deno_node/_fs/_fs_access.ts"; import { appendFile, appendFilePromise, appendFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_appendFile.ts"; +} from "internal:deno_node/_fs/_fs_appendFile.ts"; import { chmod, chmodPromise, chmodSync, -} from "internal:deno_node/polyfills/_fs/_fs_chmod.ts"; +} from "internal:deno_node/_fs/_fs_chmod.ts"; import { chown, chownPromise, chownSync, -} from "internal:deno_node/polyfills/_fs/_fs_chown.ts"; -import { - close, - closeSync, -} from "internal:deno_node/polyfills/_fs/_fs_close.ts"; -import * as constants from "internal:deno_node/polyfills/_fs/_fs_constants.ts"; +} from "internal:deno_node/_fs/_fs_chown.ts"; +import { close, closeSync } from "internal:deno_node/_fs/_fs_close.ts"; +import * as constants from "internal:deno_node/_fs/_fs_constants.ts"; import { copyFile, copyFilePromise, copyFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_copy.ts"; -import Dir from "internal:deno_node/polyfills/_fs/_fs_dir.ts"; -import Dirent from "internal:deno_node/polyfills/_fs/_fs_dirent.ts"; -import { - exists, - existsSync, -} from "internal:deno_node/polyfills/_fs/_fs_exists.ts"; +} from "internal:deno_node/_fs/_fs_copy.ts"; +import Dir from "internal:deno_node/_fs/_fs_dir.ts"; +import Dirent from "internal:deno_node/_fs/_fs_dirent.ts"; +import { exists, existsSync } from "internal:deno_node/_fs/_fs_exists.ts"; import { fdatasync, fdatasyncSync, -} from "internal:deno_node/polyfills/_fs/_fs_fdatasync.ts"; -import { - fstat, - fstatSync, -} from "internal:deno_node/polyfills/_fs/_fs_fstat.ts"; -import { - fsync, - fsyncSync, -} from "internal:deno_node/polyfills/_fs/_fs_fsync.ts"; +} from "internal:deno_node/_fs/_fs_fdatasync.ts"; +import { fstat, fstatSync } from "internal:deno_node/_fs/_fs_fstat.ts"; +import { fsync, fsyncSync } from "internal:deno_node/_fs/_fs_fsync.ts"; import { ftruncate, ftruncateSync, -} from "internal:deno_node/polyfills/_fs/_fs_ftruncate.ts"; -import { - futimes, - futimesSync, -} from "internal:deno_node/polyfills/_fs/_fs_futimes.ts"; +} from "internal:deno_node/_fs/_fs_ftruncate.ts"; +import { futimes, futimesSync } from "internal:deno_node/_fs/_fs_futimes.ts"; import { link, linkPromise, linkSync, -} from "internal:deno_node/polyfills/_fs/_fs_link.ts"; +} from "internal:deno_node/_fs/_fs_link.ts"; import { lstat, lstatPromise, lstatSync, -} from "internal:deno_node/polyfills/_fs/_fs_lstat.ts"; +} from "internal:deno_node/_fs/_fs_lstat.ts"; import { mkdir, mkdirPromise, mkdirSync, -} from "internal:deno_node/polyfills/_fs/_fs_mkdir.ts"; +} from "internal:deno_node/_fs/_fs_mkdir.ts"; import { mkdtemp, mkdtempPromise, mkdtempSync, -} from "internal:deno_node/polyfills/_fs/_fs_mkdtemp.ts"; +} from "internal:deno_node/_fs/_fs_mkdtemp.ts"; import { open, openPromise, openSync, -} from "internal:deno_node/polyfills/_fs/_fs_open.ts"; +} from "internal:deno_node/_fs/_fs_open.ts"; import { opendir, opendirPromise, opendirSync, -} from "internal:deno_node/polyfills/_fs/_fs_opendir.ts"; -import { read, readSync } from "internal:deno_node/polyfills/_fs/_fs_read.ts"; +} from "internal:deno_node/_fs/_fs_opendir.ts"; +import { read, readSync } from "internal:deno_node/_fs/_fs_read.ts"; import { readdir, readdirPromise, readdirSync, -} from "internal:deno_node/polyfills/_fs/_fs_readdir.ts"; +} from "internal:deno_node/_fs/_fs_readdir.ts"; import { readFile, readFilePromise, readFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_readFile.ts"; +} from "internal:deno_node/_fs/_fs_readFile.ts"; import { readlink, readlinkPromise, readlinkSync, -} from "internal:deno_node/polyfills/_fs/_fs_readlink.ts"; +} from "internal:deno_node/_fs/_fs_readlink.ts"; import { realpath, realpathPromise, realpathSync, -} from "internal:deno_node/polyfills/_fs/_fs_realpath.ts"; +} from "internal:deno_node/_fs/_fs_realpath.ts"; import { rename, renamePromise, renameSync, -} from "internal:deno_node/polyfills/_fs/_fs_rename.ts"; +} from "internal:deno_node/_fs/_fs_rename.ts"; import { rmdir, rmdirPromise, rmdirSync, -} from "internal:deno_node/polyfills/_fs/_fs_rmdir.ts"; -import { - rm, - rmPromise, - rmSync, -} from "internal:deno_node/polyfills/_fs/_fs_rm.ts"; +} from "internal:deno_node/_fs/_fs_rmdir.ts"; +import { rm, rmPromise, rmSync } from "internal:deno_node/_fs/_fs_rm.ts"; import { stat, statPromise, statSync, -} from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; +} from "internal:deno_node/_fs/_fs_stat.ts"; import { symlink, symlinkPromise, symlinkSync, -} from "internal:deno_node/polyfills/_fs/_fs_symlink.ts"; +} from "internal:deno_node/_fs/_fs_symlink.ts"; import { truncate, truncatePromise, truncateSync, -} from "internal:deno_node/polyfills/_fs/_fs_truncate.ts"; +} from "internal:deno_node/_fs/_fs_truncate.ts"; import { unlink, unlinkPromise, unlinkSync, -} from "internal:deno_node/polyfills/_fs/_fs_unlink.ts"; +} from "internal:deno_node/_fs/_fs_unlink.ts"; import { utimes, utimesPromise, utimesSync, -} from "internal:deno_node/polyfills/_fs/_fs_utimes.ts"; +} from "internal:deno_node/_fs/_fs_utimes.ts"; import { unwatchFile, watch, watchFile, watchPromise, -} from "internal:deno_node/polyfills/_fs/_fs_watch.ts"; +} from "internal:deno_node/_fs/_fs_watch.ts"; // @deno-types="./_fs/_fs_write.d.ts" -import { - write, - writeSync, -} from "internal:deno_node/polyfills/_fs/_fs_write.mjs"; +import { write, writeSync } from "internal:deno_node/_fs/_fs_write.mjs"; // @deno-types="./_fs/_fs_writev.d.ts" -import { - writev, - writevSync, -} from "internal:deno_node/polyfills/_fs/_fs_writev.mjs"; +import { writev, writevSync } from "internal:deno_node/_fs/_fs_writev.mjs"; import { writeFile, writeFilePromise, writeFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_writeFile.ts"; -import { Stats } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +} from "internal:deno_node/_fs/_fs_writeFile.ts"; +import { Stats } from "internal:deno_node/internal/fs/utils.mjs"; // @deno-types="./internal/fs/streams.d.ts" import { createReadStream, createWriteStream, ReadStream, WriteStream, -} from "internal:deno_node/polyfills/internal/fs/streams.mjs"; +} from "internal:deno_node/internal/fs/streams.mjs"; const { F_OK, diff --git a/ext/node/polyfills/fs/promises.ts b/ext/node/polyfills/fs/promises.ts index 2f4687661d..441e502e5e 100644 --- a/ext/node/polyfills/fs/promises.ts +++ b/ext/node/polyfills/fs/promises.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promises as fsPromises } from "internal:deno_node/polyfills/fs.ts"; +import { promises as fsPromises } from "internal:deno_node/fs.ts"; export const access = fsPromises.access; export const copyFile = fsPromises.copyFile; diff --git a/ext/node/polyfills/global.ts b/ext/node/polyfills/global.ts index f9cb9186f0..2ab33921ca 100644 --- a/ext/node/polyfills/global.ts +++ b/ext/node/polyfills/global.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file no-var -import processModule from "internal:deno_node/polyfills/process.ts"; -import { Buffer as bufferModule } from "internal:deno_node/polyfills/buffer.ts"; +import processModule from "internal:deno_node/process.ts"; +import { Buffer as bufferModule } from "internal:deno_node/buffer.ts"; import { clearInterval, clearTimeout, setInterval, setTimeout, -} from "internal:deno_node/polyfills/timers.ts"; -import timers from "internal:deno_node/polyfills/timers.ts"; +} from "internal:deno_node/timers.ts"; +import timers from "internal:deno_node/timers.ts"; type GlobalType = { process: typeof processModule; diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 4bfc1e1d3f..82533ba228 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -1,32 +1,29 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { TextEncoder } from "internal:deno_web/08_text_encoding.js"; -import { - type Deferred, - deferred, -} from "internal:deno_node/polyfills/_util/async.ts"; +import { type Deferred, deferred } from "internal:deno_node/_util/async.ts"; import { _normalizeArgs, ListenOptions, Socket, -} from "internal:deno_node/polyfills/net.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { ERR_SERVER_NOT_RUNNING } from "internal:deno_node/polyfills/internal/errors.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; -import { validatePort } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/net.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { ERR_SERVER_NOT_RUNNING } from "internal:deno_node/internal/errors.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; +import { validatePort } from "internal:deno_node/internal/validators.mjs"; import { Readable as NodeReadable, Writable as NodeWritable, -} from "internal:deno_node/polyfills/stream.ts"; -import { OutgoingMessage } from "internal:deno_node/polyfills/_http_outgoing.ts"; -import { Agent } from "internal:deno_node/polyfills/_http_agent.mjs"; -import { chunkExpression as RE_TE_CHUNKED } from "internal:deno_node/polyfills/_http_common.ts"; -import { urlToHttpOptions } from "internal:deno_node/polyfills/internal/url.ts"; +} from "internal:deno_node/stream.ts"; +import { OutgoingMessage } from "internal:deno_node/_http_outgoing.ts"; +import { Agent } from "internal:deno_node/_http_agent.mjs"; +import { chunkExpression as RE_TE_CHUNKED } from "internal:deno_node/_http_common.ts"; +import { urlToHttpOptions } from "internal:deno_node/internal/url.ts"; import { constants, TCP, -} from "internal:deno_node/polyfills/internal_binding/tcp_wrap.ts"; +} from "internal:deno_node/internal_binding/tcp_wrap.ts"; enum STATUS_CODES { /** RFC 7231, 6.2.1 */ diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts index e5eb1725a1..e31715a92b 100644 --- a/ext/node/polyfills/http2.ts +++ b/ext/node/polyfills/http2.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export class Http2Session { constructor() { diff --git a/ext/node/polyfills/https.ts b/ext/node/polyfills/https.ts index da77b46e24..7b9b0003df 100644 --- a/ext/node/polyfills/https.ts +++ b/ext/node/polyfills/https.ts @@ -1,15 +1,15 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { urlToHttpOptions } from "internal:deno_node/polyfills/internal/url.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { urlToHttpOptions } from "internal:deno_node/internal/url.ts"; import { Agent as HttpAgent, ClientRequest, IncomingMessageForClient as IncomingMessage, type RequestOptions, -} from "internal:deno_node/polyfills/http.ts"; -import type { Socket } from "internal:deno_node/polyfills/net.ts"; +} from "internal:deno_node/http.ts"; +import type { Socket } from "internal:deno_node/net.ts"; export class Agent extends HttpAgent { } diff --git a/ext/node/polyfills/inspector.ts b/ext/node/polyfills/inspector.ts index e946d7605e..310ffc912b 100644 --- a/ext/node/polyfills/inspector.ts +++ b/ext/node/polyfills/inspector.ts @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; const connectionSymbol = Symbol("connectionProperty"); const messageCallbacksSymbol = Symbol("messageCallbacks"); diff --git a/ext/node/polyfills/internal/assert.mjs b/ext/node/polyfills/internal/assert.mjs index fcdb32a056..50f260e106 100644 --- a/ext/node/polyfills/internal/assert.mjs +++ b/ext/node/polyfills/internal/assert.mjs @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { ERR_INTERNAL_ASSERTION } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INTERNAL_ASSERTION } from "internal:deno_node/internal/errors.ts"; function assert(value, message) { if (!value) { diff --git a/ext/node/polyfills/internal/async_hooks.ts b/ext/node/polyfills/internal/async_hooks.ts index 8bf513e468..daabd49267 100644 --- a/ext/node/polyfills/internal/async_hooks.ts +++ b/ext/node/polyfills/internal/async_hooks.ts @@ -2,12 +2,12 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore camelcase -import * as async_wrap from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import { ERR_ASYNC_CALLBACK } from "internal:deno_node/polyfills/internal/errors.ts"; +import * as async_wrap from "internal:deno_node/internal_binding/async_wrap.ts"; +import { ERR_ASYNC_CALLBACK } from "internal:deno_node/internal/errors.ts"; export { asyncIdSymbol, ownerSymbol, -} from "internal:deno_node/polyfills/internal_binding/symbols.ts"; +} from "internal:deno_node/internal_binding/symbols.ts"; interface ActiveHooks { array: AsyncHook[]; diff --git a/ext/node/polyfills/internal/buffer.d.ts b/ext/node/polyfills/internal/buffer.d.ts index 638674467a..900425d52d 100644 --- a/ext/node/polyfills/internal/buffer.d.ts +++ b/ext/node/polyfills/internal/buffer.d.ts @@ -35,7 +35,7 @@ type WithImplicitCoercion = * recommended to explicitly reference it via an import or require statement. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Creates a zero-filled Buffer of length 10. * const buf1 = Buffer.alloc(10); @@ -118,7 +118,7 @@ export class Buffer extends Uint8Array { * Array entries outside that range will be truncated to fit into it. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); @@ -165,7 +165,7 @@ export class Buffer extends Uint8Array { * Returns `true` if `obj` is a `Buffer`, `false` otherwise. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * Buffer.isBuffer(Buffer.alloc(10)); // true * Buffer.isBuffer(Buffer.from('foo')); // true @@ -181,7 +181,7 @@ export class Buffer extends Uint8Array { * or `false` otherwise. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * console.log(Buffer.isEncoding('utf8')); * // Prints: true @@ -210,7 +210,7 @@ export class Buffer extends Uint8Array { * string. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const str = '\u00bd + \u00bc = \u00be'; * @@ -249,7 +249,7 @@ export class Buffer extends Uint8Array { * truncated to `totalLength`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Create a single `Buffer` from a list of three `Buffer` instances. * @@ -282,7 +282,7 @@ export class Buffer extends Uint8Array { * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from('1234'); * const buf2 = Buffer.from('0123'); @@ -300,7 +300,7 @@ export class Buffer extends Uint8Array { * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.alloc(5); * @@ -313,7 +313,7 @@ export class Buffer extends Uint8Array { * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.alloc(5, 'a'); * @@ -325,7 +325,7 @@ export class Buffer extends Uint8Array { * initialized by calling `buf.fill(fill, encoding)`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); * @@ -355,7 +355,7 @@ export class Buffer extends Uint8Array { * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(10); * @@ -406,7 +406,7 @@ export class Buffer extends Uint8Array { * then copying out the relevant bits. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Need to keep around a few small chunks of memory. * const store = []; @@ -443,7 +443,7 @@ export class Buffer extends Uint8Array { * written. However, partially encoded characters will not be written. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.alloc(256); * @@ -484,7 +484,7 @@ export class Buffer extends Uint8Array { * as {@link constants.MAX_STRING_LENGTH}. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.allocUnsafe(26); * @@ -521,7 +521,7 @@ export class Buffer extends Uint8Array { * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); * const json = JSON.stringify(buf); @@ -548,7 +548,7 @@ export class Buffer extends Uint8Array { * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from('ABC'); * const buf2 = Buffer.from('414243', 'hex'); @@ -572,7 +572,7 @@ export class Buffer extends Uint8Array { * * `-1` is returned if `target` should come _after_`buf` when sorted. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from('ABC'); * const buf2 = Buffer.from('BCD'); @@ -596,7 +596,7 @@ export class Buffer extends Uint8Array { * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); @@ -632,7 +632,7 @@ export class Buffer extends Uint8Array { * different function arguments. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Create two `Buffer` instances. * const buf1 = Buffer.allocUnsafe(26); @@ -653,7 +653,7 @@ export class Buffer extends Uint8Array { * ``` * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Create a `Buffer` and copy data from one region to an overlapping region * // within the same `Buffer`. @@ -693,7 +693,7 @@ export class Buffer extends Uint8Array { * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('buffer'); * @@ -722,7 +722,7 @@ export class Buffer extends Uint8Array { * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte * // from the original `Buffer`. @@ -749,7 +749,7 @@ export class Buffer extends Uint8Array { * end of `buf` rather than the beginning. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('buffer'); * @@ -776,7 +776,7 @@ export class Buffer extends Uint8Array { * `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -797,7 +797,7 @@ export class Buffer extends Uint8Array { * `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -818,7 +818,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeBigUint64BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -837,7 +837,7 @@ export class Buffer extends Uint8Array { * Writes `value` to `buf` at the specified `offset` as little-endian * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -861,7 +861,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUintLE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(6); * @@ -884,7 +884,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUintBE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(6); * @@ -905,7 +905,7 @@ export class Buffer extends Uint8Array { * when `value` is anything other than a signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(6); * @@ -926,7 +926,7 @@ export class Buffer extends Uint8Array { * signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(6); * @@ -948,7 +948,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readBigUint64BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); * @@ -965,7 +965,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readBigUint64LE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); * @@ -1001,7 +1001,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUintLE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); * @@ -1020,7 +1020,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUintBE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); * @@ -1039,7 +1039,7 @@ export class Buffer extends Uint8Array { * supporting up to 48 bits of accuracy. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); * @@ -1056,7 +1056,7 @@ export class Buffer extends Uint8Array { * supporting up to 48 bits of accuracy. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); * @@ -1078,7 +1078,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUint8` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([1, -2]); * @@ -1099,7 +1099,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUint16LE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56]); * @@ -1120,7 +1120,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUint16BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56]); * @@ -1139,7 +1139,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUint32LE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); * @@ -1158,7 +1158,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `readUint32BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); * @@ -1175,7 +1175,7 @@ export class Buffer extends Uint8Array { * Integers read from a `Buffer` are interpreted as two's complement signed values. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([-1, 5]); * @@ -1196,7 +1196,7 @@ export class Buffer extends Uint8Array { * Integers read from a `Buffer` are interpreted as two's complement signed values. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0, 5]); * @@ -1215,7 +1215,7 @@ export class Buffer extends Uint8Array { * Integers read from a `Buffer` are interpreted as two's complement signed values. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0, 5]); * @@ -1232,7 +1232,7 @@ export class Buffer extends Uint8Array { * Integers read from a `Buffer` are interpreted as two's complement signed values. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0, 0, 0, 5]); * @@ -1251,7 +1251,7 @@ export class Buffer extends Uint8Array { * Integers read from a `Buffer` are interpreted as two's complement signed values. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([0, 0, 0, 5]); * @@ -1266,7 +1266,7 @@ export class Buffer extends Uint8Array { * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([1, 2, 3, 4]); * @@ -1283,7 +1283,7 @@ export class Buffer extends Uint8Array { * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([1, 2, 3, 4]); * @@ -1298,7 +1298,7 @@ export class Buffer extends Uint8Array { * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); * @@ -1315,7 +1315,7 @@ export class Buffer extends Uint8Array { * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); * @@ -1332,7 +1332,7 @@ export class Buffer extends Uint8Array { * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); * @@ -1354,7 +1354,7 @@ export class Buffer extends Uint8Array { * between UTF-16 little-endian and UTF-16 big-endian: * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); * buf.swap16(); // Convert to big-endian UTF-16 text. @@ -1368,7 +1368,7 @@ export class Buffer extends Uint8Array { * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); * @@ -1394,7 +1394,7 @@ export class Buffer extends Uint8Array { * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); * @@ -1423,7 +1423,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUint8` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1448,7 +1448,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUint16LE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1471,7 +1471,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUint16BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1494,7 +1494,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUint32LE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1516,7 +1516,7 @@ export class Buffer extends Uint8Array { * This function is also available under the `writeUint32BE` alias. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1539,7 +1539,7 @@ export class Buffer extends Uint8Array { * `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(2); * @@ -1562,7 +1562,7 @@ export class Buffer extends Uint8Array { * The `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(2); * @@ -1584,7 +1584,7 @@ export class Buffer extends Uint8Array { * The `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(2); * @@ -1606,7 +1606,7 @@ export class Buffer extends Uint8Array { * The `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1628,7 +1628,7 @@ export class Buffer extends Uint8Array { * The `value` is interpreted and written as a two's complement signed integer. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1648,7 +1648,7 @@ export class Buffer extends Uint8Array { * undefined when `value` is anything other than a JavaScript number. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1668,7 +1668,7 @@ export class Buffer extends Uint8Array { * undefined when `value` is anything other than a JavaScript number. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(4); * @@ -1688,7 +1688,7 @@ export class Buffer extends Uint8Array { * other than a JavaScript number. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -1708,7 +1708,7 @@ export class Buffer extends Uint8Array { * other than a JavaScript number. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(8); * @@ -1728,7 +1728,7 @@ export class Buffer extends Uint8Array { * the entire `buf` will be filled: * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Fill a `Buffer` with the ASCII character 'h'. * @@ -1746,7 +1746,7 @@ export class Buffer extends Uint8Array { * then only the bytes of that character that fit into `buf` are written: * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Fill a `Buffer` with character that takes up two bytes in UTF-8. * @@ -1758,7 +1758,7 @@ export class Buffer extends Uint8Array { * fill data remains, an exception is thrown: * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.allocUnsafe(5); * @@ -1792,7 +1792,7 @@ export class Buffer extends Uint8Array { * value between `0` and `255`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('this is a buffer'); * @@ -1825,7 +1825,7 @@ export class Buffer extends Uint8Array { * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const b = Buffer.from('abcdef'); * @@ -1860,7 +1860,7 @@ export class Buffer extends Uint8Array { * rather than the first occurrence. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('this buffer is a buffer'); * @@ -1895,7 +1895,7 @@ export class Buffer extends Uint8Array { * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const b = Buffer.from('abcdef'); * @@ -1932,7 +1932,7 @@ export class Buffer extends Uint8Array { * of `buf`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * // Log the entire contents of a `Buffer`. * @@ -1956,7 +1956,7 @@ export class Buffer extends Uint8Array { * Equivalent to `buf.indexOf() !== -1`. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('this is a buffer'); * @@ -1990,7 +1990,7 @@ export class Buffer extends Uint8Array { * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices). * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('buffer'); * @@ -2013,7 +2013,7 @@ export class Buffer extends Uint8Array { * called automatically when a `Buffer` is used in a `for..of` statement. * * ```js - * import { Buffer } from "internal:deno_node/polyfills/internal/buffer"; + * import { Buffer } from "internal:deno_node/internal/buffer"; * * const buf = Buffer.from('buffer'); * diff --git a/ext/node/polyfills/internal/buffer.mjs b/ext/node/polyfills/internal/buffer.mjs index 1600462cfe..d56ffdd3cf 100644 --- a/ext/node/polyfills/internal/buffer.mjs +++ b/ext/node/polyfills/internal/buffer.mjs @@ -3,9 +3,9 @@ // Copyright Feross Aboukhadijeh, and other contributors. All rights reserved. MIT license. import { TextDecoder, TextEncoder } from "internal:deno_web/08_text_encoding.js"; -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; -import { encodings } from "internal:deno_node/polyfills/internal_binding/string_decoder.ts"; -import { indexOfBuffer, indexOfNumber } from "internal:deno_node/polyfills/internal_binding/buffer.ts"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; +import { encodings } from "internal:deno_node/internal_binding/string_decoder.ts"; +import { indexOfBuffer, indexOfNumber } from "internal:deno_node/internal_binding/buffer.ts"; import { asciiToBytes, base64ToBytes, @@ -14,11 +14,11 @@ import { bytesToUtf16le, hexToBytes, utf16leToBytes, -} from "internal:deno_node/polyfills/internal_binding/_utils.ts"; -import { isAnyArrayBuffer, isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { normalizeEncoding } from "internal:deno_node/polyfills/internal/util.mjs"; -import { validateBuffer } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isUint8Array } from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal_binding/_utils.ts"; +import { isAnyArrayBuffer, isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; +import { normalizeEncoding } from "internal:deno_node/internal/util.mjs"; +import { validateBuffer } from "internal:deno_node/internal/validators.mjs"; +import { isUint8Array } from "internal:deno_node/internal/util/types.ts"; import { forgivingBase64Encode, forgivingBase64UrlEncode } from "internal:deno_web/00_infra.js"; import { atob, btoa } from "internal:deno_web/05_base64.js"; import { Blob } from "internal:deno_web/09_file.js"; diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 81a404c14a..a96b97d9e1 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -2,37 +2,33 @@ // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { os } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { os } from "internal:deno_node/internal_binding/constants.ts"; import { notImplemented, warnNotImplemented, -} from "internal:deno_node/polyfills/_utils.ts"; -import { - Readable, - Stream, - Writable, -} from "internal:deno_node/polyfills/stream.ts"; -import { deferred } from "internal:deno_node/polyfills/_util/async.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +} from "internal:deno_node/_utils.ts"; +import { Readable, Stream, Writable } from "internal:deno_node/stream.ts"; +import { deferred } from "internal:deno_node/_util/async.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; import { AbortError, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_UNKNOWN_SIGNAL, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { errnoException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { ErrnoException } from "internal:deno_node/polyfills/_global.d.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { errnoException } from "internal:deno_node/internal/errors.ts"; +import { ErrnoException } from "internal:deno_node/_global.d.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; import { isInt32, validateBoolean, validateObject, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; import { ArrayIsArray, ArrayPrototypeFilter, @@ -43,10 +39,10 @@ import { ArrayPrototypeUnshift, ObjectPrototypeHasOwnProperty, StringPrototypeToUpperCase, -} from "internal:deno_node/polyfills/internal/primordials.mjs"; -import { kEmptyObject } from "internal:deno_node/polyfills/internal/util.mjs"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import process from "internal:deno_node/polyfills/process.ts"; +} from "internal:deno_node/internal/primordials.mjs"; +import { kEmptyObject } from "internal:deno_node/internal/util.mjs"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import process from "internal:deno_node/process.ts"; export function mapValues( record: Readonly>, diff --git a/ext/node/polyfills/internal/cli_table.ts b/ext/node/polyfills/internal/cli_table.ts index 68cc6d0443..0fc046478a 100644 --- a/ext/node/polyfills/internal/cli_table.ts +++ b/ext/node/polyfills/internal/cli_table.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { getStringWidth } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; +import { getStringWidth } from "internal:deno_node/internal/util/inspect.mjs"; // The use of Unicode characters below is the only non-comment use of non-ASCII // Unicode characters in Node.js built-in modules. If they are ever removed or diff --git a/ext/node/polyfills/internal/console/constructor.mjs b/ext/node/polyfills/internal/console/constructor.mjs index 362c97f689..8c9a6d390c 100644 --- a/ext/node/polyfills/internal/console/constructor.mjs +++ b/ext/node/polyfills/internal/console/constructor.mjs @@ -8,12 +8,12 @@ import { ERR_INCOMPATIBLE_OPTION_PAIR, ERR_INVALID_ARG_VALUE, isStackOverflowError, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { validateArray, validateInteger, validateObject, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; const previewEntries = (iter, isKeyValue) => { if (isKeyValue) { const arr = [...iter]; @@ -25,24 +25,24 @@ const previewEntries = (iter, isKeyValue) => { return [...iter]; } }; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; const { isBuffer } = Buffer; -import { formatWithOptions, inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; +import { formatWithOptions, inspect } from "internal:deno_node/internal/util/inspect.mjs"; import { isMap, isMapIterator, isSet, isSetIterator, isTypedArray, -} from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal/util/types.ts"; import { CHAR_LOWERCASE_B as kTraceBegin, CHAR_LOWERCASE_E as kTraceEnd, CHAR_LOWERCASE_N as kTraceInstant, CHAR_UPPERCASE_C as kTraceCount, -} from "internal:deno_node/polyfills/internal/constants.ts"; -import { clearScreenDown, cursorTo } from "internal:deno_node/polyfills/internal/readline/callbacks.mjs"; -import cliTable from "internal:deno_node/polyfills/internal/cli_table.ts"; +} from "internal:deno_node/internal/constants.ts"; +import { clearScreenDown, cursorTo } from "internal:deno_node/internal/readline/callbacks.mjs"; +import cliTable from "internal:deno_node/internal/cli_table.ts"; const kCounts = Symbol("counts"); const kTraceConsoleCategory = "node,node.console"; diff --git a/ext/node/polyfills/internal/crypto/_keys.ts b/ext/node/polyfills/internal/crypto/_keys.ts index 794582bf17..853777976c 100644 --- a/ext/node/polyfills/internal/crypto/_keys.ts +++ b/ext/node/polyfills/internal/crypto/_keys.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { kKeyObject } from "internal:deno_node/polyfills/internal/crypto/constants.ts"; +import { kKeyObject } from "internal:deno_node/internal/crypto/constants.ts"; export const kKeyType = Symbol("kKeyType"); diff --git a/ext/node/polyfills/internal/crypto/_randomBytes.ts b/ext/node/polyfills/internal/crypto/_randomBytes.ts index 41678fcf1f..16b779a029 100644 --- a/ext/node/polyfills/internal/crypto/_randomBytes.ts +++ b/ext/node/polyfills/internal/crypto/_randomBytes.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; export const MAX_RANDOM_VALUES = 65536; export const MAX_SIZE = 4294967295; diff --git a/ext/node/polyfills/internal/crypto/_randomFill.ts b/ext/node/polyfills/internal/crypto/_randomFill.ts index 0450726968..9acff9b9bc 100644 --- a/ext/node/polyfills/internal/crypto/_randomFill.ts +++ b/ext/node/polyfills/internal/crypto/_randomFill.ts @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import randomBytes, { MAX_SIZE as kMaxUint32, -} from "internal:deno_node/polyfills/internal/crypto/_randomBytes.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/crypto/_randomBytes.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; const kBufferMaxLength = 0x7fffffff; diff --git a/ext/node/polyfills/internal/crypto/certificate.ts b/ext/node/polyfills/internal/crypto/certificate.ts index f6fb333a9c..bfa171ad3b 100644 --- a/ext/node/polyfills/internal/crypto/certificate.ts +++ b/ext/node/polyfills/internal/crypto/certificate.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { BinaryLike } from "internal:deno_node/polyfills/internal/crypto/types.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { BinaryLike } from "internal:deno_node/internal/crypto/types.ts"; export class Certificate { static Certificate = Certificate; diff --git a/ext/node/polyfills/internal/crypto/cipher.ts b/ext/node/polyfills/internal/crypto/cipher.ts index ddef000761..943783cb35 100644 --- a/ext/node/polyfills/internal/crypto/cipher.ts +++ b/ext/node/polyfills/internal/crypto/cipher.ts @@ -1,21 +1,21 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { validateInt32, validateObject, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import type { TransformOptions } from "internal:deno_node/polyfills/_stream.d.ts"; -import { Transform } from "internal:deno_node/polyfills/_stream.mjs"; -import { KeyObject } from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import type { BufferEncoding } from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import type { TransformOptions } from "internal:deno_node/_stream.d.ts"; +import { Transform } from "internal:deno_node/_stream.mjs"; +import { KeyObject } from "internal:deno_node/internal/crypto/keys.ts"; +import type { BufferEncoding } from "internal:deno_node/_global.d.ts"; import type { BinaryLike, Encoding, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; const { ops } = globalThis.__bootstrap.core; diff --git a/ext/node/polyfills/internal/crypto/diffiehellman.ts b/ext/node/polyfills/internal/crypto/diffiehellman.ts index eb903ccb3f..6e35ebaf4c 100644 --- a/ext/node/polyfills/internal/crypto/diffiehellman.ts +++ b/ext/node/polyfills/internal/crypto/diffiehellman.ts @@ -1,28 +1,28 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; import { isAnyArrayBuffer, isArrayBufferView, -} from "internal:deno_node/polyfills/internal/util/types.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/util/types.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { validateInt32, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getDefaultEncoding, toBuf, -} from "internal:deno_node/polyfills/internal/crypto/util.ts"; +} from "internal:deno_node/internal/crypto/util.ts"; import type { BinaryLike, BinaryToTextEncoding, ECDHKeyFormat, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; -import { KeyObject } from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import type { BufferEncoding } from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; +import { KeyObject } from "internal:deno_node/internal/crypto/keys.ts"; +import type { BufferEncoding } from "internal:deno_node/_global.d.ts"; const DH_GENERATOR = 2; diff --git a/ext/node/polyfills/internal/crypto/hash.ts b/ext/node/polyfills/internal/crypto/hash.ts index e6e2409a23..7a7c0be8ea 100644 --- a/ext/node/polyfills/internal/crypto/hash.ts +++ b/ext/node/polyfills/internal/crypto/hash.ts @@ -5,24 +5,24 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { Transform } from "internal:deno_node/polyfills/stream.ts"; -import { encode as encodeToHex } from "internal:deno_node/polyfills/internal/crypto/_hex.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { Transform } from "internal:deno_node/stream.ts"; +import { encode as encodeToHex } from "internal:deno_node/internal/crypto/_hex.ts"; import { forgivingBase64Encode as encodeToBase64, forgivingBase64UrlEncode as encodeToBase64Url, } from "internal:deno_web/00_infra.js"; -import type { TransformOptions } from "internal:deno_node/polyfills/_stream.d.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; +import type { TransformOptions } from "internal:deno_node/_stream.d.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; import type { BinaryToTextEncoding, Encoding, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; import { KeyObject, prepareSecretKey, -} from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal/crypto/keys.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; const { ops } = globalThis.__bootstrap.core; diff --git a/ext/node/polyfills/internal/crypto/hkdf.ts b/ext/node/polyfills/internal/crypto/hkdf.ts index aebdd9152f..1bd6528624 100644 --- a/ext/node/polyfills/internal/crypto/hkdf.ts +++ b/ext/node/polyfills/internal/crypto/hkdf.ts @@ -5,28 +5,28 @@ import { validateFunction, validateInteger, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; import { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, hideStackFrames, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { toBuf, validateByteSource, -} from "internal:deno_node/polyfills/internal/crypto/util.ts"; +} from "internal:deno_node/internal/crypto/util.ts"; import { createSecretKey, isKeyObject, KeyObject, -} from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import type { BinaryLike } from "internal:deno_node/polyfills/internal/crypto/types.ts"; -import { kMaxLength } from "internal:deno_node/polyfills/internal/buffer.mjs"; +} from "internal:deno_node/internal/crypto/keys.ts"; +import type { BinaryLike } from "internal:deno_node/internal/crypto/types.ts"; +import { kMaxLength } from "internal:deno_node/internal/buffer.mjs"; import { isAnyArrayBuffer, isArrayBufferView, -} from "internal:deno_node/polyfills/internal/util/types.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal/util/types.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; const validateParameters = hideStackFrames((hash, key, salt, info, length) => { key = prepareKey(key); diff --git a/ext/node/polyfills/internal/crypto/keygen.ts b/ext/node/polyfills/internal/crypto/keygen.ts index 1a947b95ba..d8cd311a99 100644 --- a/ext/node/polyfills/internal/crypto/keygen.ts +++ b/ext/node/polyfills/internal/crypto/keygen.ts @@ -1,13 +1,13 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { KeyObject } from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { KeyObject } from "internal:deno_node/internal/crypto/keys.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { KeyFormat, KeyType, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; export function generateKey( _type: "hmac" | "aes", diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts index 7c9e7bad95..9a2800e7f0 100644 --- a/ext/node/polyfills/internal/crypto/keys.ts +++ b/ext/node/polyfills/internal/crypto/keys.ts @@ -4,30 +4,30 @@ import { kHandle, kKeyObject, -} from "internal:deno_node/polyfills/internal/crypto/constants.ts"; +} from "internal:deno_node/internal/crypto/constants.ts"; import { ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; import type { KeyFormat, KeyType, PrivateKeyInput, PublicKeyInput, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { isAnyArrayBuffer, isArrayBufferView, -} from "internal:deno_node/polyfills/internal/util/types.ts"; -import { hideStackFrames } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/util/types.ts"; +import { hideStackFrames } from "internal:deno_node/internal/errors.ts"; import { isCryptoKey as isCryptoKey_, isKeyObject as isKeyObject_, kKeyType, -} from "internal:deno_node/polyfills/internal/crypto/_keys.ts"; +} from "internal:deno_node/internal/crypto/_keys.ts"; const getArrayBufferOrView = hideStackFrames( ( diff --git a/ext/node/polyfills/internal/crypto/pbkdf2.ts b/ext/node/polyfills/internal/crypto/pbkdf2.ts index a3d821ae79..efd520f768 100644 --- a/ext/node/polyfills/internal/crypto/pbkdf2.ts +++ b/ext/node/polyfills/internal/crypto/pbkdf2.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { createHash } from "internal:deno_node/polyfills/internal/crypto/hash.ts"; -import { HASH_DATA } from "internal:deno_node/polyfills/internal/crypto/types.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { createHash } from "internal:deno_node/internal/crypto/hash.ts"; +import { HASH_DATA } from "internal:deno_node/internal/crypto/types.ts"; export const MAX_ALLOC = Math.pow(2, 30) - 1; diff --git a/ext/node/polyfills/internal/crypto/random.ts b/ext/node/polyfills/internal/crypto/random.ts index 158ea40dac..def9e639da 100644 --- a/ext/node/polyfills/internal/crypto/random.ts +++ b/ext/node/polyfills/internal/crypto/random.ts @@ -1,19 +1,19 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import randomBytes from "internal:deno_node/polyfills/internal/crypto/_randomBytes.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import randomBytes from "internal:deno_node/internal/crypto/_randomBytes.ts"; import randomFill, { randomFillSync, -} from "internal:deno_node/polyfills/internal/crypto/_randomFill.ts"; -import randomInt from "internal:deno_node/polyfills/internal/crypto/_randomInt.ts"; +} from "internal:deno_node/internal/crypto/_randomFill.ts"; +import randomInt from "internal:deno_node/internal/crypto/_randomInt.ts"; -export { default as randomBytes } from "internal:deno_node/polyfills/internal/crypto/_randomBytes.ts"; +export { default as randomBytes } from "internal:deno_node/internal/crypto/_randomBytes.ts"; export { default as randomFill, randomFillSync, -} from "internal:deno_node/polyfills/internal/crypto/_randomFill.ts"; -export { default as randomInt } from "internal:deno_node/polyfills/internal/crypto/_randomInt.ts"; +} from "internal:deno_node/internal/crypto/_randomFill.ts"; +export { default as randomInt } from "internal:deno_node/internal/crypto/_randomInt.ts"; export type LargeNumberLike = | ArrayBufferView diff --git a/ext/node/polyfills/internal/crypto/scrypt.ts b/ext/node/polyfills/internal/crypto/scrypt.ts index 1bdafb63d4..46afd0f8a0 100644 --- a/ext/node/polyfills/internal/crypto/scrypt.ts +++ b/ext/node/polyfills/internal/crypto/scrypt.ts @@ -23,9 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { pbkdf2Sync as pbkdf2 } from "internal:deno_node/polyfills/internal/crypto/pbkdf2.ts"; -import { HASH_DATA } from "internal:deno_node/polyfills/internal/crypto/types.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { pbkdf2Sync as pbkdf2 } from "internal:deno_node/internal/crypto/pbkdf2.ts"; +import { HASH_DATA } from "internal:deno_node/internal/crypto/types.ts"; type Opts = Partial<{ N: number; diff --git a/ext/node/polyfills/internal/crypto/sig.ts b/ext/node/polyfills/internal/crypto/sig.ts index 6c163c8e5b..8c9af3b98b 100644 --- a/ext/node/polyfills/internal/crypto/sig.ts +++ b/ext/node/polyfills/internal/crypto/sig.ts @@ -1,19 +1,19 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import type { WritableOptions } from "internal:deno_node/polyfills/_stream.d.ts"; -import Writable from "internal:deno_node/polyfills/internal/streams/writable.mjs"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import type { WritableOptions } from "internal:deno_node/_stream.d.ts"; +import Writable from "internal:deno_node/internal/streams/writable.mjs"; import type { BinaryLike, BinaryToTextEncoding, Encoding, PrivateKeyInput, PublicKeyInput, -} from "internal:deno_node/polyfills/internal/crypto/types.ts"; -import { KeyObject } from "internal:deno_node/polyfills/internal/crypto/keys.ts"; +} from "internal:deno_node/internal/crypto/types.ts"; +import { KeyObject } from "internal:deno_node/internal/crypto/keys.ts"; export type DSAEncoding = "der" | "ieee-p1363"; diff --git a/ext/node/polyfills/internal/crypto/types.ts b/ext/node/polyfills/internal/crypto/types.ts index 3bb9ec1600..3231d378ef 100644 --- a/ext/node/polyfills/internal/crypto/types.ts +++ b/ext/node/polyfills/internal/crypto/types.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; export type HASH_DATA = string | ArrayBufferView | Buffer; diff --git a/ext/node/polyfills/internal/crypto/util.ts b/ext/node/polyfills/internal/crypto/util.ts index 8a7f7a1b6b..75e8e4ea7e 100644 --- a/ext/node/polyfills/internal/crypto/util.ts +++ b/ext/node/polyfills/internal/crypto/util.ts @@ -1,21 +1,21 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { ERR_INVALID_ARG_TYPE, hideStackFrames, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { isAnyArrayBuffer, isArrayBufferView, -} from "internal:deno_node/polyfills/internal/util/types.ts"; -import { crypto as constants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +} from "internal:deno_node/internal/util/types.ts"; +import { crypto as constants } from "internal:deno_node/internal_binding/constants.ts"; import { kHandle, kKeyObject, -} from "internal:deno_node/polyfills/internal/crypto/constants.ts"; +} from "internal:deno_node/internal/crypto/constants.ts"; // TODO(kt3k): Generate this list from `digestAlgorithms` // of std/crypto/_wasm/mod.ts diff --git a/ext/node/polyfills/internal/crypto/x509.ts b/ext/node/polyfills/internal/crypto/x509.ts index 0722d78652..4e47e1de65 100644 --- a/ext/node/polyfills/internal/crypto/x509.ts +++ b/ext/node/polyfills/internal/crypto/x509.ts @@ -1,12 +1,12 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { KeyObject } from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { BinaryLike } from "internal:deno_node/polyfills/internal/crypto/types.ts"; +import { KeyObject } from "internal:deno_node/internal/crypto/keys.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; +import { isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { BinaryLike } from "internal:deno_node/internal/crypto/types.ts"; // deno-lint-ignore no-explicit-any export type PeerCertificate = any; diff --git a/ext/node/polyfills/internal/dgram.ts b/ext/node/polyfills/internal/dgram.ts index 8e8e50fabd..843d5a444d 100644 --- a/ext/node/polyfills/internal/dgram.ts +++ b/ext/node/polyfills/internal/dgram.ts @@ -20,16 +20,16 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { lookup as defaultLookup } from "internal:deno_node/polyfills/dns.ts"; +import { lookup as defaultLookup } from "internal:deno_node/dns.ts"; import { isInt32, validateFunction, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { ERR_SOCKET_BAD_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { UDP } from "internal:deno_node/polyfills/internal_binding/udp_wrap.ts"; -import { guessHandleType } from "internal:deno_node/polyfills/internal_binding/util.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; +import { ERR_SOCKET_BAD_TYPE } from "internal:deno_node/internal/errors.ts"; +import { UDP } from "internal:deno_node/internal_binding/udp_wrap.ts"; +import { guessHandleType } from "internal:deno_node/internal_binding/util.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; export type SocketType = "udp4" | "udp6"; diff --git a/ext/node/polyfills/internal/dns/promises.ts b/ext/node/polyfills/internal/dns/promises.ts index 40f57fd2c0..9eb7cd03b7 100644 --- a/ext/node/polyfills/internal/dns/promises.ts +++ b/ext/node/polyfills/internal/dns/promises.ts @@ -25,8 +25,8 @@ import { validateNumber, validateOneOf, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isIP } from "internal:deno_node/polyfills/internal/net.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { isIP } from "internal:deno_node/internal/net.ts"; import { emitInvalidHostnameWarning, getDefaultResolver, @@ -35,7 +35,7 @@ import { isLookupOptions, Resolver as CallbackResolver, validateHints, -} from "internal:deno_node/polyfills/internal/dns/utils.ts"; +} from "internal:deno_node/internal/dns/utils.ts"; import type { LookupAddress, LookupAllOptions, @@ -44,19 +44,19 @@ import type { Records, ResolveOptions, ResolveWithTtlOptions, -} from "internal:deno_node/polyfills/internal/dns/utils.ts"; +} from "internal:deno_node/internal/dns/utils.ts"; import { dnsException, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { ChannelWrapQuery, getaddrinfo, GetAddrInfoReqWrap, QueryReqWrap, -} from "internal:deno_node/polyfills/internal_binding/cares_wrap.ts"; -import { toASCII } from "internal:deno_node/polyfills/punycode.ts"; +} from "internal:deno_node/internal_binding/cares_wrap.ts"; +import { toASCII } from "internal:deno_node/punycode.ts"; function onlookup( this: GetAddrInfoReqWrap, diff --git a/ext/node/polyfills/internal/dns/utils.ts b/ext/node/polyfills/internal/dns/utils.ts index 0afd106170..238ede2a9e 100644 --- a/ext/node/polyfills/internal/dns/utils.ts +++ b/ext/node/polyfills/internal/dns/utils.ts @@ -20,30 +20,30 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { getOptionValue } from "internal:deno_node/polyfills/internal/options.ts"; -import { emitWarning } from "internal:deno_node/polyfills/process.ts"; +import { getOptionValue } from "internal:deno_node/internal/options.ts"; +import { emitWarning } from "internal:deno_node/process.ts"; import { AI_ADDRCONFIG, AI_ALL, AI_V4MAPPED, -} from "internal:deno_node/polyfills/internal_binding/ares.ts"; +} from "internal:deno_node/internal_binding/ares.ts"; import { ChannelWrap, strerror, -} from "internal:deno_node/polyfills/internal_binding/cares_wrap.ts"; +} from "internal:deno_node/internal_binding/cares_wrap.ts"; import { ERR_DNS_SET_SERVERS_FAILED, ERR_INVALID_ARG_VALUE, ERR_INVALID_IP_ADDRESS, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; import { validateArray, validateInt32, validateOneOf, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isIP } from "internal:deno_node/polyfills/internal/net.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import { isIP } from "internal:deno_node/internal/net.ts"; export interface LookupOptions { family?: number | undefined; diff --git a/ext/node/polyfills/internal/errors.ts b/ext/node/polyfills/internal/errors.ts index 67f729f8d3..cdc7e8afc2 100644 --- a/ext/node/polyfills/internal/errors.ts +++ b/ext/node/polyfills/internal/errors.ts @@ -13,18 +13,18 @@ * ERR_INVALID_PACKAGE_CONFIG // package.json stuff, probably useless */ -import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; +import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; import { codeMap, errorMap, mapSysErrnoToUvErrno, -} from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import { os as osConstants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { hideStackFrames } from "internal:deno_node/polyfills/internal/hide_stack_frames.ts"; -import { getSystemErrorName } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/internal_binding/uv.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import { os as osConstants } from "internal:deno_node/internal_binding/constants.ts"; +import { hideStackFrames } from "internal:deno_node/internal/hide_stack_frames.ts"; +import { getSystemErrorName } from "internal:deno_node/_utils.ts"; export { errorMap }; diff --git a/ext/node/polyfills/internal/event_target.mjs b/ext/node/polyfills/internal/event_target.mjs index d542fba944..39e6ad9252 100644 --- a/ext/node/polyfills/internal/event_target.mjs +++ b/ext/node/polyfills/internal/event_target.mjs @@ -6,23 +6,23 @@ import { ERR_INVALID_ARG_TYPE, ERR_INVALID_THIS, ERR_MISSING_ARGS, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { validateObject, validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { emitWarning } from "internal:deno_node/polyfills/process.ts"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { validateObject, validateString } from "internal:deno_node/internal/validators.mjs"; +import { emitWarning } from "internal:deno_node/process.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; import { Event as WebEvent, EventTarget as WebEventTarget } from "internal:deno_web/02_event.js"; import { customInspectSymbol, kEmptyObject, kEnumerableProperty, -} from "internal:deno_node/polyfills/internal/util.mjs"; -import { inspect } from "internal:deno_node/polyfills/util.ts"; +} from "internal:deno_node/internal/util.mjs"; +import { inspect } from "internal:deno_node/util.ts"; const kIsEventTarget = Symbol.for("nodejs.event_target"); const kIsNodeEventTarget = Symbol("kIsNodeEventTarget"); -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; const { kMaxEventTargetListeners, kMaxEventTargetListenersWarned, diff --git a/ext/node/polyfills/internal/fs/streams.d.ts b/ext/node/polyfills/internal/fs/streams.d.ts index 9e70c2431f..f5ed3b6949 100644 --- a/ext/node/polyfills/internal/fs/streams.d.ts +++ b/ext/node/polyfills/internal/fs/streams.d.ts @@ -2,14 +2,14 @@ // Copyright DefinitelyTyped contributors. All rights reserved. MIT license. // deno-lint-ignore-file no-explicit-any -import * as stream from "internal:deno_node/polyfills/_stream.d.ts"; -import * as promises from "internal:deno_node/polyfills/fs/promises.ts"; +import * as stream from "internal:deno_node/_stream.d.ts"; +import * as promises from "internal:deno_node/fs/promises.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { BufferEncoding, ErrnoException, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; type PathLike = string | Buffer | URL; @@ -253,7 +253,7 @@ interface ReadStreamOptions extends StreamOptions { * also required. * * ```js - * import { createReadStream } from "internal:deno_node/polyfills/internal/fs/fs"; + * import { createReadStream } from "internal:deno_node/internal/fs/fs"; * * // Create a stream from some character device. * const stream = createReadStream('/dev/input/event0'); @@ -281,7 +281,7 @@ interface ReadStreamOptions extends StreamOptions { * An example to read the last 10 bytes of a file which is 100 bytes long: * * ```js - * import { createReadStream } from "internal:deno_node/polyfills/internal/fs/fs"; + * import { createReadStream } from "internal:deno_node/internal/fs/fs"; * * createReadStream('sample.txt', { start: 90, end: 99 }); * ``` diff --git a/ext/node/polyfills/internal/fs/streams.mjs b/ext/node/polyfills/internal/fs/streams.mjs index 4d751df761..101ab167b0 100644 --- a/ext/node/polyfills/internal/fs/streams.mjs +++ b/ext/node/polyfills/internal/fs/streams.mjs @@ -1,26 +1,26 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { kEmptyObject } from "internal:deno_node/polyfills/internal/util.mjs"; -import { deprecate } from "internal:deno_node/polyfills/util.ts"; -import { validateFunction, validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { errorOrDestroy } from "internal:deno_node/polyfills/internal/streams/destroy.mjs"; -import { open as fsOpen } from "internal:deno_node/polyfills/_fs/_fs_open.ts"; -import { read as fsRead } from "internal:deno_node/polyfills/_fs/_fs_read.ts"; -import { write as fsWrite } from "internal:deno_node/polyfills/_fs/_fs_write.mjs"; -import { writev as fsWritev } from "internal:deno_node/polyfills/_fs/_fs_writev.mjs"; -import { close as fsClose } from "internal:deno_node/polyfills/_fs/_fs_close.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } from "internal:deno_node/internal/errors.ts"; +import { kEmptyObject } from "internal:deno_node/internal/util.mjs"; +import { deprecate } from "internal:deno_node/util.ts"; +import { validateFunction, validateInteger } from "internal:deno_node/internal/validators.mjs"; +import { errorOrDestroy } from "internal:deno_node/internal/streams/destroy.mjs"; +import { open as fsOpen } from "internal:deno_node/_fs/_fs_open.ts"; +import { read as fsRead } from "internal:deno_node/_fs/_fs_read.ts"; +import { write as fsWrite } from "internal:deno_node/_fs/_fs_write.mjs"; +import { writev as fsWritev } from "internal:deno_node/_fs/_fs_writev.mjs"; +import { close as fsClose } from "internal:deno_node/_fs/_fs_close.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { copyObject, getOptions, getValidatedFd, validatePath, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { finished, Readable, Writable } from "internal:deno_node/polyfills/stream.ts"; -import { toPathIfFileURL } from "internal:deno_node/polyfills/internal/url.ts"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { finished, Readable, Writable } from "internal:deno_node/stream.ts"; +import { toPathIfFileURL } from "internal:deno_node/internal/url.ts"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; const kIoDone = Symbol("kIoDone"); const kIsPerformingIO = Symbol("kIsPerformingIO"); diff --git a/ext/node/polyfills/internal/fs/utils.mjs b/ext/node/polyfills/internal/fs/utils.mjs index 9d74c5eee3..567212e17d 100644 --- a/ext/node/polyfills/internal/fs/utils.mjs +++ b/ext/node/polyfills/internal/fs/utils.mjs @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. "use strict"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { ERR_FS_EISDIR, ERR_FS_INVALID_SYMLINK_TYPE, @@ -10,17 +10,17 @@ import { ERR_OUT_OF_RANGE, hideStackFrames, uvException, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { isArrayBufferView, isBigUint64Array, isDate, isUint8Array, -} from "internal:deno_node/polyfills/internal/util/types.ts"; -import { once } from "internal:deno_node/polyfills/internal/util.mjs"; -import { deprecate } from "internal:deno_node/polyfills/util.ts"; -import { toPathIfFileURL } from "internal:deno_node/polyfills/internal/url.ts"; +} from "internal:deno_node/internal/util/types.ts"; +import { once } from "internal:deno_node/internal/util.mjs"; +import { deprecate } from "internal:deno_node/util.ts"; +import { toPathIfFileURL } from "internal:deno_node/internal/url.ts"; import { validateAbortSignal, validateBoolean, @@ -29,20 +29,20 @@ import { validateInteger, validateObject, validateUint32, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import pathModule from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import pathModule from "internal:deno_node/path.ts"; const kType = Symbol("type"); const kStats = Symbol("stats"); -import assert from "internal:deno_node/polyfills/internal/assert.mjs"; -import { lstat, lstatSync } from "internal:deno_node/polyfills/_fs/_fs_lstat.ts"; -import { stat, statSync } from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import process from "internal:deno_node/polyfills/process.ts"; +import assert from "internal:deno_node/internal/assert.mjs"; +import { lstat, lstatSync } from "internal:deno_node/_fs/_fs_lstat.ts"; +import { stat, statSync } from "internal:deno_node/_fs/_fs_stat.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import process from "internal:deno_node/process.ts"; import { fs as fsConstants, os as osConstants, -} from "internal:deno_node/polyfills/internal_binding/constants.ts"; +} from "internal:deno_node/internal_binding/constants.ts"; const { F_OK = 0, W_OK = 0, diff --git a/ext/node/polyfills/internal/http.ts b/ext/node/polyfills/internal/http.ts index f541039dc7..136ebca32b 100644 --- a/ext/node/polyfills/internal/http.ts +++ b/ext/node/polyfills/internal/http.ts @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { setUnrefTimeout } from "internal:deno_node/polyfills/timers.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { setUnrefTimeout } from "internal:deno_node/timers.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; let utcCache: string | undefined; diff --git a/ext/node/polyfills/internal/net.ts b/ext/node/polyfills/internal/net.ts index 2e3a92dfd4..48b1f5f25e 100644 --- a/ext/node/polyfills/internal/net.ts +++ b/ext/node/polyfills/internal/net.ts @@ -20,9 +20,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { uvException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { writeBuffer } from "internal:deno_node/polyfills/internal_binding/node_file.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { uvException } from "internal:deno_node/internal/errors.ts"; +import { writeBuffer } from "internal:deno_node/internal_binding/node_file.ts"; // IPv4 Segment const v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"; diff --git a/ext/node/polyfills/internal/options.ts b/ext/node/polyfills/internal/options.ts index 68ccf0528c..da0368b075 100644 --- a/ext/node/polyfills/internal/options.ts +++ b/ext/node/polyfills/internal/options.ts @@ -20,7 +20,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { getOptions } from "internal:deno_node/polyfills/internal_binding/node_options.ts"; +import { getOptions } from "internal:deno_node/internal_binding/node_options.ts"; let optionsMap: Map; diff --git a/ext/node/polyfills/internal/querystring.ts b/ext/node/polyfills/internal/querystring.ts index c00803afe8..c736d2e3c6 100644 --- a/ext/node/polyfills/internal/querystring.ts +++ b/ext/node/polyfills/internal/querystring.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { ERR_INVALID_URI } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INVALID_URI } from "internal:deno_node/internal/errors.ts"; export const hexTable = new Array(256); for (let i = 0; i < 256; ++i) { diff --git a/ext/node/polyfills/internal/readline/callbacks.mjs b/ext/node/polyfills/internal/readline/callbacks.mjs index 3be88c8998..09f686013b 100644 --- a/ext/node/polyfills/internal/readline/callbacks.mjs +++ b/ext/node/polyfills/internal/readline/callbacks.mjs @@ -22,11 +22,11 @@ "use strict"; -import { ERR_INVALID_ARG_VALUE, ERR_INVALID_CURSOR_POS } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INVALID_ARG_VALUE, ERR_INVALID_CURSOR_POS } from "internal:deno_node/internal/errors.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; -import { CSI } from "internal:deno_node/polyfills/internal/readline/utils.mjs"; +import { CSI } from "internal:deno_node/internal/readline/utils.mjs"; const { kClearLine, diff --git a/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs b/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs index 7f68dac475..4c6dfa5222 100644 --- a/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs +++ b/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs @@ -20,15 +20,15 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { charLengthAt, CSI, emitKeys } from "internal:deno_node/polyfills/internal/readline/utils.mjs"; -import { kSawKeyPress } from "internal:deno_node/polyfills/internal/readline/symbols.mjs"; -import { clearTimeout, setTimeout } from "internal:deno_node/polyfills/timers.ts"; +import { charLengthAt, CSI, emitKeys } from "internal:deno_node/internal/readline/utils.mjs"; +import { kSawKeyPress } from "internal:deno_node/internal/readline/symbols.mjs"; +import { clearTimeout, setTimeout } from "internal:deno_node/timers.ts"; const { kEscape, } = CSI; -import { StringDecoder } from "internal:deno_node/polyfills/string_decoder.ts"; +import { StringDecoder } from "internal:deno_node/string_decoder.ts"; const KEYPRESS_DECODER = Symbol("keypress-decoder"); const ESCAPE_DECODER = Symbol("escape-decoder"); diff --git a/ext/node/polyfills/internal/readline/interface.mjs b/ext/node/polyfills/internal/readline/interface.mjs index 41d05fbf26..d8191557fd 100644 --- a/ext/node/polyfills/internal/readline/interface.mjs +++ b/ext/node/polyfills/internal/readline/interface.mjs @@ -22,30 +22,30 @@ // deno-lint-ignore-file camelcase no-inner-declarations no-this-alias -import { ERR_INVALID_ARG_VALUE, ERR_USE_AFTER_CLOSE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { ERR_INVALID_ARG_VALUE, ERR_USE_AFTER_CLOSE } from "internal:deno_node/internal/errors.ts"; import { validateAbortSignal, validateArray, validateString, validateUint32, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; import { // inspect, getStringWidth, stripVTControlCharacters, -} from "internal:deno_node/polyfills/internal/util/inspect.mjs"; -import EventEmitter from "internal:deno_node/polyfills/events.ts"; -import { emitKeypressEvents } from "internal:deno_node/polyfills/internal/readline/emitKeypressEvents.mjs"; +} from "internal:deno_node/internal/util/inspect.mjs"; +import EventEmitter from "internal:deno_node/events.ts"; +import { emitKeypressEvents } from "internal:deno_node/internal/readline/emitKeypressEvents.mjs"; import { charLengthAt, charLengthLeft, commonPrefix, kSubstringSearch, -} from "internal:deno_node/polyfills/internal/readline/utils.mjs"; -import { clearScreenDown, cursorTo, moveCursor } from "internal:deno_node/polyfills/internal/readline/callbacks.mjs"; -import { Readable } from "internal:deno_node/polyfills/_stream.mjs"; +} from "internal:deno_node/internal/readline/utils.mjs"; +import { clearScreenDown, cursorTo, moveCursor } from "internal:deno_node/internal/readline/callbacks.mjs"; +import { Readable } from "internal:deno_node/_stream.mjs"; -import { StringDecoder } from "internal:deno_node/polyfills/string_decoder.ts"; +import { StringDecoder } from "internal:deno_node/string_decoder.ts"; import { kAddHistory, kDecoder, @@ -78,7 +78,7 @@ import { kWordLeft, kWordRight, kWriteToOutput, -} from "internal:deno_node/polyfills/internal/readline/symbols.mjs"; +} from "internal:deno_node/internal/readline/symbols.mjs"; const kHistorySize = 30; const kMincrlfDelay = 100; diff --git a/ext/node/polyfills/internal/readline/promises.mjs b/ext/node/polyfills/internal/readline/promises.mjs index 36aa3de120..81677172af 100644 --- a/ext/node/polyfills/internal/readline/promises.mjs +++ b/ext/node/polyfills/internal/readline/promises.mjs @@ -1,12 +1,12 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. -import { ArrayPrototypeJoin, ArrayPrototypePush } from "internal:deno_node/polyfills/internal/primordials.mjs"; +import { ArrayPrototypeJoin, ArrayPrototypePush } from "internal:deno_node/internal/primordials.mjs"; -import { CSI } from "internal:deno_node/polyfills/internal/readline/utils.mjs"; -import { validateBoolean, validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { isWritable } from "internal:deno_node/polyfills/internal/streams/utils.mjs"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { CSI } from "internal:deno_node/internal/readline/utils.mjs"; +import { validateBoolean, validateInteger } from "internal:deno_node/internal/validators.mjs"; +import { isWritable } from "internal:deno_node/internal/streams/utils.mjs"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; const { kClearToLineBeginning, diff --git a/ext/node/polyfills/internal/stream_base_commons.ts b/ext/node/polyfills/internal/stream_base_commons.ts index dd1c74d0f6..6dccc13546 100644 --- a/ext/node/polyfills/internal/stream_base_commons.ts +++ b/ext/node/polyfills/internal/stream_base_commons.ts @@ -20,7 +20,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { ownerSymbol } from "internal:deno_node/polyfills/internal/async_hooks.ts"; +import { ownerSymbol } from "internal:deno_node/internal/async_hooks.ts"; import { kArrayBufferOffset, kBytesWritten, @@ -28,17 +28,17 @@ import { LibuvStreamWrap, streamBaseState, WriteWrap, -} from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { isUint8Array } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { errnoException } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { isUint8Array } from "internal:deno_node/internal/util/types.ts"; +import { errnoException } from "internal:deno_node/internal/errors.ts"; import { getTimerDuration, kTimeout, -} from "internal:deno_node/polyfills/internal/timers.mjs"; -import { setUnrefTimeout } from "internal:deno_node/polyfills/timers.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/internal/timers.mjs"; +import { setUnrefTimeout } from "internal:deno_node/timers.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; export const kMaybeDestroy = Symbol("kMaybeDestroy"); export const kUpdateTimer = Symbol("kUpdateTimer"); diff --git a/ext/node/polyfills/internal/streams/add-abort-signal.mjs b/ext/node/polyfills/internal/streams/add-abort-signal.mjs index 5d7512f1c5..501c203156 100644 --- a/ext/node/polyfills/internal/streams/add-abort-signal.mjs +++ b/ext/node/polyfills/internal/streams/add-abort-signal.mjs @@ -2,8 +2,8 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { AbortError, ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import eos from "internal:deno_node/polyfills/internal/streams/end-of-stream.mjs"; +import { AbortError, ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; +import eos from "internal:deno_node/internal/streams/end-of-stream.mjs"; // This method is inlined here for readable-stream // It also does not allow for signal to not exist on the stream diff --git a/ext/node/polyfills/internal/streams/buffer_list.mjs b/ext/node/polyfills/internal/streams/buffer_list.mjs index 3016ffba56..546b48a61f 100644 --- a/ext/node/polyfills/internal/streams/buffer_list.mjs +++ b/ext/node/polyfills/internal/streams/buffer_list.mjs @@ -2,8 +2,8 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; class BufferList { constructor() { diff --git a/ext/node/polyfills/internal/streams/destroy.mjs b/ext/node/polyfills/internal/streams/destroy.mjs index b065f2119b..c4e5c0bb09 100644 --- a/ext/node/polyfills/internal/streams/destroy.mjs +++ b/ext/node/polyfills/internal/streams/destroy.mjs @@ -2,8 +2,8 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { aggregateTwoErrors, ERR_MULTIPLE_CALLBACK } from "internal:deno_node/polyfills/internal/errors.ts"; -import * as process from "internal:deno_node/polyfills/_process/process.ts"; +import { aggregateTwoErrors, ERR_MULTIPLE_CALLBACK } from "internal:deno_node/internal/errors.ts"; +import * as process from "internal:deno_node/_process/process.ts"; const kDestroy = Symbol("kDestroy"); const kConstruct = Symbol("kConstruct"); diff --git a/ext/node/polyfills/internal/streams/duplex.mjs b/ext/node/polyfills/internal/streams/duplex.mjs index b2086d4675..df62f764d0 100644 --- a/ext/node/polyfills/internal/streams/duplex.mjs +++ b/ext/node/polyfills/internal/streams/duplex.mjs @@ -2,7 +2,7 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { Duplex } from "internal:deno_node/polyfills/_stream.mjs"; +import { Duplex } from "internal:deno_node/_stream.mjs"; const { from, fromWeb, toWeb } = Duplex; export default Duplex; diff --git a/ext/node/polyfills/internal/streams/end-of-stream.mjs b/ext/node/polyfills/internal/streams/end-of-stream.mjs index b5c380d56d..9c9e40cc24 100644 --- a/ext/node/polyfills/internal/streams/end-of-stream.mjs +++ b/ext/node/polyfills/internal/streams/end-of-stream.mjs @@ -2,14 +2,14 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { AbortError, ERR_STREAM_PREMATURE_CLOSE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { once } from "internal:deno_node/polyfills/internal/util.mjs"; +import { AbortError, ERR_STREAM_PREMATURE_CLOSE } from "internal:deno_node/internal/errors.ts"; +import { once } from "internal:deno_node/internal/util.mjs"; import { validateAbortSignal, validateFunction, validateObject, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import * as process from "internal:deno_node/polyfills/_process/process.ts"; +} from "internal:deno_node/internal/validators.mjs"; +import * as process from "internal:deno_node/_process/process.ts"; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; diff --git a/ext/node/polyfills/internal/streams/lazy_transform.mjs b/ext/node/polyfills/internal/streams/lazy_transform.mjs index 2bb93bd919..40ddefea91 100644 --- a/ext/node/polyfills/internal/streams/lazy_transform.mjs +++ b/ext/node/polyfills/internal/streams/lazy_transform.mjs @@ -2,8 +2,8 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { getDefaultEncoding } from "internal:deno_node/polyfills/internal/crypto/util.ts"; -import stream from "internal:deno_node/polyfills/stream.ts"; +import { getDefaultEncoding } from "internal:deno_node/internal/crypto/util.ts"; +import stream from "internal:deno_node/stream.ts"; function LazyTransform(options) { this._options = options; diff --git a/ext/node/polyfills/internal/streams/legacy.mjs b/ext/node/polyfills/internal/streams/legacy.mjs index 0de18956f1..bb2d30bc44 100644 --- a/ext/node/polyfills/internal/streams/legacy.mjs +++ b/ext/node/polyfills/internal/streams/legacy.mjs @@ -2,7 +2,7 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import EE from "internal:deno_node/polyfills/events.ts"; +import EE from "internal:deno_node/events.ts"; function Stream(opts) { EE.call(this, opts); diff --git a/ext/node/polyfills/internal/streams/passthrough.mjs b/ext/node/polyfills/internal/streams/passthrough.mjs index 136a0484a5..dbaa9b2150 100644 --- a/ext/node/polyfills/internal/streams/passthrough.mjs +++ b/ext/node/polyfills/internal/streams/passthrough.mjs @@ -2,6 +2,6 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { PassThrough } from "internal:deno_node/polyfills/_stream.mjs"; +import { PassThrough } from "internal:deno_node/_stream.mjs"; export default PassThrough; diff --git a/ext/node/polyfills/internal/streams/readable.mjs b/ext/node/polyfills/internal/streams/readable.mjs index 36133d2970..d9e45f4c25 100644 --- a/ext/node/polyfills/internal/streams/readable.mjs +++ b/ext/node/polyfills/internal/streams/readable.mjs @@ -2,7 +2,7 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { Readable } from "internal:deno_node/polyfills/_stream.mjs"; +import { Readable } from "internal:deno_node/_stream.mjs"; const { ReadableState, _fromList, from, fromWeb, toWeb, wrap } = Readable; export default Readable; diff --git a/ext/node/polyfills/internal/streams/transform.mjs b/ext/node/polyfills/internal/streams/transform.mjs index 3fc4fa5cdc..53e841dd01 100644 --- a/ext/node/polyfills/internal/streams/transform.mjs +++ b/ext/node/polyfills/internal/streams/transform.mjs @@ -2,6 +2,6 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { Transform } from "internal:deno_node/polyfills/_stream.mjs"; +import { Transform } from "internal:deno_node/_stream.mjs"; export default Transform; diff --git a/ext/node/polyfills/internal/streams/writable.mjs b/ext/node/polyfills/internal/streams/writable.mjs index 6f4d77960f..308009bceb 100644 --- a/ext/node/polyfills/internal/streams/writable.mjs +++ b/ext/node/polyfills/internal/streams/writable.mjs @@ -2,7 +2,7 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file -import { Writable } from "internal:deno_node/polyfills/_stream.mjs"; +import { Writable } from "internal:deno_node/_stream.mjs"; const { WritableState, fromWeb, toWeb } = Writable; export default Writable; diff --git a/ext/node/polyfills/internal/test/binding.ts b/ext/node/polyfills/internal/test/binding.ts index 996cc57aaa..86d10f2f81 100644 --- a/ext/node/polyfills/internal/test/binding.ts +++ b/ext/node/polyfills/internal/test/binding.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { getBinding } from "internal:deno_node/polyfills/internal_binding/mod.ts"; -import type { BindingName } from "internal:deno_node/polyfills/internal_binding/mod.ts"; +import { getBinding } from "internal:deno_node/internal_binding/mod.ts"; +import type { BindingName } from "internal:deno_node/internal_binding/mod.ts"; export function internalBinding(name: BindingName) { return getBinding(name); diff --git a/ext/node/polyfills/internal/timers.mjs b/ext/node/polyfills/internal/timers.mjs index 6796885ce2..bece251dec 100644 --- a/ext/node/polyfills/internal/timers.mjs +++ b/ext/node/polyfills/internal/timers.mjs @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; -import { validateFunction, validateNumber } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { ERR_OUT_OF_RANGE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { emitWarning } from "internal:deno_node/polyfills/process.ts"; +import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; +import { validateFunction, validateNumber } from "internal:deno_node/internal/validators.mjs"; +import { ERR_OUT_OF_RANGE } from "internal:deno_node/internal/errors.ts"; +import { emitWarning } from "internal:deno_node/process.ts"; import { setTimeout as setTimeout_, clearTimeout as clearTimeout_, diff --git a/ext/node/polyfills/internal/url.ts b/ext/node/polyfills/internal/url.ts index 415ad9be6e..3259fb9fa0 100644 --- a/ext/node/polyfills/internal/url.ts +++ b/ext/node/polyfills/internal/url.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fileURLToPath } from "internal:deno_node/polyfills/url.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { fileURLToPath } from "internal:deno_node/url.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; const searchParams = Symbol("query"); diff --git a/ext/node/polyfills/internal/util.mjs b/ext/node/polyfills/internal/util.mjs index ba26c6a6a0..114af0c0be 100644 --- a/ext/node/polyfills/internal/util.mjs +++ b/ext/node/polyfills/internal/util.mjs @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { normalizeEncoding, slowCases } from "internal:deno_node/polyfills/internal/normalize_encoding.mjs"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { normalizeEncoding, slowCases } from "internal:deno_node/internal/normalize_encoding.mjs"; export { normalizeEncoding, slowCases }; -import { ObjectCreate, StringPrototypeToUpperCase } from "internal:deno_node/polyfills/internal/primordials.mjs"; -import { ERR_UNKNOWN_SIGNAL } from "internal:deno_node/polyfills/internal/errors.ts"; -import { os } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { ObjectCreate, StringPrototypeToUpperCase } from "internal:deno_node/internal/primordials.mjs"; +import { ERR_UNKNOWN_SIGNAL } from "internal:deno_node/internal/errors.ts"; +import { os } from "internal:deno_node/internal_binding/constants.ts"; export const customInspectSymbol = Symbol.for("nodejs.util.inspect.custom"); export const kEnumerableProperty = Object.create(null); diff --git a/ext/node/polyfills/internal/util/comparisons.ts b/ext/node/polyfills/internal/util/comparisons.ts index 1620e468b5..3f76089f39 100644 --- a/ext/node/polyfills/internal/util/comparisons.ts +++ b/ext/node/polyfills/internal/util/comparisons.ts @@ -19,14 +19,14 @@ import { isStringObject, isSymbolObject, isTypedArray, -} from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal/util/types.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getOwnNonIndexProperties, ONLY_ENUMERABLE, SKIP_SYMBOLS, -} from "internal:deno_node/polyfills/internal_binding/util.ts"; +} from "internal:deno_node/internal_binding/util.ts"; enum valueType { noIterator, diff --git a/ext/node/polyfills/internal/util/debuglog.ts b/ext/node/polyfills/internal/util/debuglog.ts index 498facbd15..0ae0820bbf 100644 --- a/ext/node/polyfills/internal/util/debuglog.ts +++ b/ext/node/polyfills/internal/util/debuglog.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs"; +import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; // `debugImpls` and `testEnabled` are deliberately not initialized so any call // to `debuglog()` before `initializeDebugEnv()` is called will throw. diff --git a/ext/node/polyfills/internal/util/inspect.mjs b/ext/node/polyfills/internal/util/inspect.mjs index 53a878aa39..424773f9ae 100644 --- a/ext/node/polyfills/internal/util/inspect.mjs +++ b/ext/node/polyfills/internal/util/inspect.mjs @@ -20,15 +20,15 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import * as types from "internal:deno_node/polyfills/internal/util/types.ts"; -import { validateObject, validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; +import * as types from "internal:deno_node/internal/util/types.ts"; +import { validateObject, validateString } from "internal:deno_node/internal/validators.mjs"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; import { ALL_PROPERTIES, getOwnNonIndexProperties, ONLY_ENUMERABLE, -} from "internal:deno_node/polyfills/internal_binding/util.ts"; +} from "internal:deno_node/internal_binding/util.ts"; const kObjectType = 0; const kArrayType = 1; diff --git a/ext/node/polyfills/internal/util/types.ts b/ext/node/polyfills/internal/util/types.ts index 299493bc92..0bbf925478 100644 --- a/ext/node/polyfills/internal/util/types.ts +++ b/ext/node/polyfills/internal/util/types.ts @@ -21,11 +21,11 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import * as bindingTypes from "internal:deno_node/polyfills/internal_binding/types.ts"; +import * as bindingTypes from "internal:deno_node/internal_binding/types.ts"; export { isCryptoKey, isKeyObject, -} from "internal:deno_node/polyfills/internal/crypto/_keys.ts"; +} from "internal:deno_node/internal/crypto/_keys.ts"; // https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag const _getTypedArrayToStringTag = Object.getOwnPropertyDescriptor( diff --git a/ext/node/polyfills/internal/validators.mjs b/ext/node/polyfills/internal/validators.mjs index bea9e881ad..6fffb46782 100644 --- a/ext/node/polyfills/internal/validators.mjs +++ b/ext/node/polyfills/internal/validators.mjs @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; -import { hideStackFrames } from "internal:deno_node/polyfills/internal/hide_stack_frames.ts"; -import { isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { normalizeEncoding } from "internal:deno_node/polyfills/internal/normalize_encoding.mjs"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; +import { hideStackFrames } from "internal:deno_node/internal/hide_stack_frames.ts"; +import { isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; +import { normalizeEncoding } from "internal:deno_node/internal/normalize_encoding.mjs"; /** * @param {number} value diff --git a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts index 9002300d13..a1cc093d66 100644 --- a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts +++ b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; function assert(cond) { if (!cond) { diff --git a/ext/node/polyfills/internal_binding/buffer.ts b/ext/node/polyfills/internal_binding/buffer.ts index 58e104481d..5d0af81ca8 100644 --- a/ext/node/polyfills/internal_binding/buffer.ts +++ b/ext/node/polyfills/internal_binding/buffer.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Encodings } from "internal:deno_node/polyfills/internal_binding/_node.ts"; +import { Encodings } from "internal:deno_node/internal_binding/_node.ts"; export function indexOfNeedle( source: Uint8Array, diff --git a/ext/node/polyfills/internal_binding/cares_wrap.ts b/ext/node/polyfills/internal_binding/cares_wrap.ts index 1345e94638..b09af37285 100644 --- a/ext/node/polyfills/internal_binding/cares_wrap.ts +++ b/ext/node/polyfills/internal_binding/cares_wrap.ts @@ -24,17 +24,17 @@ // - https://github.com/nodejs/node/blob/master/src/cares_wrap.cc // - https://github.com/nodejs/node/blob/master/src/cares_wrap.h -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { isIPv4 } from "internal:deno_node/polyfills/internal/net.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; +import { isIPv4 } from "internal:deno_node/internal/net.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; // deno-lint-ignore camelcase -import { ares_strerror } from "internal:deno_node/polyfills/internal_binding/ares.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; +import { ares_strerror } from "internal:deno_node/internal_binding/ares.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; interface LookupAddress { address: string; diff --git a/ext/node/polyfills/internal_binding/connection_wrap.ts b/ext/node/polyfills/internal_binding/connection_wrap.ts index 1ce95cc1bf..d4d85d99a9 100644 --- a/ext/node/polyfills/internal_binding/connection_wrap.ts +++ b/ext/node/polyfills/internal_binding/connection_wrap.ts @@ -24,11 +24,11 @@ // - https://github.com/nodejs/node/blob/master/src/connection_wrap.cc // - https://github.com/nodejs/node/blob/master/src/connection_wrap.h -import { LibuvStreamWrap } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; +import { LibuvStreamWrap } from "internal:deno_node/internal_binding/stream_wrap.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; interface Reader { read(p: Uint8Array): Promise; diff --git a/ext/node/polyfills/internal_binding/crypto.ts b/ext/node/polyfills/internal_binding/crypto.ts index ce4739b3da..97b6990c96 100644 --- a/ext/node/polyfills/internal_binding/crypto.ts +++ b/ext/node/polyfills/internal_binding/crypto.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; -export { timingSafeEqual } from "internal:deno_node/polyfills/internal_binding/_timingSafeEqual.ts"; +export { timingSafeEqual } from "internal:deno_node/internal_binding/_timingSafeEqual.ts"; export function getFipsCrypto(): boolean { notImplemented("crypto.getFipsCrypto"); diff --git a/ext/node/polyfills/internal_binding/handle_wrap.ts b/ext/node/polyfills/internal_binding/handle_wrap.ts index 98c6a9f168..9b037e3021 100644 --- a/ext/node/polyfills/internal_binding/handle_wrap.ts +++ b/ext/node/polyfills/internal_binding/handle_wrap.ts @@ -24,11 +24,11 @@ // - https://github.com/nodejs/node/blob/master/src/handle_wrap.cc // - https://github.com/nodejs/node/blob/master/src/handle_wrap.h -import { unreachable } from "internal:deno_node/polyfills/_util/asserts.ts"; +import { unreachable } from "internal:deno_node/_util/asserts.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; export class HandleWrap extends AsyncWrap { constructor(provider: providerType) { diff --git a/ext/node/polyfills/internal_binding/mod.ts b/ext/node/polyfills/internal_binding/mod.ts index 6273b263b9..e8c2d37227 100644 --- a/ext/node/polyfills/internal_binding/mod.ts +++ b/ext/node/polyfills/internal_binding/mod.ts @@ -1,51 +1,51 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import * as asyncWrap from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import * as buffer from "internal:deno_node/polyfills/internal_binding/buffer.ts"; -import * as config from "internal:deno_node/polyfills/internal_binding/config.ts"; -import * as caresWrap from "internal:deno_node/polyfills/internal_binding/cares_wrap.ts"; -import * as constants from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import * as contextify from "internal:deno_node/polyfills/internal_binding/contextify.ts"; -import * as crypto from "internal:deno_node/polyfills/internal_binding/crypto.ts"; -import * as credentials from "internal:deno_node/polyfills/internal_binding/credentials.ts"; -import * as errors from "internal:deno_node/polyfills/internal_binding/errors.ts"; -import * as fs from "internal:deno_node/polyfills/internal_binding/fs.ts"; -import * as fsDir from "internal:deno_node/polyfills/internal_binding/fs_dir.ts"; -import * as fsEventWrap from "internal:deno_node/polyfills/internal_binding/fs_event_wrap.ts"; -import * as heapUtils from "internal:deno_node/polyfills/internal_binding/heap_utils.ts"; -import * as httpParser from "internal:deno_node/polyfills/internal_binding/http_parser.ts"; -import * as icu from "internal:deno_node/polyfills/internal_binding/icu.ts"; -import * as inspector from "internal:deno_node/polyfills/internal_binding/inspector.ts"; -import * as jsStream from "internal:deno_node/polyfills/internal_binding/js_stream.ts"; -import * as messaging from "internal:deno_node/polyfills/internal_binding/messaging.ts"; -import * as moduleWrap from "internal:deno_node/polyfills/internal_binding/module_wrap.ts"; -import * as nativeModule from "internal:deno_node/polyfills/internal_binding/native_module.ts"; -import * as natives from "internal:deno_node/polyfills/internal_binding/natives.ts"; -import * as options from "internal:deno_node/polyfills/internal_binding/options.ts"; -import * as os from "internal:deno_node/polyfills/internal_binding/os.ts"; -import * as pipeWrap from "internal:deno_node/polyfills/internal_binding/pipe_wrap.ts"; -import * as performance from "internal:deno_node/polyfills/internal_binding/performance.ts"; -import * as processMethods from "internal:deno_node/polyfills/internal_binding/process_methods.ts"; -import * as report from "internal:deno_node/polyfills/internal_binding/report.ts"; -import * as serdes from "internal:deno_node/polyfills/internal_binding/serdes.ts"; -import * as signalWrap from "internal:deno_node/polyfills/internal_binding/signal_wrap.ts"; -import * as spawnSync from "internal:deno_node/polyfills/internal_binding/spawn_sync.ts"; -import * as streamWrap from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import * as stringDecoder from "internal:deno_node/polyfills/internal_binding/string_decoder.ts"; -import * as symbols from "internal:deno_node/polyfills/internal_binding/symbols.ts"; -import * as taskQueue from "internal:deno_node/polyfills/internal_binding/task_queue.ts"; -import * as tcpWrap from "internal:deno_node/polyfills/internal_binding/tcp_wrap.ts"; -import * as timers from "internal:deno_node/polyfills/internal_binding/timers.ts"; -import * as tlsWrap from "internal:deno_node/polyfills/internal_binding/tls_wrap.ts"; -import * as traceEvents from "internal:deno_node/polyfills/internal_binding/trace_events.ts"; -import * as ttyWrap from "internal:deno_node/polyfills/internal_binding/tty_wrap.ts"; -import * as types from "internal:deno_node/polyfills/internal_binding/types.ts"; -import * as udpWrap from "internal:deno_node/polyfills/internal_binding/udp_wrap.ts"; -import * as url from "internal:deno_node/polyfills/internal_binding/url.ts"; -import * as util from "internal:deno_node/polyfills/internal_binding/util.ts"; -import * as uv from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import * as v8 from "internal:deno_node/polyfills/internal_binding/v8.ts"; -import * as worker from "internal:deno_node/polyfills/internal_binding/worker.ts"; -import * as zlib from "internal:deno_node/polyfills/internal_binding/zlib.ts"; +import * as asyncWrap from "internal:deno_node/internal_binding/async_wrap.ts"; +import * as buffer from "internal:deno_node/internal_binding/buffer.ts"; +import * as config from "internal:deno_node/internal_binding/config.ts"; +import * as caresWrap from "internal:deno_node/internal_binding/cares_wrap.ts"; +import * as constants from "internal:deno_node/internal_binding/constants.ts"; +import * as contextify from "internal:deno_node/internal_binding/contextify.ts"; +import * as crypto from "internal:deno_node/internal_binding/crypto.ts"; +import * as credentials from "internal:deno_node/internal_binding/credentials.ts"; +import * as errors from "internal:deno_node/internal_binding/errors.ts"; +import * as fs from "internal:deno_node/internal_binding/fs.ts"; +import * as fsDir from "internal:deno_node/internal_binding/fs_dir.ts"; +import * as fsEventWrap from "internal:deno_node/internal_binding/fs_event_wrap.ts"; +import * as heapUtils from "internal:deno_node/internal_binding/heap_utils.ts"; +import * as httpParser from "internal:deno_node/internal_binding/http_parser.ts"; +import * as icu from "internal:deno_node/internal_binding/icu.ts"; +import * as inspector from "internal:deno_node/internal_binding/inspector.ts"; +import * as jsStream from "internal:deno_node/internal_binding/js_stream.ts"; +import * as messaging from "internal:deno_node/internal_binding/messaging.ts"; +import * as moduleWrap from "internal:deno_node/internal_binding/module_wrap.ts"; +import * as nativeModule from "internal:deno_node/internal_binding/native_module.ts"; +import * as natives from "internal:deno_node/internal_binding/natives.ts"; +import * as options from "internal:deno_node/internal_binding/options.ts"; +import * as os from "internal:deno_node/internal_binding/os.ts"; +import * as pipeWrap from "internal:deno_node/internal_binding/pipe_wrap.ts"; +import * as performance from "internal:deno_node/internal_binding/performance.ts"; +import * as processMethods from "internal:deno_node/internal_binding/process_methods.ts"; +import * as report from "internal:deno_node/internal_binding/report.ts"; +import * as serdes from "internal:deno_node/internal_binding/serdes.ts"; +import * as signalWrap from "internal:deno_node/internal_binding/signal_wrap.ts"; +import * as spawnSync from "internal:deno_node/internal_binding/spawn_sync.ts"; +import * as streamWrap from "internal:deno_node/internal_binding/stream_wrap.ts"; +import * as stringDecoder from "internal:deno_node/internal_binding/string_decoder.ts"; +import * as symbols from "internal:deno_node/internal_binding/symbols.ts"; +import * as taskQueue from "internal:deno_node/internal_binding/task_queue.ts"; +import * as tcpWrap from "internal:deno_node/internal_binding/tcp_wrap.ts"; +import * as timers from "internal:deno_node/internal_binding/timers.ts"; +import * as tlsWrap from "internal:deno_node/internal_binding/tls_wrap.ts"; +import * as traceEvents from "internal:deno_node/internal_binding/trace_events.ts"; +import * as ttyWrap from "internal:deno_node/internal_binding/tty_wrap.ts"; +import * as types from "internal:deno_node/internal_binding/types.ts"; +import * as udpWrap from "internal:deno_node/internal_binding/udp_wrap.ts"; +import * as url from "internal:deno_node/internal_binding/url.ts"; +import * as util from "internal:deno_node/internal_binding/util.ts"; +import * as uv from "internal:deno_node/internal_binding/uv.ts"; +import * as v8 from "internal:deno_node/internal_binding/v8.ts"; +import * as worker from "internal:deno_node/internal_binding/worker.ts"; +import * as zlib from "internal:deno_node/internal_binding/zlib.ts"; const modules = { "async_wrap": asyncWrap, diff --git a/ext/node/polyfills/internal_binding/node_file.ts b/ext/node/polyfills/internal_binding/node_file.ts index 742217b199..1c45f91ff9 100644 --- a/ext/node/polyfills/internal_binding/node_file.ts +++ b/ext/node/polyfills/internal_binding/node_file.ts @@ -25,7 +25,7 @@ // - https://github.com/nodejs/node/blob/master/src/node_file.cc // - https://github.com/nodejs/node/blob/master/src/node_file.h -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; /** * Write to the given file from the given buffer synchronously. diff --git a/ext/node/polyfills/internal_binding/pipe_wrap.ts b/ext/node/polyfills/internal_binding/pipe_wrap.ts index 1e0d551a48..9a1571dd35 100644 --- a/ext/node/polyfills/internal_binding/pipe_wrap.ts +++ b/ext/node/polyfills/internal_binding/pipe_wrap.ts @@ -24,24 +24,24 @@ // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.cc // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.h -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { unreachable } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { ConnectionWrap } from "internal:deno_node/polyfills/internal_binding/connection_wrap.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { unreachable } from "internal:deno_node/_util/asserts.ts"; +import { ConnectionWrap } from "internal:deno_node/internal_binding/connection_wrap.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import { LibuvStreamWrap } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { delay } from "internal:deno_node/polyfills/_util/async.ts"; -import { kStreamBaseField } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; +import { LibuvStreamWrap } from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { delay } from "internal:deno_node/_util/async.ts"; +import { kStreamBaseField } from "internal:deno_node/internal_binding/stream_wrap.ts"; import { ceilPowOf2, INITIAL_ACCEPT_BACKOFF_DELAY, MAX_ACCEPT_BACKOFF_DELAY, -} from "internal:deno_node/polyfills/internal_binding/_listen.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +} from "internal:deno_node/internal_binding/_listen.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; export enum socketType { SOCKET, diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 3aee3b9daf..1f7d9f6c50 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -28,14 +28,14 @@ // - https://github.com/nodejs/node/blob/master/src/stream_wrap.cc import { TextEncoder } from "internal:deno_web/08_text_encoding.js"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { HandleWrap } from "internal:deno_node/polyfills/internal_binding/handle_wrap.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { HandleWrap } from "internal:deno_node/internal_binding/handle_wrap.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; interface Reader { read(p: Uint8Array): Promise; diff --git a/ext/node/polyfills/internal_binding/string_decoder.ts b/ext/node/polyfills/internal_binding/string_decoder.ts index 3df230aee6..f1307f5627 100644 --- a/ext/node/polyfills/internal_binding/string_decoder.ts +++ b/ext/node/polyfills/internal_binding/string_decoder.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Encodings } from "internal:deno_node/polyfills/internal_binding/_node.ts"; +import { Encodings } from "internal:deno_node/internal_binding/_node.ts"; const encodings = []; encodings[Encodings.ASCII] = "ascii"; diff --git a/ext/node/polyfills/internal_binding/tcp_wrap.ts b/ext/node/polyfills/internal_binding/tcp_wrap.ts index d0da3e10c9..029e39048c 100644 --- a/ext/node/polyfills/internal_binding/tcp_wrap.ts +++ b/ext/node/polyfills/internal_binding/tcp_wrap.ts @@ -24,24 +24,24 @@ // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.cc // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.h -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { unreachable } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { ConnectionWrap } from "internal:deno_node/polyfills/internal_binding/connection_wrap.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { unreachable } from "internal:deno_node/_util/asserts.ts"; +import { ConnectionWrap } from "internal:deno_node/internal_binding/connection_wrap.ts"; import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import { LibuvStreamWrap } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { ownerSymbol } from "internal:deno_node/polyfills/internal_binding/symbols.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { delay } from "internal:deno_node/polyfills/_util/async.ts"; -import { kStreamBaseField } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { isIP } from "internal:deno_node/polyfills/internal/net.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; +import { LibuvStreamWrap } from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { ownerSymbol } from "internal:deno_node/internal_binding/symbols.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { delay } from "internal:deno_node/_util/async.ts"; +import { kStreamBaseField } from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { isIP } from "internal:deno_node/internal/net.ts"; import { ceilPowOf2, INITIAL_ACCEPT_BACKOFF_DELAY, MAX_ACCEPT_BACKOFF_DELAY, -} from "internal:deno_node/polyfills/internal_binding/_listen.ts"; +} from "internal:deno_node/internal_binding/_listen.ts"; /** The type of TCP socket. */ enum socketType { diff --git a/ext/node/polyfills/internal_binding/types.ts b/ext/node/polyfills/internal_binding/types.ts index 6b8b3d6e4a..f79f4132e8 100644 --- a/ext/node/polyfills/internal_binding/types.ts +++ b/ext/node/polyfills/internal_binding/types.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { core } from "internal:deno_node/polyfills/_core.ts"; +import { core } from "internal:deno_node/_core.ts"; // https://tc39.es/ecma262/#sec-object.prototype.tostring const _toString = Object.prototype.toString; diff --git a/ext/node/polyfills/internal_binding/udp_wrap.ts b/ext/node/polyfills/internal_binding/udp_wrap.ts index 54173e3bac..eb499eb502 100644 --- a/ext/node/polyfills/internal_binding/udp_wrap.ts +++ b/ext/node/polyfills/internal_binding/udp_wrap.ts @@ -23,20 +23,17 @@ import { AsyncWrap, providerType, -} from "internal:deno_node/polyfills/internal_binding/async_wrap.ts"; -import { GetAddrInfoReqWrap } from "internal:deno_node/polyfills/internal_binding/cares_wrap.ts"; -import { HandleWrap } from "internal:deno_node/polyfills/internal_binding/handle_wrap.ts"; -import { ownerSymbol } from "internal:deno_node/polyfills/internal_binding/symbols.ts"; -import { - codeMap, - errorMap, -} from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { isIP } from "internal:deno_node/polyfills/internal/net.ts"; +} from "internal:deno_node/internal_binding/async_wrap.ts"; +import { GetAddrInfoReqWrap } from "internal:deno_node/internal_binding/cares_wrap.ts"; +import { HandleWrap } from "internal:deno_node/internal_binding/handle_wrap.ts"; +import { ownerSymbol } from "internal:deno_node/internal_binding/symbols.ts"; +import { codeMap, errorMap } from "internal:deno_node/internal_binding/uv.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; +import { isIP } from "internal:deno_node/internal/net.ts"; -import { isLinux, isWindows } from "internal:deno_node/polyfills/_util/os.ts"; +import { isLinux, isWindows } from "internal:deno_node/_util/os.ts"; // @ts-ignore Deno[Deno.internal] is used on purpose here const DenoListenDatagram = Deno[Deno.internal]?.nodeUnstable?.listenDatagram || diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts index 21d3cb3dd4..79084c694a 100644 --- a/ext/node/polyfills/internal_binding/util.ts +++ b/ext/node/polyfills/internal_binding/util.ts @@ -25,7 +25,7 @@ // - https://github.com/nodejs/node/blob/master/src/util.cc // - https://github.com/nodejs/node/blob/master/src/util.h -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export function guessHandleType(_fd: number): string { notImplemented("util.guessHandleType"); diff --git a/ext/node/polyfills/internal_binding/uv.ts b/ext/node/polyfills/internal_binding/uv.ts index 4ef1b9c411..b760560bf1 100644 --- a/ext/node/polyfills/internal_binding/uv.ts +++ b/ext/node/polyfills/internal_binding/uv.ts @@ -26,9 +26,9 @@ // // See also: http://docs.libuv.org/en/v1.x/errors.html#error-constants -import { unreachable } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { osType } from "internal:deno_node/polyfills/_util/os.ts"; -import { uvTranslateSysError } from "internal:deno_node/polyfills/internal_binding/_libuv_winerror.ts"; +import { unreachable } from "internal:deno_node/_util/asserts.ts"; +import { osType } from "internal:deno_node/_util/os.ts"; +import { uvTranslateSysError } from "internal:deno_node/internal_binding/_libuv_winerror.ts"; // In Node these values are coming from libuv: // Ref: https://github.com/libuv/libuv/blob/v1.x/include/uv/errno.h diff --git a/ext/node/polyfills/module_all.ts b/ext/node/polyfills/module_all.ts index 989ce55a88..35762882b6 100644 --- a/ext/node/polyfills/module_all.ts +++ b/ext/node/polyfills/module_all.ts @@ -1,92 +1,92 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. const internals = globalThis.__bootstrap.internals; -import _httpAgent from "internal:deno_node/polyfills/_http_agent.mjs"; -import _httpOutgoing from "internal:deno_node/polyfills/_http_outgoing.ts"; -import _streamDuplex from "internal:deno_node/polyfills/internal/streams/duplex.mjs"; -import _streamPassthrough from "internal:deno_node/polyfills/internal/streams/passthrough.mjs"; -import _streamReadable from "internal:deno_node/polyfills/internal/streams/readable.mjs"; -import _streamTransform from "internal:deno_node/polyfills/internal/streams/transform.mjs"; -import _streamWritable from "internal:deno_node/polyfills/internal/streams/writable.mjs"; -import assert from "internal:deno_node/polyfills/assert.ts"; -import assertStrict from "internal:deno_node/polyfills/assert/strict.ts"; -import asyncHooks from "internal:deno_node/polyfills/async_hooks.ts"; -import buffer from "internal:deno_node/polyfills/buffer.ts"; -import childProcess from "internal:deno_node/polyfills/child_process.ts"; -import cluster from "internal:deno_node/polyfills/cluster.ts"; -import console from "internal:deno_node/polyfills/console.ts"; -import constants from "internal:deno_node/polyfills/constants.ts"; -import crypto from "internal:deno_node/polyfills/crypto.ts"; -import dgram from "internal:deno_node/polyfills/dgram.ts"; -import diagnosticsChannel from "internal:deno_node/polyfills/diagnostics_channel.ts"; -import dns from "internal:deno_node/polyfills/dns.ts"; -import dnsPromises from "internal:deno_node/polyfills/dns/promises.ts"; -import domain from "internal:deno_node/polyfills/domain.ts"; -import events from "internal:deno_node/polyfills/events.ts"; -import fs from "internal:deno_node/polyfills/fs.ts"; -import fsPromises from "internal:deno_node/polyfills/fs/promises.ts"; -import http from "internal:deno_node/polyfills/http.ts"; -import http2 from "internal:deno_node/polyfills/http2.ts"; -import https from "internal:deno_node/polyfills/https.ts"; -import inspector from "internal:deno_node/polyfills/inspector.ts"; -import internalCp from "internal:deno_node/polyfills/internal/child_process.ts"; -import internalCryptoCertificate from "internal:deno_node/polyfills/internal/crypto/certificate.ts"; -import internalCryptoCipher from "internal:deno_node/polyfills/internal/crypto/cipher.ts"; -import internalCryptoDiffiehellman from "internal:deno_node/polyfills/internal/crypto/diffiehellman.ts"; -import internalCryptoHash from "internal:deno_node/polyfills/internal/crypto/hash.ts"; -import internalCryptoHkdf from "internal:deno_node/polyfills/internal/crypto/hkdf.ts"; -import internalCryptoKeygen from "internal:deno_node/polyfills/internal/crypto/keygen.ts"; -import internalCryptoKeys from "internal:deno_node/polyfills/internal/crypto/keys.ts"; -import internalCryptoPbkdf2 from "internal:deno_node/polyfills/internal/crypto/pbkdf2.ts"; -import internalCryptoRandom from "internal:deno_node/polyfills/internal/crypto/random.ts"; -import internalCryptoScrypt from "internal:deno_node/polyfills/internal/crypto/scrypt.ts"; -import internalCryptoSig from "internal:deno_node/polyfills/internal/crypto/sig.ts"; -import internalCryptoUtil from "internal:deno_node/polyfills/internal/crypto/util.ts"; -import internalCryptoX509 from "internal:deno_node/polyfills/internal/crypto/x509.ts"; -import internalDgram from "internal:deno_node/polyfills/internal/dgram.ts"; -import internalDnsPromises from "internal:deno_node/polyfills/internal/dns/promises.ts"; -import internalErrors from "internal:deno_node/polyfills/internal/errors.ts"; -import internalEventTarget from "internal:deno_node/polyfills/internal/event_target.mjs"; -import internalFsUtils from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import internalHttp from "internal:deno_node/polyfills/internal/http.ts"; -import internalReadlineUtils from "internal:deno_node/polyfills/internal/readline/utils.mjs"; -import internalStreamsAddAbortSignal from "internal:deno_node/polyfills/internal/streams/add-abort-signal.mjs"; -import internalStreamsBufferList from "internal:deno_node/polyfills/internal/streams/buffer_list.mjs"; -import internalStreamsLazyTransform from "internal:deno_node/polyfills/internal/streams/lazy_transform.mjs"; -import internalStreamsState from "internal:deno_node/polyfills/internal/streams/state.mjs"; -import internalTestBinding from "internal:deno_node/polyfills/internal/test/binding.ts"; -import internalTimers from "internal:deno_node/polyfills/internal/timers.mjs"; -import internalUtil from "internal:deno_node/polyfills/internal/util.mjs"; -import internalUtilInspect from "internal:deno_node/polyfills/internal/util/inspect.mjs"; -import net from "internal:deno_node/polyfills/net.ts"; -import os from "internal:deno_node/polyfills/os.ts"; -import pathPosix from "internal:deno_node/polyfills/path/posix.ts"; -import pathWin32 from "internal:deno_node/polyfills/path/win32.ts"; -import path from "internal:deno_node/polyfills/path.ts"; -import perfHooks from "internal:deno_node/polyfills/perf_hooks.ts"; -import punycode from "internal:deno_node/polyfills/punycode.ts"; -import process from "internal:deno_node/polyfills/process.ts"; -import querystring from "internal:deno_node/polyfills/querystring.ts"; -import readline from "internal:deno_node/polyfills/readline.ts"; -import readlinePromises from "internal:deno_node/polyfills/readline/promises.ts"; -import repl from "internal:deno_node/polyfills/repl.ts"; -import stream from "internal:deno_node/polyfills/stream.ts"; -import streamConsumers from "internal:deno_node/polyfills/stream/consumers.mjs"; -import streamPromises from "internal:deno_node/polyfills/stream/promises.mjs"; -import streamWeb from "internal:deno_node/polyfills/stream/web.ts"; -import stringDecoder from "internal:deno_node/polyfills/string_decoder.ts"; -import sys from "internal:deno_node/polyfills/sys.ts"; -import timers from "internal:deno_node/polyfills/timers.ts"; -import timersPromises from "internal:deno_node/polyfills/timers/promises.ts"; -import tls from "internal:deno_node/polyfills/tls.ts"; -import tty from "internal:deno_node/polyfills/tty.ts"; -import url from "internal:deno_node/polyfills/url.ts"; -import utilTypes from "internal:deno_node/polyfills/util/types.ts"; -import util from "internal:deno_node/polyfills/util.ts"; -import v8 from "internal:deno_node/polyfills/v8.ts"; -import vm from "internal:deno_node/polyfills/vm.ts"; -import workerThreads from "internal:deno_node/polyfills/worker_threads.ts"; -import wasi from "internal:deno_node/polyfills/wasi.ts"; -import zlib from "internal:deno_node/polyfills/zlib.ts"; +import _httpAgent from "internal:deno_node/_http_agent.mjs"; +import _httpOutgoing from "internal:deno_node/_http_outgoing.ts"; +import _streamDuplex from "internal:deno_node/internal/streams/duplex.mjs"; +import _streamPassthrough from "internal:deno_node/internal/streams/passthrough.mjs"; +import _streamReadable from "internal:deno_node/internal/streams/readable.mjs"; +import _streamTransform from "internal:deno_node/internal/streams/transform.mjs"; +import _streamWritable from "internal:deno_node/internal/streams/writable.mjs"; +import assert from "internal:deno_node/assert.ts"; +import assertStrict from "internal:deno_node/assert/strict.ts"; +import asyncHooks from "internal:deno_node/async_hooks.ts"; +import buffer from "internal:deno_node/buffer.ts"; +import childProcess from "internal:deno_node/child_process.ts"; +import cluster from "internal:deno_node/cluster.ts"; +import console from "internal:deno_node/console.ts"; +import constants from "internal:deno_node/constants.ts"; +import crypto from "internal:deno_node/crypto.ts"; +import dgram from "internal:deno_node/dgram.ts"; +import diagnosticsChannel from "internal:deno_node/diagnostics_channel.ts"; +import dns from "internal:deno_node/dns.ts"; +import dnsPromises from "internal:deno_node/dns/promises.ts"; +import domain from "internal:deno_node/domain.ts"; +import events from "internal:deno_node/events.ts"; +import fs from "internal:deno_node/fs.ts"; +import fsPromises from "internal:deno_node/fs/promises.ts"; +import http from "internal:deno_node/http.ts"; +import http2 from "internal:deno_node/http2.ts"; +import https from "internal:deno_node/https.ts"; +import inspector from "internal:deno_node/inspector.ts"; +import internalCp from "internal:deno_node/internal/child_process.ts"; +import internalCryptoCertificate from "internal:deno_node/internal/crypto/certificate.ts"; +import internalCryptoCipher from "internal:deno_node/internal/crypto/cipher.ts"; +import internalCryptoDiffiehellman from "internal:deno_node/internal/crypto/diffiehellman.ts"; +import internalCryptoHash from "internal:deno_node/internal/crypto/hash.ts"; +import internalCryptoHkdf from "internal:deno_node/internal/crypto/hkdf.ts"; +import internalCryptoKeygen from "internal:deno_node/internal/crypto/keygen.ts"; +import internalCryptoKeys from "internal:deno_node/internal/crypto/keys.ts"; +import internalCryptoPbkdf2 from "internal:deno_node/internal/crypto/pbkdf2.ts"; +import internalCryptoRandom from "internal:deno_node/internal/crypto/random.ts"; +import internalCryptoScrypt from "internal:deno_node/internal/crypto/scrypt.ts"; +import internalCryptoSig from "internal:deno_node/internal/crypto/sig.ts"; +import internalCryptoUtil from "internal:deno_node/internal/crypto/util.ts"; +import internalCryptoX509 from "internal:deno_node/internal/crypto/x509.ts"; +import internalDgram from "internal:deno_node/internal/dgram.ts"; +import internalDnsPromises from "internal:deno_node/internal/dns/promises.ts"; +import internalErrors from "internal:deno_node/internal/errors.ts"; +import internalEventTarget from "internal:deno_node/internal/event_target.mjs"; +import internalFsUtils from "internal:deno_node/internal/fs/utils.mjs"; +import internalHttp from "internal:deno_node/internal/http.ts"; +import internalReadlineUtils from "internal:deno_node/internal/readline/utils.mjs"; +import internalStreamsAddAbortSignal from "internal:deno_node/internal/streams/add-abort-signal.mjs"; +import internalStreamsBufferList from "internal:deno_node/internal/streams/buffer_list.mjs"; +import internalStreamsLazyTransform from "internal:deno_node/internal/streams/lazy_transform.mjs"; +import internalStreamsState from "internal:deno_node/internal/streams/state.mjs"; +import internalTestBinding from "internal:deno_node/internal/test/binding.ts"; +import internalTimers from "internal:deno_node/internal/timers.mjs"; +import internalUtil from "internal:deno_node/internal/util.mjs"; +import internalUtilInspect from "internal:deno_node/internal/util/inspect.mjs"; +import net from "internal:deno_node/net.ts"; +import os from "internal:deno_node/os.ts"; +import pathPosix from "internal:deno_node/path/posix.ts"; +import pathWin32 from "internal:deno_node/path/win32.ts"; +import path from "internal:deno_node/path.ts"; +import perfHooks from "internal:deno_node/perf_hooks.ts"; +import punycode from "internal:deno_node/punycode.ts"; +import process from "internal:deno_node/process.ts"; +import querystring from "internal:deno_node/querystring.ts"; +import readline from "internal:deno_node/readline.ts"; +import readlinePromises from "internal:deno_node/readline/promises.ts"; +import repl from "internal:deno_node/repl.ts"; +import stream from "internal:deno_node/stream.ts"; +import streamConsumers from "internal:deno_node/stream/consumers.mjs"; +import streamPromises from "internal:deno_node/stream/promises.mjs"; +import streamWeb from "internal:deno_node/stream/web.ts"; +import stringDecoder from "internal:deno_node/string_decoder.ts"; +import sys from "internal:deno_node/sys.ts"; +import timers from "internal:deno_node/timers.ts"; +import timersPromises from "internal:deno_node/timers/promises.ts"; +import tls from "internal:deno_node/tls.ts"; +import tty from "internal:deno_node/tty.ts"; +import url from "internal:deno_node/url.ts"; +import utilTypes from "internal:deno_node/util/types.ts"; +import util from "internal:deno_node/util.ts"; +import v8 from "internal:deno_node/v8.ts"; +import vm from "internal:deno_node/vm.ts"; +import workerThreads from "internal:deno_node/worker_threads.ts"; +import wasi from "internal:deno_node/wasi.ts"; +import zlib from "internal:deno_node/zlib.ts"; // Canonical mapping of supported modules const moduleAll = { diff --git a/ext/node/polyfills/module_esm.ts b/ext/node/polyfills/module_esm.ts index e9cb38ff1f..5b1cef0bba 100644 --- a/ext/node/polyfills/module_esm.ts +++ b/ext/node/polyfills/module_esm.ts @@ -26,10 +26,7 @@ * Unfortunately we have no way to call ESM resolution in Rust from TypeScript code. */ -import { - fileURLToPath, - pathToFileURL, -} from "internal:deno_node/polyfills/url.ts"; +import { fileURLToPath, pathToFileURL } from "internal:deno_node/url.ts"; import { ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, @@ -38,7 +35,7 @@ import { ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, NodeError, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; const { hasOwn } = Object; diff --git a/ext/node/polyfills/net.ts b/ext/node/polyfills/net.ts index e5f157f099..b214ce3a8a 100644 --- a/ext/node/polyfills/net.ts +++ b/ext/node/polyfills/net.ts @@ -20,21 +20,21 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; import { isIP, isIPv4, isIPv6, normalizedArgsSymbol, -} from "internal:deno_node/polyfills/internal/net.ts"; -import { Duplex } from "internal:deno_node/polyfills/stream.ts"; +} from "internal:deno_node/internal/net.ts"; +import { Duplex } from "internal:deno_node/stream.ts"; import { asyncIdSymbol, defaultTriggerAsyncIdScope, newAsyncId, ownerSymbol, -} from "internal:deno_node/polyfills/internal/async_hooks.ts"; +} from "internal:deno_node/internal/async_hooks.ts"; import { ERR_INVALID_ADDRESS_FAMILY, ERR_INVALID_ARG_TYPE, @@ -49,10 +49,10 @@ import { exceptionWithHostPort, genericNodeError, uvExceptionWithHostPort, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import type { ErrnoException } from "internal:deno_node/polyfills/internal/errors.ts"; -import { Encodings } from "internal:deno_node/polyfills/_utils.ts"; -import { isUint8Array } from "internal:deno_node/polyfills/internal/util/types.ts"; +} from "internal:deno_node/internal/errors.ts"; +import type { ErrnoException } from "internal:deno_node/internal/errors.ts"; +import { Encodings } from "internal:deno_node/_utils.ts"; +import { isUint8Array } from "internal:deno_node/internal/util/types.ts"; import { kAfterAsyncWrite, kBuffer, @@ -64,15 +64,15 @@ import { setStreamTimeout, writeGeneric, writevGeneric, -} from "internal:deno_node/polyfills/internal/stream_base_commons.ts"; -import { kTimeout } from "internal:deno_node/polyfills/internal/timers.mjs"; -import { nextTick } from "internal:deno_node/polyfills/_next_tick.ts"; +} from "internal:deno_node/internal/stream_base_commons.ts"; +import { kTimeout } from "internal:deno_node/internal/timers.mjs"; +import { nextTick } from "internal:deno_node/_next_tick.ts"; import { DTRACE_NET_SERVER_CONNECTION, DTRACE_NET_STREAM_END, -} from "internal:deno_node/polyfills/internal/dtrace.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import type { LookupOneOptions } from "internal:deno_node/polyfills/internal/dns/utils.ts"; +} from "internal:deno_node/internal/dtrace.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import type { LookupOneOptions } from "internal:deno_node/internal/dns/utils.ts"; import { validateAbortSignal, validateFunction, @@ -80,31 +80,28 @@ import { validateNumber, validatePort, validateString, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; import { constants as TCPConstants, TCP, TCPConnectWrap, -} from "internal:deno_node/polyfills/internal_binding/tcp_wrap.ts"; +} from "internal:deno_node/internal_binding/tcp_wrap.ts"; import { constants as PipeConstants, Pipe, PipeConnectWrap, -} from "internal:deno_node/polyfills/internal_binding/pipe_wrap.ts"; -import { ShutdownWrap } from "internal:deno_node/polyfills/internal_binding/stream_wrap.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import { - ADDRCONFIG, - lookup as dnsLookup, -} from "internal:deno_node/polyfills/dns.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { guessHandleType } from "internal:deno_node/polyfills/internal_binding/util.ts"; -import { debuglog } from "internal:deno_node/polyfills/internal/util/debuglog.ts"; -import type { DuplexOptions } from "internal:deno_node/polyfills/_stream.d.ts"; -import type { BufferEncoding } from "internal:deno_node/polyfills/_global.d.ts"; -import type { Abortable } from "internal:deno_node/polyfills/_events.d.ts"; -import { channel } from "internal:deno_node/polyfills/diagnostics_channel.ts"; +} from "internal:deno_node/internal_binding/pipe_wrap.ts"; +import { ShutdownWrap } from "internal:deno_node/internal_binding/stream_wrap.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import { ADDRCONFIG, lookup as dnsLookup } from "internal:deno_node/dns.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { guessHandleType } from "internal:deno_node/internal_binding/util.ts"; +import { debuglog } from "internal:deno_node/internal/util/debuglog.ts"; +import type { DuplexOptions } from "internal:deno_node/_stream.d.ts"; +import type { BufferEncoding } from "internal:deno_node/_global.d.ts"; +import type { Abortable } from "internal:deno_node/_events.d.ts"; +import { channel } from "internal:deno_node/diagnostics_channel.ts"; let debug = debuglog("net", (fn) => { debug = fn; diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts index 94ca944c8f..6fdf824535 100644 --- a/ext/node/polyfills/os.ts +++ b/ext/node/polyfills/os.ts @@ -20,11 +20,11 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { validateIntegerRange } from "internal:deno_node/polyfills/_utils.ts"; -import process from "internal:deno_node/polyfills/process.ts"; -import { isWindows, osType } from "internal:deno_node/polyfills/_util/os.ts"; -import { os } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { validateIntegerRange } from "internal:deno_node/_utils.ts"; +import process from "internal:deno_node/process.ts"; +import { isWindows, osType } from "internal:deno_node/_util/os.ts"; +import { os } from "internal:deno_node/internal_binding/constants.ts"; export const constants = os; diff --git a/ext/node/polyfills/path.ts b/ext/node/polyfills/path.ts index c178e01d82..723dccfecf 100644 --- a/ext/node/polyfills/path.ts +++ b/ext/node/polyfills/path.ts @@ -1,4 +1,4 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -export * from "internal:deno_node/polyfills/path/mod.ts"; -import * as m from "internal:deno_node/polyfills/path/mod.ts"; +export * from "internal:deno_node/path/mod.ts"; +import * as m from "internal:deno_node/path/mod.ts"; export default { ...m }; diff --git a/ext/node/polyfills/path/_util.ts b/ext/node/polyfills/path/_util.ts index ccc12abc9b..1ba1399241 100644 --- a/ext/node/polyfills/path/_util.ts +++ b/ext/node/polyfills/path/_util.ts @@ -2,7 +2,7 @@ // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { FormatInputPathObject } from "internal:deno_node/polyfills/path/_interface.ts"; +import type { FormatInputPathObject } from "internal:deno_node/path/_interface.ts"; import { CHAR_BACKWARD_SLASH, CHAR_DOT, @@ -11,8 +11,8 @@ import { CHAR_LOWERCASE_Z, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z, -} from "internal:deno_node/polyfills/path/_constants.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/path/_constants.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; export function assertPath(path: string) { if (typeof path !== "string") { diff --git a/ext/node/polyfills/path/common.ts b/ext/node/polyfills/path/common.ts index e4efe7cc4a..f8dad209b7 100644 --- a/ext/node/polyfills/path/common.ts +++ b/ext/node/polyfills/path/common.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. -import { SEP } from "internal:deno_node/polyfills/path/separator.ts"; +import { SEP } from "internal:deno_node/path/separator.ts"; /** Determines the common path from a set of paths, using an optional separator, * which defaults to the OS default separator. diff --git a/ext/node/polyfills/path/glob.ts b/ext/node/polyfills/path/glob.ts index c0da29b9f0..00529eb3c0 100644 --- a/ext/node/polyfills/path/glob.ts +++ b/ext/node/polyfills/path/glob.ts @@ -1,13 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { isWindows, osType } from "internal:deno_node/polyfills/_util/os.ts"; -import { - SEP, - SEP_PATTERN, -} from "internal:deno_node/polyfills/path/separator.ts"; -import * as _win32 from "internal:deno_node/polyfills/path/win32.ts"; -import * as _posix from "internal:deno_node/polyfills/path/posix.ts"; -import type { OSType } from "internal:deno_node/polyfills/_util/os.ts"; +import { isWindows, osType } from "internal:deno_node/_util/os.ts"; +import { SEP, SEP_PATTERN } from "internal:deno_node/path/separator.ts"; +import * as _win32 from "internal:deno_node/path/win32.ts"; +import * as _posix from "internal:deno_node/path/posix.ts"; +import type { OSType } from "internal:deno_node/_util/os.ts"; const path = isWindows ? _win32 : _posix; const { join, normalize } = path; diff --git a/ext/node/polyfills/path/mod.ts b/ext/node/polyfills/path/mod.ts index 4b4de056be..eaeeeed741 100644 --- a/ext/node/polyfills/path/mod.ts +++ b/ext/node/polyfills/path/mod.ts @@ -2,9 +2,9 @@ // Ported mostly from https://github.com/browserify/path-browserify/ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import _win32 from "internal:deno_node/polyfills/path/win32.ts"; -import _posix from "internal:deno_node/polyfills/path/posix.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import _win32 from "internal:deno_node/path/win32.ts"; +import _posix from "internal:deno_node/path/posix.ts"; const path = isWindows ? _win32 : _posix; @@ -28,10 +28,7 @@ export const { toNamespacedPath, } = path; -export * from "internal:deno_node/polyfills/path/common.ts"; -export { - SEP, - SEP_PATTERN, -} from "internal:deno_node/polyfills/path/separator.ts"; -export * from "internal:deno_node/polyfills/path/_interface.ts"; -export * from "internal:deno_node/polyfills/path/glob.ts"; +export * from "internal:deno_node/path/common.ts"; +export { SEP, SEP_PATTERN } from "internal:deno_node/path/separator.ts"; +export * from "internal:deno_node/path/_interface.ts"; +export * from "internal:deno_node/path/glob.ts"; diff --git a/ext/node/polyfills/path/posix.ts b/ext/node/polyfills/path/posix.ts index 8ebf646290..f6ff13b767 100644 --- a/ext/node/polyfills/path/posix.ts +++ b/ext/node/polyfills/path/posix.ts @@ -5,12 +5,12 @@ import type { FormatInputPathObject, ParsedPath, -} from "internal:deno_node/polyfills/path/_interface.ts"; +} from "internal:deno_node/path/_interface.ts"; import { CHAR_DOT, CHAR_FORWARD_SLASH, -} from "internal:deno_node/polyfills/path/_constants.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/path/_constants.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { _format, @@ -18,7 +18,7 @@ import { encodeWhitespace, isPosixPathSeparator, normalizeString, -} from "internal:deno_node/polyfills/path/_util.ts"; +} from "internal:deno_node/path/_util.ts"; export const sep = "/"; export const delimiter = ":"; diff --git a/ext/node/polyfills/path/separator.ts b/ext/node/polyfills/path/separator.ts index 2cfde31d02..cf089db71c 100644 --- a/ext/node/polyfills/path/separator.ts +++ b/ext/node/polyfills/path/separator.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; export const SEP = isWindows ? "\\" : "/"; export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/; diff --git a/ext/node/polyfills/path/win32.ts b/ext/node/polyfills/path/win32.ts index 4b30e34304..4ba3ad0f10 100644 --- a/ext/node/polyfills/path/win32.ts +++ b/ext/node/polyfills/path/win32.ts @@ -5,14 +5,14 @@ import type { FormatInputPathObject, ParsedPath, -} from "internal:deno_node/polyfills/path/_interface.ts"; +} from "internal:deno_node/path/_interface.ts"; import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK, -} from "internal:deno_node/polyfills/path/_constants.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/path/_constants.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { _format, @@ -21,8 +21,8 @@ import { isPathSeparator, isWindowsDeviceRoot, normalizeString, -} from "internal:deno_node/polyfills/path/_util.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; +} from "internal:deno_node/path/_util.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; export const sep = "\\"; export const delimiter = ";"; diff --git a/ext/node/polyfills/perf_hooks.ts b/ext/node/polyfills/perf_hooks.ts index 3888ec2c54..639bfb99b0 100644 --- a/ext/node/polyfills/perf_hooks.ts +++ b/ext/node/polyfills/perf_hooks.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; import { performance as shimPerformance, PerformanceEntry, diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index 525000a533..eaff978c2c 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -2,21 +2,21 @@ // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. const internals = globalThis.__bootstrap.internals; -import { core } from "internal:deno_node/polyfills/_core.ts"; +import { core } from "internal:deno_node/_core.ts"; import { notImplemented, warnNotImplemented, -} from "internal:deno_node/polyfills/_utils.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/_utils.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; import { ERR_INVALID_ARG_TYPE, ERR_UNKNOWN_SIGNAL, errnoException, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { getOptionValue } from "internal:deno_node/polyfills/internal/options.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { fromFileUrl, join } from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/internal/errors.ts"; +import { getOptionValue } from "internal:deno_node/internal/options.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { fromFileUrl, join } from "internal:deno_node/path.ts"; import { arch as arch_, chdir, @@ -25,20 +25,20 @@ import { nextTick as _nextTick, version, versions, -} from "internal:deno_node/polyfills/_process/process.ts"; -import { _exiting } from "internal:deno_node/polyfills/_process/exiting.ts"; +} from "internal:deno_node/_process/process.ts"; +import { _exiting } from "internal:deno_node/_process/exiting.ts"; export { _nextTick as nextTick, chdir, cwd, env, version, versions }; import { createWritableStdioStream, initStdin, -} from "internal:deno_node/polyfills/_process/streams.mjs"; +} from "internal:deno_node/_process/streams.mjs"; import { enableNextTick, processTicksAndRejections, runNextTicks, -} from "internal:deno_node/polyfills/_next_tick.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; -import * as files from "internal:runtime/js/40_files.js"; +} from "internal:deno_node/_next_tick.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; +import * as files from "internal:runtime/40_files.js"; // TODO(kt3k): This should be set at start up time export let arch = ""; @@ -58,11 +58,11 @@ let stdin = null as any; let stdout = null as any; export { stderr, stdin, stdout }; -import { getBinding } from "internal:deno_node/polyfills/internal_binding/mod.ts"; -import * as constants from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import * as uv from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import type { BindingName } from "internal:deno_node/polyfills/internal_binding/mod.ts"; -import { buildAllowedFlags } from "internal:deno_node/polyfills/internal/process/per_thread.mjs"; +import { getBinding } from "internal:deno_node/internal_binding/mod.ts"; +import * as constants from "internal:deno_node/internal_binding/constants.ts"; +import * as uv from "internal:deno_node/internal_binding/uv.ts"; +import type { BindingName } from "internal:deno_node/internal_binding/mod.ts"; +import { buildAllowedFlags } from "internal:deno_node/internal/process/per_thread.mjs"; // @ts-ignore Deno[Deno.internal] is used on purpose here const DenoCommand = Deno[Deno.internal]?.nodeUnstable?.Command || diff --git a/ext/node/polyfills/punycode.ts b/ext/node/polyfills/punycode.ts index 30fb727c2f..70ff7eb5cb 100644 --- a/ext/node/polyfills/punycode.ts +++ b/ext/node/polyfills/punycode.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { ucs2 } from "internal:deno_node/polyfills/internal/idna.ts"; +import { ucs2 } from "internal:deno_node/internal/idna.ts"; const { ops } = globalThis.__bootstrap.core; diff --git a/ext/node/polyfills/querystring.ts b/ext/node/polyfills/querystring.ts index d8fdfbcc8f..5885aaafa9 100644 --- a/ext/node/polyfills/querystring.ts +++ b/ext/node/polyfills/querystring.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { encodeStr, hexTable, -} from "internal:deno_node/polyfills/internal/querystring.ts"; +} from "internal:deno_node/internal/querystring.ts"; /** * Alias of querystring.parse() diff --git a/ext/node/polyfills/readline.ts b/ext/node/polyfills/readline.ts index 99b73177d7..922aeed1fc 100644 --- a/ext/node/polyfills/readline.ts +++ b/ext/node/polyfills/readline.ts @@ -10,7 +10,7 @@ import { Interface, moveCursor, promises, -} from "internal:deno_node/polyfills/_readline.mjs"; +} from "internal:deno_node/_readline.mjs"; export { clearLine, diff --git a/ext/node/polyfills/readline/promises.ts b/ext/node/polyfills/readline/promises.ts index 47e3b5b22d..c8650dc23c 100644 --- a/ext/node/polyfills/readline/promises.ts +++ b/ext/node/polyfills/readline/promises.ts @@ -1,28 +1,28 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { Readline } from "internal:deno_node/polyfills/internal/readline/promises.mjs"; +import { Readline } from "internal:deno_node/internal/readline/promises.mjs"; import { Interface as _Interface, kQuestion, kQuestionCancel, -} from "internal:deno_node/polyfills/internal/readline/interface.mjs"; -import { AbortError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { validateAbortSignal } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/readline/interface.mjs"; +import { AbortError } from "internal:deno_node/internal/errors.ts"; +import { validateAbortSignal } from "internal:deno_node/internal/validators.mjs"; -import { kEmptyObject } from "internal:deno_node/polyfills/internal/util.mjs"; -import type { Abortable } from "internal:deno_node/polyfills/_events.d.ts"; +import { kEmptyObject } from "internal:deno_node/internal/util.mjs"; +import type { Abortable } from "internal:deno_node/_events.d.ts"; import type { AsyncCompleter, Completer, ReadLineOptions, -} from "internal:deno_node/polyfills/_readline_shared_types.d.ts"; +} from "internal:deno_node/_readline_shared_types.d.ts"; import type { ReadableStream, WritableStream, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; /** * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time. diff --git a/ext/node/polyfills/repl.ts b/ext/node/polyfills/repl.ts index 33d904de3b..84dfca8955 100644 --- a/ext/node/polyfills/repl.ts +++ b/ext/node/polyfills/repl.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export class REPLServer { constructor() { diff --git a/ext/node/polyfills/stream.ts b/ext/node/polyfills/stream.ts index aac96a76ee..1b4ea68158 100644 --- a/ext/node/polyfills/stream.ts +++ b/ext/node/polyfills/stream.ts @@ -18,7 +18,7 @@ import { Stream, Transform, Writable, -} from "internal:deno_node/polyfills/_stream.mjs"; +} from "internal:deno_node/_stream.mjs"; export { _isUint8Array, diff --git a/ext/node/polyfills/stream/consumers.mjs b/ext/node/polyfills/stream/consumers.mjs index 61fe27020b..40290df3e6 100644 --- a/ext/node/polyfills/stream/consumers.mjs +++ b/ext/node/polyfills/stream/consumers.mjs @@ -2,7 +2,7 @@ // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { TextDecoder } from "internal:deno_web/08_text_encoding.js"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; /** * @typedef {import('../_global.d.ts').ReadableStream diff --git a/ext/node/polyfills/stream/promises.mjs b/ext/node/polyfills/stream/promises.mjs index 8c1f7439be..2549c9a833 100644 --- a/ext/node/polyfills/stream/promises.mjs +++ b/ext/node/polyfills/stream/promises.mjs @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import stream from "internal:deno_node/polyfills/_stream.mjs"; +import stream from "internal:deno_node/_stream.mjs"; const { finished, pipeline } = stream.promises; diff --git a/ext/node/polyfills/string_decoder.ts b/ext/node/polyfills/string_decoder.ts index 33ff6a2f00..6c4429b334 100644 --- a/ext/node/polyfills/string_decoder.ts +++ b/ext/node/polyfills/string_decoder.ts @@ -20,11 +20,11 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { normalizeEncoding as castEncoding, notImplemented, -} from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_utils.ts"; enum NotImplemented { "ascii", diff --git a/ext/node/polyfills/sys.ts b/ext/node/polyfills/sys.ts index e6297ca162..965dcb013d 100644 --- a/ext/node/polyfills/sys.ts +++ b/ext/node/polyfills/sys.ts @@ -1,3 +1,3 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -export * from "internal:deno_node/polyfills/util.ts"; -export { default } from "internal:deno_node/polyfills/util.ts"; +export * from "internal:deno_node/util.ts"; +export { default } from "internal:deno_node/util.ts"; diff --git a/ext/node/polyfills/timers.ts b/ext/node/polyfills/timers.ts index 5a650c1cc2..9da71a196d 100644 --- a/ext/node/polyfills/timers.ts +++ b/ext/node/polyfills/timers.ts @@ -3,10 +3,10 @@ import { setUnrefTimeout, Timeout, -} from "internal:deno_node/polyfills/internal/timers.mjs"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -export { setUnrefTimeout } from "internal:deno_node/polyfills/internal/timers.mjs"; +} from "internal:deno_node/internal/timers.mjs"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +export { setUnrefTimeout } from "internal:deno_node/internal/timers.mjs"; import * as timers from "internal:deno_web/02_timers.js"; const clearTimeout_ = timers.clearTimeout; diff --git a/ext/node/polyfills/timers/promises.ts b/ext/node/polyfills/timers/promises.ts index 4700f43ec0..288e3b5d8d 100644 --- a/ext/node/polyfills/timers/promises.ts +++ b/ext/node/polyfills/timers/promises.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/util.ts"; -import timers from "internal:deno_node/polyfills/timers.ts"; +import { promisify } from "internal:deno_node/util.ts"; +import timers from "internal:deno_node/timers.ts"; export const setTimeout = promisify(timers.setTimeout), setImmediate = promisify(timers.setImmediate), diff --git a/ext/node/polyfills/tls.ts b/ext/node/polyfills/tls.ts index b920ffc7d4..90f6036164 100644 --- a/ext/node/polyfills/tls.ts +++ b/ext/node/polyfills/tls.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import tlsCommon from "internal:deno_node/polyfills/_tls_common.ts"; -import tlsWrap from "internal:deno_node/polyfills/_tls_wrap.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import tlsCommon from "internal:deno_node/_tls_common.ts"; +import tlsWrap from "internal:deno_node/_tls_wrap.ts"; // openssl -> rustls const cipherMap = { diff --git a/ext/node/polyfills/tty.ts b/ext/node/polyfills/tty.ts index b3b9b62da6..a622618f32 100644 --- a/ext/node/polyfills/tty.ts +++ b/ext/node/polyfills/tty.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Socket } from "internal:deno_node/polyfills/net.ts"; +import { Socket } from "internal:deno_node/net.ts"; // Returns true when the given numeric fd is associated with a TTY and false otherwise. function isatty(fd: number) { diff --git a/ext/node/polyfills/url.ts b/ext/node/polyfills/url.ts index 6d38fd1ffc..4366f14ead 100644 --- a/ext/node/polyfills/url.ts +++ b/ext/node/polyfills/url.ts @@ -27,8 +27,8 @@ import { ERR_INVALID_FILE_URL_PATH, ERR_INVALID_URL, ERR_INVALID_URL_SCHEME, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; import { CHAR_0, CHAR_9, @@ -65,19 +65,19 @@ import { CHAR_UPPERCASE_Z, CHAR_VERTICAL_LINE, CHAR_ZERO_WIDTH_NOBREAK_SPACE, -} from "internal:deno_node/polyfills/path/_constants.ts"; -import * as path from "internal:deno_node/polyfills/path.ts"; -import { toASCII, toUnicode } from "internal:deno_node/polyfills/punycode.ts"; -import { isWindows, osType } from "internal:deno_node/polyfills/_util/os.ts"; +} from "internal:deno_node/path/_constants.ts"; +import * as path from "internal:deno_node/path.ts"; +import { toASCII, toUnicode } from "internal:deno_node/punycode.ts"; +import { isWindows, osType } from "internal:deno_node/_util/os.ts"; import { encodeStr, hexTable, -} from "internal:deno_node/polyfills/internal/querystring.ts"; -import querystring from "internal:deno_node/polyfills/querystring.ts"; +} from "internal:deno_node/internal/querystring.ts"; +import querystring from "internal:deno_node/querystring.ts"; import type { ParsedUrlQuery, ParsedUrlQueryInput, -} from "internal:deno_node/polyfills/querystring.ts"; +} from "internal:deno_node/querystring.ts"; import { URL, URLSearchParams } from "internal:deno_url/00_url.js"; const forwardSlashRegEx = /\//g; diff --git a/ext/node/polyfills/util.ts b/ext/node/polyfills/util.ts index 32dfcae748..881b167696 100644 --- a/ext/node/polyfills/util.ts +++ b/ext/node/polyfills/util.ts @@ -1,19 +1,19 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { callbackify } from "internal:deno_node/polyfills/_util/_util_callbackify.ts"; -import { debuglog } from "internal:deno_node/polyfills/internal/util/debuglog.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { callbackify } from "internal:deno_node/_util/_util_callbackify.ts"; +import { debuglog } from "internal:deno_node/internal/util/debuglog.ts"; import { format, formatWithOptions, inspect, stripVTControlCharacters, -} from "internal:deno_node/polyfills/internal/util/inspect.mjs"; -import { codes } from "internal:deno_node/polyfills/internal/error_codes.ts"; -import types from "internal:deno_node/polyfills/util/types.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { isDeepStrictEqual } from "internal:deno_node/polyfills/internal/util/comparisons.ts"; -import process from "internal:deno_node/polyfills/process.ts"; -import { validateString } from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/util/inspect.mjs"; +import { codes } from "internal:deno_node/internal/error_codes.ts"; +import types from "internal:deno_node/util/types.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { isDeepStrictEqual } from "internal:deno_node/internal/util/comparisons.ts"; +import process from "internal:deno_node/process.ts"; +import { validateString } from "internal:deno_node/internal/validators.mjs"; export { callbackify, @@ -155,7 +155,7 @@ import { _TextDecoder, _TextEncoder, getSystemErrorName, -} from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_utils.ts"; /** The global TextDecoder */ export type TextDecoder = import("./_utils.ts")._TextDecoder; diff --git a/ext/node/polyfills/util/types.ts b/ext/node/polyfills/util/types.ts index 2ed7d16914..9d8ce6b5a1 100644 --- a/ext/node/polyfills/util/types.ts +++ b/ext/node/polyfills/util/types.ts @@ -1,4 +1,4 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import * as types from "internal:deno_node/polyfills/internal/util/types.ts"; -export * from "internal:deno_node/polyfills/internal/util/types.ts"; +import * as types from "internal:deno_node/internal/util/types.ts"; +export * from "internal:deno_node/internal/util/types.ts"; export default { ...types }; diff --git a/ext/node/polyfills/v8.ts b/ext/node/polyfills/v8.ts index c7875e6545..240759b23d 100644 --- a/ext/node/polyfills/v8.ts +++ b/ext/node/polyfills/v8.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; const { ops } = globalThis.__bootstrap.core; diff --git a/ext/node/polyfills/vm.ts b/ext/node/polyfills/vm.ts index 0d5de72c60..113af81e0c 100644 --- a/ext/node/polyfills/vm.ts +++ b/ext/node/polyfills/vm.ts @@ -2,7 +2,7 @@ // deno-lint-ignore-file no-explicit-any -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export class Script { code: string; diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts index 7bca5fc4ef..39e6e2fa69 100644 --- a/ext/node/polyfills/worker_threads.ts +++ b/ext/node/polyfills/worker_threads.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { resolve, toFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; +import { resolve, toFileUrl } from "internal:deno_node/path.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; const environmentData = new Map(); let threads = 0; diff --git a/ext/node/polyfills/zlib.ts b/ext/node/polyfills/zlib.ts index ac52b4d4a5..a9e83336c6 100644 --- a/ext/node/polyfills/zlib.ts +++ b/ext/node/polyfills/zlib.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { zlib as constants } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { zlib as constants } from "internal:deno_node/internal_binding/constants.ts"; import { codes, createDeflate, @@ -31,7 +31,7 @@ import { Unzip, unzip, unzipSync, -} from "internal:deno_node/polyfills/_zlib.mjs"; +} from "internal:deno_node/_zlib.mjs"; export class Options { constructor() { notImplemented("Options.prototype.constructor"); diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js index c9bd86285a..d3c95edba4 100644 --- a/runtime/js/06_util.js +++ b/runtime/js/06_util.js @@ -11,7 +11,7 @@ const { StringPrototypeReplace, TypeError, } = primordials; -import { build } from "internal:runtime/js/01_build.js"; +import { build } from "internal:runtime/01_build.js"; import { URLPrototype } from "internal:deno_url/00_url.js"; let logDebug = false; let logSource = "JS"; diff --git a/runtime/js/10_permissions.js b/runtime/js/10_permissions.js index e8243153d7..acdbae8e7a 100644 --- a/runtime/js/10_permissions.js +++ b/runtime/js/10_permissions.js @@ -3,7 +3,7 @@ const core = globalThis.Deno.core; const ops = core.ops; import { Event, EventTarget } from "internal:deno_web/02_event.js"; -import { pathFromURL } from "internal:runtime/js/06_util.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; const primordials = globalThis.__bootstrap.primordials; const { ArrayIsArray, diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index 7b5090dc54..32994e707f 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -14,8 +14,8 @@ const { import * as webidl from "internal:deno_webidl/00_webidl.js"; import { URL } from "internal:deno_url/00_url.js"; import { getLocationHref } from "internal:deno_web/12_location.js"; -import { serializePermissions } from "internal:runtime/js/10_permissions.js"; -import { log } from "internal:runtime/js/06_util.js"; +import { serializePermissions } from "internal:runtime/10_permissions.js"; +import { log } from "internal:runtime/06_util.js"; import { defineEventHandler, ErrorEvent, diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js index 17b0b41ac6..eaf83b5434 100644 --- a/runtime/js/30_fs.js +++ b/runtime/js/30_fs.js @@ -14,8 +14,8 @@ const { ObjectEntries, Uint32Array, } = primordials; -import { pathFromURL } from "internal:runtime/js/06_util.js"; -import { build } from "internal:runtime/js/01_build.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; +import { build } from "internal:runtime/01_build.js"; function chmodSync(path, mode) { ops.op_chmod_sync(pathFromURL(path), mode); diff --git a/runtime/js/40_files.js b/runtime/js/40_files.js index 6548952545..5fc5e6c62e 100644 --- a/runtime/js/40_files.js +++ b/runtime/js/40_files.js @@ -8,8 +8,8 @@ import { fstatSync, ftruncate, ftruncateSync, -} from "internal:runtime/js/30_fs.js"; -import { pathFromURL } from "internal:runtime/js/06_util.js"; +} from "internal:runtime/30_fs.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; import { readableStreamForRid, writableStreamForRid, diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 601c799753..0854f402a8 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -2,9 +2,9 @@ const core = globalThis.Deno.core; const ops = core.ops; -import { FsFile } from "internal:runtime/js/40_files.js"; +import { FsFile } from "internal:runtime/40_files.js"; import { readAll } from "internal:deno_io/12_io.js"; -import { pathFromURL } from "internal:runtime/js/06_util.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; import { assert } from "internal:deno_web/00_infra.js"; const primordials = globalThis.__bootstrap.primordials; const { diff --git a/runtime/js/40_read_file.js b/runtime/js/40_read_file.js index 317875f736..dd4f6e67ae 100644 --- a/runtime/js/40_read_file.js +++ b/runtime/js/40_read_file.js @@ -2,7 +2,7 @@ const core = globalThis.Deno.core; const ops = core.ops; -import { pathFromURL } from "internal:runtime/js/06_util.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js"; function readFileSync(path) { diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js index f75d83f9ba..173f596cc8 100644 --- a/runtime/js/40_spawn.js +++ b/runtime/js/40_spawn.js @@ -3,7 +3,7 @@ const core = globalThis.Deno.core; const ops = core.ops; const primordials = globalThis.__bootstrap.primordials; -import { pathFromURL } from "internal:runtime/js/06_util.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; import { add, remove } from "internal:deno_web/03_abort_signal.js"; const { ArrayPrototypeMap, diff --git a/runtime/js/40_write_file.js b/runtime/js/40_write_file.js index 255def09f2..89d670a651 100644 --- a/runtime/js/40_write_file.js +++ b/runtime/js/40_write_file.js @@ -3,8 +3,8 @@ const core = globalThis.Deno.core; const ops = core.ops; const primordials = globalThis.__bootstrap.primordials; import * as abortSignal from "internal:deno_web/03_abort_signal.js"; -import { pathFromURL } from "internal:runtime/js/06_util.js"; -import { open } from "internal:runtime/js/40_files.js"; +import { pathFromURL } from "internal:runtime/06_util.js"; +import { open } from "internal:runtime/40_files.js"; import { ReadableStreamPrototype } from "internal:deno_web/06_streams.js"; const { ObjectPrototypeIsPrototypeOf } = primordials; diff --git a/runtime/js/41_prompt.js b/runtime/js/41_prompt.js index 441db9a2f3..9fca3bc8fe 100644 --- a/runtime/js/41_prompt.js +++ b/runtime/js/41_prompt.js @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. const core = globalThis.Deno.core; const primordials = globalThis.__bootstrap.primordials; -import { isatty } from "internal:runtime/js/40_tty.js"; -import { stdin } from "internal:runtime/js/40_files.js"; +import { isatty } from "internal:runtime/40_tty.js"; +import { stdin } from "internal:runtime/40_files.js"; const { ArrayPrototypePush, StringPrototypeCharCodeAt, Uint8Array } = primordials; const LF = StringPrototypeCharCodeAt("\n", 0); diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 8ad285e423..6bb3d10d69 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -10,25 +10,25 @@ import * as net from "internal:deno_net/01_net.js"; import * as tls from "internal:deno_net/02_tls.js"; import * as http from "internal:deno_http/01_http.js"; import * as flash from "internal:deno_flash/01_http.js"; -import * as build from "internal:runtime/js/01_build.js"; -import * as errors from "internal:runtime/js/01_errors.js"; -import * as version from "internal:runtime/js/01_version.ts"; -import * as permissions from "internal:runtime/js/10_permissions.js"; +import * as build from "internal:runtime/01_build.js"; +import * as errors from "internal:runtime/01_errors.js"; +import * as version from "internal:runtime/01_version.ts"; +import * as permissions from "internal:runtime/10_permissions.js"; import * as io from "internal:deno_io/12_io.js"; -import * as buffer from "internal:runtime/js/13_buffer.js"; -import * as fs from "internal:runtime/js/30_fs.js"; -import * as os from "internal:runtime/js/30_os.js"; -import * as diagnostics from "internal:runtime/js/40_diagnostics.js"; -import * as files from "internal:runtime/js/40_files.js"; -import * as fsEvents from "internal:runtime/js/40_fs_events.js"; -import * as process from "internal:runtime/js/40_process.js"; -import * as readFile from "internal:runtime/js/40_read_file.js"; -import * as signals from "internal:runtime/js/40_signals.js"; -import * as tty from "internal:runtime/js/40_tty.js"; -import * as writeFile from "internal:runtime/js/40_write_file.js"; -import * as spawn from "internal:runtime/js/40_spawn.js"; +import * as buffer from "internal:runtime/13_buffer.js"; +import * as fs from "internal:runtime/30_fs.js"; +import * as os from "internal:runtime/30_os.js"; +import * as diagnostics from "internal:runtime/40_diagnostics.js"; +import * as files from "internal:runtime/40_files.js"; +import * as fsEvents from "internal:runtime/40_fs_events.js"; +import * as process from "internal:runtime/40_process.js"; +import * as readFile from "internal:runtime/40_read_file.js"; +import * as signals from "internal:runtime/40_signals.js"; +import * as tty from "internal:runtime/40_tty.js"; +import * as writeFile from "internal:runtime/40_write_file.js"; +import * as spawn from "internal:runtime/40_spawn.js"; // TODO(bartlomieju): this is funky we have two `http` imports -import * as httpRuntime from "internal:runtime/js/40_http.js"; +import * as httpRuntime from "internal:runtime/40_http.js"; const denoNs = { metrics: core.metrics, diff --git a/runtime/js/98_global_scope.js b/runtime/js/98_global_scope.js index da892f44ae..27ad593ff2 100644 --- a/runtime/js/98_global_scope.js +++ b/runtime/js/98_global_scope.js @@ -7,7 +7,7 @@ const { SymbolFor, } = primordials; -import * as util from "internal:runtime/js/06_util.js"; +import * as util from "internal:runtime/06_util.js"; import * as location from "internal:deno_web/12_location.js"; import * as event from "internal:deno_web/02_event.js"; import * as timers from "internal:deno_web/02_timers.js"; @@ -16,7 +16,7 @@ import * as encoding from "internal:deno_web/08_text_encoding.js"; import * as console from "internal:deno_console/02_console.js"; import * as caches from "internal:deno_cache/01_cache.js"; import * as compression from "internal:deno_web/14_compression.js"; -import * as worker from "internal:runtime/js/11_workers.js"; +import * as worker from "internal:runtime/11_workers.js"; import * as performance from "internal:deno_web/15_performance.js"; import * as crypto from "internal:deno_crypto/00_crypto.js"; import * as url from "internal:deno_url/00_url.js"; @@ -39,7 +39,7 @@ import DOMException from "internal:deno_web/01_dom_exception.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js"; import * as globalInterfaces from "internal:deno_web/04_global_interfaces.js"; import * as webStorage from "internal:deno_webstorage/01_webstorage.js"; -import * as prompt from "internal:runtime/js/41_prompt.js"; +import * as prompt from "internal:runtime/41_prompt.js"; // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope const windowOrWorkerGlobalScope = { diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index ffb479c32c..58465f3a2c 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -39,12 +39,12 @@ const { WeakMapPrototypeGet, WeakMapPrototypeSet, } = primordials; -import * as util from "internal:runtime/js/06_util.js"; +import * as util from "internal:runtime/06_util.js"; import * as event from "internal:deno_web/02_event.js"; import * as location from "internal:deno_web/12_location.js"; -import * as build from "internal:runtime/js/01_build.js"; -import * as version from "internal:runtime/js/01_version.ts"; -import * as os from "internal:runtime/js/30_os.js"; +import * as build from "internal:runtime/01_build.js"; +import * as version from "internal:runtime/01_version.ts"; +import * as os from "internal:runtime/30_os.js"; import * as timers from "internal:deno_web/02_timers.js"; import * as colors from "internal:deno_console/01_colors.js"; import * as net from "internal:deno_net/01_net.js"; @@ -57,8 +57,8 @@ import * as performance from "internal:deno_web/15_performance.js"; import * as url from "internal:deno_url/00_url.js"; import * as fetch from "internal:deno_fetch/26_fetch.js"; import * as messagePort from "internal:deno_web/13_message_port.js"; -import { denoNs, denoNsUnstable } from "internal:runtime/js/90_deno_ns.js"; -import { errors } from "internal:runtime/js/01_errors.js"; +import { denoNs, denoNsUnstable } from "internal:runtime/90_deno_ns.js"; +import { errors } from "internal:runtime/01_errors.js"; import * as webidl from "internal:deno_webidl/00_webidl.js"; import DOMException from "internal:deno_web/01_dom_exception.js"; import * as flash from "internal:deno_flash/01_http.js"; @@ -70,7 +70,7 @@ import { unstableWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope, workerRuntimeGlobalProperties, -} from "internal:runtime/js/98_global_scope.js"; +} from "internal:runtime/98_global_scope.js"; let windowIsClosing = false; let globalThis_;