@lanes-sh/link 0.6.7 → 0.6.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanes-sh/link",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "A self-hostable MCP gateway for all your connections, memory, tasks, files, and secrets",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://lanes.sh/link",
@@ -6,6 +6,7 @@ import {
6
6
  openTarget,
7
7
  readRegistry,
8
8
  resolveWorkspaceRoot,
9
+ type ResolvedTarget,
9
10
  type WorkspaceTarget,
10
11
  } from '#profile';
11
12
  import { ConfigError } from '#profile';
@@ -182,6 +183,27 @@ function summarise(name: string, entry: WorkspaceTarget, isSelected: boolean): T
182
183
  };
183
184
  }
184
185
 
186
+ /**
187
+ * The entry `show` renders: the declaration on the far end, plus the deploy record.
188
+ *
189
+ * **Without the `workspace:` key**, and that is the whole of it. `openTarget`
190
+ * merges the local pointer over the remote declaration so a redeploy from a
191
+ * second machine does not lose the first one's record — which leaves an entry
192
+ * carrying `workspace:` *and* adapters, and `isPointer` answers yes to anything
193
+ * with a `workspace:`. So `summarise` took the pointer branch and returned nulls
194
+ * for every adapter and `deployed: false`, and `target show cloud` said "No
195
+ * deployment — this target runs wherever the CLI does" about a target with a
196
+ * live Cloud Run service in front of it.
197
+ *
198
+ * This is the command that *follows* the pointer, so the pointer is the one
199
+ * thing it is not reporting: `resolved.workspaceRoot` is already printed on the
200
+ * line above, from the same object.
201
+ */
202
+ export function resolvedEntry(resolved: ResolvedTarget): WorkspaceTarget {
203
+ const { workspace: _followed, ...record } = resolved.entry;
204
+ return { ...resolved.declared, ...record };
205
+ }
206
+
185
207
  /** What `--json` and the tests want, without the rendering. */
186
208
  export async function readTargets(
187
209
  flags: TargetFlags,
@@ -310,7 +332,7 @@ export async function targetShow(name: string | undefined, flags: TargetFlags):
310
332
  }
311
333
 
312
334
  const resolved = await openTarget(root, wanted);
313
- const summary = summarise(wanted, { ...resolved.declared, ...resolved.entry }, true);
335
+ const summary = summarise(wanted, resolvedEntry(resolved), true);
314
336
  const profiles = await listProfiles(resolved.workspaceRoot);
315
337
 
316
338
  const url = summary.deployment