0.6.1: locate DSH node_modules for hoisted npx installs (fixes config sync on npx slaves)
This commit is contained in:
1 parent
d499126da3
commit
8e150dcacd
2 files changed
+7
-1
No files matched your search
@@ -238,6 +238,12 @@ export function dshNodeModules() {
|
||||
path.resolve(path.dirname(real), '..', 'node_modules'),
|
||||
path.resolve(path.dirname(bin), '..', 'lib', 'node_modules', '@deepseek-ai', 'dsh', 'node_modules'),
|
||||
]
|
||||
// Hoisted layouts (npx, pnpm dlx, flat npm installs): the bin lives inside
|
||||
// <root>/node_modules/@deepseek-ai/dsh/..., so walk up to the enclosing node_modules.
|
||||
for (let d = path.dirname(real); d && d !== path.dirname(d); d = path.dirname(d)) {
|
||||
if (path.basename(d) === 'node_modules') { cand.push(d); break }
|
||||
}
|
||||
for (const c of cand) if (fs.existsSync(path.join(c, '@deepseek-ai', 'cordis-plugin-include'))) return c
|
||||
for (const c of cand) if (fs.existsSync(path.join(c, '@deepseek-ai'))) return c
|
||||
return null
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@local/dsh-remote",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.1",
|
||||
"description": "Claude-Desktop-style remote control for DSH: master/slave link, every device's sessions on every device (/r/<device>/), plugin + config sync with opt-in secrets.",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
Reference in new issue
Block a user