DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
chore(bumpp): pin exact version and regenerate patch
hairyf658a53018ff8
diff --git a/package.json b/package.jsonindex 148416f6..85c43a2e 100644--- a/package.json+++ b/package.json@@ -31,7 +31,7 @@"@types/react": "^18.3.12","@types/react-dom": "^18.3.1","@vitejs/plugin-react": "^4.6.0",- "bumpp": "^12.2.1",+ "bumpp": "12.2.1","eslint": "^10.8.1","eslint-plugin-react-refresh": "^0.5.4","tailwindcss": "4.1.11",diff --git a/patches/bumpp.patch b/patches/bumpp.patchindex 946074fc..c5b8dad0 100644--- a/patches/bumpp.patch+++ b/patches/bumpp.patch@@ -1,91 +1,97 @@-diff --git a/dist/shared/bumpp.0D8oR-Fd.mjs b/dist/shared/bumpp.0D8oR-Fd.mjs-index bae655794606bdf7f45d949b9bcb3a4260ef0c9a..b514ee6d37c384ccec32a3272979d66890e3cfc1 100644---- a/dist/shared/bumpp.0D8oR-Fd.mjs-+++ b/dist/shared/bumpp.0D8oR-Fd.mjs-@@ -6942,7 +6942,12 @@ async function updateFile(relPath, operation) {- case "jsr.jsonc":- case "deno.json":- case "deno.jsonc":-+ case "tauri.conf.json":- return updateManifestFile(relPath, operation);-+ case "cargo.toml":-+ return updateCargoToml(relPath, operation);-+ case "cargo.lock":-+ return updateCargoLock(relPath, operation);- default:- return updateTextFile(relPath, operation);- }-@@ -6952,7 +6957,9 @@ async function updateManifestFile(relPath, operation) {- const { newVersion } = operation.state;- let modified = false;- const file = await readJsoncFile(relPath, cwd);-- if (!isManifest(file.data)) {-+ // Support files with only version field (like tauri.conf.json)-+ const hasVersion = file.data && typeof file.data === "object" && typeof file.data.version === "string";-+ if (!isManifest(file.data) && !hasVersion) {- return modified;- }- if (file.data.version == null) {-@@ -6967,6 +6974,62 @@ async function updateManifestFile(relPath, operation) {- }- return modified;+diff --git a/dist/config-uYUPRhMz.mjs b/dist/config-uYUPRhMz.mjs+index 8faa393..0b3d58b 100644+--- a/dist/config-uYUPRhMz.mjs++++ b/dist/config-uYUPRhMz.mjs+@@ -6304,6 +6304,9 @@ async function updateFile(relPath, operation) {+ case "jsr.jsonc":+ case "deno.json":+ case "deno.jsonc": return updateManifestFile(relPath, operation);++ case "tauri.conf.json": return updateManifestFile(relPath, operation);++ case "cargo.toml": return updateCargoToml(relPath, operation);++ case "cargo.lock": return updateCargoLock(relPath, operation);+ default: return updateTextFile(relPath, operation);+ }}+@@ -6320,7 +6323,9 @@ async function updateManifestFile(relPath, operation) {+ const { newVersion } = operation.state;+ let modified = false;+ const file = await readJsoncFile(relPath, cwd);+- if (!isManifest(file.data)) return modified;++ // Support files with only a version field (like tauri.conf.json)++ const hasVersion = file.data && typeof file.data === "object" && typeof file.data.version === "string";++ if (!isManifest(file.data) && !hasVersion) return modified;+ if (file.data.version == null) return modified;+ if (file.data.version !== newVersion) {+ file.modified.push([["version"], newVersion]);+@@ -6335,6 +6340,71 @@ async function updateManifestFile(relPath, operation) {+ return modified;+ }+ /**++* Updates the version number in src-tauri/Cargo.toml (only the [package] section).++*++* @returns - `true` if the file was actually modified++*/+async function updateCargoToml(relPath, operation) {-+ const { cwd } = operation.options;-+ const { currentVersion, newVersion } = operation.state;-+ let modified = false;-+ const file = await readTextFile(relPath, cwd);-+ // Match version in [package] section: version = "x.y.z"-+ const versionPattern = new RegExp(`(^\\s*version\\s*=\\s*["']?)${currentVersion.replace(/(\W)/g, "\\$1")}(["']?\\s*$)`, "m");-+ if (versionPattern.test(file.data)) {-+ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);-+ await writeTextFile(file);-+ modified = true;-+ }-+ return modified;++ const { cwd } = operation.options;++ const { currentVersion, newVersion } = operation.state;++ let modified = false;++ const file = await readTextFile(relPath, cwd);++ // Match version in [package] section: version = "x.y.z"++ const versionPattern = new RegExp(`(^\\s*version\\s*=\\s*["']?)${currentVersion.replace(/(\W)/g, "\\$1")}(["']?\\s*$)`, "m");++ if (versionPattern.test(file.data)) {++ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ return modified;+}++/**++* Updates the version number in src-tauri/Cargo.lock (only the main package).++*++* @returns - `true` if the file was actually modified++*/+async function updateCargoLock(relPath, operation) {-+ const { cwd } = operation.options;-+ const { currentVersion, newVersion } = operation.state;-+ let modified = false;-+ const file = await readTextFile(relPath, cwd);-+ // Only update the main package version, not dependencies-+ // Read the package name from Cargo.toml to identify the main package-+ const lockDir = path.dirname(path.join(cwd, relPath));-+ const cargoTomlPath = path.join(lockDir, "Cargo.toml");-+ let packageName = null;-+ if (existsSync(cargoTomlPath)) {-+ const cargoTomlRelPath = path.relative(cwd, cargoTomlPath);-+ const cargoTomlContent = await readTextFile(cargoTomlRelPath, cwd);-+ const nameMatch = cargoTomlContent.data.match(/^name\s*=\s*["']([^"']+)["']/m);-+ if (nameMatch) {-+ packageName = nameMatch[1];-+ }-+ }-+ if (packageName) {-+ // Match version only for the main package: [[package]] followed by name = "package-name" followed by version = "x.y.z"-+ // Use multiline mode and allow flexible whitespace-+ const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");-+ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");-+ // Pattern: [[package]] ... name = "package-name" ... version = "currentVersion"-+ const mainPackagePattern = new RegExp(`(\\[\\[package\\]\\][\\s\\S]*?name\\s*=\\s*["']${escapedPackageName}["'][\\s\\S]*?version\\s*=\\s*["']?)${escapedCurrentVersion}(["'])`, "m");-+ if (mainPackagePattern.test(file.data)) {-+ file.data = file.data.replace(mainPackagePattern, `$1${newVersion}$2`);-+ await writeTextFile(file);-+ modified = true;-+ }-+ } else {-+ // Fallback: only replace first occurrence (likely the main package)-+ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");-+ const versionPattern = new RegExp(`(^version\\s*=\\s*["']?)${escapedCurrentVersion}(["']\\s*$)`, "m");-+ if (versionPattern.test(file.data)) {-+ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);-+ await writeTextFile(file);-+ modified = true;-+ }-+ }-+ return modified;++ const { cwd } = operation.options;++ const { currentVersion, newVersion } = operation.state;++ let modified = false;++ const file = await readTextFile(relPath, cwd);++ // Only update the main package version, not dependencies.++ // Read the package name from Cargo.toml to identify the main package.++ const lockDir = path$1.dirname(path$1.join(cwd, relPath));++ const cargoTomlPath = path$1.join(lockDir, "Cargo.toml");++ let packageName = null;++ if (existsSync(cargoTomlPath)) {++ const cargoTomlRelPath = path$1.relative(cwd, cargoTomlPath);++ const cargoTomlContent = await readTextFile(cargoTomlRelPath, cwd);++ const nameMatch = cargoTomlContent.data.match(/^name\s*=\s*["']([^"']+)["']/m);++ if (nameMatch) {++ packageName = nameMatch[1];++ }++ }++ if (packageName) {++ // Match version only for the main package: [[package]] followed by++ // name = "package-name" followed by version = "x.y.z"++ const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ const mainPackagePattern = new RegExp(`(\\[\\[package\\]\\][\\s\\S]*?name\\s*=\\s*["']${escapedPackageName}["'][\\s\\S]*?version\\s*=\\s*["']?)${escapedCurrentVersion}(["'])`, "m");++ if (mainPackagePattern.test(file.data)) {++ file.data = file.data.replace(mainPackagePattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ } else {++ // Fallback: only replace the first occurrence (likely the main package)++ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ const versionPattern = new RegExp(`(^version\\s*=\\s*["']?)${escapedCurrentVersion}(["']\\s*$)`, "m");++ if (versionPattern.test(file.data)) {++ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ }++ return modified;+}- async function updateTextFile(relPath, operation) {- const { cwd } = operation.options;- const { currentVersion, newVersion } = operation.state;\ No newline at end of file++/**+ * Updates all occurrences of the version number in the specified text file.+ *+ * @returns - `true` if the file was actually modifieddiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 4aedde24..88d635db 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -6,7 +6,7 @@ settings:patchedDependencies:bumpp:- hash: cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9+ hash: 362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3acpath: patches/bumpp.patchimporters:@@ -54,8 +54,8 @@ importers:specifier: ^4.6.0version: 4.7.0([email protected](@types/[email protected])([email protected])([email protected])([email protected]))bumpp:- specifier: ^12.2.1- version: 12.2.1(patch_hash=cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9)+ specifier: 12.2.1+ version: 12.2.1(patch_hash=362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3ac)eslint:specifier: ^10.8.1version: 10.8.1([email protected])@@ -3300,7 +3300,7 @@ snapshots:- [email protected](patch_hash=cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9):+ [email protected](patch_hash=362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3ac):dependencies:args-tokenizer: 0.3.0cac: 7.0.0diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lockindex d9057352..3c764f2b 100644--- a/src-tauri/Cargo.lock+++ b/src-tauri/Cargo.lock@@ -770,7 +770,7 @@ dependencies = [[[package]]name = "deepseek-harness-desktop"-version = "0.2.0"+version = "0.2.1"dependencies = ["async-trait","flate2",