@nextclaw/openclaw-compat 0.1.2 → 0.1.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 +2 -2
package/dist/index.js CHANGED
@@ -1911,11 +1911,20 @@ function buildPluginStatusReport(params) {
1911
1911
  // src/plugins/uninstall.ts
1912
1912
  import fs6 from "fs/promises";
1913
1913
  import path5 from "path";
1914
+ function isLinkedPathInstall(record) {
1915
+ if (!record || record.source !== "path") {
1916
+ return false;
1917
+ }
1918
+ if (!record.sourcePath || !record.installPath) {
1919
+ return true;
1920
+ }
1921
+ return path5.resolve(record.sourcePath) === path5.resolve(record.installPath);
1922
+ }
1914
1923
  function resolveUninstallDirectoryTarget(params) {
1915
1924
  if (!params.hasInstall) {
1916
1925
  return null;
1917
1926
  }
1918
- if (params.installRecord?.source === "path") {
1927
+ if (isLinkedPathInstall(params.installRecord)) {
1919
1928
  return null;
1920
1929
  }
1921
1930
  let defaultPath;
@@ -2013,7 +2022,7 @@ async function uninstallPlugin(params) {
2013
2022
  return { ok: false, error: `Plugin not found: ${pluginId}` };
2014
2023
  }
2015
2024
  const installRecord = config.plugins.installs?.[pluginId];
2016
- const isLinked = installRecord?.source === "path";
2025
+ const isLinked = isLinkedPathInstall(installRecord);
2017
2026
  const { config: nextConfig, actions: configActions } = removePluginFromConfig(config, pluginId);
2018
2027
  const actions = {
2019
2028
  ...configActions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/openclaw-compat",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "description": "OpenClaw plugin compatibility layer for NextClaw.",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "jiti": "^1.21.7",
19
19
  "jszip": "^3.10.1",
20
20
  "tar": "^7.4.3",
21
- "@nextclaw/core": "^0.4.9"
21
+ "@nextclaw/core": "^0.5.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^20.17.6",