@monster-orange/den 0.2.7 → 0.2.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.
@@ -86,10 +86,12 @@ import { depService } from "../../shared/manifest/deps.js";
86
86
  import { waitForReady } from "../../shared/environment-manager/readiness.js";
87
87
  import {
88
88
  readCatalog,
89
- resolveRepoGhSlug,
89
+ needsGhRepair,
90
+ resolveRepoCloneSource,
90
91
  upsertCatalogEntry,
91
92
  } from "../../shared/environment-manager/catalog.js";
92
93
  import { getReposRoot, readUserConfig } from "../../shared/den-config.js";
94
+ import { redactRemote } from "../../shared/environment-manager/git-remote.js";
93
95
  import { getDistRoot } from "../../shared/paths.js";
94
96
  import { recordRemovedFromWorkspace } from "../../shared/environment-manager/default-workspace.js";
95
97
  import { getSudoEnv, prewarmSudo } from "./sudo-store.js";
@@ -320,7 +322,7 @@ async function buildAvailableRepos(wsOverride: string | null) {
320
322
  hasManifest: false,
321
323
  alreadyAdded,
322
324
  source: "catalog",
323
- gh: entry.gh,
325
+ gh: entry.gh ?? null,
324
326
  });
325
327
  }
326
328
 
@@ -2159,16 +2161,18 @@ export async function handleWorkspaceRoutes(
2159
2161
  // flow writes one), which used to read as "not in the catalog" and
2160
2162
  // skip the clone entirely. Derive the conventional slug instead, and
2161
2163
  // persist it so every other flow (CLI up/setup) stops hitting this.
2162
- const ghSlug = resolveRepoGhSlug(svc.repoName, readCatalog(), () =>
2164
+ // ORG-1d: a repo with no source and a `remote:` clones from it.
2165
+ const ghSlug = resolveRepoCloneSource(svc.repoName, readCatalog(), () =>
2163
2166
  githubOrgFor(ws.name),
2164
2167
  );
2165
- if (!readCatalog()[svc.repoName]?.gh) {
2166
- upsertCatalogEntry(svc.repoName, { gh: ghSlug });
2168
+ const entry = readCatalog()[svc.repoName];
2169
+ if (needsGhRepair(entry, ghSlug)) {
2170
+ upsertCatalogEntry(svc.repoName, { ...entry, gh: ghSlug });
2167
2171
  }
2168
2172
  const branch = (svc as { branch?: string | null }).branch ?? "main";
2169
2173
  emit({
2170
2174
  type: "line",
2171
- text: ` ${svc.repoName}: cloning ${ghSlug} (${branch})…`,
2175
+ text: ` ${svc.repoName}: cloning ${redactRemote(ghSlug)} (${branch})…`,
2172
2176
  });
2173
2177
  try {
2174
2178
  // Synchronous (same helper the workspace-add flow uses) — the server