Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
Add Tauri application menu, introduce `--iterative-build` CLI option
Tw93ce794a86ccbb
diff --git a/dist/cli.js b/dist/cli.jsindex c892e446..c9e2b78b 100755--- a/dist/cli.js+++ b/dist/cli.js@@ -63,6 +63,7 @@ var scripts = {cli: "cross-env NODE_ENV=development rollup -c -w","cli:build": "cross-env NODE_ENV=production rollup -c",test: "pnpm run cli:build && cross-env PAKE_CREATE_APP=1 node tests/index.js",+ "test:unit": "vitest run",format: "prettier --write . --ignore-unknown && find tests -name '*.js' -exec sed -i '' 's/[[:space:]]*$//' {} \\; && cd src-tauri && cargo fmt --verbose","format:check": "prettier --check . --ignore-unknown",update: "pnpm update --verbose && cd src-tauri && cargo update",@@ -107,7 +108,8 @@ var devDependencies = {rollup: "^4.52.5","rollup-plugin-typescript2": "^0.36.0",tslib: "^2.8.1",- typescript: "^5.9.3"+ typescript: "^5.9.3",+ vitest: "^4.0.15"};var packageJson = {name: name,@@ -420,6 +422,9 @@ function generateSafeFilename(name) {.replace(/\.+$/g, '').slice(0, 255);}+function getSafeAppName(name) {+ return generateSafeFilename(name).toLowerCase();+}function generateLinuxPackageName(name) {return name.toLowerCase()@@ -447,12 +452,6 @@ function generateIdentifierSafeName(name) {return cleaned;}-/**- * Helper function to generate safe lowercase app name for file paths- */-function getSafeAppName(name) {- return generateSafeFilename(name).toLowerCase();-}async function mergeConfig(url, options, tauriConf) {// Ensure .pake directory exists and copy source templates if neededconst srcTauriDir = path.join(npmDirectory, 'src-tauri');@@ -1123,7 +1122,7 @@ class MacBuilder extends BaseBuilder {this.buildArch = validArchs.includes(options.targets || '')? options.targets: 'auto';- if (process.env.PAKE_CREATE_APP === '1') {+ if (options.iterativeBuild || process.env.PAKE_CREATE_APP === '1') {this.buildFormat = 'app';}else {@@ -1358,7 +1357,18 @@ const DEFAULT_PAKE_OPTIONS = {userAgent: '',showSystemTray: false,multiArch: false,- targets: 'deb',+ targets: (() => {+ switch (process.platform) {+ case 'linux':+ return 'deb';+ case 'darwin':+ return 'dmg';+ case 'win32':+ return 'msi';+ default:+ return 'deb';+ }+ })(),useLocalFile: false,systemTrayIcon: '',proxyUrl: '',@@ -1373,6 +1383,7 @@ const DEFAULT_PAKE_OPTIONS = {multiInstance: false,startToTray: false,forceInternalNavigation: false,+ iterativeBuild: false,zoom: 100,minWidth: 0,minHeight: 0,@@ -1936,6 +1947,9 @@ program.addOption(new Option('--ignore-certificate-errors', 'Ignore certificate errors (for self-signed certificates)').default(DEFAULT_PAKE_OPTIONS.ignoreCertificateErrors).hideHelp())+ .addOption(new Option('--iterative-build', 'Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging')+ .default(DEFAULT_PAKE_OPTIONS.iterativeBuild)+ .hideHelp()).version(packageJson.version, '-v, --version').configureHelp({sortSubcommands: true,diff --git a/docs/cli-usage.md b/docs/cli-usage.mdindex 413f1227..ca1266b0 100644--- a/docs/cli-usage.md+++ b/docs/cli-usage.md@@ -401,6 +401,14 @@ pake https://github.com --name GitHub --keep-binary**Output**: Creates both installer and standalone executable (`AppName-binary` on Unix, `AppName.exe` on Windows).+#### [iterative-build]++Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging. Default is `false`.++```shell+--iterative-build+```+#### [multi-instance]Allow the packaged app to run more than one instance at the same time. Default is `false`, which means launching a second instance simply focuses the existing window. Enable this when you need to open several windows of the same app simultaneously.diff --git a/docs/cli-usage_CN.md b/docs/cli-usage_CN.mdindex c3bbf8de..1536b1a8 100644--- a/docs/cli-usage_CN.md+++ b/docs/cli-usage_CN.md@@ -399,6 +399,14 @@ pake https://github.com --name GitHub --keep-binary**输出结果**:同时创建安装包和独立可执行文件(Unix 系统为 `AppName-binary`,Windows 为 `AppName.exe`)。+#### [iterative-build]++开启快速构建模式(仅生成 app,不生成 dmg/deb/msi),适用于调试。默认为 `false`。++```shell+--iterative-build+```+#### [multi-instance]允许打包后的应用同时运行多个实例。默认为 `false`,此时再次启动只会聚焦已有窗口。启用该选项后,可以同时打开同一个应用的多个窗口。diff --git a/package.json b/package.jsonindex ad779598..e6a30994 100644--- a/package.json+++ b/package.json@@ -40,6 +40,7 @@"cli": "cross-env NODE_ENV=development rollup -c -w","cli:build": "cross-env NODE_ENV=production rollup -c","test": "pnpm run cli:build && cross-env PAKE_CREATE_APP=1 node tests/index.js",+ "test:unit": "vitest run","format": "prettier --write . --ignore-unknown && find tests -name '*.js' -exec sed -i '' 's/[[:space:]]*$//' {} \\; && cd src-tauri && cargo fmt --verbose","format:check": "prettier --check . --ignore-unknown","update": "pnpm update --verbose && cd src-tauri && cargo update",@@ -84,6 +85,7 @@"rollup": "^4.52.5","rollup-plugin-typescript2": "^0.36.0","tslib": "^2.8.1",- "typescript": "^5.9.3"+ "typescript": "^5.9.3",+ "vitest": "^4.0.15"}}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 243d4bdb..d5f084b6 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -111,12 +111,171 @@ importers:typescript:specifier: ^5.9.3version: 5.9.3+ vitest:+ specifier: ^4.0.15+ version: 4.0.15(@types/[email protected])([email protected])packages:'@emnapi/[email protected]':resolution: {integrity: sha512-obtUmAHTMjll499P+D9A3axeJFlhdjOWdKUNs/U6QIGT7V5RjcUW1xToAzjvmgTSQhDbYn/NwfTRoJcQ2rNBxA==}+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [aix]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [darwin]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [darwin]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [freebsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [freebsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}+ engines: {node: '>=18'}+ cpu: [loong64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}+ engines: {node: '>=18'}+ cpu: [mips64el]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}+ engines: {node: '>=18'}+ cpu: [riscv64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}+ engines: {node: '>=18'}+ cpu: [s390x]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [netbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [netbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [openbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openharmony]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [sunos]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [win32]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [win32]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [win32]+'@img/[email protected]':resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}@@ -425,6 +584,9 @@ packages:resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==}engines: {node: '>=18'}+ '@standard-schema/[email protected]':+ resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==}+'@tauri-apps/[email protected]':resolution: {integrity: sha512-qD5tMjh7utwBk9/5PrTA/aGr3i5QaJ/Mlt7p8NilQ45WgbifUNPyKWsA63iQ8YfQq6R8ajMapU+/Q8nMcPRLNw==}@@ -502,9 +664,15 @@ packages:'@tokenizer/[email protected]':resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==}+ '@types/[email protected]':+ resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}+'@types/[email protected]':resolution: {integrity: sha512-OS//b51j9uyR3zvwD04Kfs5kHpve2qalQ18JhY/ho3voGYUTPLEG90/ocfKPI48hyHH8T04f7KEEbK6Ue60oZQ==}+ '@types/[email protected]':+ resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}+'@types/[email protected]':resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}@@ -529,6 +697,35 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-IlDFnfSVfYQD+cKIg63DEXn3RFmd7W1iYtKQsJodcHK9R1yr8aKbKaPKfBxzPpcHCq2DU8zUq4PIPmy19Thjfg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-Gfyva9/GxPAWXIWjyGDli9O+waHDC0Q0jaLdFP1qPAUUfo1FEXPXUfUkp3eZA0sSq340vPycSyOlYUeM15Ft1w==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-CZ28GLfOEIFkvCFngN8Sfx5h+Se0zN+h4B7yOsPVCcgtiO7t5jt9xQh2E1UkFep+eb9fjyMfuC5gBypwb07fvQ==}+ peerDependencies:+ msw: ^2.4.9+ vite: ^6.0.0 || ^7.0.0-0+ peerDependenciesMeta:+ msw:+ optional: true+ vite:+ optional: true++ '@vitest/[email protected]':+ resolution: {integrity: sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-+A+yMY8dGixUhHmNdPUxOh0la6uVzun86vAbuMT3hIDxMrAOmn5ILBHm8ajrqHE0t8R9T1dGnde1A5DTnmi3qw==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-A7Ob8EdFZJIBjLjeO0DZF4lqR6U7Ydi5/5LIZ0xcI+23lYlsYJAfGn8PrIWTYdZQRNnSRlzhg0zyGu37mVdy5g==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-+EIjOJmnY6mIfdXtE/bnozKEvTC4Uczg19yeZ2vtCz5Yyb0QQ31QWVQ8hswJ3Ysx/K2EqaNsVanjr//2+P3FHw==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==}+resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}engines: {node: '>=6.5'}@@ -557,6 +754,10 @@ packages:resolution: {integrity: sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==}engines: {node: '>= 6.0.0'}+ resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}@@ -595,6 +796,10 @@ packages:resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==}engines: {node: '>=16'}+ resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}@@ -695,6 +900,9 @@ packages:resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}+resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}engines: {node: '>= 0.4'}@@ -703,6 +911,11 @@ packages:resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==}+ engines: {node: '>=18'}+ hasBin: true+resolution: {integrity: sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==}engines: {node: '>=12'}@@ -710,6 +923,9 @@ packages:resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}+ resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}+resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}engines: {node: '>=6'}@@ -722,6 +938,10 @@ packages:resolution: {integrity: sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==}engines: {node: ^18.19.0 || >=20.5.0}+ resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==}+ engines: {node: '>=12.0.0'}+resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}engines: {node: '>=12.0.0'}@@ -917,6 +1137,9 @@ packages:resolution: {integrity: sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==}+ resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}+resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}engines: {node: '>=8'}@@ -940,10 +1163,18 @@ packages:resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}+ resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}+ hasBin: true+resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==}engines: {node: '>=18'}+ resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}+resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}engines: {node: '>=18'}@@ -984,10 +1215,16 @@ packages:resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}engines: {node: '>=12'}+ resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}+resolution: {integrity: sha512-peBp3qZyuS6cNIJ2akRNG1uo1WJ1d0wTxg/fxMdZ0BqCVhx242bSFHM9eNqflfJVS9SsgkzgT/1UgnsurBOTMg==}engines: {node: '>=14.16'}+ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}+resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}engines: {node: '>=8.6'}@@ -1004,6 +1241,10 @@ packages:resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==}engines: {node: '>=14.19.0'}+ resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}+ engines: {node: ^10 || ^12 || >=14}+resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}engines: {node: '>=14'}@@ -1103,6 +1344,9 @@ packages:resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}engines: {node: '>=8'}+ resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}+resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}engines: {node: '>=14'}@@ -1116,6 +1360,10 @@ packages:resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==}+ resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}@@ -1123,6 +1371,12 @@ packages:resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}++ resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}+resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}engines: {node: '>=18'}@@ -1170,6 +1424,21 @@ packages:engines: {node: '>=10'}hasBin: true+ resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}++ resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}+ engines: {node: '>=12.0.0'}++ resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==}+ engines: {node: '>=14.0.0'}+resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==}@@ -1212,6 +1481,80 @@ packages:resolution: {integrity: sha512-+dwUY4L35XFYEzE+OAL3sarJdUioVovq+8f7lcIJ7wnmnYQV5UD1Y/lcwaMSyaQ6Bj3JMj1XSTjZbNLHn/19yA==}engines: {node: '>=18'}+ resolution: {integrity: sha512-ITcnkFeR3+fI8P1wMgItjGrR10170d8auB4EpMLPqmx6uxElH3a/hHGQabSHKdqd4FXWO1nFIp9rRn7JQ34ACQ==}+ engines: {node: ^20.19.0 || >=22.12.0}+ hasBin: true+ peerDependencies:+ '@types/node': ^20.19.0 || >=22.12.0+ jiti: '>=1.21.0'+ less: ^4.0.0+ lightningcss: ^1.21.0+ sass: ^1.70.0+ sass-embedded: ^1.70.0+ stylus: '>=0.54.8'+ sugarss: ^5.0.0+ terser: ^5.16.0+ tsx: ^4.8.1+ yaml: ^2.4.2+ peerDependenciesMeta:+ '@types/node':+ optional: true+ jiti:+ optional: true+ less:+ optional: true+ lightningcss:+ optional: true+ sass:+ optional: true+ sass-embedded:+ optional: true+ stylus:+ optional: true+ sugarss:+ optional: true+ terser:+ optional: true+ tsx:+ optional: true+ yaml:+ optional: true++ resolution: {integrity: sha512-n1RxDp8UJm6N0IbJLQo+yzLZ2sQCDyl1o0LeugbPWf8+8Fttp29GghsQBjYJVmWq3gBFfe9Hs1spR44vovn2wA==}+ engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}+ hasBin: true+ peerDependencies:+ '@edge-runtime/vm': '*'+ '@opentelemetry/api': ^1.9.0+ '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0+ '@vitest/browser-playwright': 4.0.15+ '@vitest/browser-preview': 4.0.15+ '@vitest/browser-webdriverio': 4.0.15+ '@vitest/ui': 4.0.15+ happy-dom: '*'+ jsdom: '*'+ peerDependenciesMeta:+ '@edge-runtime/vm':+ optional: true+ '@opentelemetry/api':+ optional: true+ '@types/node':+ optional: true+ '@vitest/browser-playwright':+ optional: true+ '@vitest/browser-preview':+ optional: true+ '@vitest/browser-webdriverio':+ optional: true+ '@vitest/ui':+ optional: true+ happy-dom:+ optional: true+ jsdom:+ optional: true+resolution: {integrity: sha512-4rnvd3A1t16PWzrBUcSDZqcAmsUIy4minDXT/CZ8F2mVDgd65i4Aalimgz1aQkRGU0iH5eT5+6Rx2TK8o443Pg==}@@ -1220,6 +1563,11 @@ packages:engines: {node: '>= 8'}hasBin: true+ resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}+ engines: {node: '>=8'}+ hasBin: true+resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==}engines: {node: '>=12'}@@ -1251,6 +1599,84 @@ snapshots:tslib: 2.8.1optional: true+ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true+'@img/[email protected]':optionalDependencies:'@img/sharp-libvips-darwin-arm64': 1.0.4@@ -1477,6 +1903,8 @@ snapshots:'@sindresorhus/[email protected]': {}+ '@standard-schema/[email protected]': {}+'@tauri-apps/[email protected]': {}'@tauri-apps/[email protected]':@@ -1528,8 +1956,15 @@ snapshots:'@tokenizer/[email protected]': {}+ '@types/[email protected]':+ dependencies:+ '@types/deep-eql': 4.0.2+ assertion-error: 2.0.1+'@types/[email protected]': {}+ '@types/[email protected]': {}+'@types/[email protected]': {}'@types/[email protected]':@@ -1561,6 +1996,45 @@ snapshots:'@types/configstore': 6.0.2boxen: 7.1.1+ '@vitest/[email protected]':+ dependencies:+ '@standard-schema/spec': 1.0.0+ '@types/chai': 5.2.3+ '@vitest/spy': 4.0.15+ '@vitest/utils': 4.0.15+ chai: 6.2.1+ tinyrainbow: 3.0.3++ dependencies:+ '@vitest/spy': 4.0.15+ estree-walker: 3.0.3+ magic-string: 0.30.21+ optionalDependencies:+ vite: 7.2.7(@types/[email protected])([email protected])++ '@vitest/[email protected]':+ dependencies:+ tinyrainbow: 3.0.3++ '@vitest/[email protected]':+ dependencies:+ '@vitest/utils': 4.0.15+ pathe: 2.0.3++ '@vitest/[email protected]':+ dependencies:+ '@vitest/pretty-format': 4.0.15+ magic-string: 0.30.21+ pathe: 2.0.3++ '@vitest/[email protected]': {}++ '@vitest/[email protected]':+ dependencies:+ '@vitest/pretty-format': 4.0.15+ tinyrainbow: 3.0.3+dependencies:event-target-shim: 5.0.1@@ -1579,6 +2053,8 @@ snapshots:+ [email protected]: {}+@@ -1634,6 +2110,8 @@ snapshots:+ [email protected]: {}+@@ -1720,6 +2198,8 @@ snapshots:+ [email protected]: {}+dependencies:es-errors: 1.3.0@@ -1731,10 +2211,43 @@ snapshots:has-tostringtag: 1.0.2hasown: 2.0.2+ optionalDependencies:+ '@esbuild/aix-ppc64': 0.25.12+ '@esbuild/android-arm': 0.25.12+ '@esbuild/android-arm64': 0.25.12+ '@esbuild/android-x64': 0.25.12+ '@esbuild/darwin-arm64': 0.25.12+ '@esbuild/darwin-x64': 0.25.12+ '@esbuild/freebsd-arm64': 0.25.12+ '@esbuild/freebsd-x64': 0.25.12+ '@esbuild/linux-arm': 0.25.12+ '@esbuild/linux-arm64': 0.25.12+ '@esbuild/linux-ia32': 0.25.12+ '@esbuild/linux-loong64': 0.25.12+ '@esbuild/linux-mips64el': 0.25.12+ '@esbuild/linux-ppc64': 0.25.12+ '@esbuild/linux-riscv64': 0.25.12+ '@esbuild/linux-s390x': 0.25.12+ '@esbuild/linux-x64': 0.25.12+ '@esbuild/netbsd-arm64': 0.25.12+ '@esbuild/netbsd-x64': 0.25.12+ '@esbuild/openbsd-arm64': 0.25.12+ '@esbuild/openbsd-x64': 0.25.12+ '@esbuild/openharmony-arm64': 0.25.12+ '@esbuild/sunos-x64': 0.25.12+ '@esbuild/win32-arm64': 0.25.12+ '@esbuild/win32-ia32': 0.25.12+ '@esbuild/win32-x64': 0.25.12++ dependencies:+ '@types/estree': 1.0.8+@@ -1754,6 +2267,8 @@ snapshots:strip-final-newline: 4.0.0yoctocolors: 2.1.2+ [email protected]: {}+optionalDependencies:picomatch: 4.0.3@@ -1925,6 +2440,10 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.5.5+ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.5+dependencies:semver: 6.3.1@@ -1941,11 +2460,15 @@ snapshots:+ [email protected]: {}+dependencies:path-key: 4.0.0unicorn-magic: 0.3.0+ [email protected]: {}+dependencies:mimic-function: 5.0.1@@ -1987,8 +2510,12 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -1999,6 +2526,12 @@ snapshots:+ dependencies:+ nanoid: 3.3.11+ picocolors: 1.1.1+ source-map-js: 1.2.1+@@ -2142,6 +2675,8 @@ snapshots:+ [email protected]: {}+@@ -2152,6 +2687,8 @@ snapshots:+ [email protected]: {}+dependencies:buffer-from: 1.1.2@@ -2159,6 +2696,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -2209,6 +2750,17 @@ snapshots:commander: 2.20.3source-map-support: 0.5.21+ [email protected]: {}++ [email protected]: {}++ dependencies:+ fdir: 6.5.0([email protected])+ picomatch: 4.0.3++ [email protected]: {}+dependencies:tmp: 0.2.5@@ -2247,12 +2799,67 @@ snapshots:semver: 7.7.3xdg-basedir: 5.1.0+ dependencies:+ esbuild: 0.25.12+ fdir: 6.5.0([email protected])+ picomatch: 4.0.3+ postcss: 8.5.6+ rollup: 4.52.5+ tinyglobby: 0.2.15+ optionalDependencies:+ '@types/node': 20.19.23+ fsevents: 2.3.3+ terser: 5.44.0++ dependencies:+ '@vitest/expect': 4.0.15+ '@vitest/pretty-format': 4.0.15+ '@vitest/runner': 4.0.15+ '@vitest/snapshot': 4.0.15+ '@vitest/spy': 4.0.15+ '@vitest/utils': 4.0.15+ es-module-lexer: 1.7.0+ expect-type: 1.3.0+ magic-string: 0.30.21+ obug: 2.1.1+ pathe: 2.0.3+ picomatch: 4.0.3+ std-env: 3.10.0+ tinybench: 2.9.0+ tinyexec: 1.0.2+ tinyglobby: 0.2.15+ tinyrainbow: 3.0.3+ vite: 7.2.7(@types/[email protected])([email protected])+ why-is-node-running: 2.3.0+ optionalDependencies:+ '@types/node': 20.19.23+ transitivePeerDependencies:+ - jiti+ - less+ - lightningcss+ - msw+ - sass+ - sass-embedded+ - stylus+ - sugarss+ - terser+ - tsx+ - yaml+dependencies:isexe: 2.0.0+ dependencies:+ siginfo: 2.0.0+ stackback: 0.0.2+dependencies:string-width: 5.1.2diff --git a/vitest.config.ts b/vitest.config.tsnew file mode 100644index 00000000..e8e1a11e--- /dev/null+++ b/vitest.config.ts@@ -0,0 +1,15 @@++import { defineConfig } from 'vitest/config';+import path from 'path';++export default defineConfig({+ test: {+ environment: 'node',+ include: ['bin/**/*.{test,spec}.ts', 'tests/unit/**/*.{test,spec}.ts'],+ },+ resolve: {+ alias: {+ '@': path.resolve(__dirname, './bin'),+ },+ },+});