diff --git a/.prettierignore b/.prettierignore index 7212e974..f115e8fa 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,5 @@ .wrangler pnpm-lock.yaml .vscode/setting.json +test-fixtures +test-snapshots diff --git a/TODO.md b/TODO.md index 7b07b521..3d05401d 100644 --- a/TODO.md +++ b/TODO.md @@ -15,27 +15,13 @@ DONE: - `npx create-next-app@latest --use-npm` (use npm to avoid symlinks) -- update next.config.mjs as follows - - ```typescript - /** @type {import('next').NextConfig} */ - const nextConfig = { - output: "standalone", - experimental: { - serverMinification: false, - }, - }; - - export default nextConfig; - ``` - - add the following devDependency to the package.json: ```json "wrangler": "^3.78.6" ``` -- add a wrangler.toml int the generated app +- add a wrangler.toml into the generated app ```toml #:schema node_modules/wrangler/config-schema.json diff --git a/builder/README.md b/builder/README.md index 44edd76c..a2a2c8f9 100644 --- a/builder/README.md +++ b/builder/README.md @@ -2,20 +2,6 @@ ## Build your app -- update the `next.config.mjs` as follows - - ```typescript - /** @type {import('next').NextConfig} */ - const nextConfig = { - output: "standalone", - experimental: { - serverMinification: false, - }, - }; - - export default nextConfig; - ``` - - add the following `devDependency` to the `package.json`: ```json diff --git a/builder/package.json b/builder/package.json index bdf7fb06..42c7bf40 100644 --- a/builder/package.json +++ b/builder/package.json @@ -4,7 +4,9 @@ "version": "0.0.1", "scripts": { "build": "tsup", - "build:watch": "tsup --watch src" + "build:watch": "tsup --watch src", + "test": "vitest --run", + "test:watch": "vitest" }, "bin": "dist/index.mjs", "files": [ @@ -27,12 +29,14 @@ }, "homepage": "https://github.com/flarelabs-net/poc-next", "devDependencies": { - "@cloudflare/workers-types": "^4.20240909.0", - "@types/node": "^22.2.0", - "esbuild": "^0.23.0", - "glob": "^11.0.0", - "next": "14.2.5", - "tsup": "^8.2.4", - "typescript": "^5.5.4" + "@types/node": "catalog:", + "esbuild": "catalog:", + "glob": "catalog:", + "tsup": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:" + }, + "dependencies": { + "ts-morph": "catalog:" } } diff --git a/builder/src/build/build-worker.ts b/builder/src/build/build-worker.ts index 2b607802..94165d41 100644 --- a/builder/src/build/build-worker.ts +++ b/builder/src/build/build-worker.ts @@ -1,6 +1,6 @@ import { NextjsAppPaths } from "../nextjs-paths"; import { build, Plugin } from "esbuild"; -import { readdirSync, readFileSync, writeFileSync } from "node:fs"; +import { readFileSync } from "node:fs"; import { cp, readFile, writeFile } from "node:fs/promises"; import { patchRequire } from "./patches/investigated/patch-require"; @@ -11,6 +11,7 @@ import { patchFindDir } from "./patches/to-investigate/patch-find-dir"; import { inlineNextRequire } from "./patches/to-investigate/inline-next-require"; import { inlineEvalManifest } from "./patches/to-investigate/inline-eval-manifest"; import { patchWranglerDeps } from "./patches/to-investigate/wrangler-deps"; +import { updateWebpackChunksFile } from "./patches/investigated/update-webpack-chunks-file"; /** * Using the Next.js build output in the `.next` directory builds a workerd compatible output @@ -155,49 +156,6 @@ async function updateWorkerBundledCode( await writeFile(workerOutputFile, patchedCode); } -/** - * Fixes the webpack-runtime.js file by removing its webpack dynamic requires. - * - * This hack is especially bad for two reasons: - * - it requires setting `experimental.serverMinification` to `false` in the app's config file - * - indicates that files inside the output directory still get a hold of files from the outside: `${nextjsAppPaths.standaloneAppServerDir}/webpack-runtime.js` - * so this shows that not everything that's needed to deploy the application is in the output directory... - */ -async function updateWebpackChunksFile(nextjsAppPaths: NextjsAppPaths) { - console.log("# updateWebpackChunksFile"); - const webpackRuntimeFile = `${nextjsAppPaths.standaloneAppServerDir}/webpack-runtime.js`; - - console.log({ webpackRuntimeFile }); - - const fileContent = readFileSync(webpackRuntimeFile, "utf-8"); - - const chunks = readdirSync(`${nextjsAppPaths.standaloneAppServerDir}/chunks`) - .filter((chunk) => /^\d+\.js$/.test(chunk)) - .map((chunk) => { - console.log(` - chunk ${chunk}`); - return chunk.replace(/\.js$/, ""); - }); - - const updatedFileContent = fileContent.replace( - "__webpack_require__.f.require = (chunkId, promises) => {", - `__webpack_require__.f.require = (chunkId, promises) => { - if (installedChunks[chunkId]) return; - ${chunks - .map( - (chunk) => ` - if (chunkId === ${chunk}) { - installChunk(require("./chunks/${chunk}.js")); - return; - } - ` - ) - .join("\n")} - ` - ); - - writeFileSync(webpackRuntimeFile, updatedFileContent); -} - function createFixRequiresESBuildPlugin(templateDir: string): Plugin { return { name: "replaceRelative", diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts new file mode 100644 index 00000000..bac3d6e8 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts @@ -0,0 +1,30 @@ +import { readFile } from "node:fs/promises"; + +import { expect, test, describe } from "vitest"; + +import { getChunkInstallationIdentifiers } from "./get-chunk-installation-identifiers"; +import { tsParseFile } from "../../../utils"; + +describe("getChunkInstallationIdentifiers", () => { + test("gets chunk identifiers from unminified code", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`, + "utf8" + ); + const tsSourceFile = tsParseFile(fileContent); + const { installChunk, installedChunks } = await getChunkInstallationIdentifiers(tsSourceFile); + expect(installChunk).toEqual("installChunk"); + expect(installedChunks).toEqual("installedChunks"); + }); + + test("gets chunk identifiers from minified code", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`, + "utf8" + ); + const tsSourceFile = tsParseFile(fileContent); + const { installChunk, installedChunks } = await getChunkInstallationIdentifiers(tsSourceFile); + expect(installChunk).toEqual("r"); + expect(installedChunks).toEqual("e"); + }); +}); diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.ts new file mode 100644 index 00000000..f82655e3 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.ts @@ -0,0 +1,102 @@ +import * as ts from "ts-morph"; + +/** + * Gets the names of the variables that in the unminified webpack runtime file are called `installedChunks` and `installChunk`. + * + * Variables example: https://github.com/webpack/webpack/blob/dae16ad11e/examples/module-worker/README.md?plain=1#L256-L282 + * + * @param sourceFile the webpack runtime file parsed with ts-morph + * @returns an object containing the two variable names + */ +export async function getChunkInstallationIdentifiers(sourceFile: ts.SourceFile): Promise<{ + installedChunks: string; + installChunk: string; +}> { + const installChunkDeclaration = getInstallChunkDeclaration(sourceFile); + const installedChunksDeclaration = getInstalledChunksDeclaration(sourceFile, installChunkDeclaration); + + return { + installChunk: installChunkDeclaration.getName(), + installedChunks: installedChunksDeclaration.getName(), + }; +} + +/** + * Gets the declaration for what in the unminified webpack runtime file is called `installChunk`(which is a function that registers the various chunks. + * + * `installChunk` example: https://github.com/webpack/webpack/blob/dae16ad11e/examples/module-worker/README.md?plain=1#L263-L282 + * + * @param sourceFile the webpack runtime file parsed with ts-morph + * @returns the `installChunk` declaration + */ +function getInstallChunkDeclaration(sourceFile: ts.SourceFile): ts.VariableDeclaration { + const installChunkDeclaration = sourceFile + .getDescendantsOfKind(ts.SyntaxKind.VariableDeclaration) + .find((declaration) => { + const arrowFunction = declaration.getInitializerIfKind(ts.SyntaxKind.ArrowFunction); + // we're looking for an arrow function + if (!arrowFunction) return false; + + const functionParameters = arrowFunction.getParameters(); + // the arrow function we're looking for has a single parameter (the chunkId) + if (functionParameters.length !== 1) return false; + + const arrowFunctionBodyBlock = arrowFunction.getFirstChildByKind(ts.SyntaxKind.Block); + + // the arrow function we're looking for has a block body + if (!arrowFunctionBodyBlock) return false; + + const statementKinds = arrowFunctionBodyBlock.getStatements().map((statement) => statement.getKind()); + + // the function we're looking for has 2 for loops (a standard one and a for-in one) + const forInStatements = statementKinds.filter((s) => s === ts.SyntaxKind.ForInStatement); + const forStatements = statementKinds.filter((s) => s === ts.SyntaxKind.ForStatement); + if (forInStatements.length !== 1 || forStatements.length !== 1) return false; + + // the function we're looking for accesses its parameter three times, and it + // accesses its `modules`, `ids` and `runtime` properties (in this order) + const parameterName = functionParameters[0].getText(); + const functionParameterAccessedProperties = arrowFunctionBodyBlock + .getDescendantsOfKind(ts.SyntaxKind.PropertyAccessExpression) + .filter( + (propertyAccessExpression) => propertyAccessExpression.getExpression().getText() === parameterName + ) + .map((propertyAccessExpression) => propertyAccessExpression.getName()); + if (functionParameterAccessedProperties.join(", ") !== "modules, ids, runtime") return false; + + return true; + }); + + if (!installChunkDeclaration) { + throw new Error("ERROR: unable to find the installChunk function declaration"); + } + + return installChunkDeclaration; +} + +/** + * Gets the declaration for what in the unminified webpack runtime file is called `installedChunks` which is an object that holds the various registered chunks. + * + * `installedChunks` example: https://github.com/webpack/webpack/blob/dae16ad11e/examples/module-worker/README.md?plain=1#L256-L261 + * + * @param sourceFile the webpack runtime file parsed with ts-morph + * @param installChunkDeclaration the declaration for the `installChunk` variable + * @returns the `installedChunks` declaration + */ +function getInstalledChunksDeclaration( + sourceFile: ts.SourceFile, + installChunkDeclaration: ts.VariableDeclaration +): ts.VariableDeclaration { + const allVariableDeclarations = sourceFile.getDescendantsOfKind(ts.SyntaxKind.VariableDeclaration); + const installChunkDeclarationIdx = allVariableDeclarations.findIndex( + (declaration) => declaration === installChunkDeclaration + ); + + // the installedChunks declaration comes right before the installChunk one + const installedChunksDeclaration = allVariableDeclarations[installChunkDeclarationIdx - 1]; + + if (!installedChunksDeclaration?.getInitializer()?.isKind(ts.SyntaxKind.ObjectLiteralExpression)) { + throw new Error("ERROR: unable to find the installedChunks declaration"); + } + return installedChunksDeclaration; +} diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts new file mode 100644 index 00000000..1edecc38 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts @@ -0,0 +1,44 @@ +import { readFile } from "node:fs/promises"; + +import { expect, test, describe } from "vitest"; + +import { getFileContentWithUpdatedWebpackFRequireCode } from "./get-file-content-with-updated-webpack-f-require-code"; +import { tsParseFile } from "../../../utils"; + +describe("getFileContentWithUpdatedWebpackFRequireCode", () => { + test("returns the updated content of the f.require function from unminified webpack runtime code", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`, + "utf8" + ); + const tsSourceFile = tsParseFile(fileContent); + const updatedFCode = await getFileContentWithUpdatedWebpackFRequireCode( + tsSourceFile, + { installChunk: "installChunk", installedChunks: "installedChunks" }, + ["658"] + ); + expect(unstyleCode(updatedFCode)).toContain(`if (installedChunks[chunkId]) return;`); + expect(unstyleCode(updatedFCode)).toContain( + `if (chunkId === 658) return installChunk(require("./chunks/658.js"));` + ); + }); + + test("returns the updated content of the f.require function from minified webpack runtime code", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`, + "utf8" + ); + const tsSourceFile = tsParseFile(fileContent); + const updatedFCode = await getFileContentWithUpdatedWebpackFRequireCode( + tsSourceFile, + { installChunk: "r", installedChunks: "e" }, + ["658"] + ); + expect(unstyleCode(updatedFCode)).toContain("if (e[o]) return;"); + expect(unstyleCode(updatedFCode)).toContain(`if (o === 658) return r(require("./chunks/658.js"));`); + }); +}); + +function unstyleCode(text: string): string { + return text.replace(/\n\s+/g, "\n").replace(/\n/g, " "); +} diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.ts new file mode 100644 index 00000000..53a79300 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.ts @@ -0,0 +1,92 @@ +import * as ts from "ts-morph"; + +/** + * Updates the function that in the unminified webpack runtime file appears as `__webpack_require__.f.require` which is a function that + * installs chunks by importing/requiring them at runtime. + * + * `__webpack_require__.f.require` example: https://github.com/webpack/webpack/blob/dae16ad11e/examples/module-worker/README.md?plain=1#L284-L304 + * + * This function needs to be updated so that it requires chunks using the standard `require` function and not webpack's custom `require` logic + * which fails in the workerd runtime. + * + * @param sourceFile the webpack runtime file parsed with ts-morph (note: this gets side-effectfully updated) + * @param chunkInstallationIdentifiers the names of the `installedChunks` and `installChunk` variables + * @param chunks the identifiers of the chunks (found on the filesystem) + * @returns the content of the sourceFile but with the require function updated + */ +export async function getFileContentWithUpdatedWebpackFRequireCode( + sourceFile: ts.SourceFile, + { installedChunks, installChunk }: { installedChunks: string; installChunk: string }, + chunks: string[] +): Promise { + const webpackFRequireFunction = sourceFile + .getDescendantsOfKind(ts.SyntaxKind.ArrowFunction) + .find((arrowFunction) => { + // the function is declared assigned in a binary expression, so let's check the binary expression + // to get more confidence that we've got the right arrow function + const binaryExpression = arrowFunction.getFirstAncestorByKind(ts.SyntaxKind.BinaryExpression); + if (!binaryExpression) return false; + + // the variable being assigned always ends with .f.require (even in unminified files) + const binaryExpressionLeft = binaryExpression.getLeft(); + if (!binaryExpressionLeft.getText().endsWith(".f.require")) return false; + + // the binary expression is an assignment + const binaryExpressionOperator = binaryExpression.getOperatorToken(); + if (binaryExpressionOperator.getText() !== "=") return false; + + // the right side of the expression is our arrow function + const binaryExpressionRight = binaryExpression.getRight(); + if (binaryExpressionRight !== arrowFunction) return false; + + const arrowFunctionBody = arrowFunction.getBody(); + if (!arrowFunctionBody.isKind(ts.SyntaxKind.Block)) return false; + + const arrowFunctionBodyText = arrowFunctionBody.getText(); + + const functionUsesChunkInstallationVariables = + arrowFunctionBodyText.includes(installChunk) && arrowFunctionBodyText.includes(installedChunks); + if (!functionUsesChunkInstallationVariables) return false; + + const functionParameters = arrowFunction.getParameters(); + if (functionParameters.length !== 2) return false; + + const callsInstallChunk = arrowFunctionBody + .getDescendantsOfKind(ts.SyntaxKind.CallExpression) + .some((callExpression) => callExpression.getExpression().getText() === installChunk); + if (!callsInstallChunk) return false; + + const functionFirstParameterName = functionParameters[0]?.getName(); + const accessesInstalledChunksUsingItsFirstParameter = arrowFunctionBody + .getDescendantsOfKind(ts.SyntaxKind.ElementAccessExpression) + .some((elementAccess) => { + return ( + elementAccess.getExpression().getText() === installedChunks && + elementAccess.getArgumentExpression()?.getText() === functionFirstParameterName + ); + }); + if (!accessesInstalledChunksUsingItsFirstParameter) return false; + + return true; + }); + + if (!webpackFRequireFunction) { + throw new Error("ERROR: unable to find the webpack f require function declaration"); + } + + const functionParameterNames = webpackFRequireFunction + .getParameters() + .map((parameter) => parameter.getName()); + const chunkId = functionParameterNames[0]; + + const functionBody = webpackFRequireFunction.getBody() as ts.Block; + + functionBody.insertStatements(0, [ + `if (${installedChunks}[${chunkId}]) return;`, + ...chunks.map( + (chunk) => `\nif(${chunkId} === ${chunk}) return ${installChunk}(require("./chunks/${chunk}.js"));` + ), + ]); + + return sourceFile.print(); +} diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts new file mode 100644 index 00000000..a03db5bb --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts @@ -0,0 +1,25 @@ +import { readFile } from "node:fs/promises"; + +import { expect, test, describe } from "vitest"; + +import { getUpdatedWebpackChunksFileContent } from "./get-updated-webpack-chunks-file-content"; + +describe("getUpdatedWebpackChunksFileContent", () => { + test("returns the updated content of a webpack runtime chunks unminified file", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`, + "utf8" + ); + const updatedContent = await getUpdatedWebpackChunksFileContent(fileContent, ["658"]); + expect(updatedContent).toMatchFileSnapshot("./test-snapshots/unminified-webpacks-file.js"); + }); + + test("returns the updated content of a webpack runtime chunks minified file", async () => { + const fileContent = await readFile( + `${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`, + "utf8" + ); + const updatedContent = await getUpdatedWebpackChunksFileContent(fileContent, ["658"]); + expect(updatedContent).toMatchFileSnapshot("./test-snapshots/minified-webpacks-file.js"); + }); +}); diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.ts new file mode 100644 index 00000000..47b35520 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.ts @@ -0,0 +1,33 @@ +import { getChunkInstallationIdentifiers } from "./get-chunk-installation-identifiers"; +import { getFileContentWithUpdatedWebpackFRequireCode } from "./get-file-content-with-updated-webpack-f-require-code"; +import { tsParseFile } from "../../../utils"; + +/** + * Updates the content of the webpack runtime file in a manner so that it doesn't perform runtime dynamic `require` calls which fail in our runtime. + * + * It does so by appropriately updating a function that in the unminified webpack runtime file appears as `__webpack_require__.f.require` which is + * the one that normally would cause dynamic requires to happen at runtime. + * + * `__webpack_require__.f.require` example: https://github.com/webpack/webpack/blob/dae16ad11e/examples/module-worker/README.md?plain=1#L284-L304 + * + * + * @param fileContent the content of the webpack runtime file + * @param chunks the identifiers of the chunks (found on the filesystem) + * @returns the content of the webpack runtime file updated with our custom logic + */ +export async function getUpdatedWebpackChunksFileContent( + fileContent: string, + chunks: string[] +): Promise { + const tsSourceFile = tsParseFile(fileContent); + + const chunkInstallationIdentifiers = await getChunkInstallationIdentifiers(tsSourceFile); + + const updatedFileContent = getFileContentWithUpdatedWebpackFRequireCode( + tsSourceFile, + chunkInstallationIdentifiers, + chunks + ); + + return updatedFileContent; +} diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/index.ts b/builder/src/build/patches/investigated/update-webpack-chunks-file/index.ts new file mode 100644 index 00000000..b4e34a5d --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/index.ts @@ -0,0 +1,28 @@ +import { readdirSync, readFileSync, writeFileSync } from "node:fs"; + +import { NextjsAppPaths } from "../../../../nextjs-paths"; +import { getUpdatedWebpackChunksFileContent } from "./get-updated-webpack-chunks-file-content"; + +/** + * Fixes the webpack-runtime.js file by removing its webpack dynamic requires. + * + * This hack is particularly bad as it indicates that files inside the output directory still get a hold of files from the outside: `${nextjsAppPaths.standaloneAppServerDir}/webpack-runtime.js` + * so this shows that not everything that's needed to deploy the application is in the output directory... + */ +export async function updateWebpackChunksFile(nextjsAppPaths: NextjsAppPaths) { + console.log("# updateWebpackChunksFile"); + const webpackRuntimeFile = `${nextjsAppPaths.standaloneAppServerDir}/webpack-runtime.js`; + + const fileContent = readFileSync(webpackRuntimeFile, "utf-8"); + + const chunks = readdirSync(`${nextjsAppPaths.standaloneAppServerDir}/chunks`) + .filter((chunk) => /^\d+\.js$/.test(chunk)) + .map((chunk) => { + console.log(` - chunk ${chunk}`); + return chunk.replace(/\.js$/, ""); + }); + + const updatedFileContent = await getUpdatedWebpackChunksFileContent(fileContent, chunks); + + writeFileSync(webpackRuntimeFile, updatedFileContent); +} diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/minified-webpacks-file.js b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/minified-webpacks-file.js new file mode 100644 index 00000000..5bf9fe4c --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/minified-webpacks-file.js @@ -0,0 +1,89 @@ +(() => { + "use strict"; + var e = {}, + r = {}; + function t(o) { + var n = r[o]; + if (void 0 !== n) return n.exports; + var a = (r[o] = { exports: {} }), + u = !0; + try { + e[o](a, a.exports, t), (u = !1); + } finally { + u && delete r[o]; + } + return a.exports; + } + (t.m = e), + (t.n = (e) => { + var r = e && e.__esModule ? () => e.default : () => e; + return t.d(r, { a: r }), r; + }), + (() => { + var e, + r = Object.getPrototypeOf + ? (e) => Object.getPrototypeOf(e) + : (e) => e.__proto__; + t.t = function (o, n) { + if ( + (1 & n && (o = this(o)), + 8 & n || + ("object" == typeof o && + o && + ((4 & n && o.__esModule) || + (16 & n && "function" == typeof o.then)))) + ) + return o; + var a = Object.create(null); + t.r(a); + var u = {}; + e = e || [null, r({}), r([]), r(r)]; + for ( + var f = 2 & n && o; + "object" == typeof f && !~e.indexOf(f); + f = r(f) + ) + Object.getOwnPropertyNames(f).forEach((e) => (u[e] = () => o[e])); + return (u.default = () => o), t.d(a, u), a; + }; + })(), + (t.d = (e, r) => { + for (var o in r) + t.o(r, o) && + !t.o(e, o) && + Object.defineProperty(e, o, { enumerable: !0, get: r[o] }); + }), + (t.f = {}), + (t.e = (e) => + Promise.all(Object.keys(t.f).reduce((r, o) => (t.f[o](e, r), r), []))), + (t.u = (e) => "" + e + ".js"), + (t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)), + (t.r = (e) => { + "undefined" != typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), + Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (t.X = (e, r, o) => { + var n = r; + o || ((r = e), (o = () => t((t.s = n)))), r.map(t.e, t); + var a = o(); + return void 0 === a ? e : a; + }), + (() => { + var e = { 658: 1 }, + r = (r) => { + var o = r.modules, + n = r.ids, + a = r.runtime; + for (var u in o) t.o(o, u) && (t.m[u] = o[u]); + a && a(t); + for (var f = 0; f < n.length; f++) e[n[f]] = 1; + }; + (t.f.require = (o, n) => { + e[o] || (658 != o ? r(require("./chunks/" + t.u(o))) : (e[o] = 1)); + }), + (module.exports = t), + (t.C = r); + })(); +})(); diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/unminified-webpacks-file.js b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/unminified-webpacks-file.js new file mode 100644 index 00000000..b6697be1 --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-fixtures/unminified-webpacks-file.js @@ -0,0 +1,225 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; + /******/ + } + /******/ // Create a new module (and put it into the cache) + /******/ var module = __webpack_module_cache__[moduleId] = { + /******/ // no module.id needed + /******/ // no module.loaded needed + /******/ exports: {} + /******/ + }; + /******/ + /******/ // Execute the module function + /******/ var threw = true; + /******/ try { + /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); + /******/ threw = false; + /******/ + } finally { + /******/ if (threw) delete __webpack_module_cache__[moduleId]; + /******/ + } + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ + } + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ __webpack_require__.m = __webpack_modules__; + /******/ + /************************************************************************/ + /******/ /* webpack/runtime/compat get default export */ + /******/ (() => { + /******/ // getDefaultExport function for compatibility with non-harmony modules + /******/ __webpack_require__.n = (module) => { + /******/ var getter = module && module.__esModule ? + /******/ () => (module['default']) : + /******/ () => (module); + /******/ __webpack_require__.d(getter, { a: getter }); + /******/ return getter; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/create fake namespace object */ + /******/ (() => { + /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); + /******/ var leafPrototypes; + /******/ // create a fake namespace object + /******/ // mode & 1: value is a module id, require it + /******/ // mode & 2: merge all properties of value into the ns + /******/ // mode & 4: return value when already ns object + /******/ // mode & 16: return value when it's Promise-like + /******/ // mode & 8|1: behave like require + /******/ __webpack_require__.t = function (value, mode) { + /******/ if (mode & 1) value = this(value); + /******/ if (mode & 8) return value; + /******/ if (typeof value === 'object' && value) { + /******/ if ((mode & 4) && value.__esModule) return value; + /******/ if ((mode & 16) && typeof value.then === 'function') return value; + /******/ + } + /******/ var ns = Object.create(null); + /******/ __webpack_require__.r(ns); + /******/ var def = {}; + /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; + /******/ for (var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { + /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); + /******/ + } + /******/ def['default'] = () => (value); + /******/ __webpack_require__.d(ns, def); + /******/ return ns; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/define property getters */ + /******/ (() => { + /******/ // define getter functions for harmony exports + /******/ __webpack_require__.d = (exports, definition) => { + /******/ for (var key in definition) { + /******/ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); + /******/ + } + /******/ + } + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/ensure chunk */ + /******/ (() => { + /******/ __webpack_require__.f = {}; + /******/ // This file contains only the entry chunk. + /******/ // The chunk loading function for additional chunks + /******/ __webpack_require__.e = (chunkId) => { + /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { + /******/ __webpack_require__.f[key](chunkId, promises); + /******/ return promises; + /******/ + }, [])); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/get javascript chunk filename */ + /******/ (() => { + /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint + /******/ __webpack_require__.u = (chunkId) => { + /******/ // return url for filenames based on template + /******/ return "" + chunkId + ".js"; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/hasOwnProperty shorthand */ + /******/ (() => { + /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) + /******/ + })(); + /******/ + /******/ /* webpack/runtime/make namespace object */ + /******/ (() => { + /******/ // define __esModule on exports + /******/ __webpack_require__.r = (exports) => { + /******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); + /******/ + } + /******/ Object.defineProperty(exports, '__esModule', { value: true }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/startup entrypoint */ + /******/ (() => { + /******/ __webpack_require__.X = (result, chunkIds, fn) => { + /******/ // arguments: chunkIds, moduleId are deprecated + /******/ var moduleId = chunkIds; + /******/ if (!fn) chunkIds = result, fn = () => (__webpack_require__(__webpack_require__.s = moduleId)); + /******/ chunkIds.map(__webpack_require__.e, __webpack_require__) + /******/ var r = fn(); + /******/ return r === undefined ? result : r; + /******/ + } + /******/ + })(); + /******/ + /******/ /* webpack/runtime/require chunk loading */ + /******/ (() => { + /******/ // no baseURI + /******/ + /******/ // object to store loaded chunks + /******/ // "1" means "loaded", otherwise not loaded yet + /******/ var installedChunks = { + /******/ 658: 1 + /******/ + }; + /******/ + /******/ // no on chunks loaded + /******/ + /******/ var installChunk = (chunk) => { + /******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime; + /******/ for (var moduleId in moreModules) { + /******/ if (__webpack_require__.o(moreModules, moduleId)) { + /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; + /******/ + } + /******/ + } + /******/ if (runtime) runtime(__webpack_require__); + /******/ for (var i = 0; i < chunkIds.length; i++) + /******/ installedChunks[chunkIds[i]] = 1; + /******/ + /******/ + }; + /******/ + /******/ // require() chunk loading for javascript + /******/ __webpack_require__.f.require = (chunkId, promises) => { + /******/ // "1" is the signal for "already loaded" + /******/ if (!installedChunks[chunkId]) { + /******/ if (658 != chunkId) { + /******/ installChunk(require("./chunks/" + __webpack_require__.u(chunkId))); + /******/ + } else installedChunks[chunkId] = 1; + /******/ + } + /******/ + }; + /******/ + /******/ module.exports = __webpack_require__; + /******/ __webpack_require__.C = installChunk; + /******/ + /******/ // no HMR + /******/ + /******/ // no HMR manifest + /******/ + })(); + /******/ + /************************************************************************/ + /******/ + /******/ + /******/ +})() + ; \ No newline at end of file diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/minified-webpacks-file.js b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/minified-webpacks-file.js new file mode 100644 index 00000000..c632122b --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/minified-webpacks-file.js @@ -0,0 +1,84 @@ +(() => { + "use strict"; + var e = {}, r = {}; + function t(o) { + var n = r[o]; + if (void 0 !== n) + return n.exports; + var a = (r[o] = { exports: {} }), u = !0; + try { + e[o](a, a.exports, t), (u = !1); + } + finally { + u && delete r[o]; + } + return a.exports; + } + (t.m = e), + (t.n = (e) => { + var r = e && e.__esModule ? () => e.default : () => e; + return t.d(r, { a: r }), r; + }), + (() => { + var e, r = Object.getPrototypeOf + ? (e) => Object.getPrototypeOf(e) + : (e) => e.__proto__; + t.t = function (o, n) { + if ((1 & n && (o = this(o)), + 8 & n || + ("object" == typeof o && + o && + ((4 & n && o.__esModule) || + (16 & n && "function" == typeof o.then))))) + return o; + var a = Object.create(null); + t.r(a); + var u = {}; + e = e || [null, r({}), r([]), r(r)]; + for (var f = 2 & n && o; "object" == typeof f && !~e.indexOf(f); f = r(f)) + Object.getOwnPropertyNames(f).forEach((e) => (u[e] = () => o[e])); + return (u.default = () => o), t.d(a, u), a; + }; + })(), + (t.d = (e, r) => { + for (var o in r) + t.o(r, o) && + !t.o(e, o) && + Object.defineProperty(e, o, { enumerable: !0, get: r[o] }); + }), + (t.f = {}), + (t.e = (e) => Promise.all(Object.keys(t.f).reduce((r, o) => (t.f[o](e, r), r), []))), + (t.u = (e) => "" + e + ".js"), + (t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)), + (t.r = (e) => { + "undefined" != typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), + Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (t.X = (e, r, o) => { + var n = r; + o || ((r = e), (o = () => t((t.s = n)))), r.map(t.e, t); + var a = o(); + return void 0 === a ? e : a; + }), + (() => { + var e = { 658: 1 }, r = (r) => { + var o = r.modules, n = r.ids, a = r.runtime; + for (var u in o) + t.o(o, u) && (t.m[u] = o[u]); + a && a(t); + for (var f = 0; f < n.length; f++) + e[n[f]] = 1; + }; + (t.f.require = (o, n) => { + if (e[o]) + return; + if (o === 658) + return r(require("./chunks/658.js")); + e[o] || (658 != o ? r(require("./chunks/" + t.u(o))) : (e[o] = 1)); + }), + (module.exports = t), + (t.C = r); + })(); +})(); diff --git a/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/unminified-webpacks-file.js b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/unminified-webpacks-file.js new file mode 100644 index 00000000..11d5358c --- /dev/null +++ b/builder/src/build/patches/investigated/update-webpack-chunks-file/test-snapshots/unminified-webpacks-file.js @@ -0,0 +1,238 @@ +/******/ (() => { + /******/ "use strict"; + /******/ var __webpack_modules__ = ({}); + /************************************************************************/ + /******/ // The module cache + /******/ var __webpack_module_cache__ = {}; + /******/ + /******/ // The require function + /******/ function __webpack_require__(moduleId) { + /******/ // Check if module is in cache + /******/ var cachedModule = __webpack_module_cache__[moduleId]; + /******/ if (cachedModule !== undefined) { + /******/ return cachedModule.exports; + /******/ + } + /******/ // Create a new module (and put it into the cache) + /******/ var module = __webpack_module_cache__[moduleId] = { + /******/ // no module.id needed + /******/ // no module.loaded needed + /******/ exports: {} + /******/ + }; + /******/ + /******/ // Execute the module function + /******/ var threw = true; + /******/ try { + /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); + /******/ threw = false; + /******/ + } + finally { + /******/ if (threw) + delete __webpack_module_cache__[moduleId]; + /******/ + } + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ + } + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ __webpack_require__.m = __webpack_modules__; + /******/ + /************************************************************************/ + /******/ /* webpack/runtime/compat get default export */ + /******/ (() => { + /******/ // getDefaultExport function for compatibility with non-harmony modules + /******/ __webpack_require__.n = (module) => { + /******/ var getter = module && module.__esModule ? + /******/ () => (module['default']) : + /******/ () => (module); + /******/ __webpack_require__.d(getter, { a: getter }); + /******/ return getter; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/create fake namespace object */ + /******/ (() => { + /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); + /******/ var leafPrototypes; + /******/ // create a fake namespace object + /******/ // mode & 1: value is a module id, require it + /******/ // mode & 2: merge all properties of value into the ns + /******/ // mode & 4: return value when already ns object + /******/ // mode & 16: return value when it's Promise-like + /******/ // mode & 8|1: behave like require + /******/ __webpack_require__.t = function (value, mode) { + /******/ if (mode & 1) + value = this(value); + /******/ if (mode & 8) + return value; + /******/ if (typeof value === 'object' && value) { + /******/ if ((mode & 4) && value.__esModule) + return value; + /******/ if ((mode & 16) && typeof value.then === 'function') + return value; + /******/ + } + /******/ var ns = Object.create(null); + /******/ __webpack_require__.r(ns); + /******/ var def = {}; + /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; + /******/ for (var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { + /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); + /******/ + } + /******/ def['default'] = () => (value); + /******/ __webpack_require__.d(ns, def); + /******/ return ns; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/define property getters */ + /******/ (() => { + /******/ // define getter functions for harmony exports + /******/ __webpack_require__.d = (exports, definition) => { + /******/ for (var key in definition) { + /******/ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); + /******/ + } + /******/ + } + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/ensure chunk */ + /******/ (() => { + /******/ __webpack_require__.f = {}; + /******/ // This file contains only the entry chunk. + /******/ // The chunk loading function for additional chunks + /******/ __webpack_require__.e = (chunkId) => { + /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { + /******/ __webpack_require__.f[key](chunkId, promises); + /******/ return promises; + /******/ + }, [])); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/get javascript chunk filename */ + /******/ (() => { + /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint + /******/ __webpack_require__.u = (chunkId) => { + /******/ // return url for filenames based on template + /******/ return "" + chunkId + ".js"; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/hasOwnProperty shorthand */ + /******/ (() => { + /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)); + /******/ + })(); + /******/ + /******/ /* webpack/runtime/make namespace object */ + /******/ (() => { + /******/ // define __esModule on exports + /******/ __webpack_require__.r = (exports) => { + /******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); + /******/ + } + /******/ Object.defineProperty(exports, '__esModule', { value: true }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/startup entrypoint */ + /******/ (() => { + /******/ __webpack_require__.X = (result, chunkIds, fn) => { + /******/ // arguments: chunkIds, moduleId are deprecated + /******/ var moduleId = chunkIds; + /******/ if (!fn) + chunkIds = result, fn = () => (__webpack_require__(__webpack_require__.s = moduleId)); + /******/ chunkIds.map(__webpack_require__.e, __webpack_require__); + /******/ var r = fn(); + /******/ return r === undefined ? result : r; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/require chunk loading */ + /******/ (() => { + /******/ // no baseURI + /******/ + /******/ // object to store loaded chunks + /******/ // "1" means "loaded", otherwise not loaded yet + /******/ var installedChunks = { + /******/ 658: 1 + /******/ + }; + /******/ + /******/ // no on chunks loaded + /******/ + /******/ var installChunk = (chunk) => { + /******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime; + /******/ for (var moduleId in moreModules) { + /******/ if (__webpack_require__.o(moreModules, moduleId)) { + /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; + /******/ + } + /******/ + } + /******/ if (runtime) + runtime(__webpack_require__); + /******/ for (var i = 0; i < chunkIds.length; i++) + /******/ installedChunks[chunkIds[i]] = 1; + /******/ + /******/ + }; + /******/ + /******/ // require() chunk loading for javascript + /******/ __webpack_require__.f.require = (chunkId, promises) => { + if (installedChunks[chunkId]) + return; + if (chunkId === 658) + return installChunk(require("./chunks/658.js")); + /******/ // "1" is the signal for "already loaded" + /******/ if (!installedChunks[chunkId]) { + /******/ if (658 != chunkId) { + /******/ installChunk(require("./chunks/" + __webpack_require__.u(chunkId))); + /******/ + } + else + installedChunks[chunkId] = 1; + /******/ + } + /******/ + }; + /******/ + /******/ module.exports = __webpack_require__; + /******/ __webpack_require__.C = installChunk; + /******/ + /******/ // no HMR + /******/ + /******/ // no HMR manifest + /******/ + })(); + /******/ + /************************************************************************/ + /******/ + /******/ + /******/ +})(); diff --git a/builder/src/build/utils/index.ts b/builder/src/build/utils/index.ts new file mode 100644 index 00000000..2dff0596 --- /dev/null +++ b/builder/src/build/utils/index.ts @@ -0,0 +1 @@ +export * from "./ts-parse-file"; diff --git a/builder/src/build/utils/ts-parse-file.ts b/builder/src/build/utils/ts-parse-file.ts new file mode 100644 index 00000000..e0c3d93f --- /dev/null +++ b/builder/src/build/utils/ts-parse-file.ts @@ -0,0 +1,15 @@ +import * as ts from "ts-morph"; + +/** + * Parses a javascript file using ts-morph. + * + * @param fileContent the content of the file to parse + * @returns the parsed result + */ +export function tsParseFile(fileContent: string): ts.SourceFile { + const project = new ts.Project(); + + const sourceFile = project.createSourceFile("file.js", fileContent); + + return sourceFile; +} diff --git a/builder/tsconfig.json b/builder/tsconfig.json index c2a686ab..5d889dd8 100644 --- a/builder/tsconfig.json +++ b/builder/tsconfig.json @@ -7,6 +7,6 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, - "types": ["@cloudflare/workers-types"] + "types": [] } } diff --git a/examples/api/next.config.mjs b/examples/api/next.config.mjs index f9a6d1d0..4678774e 100644 --- a/examples/api/next.config.mjs +++ b/examples/api/next.config.mjs @@ -1,11 +1,4 @@ /** @type {import('next').NextConfig} */ -const nextConfig = { - output: "standalone", - experimental: { - // IMPORTANT: this option is necessary for the chunks hack since that relies on the webpack-runtime.js file not being minified - // (since we regex-replace relying on specific variable names) - serverMinification: false, - }, -}; +const nextConfig = {}; export default nextConfig; diff --git a/examples/create-next-app/next.config.mjs b/examples/create-next-app/next.config.mjs index 52316df5..4678774e 100644 --- a/examples/create-next-app/next.config.mjs +++ b/examples/create-next-app/next.config.mjs @@ -1,9 +1,4 @@ /** @type {import('next').NextConfig} */ -const nextConfig = { - output: "standalone", - experimental: { - serverMinification: false, - }, -}; +const nextConfig = {}; export default nextConfig; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1618718f..835e79a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,12 +18,18 @@ catalogs: '@types/react-dom': specifier: ^18 version: 18.3.0 + esbuild: + specifier: ^0.23.0 + version: 0.23.1 eslint: specifier: ^8 version: 8.57.0 eslint-config-next: specifier: 14.2.11 version: 14.2.11 + glob: + specifier: ^11.0.0 + version: 11.0.0 next: specifier: 14.2.11 version: 14.2.11 @@ -33,9 +39,18 @@ catalogs: react-dom: specifier: ^18 version: 18.3.1 + ts-morph: + specifier: ^23.0.0 + version: 23.0.0 + tsup: + specifier: ^8.2.4 + version: 8.2.4 typescript: specifier: ^5.5.4 version: 5.5.4 + vitest: + specifier: ^2.1.1 + version: 2.1.1 wrangler: specifier: ^3.78.6 version: 3.78.6 @@ -52,28 +67,29 @@ importers: version: 3.3.3 builder: + dependencies: + ts-morph: + specifier: 'catalog:' + version: 23.0.0 devDependencies: - '@cloudflare/workers-types': - specifier: ^4.20240909.0 - version: 4.20240909.0 '@types/node': - specifier: ^22.2.0 + specifier: 'catalog:' version: 22.2.0 esbuild: - specifier: ^0.23.0 + specifier: 'catalog:' version: 0.23.1 glob: - specifier: ^11.0.0 + specifier: 'catalog:' version: 11.0.0 - next: - specifier: 14.2.5 - version: 14.2.5(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) tsup: - specifier: ^8.2.4 - version: 8.2.4(jiti@1.21.6)(postcss@8.4.31)(tsx@4.17.0)(typescript@5.5.4)(yaml@2.5.1) + specifier: 'catalog:' + version: 8.2.4(jiti@1.21.6)(postcss@8.4.47)(tsx@4.17.0)(typescript@5.5.4)(yaml@2.5.1) typescript: - specifier: ^5.5.4 + specifier: 'catalog:' version: 5.5.4 + vitest: + specifier: 'catalog:' + version: 2.1.1(@types/node@22.2.0) examples/api: dependencies: @@ -207,6 +223,12 @@ packages: peerDependencies: esbuild: '*' + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/aix-ppc64@0.23.1': resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} engines: {node: '>=18'} @@ -219,6 +241,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.23.1': resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} engines: {node: '>=18'} @@ -231,6 +259,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.23.1': resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} engines: {node: '>=18'} @@ -243,6 +277,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.23.1': resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} engines: {node: '>=18'} @@ -255,6 +295,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.23.1': resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} engines: {node: '>=18'} @@ -267,6 +313,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.23.1': resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} engines: {node: '>=18'} @@ -279,6 +331,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.23.1': resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} engines: {node: '>=18'} @@ -291,6 +349,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.23.1': resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} engines: {node: '>=18'} @@ -303,6 +367,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.23.1': resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} engines: {node: '>=18'} @@ -315,6 +385,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.23.1': resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} engines: {node: '>=18'} @@ -327,6 +403,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.23.1': resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} engines: {node: '>=18'} @@ -339,6 +421,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.23.1': resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} engines: {node: '>=18'} @@ -351,6 +439,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.23.1': resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} engines: {node: '>=18'} @@ -363,6 +457,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.23.1': resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} engines: {node: '>=18'} @@ -375,6 +475,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.23.1': resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} engines: {node: '>=18'} @@ -387,6 +493,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.23.1': resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} engines: {node: '>=18'} @@ -399,6 +511,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.23.1': resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} engines: {node: '>=18'} @@ -411,6 +529,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.23.1': resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} engines: {node: '>=18'} @@ -429,6 +553,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.23.1': resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} engines: {node: '>=18'} @@ -441,6 +571,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.23.1': resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} engines: {node: '>=18'} @@ -453,6 +589,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.23.1': resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} engines: {node: '>=18'} @@ -465,6 +607,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.23.1': resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} engines: {node: '>=18'} @@ -477,6 +625,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.23.1': resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} engines: {node: '>=18'} @@ -546,9 +700,6 @@ packages: '@next/env@14.2.11': resolution: {integrity: sha512-HYsQRSIXwiNqvzzYThrBwq6RhXo3E0n8j8nQnAs8i4fCEo2Zf/3eS0IiRA8XnRg9Ha0YnpkyJZIZg1qEwemrHw==} - '@next/env@14.2.5': - resolution: {integrity: sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==} - '@next/eslint-plugin-next@14.2.11': resolution: {integrity: sha512-7mw+xW7Y03Ph4NTCcAzYe+vu4BNjEHZUfZayyF3Y1D9RX6c5NIe25m1grHEAkyUuaqjRxOYhnCNeglOkIqLkBA==} @@ -558,108 +709,54 @@ packages: cpu: [arm64] os: [darwin] - '@next/swc-darwin-arm64@14.2.5': - resolution: {integrity: sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@next/swc-darwin-x64@14.2.11': resolution: {integrity: sha512-lnB0zYCld4yE0IX3ANrVMmtAbziBb7MYekcmR6iE9bujmgERl6+FK+b0MBq0pl304lYe7zO4yxJus9H/Af8jbg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-darwin-x64@14.2.5': - resolution: {integrity: sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - '@next/swc-linux-arm64-gnu@14.2.11': resolution: {integrity: sha512-Ulo9TZVocYmUAtzvZ7FfldtwUoQY0+9z3BiXZCLSUwU2bp7GqHA7/bqrfsArDlUb2xeGwn3ZuBbKtNK8TR0A8w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-gnu@14.2.5': - resolution: {integrity: sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-arm64-musl@14.2.11': resolution: {integrity: sha512-fH377DnKGyUnkWlmUpFF1T90m0dADBfK11dF8sOQkiELF9M+YwDRCGe8ZyDzvQcUd20Rr5U7vpZRrAxKwd3Rzg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.2.5': - resolution: {integrity: sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-x64-gnu@14.2.11': resolution: {integrity: sha512-a0TH4ZZp4NS0LgXP/488kgvWelNpwfgGTUCDXVhPGH6pInb7yIYNgM4kmNWOxBFt+TIuOH6Pi9NnGG4XWFUyXQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-gnu@14.2.5': - resolution: {integrity: sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-linux-x64-musl@14.2.11': resolution: {integrity: sha512-DYYZcO4Uir2gZxA4D2JcOAKVs8ZxbOFYPpXSVIgeoQbREbeEHxysVsg3nY4FrQy51e5opxt5mOHl/LzIyZBoKA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.2.5': - resolution: {integrity: sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-win32-arm64-msvc@14.2.11': resolution: {integrity: sha512-PwqHeKG3/kKfPpM6of1B9UJ+Er6ySUy59PeFu0Un0LBzJTRKKAg2V6J60Yqzp99m55mLa+YTbU6xj61ImTv9mg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-arm64-msvc@14.2.5': - resolution: {integrity: sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - '@next/swc-win32-ia32-msvc@14.2.11': resolution: {integrity: sha512-0U7PWMnOYIvM74GY6rbH6w7v+vNPDVH1gUhlwHpfInJnNe5LkmUZqhp7FNWeNa5wbVgRcRi1F1cyxp4dmeLLvA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@next/swc-win32-ia32-msvc@14.2.5': - resolution: {integrity: sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - '@next/swc-win32-x64-msvc@14.2.11': resolution: {integrity: sha512-gQpS7mcgovWoaTG1FbS5/ojF7CGfql1Q0ZLsMrhcsi2Sr9HEqsUZ70MPJyaYBXbk6iEAP7UXMD9HC8KY1qNwvA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@next/swc-win32-x64-msvc@14.2.5': - resolution: {integrity: sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -777,6 +874,9 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} + '@ts-morph/common@0.24.0': + resolution: {integrity: sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -865,6 +965,36 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vitest/expect@2.1.1': + resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} + + '@vitest/mocker@2.1.1': + resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + peerDependencies: + '@vitest/spy': 2.1.1 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.1': + resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + + '@vitest/runner@2.1.1': + resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} + + '@vitest/snapshot@2.1.1': + resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} + + '@vitest/spy@2.1.1': + resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + + '@vitest/utils@2.1.1': + resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -953,6 +1083,10 @@ packages: as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -1020,10 +1154,18 @@ packages: capnp-ts@0.7.0: resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -1031,6 +1173,9 @@ packages: client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + code-block-writer@13.0.2: + resolution: {integrity: sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1103,6 +1248,10 @@ packages: supports-color: optional: true + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-equal@2.2.3: resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} engines: {node: '>= 0.4'} @@ -1191,6 +1340,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.23.1: resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} @@ -1306,6 +1460,9 @@ packages: estree-walker@0.6.1: resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1383,6 +1540,9 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -1723,6 +1883,9 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1733,6 +1896,9 @@ packages: magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -1780,6 +1946,11 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -1816,24 +1987,6 @@ packages: sass: optional: true - next@14.2.5: - resolution: {integrity: sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==} - engines: {node: '>=18.17.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - sass: - optional: true - node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -1915,6 +2068,9 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -1948,9 +2104,16 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -2036,6 +2199,10 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2179,6 +2346,9 @@ packages: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -2194,6 +2364,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -2206,9 +2380,15 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + stacktracey@2.1.8: resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==} + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -2315,6 +2495,24 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + + tinypool@1.0.1: + resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2335,6 +2533,9 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + ts-morph@23.0.0: + resolution: {integrity: sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==} + tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -2416,6 +2617,67 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + vite-node@2.1.1: + resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite@5.4.6: + resolution: {integrity: sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vitest@2.1.1: + resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.1 + '@vitest/ui': 2.1.1 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} @@ -2442,6 +2704,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -2530,7 +2797,8 @@ snapshots: mime: 3.0.0 zod: 3.23.8 - '@cloudflare/workers-types@4.20240909.0': {} + '@cloudflare/workers-types@4.20240909.0': + optional: true '@cspotcode/source-map-support@0.8.1': dependencies: @@ -2546,108 +2814,162 @@ snapshots: escape-string-regexp: 4.0.0 rollup-plugin-node-polyfills: 0.2.1 + '@esbuild/aix-ppc64@0.21.5': + optional: true + '@esbuild/aix-ppc64@0.23.1': optional: true '@esbuild/android-arm64@0.17.19': optional: true + '@esbuild/android-arm64@0.21.5': + optional: true + '@esbuild/android-arm64@0.23.1': optional: true '@esbuild/android-arm@0.17.19': optional: true + '@esbuild/android-arm@0.21.5': + optional: true + '@esbuild/android-arm@0.23.1': optional: true '@esbuild/android-x64@0.17.19': optional: true + '@esbuild/android-x64@0.21.5': + optional: true + '@esbuild/android-x64@0.23.1': optional: true '@esbuild/darwin-arm64@0.17.19': optional: true + '@esbuild/darwin-arm64@0.21.5': + optional: true + '@esbuild/darwin-arm64@0.23.1': optional: true '@esbuild/darwin-x64@0.17.19': optional: true + '@esbuild/darwin-x64@0.21.5': + optional: true + '@esbuild/darwin-x64@0.23.1': optional: true '@esbuild/freebsd-arm64@0.17.19': optional: true + '@esbuild/freebsd-arm64@0.21.5': + optional: true + '@esbuild/freebsd-arm64@0.23.1': optional: true '@esbuild/freebsd-x64@0.17.19': optional: true + '@esbuild/freebsd-x64@0.21.5': + optional: true + '@esbuild/freebsd-x64@0.23.1': optional: true '@esbuild/linux-arm64@0.17.19': optional: true + '@esbuild/linux-arm64@0.21.5': + optional: true + '@esbuild/linux-arm64@0.23.1': optional: true '@esbuild/linux-arm@0.17.19': optional: true + '@esbuild/linux-arm@0.21.5': + optional: true + '@esbuild/linux-arm@0.23.1': optional: true '@esbuild/linux-ia32@0.17.19': optional: true + '@esbuild/linux-ia32@0.21.5': + optional: true + '@esbuild/linux-ia32@0.23.1': optional: true '@esbuild/linux-loong64@0.17.19': optional: true + '@esbuild/linux-loong64@0.21.5': + optional: true + '@esbuild/linux-loong64@0.23.1': optional: true '@esbuild/linux-mips64el@0.17.19': optional: true + '@esbuild/linux-mips64el@0.21.5': + optional: true + '@esbuild/linux-mips64el@0.23.1': optional: true '@esbuild/linux-ppc64@0.17.19': optional: true + '@esbuild/linux-ppc64@0.21.5': + optional: true + '@esbuild/linux-ppc64@0.23.1': optional: true '@esbuild/linux-riscv64@0.17.19': optional: true + '@esbuild/linux-riscv64@0.21.5': + optional: true + '@esbuild/linux-riscv64@0.23.1': optional: true '@esbuild/linux-s390x@0.17.19': optional: true + '@esbuild/linux-s390x@0.21.5': + optional: true + '@esbuild/linux-s390x@0.23.1': optional: true '@esbuild/linux-x64@0.17.19': optional: true + '@esbuild/linux-x64@0.21.5': + optional: true + '@esbuild/linux-x64@0.23.1': optional: true '@esbuild/netbsd-x64@0.17.19': optional: true + '@esbuild/netbsd-x64@0.21.5': + optional: true + '@esbuild/netbsd-x64@0.23.1': optional: true @@ -2657,30 +2979,45 @@ snapshots: '@esbuild/openbsd-x64@0.17.19': optional: true + '@esbuild/openbsd-x64@0.21.5': + optional: true + '@esbuild/openbsd-x64@0.23.1': optional: true '@esbuild/sunos-x64@0.17.19': optional: true + '@esbuild/sunos-x64@0.21.5': + optional: true + '@esbuild/sunos-x64@0.23.1': optional: true '@esbuild/win32-arm64@0.17.19': optional: true + '@esbuild/win32-arm64@0.21.5': + optional: true + '@esbuild/win32-arm64@0.23.1': optional: true '@esbuild/win32-ia32@0.17.19': optional: true + '@esbuild/win32-ia32@0.21.5': + optional: true + '@esbuild/win32-ia32@0.23.1': optional: true '@esbuild/win32-x64@0.17.19': optional: true + '@esbuild/win32-x64@0.21.5': + optional: true + '@esbuild/win32-x64@0.23.1': optional: true @@ -2754,8 +3091,6 @@ snapshots: '@next/env@14.2.11': {} - '@next/env@14.2.5': {} - '@next/eslint-plugin-next@14.2.11': dependencies: glob: 10.3.10 @@ -2763,57 +3098,30 @@ snapshots: '@next/swc-darwin-arm64@14.2.11': optional: true - '@next/swc-darwin-arm64@14.2.5': - optional: true - '@next/swc-darwin-x64@14.2.11': optional: true - '@next/swc-darwin-x64@14.2.5': - optional: true - '@next/swc-linux-arm64-gnu@14.2.11': optional: true - '@next/swc-linux-arm64-gnu@14.2.5': - optional: true - '@next/swc-linux-arm64-musl@14.2.11': optional: true - '@next/swc-linux-arm64-musl@14.2.5': - optional: true - '@next/swc-linux-x64-gnu@14.2.11': optional: true - '@next/swc-linux-x64-gnu@14.2.5': - optional: true - '@next/swc-linux-x64-musl@14.2.11': optional: true - '@next/swc-linux-x64-musl@14.2.5': - optional: true - '@next/swc-win32-arm64-msvc@14.2.11': optional: true - '@next/swc-win32-arm64-msvc@14.2.5': - optional: true - '@next/swc-win32-ia32-msvc@14.2.11': optional: true - '@next/swc-win32-ia32-msvc@14.2.5': - optional: true - '@next/swc-win32-x64-msvc@14.2.11': optional: true - '@next/swc-win32-x64-msvc@14.2.5': - optional: true - '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2894,6 +3202,13 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.3 + '@ts-morph/common@0.24.0': + dependencies: + fast-glob: 3.3.2 + minimatch: 9.0.5 + mkdirp: 3.0.1 + path-browserify: 1.0.1 + '@types/estree@1.0.5': {} '@types/json-schema@7.0.15': {} @@ -3009,6 +3324,46 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@vitest/expect@2.1.1': + dependencies: + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.2.0))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.4.6(@types/node@22.2.0) + + '@vitest/pretty-format@2.1.1': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.1.1': + dependencies: + '@vitest/utils': 2.1.1 + pathe: 1.1.2 + + '@vitest/snapshot@2.1.1': + dependencies: + '@vitest/pretty-format': 2.1.1 + magic-string: 0.30.11 + pathe: 1.1.2 + + '@vitest/spy@2.1.1': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@2.1.1': + dependencies: + '@vitest/pretty-format': 2.1.1 + loupe: 3.1.1 + tinyrainbow: 1.2.0 + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: acorn: 8.12.1 @@ -3122,6 +3477,8 @@ snapshots: dependencies: printable-characters: 1.0.42 + assertion-error@2.0.1: {} + ast-types-flow@0.0.8: {} available-typed-arrays@1.0.7: @@ -3183,11 +3540,21 @@ snapshots: transitivePeerDependencies: - supports-color + chai@5.1.1: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + check-error@2.1.1: {} + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -3202,6 +3569,8 @@ snapshots: client-only@0.0.1: {} + code-block-writer@13.0.2: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -3258,6 +3627,8 @@ snapshots: dependencies: ms: 2.1.2 + deep-eql@5.0.2: {} + deep-equal@2.2.3: dependencies: array-buffer-byte-length: 1.0.1 @@ -3451,6 +3822,32 @@ snapshots: '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + esbuild@0.23.1: optionalDependencies: '@esbuild/aix-ppc64': 0.23.1 @@ -3680,6 +4077,10 @@ snapshots: estree-walker@0.6.1: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.5 + esutils@2.0.3: {} execa@5.1.1: @@ -3763,6 +4164,8 @@ snapshots: functions-have-names@1.2.3: {} + get-func-name@2.0.2: {} + get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 @@ -4108,6 +4511,10 @@ snapshots: dependencies: js-tokens: 4.0.0 + loupe@3.1.1: + dependencies: + get-func-name: 2.0.2 + lru-cache@10.4.3: {} lru-cache@11.0.0: {} @@ -4116,6 +4523,10 @@ snapshots: dependencies: sourcemap-codec: 1.4.8 + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -4168,6 +4579,8 @@ snapshots: minipass@7.1.2: {} + mkdirp@3.0.1: {} + ms@2.1.2: {} mustache@4.2.0: {} @@ -4208,32 +4621,6 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@14.2.5(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - '@next/env': 14.2.5 - '@swc/helpers': 0.5.5 - busboy: 1.6.0 - caniuse-lite: 1.0.30001651 - graceful-fs: 4.2.11 - postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(react@18.3.1) - optionalDependencies: - '@next/swc-darwin-arm64': 14.2.5 - '@next/swc-darwin-x64': 14.2.5 - '@next/swc-linux-arm64-gnu': 14.2.5 - '@next/swc-linux-arm64-musl': 14.2.5 - '@next/swc-linux-x64-gnu': 14.2.5 - '@next/swc-linux-x64-musl': 14.2.5 - '@next/swc-win32-arm64-msvc': 14.2.5 - '@next/swc-win32-ia32-msvc': 14.2.5 - '@next/swc-win32-x64-msvc': 14.2.5 - '@playwright/test': 1.47.0 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - node-forge@1.3.1: {} normalize-path@3.0.0: {} @@ -4320,6 +4707,8 @@ snapshots: dependencies: callsites: 3.1.0 + path-browserify@1.0.1: {} + path-exists@4.0.0: {} path-is-absolute@1.0.1: {} @@ -4344,8 +4733,12 @@ snapshots: pathe@1.1.2: {} + pathval@2.0.0: {} + picocolors@1.0.1: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} pify@2.3.0: {} @@ -4381,12 +4774,12 @@ snapshots: optionalDependencies: postcss: 8.4.31 - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.31)(tsx@4.17.0)(yaml@2.5.1): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.17.0)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: jiti: 1.21.6 - postcss: 8.4.31 + postcss: 8.4.47 tsx: 4.17.0 yaml: 2.5.1 @@ -4408,6 +4801,12 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postcss@8.4.47: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.0 + source-map-js: 1.2.1 + prelude-ls@1.2.1: {} prettier@3.3.3: {} @@ -4582,6 +4981,8 @@ snapshots: get-intrinsic: 1.2.4 object-inspect: 1.13.2 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -4590,6 +4991,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map@0.6.1: {} source-map@0.8.0-beta.0: @@ -4598,11 +5001,15 @@ snapshots: sourcemap-codec@1.4.8: {} + stackback@0.0.2: {} + stacktracey@2.1.8: dependencies: as-table: 1.0.55 get-source: 2.0.12 + std-env@3.7.0: {} + stop-iteration-iterator@1.0.0: dependencies: internal-slot: 1.0.7 @@ -4741,6 +5148,16 @@ snapshots: dependencies: any-promise: 1.3.0 + tinybench@2.9.0: {} + + tinyexec@0.3.0: {} + + tinypool@1.0.1: {} + + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -4757,6 +5174,11 @@ snapshots: ts-interface-checker@0.1.13: {} + ts-morph@23.0.0: + dependencies: + '@ts-morph/common': 0.24.0 + code-block-writer: 13.0.2 + tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29 @@ -4766,7 +5188,7 @@ snapshots: tslib@2.6.3: {} - tsup@8.2.4(jiti@1.21.6)(postcss@8.4.31)(tsx@4.17.0)(typescript@5.5.4)(yaml@2.5.1): + tsup@8.2.4(jiti@1.21.6)(postcss@8.4.47)(tsx@4.17.0)(typescript@5.5.4)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -4777,15 +5199,15 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - picocolors: 1.0.1 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.31)(tsx@4.17.0)(yaml@2.5.1) + picocolors: 1.1.0 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.17.0)(yaml@2.5.1) resolve-from: 5.0.0 rollup: 4.21.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.4.31 + postcss: 8.4.47 typescript: 5.5.4 transitivePeerDependencies: - jiti @@ -4869,6 +5291,66 @@ snapshots: util-deprecate@1.0.2: {} + vite-node@2.1.1(@types/node@22.2.0): + dependencies: + cac: 6.7.14 + debug: 4.3.6 + pathe: 1.1.2 + vite: 5.4.6(@types/node@22.2.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite@5.4.6(@types/node@22.2.0): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.21.0 + optionalDependencies: + '@types/node': 22.2.0 + fsevents: 2.3.3 + + vitest@2.1.1(@types/node@22.2.0): + dependencies: + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.2.0)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 + chai: 5.1.1 + debug: 4.3.6 + magic-string: 0.30.11 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.9.0 + tinyexec: 0.3.0 + tinypool: 1.0.1 + tinyrainbow: 1.2.0 + vite: 5.4.6(@types/node@22.2.0) + vite-node: 2.1.1(@types/node@22.2.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.2.0 + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + webidl-conversions@4.0.2: {} whatwg-url@7.1.0: @@ -4919,6 +5401,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} workerd@1.20240909.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b4f85be4..edf9e9a5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -14,3 +14,8 @@ catalog: "react-dom": ^18 "typescript": ^5.5.4 "wrangler": ^3.78.6 + "tsup": ^8.2.4 + "glob": ^11.0.0 + "esbuild": ^0.23.0 + "vitest": ^2.1.1 + "ts-morph": ^23.0.0