dsh-unplug 0.1.0 → 0.1.1
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/CHANGELOG.md +6 -0
- package/lib/lib/remove.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1 (2026-08-20)
|
|
4
|
+
|
|
5
|
+
- resolvePlugin now scans installed bundle patches, so `remove`/`disable`/`enable`
|
|
6
|
+
work when a plugin row lives only inside the bundle package (not the profile patch).
|
|
7
|
+
- Tests for bundle-only row resolution.
|
|
8
|
+
|
|
3
9
|
## 0.1.0 (2026-08-20)
|
|
4
10
|
|
|
5
11
|
- Initial release.
|
package/lib/lib/remove.js
CHANGED
|
@@ -6,12 +6,23 @@ import { removeEntry, setEntryDisabled } from './patches.js';
|
|
|
6
6
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
7
7
|
import { audit } from './audit.js';
|
|
8
8
|
import { parsePatch } from './patches.js';
|
|
9
|
+
import { resolveBundlePatchPath } from './resolve.js';
|
|
9
10
|
function resolvePlugin(home, profileDir, profileName, plugin) {
|
|
10
11
|
const manifest = readProfileManifest(profileDir);
|
|
11
12
|
const allBundles = [...(manifest.dsh?.profile?.bundles ?? []), ...(manifest.dsh?.profile?.disabledBundles ?? [])];
|
|
12
13
|
// Direct bundle name match
|
|
13
14
|
if (allBundles.includes(plugin))
|
|
14
15
|
return { bundleName: plugin, rowId: plugin };
|
|
16
|
+
// Scan every installed bundle's patch rows too (rows live in node_modules).
|
|
17
|
+
for (const pkg of allBundles) {
|
|
18
|
+
const patchPath = resolveBundlePatchPath(profileDir, pkg);
|
|
19
|
+
if (patchPath === undefined || !existsSync(patchPath))
|
|
20
|
+
continue;
|
|
21
|
+
for (const entry of parsePatch(readFileSync(patchPath, 'utf8')).entries) {
|
|
22
|
+
if (entry.id === plugin || entry.name === plugin)
|
|
23
|
+
return { bundleName: pkg, rowId: entry.id };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
15
26
|
// Check patch rows for id/name match
|
|
16
27
|
for (const file of [path.join(profileDir, 'cordis.patch.yml'), path.join(home, 'cordis.patch.yml')]) {
|
|
17
28
|
if (!existsSync(file))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unplug",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Plug/unplug any DeepSeek Harness plugin cleanly: list every mounted layer, disable/enable without deleting, remove bundles + patch rows + dependencies in one pass, and audit for orphaned/dangling plugin state. Zero runtime dependencies; read-only by default.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|