From 4bf6ebd06e207bda52030f9d246bea067e7f5e6f Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Fri, 13 Dec 2024 14:39:56 +0800 Subject: [PATCH 1/2] fix(deploy): should handle prebundle package correctly --- .changeset/ten-poets-retire.md | 6 + packages/solutions/app-tools/package.json | 6 +- .../src/plugins/deploy/dependencies/index.ts | 297 ------------------ .../src/plugins/deploy/dependencies/utils.ts | 219 ------------- .../app-tools/src/plugins/deploy/exports.ts | 1 - .../src/plugins/deploy/platforms/netlify.ts | 7 +- .../src/plugins/deploy/platforms/node.ts | 7 +- .../src/plugins/deploy/platforms/vercel.ts | 7 +- 8 files changed, 22 insertions(+), 528 deletions(-) create mode 100644 .changeset/ten-poets-retire.md delete mode 100644 packages/solutions/app-tools/src/plugins/deploy/dependencies/index.ts delete mode 100644 packages/solutions/app-tools/src/plugins/deploy/dependencies/utils.ts delete mode 100644 packages/solutions/app-tools/src/plugins/deploy/exports.ts diff --git a/.changeset/ten-poets-retire.md b/.changeset/ten-poets-retire.md new file mode 100644 index 000000000000..6fbdd6bc48f3 --- /dev/null +++ b/.changeset/ten-poets-retire.md @@ -0,0 +1,6 @@ +--- +'@modern-js/app-tools': patch +--- + +fix(deploy): should handle prebundle package correctly +fix(deploy): 应该正确地处理 prebundle 的包 diff --git a/packages/solutions/app-tools/package.json b/packages/solutions/app-tools/package.json index 616cbce3d688..b934ec62340a 100644 --- a/packages/solutions/app-tools/package.json +++ b/packages/solutions/app-tools/package.json @@ -48,11 +48,6 @@ "types": "./dist/types/exports/server.d.ts", "jsnext:source": "./src/exports/server.ts", "default": "./dist/cjs/exports/server.js" - }, - "./deploy": { - "types": "./dist/types/plugins/deploy/exports.d.ts", - "jsnext:source": "./src/plugins/deploy/exports.ts", - "default": "./dist/cjs/plugins/deploy/exports.js" } }, "engines": { @@ -116,6 +111,7 @@ "flatted": "^3.2.9", "mlly": "^1.6.1", "pkg-types": "^1.1.0", + "ndepe": "0.1.4", "std-env": "^3.7.0" }, "devDependencies": { diff --git a/packages/solutions/app-tools/src/plugins/deploy/dependencies/index.ts b/packages/solutions/app-tools/src/plugins/deploy/dependencies/index.ts deleted file mode 100644 index 447ea3f370d3..000000000000 --- a/packages/solutions/app-tools/src/plugins/deploy/dependencies/index.ts +++ /dev/null @@ -1,297 +0,0 @@ -import path from 'node:path'; -import { fs as fse, pkgUp, semver } from '@modern-js/utils'; -import type { NodeFileTraceOptions } from '@vercel/nft'; -import { parseNodeModulePath } from 'mlly'; -import type { PackageJson } from 'pkg-types'; -import { readPackageJSON } from 'pkg-types'; -import { - type TracedFile, - type TracedPackage, - traceFiles as defaultTraceFiles, - findEntryFiles, - findPackageParents, - isFile, - isSubPath, - linkPackage, - readDirRecursive, - resolveTracedPath, - writePackage, -} from './utils'; - -export type { NodeFileTraceOptions } from '@vercel/nft'; -export { nodeFileTrace } from '@vercel/nft'; -export const handleDependencies = async ({ - appDir, - serverRootDir, - includeEntries, - traceFiles = defaultTraceFiles, - entryFilter, - modifyPackageJson, - copyWholePackage, - traceOptions, -}: { - appDir: string; - serverRootDir: string; - includeEntries: string[]; - traceFiles?: typeof defaultTraceFiles; - entryFilter?: (filePath: string) => boolean; - modifyPackageJson?: (pkgJson: PackageJson) => PackageJson; - copyWholePackage?: (pkgName: string) => boolean; - traceOptions?: NodeFileTraceOptions; -}) => { - const base = '/'; - const entryFiles = await findEntryFiles(serverRootDir, entryFilter); - - const fileTrace = await traceFiles({ - entryFiles: entryFiles.concat(includeEntries), - serverRootDir, - base, - traceOptions, - }); - const currentProjectModules = path.join(appDir, 'node_modules'); - // Because vercel/nft may find inaccurately, we limit the range of query of dependencies - const dependencySearchRoot = path.resolve(appDir, '../../../../../../'); - - const tracedFiles: Record = Object.fromEntries( - (await Promise.all( - [...fileTrace.reasons.entries()].map(async ([_path, reasons]) => { - if (reasons.ignored) { - return; - } - const filePath = await resolveTracedPath(base, _path); - - if ( - isSubPath(serverRootDir, filePath) || - (isSubPath(appDir, filePath) && - !isSubPath(currentProjectModules, filePath)) - ) { - return; - } - - if (!(await isFile(filePath))) { - return; - } - - let baseDir: string | undefined; - let pkgName: string | undefined; - let subpath: string | undefined; - let pkgPath: string | undefined; - - if (filePath.includes('node_modules')) { - const parsed = parseNodeModulePath(filePath); - baseDir = parsed.dir; - pkgName = parsed.name; - subpath = parsed.subpath; - pkgPath = path.join(baseDir!, pkgName!); - } else { - // For @modern-js/utils, since there are some pre-bundled packages in the package that have their own package.json, - // and since the relationship between these files uses relative paths, some special handling is required - const MODERN_UTILS_PATH = 'packages/toolkit/utils'; - const MODERN_UTILS_PATH_REGEX = new RegExp( - `(.*${MODERN_UTILS_PATH})`, - ); - const match = filePath.match(MODERN_UTILS_PATH_REGEX); - - const packageJsonPath: string | null = match - ? path.join(match[0], 'package.json') - : await pkgUp({ cwd: path.dirname(filePath) }); - - if ( - packageJsonPath && - isSubPath(dependencySearchRoot, packageJsonPath) - ) { - const packageJson: PackageJson = - await fse.readJSON(packageJsonPath); - pkgPath = baseDir = path.dirname(packageJsonPath); - subpath = path.relative(baseDir, filePath); - pkgName = packageJson.name; - } - } - - if (!baseDir) { - return; - } - - const parents = await Promise.all( - [...reasons.parents].map(p => resolveTracedPath(base, p)), - ); - const tracedFile = { - path: filePath, - parents, - isDirectDep: parents.some(parent => { - return ( - isSubPath(appDir, parent) && - !isSubPath(currentProjectModules, parent) - ); - }), - - subpath, - pkgName, - pkgPath, - } as TracedFile; - - return [filePath, tracedFile]; - }), - ).then(r => r.filter(Boolean))) as [string, TracedFile][], - ); - - const tracedPackages: Record = {}; - for (const tracedFile of Object.values(tracedFiles)) { - const { pkgName } = tracedFile; - let tracedPackage = tracedPackages[pkgName]; - - let pkgJSON = await readPackageJSON(tracedFile.pkgPath, { - cache: true, - }).catch(() => {}); - if (!pkgJSON) { - pkgJSON = { name: pkgName, version: '0.0.0' } as PackageJson; - } - if (!tracedPackage) { - tracedPackage = { - name: pkgName, - versions: {}, - }; - tracedPackages[pkgName] = tracedPackage; - } - - let tracedPackageVersion = tracedPackage.versions[pkgJSON.version!]; - if (!tracedPackageVersion) { - tracedPackageVersion = { - path: tracedFile.pkgPath, - files: [], - isDirectDep: false, - pkgJSON, - }; - if (tracedFile.isDirectDep) { - tracedPackageVersion.isDirectDep = tracedFile.isDirectDep; - } - tracedPackage.versions[pkgJSON.version!] = tracedPackageVersion; - } - - tracedFile.pkgName = pkgName; - tracedFile.pkgVersion = pkgJSON.version; - - const shouldCopyWholePackage = copyWholePackage?.(pkgName); - if ( - tracedFile.path.startsWith(tracedFile.pkgPath) && - // Merged package files are based on the version, not on paths, to handle some boundary cases - tracedPackageVersion.pkgJSON.version === tracedFile.pkgVersion - ) { - if (shouldCopyWholePackage) { - const allFiles = await readDirRecursive(tracedFile.pkgPath); - tracedPackageVersion.files.push(...allFiles); - } else { - tracedPackageVersion.files.push(tracedFile.path); - } - } - } - - const multiVersionPkgs: Record = {}; - const singleVersionPackages: string[] = []; - for (const tracedPackage of Object.values(tracedPackages)) { - const versions = Object.keys(tracedPackage.versions); - if (versions.length === 1) { - singleVersionPackages.push(tracedPackage.name); - continue; - } - multiVersionPkgs[tracedPackage.name] = {}; - for (const version of versions) { - multiVersionPkgs[tracedPackage.name!][version!] = findPackageParents( - tracedPackage, - version, - tracedFiles, - ); - } - } - - await Promise.all( - singleVersionPackages.map(pkgName => { - const pkg = tracedPackages[pkgName]; - const version = Object.keys(pkg.versions)[0]; - return writePackage({ - pkg, - version, - projectDir: serverRootDir, - }); - }), - ); - - const projectPkgJson = await readPackageJSON(serverRootDir).catch( - () => ({}) as PackageJson, - ); - - for (const [pkgName, pkgVersions] of Object.entries(multiVersionPkgs)) { - const versionEntires = Object.entries(pkgVersions).sort( - ([v1, p1], [v2, p2]) => { - const shouldHoist1 = - tracedPackages[pkgName]?.versions?.[v1]?.isDirectDep; - const shouldHoist2 = - tracedPackages[pkgName]?.versions?.[v2]?.isDirectDep; - - if (shouldHoist1 && !shouldHoist2) { - return -1; - } - if (!shouldHoist1 && shouldHoist2) { - return 1; - } - if (p1.length === 0) { - return -1; - } - if (p2.length === 0) { - return 1; - } - - return semver.lt(v1, v2, { loose: true }) ? 1 : -1; - }, - ); - - for (const [version, parentPkgs] of versionEntires) { - const pkg = tracedPackages[pkgName]; - - const pkgDestPath = `.modernjs/${pkgName}@${version}/node_modules/${pkgName}`; - await writePackage({ - pkg, - version, - projectDir: serverRootDir, - _pkgPath: pkgDestPath, - }); - await linkPackage(pkgDestPath, `${pkgName}`, serverRootDir); - - for (const parentPkg of parentPkgs) { - const parentPkgName = parentPkg.replace(/@[^@]+$/, ''); - await (multiVersionPkgs[parentPkgName] - ? linkPackage( - pkgDestPath, - `.modernjs/${parentPkg}/node_modules/${pkgName}`, - serverRootDir, - ) - : linkPackage( - pkgDestPath, - `${parentPkgName}/node_modules/${pkgName}`, - serverRootDir, - )); - } - } - } - - const outputPkgPath = path.join(serverRootDir, 'package.json'); - - const newPkgJson = { - name: `${projectPkgJson.name || 'modernjs-project'}-prod`, - version: projectPkgJson.version || '0.0.0', - private: true, - type: projectPkgJson.type || 'commonjs', - dependencies: Object.fromEntries( - [ - ...Object.values(tracedPackages).map(pkg => [ - pkg.name, - Object.keys(pkg.versions)[0], - ]), - ].sort(([a], [b]) => a.localeCompare(b)), - ), - }; - - const finalPkgJson = modifyPackageJson?.(newPkgJson) || newPkgJson; - - await fse.writeJSON(outputPkgPath, finalPkgJson); -}; diff --git a/packages/solutions/app-tools/src/plugins/deploy/dependencies/utils.ts b/packages/solutions/app-tools/src/plugins/deploy/dependencies/utils.ts deleted file mode 100644 index 80ac3db2b6b7..000000000000 --- a/packages/solutions/app-tools/src/plugins/deploy/dependencies/utils.ts +++ /dev/null @@ -1,219 +0,0 @@ -import os from 'node:os'; -import path from 'path'; -import { fs as fse } from '@modern-js/utils'; -import { type NodeFileTraceOptions, nodeFileTrace, resolve } from '@vercel/nft'; -import { parseNodeModulePath } from 'mlly'; -import type { PackageJson } from 'pkg-types'; - -export type TracedPackage = { - name: string; - versions: Record< - string, - { - pkgJSON: PackageJson; - path: string; - isDirectDep: boolean; - files: string[]; - } - >; -}; - -export type TracedFile = { - path: string; - subpath: string; - parents: string[]; - isDirectDep: boolean; - - pkgPath: string; - pkgName: string; - pkgVersion?: string; -}; - -function applyPublicCondition(pkg: PackageJson) { - if (pkg?.publishConfig?.exports) { - pkg.exports = pkg?.publishConfig?.exports; - } -} - -interface WritePackageOptions { - pkg: TracedPackage; - version: string; - projectDir: string; - _pkgPath?: string; -} - -export const writePackage = async (options: WritePackageOptions) => { - const { pkg, version, projectDir, _pkgPath } = options; - const pkgPath = _pkgPath || pkg.name; - for (const src of pkg.versions[version].files) { - if (src.includes('node_modules')) { - const { subpath } = parseNodeModulePath(src); - const dest = path.join(projectDir, 'node_modules', pkgPath, subpath!); - const dirname = path.dirname(dest); - await fse.ensureDir(dirname); - await fse.copyFile(src, dest); - } else { - // workspace package - const subpath = path.relative(pkg.versions[version].path, src); - const dest = path.join(projectDir, 'node_modules', pkgPath, subpath); - const dirname = path.dirname(dest); - await fse.ensureDir(dirname); - await fse.copyFile(src, dest); - } - } - - const { pkgJSON } = pkg.versions[version]; - applyPublicCondition(pkgJSON); - - const packageJsonPath = path.join( - projectDir, - 'node_modules', - pkgPath, - 'package.json', - ); - await fse.ensureDir(path.dirname(packageJsonPath)); - await fse.writeFile(packageJsonPath, JSON.stringify(pkgJSON, null, 2)); -}; - -const isWindows = os.platform() === 'win32'; -export const linkPackage = async ( - from: string, - to: string, - projectRootDir: string, -) => { - const src = path.join(projectRootDir, 'node_modules', from); - const dest = path.join(projectRootDir, 'node_modules', to); - const dstStat = await fse.lstat(dest).catch(() => null); - const exists = dstStat?.isSymbolicLink(); - - if (exists) { - return; - } - await fse.mkdir(path.dirname(dest), { recursive: true }); - await fse - .symlink( - path.relative(path.dirname(dest), src), - dest, - isWindows ? 'junction' : 'dir', - ) - .catch(error => { - console.error('Cannot link', from, 'to', to, error); - }); -}; - -interface ReadDirOptions { - filter?: (filePath: string) => boolean; -} - -export const readDirRecursive = async ( - dir: string, - options: ReadDirOptions = {}, -): Promise => { - const { filter } = options; - const files = await fse.readdir(dir, { withFileTypes: true }); - const filesAndDirs = await Promise.all( - files.map(async file => { - const resolvedPath = path.resolve(dir, file.name); - if (file.isDirectory()) { - return readDirRecursive(resolvedPath, options); - } else { - return filter && !filter(resolvedPath) ? [] : resolvedPath; - } - }), - ); - return filesAndDirs.flat(); -}; - -export const isFile = async (file: string) => { - try { - const stat = await fse.stat(file); - return stat.isFile(); - } catch (error: any) { - if (error.code === 'ENOENT') { - return false; - } - throw error; - } -}; - -export const findEntryFiles = async ( - rootDir: string, - entryFilter?: (filePath: string) => boolean, -) => { - const files = await readDirRecursive(rootDir, { filter: entryFilter }); - return files.filter( - file => - file.endsWith('.mjs') || file.endsWith('.cjs') || file.endsWith('.js'), - ); -}; - -export const findPackageParents = ( - pkg: TracedPackage, - version: string, - tracedFiles: Record, -) => { - const versionFiles: TracedFile[] = pkg.versions[version].files.map( - path => tracedFiles[path], - ); - - const parentPkgs = [ - ...new Set( - versionFiles.flatMap(file => - // Because it supports copyWholePackage configuration, not all files exist. - file?.parents - .map(parentPath => { - const parentFile = tracedFiles[parentPath]; - - // when parent does not exist, parent may be an entry file. - if (!parentFile || parentFile.pkgName === pkg.name) { - return null; - } - return `${parentFile.pkgName}@${parentFile.pkgVersion}`; - }) - .filter(Boolean), - ), - ), - ]; - return parentPkgs.filter(parentPkg => parentPkg) as string[]; -}; - -export const traceFiles = async ({ - entryFiles, - serverRootDir, - base = '/', - traceOptions, -}: { - entryFiles: string[]; - serverRootDir: string; - base?: string; - traceOptions?: NodeFileTraceOptions; -}) => { - return await nodeFileTrace(entryFiles, { - base, - processCwd: serverRootDir, - resolve: async (id, parent, job, isCjs) => { - if (id.startsWith('@modern-js/prod-server')) { - return require.resolve(id, { - paths: [require.resolve('@modern-js/app-tools')], - }); - } else { - return resolve(id, parent, job, isCjs); - } - }, - ...traceOptions, - }); -}; - -export const resolveTracedPath = async ( - base: string, - p: string, -): Promise => fse.realpath(path.resolve(base, p)); - -export const isSubPath = (parentPath: string, childPath: string) => { - if (!parentPath || !childPath) { - return false; - } - - const relative = path.relative(parentPath, childPath); - return relative && !relative.startsWith('..'); -}; diff --git a/packages/solutions/app-tools/src/plugins/deploy/exports.ts b/packages/solutions/app-tools/src/plugins/deploy/exports.ts deleted file mode 100644 index 3f24784cd6ff..000000000000 --- a/packages/solutions/app-tools/src/plugins/deploy/exports.ts +++ /dev/null @@ -1 +0,0 @@ -export { handleDependencies } from './dependencies'; diff --git a/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify.ts b/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify.ts index c2b339bdb51e..7443371fed48 100644 --- a/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify.ts +++ b/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify.ts @@ -4,8 +4,8 @@ import { ROUTE_SPEC_FILE, fs as fse, } from '@modern-js/utils'; +import { nodeDepEmit as handleDependencies } from 'ndepe'; import { isMainEntry } from '../../../utils/routes'; -import { handleDependencies } from '../dependencies'; import { type PluginItem, genPluginImportsCode, @@ -165,8 +165,11 @@ export const createNetlifyPreset: CreatePreset = ( } await handleDependencies({ appDir: appDirectory, - serverRootDir: funcsDirectory, + sourceDir: funcsDirectory, includeEntries: [require.resolve('@modern-js/prod-server')], + copyWholePackage(pkgName) { + return pkgName === '@modern-js/utils'; + }, }); }, }; diff --git a/packages/solutions/app-tools/src/plugins/deploy/platforms/node.ts b/packages/solutions/app-tools/src/plugins/deploy/platforms/node.ts index a953b0a2dc2d..e96f528977f7 100644 --- a/packages/solutions/app-tools/src/plugins/deploy/platforms/node.ts +++ b/packages/solutions/app-tools/src/plugins/deploy/platforms/node.ts @@ -5,7 +5,7 @@ import { chalk, fs as fse, } from '@modern-js/utils'; -import { handleDependencies } from '../dependencies'; +import { nodeDepEmit as handleDependencies } from 'ndepe'; import { type PluginItem, genPluginImportsCode, @@ -96,8 +96,11 @@ export const createNodePreset: CreatePreset = (appContext, config) => { // Because @modern-js/prod-server is an implicit dependency of the entry, so we add it to the include here. await handleDependencies({ appDir: appDirectory, - serverRootDir: outputDirectory, + sourceDir: outputDirectory, includeEntries: [require.resolve('@modern-js/prod-server')], + copyWholePackage(pkgName) { + return pkgName === '@modern-js/utils'; + }, entryFilter: filter, }); }, diff --git a/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel.ts b/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel.ts index 99b8d5fad433..122c40e1efb3 100644 --- a/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel.ts +++ b/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel.ts @@ -4,8 +4,8 @@ import { ROUTE_SPEC_FILE, fs as fse, } from '@modern-js/utils'; +import { nodeDepEmit as handleDependencies } from 'ndepe'; import { isMainEntry } from '../../../utils/routes'; -import { handleDependencies } from '../dependencies'; import { type PluginItem, genPluginImportsCode, @@ -169,8 +169,11 @@ export const createVercelPreset: CreatePreset = ( } await handleDependencies({ appDir: appDirectory, - serverRootDir: funcsDirectory, + sourceDir: funcsDirectory, includeEntries: [require.resolve('@modern-js/prod-server')], + copyWholePackage(pkgName) { + return pkgName === '@modern-js/utils'; + }, }); }, }; From 95b94571cd69a503490c8fde3499373c4a265e8a Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Fri, 13 Dec 2024 14:46:31 +0800 Subject: [PATCH 2/2] fix: lock --- pnpm-lock.yaml | 203 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 184 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af8ed5f1c752..0938247b4fbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3505,6 +3505,9 @@ importers: mlly: specifier: ^1.6.1 version: 1.7.3 + ndepe: + specifier: 0.1.4 + version: 0.1.4(encoding@0.1.13)(rollup@3.29.5) pkg-types: specifier: ^1.1.0 version: 1.1.1 @@ -3805,10 +3808,10 @@ importers: version: link:../../toolkit/utils '@storybook/react': specifier: ~7.6.1 - version: 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3) + version: 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3) storybook: specifier: ~7.6.1 - version: 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + version: 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: '@storybook/types': specifier: ~7.6.12 @@ -9774,6 +9777,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -9978,6 +9985,11 @@ packages: resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true + '@mapbox/node-pre-gyp@2.0.0-rc.0': + resolution: {integrity: sha512-nhSMNprz3WmeRvd8iUs5JqkKr0Ncx46JtPxM3AhXes84XpSJfmIwKeWXRpsr53S7kqPkQfPhzrMFUxSNb23qSA==} + engines: {node: '>=18'} + hasBin: true + '@mdx-js/loader@2.3.0': resolution: {integrity: sha512-IqsscXh7Q3Rzb+f5DXYk0HU71PK+WuFsEhf+mSV3fOhpLcEpgsHvTQ2h0T6TlZ5gHOaBeFjkXwB52by7ypMyNg==} peerDependencies: @@ -12816,6 +12828,11 @@ packages: engines: {node: '>=16'} hasBin: true + '@vercel/nft@0.27.9': + resolution: {integrity: sha512-pTs7OchHQmSYJPR0puVQCWw/NqzuvAtnAhBurz21lq4Y4KqWoMpYKqmikkETG5r1bHNCM/hQMZ5JiRr9mhOkyg==} + engines: {node: '>=16'} + hasBin: true + '@vitest/expect@0.33.0': resolution: {integrity: sha512-sVNf+Gla3mhTCxNJx+wJLDPp/WcstOe0Ksqz4Vec51MmgMth/ia0MGFEkIZmVGeTL5HtjYR4Wl/ZxBxBXZJTzQ==} @@ -12997,6 +13014,10 @@ packages: abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -13084,6 +13105,10 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -13778,6 +13803,10 @@ packages: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + chrome-trace-event@1.0.4: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} @@ -16077,6 +16106,10 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} @@ -17544,6 +17577,10 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} + minizlib@3.0.1: + resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} + engines: {node: '>= 18'} + mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} @@ -17563,6 +17600,14 @@ packages: engines: {node: '>=10'} hasBin: true + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + + mlly@1.6.1: + resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} + mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} @@ -17631,6 +17676,9 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + ndepe@0.1.4: + resolution: {integrity: sha512-7nDU02FP8huhswA1oarhpEmq6Vtf0ijL6wpY3WI867aBj4f5IKetEs90m24vifXNdChsyOYAN+ks4ywW5EgcOg==} + needle@3.3.1: resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} engines: {node: '>= 4.4.x'} @@ -17730,6 +17778,11 @@ packages: engines: {node: '>=6'} hasBin: true + nopt@8.0.0: + resolution: {integrity: sha512-1L/fTJ4UmV/lUxT2Uf006pfZKTvAgCF+chz+0OgBHO8u2Z67pE7AaAUUj7CJy0lXqHmymUvGFt6NE9R3HER0yw==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -19693,6 +19746,10 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + hasBin: true + rimraf@6.0.1: resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} engines: {node: 20 || >=22} @@ -20659,6 +20716,10 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} + telejson@7.2.0: resolution: {integrity: sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==} @@ -21807,6 +21868,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + yaml-front-matter@4.1.1: resolution: {integrity: sha512-ULGbghCLsN8Hs8vfExlqrJIe8Hl2TUjD7/zsIGMP8U+dgRXEsDXk4yydxeZJgdGiimP1XB7zhmhOB4/HyfqOyQ==} hasBin: true @@ -24255,6 +24320,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -24784,6 +24853,19 @@ snapshots: - encoding - supports-color + '@mapbox/node-pre-gyp@2.0.0-rc.0(encoding@0.1.13)': + dependencies: + consola: 3.2.3 + detect-libc: 2.0.3 + https-proxy-agent: 7.0.6 + node-fetch: 2.7.0(encoding@0.1.13) + nopt: 8.0.0 + semver: 7.6.3 + tar: 7.4.3 + transitivePeerDependencies: + - encoding + - supports-color + '@mdx-js/loader@2.3.0(webpack@5.97.1(@swc/core@1.3.42)(esbuild@0.17.19))': dependencies: '@mdx-js/mdx': 2.3.0 @@ -27432,7 +27514,7 @@ snapshots: '@storybook/components': 7.6.20(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@storybook/core-events': 7.6.20 '@storybook/csf': 0.1.11 - '@storybook/docs-tools': 7.6.20(encoding@0.1.13) + '@storybook/docs-tools': 7.6.20 '@storybook/global': 5.0.0 '@storybook/manager-api': 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@storybook/preview-api': 7.6.20 @@ -27458,7 +27540,7 @@ snapshots: - encoding - supports-color - '@storybook/builder-manager@7.6.20(encoding@0.1.13)': + '@storybook/builder-manager@7.6.20': dependencies: '@fal-works/esbuild-plugin-global-externals': 2.1.2 '@storybook/core-common': 7.6.20(encoding@0.1.13) @@ -27489,7 +27571,7 @@ snapshots: telejson: 7.2.0 tiny-invariant: 1.3.3 - '@storybook/cli@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': + '@storybook/cli@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/core': 7.26.0 '@babel/preset-env': 7.26.0(@babel/core@7.26.0) @@ -27498,10 +27580,10 @@ snapshots: '@storybook/codemod': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/core-events': 7.6.20 - '@storybook/core-server': 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + '@storybook/core-server': 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@storybook/csf-tools': 7.6.20 '@storybook/node-logger': 7.6.20 - '@storybook/telemetry': 7.6.20(encoding@0.1.13) + '@storybook/telemetry': 7.6.20 '@storybook/types': 7.6.20 '@types/semver': 7.5.8 '@yarnpkg/fslib': 2.10.3 @@ -27616,11 +27698,11 @@ snapshots: dependencies: ts-dedent: 2.2.0 - '@storybook/core-server@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': + '@storybook/core-server@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@aw-web-design/x-default-browser': 1.4.126 '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-manager': 7.6.20(encoding@0.1.13) + '@storybook/builder-manager': 7.6.20 '@storybook/channels': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/core-events': 7.6.20 @@ -27631,7 +27713,7 @@ snapshots: '@storybook/manager': 7.6.20 '@storybook/node-logger': 7.6.20 '@storybook/preview-api': 7.6.20 - '@storybook/telemetry': 7.6.20(encoding@0.1.13) + '@storybook/telemetry': 7.6.20 '@storybook/types': 7.6.20 '@types/detect-port': 1.3.5 '@types/node': 18.19.64 @@ -27692,7 +27774,7 @@ snapshots: '@storybook/docs-mdx@0.1.0': {} - '@storybook/docs-tools@7.6.20(encoding@0.1.13)': + '@storybook/docs-tools@7.6.20': dependencies: '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/preview-api': 7.6.20 @@ -27781,11 +27863,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@storybook/react@7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3)': + '@storybook/react@7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3)': dependencies: '@storybook/client-logger': 7.6.20 '@storybook/core-client': 7.6.20 - '@storybook/docs-tools': 7.6.20(encoding@0.1.13) + '@storybook/docs-tools': 7.6.20 '@storybook/global': 5.0.0 '@storybook/preview-api': 7.6.20 '@storybook/react-dom-shim': 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -27818,7 +27900,7 @@ snapshots: memoizerific: 1.11.3 qs: 6.13.0 - '@storybook/telemetry@7.6.20(encoding@0.1.13)': + '@storybook/telemetry@7.6.20': dependencies: '@storybook/client-logger': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) @@ -28685,6 +28767,25 @@ snapshots: - encoding - supports-color + '@vercel/nft@0.27.9(encoding@0.1.13)(rollup@3.29.5)': + dependencies: + '@mapbox/node-pre-gyp': 2.0.0-rc.0(encoding@0.1.13) + '@rollup/pluginutils': 5.1.3(rollup@3.29.5) + acorn: 8.14.0 + acorn-import-attributes: 1.9.5(acorn@8.14.0) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + node-gyp-build: 4.8.2 + picomatch: 4.0.2 + resolve-from: 5.0.0 + transitivePeerDependencies: + - encoding + - rollup + - supports-color + '@vitest/expect@0.33.0': dependencies: '@vitest/spy': 0.33.0 @@ -28695,12 +28796,12 @@ snapshots: dependencies: '@vitest/utils': 0.33.0 p-limit: 4.0.0 - pathe: 1.1.1 + pathe: 1.1.2 '@vitest/snapshot@0.33.0': dependencies: magic-string: 0.30.14 - pathe: 1.1.1 + pathe: 1.1.2 pretty-format: 29.7.0 '@vitest/spy@0.33.0': @@ -28960,6 +29061,8 @@ snapshots: abbrev@1.1.1: {} + abbrev@2.0.0: {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -28986,6 +29089,10 @@ snapshots: dependencies: acorn: 8.11.3 + acorn-import-attributes@1.9.5(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + acorn-jsx@5.3.2(acorn@7.4.1): dependencies: acorn: 7.4.1 @@ -29032,6 +29139,8 @@ snapshots: transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -29921,6 +30030,8 @@ snapshots: chownr@2.0.0: {} + chownr@3.0.0: {} + chrome-trace-event@1.0.4: {} chromium-bidi@0.4.7(devtools-protocol@0.0.1107588): @@ -32637,6 +32748,13 @@ snapshots: transitivePeerDependencies: - supports-color + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.3 + debug: 4.3.7(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color + human-id@1.0.2: {} human-signals@2.1.0: {} @@ -35056,6 +35174,11 @@ snapshots: minipass: 3.3.3 yallist: 4.0.0 + minizlib@3.0.1: + dependencies: + minipass: 7.1.2 + rimraf: 5.0.10 + mitt@3.0.0: {} mixme@0.5.4: {} @@ -35068,6 +35191,15 @@ snapshots: mkdirp@1.0.4: {} + mkdirp@3.0.1: {} + + mlly@1.6.1: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + mlly@1.7.3: dependencies: acorn: 8.14.0 @@ -35138,6 +35270,20 @@ snapshots: natural-compare@1.4.0: {} + ndepe@0.1.4(encoding@0.1.13)(rollup@3.29.5): + dependencies: + '@vercel/nft': 0.27.9(encoding@0.1.13)(rollup@3.29.5) + debug: 4.3.7(supports-color@5.5.0) + fs-extra: 11.2.0 + mlly: 1.6.1 + pkg-types: 1.2.1 + pkg-up: 3.1.0 + semver: 7.6.3 + transitivePeerDependencies: + - encoding + - rollup + - supports-color + needle@3.3.1: dependencies: iconv-lite: 0.6.3 @@ -35230,6 +35376,10 @@ snapshots: dependencies: abbrev: 1.1.1 + nopt@8.0.0: + dependencies: + abbrev: 2.0.0 + normalize-package-data@2.5.0: dependencies: hosted-git-info: 2.8.9 @@ -37648,6 +37798,10 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@5.0.10: + dependencies: + glob: 10.4.5 + rimraf@6.0.1: dependencies: glob: 11.0.0 @@ -38356,9 +38510,9 @@ snapshots: store2@2.14.3: {} - storybook@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): + storybook@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - '@storybook/cli': 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + '@storybook/cli': 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - encoding @@ -38790,6 +38944,15 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 + tar@7.4.3: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.1 + mkdirp: 3.0.1 + yallist: 5.0.0 + telejson@7.2.0: dependencies: memoizerific: 1.11.3 @@ -39702,7 +39865,7 @@ snapshots: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) mlly: 1.7.3 - pathe: 1.1.1 + pathe: 1.1.2 picocolors: 1.1.1 vite: 4.5.2(@types/node@18.19.64)(less@4.2.1)(sass@1.54.4)(terser@5.36.0) transitivePeerDependencies: @@ -40177,6 +40340,8 @@ snapshots: yallist@4.0.0: {} + yallist@5.0.0: {} + yaml-front-matter@4.1.1: dependencies: commander: 6.2.1