openclaw-openviking-setup-helper 0.2.16-dev.3 → 0.2.16-dev.4

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/install.js +10 -2
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -1307,9 +1307,17 @@ async function downloadPlugin(destDir) {
1307
1307
  async function createPluginStagingDir() {
1308
1308
  const pluginId = resolvedPluginId || "openviking";
1309
1309
  const extensionsDir = join(OPENCLAW_DIR, "extensions");
1310
- const stagingDir = join(extensionsDir, `.${pluginId}.staging-${process.pid}-${Date.now()}`);
1311
1310
  await mkdir(extensionsDir, { recursive: true });
1312
- await rm(stagingDir, { recursive: true, force: true });
1311
+ const stagingPrefix = `.${pluginId}.staging-`;
1312
+ try {
1313
+ const entries = readdirSync(extensionsDir, { withFileTypes: true });
1314
+ for (const entry of entries) {
1315
+ if (entry.isDirectory() && entry.name.startsWith(stagingPrefix)) {
1316
+ await rm(join(extensionsDir, entry.name), { recursive: true, force: true });
1317
+ }
1318
+ }
1319
+ } catch {}
1320
+ const stagingDir = join(extensionsDir, `${stagingPrefix}${process.pid}-${Date.now()}`);
1313
1321
  await mkdir(stagingDir, { recursive: true });
1314
1322
  return stagingDir;
1315
1323
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-openviking-setup-helper",
3
- "version": "0.2.16-dev.3",
3
+ "version": "0.2.16-dev.4",
4
4
  "description": "Setup helper for installing OpenViking memory plugin into OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {