@andyqiu/codeforge 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20166,7 +20166,7 @@ var toolPolicyServer = async (ctx) => {
20166
20166
  var handler19 = toolPolicyServer;
20167
20167
 
20168
20168
  // plugins/update-checker.ts
20169
- import { existsSync as existsSync5, mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync2 } from "node:fs";
20169
+ import { existsSync as existsSync5, mkdirSync as mkdirSync3, readFileSync as readFileSync6, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
20170
20170
  import { homedir as homedir8 } from "node:os";
20171
20171
  import { dirname as dirname15, join as join25 } from "node:path";
20172
20172
  import { spawnSync as spawnSync2 } from "node:child_process";
@@ -20180,7 +20180,7 @@ import * as https from "node:https";
20180
20180
  // lib/version-injected.ts
20181
20181
  function getInjectedVersion() {
20182
20182
  try {
20183
- const v = "0.7.2";
20183
+ const v = "0.7.3";
20184
20184
  if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) {
20185
20185
  return v;
20186
20186
  }
@@ -20474,6 +20474,15 @@ var updateCheckerServer = async (ctx) => {
20474
20474
  await postToast(ctx, `[codeforge] ⚠ npm 包已升级 ${local} → ${remote},但资产部署失败。下次启动将重试,或手动运行:codeforge upgrade`);
20475
20475
  return;
20476
20476
  }
20477
+ try {
20478
+ const opencodeCache = join25(homedir8(), ".cache", "opencode", "packages", "@andyqiu", "codeforge@latest");
20479
+ if (existsSync5(opencodeCache)) {
20480
+ rmSync(opencodeCache, { recursive: true, force: true });
20481
+ safeWriteLog(PLUGIN_NAME20, { level: "info", msg: "opencode_cache_cleared", path: opencodeCache });
20482
+ }
20483
+ } catch (e) {
20484
+ safeWriteLog(PLUGIN_NAME20, { level: "warn", msg: "opencode_cache_clear_failed", error: e.message });
20485
+ }
20477
20486
  writeLastInstalledVersion(remote);
20478
20487
  safeWriteLog(PLUGIN_NAME20, { level: "info", msg: "auto_install_full_success", local, remote, nodeBin, npmBin });
20479
20488
  await postToast(ctx, `[codeforge] ✅ 已升级 ${local} → ${remote}(重启 opencode 生效)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andyqiu/codeforge",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "CodeForge — opencode 的零侵入扩展包",
5
5
  "type": "module",
6
6
  "private": false,