@hediet/linkrpc-cli 0.0.3-next.20261023.4 → 0.0.3-next.20261024.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.
@@ -1,4 +1,4 @@
1
- import { $ as requestTopologyAccess, B as proxyCommand, F as disconnectBroker, G as parseDuration, H as withStaticHubReflection, I as getBrokerStatus, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, Q as requestReflectionAccess, R as stopConnectionBroker, St as mcpForwardInterface, U as parseConnectionLimit, V as tunnelCommand, W as parseConnectionLimitMilliseconds, _t as validateValueAgainstSchema, a as resolveInvocationEndpoint, bt as parseParamOverride, c as resolveLocalEndpoint, ct as parsePrincipalSpec, dt as connectViaTransport, et as setupSigning, ft as resolveTargetEndpoint, gt as explainValidation, ht as describeSchema, i as resolveInvocationContext, it as walkHub, lt as connect, m as managedEndpointsInterface, mt as describeObjectParams, n as loadStaticHubSchema, nt as fetchSchema$1, o as resolveSigning, ot as logoutCliIdentity, pt as resolvedEndpointToConfig, q as resolveCliInvocation, r as resolveStaticHubSchemaSource, rt as findMethodInSchema, s as validationDefault, st as formatPrincipalSource, t as completeForLine, tt as fetchDefaults, ut as connectViaRootOverlay, xt as MethodRefWithOptHash, y as HubHome, yt as mergeParams, z as ConnectionBroker } from "./runComplete-C9LMCMk7.js";
1
+ import { $ as requestTopologyAccess, B as proxyCommand, F as disconnectBroker, G as parseDuration, H as withStaticHubReflection, I as getBrokerStatus, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, Q as requestReflectionAccess, R as stopConnectionBroker, St as mcpForwardInterface, U as parseConnectionLimit, V as tunnelCommand, W as parseConnectionLimitMilliseconds, _t as validateValueAgainstSchema, a as resolveInvocationEndpoint, bt as parseParamOverride, c as resolveLocalEndpoint, ct as parsePrincipalSpec, dt as connectViaTransport, et as setupSigning, ft as resolveTargetEndpoint, gt as explainValidation, ht as describeSchema, i as resolveInvocationContext, it as walkHub, lt as connect, m as managedEndpointsInterface, mt as describeObjectParams, n as loadStaticHubSchema, nt as fetchSchema$1, o as resolveSigning, ot as logoutCliIdentity, pt as resolvedEndpointToConfig, q as resolveCliInvocation, r as resolveStaticHubSchemaSource, rt as findMethodInSchema, s as validationDefault, st as formatPrincipalSource, t as completeForLine, tt as fetchDefaults, ut as connectViaRootOverlay, xt as MethodRefWithOptHash, y as HubHome, yt as mergeParams, z as ConnectionBroker } from "./runComplete-M-eKaNkI.js";
2
2
  import { ErrorCode, INTERFACE_TEMPLATES_EXTENSION, LinkRpcConnection, RpcError, computeInterfaceHash, connectTransports, createSchemaToZod, directoryInterface, exportStaticHubSchema, generateTsContract, generateTsInterface, interfaceTemplateArgumentsEquivalent, interfaceTemplateMemberName, interfaceTemplatesEqual, isAssignable, jcsCanonicalize, matchParams, schemaToZod, validateInterfaceTemplates } from "@hediet/linkrpc";
3
3
  import { z } from "zod";
4
4
  import { WebSocketTransport, connectNdjson, connectToHub, formatEndpointUri, isHubEndpoint, openWebSocket, parseEndpointUri, runInitializeHandshake, traceMessageTransport as traceMessageTransport$1 } from "@hediet/linkrpc/node";
@@ -407,7 +407,7 @@ function contextNamespace(reference) {
407
407
  async function useLocalManagement(start, action) {
408
408
  const home = HubHome.resolve();
409
409
  if (start) {
410
- const { startDaemon, nodeDaemonLaunch } = await import("./src-CCyOTeN5.js");
410
+ const { startDaemon, nodeDaemonLaunch } = await import("./src-yrqRWXzG.js");
411
411
  if (await startDaemon({
412
412
  home,
413
413
  launch: nodeDaemonLaunch(home)
@@ -427,7 +427,7 @@ async function useLocalManagement(start, action) {
427
427
  }
428
428
  }
429
429
  async function restartLocalDaemon() {
430
- const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-CCyOTeN5.js");
430
+ const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-yrqRWXzG.js");
431
431
  const home = HubHome.resolve();
432
432
  process.stderr.write("Restarting the local Hub daemon: clients will disconnect and managed workloads will stop. OS autostart settings are unchanged.\n");
433
433
  await stopDaemon(home);
@@ -9082,11 +9082,16 @@ Batch options:
9082
9082
  const remote = await connectTargetEndpoint(targetEp, serviceId);
9083
9083
  try {
9084
9084
  reportIdentity(await setupSigning(local.channel, local.signing, getPrincipalSpec(), { negotiateHubCaps: isHubEndpoint(localEp) }));
9085
+ const lost = Promise.race([local.closed.then(() => "source"), remote.closed.then(() => "target")]).then((side) => {
9086
+ process.stderr.write(`linkrpc: tunnel: the ${side} connection closed\n`);
9087
+ process.exitCode = 1;
9088
+ });
9085
9089
  await tunnelCommand({
9086
9090
  serviceId,
9087
9091
  local,
9088
9092
  remote,
9089
- bidi: cmdOpts.bidi
9093
+ bidi: cmdOpts.bidi,
9094
+ stop: Promise.race([lost, _untilSignalled()])
9090
9095
  });
9091
9096
  } finally {
9092
9097
  remote.close();
@@ -9113,10 +9118,10 @@ Batch options:
9113
9118
  const principal = typeof cmdOpts.signAs === "string" ? parsePrincipalSpec(cmdOpts.signAs) : getPrincipalSpec();
9114
9119
  reportIdentity(await setupSigning(hub.channel, hub.signing, principal, { negotiateHubCaps: isHubEndpoint(localEp) }));
9115
9120
  }
9116
- const participant = targetEp === void 0 ? await connectStdioParticipant() : {
9117
- connection: await connectTargetEndpoint(targetEp, cmdOpts.claim ?? ""),
9118
- closed: void 0
9119
- };
9121
+ const participant = targetEp === void 0 ? await connectStdioParticipant() : await connectTargetEndpoint(targetEp, cmdOpts.claim ?? "").then((connection) => ({
9122
+ connection,
9123
+ closed: connection.closed
9124
+ }));
9120
9125
  try {
9121
9126
  await proxyCommand({
9122
9127
  hub,
@@ -9251,7 +9256,7 @@ Batch options:
9251
9256
  process.once("SIGINT", onSignal);
9252
9257
  process.once("SIGTERM", onSignal);
9253
9258
  try {
9254
- const { runApprovalUi } = await import("./runApprovalUi-CVymyDHh.js");
9259
+ const { runApprovalUi } = await import("./runApprovalUi-BdPp7WNP.js");
9255
9260
  await runApprovalUi({
9256
9261
  client,
9257
9262
  signal: stop.signal
@@ -9266,7 +9271,7 @@ Batch options:
9266
9271
  registerViewCommands(program, (action) => withChannel(endpoint, getPrincipalSpec(), action));
9267
9272
  program.command("ui").description("Launch the terminal UI (form-based browser of services + methods).").action(async () => {
9268
9273
  const acquired = await acquireConnection(endpoint);
9269
- const { runUi } = await import("./runUi-ByL1VdAP.js");
9274
+ const { runUi } = await import("./runUi-Deeox_Ef.js");
9270
9275
  try {
9271
9276
  await runUi({
9272
9277
  endpoint: acquired.ep,
@@ -9802,4 +9807,4 @@ function safeJson(value) {
9802
9807
  //#endregion
9803
9808
  export { formatCondition as _, formatCommandLegend as a, targetId as b, safeTerminalText as c, ObservablePromise as d, observableValue as f, resolveViewTarget as g, Disposable as h, dispatchHostKey as i, approvalDetailLines as l, derived as m, views as n, hostCommands as o, autorun as p, ViewFrame as r, matchesKey as s, runCli as t, ObservableLazyPromise as u, interfaceTarget as v, matchesTarget as y };
9804
9809
 
9805
- //# sourceMappingURL=cli-CYL6JUxF.js.map
9810
+ //# sourceMappingURL=cli-CXAAnZDA.js.map