@dsh-electron/dsh-plugin-multi-root-workspace 0.1.12 → 0.1.13
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.en.md +13 -1
- package/CHANGELOG.md +13 -1
- package/README.en.md +6 -5
- package/README.md +6 -5
- package/cordis.patch.yml +4 -0
- package/lib/client.js +101 -25
- package/lib/client.js.map +1 -1
- package/lib/{command-CmLekG1M.js → command-B9855H7y.js} +1 -1
- package/lib/command.js +1 -1
- package/lib/index.js +2 -2
- package/lib/{protocol-4zdwV7u4.js → protocol-CJOvAvOS.js} +13 -2
- package/lib/{registry-YTUOjmVu.js → registry-Bv431TfO.js} +423 -123
- package/lib/registry.js +2 -2
- package/lib/scope.js +36 -2
- package/lib/types/authority/protocol.d.ts +1 -1
- package/lib/types/authority/recovery.d.ts +58 -0
- package/lib/types/client/RootSwitcher.d.ts +6 -3
- package/lib/types/client/files-tree/adapter.d.ts +63 -1
- package/lib/types/registry.d.ts +98 -0
- package/lib/types/scope.d.ts +18 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { t as effectiveDirectory } from "./session-directory-BLOstut1.js";
|
|
|
2
2
|
import { r as canonicalPath$1 } from "./windows-runner-contract-B5R2K3mM.js";
|
|
3
3
|
import { i as canonicalRoot, o as entryRootRef, p as resolveRootRef, r as availableRoots, t as RootValidationError } from "./roots-Ca_W1S9n.js";
|
|
4
4
|
import { c as skillsRequestSchema, i as parsePanelCall, r as effectiveRootAccess, s as SKILLS_ENDPOINTS, t as PANEL_CHANNEL } from "./contract-CStSEOcK.js";
|
|
5
|
-
import { n as AuthorityRpcError } from "./protocol-
|
|
5
|
+
import { n as AuthorityRpcError } from "./protocol-CJOvAvOS.js";
|
|
6
6
|
import { closeSync, lstatSync, openSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { isAbsolute, join } from "node:path";
|
|
8
8
|
import "@deepseek-ai/cordis";
|
package/lib/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as renderRootsReport, c as revealArgv, i as parseFoldersCommand, n as apply, o as resolvePanelPrimaryRoot, r as inject, s as revealAccepted, t as COMMAND_NAME } from "./command-
|
|
1
|
+
import { a as renderRootsReport, c as revealArgv, i as parseFoldersCommand, n as apply, o as resolvePanelPrimaryRoot, r as inject, s as revealAccepted, t as COMMAND_NAME } from "./command-B9855H7y.js";
|
|
2
2
|
export { COMMAND_NAME, apply, inject, parseFoldersCommand, renderRootsReport, resolvePanelPrimaryRoot, revealAccepted, revealArgv };
|
package/lib/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { t as MultiRootFileSystem } from "./fs-CfzJq2wd.js";
|
|
|
8
8
|
import { t as MultiRootSandboxProvider } from "./sandbox-C-vCJCp3.js";
|
|
9
9
|
import { a as parseRevealedView, i as parsePanelCall, n as PANEL_ENDPOINTS, o as parseRootsView, t as PANEL_CHANNEL } from "./contract-CStSEOcK.js";
|
|
10
10
|
import { MultiRootScopeService, renderWorkspaceRootsContext, sanitizeAdditionalRoots } from "./scope.js";
|
|
11
|
-
import { a as MultiRootRegistry, c as multiRootDomainSpec, i as MAX_ALIAS_LENGTH, l as RegistryAuthorityLease, n as DOMAIN_NAME, o as REGISTRY_CONTENDED_MESSAGE, r as MAX_ADDITIONAL_ROOTS_CEILING, t as DEFAULT_MAX_ADDITIONAL_ROOTS, u as RegistryLeaseContendedError } from "./registry-
|
|
12
|
-
import { a as renderRootsReport, c as revealArgv, i as parseFoldersCommand, o as resolvePanelPrimaryRoot, t as COMMAND_NAME } from "./command-
|
|
11
|
+
import { a as MultiRootRegistry, c as multiRootDomainSpec, i as MAX_ALIAS_LENGTH, l as RegistryAuthorityLease, n as DOMAIN_NAME, o as REGISTRY_CONTENDED_MESSAGE, r as MAX_ADDITIONAL_ROOTS_CEILING, t as DEFAULT_MAX_ADDITIONAL_ROOTS, u as RegistryLeaseContendedError } from "./registry-Bv431TfO.js";
|
|
12
|
+
import { a as renderRootsReport, c as revealArgv, i as parseFoldersCommand, o as resolvePanelPrimaryRoot, t as COMMAND_NAME } from "./command-B9855H7y.js";
|
|
13
13
|
//#region src/index.ts
|
|
14
14
|
/**
|
|
15
15
|
* Carrier plugin face for the bare-package-name loader row (see the module
|
|
@@ -407,8 +407,16 @@ var AuthorityClient = class AuthorityClient {
|
|
|
407
407
|
else request.reject(new AuthorityRpcError(reply.code, reply.message));
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
static async connect(endpoint, store, limit, onChange, disconnected) {
|
|
411
|
-
|
|
410
|
+
static async connect(endpoint, store, limit, onChange, disconnected, signal) {
|
|
411
|
+
if (signal?.aborted) throw new AuthorityRpcError("authority-cancelled", "registry handshake was cancelled");
|
|
412
|
+
const channel = await connectNative(endpoint);
|
|
413
|
+
if (signal?.aborted) {
|
|
414
|
+
channel.destroy();
|
|
415
|
+
throw new AuthorityRpcError("authority-cancelled", "registry handshake was cancelled");
|
|
416
|
+
}
|
|
417
|
+
const client = new AuthorityClient(channel, store, limit, onChange, disconnected);
|
|
418
|
+
const onAbort = () => client.close();
|
|
419
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
412
420
|
try {
|
|
413
421
|
const hello = helloSchema.parse(await client.request("hello", [limit]));
|
|
414
422
|
if (hello.store !== store || hello.limit !== limit) throw new Error("registry configuration mismatch");
|
|
@@ -416,7 +424,10 @@ var AuthorityClient = class AuthorityClient {
|
|
|
416
424
|
return client;
|
|
417
425
|
} catch (error) {
|
|
418
426
|
client.close();
|
|
427
|
+
if (signal?.aborted) throw new AuthorityRpcError("authority-cancelled", "registry handshake was cancelled");
|
|
419
428
|
throw error;
|
|
429
|
+
} finally {
|
|
430
|
+
signal?.removeEventListener("abort", onAbort);
|
|
420
431
|
}
|
|
421
432
|
}
|
|
422
433
|
request(method, args) {
|