@geravant/sinain 1.0.4 → 1.0.5
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.
- package/install.js +4 -2
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -5,7 +5,7 @@ import os from "os";
|
|
|
5
5
|
import { execSync } from "child_process";
|
|
6
6
|
|
|
7
7
|
const HOME = os.homedir();
|
|
8
|
-
const PLUGIN_DIR = path.join(HOME, ".openclaw/extensions/sinain");
|
|
8
|
+
const PLUGIN_DIR = path.join(HOME, ".openclaw/extensions/sinain-hud");
|
|
9
9
|
const SOURCES_DIR = path.join(HOME, ".openclaw/sinain-sources");
|
|
10
10
|
const OC_JSON = path.join(HOME, ".openclaw/openclaw.json");
|
|
11
11
|
const WORKSPACE = path.join(HOME, ".openclaw/workspace");
|
|
@@ -17,7 +17,9 @@ const HEARTBEAT = path.join(PKG_DIR, "HEARTBEAT.md");
|
|
|
17
17
|
|
|
18
18
|
console.log("\nInstalling sinain plugin...");
|
|
19
19
|
|
|
20
|
-
// 1. Copy plugin files
|
|
20
|
+
// 1. Copy plugin files (remove stale extensions/sinain dir if present from old installs)
|
|
21
|
+
const stalePluginDir = path.join(HOME, ".openclaw/extensions/sinain");
|
|
22
|
+
if (fs.existsSync(stalePluginDir)) fs.rmSync(stalePluginDir, { recursive: true, force: true });
|
|
21
23
|
fs.mkdirSync(PLUGIN_DIR, { recursive: true });
|
|
22
24
|
fs.copyFileSync(path.join(PKG_DIR, "index.ts"), path.join(PLUGIN_DIR, "index.ts"));
|
|
23
25
|
fs.copyFileSync(path.join(PKG_DIR, "openclaw.plugin.json"), path.join(PLUGIN_DIR, "openclaw.plugin.json"));
|