dsh-zterm 0.1.18 → 0.2.0
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/README.md +0 -15
- package/USERGUIDE.zh-CN.md +9 -1
- package/lib/client.js +13 -13
- package/lib/index.js +1 -1
- package/lib/index.js.map +2 -2
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -4140,7 +4140,7 @@ function createPlugin(ctx, entryConfig = {}, deps = {}) {
|
|
|
4140
4140
|
const payload = raw && typeof raw === "object" ? raw : {};
|
|
4141
4141
|
if (method === "catalog") {
|
|
4142
4142
|
const cfg = config(), query = String(payload.query ?? "").toLowerCase(), offset = Math.max(0, Number(payload.offset) || 0);
|
|
4143
|
-
const filtered = cfg.hosts.filter((host) => `${host.label} ${host.host}`.toLowerCase().includes(query) && (!payload.folderId || (payload.folderId === "root" ? !host.folderId : host.folderId === payload.folderId)));
|
|
4143
|
+
const filtered = cfg.hosts.filter((host) => `${host.label} ${host.host}`.toLowerCase().includes(query) && (!payload.targetId || host.id === payload.targetId) && (!payload.folderId || (payload.folderId === "root" ? !host.folderId : host.folderId === payload.folderId)));
|
|
4144
4144
|
const hosts = filtered.slice(offset, offset + 200);
|
|
4145
4145
|
const refs = [...new Set([...hosts.flatMap((h) => [h.credentialRef, h.passphraseRef]), ...cfg.credentials.flatMap((c) => [c.credentialRef, c.passphraseRef]), ...cfg.jumpservers.flatMap((p) => [p.credentialRef, p.accessKeyIdRef])].filter(Boolean))];
|
|
4146
4146
|
return {
|