@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.
@@ -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-4zdwV7u4.js";
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-CmLekG1M.js";
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-YTUOjmVu.js";
12
- import { a as renderRootsReport, c as revealArgv, i as parseFoldersCommand, o as resolvePanelPrimaryRoot, t as COMMAND_NAME } from "./command-CmLekG1M.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-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
- const client = new AuthorityClient(await connectNative(endpoint), store, limit, onChange, disconnected);
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) {