diff --git a/.github/workflows/pullrequests.yml b/.github/workflows/pullrequests.yml index 102112c85efd..968cd6b83b29 100644 --- a/.github/workflows/pullrequests.yml +++ b/.github/workflows/pullrequests.yml @@ -84,5 +84,9 @@ jobs: TMP_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} NODE_OPTIONS: "--max_old_space_size=8192" + - name: Run E2E tests + run: npx jest + working-directory: e2e + - name: Report Code Coverage uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index 2f1247ce13e0..554fe76c8035 100644 --- a/.gitignore +++ b/.gitignore @@ -182,5 +182,7 @@ packages/wranglerjs-compat-webpack-plugin/lib emitted-types/ _routes.generated.json +e2e/.e2e_tmp_dir + # Vendored npm dependencies !vendor/*.tgz diff --git a/e2e/jest.config.mjs b/e2e/jest.config.mjs new file mode 100644 index 000000000000..dace06a48a67 --- /dev/null +++ b/e2e/jest.config.mjs @@ -0,0 +1,12 @@ +// @ts-check +/** @type {import('jest').Config} */ +const config = { + testRegex: ".*.(test|spec)\\.[jt]sx?$", + testTimeout: 10_000, + transform: { + "^.+\\.c?(t|j)sx?$": ["esbuild-jest", { sourcemap: true }], + }, + globalSetup: "./setup.ts", + globalTeardown: "./teardown.ts", +}; +export default config; diff --git a/e2e/package.json b/e2e/package.json new file mode 100644 index 000000000000..ad9e01175e74 --- /dev/null +++ b/e2e/package.json @@ -0,0 +1,15 @@ +{ + "name": "@cloudflare/wrangler-e2e", + "private": true, + "scripts": { + "check:type": "tsc", + "test": "jest" + }, + "devDependencies": { + "node-gyp": "^9.3.0", + "node-pty": "^0.11.0-beta26" + }, + "volta": { + "extends": "../package.json" + } +} diff --git a/e2e/setup.ts b/e2e/setup.ts new file mode 100644 index 000000000000..a9cf8fb9e09e --- /dev/null +++ b/e2e/setup.ts @@ -0,0 +1,246 @@ +import assert from "node:assert"; +import childProcess from "node:child_process"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { TransformStream } from "node:stream/web"; +import * as pty from "node-pty"; // node-pty doesn't provide a default export +import type { ReadableStream } from "node:stream/web"; + +export const isWin = os.platform() === "win32"; + +// File containing current E2E test temporary directory, shared between all +// running E2E tests +export const E2E_TMP_PATH = path.join(__dirname, ".e2e_tmp_dir"); +// Gets the current E2E test temporary directory +export function getRootTmp() { + return fs.readFileSync(E2E_TMP_PATH, "utf8"); +} +// Gets a new temporary directory, inside the current E2E test temporary +// directory for a single test +export function getTmp(): string { + return fs.mkdtempSync(path.join(getRootTmp(), `tmp-${Date.now()}-`)); +} + +// Tagged template literal for removing indentation from a block of text. +// If the first line is empty, it will be ignored. +export function dedent(strings: TemplateStringsArray, ...values: unknown[]) { + // Convert template literal arguments back to a regular string + const raw = String.raw({ raw: strings }, ...values); + // Split the string by lines + let lines = raw.split("\n"); + assert(lines.length > 0); + + // If the last line is just whitespace, remove it + if (lines[lines.length - 1].trim() === "") { + lines = lines.slice(0, lines.length - 1); + } + + // Find the minimum-length indent, excluding the first line + let minIndent = ""; + // (Could use `minIndent.length` for this, but then would need to start with + // infinitely long string) + let minIndentLength = Infinity; + for (const line of lines.slice(1)) { + const indent = line.match(/^[ \t]*/)?.[0]; + if (indent != null && indent.length < minIndentLength) { + minIndent = indent; + minIndentLength = indent.length; + } + } + + // If the first line is just whitespace, remove it + if (lines.length > 0 && lines[0].trim() === "") lines = lines.slice(1); + + // Remove indent from all lines, and return them all joined together + lines = lines.map((line) => + line.startsWith(minIndent) ? line.substring(minIndent.length) : line + ); + return lines.join("\n"); +} + +// Seeds the `root` directory on the file system with some data. Use in +// combination with `dedent` for petty formatting of seeded contents. +export async function seed(root: string, files: Record) { + // TODO(someday): allow copying/symlinking file/directory paths in seed? like "path`${__dirname}/../fixture`"? + for (const [name, contents] of Object.entries(files)) { + const filePath = path.resolve(root, name); + await fs.promises.mkdir(path.dirname(filePath), { recursive: true }); + await fs.promises.writeFile(filePath, contents); + } +} + +// Splits incoming stream into non-empty, trimmed lines +export class LineSplittingStream extends TransformStream { + constructor() { + let buffer = ""; + super({ + transform(chunk, controller) { + buffer += chunk; + // Keep looking for lines in `buffer` until we can't find anymore + // eslint-disable-next-line no-constant-condition + let nextLineIndex: number; + // Try to find the next line break (either LF or CRLF), if no line break + // found in current `buffer`, stop looking and wait for more chunks + while ((nextLineIndex = buffer.indexOf("\n")) !== -1) { + // Remove line from `buffer`, and enqueue if non-empty. + // `trim()` handles case of CRLF, by removing CR. + const line = buffer.substring(0, nextLineIndex).trim(); + if (line !== "") controller.enqueue(line); + // `trimStart()` ensures we don't find the current line again + buffer = buffer.substring(nextLineIndex).trimStart(); + } + }, + flush(controller) { + // If we have stuff left in the buffer, and no more chunks are coming, + // enqueue as a line if non-empty + buffer = buffer.trim(); + if (buffer !== "") controller.enqueue(buffer); + }, + }); + } +} + +export interface E2EProcess { + // Process wrapped in pseudo-TTY, can be used to write input as a user would + // (e.g. pressing hotkeys) + process: pty.IPty; + // Output from `process`, stdout and stderr are merged when using a pseudo-TTY + lines: ReadableStream; + // Promise that resolves with the exit code of `process` on termination + exitPromise: Promise; + // Exit code of `process` or `undefined` if it hasn't terminated yet + exitCode?: number; + // Sends a signal to the spawned process, resolving with the exit code. + // `signal` defaults to `SIGINT` (CTRL-C), unlike `ChildProcess#kill()` which + // defaults to `SIGTERM`. NOTE: `signal` is ignored on Windows. + kill(signal?: NodeJS.Signals): Promise; +} +// Module level variable for processes started by the test that imported this +// file, cleaned-up in `cleanupSpawnedProcesses` +const spawnedProcesses = new Set(); +// Spawn a command with the installed E2E `node_module`'s binaries in the `PATH` +export async function spawn( + cwd: string, + command: string[] +): Promise { + // Build `env` with temporary directory's `.bin` in PATH + const bin = path.join(getRootTmp(), "node_modules", ".bin"); + const pathSeparator = process.platform === "win32" ? ";" : ":"; + const PATH = `${bin}${pathSeparator}${process.env.PATH}`; + const env = { + ...process.env, + PATH, + FORCE_COLOR: "0", + }; + + // Spawn the command in the correct working directory and with the correct + // environment variables + // https://nodejs.org/api/child_process.html#child_processspawncommand-args-options + const shell = isWin ? "cmd.exe" : "/bin/sh"; + // https://nodejs.org/api/child_process.html#shell-requirements + const shellArgs = isWin ? ["/d", "/s", "/c"] : ["-c"]; + const commandStr = command.join(" "); + process.stdout.write(`\n---> Running "${commandStr}"...\n`); + const child = pty.spawn(shell, [...shellArgs, commandStr], { + name: "xterm-color", + cols: 100, + rows: 30, + cwd, + env, + }); + + // Construct line-by-line stream for reading output. All output is written to + // the terminal for debugging too. + const { readable, writable } = new LineSplittingStream(); + const writer = writable.getWriter(); + const onDataSubscription = child.onData((chunk) => { + process.stdout.write(chunk); + void writer.write(chunk); + }); + + // Construct a promise that resolves with the exit code, also close the duplex + // stream when the process terminates + const exitPromise = new Promise((resolve) => { + child.onExit(({ exitCode }) => { + onDataSubscription.dispose(); + void writer.close(); + result.exitCode = exitCode; + resolve(exitCode); + }); + }); + + const result: E2EProcess = { + process: child, + lines: readable, + exitPromise, + kill(signal: NodeJS.Signals = "SIGINT") { + // `child.kill()` throws when a signal is passed on Windows + child.kill(isWin ? undefined : signal); + return exitPromise; + }, + }; + spawnedProcesses.add(result); + return result; +} +// Make sure all processes started by this test are killed +export function cleanupSpawnedProcesses() { + for (const proc of spawnedProcesses) { + // If this process hasn't already exited, kill it. + // (`void`ing `Promise` as we don't care about the exit code, nor the fact + // that the process actually exits here, this is just best-effort cleanup) + if (proc.exitCode === undefined) void proc.kill("SIGKILL"); + } + spawnedProcesses.clear(); +} + +type RegExpMatchGroupsArray = Omit & { + groups: Groups; +}; +// Keeps reading lines until the passed regular expression matches. If no lines +// match and the interface is closed, throws an error. +export async function readUntil< + Groups extends Record = Record +>( + lines: ReadableStream, + regExp: RegExp +): Promise> { + const iterator = lines[Symbol.asyncIterator]({ preventCancel: true }); + for await (const line of iterator) { + const match = line.match(regExp); + if (match !== null) { + return match as unknown as RegExpMatchGroupsArray; + } + } + throw new Error(`Exhausted lines trying to match ${regExp}`); +} + +// Global setup function, called by Jest once before running E2E tests +export default function (): void { + // Installs a copy of `wrangler` (as a user would) to a temporary directory. + + // 1. Generate a temporary directory to install to + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "wrangler-e2e-")); + fs.mkdirSync(tmp, { recursive: true }); + fs.writeFileSync(E2E_TMP_PATH, tmp); + + // 2. Package up our current version of `wrangler` into a tarball + console.log("\n---> Packaging wrangler..."); + const root = path.resolve(__dirname, ".."); + const packResult = childProcess.spawnSync( + "npm", + ["pack", "--workspace", "packages/wrangler", "--pack-destination", tmp], + { shell: true, cwd: root } + ); + assert.strictEqual(packResult.status, 0, packResult.stderr.toString()); + const packName = packResult.stdout.toString().trim(); + + // 3. Install that tarball into the temporary directory + console.log(`---> Installing wrangler in ${tmp}...`); + const installResult = childProcess.spawnSync( + "npm", + ["install", `wrangler@${packName}`], + { shell: true, cwd: tmp, stdio: "inherit" } + ); + assert.strictEqual(installResult.status, 0); +} diff --git a/e2e/teardown.ts b/e2e/teardown.ts new file mode 100644 index 000000000000..32454f3c0262 --- /dev/null +++ b/e2e/teardown.ts @@ -0,0 +1,11 @@ +import fs from "node:fs"; +import { E2E_TMP_PATH, getRootTmp } from "./setup"; + +// Global teardown function, called by Jest once after running E2E tests +export default function (): void { + // Delete temporary directory containing wrangler installation and scripts + const tmp = getRootTmp(); + console.log(`---> Deleting ${tmp}...`); + fs.rmSync(E2E_TMP_PATH); + fs.rmSync(tmp, { recursive: true, force: true }); +} diff --git a/e2e/tests/dev.spec.ts b/e2e/tests/dev.spec.ts new file mode 100644 index 000000000000..6a74e5cfc930 --- /dev/null +++ b/e2e/tests/dev.spec.ts @@ -0,0 +1,97 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import { fetch } from "undici"; +import { + cleanupSpawnedProcesses, + dedent, + getTmp, + readUntil, + seed, + spawn, + isWin, +} from "../setup"; + +// `--experimental-local` tests will need to `npx-import` `@miniflare/tre`. +// This might take a while, as we install `better-sqlite3`. +jest.setTimeout(60_000); + +afterAll(cleanupSpawnedProcesses); + +type ReadyMatchGroups = { port: string }; + +const devTable: [command: string, readyRegExp: RegExp][] = [ + // TODO(soon): ["wrangler dev", ...], + ["wrangler dev --local", /\[mf:inf] Listening on .*:(?\d+)/], +]; +if (!isWin) { + // `--experimental-local` currently requires either Docker or WSL to run on + // Windows. These are difficult to get running in GitHub actions, and WSL 2's + // networking for local services is exceptionally flaky. For now, we disable + // `--experimental-local` E2E tests on Windows, but we'll re-enable these ASAP + // once we have a native build. + devTable.push([ + "wrangler dev --experimental-local", + /\[mf:inf] (Updated and )?[Rr]eady on .*:(?\d+)/, + ]); +} +describe.each(devTable)("%s", (commandStr, readyRegExp) => { + const command = commandStr.split(" "); + + const formats = ["service-worker", "modules"] as const; + test.each(formats)("%s", async (format) => { + const cwd = getTmp(); + const files = { + "wrangler.toml": dedent` + compatibility_date = "2022-12-07" + [vars] + VAR = "thing" + `, + "src/value.ts": dedent` + export const value: number = 1; + `, + "src/index.ts": + format === "service-worker" + ? dedent` + import { value } from "./value.ts"; + addEventListener("fetch", (event) => { + event.respondWith(Response.json({ value, VAR })); + }); + ` + : dedent` + import { value } from "./value.ts"; + export default >{ + fetch(request, env, ctx) { + return Response.json({ value, VAR: env.VAR }); + } + } + `, + }; + await seed(cwd, files); + const wrangler = await spawn(cwd, [...command, "src/index.ts", "--port=0"]); + + // Send HTTP request to dev server + let match = await readUntil(wrangler.lines, readyRegExp); + let res = await fetch(`http://127.0.0.1:${match.groups.port}`); + expect(await res.json()).toStrictEqual({ value: 1, VAR: "thing" }); + + // Update script, and check dev server reloaded + const newValue = files["src/value.ts"].replace("= 1", "= 2"); + await fs.writeFile(path.resolve(cwd, "src/value.ts"), newValue); + // TODO(fix): reuse port=0 port with --local too, maybe switch to Miniflare#setOptions() in Miniflare 2 too? + match = await readUntil(wrangler.lines, readyRegExp); + res = await fetch(`http://127.0.0.1:${match.groups.port}`); + expect(await res.json()).toStrictEqual({ value: 2, VAR: "thing" }); + + // Check graceful shutdown with `x` hotkey + wrangler.process.write("x"); + const code = await wrangler.exitPromise; + expect(code).toBe(0); + }); +}); + +// TODO(soon): local mode switcher +// TODO(soon): graceful shutdown with CTRL-C +// TODO(soon): multi-worker +// TODO(soon): publish + +export {}; diff --git a/e2e/tests/setup.spec.ts b/e2e/tests/setup.spec.ts new file mode 100644 index 000000000000..79af33399a8a --- /dev/null +++ b/e2e/tests/setup.spec.ts @@ -0,0 +1,95 @@ +import { dedent, LineSplittingStream } from "../setup"; + +describe("dedent", () => { + test("empty string", () => { + expect(dedent``).toBe(""); + }); + test("tab-indented block", () => { + expect(dedent` +\t\t\tindented block +\t\t\t\twith content +\t\t\tover multiple lines +\t\t`).toBe("indented block\n\twith content\nover multiple lines"); + }); + test("space-indented block", () => { + expect(dedent` + indented block + with content + over multiple lines + `).toBe("indented block\n with content\nover multiple lines"); + }); + test("mixed-indented block", () => { + expect(dedent` +\t indented block +\t \twith content +\t over multiple lines +\t `).toBe("indented block\n\twith content\nover multiple lines"); + }); + test("no indents on first line", () => { + expect(dedent`indented block +\t\twith content +\tover multiple lines +\t`).toBe("indented block\n\twith content\nover multiple lines"); + }); + test("no trailing newline", () => { + expect(dedent` +\tindented block +\t\twith content +\tover multiple lines`).toBe( + "indented block\n\twith content\nover multiple lines" + ); + }); +}); + +test("LineSplittingStream", async () => { + let { readable, writable } = new LineSplittingStream(); + let reader = readable.getReader(); + let writer = writable.getWriter(); + + // Check buffers chunks until LF + void writer.write("a"); + void writer.write("b"); + void writer.write("c\n"); + let result = await reader.read(); + expect(result).toEqual({ done: false, value: "abc" }); + + // Check buffers chunks until CRLF + void writer.write("d"); + void writer.write("e"); + void writer.write("f\r\n"); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "def" }); + + // Checks returns lines in correct order with multiple (CF)LFs, + // trimming and skipping empty lines + void writer.write("ghi\n j\r\nk \r\n\n\nlmnop\n\r\n qr \r\n"); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "ghi" }); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "j" }); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "k" }); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "lmnop" }); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "qr" }); + + // Check flushes and trims buffer when closing + void writer.write(" st "); // (note no trailing newline) + void writer.close(); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "st" }); + result = await reader.read(); + expect(result).toEqual({ done: true, value: undefined }); + + // Check skips empty lines when closing + ({ readable, writable } = new LineSplittingStream()); + reader = readable.getReader(); + writer = writable.getWriter(); + void writer.write("uvw\n "); // (note no trailing newline) + void writer.close(); + result = await reader.read(); + expect(result).toEqual({ done: false, value: "uvw" }); + result = await reader.read(); + expect(result).toEqual({ done: true, value: undefined }); +}); diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json new file mode 100644 index 000000000000..08fa97d1ce8d --- /dev/null +++ b/e2e/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "moduleResolution": "node", + "types": ["node", "jest"] + }, + "include": ["**/*.ts", "**/*.mjs"] +} diff --git a/package-lock.json b/package-lock.json index 85a4c2411fda..48b0af3b84f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT OR Apache-2.0", "workspaces": [ + "e2e", "packages/*", "fixtures/*" ], @@ -80,6 +81,13 @@ "node": ">=16.13" } }, + "e2e": { + "name": "@cloudflare/wrangler-e2e", + "devDependencies": { + "node-gyp": "^9.3.0", + "node-pty": "^0.11.0-beta26" + } + }, "fixtures/external-durable-objects-app": { "devDependencies": { "@cloudflare/workers-types": "^4.20221111.1" @@ -2606,6 +2614,10 @@ "resolved": "packages/wrangler-devtools", "link": true }, + "node_modules/@cloudflare/wrangler-e2e": { + "resolved": "e2e", + "link": true + }, "node_modules/@cnakazawa/watch": { "version": "1.0.4", "license": "Apache-2.0", @@ -4814,9 +4826,9 @@ } }, "node_modules/@miniflare/tre": { - "version": "3.0.0-next.8", - "resolved": "https://registry.npmjs.org/@miniflare/tre/-/tre-3.0.0-next.8.tgz", - "integrity": "sha512-ISrxERQTTanh8Sp1yuJCN0k+nFmuu1sOweCpCfSLDQ3Te4yJdrr1fp+OFuKbgzLn5eXK2NjxcQxP/J1eJfBIOQ==", + "version": "3.0.0-next.10", + "resolved": "https://registry.npmjs.org/@miniflare/tre/-/tre-3.0.0-next.10.tgz", + "integrity": "sha512-zwuUzucjlYThqZd8jCBhZP6OvKHWLrpuhAhUsgVUcWutQ6VKPwzzgIArCgErmqaydLehWKCyyMqKRa2cwJ4Evw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -4828,9 +4840,9 @@ "glob-to-regexp": "^0.4.1", "http-cache-semantics": "^4.1.0", "kleur": "^4.1.5", - "source-map": "^0.7.4", + "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.12.0", + "undici": "^5.13.0", "workerd": "^1.20221111.5", "ws": "^8.11.0", "youch": "^3.2.2", @@ -4862,9 +4874,9 @@ } }, "node_modules/@miniflare/tre/node_modules/undici": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.12.0.tgz", - "integrity": "sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.14.0.tgz", + "integrity": "sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==", "dev": true, "dependencies": { "busboy": "^1.6.0" @@ -6998,6 +7010,12 @@ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "devOptional": true }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "dev": true, @@ -7079,6 +7097,29 @@ "node": ">= 6.0.0" } }, + "node_modules/agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/agentkeepalive/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -7207,6 +7248,33 @@ ], "license": "MIT" }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -8925,6 +8993,15 @@ "version": "1.1.3", "license": "MIT" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, "node_modules/colors": { "version": "1.2.5", "dev": true, @@ -9100,6 +9177,12 @@ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, "node_modules/constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -9711,6 +9794,12 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "node_modules/denque": { "version": "1.5.1", "license": "Apache-2.0", @@ -9972,6 +10061,27 @@ "node": ">= 0.8" } }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "license": "MIT", @@ -10016,6 +10126,21 @@ "node": ">=8.6" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, "node_modules/errno": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", @@ -12932,6 +13057,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "license": "MIT", @@ -13327,6 +13471,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "node_modules/has-value": { "version": "1.0.0", "license": "MIT", @@ -13660,6 +13810,15 @@ "node": ">=12.20.0" } }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "dependencies": { + "ms": "^2.0.0" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "license": "MIT", @@ -14543,6 +14702,12 @@ "node": ">=8" } }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -19531,6 +19696,238 @@ "semver": "bin/semver.js" } }, + "node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/make-fetch-happen/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-fetch-happen/node_modules/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/make-fetch-happen/node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/makeerror": { "version": "1.0.12", "license": "BSD-3-Clause", @@ -20676,6 +21073,23 @@ "node": ">= 8" } }, + "node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dev": true, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, "node_modules/minipass-flush": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", @@ -20700,6 +21114,18 @@ "node": ">=8" } }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", @@ -21003,8 +21429,7 @@ "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true, - "optional": true + "dev": true }, "node_modules/nanoid": { "version": "3.3.4", @@ -21170,6 +21595,45 @@ "node": ">= 6.13.0" } }, + "node_modules/node-gyp": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-int64": { "version": "0.4.0", "license": "MIT" @@ -21237,11 +21701,36 @@ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, + "node_modules/node-pty": { + "version": "0.11.0-beta9", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.11.0-beta9.tgz", + "integrity": "sha512-bU/2zYV6xBMVMHaMe+yr4WEw36PCA0hyZ7A0IBQFWy5l1vjsD52sZ9sGJk+dH7bw3xpuBLHMh9Eq4Di8rJz4IQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "nan": "^2.14.0" + } + }, "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, + "node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/normalize-package-data": { "version": "2.5.0", "license": "BSD-2-Clause", @@ -21365,6 +21854,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/npx-import": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/npx-import/-/npx-import-1.1.4.tgz", @@ -22755,6 +23259,19 @@ "dev": true, "license": "MIT" }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prompts": { "version": "2.4.2", "license": "MIT", @@ -23729,6 +24246,15 @@ "node": ">=0.12" } }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/reusify": { "version": "1.0.4", "license": "MIT", @@ -27868,6 +28394,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/widest-line": { "version": "3.1.0", "dev": true, @@ -28335,7 +28870,7 @@ "@cloudflare/workers-types": "^4.20221111.1", "@iarna/toml": "^3.0.0", "@microsoft/api-extractor": "^7.28.3", - "@miniflare/tre": "^3.0.0-next.8", + "@miniflare/tre": "^3.0.0-next.10", "@types/better-sqlite3": "^7.6.0", "@types/busboy": "^1.5.0", "@types/command-exists": "^1.2.0", @@ -31345,6 +31880,13 @@ "execa": "^6.1.0" } }, + "@cloudflare/wrangler-e2e": { + "version": "file:e2e", + "requires": { + "node-gyp": "^9.3.0", + "node-pty": "^0.11.0-beta26" + } + }, "@cnakazawa/watch": { "version": "1.0.4", "requires": { @@ -32748,9 +33290,9 @@ } }, "@miniflare/tre": { - "version": "3.0.0-next.8", - "resolved": "https://registry.npmjs.org/@miniflare/tre/-/tre-3.0.0-next.8.tgz", - "integrity": "sha512-ISrxERQTTanh8Sp1yuJCN0k+nFmuu1sOweCpCfSLDQ3Te4yJdrr1fp+OFuKbgzLn5eXK2NjxcQxP/J1eJfBIOQ==", + "version": "3.0.0-next.10", + "resolved": "https://registry.npmjs.org/@miniflare/tre/-/tre-3.0.0-next.10.tgz", + "integrity": "sha512-zwuUzucjlYThqZd8jCBhZP6OvKHWLrpuhAhUsgVUcWutQ6VKPwzzgIArCgErmqaydLehWKCyyMqKRa2cwJ4Evw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -32762,9 +33304,9 @@ "glob-to-regexp": "^0.4.1", "http-cache-semantics": "^4.1.0", "kleur": "^4.1.5", - "source-map": "^0.7.4", + "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.12.0", + "undici": "^5.13.0", "workerd": "^1.20221111.5", "ws": "^8.11.0", "youch": "^3.2.2", @@ -32784,9 +33326,9 @@ "dev": true }, "undici": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.12.0.tgz", - "integrity": "sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.14.0.tgz", + "integrity": "sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==", "dev": true, "requires": { "busboy": "^1.6.0" @@ -34470,6 +35012,12 @@ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "devOptional": true }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "accepts": { "version": "1.3.8", "dev": true, @@ -34525,6 +35073,25 @@ "debug": "4" } }, + "agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true + } + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -34598,6 +35165,29 @@ "version": "2.2.0", "dev": true }, + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -35786,6 +36376,12 @@ "color-name": { "version": "1.1.3" }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, "colors": { "version": "1.2.5", "dev": true @@ -35906,6 +36502,12 @@ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -36345,6 +36947,12 @@ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "devOptional": true }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "denque": { "version": "1.5.1" }, @@ -36536,6 +37144,26 @@ "version": "1.0.2", "dev": true }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "end-of-stream": { "version": "1.4.4", "requires": { @@ -36571,6 +37199,18 @@ "ansi-colors": "^4.1.1" } }, + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true + }, + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, "errno": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", @@ -38424,6 +39064,22 @@ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dev": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, "gensync": { "version": "1.0.0-beta.2" }, @@ -38680,6 +39336,12 @@ "has-symbols": "^1.0.2" } }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "has-value": { "version": "1.0.0", "requires": { @@ -38930,6 +39592,15 @@ "human-signals": { "version": "3.0.1" }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, "iconv-lite": { "version": "0.4.24", "requires": { @@ -39467,6 +40138,12 @@ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, + "is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, "is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -42896,6 +43573,190 @@ } } }, + "make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true + }, + "minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, "makeerror": { "version": "1.0.12", "requires": { @@ -43624,6 +44485,18 @@ "minipass": "^3.0.0" } }, + "minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dev": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, "minipass-flush": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", @@ -43642,6 +44515,15 @@ "minipass": "^3.0.0" } }, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, "minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", @@ -43863,8 +44745,7 @@ "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true, - "optional": true + "dev": true }, "nanoid": { "version": "3.3.4", @@ -43997,6 +44878,35 @@ "node-forge": { "version": "1.3.0" }, + "node-gyp": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", + "dev": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "node-int64": { "version": "0.4.0" }, @@ -44065,11 +44975,29 @@ } } }, + "node-pty": { + "version": "0.11.0-beta9", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.11.0-beta9.tgz", + "integrity": "sha512-bU/2zYV6xBMVMHaMe+yr4WEw36PCA0hyZ7A0IBQFWy5l1vjsD52sZ9sGJk+dH7bw3xpuBLHMh9Eq4Di8rJz4IQ==", + "dev": true, + "requires": { + "nan": "^2.14.0" + } + }, "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, + "nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "requires": { + "abbrev": "^1.0.0" + } + }, "normalize-package-data": { "version": "2.5.0", "requires": { @@ -44143,6 +45071,18 @@ } } }, + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } + }, "npx-import": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/npx-import/-/npx-import-1.1.4.tgz", @@ -45123,6 +46063,16 @@ "version": "8.2.1", "dev": true }, + "promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, "prompts": { "version": "2.4.2", "requires": { @@ -45888,6 +46838,12 @@ "ret": { "version": "0.1.15" }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true + }, "reusify": { "version": "1.0.4" }, @@ -48896,6 +49852,15 @@ "is-typed-array": "^1.1.10" } }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "widest-line": { "version": "3.1.0", "dev": true, @@ -48946,7 +49911,7 @@ "@miniflare/core": "2.11.0", "@miniflare/d1": "2.11.0", "@miniflare/durable-objects": "2.11.0", - "@miniflare/tre": "^3.0.0-next.8", + "@miniflare/tre": "^3.0.0-next.10", "@types/better-sqlite3": "^7.6.0", "@types/busboy": "^1.5.0", "@types/command-exists": "^1.2.0", diff --git a/package.json b/package.json index 8260cdcf1f30..15bbc4243929 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "license": "MIT OR Apache-2.0", "author": "wrangler@cloudflare.com", "workspaces": [ + "e2e", "packages/*", "fixtures/*" ], diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index 8c63847fc621..1424a6b89715 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -118,7 +118,7 @@ "@cloudflare/workers-types": "^4.20221111.1", "@iarna/toml": "^3.0.0", "@microsoft/api-extractor": "^7.28.3", - "@miniflare/tre": "^3.0.0-next.8", + "@miniflare/tre": "^3.0.0-next.10", "@types/better-sqlite3": "^7.6.0", "@types/busboy": "^1.5.0", "@types/command-exists": "^1.2.0", diff --git a/packages/wrangler/src/dev/local.tsx b/packages/wrangler/src/dev/local.tsx index e9916b519c38..976f58c74074 100644 --- a/packages/wrangler/src/dev/local.tsx +++ b/packages/wrangler/src/dev/local.tsx @@ -47,7 +47,6 @@ import type { } from "@miniflare/tre"; import type { MiniflareOptions } from "miniflare"; import type { ChildProcess } from "node:child_process"; -import type { RequestInit } from "undici"; export interface LocalProps { name: string | undefined; @@ -826,14 +825,15 @@ export async function transformMf2OptionsToMf3Options({ // Build authenticated Cloudflare API fetch function if required let cloudflareFetch: CloudflareFetch | undefined; if (kvRemote && authenticatedAccountId !== undefined) { + const { Response } = await getMiniflare3(); const preferredAccountId = authenticatedAccountId === true ? undefined : authenticatedAccountId; const accountId = await requireAuth({ account_id: preferredAccountId }); - cloudflareFetch = (resource, searchParams, init) => { + cloudflareFetch = async (resource, searchParams, init) => { resource = `/accounts/${accountId}/${resource}`; - // Miniflare and Wrangler's `undici` versions may be slightly different, - // but their `RequestInit` types *should* be compatible - return performApiFetch(resource, init as RequestInit, searchParams); + const res = await performApiFetch(resource, init, searchParams); + // Convert `undici`'s `Response` to `@miniflare/tre`'s + return new Response(res.body, res); }; } @@ -928,5 +928,5 @@ export async function getMiniflare3(): Promise< // eslint-disable-next-line @typescript-eslint/consistent-type-imports typeof import("@miniflare/tre") > { - return (miniflare3Module ??= await npxImport("@miniflare/tre@3.0.0-next.8")); + return (miniflare3Module ??= await npxImport("@miniflare/tre@3.0.0-next.10")); } diff --git a/packages/wrangler/src/miniflare-cli/assets.ts b/packages/wrangler/src/miniflare-cli/assets.ts index 65ef55461950..b09cb20a20f6 100644 --- a/packages/wrangler/src/miniflare-cli/assets.ts +++ b/packages/wrangler/src/miniflare-cli/assets.ts @@ -53,6 +53,9 @@ export default async function generateASSETSBinding(options: Options) { try { const url = new URL(miniflareRequest.url); url.host = `localhost:${options.proxyPort}`; + // @ts-expect-error due to a bug in `@cloudflare/workers-types`, the + // `cf` types from the `request` parameter and `RequestInit` are + // incompatible. We'll get this fixed very soon. (wrangler2#2390) const proxyRequest = new Request(url, miniflareRequest); if (proxyRequest.headers.get("Upgrade") === "websocket") { proxyRequest.headers.delete("Sec-WebSocket-Accept"); @@ -238,6 +241,9 @@ async function generateAssetsFetch( }; return (async (input: TreRequestInfo, init?: TreRequestInit) => { + // @ts-expect-error due to a bug in `@cloudflare/workers-types`, the `cf` + // types from the `request` parameter and `RequestInit` are incompatible. + // We'll get this fixed very soon. (wrangler2#2390) const request = new Request(input, init); return await generateResponse(request as unknown as Request); }) as typeof fetch;