@caelo-cms/provisioning 0.11.15 → 0.11.16

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.
Files changed (42) hide show
  1. package/dist/adopt-existing.d.ts +0 -56
  2. package/dist/adopt-existing.d.ts.map +1 -1
  3. package/dist/adopt-existing.js +58 -2
  4. package/dist/adopt-existing.js.map +1 -1
  5. package/dist/cloudsql-tls.d.ts.map +1 -1
  6. package/dist/cloudsql-tls.js +3 -3
  7. package/dist/cloudsql-tls.js.map +1 -1
  8. package/dist/gcloud.d.ts +2 -0
  9. package/dist/gcloud.d.ts.map +1 -1
  10. package/dist/gcloud.js +14 -0
  11. package/dist/gcloud.js.map +1 -1
  12. package/dist/mcp-auth-proxy-setup.d.ts.map +1 -1
  13. package/dist/mcp-auth-proxy-setup.js +3 -6
  14. package/dist/mcp-auth-proxy-setup.js.map +1 -1
  15. package/dist/ops-backend.d.ts.map +1 -1
  16. package/dist/ops-backend.js +4 -6
  17. package/dist/ops-backend.js.map +1 -1
  18. package/dist/remote-mcp.d.ts.map +1 -1
  19. package/dist/remote-mcp.js +4 -5
  20. package/dist/remote-mcp.js.map +1 -1
  21. package/dist/runtime-secrets.d.ts.map +1 -1
  22. package/dist/runtime-secrets.js +4 -5
  23. package/dist/runtime-secrets.js.map +1 -1
  24. package/dist/staging-gateway-setup.d.ts.map +1 -1
  25. package/dist/staging-gateway-setup.js +7 -8
  26. package/dist/staging-gateway-setup.js.map +1 -1
  27. package/dist/state-lock-lease.d.ts +1 -1
  28. package/dist/state-lock-lease.d.ts.map +1 -1
  29. package/dist/state-lock-lease.js +2 -2
  30. package/dist/state-lock-lease.js.map +1 -1
  31. package/package.json +2 -2
  32. package/src/adopt-existing.test.ts +36 -9
  33. package/src/adopt-existing.ts +2 -3
  34. package/src/cloudsql-tls.ts +3 -3
  35. package/src/gcloud.test.ts +24 -0
  36. package/src/gcloud.ts +17 -0
  37. package/src/mcp-auth-proxy-setup.ts +3 -7
  38. package/src/ops-backend.ts +4 -7
  39. package/src/remote-mcp.ts +4 -6
  40. package/src/runtime-secrets.ts +4 -5
  41. package/src/staging-gateway-setup.ts +7 -8
  42. package/src/state-lock-lease.ts +2 -4
@@ -1 +1 @@
1
- {"version":3,"file":"state-lock-lease.js","sourceRoot":"","sources":["../src/state-lock-lease.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAG,MAAM,CAAC;AAExC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,4EAA4E;IAC5E,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,0EAA0E;IAC1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S,CAAC,IAAI,EAAE,CAAC,CAAC;SACxD,IAAI,IAAI,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,IAAI,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5D,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;AACnF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caelo-cms/provisioning",
3
- "version": "0.11.15",
3
+ "version": "0.11.16",
4
4
  "private": false,
5
5
  "license": "MPL-2.0",
6
6
  "description": "Pulumi-driven provisioning for Caelo CMS — `bunx @caelo-cms/provisioning --provider <self-hosted|gcp|aws|azure>` brings up a TLS-served install with Postgres + storage + secrets manager + the admin + the API gateway.",
@@ -40,7 +40,7 @@
40
40
  "prepublishOnly": "tsc -b --force && bun build ../platform-updater/src/agent-db.ts --target=bun --outfile=dist/agent-db.js && tsc --project stacks/gcp/tsconfig.json && tsc --project stacks/gcp-firebase/tsconfig.json"
41
41
  },
42
42
  "dependencies": {
43
- "@caelo-cms/shared": "^0.11.15",
43
+ "@caelo-cms/shared": "^0.11.16",
44
44
  "@clack/prompts": "1.8.1",
45
45
  "@pulumi/command": "^1",
46
46
  "@pulumi/gcp": "^10",
@@ -17,6 +17,7 @@ import {
17
17
  AdoptionError,
18
18
  adoptExistingResources,
19
19
  adoptionCandidates,
20
+ existingCandidates,
20
21
  formatAdopted,
21
22
  } from "./adopt-existing.js";
22
23
  import type { GcloudResult } from "./gcloud.js";
@@ -297,16 +298,17 @@ describe("adoptExistingResources — viu.one's installer re-run (#1079)", () =>
297
298
  });
298
299
  });
299
300
 
300
- describe("adoptionCandidates — only declared creates of an adoptable kind", () => {
301
- const step = (over: Partial<PlannedStep> & Pick<PlannedStep, "type" | "name">): PlannedStep => ({
302
- op: "create",
303
- urn: `urn:pulumi:production::caelo-gcp::${over.type}::${over.name}`,
304
- diffs: [],
305
- replaceReasons: [],
306
- inputs: {},
307
- ...over,
308
- });
301
+ /** A planned create (or `over.op`) of `over.type` named `over.name`. */
302
+ const step = (over: Partial<PlannedStep> & Pick<PlannedStep, "type" | "name">): PlannedStep => ({
303
+ op: "create",
304
+ urn: `urn:pulumi:production::caelo-gcp::${over.type}::${over.name}`,
305
+ diffs: [],
306
+ replaceReasons: [],
307
+ inputs: {},
308
+ ...over,
309
+ });
309
310
 
311
+ describe("adoptionCandidates — only declared creates of an adoptable kind", () => {
310
312
  it("leaves unknown and non-adoptable kinds, IAM members, updates and unnamed creates to Pulumi", () => {
311
313
  const steps = [
312
314
  step({ type: "gcp:storage/bucket:Bucket", name: "media", inputs: { name: "x-media" } }),
@@ -480,3 +482,28 @@ describe("stackGcpProviderUrn — what adopted resources are imported under", ()
480
482
  ).toThrow("holds 2 GCP providers");
481
483
  });
482
484
  });
485
+
486
+ describe("existingCandidates — every gcloud wording for a missing resource", () => {
487
+ // gcp-firebase scratch install of v0.11.15 (2026-11-04): Cloud Run says
488
+ // "Cannot find service [<name>]." with no NOT_FOUND code, and the probe read
489
+ // that as an unknown state and stopped a fresh install.
490
+ it("a Cloud Run service gcloud cannot find is a plain create, not a stop", async () => {
491
+ const candidates = adoptionCandidates(
492
+ [
493
+ step({
494
+ type: "gcp:cloudrunv2/service:Service",
495
+ name: "caelo-production-gateway",
496
+ inputs: { name: "caelo-production-gateway-aa7db32", location: "europe-west1" },
497
+ }),
498
+ ],
499
+ PROJECT,
500
+ );
501
+ const existing = await existingCandidates(candidates, async () =>
502
+ fail(
503
+ "ERROR: (gcloud.run.services.describe) Cannot find service [caelo-production-gateway-aa7db32]",
504
+ ),
505
+ );
506
+ expect(candidates).toHaveLength(1);
507
+ expect(existing).toEqual([]);
508
+ });
509
+ });
@@ -57,6 +57,7 @@
57
57
  * `public_role`.
58
58
  */
59
59
 
60
+ import { isGcloudNotFound } from "./gcloud.js";
60
61
  import type { GcloudRunner } from "./gcloud-retry.js";
61
62
  import type { PlannedStep } from "./preview-plan.js";
62
63
  import { STAGING_DATABASE, STAGING_DATABASE_ROLE } from "./staging-database.js";
@@ -269,8 +270,6 @@ export function adoptionCandidates(
269
270
  return out;
270
271
  }
271
272
 
272
- const NOT_FOUND = /NOT_FOUND|not found|does not exist/i;
273
-
274
273
  /**
275
274
  * The candidates that exist in the project.
276
275
  *
@@ -284,7 +283,7 @@ export async function existingCandidates(
284
283
  for (const c of candidates) {
285
284
  const r = await run([...c.describeArgs]);
286
285
  if (r.ok) existing.push(c);
287
- else if (!NOT_FOUND.test(r.stderr)) {
286
+ else if (!isGcloudNotFound(r.stderr)) {
288
287
  throw new AdoptionError(
289
288
  `could not tell whether the ${c.label} ${c.display} exists (gcloud: ${r.stderr.trim()}). Nothing was imported or applied. Check that gcloud is signed in as the Owner (gcloud auth login) and re-run the installer.`,
290
289
  );
@@ -45,6 +45,7 @@
45
45
  */
46
46
 
47
47
  import { isIpLiteral } from "@caelo-cms/shared";
48
+ import { isGcloudNotFound } from "./gcloud.js";
48
49
  import { type GcloudRunner, realSleep, runWithRetry, type Sleep } from "./gcloud-retry.js";
49
50
  import type { HttpFetch } from "./runtime-secrets.js";
50
51
  import {
@@ -87,7 +88,6 @@ export interface InstanceDescription {
87
88
  readonly dnsNames?: readonly { readonly name?: string; readonly connectionType?: string }[];
88
89
  }
89
90
 
90
- const NOT_FOUND = /NOT_FOUND|not found|does not exist|404/i;
91
91
  const SQL_ADMIN = "https://sqladmin.googleapis.com/v1";
92
92
 
93
93
  /** `gcloud sql instances describe` of the install's instance, parsed. */
@@ -236,7 +236,7 @@ export async function ensureCloudSqlVerifyFull(
236
236
  `the private DNS zone ${zone} serves ${existing ?? "(no name)"}, not the instance's DNS name ${fqdn}. If the instance was replaced, delete the zone (gcloud dns managed-zones delete ${zone} ${project}) after removing its records, then re-run.`,
237
237
  );
238
238
  }
239
- } else if (NOT_FOUND.test(z.stderr)) {
239
+ } else if (isGcloudNotFound(z.stderr)) {
240
240
  const c = await run([
241
241
  "dns",
242
242
  "managed-zones",
@@ -264,7 +264,7 @@ export async function ensureCloudSqlVerifyFull(
264
264
  if (!u.ok) return fail(`update the A record of ${fqdn}: ${u.stderr.trim()}`);
265
265
  done.push(`DNS ${fqdn} A ${rrdatas.join(",") || "(none)"} → ${privateIp}`);
266
266
  }
267
- } else if (NOT_FOUND.test(a.stderr)) {
267
+ } else if (isGcloudNotFound(a.stderr)) {
268
268
  const c = await run([...rec, "create", ...where, "--ttl=300", `--rrdatas=${privateIp}`]);
269
269
  if (!c.ok) return fail(`create the A record of ${fqdn}: ${c.stderr.trim()}`);
270
270
  done.push(`DNS ${fqdn} A ${privateIp}`);
@@ -6,6 +6,7 @@ import {
6
6
  type GcloudResult,
7
7
  grantProvisionerRoles,
8
8
  isGcloudAuthError,
9
+ isGcloudNotFound,
9
10
  PROVISIONER_ROLE_LIST,
10
11
  projectDisplayName,
11
12
  } from "./gcloud.js";
@@ -189,3 +190,26 @@ describe("checkGcloudAuth (#630)", () => {
189
190
  expect(isGcloudAuthError("PERMISSION_DENIED: run.services.list")).toBe(false);
190
191
  });
191
192
  });
193
+
194
+ describe("isGcloudNotFound — one list of every service's wording", () => {
195
+ it.each([
196
+ "ERROR: (gcloud.run.services.describe) Cannot find service [caelo-production-gateway-aa7db32]",
197
+ "ERROR: (gcloud.secrets.describe) NOT_FOUND: Secret [x] not found or has no versions.",
198
+ "ERROR: (gcloud.compute.backend-services.describe) The resource 'projects/p/global/backendServices/b' was not found",
199
+ "ERROR: (gcloud.iam.service-accounts.describe) NOT_FOUND: Unknown service account.",
200
+ "HTTPError 404: Not Found",
201
+ 'ERROR: {"error": {"code": 404, "message": "Requested entity was not found."}}',
202
+ "ERROR: (gcloud.run.jobs.executions.describe) Execution [e] could not be found.",
203
+ ])("reads %p as missing", (stderr) => {
204
+ expect(isGcloudNotFound(stderr)).toBe(true);
205
+ });
206
+
207
+ it.each([
208
+ "ERROR: (gcloud.iam.service-accounts.describe) PERMISSION_DENIED",
209
+ "ERROR: (gcloud.run.services.describe) There was a problem refreshing your current auth tokens",
210
+ "ERROR: project 4041234 quota exceeded",
211
+ "ERROR: (gcloud.run.services.describe) PERMISSION_DENIED: on projects/caelo-404-prod/locations/europe-west1",
212
+ ])("does not read %p as missing", (stderr) => {
213
+ expect(isGcloudNotFound(stderr)).toBe(false);
214
+ });
215
+ });
package/src/gcloud.ts CHANGED
@@ -101,6 +101,23 @@ export function isGcloudAuthError(stderr: string): boolean {
101
101
  return GCLOUD_AUTH_ERROR.test(stderr);
102
102
  }
103
103
 
104
+ /**
105
+ * Every way gcloud says a described resource does not exist. The wording
106
+ * differs per service: Cloud Run says "Cannot find service [<name>]." with
107
+ * no code, Secret Manager and IAM say NOT_FOUND, compute says "was not
108
+ * found", the REST APIs answer HTTP 404. A bare 404 is not enough: project
109
+ * and resource ids may contain one (`caelo-404-prod`). One list, because a
110
+ * describe that missed a wording reads a missing resource as an unknown one
111
+ * and stops a fresh install (scratch installs of v0.11.15, 2026-11-04).
112
+ */
113
+ const GCLOUD_NOT_FOUND =
114
+ /\bNOT_FOUND\b|NotFound|not found|cannot find|could not be found|does not exist|\bHTTP(?:Error)? ?404\b|"code": ?404\b/i;
115
+
116
+ /** Whether a failed gcloud describe failed because the resource does not exist. */
117
+ export function isGcloudNotFound(stderr: string): boolean {
118
+ return GCLOUD_NOT_FOUND.test(stderr);
119
+ }
120
+
104
121
  /** The fix for expired credentials on the Owner's machine or in Cloud Shell. */
105
122
  export const GCLOUD_REAUTH_HINT =
106
123
  "gcloud credentials expired. Run `gcloud auth login` (and `gcloud auth application-default login` where Pulumi runs), then run this command again.";
@@ -30,7 +30,7 @@
30
30
  import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
31
31
  import { tmpdir } from "node:os";
32
32
  import { join } from "node:path";
33
- import { gcloud as defaultGcloud } from "./gcloud.js";
33
+ import { gcloud as defaultGcloud, isGcloudNotFound } from "./gcloud.js";
34
34
  import { type GcloudRunner, realSleep, runWithRetry, type Sleep } from "./gcloud-retry.js";
35
35
  import { gcpSecretId, mcpAuthProxyServiceAccountEmail } from "./gcp-names.js";
36
36
  import { type EnsureOutcome, ensureMcpAuthProxyServiceAccount } from "./runtime-secrets.js";
@@ -82,10 +82,6 @@ export interface ReleaseServicesDeps {
82
82
  readonly sleep?: Sleep;
83
83
  }
84
84
 
85
- // gcloud words a missing Cloud Run service "Cannot find service [<name>]."
86
- // with no NOT_FOUND code (searchVIU upgrade to v0.11.10, 2026-11-03).
87
- const NOT_FOUND = /NOT_FOUND|not found|cannot find|does not exist|could not be found/i;
88
-
89
85
  /** Ensure everything {@link ReleaseServicesTarget} needs; outcomes in order, failures included. */
90
86
  export async function ensureReleaseServices(
91
87
  target: ReleaseServicesTarget,
@@ -249,7 +245,7 @@ async function ensureDataGatewayService(
249
245
  "--format=value(metadata.name)",
250
246
  ]);
251
247
  if (existing.ok) return { id, status: "present" };
252
- if (!NOT_FOUND.test(existing.stderr)) {
248
+ if (!isGcloudNotFound(existing.stderr)) {
253
249
  return { id, status: "failed", error: existing.stderr.trim() };
254
250
  }
255
251
  // The source: the service that was the gateway and becomes the proxy.
@@ -383,7 +379,7 @@ export async function ensureMcpAuthProxyServiceGcp(
383
379
  "--format=value(metadata.name)",
384
380
  ]);
385
381
  if (existing.ok) return { id, status: "present" };
386
- if (!NOT_FOUND.test(existing.stderr)) {
382
+ if (!isGcloudNotFound(existing.stderr)) {
387
383
  return { id, status: "failed", error: existing.stderr.trim() };
388
384
  }
389
385
  const deployed = await run(gcpProxyDeployArgs(target));
@@ -30,7 +30,7 @@
30
30
  import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
31
31
  import { tmpdir } from "node:os";
32
32
  import { join } from "node:path";
33
- import { gcloud as defaultGcloud } from "./gcloud.js";
33
+ import { gcloud as defaultGcloud, isGcloudNotFound } from "./gcloud.js";
34
34
  import {
35
35
  type GcloudRunner,
36
36
  realSleep,
@@ -63,9 +63,6 @@ const OPS_APIS = ["storage.googleapis.com", "cloudkms.googleapis.com"] as const;
63
63
  /** Principals that must never appear on the ops bucket. */
64
64
  const PUBLIC_MEMBERS = new Set(["allUsers", "allAuthenticatedUsers"]);
65
65
 
66
- /** gcloud's wording for a resource that does not exist (yet). */
67
- const NOT_FOUND = /NOT_FOUND|NotFound|not found|404|does not exist/i;
68
-
69
66
  /** Everything {@link ensureOpsBackend} needs to know about the install. */
70
67
  export interface OpsBackendTarget {
71
68
  readonly projectId: string;
@@ -211,7 +208,7 @@ export async function ensureOpsBackend(
211
208
  "--format=json",
212
209
  ]);
213
210
  let bucketExists = described.ok;
214
- if (!described.ok && !NOT_FOUND.test(described.stderr)) {
211
+ if (!described.ok && !isGcloudNotFound(described.stderr)) {
215
212
  return {
216
213
  ok: false,
217
214
  error: `Could not read ${bucketUrl}: ${reason(described.stderr, described.exitCode)}. If the name is taken by a bucket outside project ${projectId}, the install can't use it — tell the maintainers (the name is <project>-caelo-ops).`,
@@ -367,7 +364,7 @@ export async function ensureOpsBackend(
367
364
  "--format=value(name)",
368
365
  ]);
369
366
  // In a dry run the KMS API may still be disabled; that reads as "not there yet".
370
- const ringMissing = !ring.ok && (NOT_FOUND.test(ring.stderr) || dryRun);
367
+ const ringMissing = !ring.ok && (isGcloudNotFound(ring.stderr) || dryRun);
371
368
  if (!ring.ok && !ringMissing) return fail(`Reading key ring ${OPS_KEY_RING}`, ring);
372
369
  if (ringMissing) {
373
370
  act(`create KMS key ring ${OPS_KEY_RING} in ${region}`);
@@ -380,7 +377,7 @@ export async function ensureOpsBackend(
380
377
  const key = ringMissing
381
378
  ? { ok: false, stderr: "NOT_FOUND", stdout: "", exitCode: 1 }
382
379
  : await run(["kms", "keys", "describe", OPS_STATE_KEY, ...keyWhere, "--format=value(name)"]);
383
- const keyMissing = !key.ok && NOT_FOUND.test(key.stderr);
380
+ const keyMissing = !key.ok && isGcloudNotFound(key.stderr);
384
381
  if (!key.ok && !keyMissing) return fail(`Reading key ${OPS_STATE_KEY}`, key);
385
382
  if (keyMissing) {
386
383
  act(`create KMS key ${OPS_KEY_RING}/${OPS_STATE_KEY}`);
package/src/remote-mcp.ts CHANGED
@@ -32,7 +32,7 @@
32
32
  */
33
33
 
34
34
  import { GCP_MCP_AUTH_PROXY_PATHS } from "@caelo-cms/shared";
35
- import { gcloud as defaultGcloud } from "./gcloud.js";
35
+ import { gcloud as defaultGcloud, isGcloudNotFound } from "./gcloud.js";
36
36
  import type { GcloudRunner } from "./gcloud-retry.js";
37
37
  import { gcpNamePrefix, mcpAuthProxyEdgeNames } from "./gcp-names.js";
38
38
  import { ensureMcpAuthProxyServiceGcp } from "./mcp-auth-proxy-setup.js";
@@ -563,7 +563,7 @@ async function describePolicyRules(
563
563
  "--format=json",
564
564
  ]);
565
565
  if (!describe.ok) {
566
- return { ok: false, missing: NOT_FOUND.test(describe.stderr), error: describe.stderr.trim() };
566
+ return { ok: false, missing: isGcloudNotFound(describe.stderr), error: describe.stderr.trim() };
567
567
  }
568
568
  const described = parseJson(describe.stdout) as { rules?: LiveArmorRule[] } | null;
569
569
  if (!described)
@@ -571,8 +571,6 @@ async function describePolicyRules(
571
571
  return { ok: true, rules: described.rules ?? [] };
572
572
  }
573
573
 
574
- const NOT_FOUND = /NOT_FOUND|not found|was not found|does not exist/i;
575
-
576
574
  /**
577
575
  * #1328 — the MCP-Auth-Proxy's own Cloud Armor policy with the `/api/mcp/*`
578
576
  * rule ({@link MCP_ARMOR_RULE}; remote-mcp-edge.ts says why): created when
@@ -703,7 +701,7 @@ export async function ensureMcpAuthProxyBackend(
703
701
  "--format=value(name)",
704
702
  ]);
705
703
  if (!neg.ok) {
706
- if (!NOT_FOUND.test(neg.stderr))
704
+ if (!isGcloudNotFound(neg.stderr))
707
705
  return { ok: false, error: `describe ${names.neg}: ${neg.stderr.trim()}` };
708
706
  const created = await run([
709
707
  "compute",
@@ -730,7 +728,7 @@ export async function ensureMcpAuthProxyBackend(
730
728
  ]);
731
729
  let backendJson: { selfLink?: string; securityPolicy?: string; backends?: { group?: string }[] };
732
730
  if (!backend.ok) {
733
- if (!NOT_FOUND.test(backend.stderr)) {
731
+ if (!isGcloudNotFound(backend.stderr)) {
734
732
  return { ok: false, error: `describe ${names.backend}: ${backend.stderr.trim()}` };
735
733
  }
736
734
  const created = await run([
@@ -22,7 +22,7 @@
22
22
  */
23
23
 
24
24
  import { randomBytes } from "node:crypto";
25
- import { gcloud as defaultGcloud } from "./gcloud.js";
25
+ import { gcloud as defaultGcloud, isGcloudNotFound } from "./gcloud.js";
26
26
  import { type GcloudRunner, realSleep, runWithRetry, type Sleep } from "./gcloud-retry.js";
27
27
  import {
28
28
  gatewayServiceAccountEmail,
@@ -86,7 +86,6 @@ export interface EnsureOutcome {
86
86
  readonly detail?: string;
87
87
  }
88
88
 
89
- const NOT_FOUND = /NOT_FOUND|not found|does not exist/i;
90
89
  const ALREADY_EXISTS = /ALREADY_EXISTS|already exists/i;
91
90
 
92
91
  // ===========================================================================
@@ -163,7 +162,7 @@ async function ensureServiceAccount(
163
162
  "--format=value(email)",
164
163
  ]);
165
164
  if (describe.ok) return { id, status: "present" };
166
- if (!NOT_FOUND.test(describe.stderr)) {
165
+ if (!isGcloudNotFound(describe.stderr)) {
167
166
  return { id, status: "failed", error: describe.stderr.trim() };
168
167
  }
169
168
  const create = await run([
@@ -292,7 +291,7 @@ export async function createInstallSecret(
292
291
  "--format=value(name)",
293
292
  ]);
294
293
  const read: { ok: true; replication: SecretReplication } | { ok: false; error: string } =
295
- !pg.ok && NOT_FOUND.test(pg.stderr)
294
+ !pg.ok && isGcloudNotFound(pg.stderr)
296
295
  ? { ok: true, replication: { kind: "user-managed", locations: [install.region] } }
297
296
  : await readSecretReplication(install, { run });
298
297
  if (!read.ok) return read;
@@ -360,7 +359,7 @@ export async function ensureGeneratedSecrets(
360
359
  const secretId = gcpSecretId(install.env, name);
361
360
  const id = `secret ${secretId}`;
362
361
  const describe = await run(["secrets", "describe", secretId, project, "--format=value(name)"]);
363
- if (!describe.ok && !NOT_FOUND.test(describe.stderr)) {
362
+ if (!describe.ok && !isGcloudNotFound(describe.stderr)) {
364
363
  outcomes.push({ id, status: "failed", error: describe.stderr.trim() });
365
364
  continue;
366
365
  }
@@ -39,7 +39,7 @@ import {
39
39
  GATEWAY_POOL_MAX,
40
40
  isIpLiteral,
41
41
  } from "@caelo-cms/shared";
42
- import { gcloud as defaultGcloud } from "./gcloud.js";
42
+ import { gcloud as defaultGcloud, isGcloudNotFound } from "./gcloud.js";
43
43
  import { type GcloudRunner, realSleep, runWithRetry, type Sleep } from "./gcloud-retry.js";
44
44
  import {
45
45
  firebaseStagingSiteId,
@@ -87,7 +87,6 @@ export interface StagingDnsRecord {
87
87
  readonly value: string;
88
88
  }
89
89
 
90
- const NOT_FOUND = /NOT_FOUND|not found|cannot find|does not exist|could not be found|404/i;
91
90
  const ALREADY_EXISTS = /ALREADY_EXISTS|already exists|409/i;
92
91
 
93
92
  /** The `gcp` staging host's managed certificate: the edge's prefix plus six hex of the host's SHA-256. */
@@ -269,7 +268,7 @@ async function ensureStagingBucket(
269
268
  "--format=value(name)",
270
269
  ]);
271
270
  if (described.ok) outcomes.push({ id, status: "present" });
272
- else if (!NOT_FOUND.test(described.stderr)) {
271
+ else if (!isGcloudNotFound(described.stderr)) {
273
272
  return [{ id, status: "failed", error: described.stderr.trim() }];
274
273
  } else {
275
274
  const created = await run([
@@ -352,7 +351,7 @@ async function ensureService(
352
351
  `--project=${inputs.projectId}`,
353
352
  "--format=value(metadata.name)",
354
353
  ]);
355
- if (!existing.ok && !NOT_FOUND.test(existing.stderr)) {
354
+ if (!existing.ok && !isGcloudNotFound(existing.stderr)) {
356
355
  return { id, status: "failed", error: existing.stderr.trim() };
357
356
  }
358
357
  if (!existing.ok) {
@@ -689,7 +688,7 @@ async function deleteStagingDomainMapping(
689
688
  "--format=value(metadata.name)",
690
689
  ]);
691
690
  if (!described.ok) {
692
- if (/\bNOT_FOUND\b|not found|could not be found/i.test(described.stderr)) {
691
+ if (isGcloudNotFound(described.stderr)) {
693
692
  return { ok: true, deleted: false };
694
693
  }
695
694
  return {
@@ -814,7 +813,7 @@ async function ensureGcpEdge(
814
813
  "--format=value(name)",
815
814
  ]);
816
815
  if (!neg.ok) {
817
- if (!NOT_FOUND.test(neg.stderr)) return fail(`describe ${names.neg}: ${neg.stderr.trim()}`);
816
+ if (!isGcloudNotFound(neg.stderr)) return fail(`describe ${names.neg}: ${neg.stderr.trim()}`);
818
817
  const created = await run([
819
818
  "compute",
820
819
  "network-endpoint-groups",
@@ -862,7 +861,7 @@ async function ensureGcpEdge(
862
861
  ]);
863
862
  let backendJson: { selfLink?: string; backends?: { group?: string }[] } = {};
864
863
  if (!backend.ok) {
865
- if (!NOT_FOUND.test(backend.stderr)) {
864
+ if (!isGcloudNotFound(backend.stderr)) {
866
865
  return fail(`describe ${names.backend}: ${backend.stderr.trim()}`);
867
866
  }
868
867
  const created = await run([
@@ -922,7 +921,7 @@ async function ensureGcpEdge(
922
921
  "--format=value(name)",
923
922
  ]);
924
923
  if (!cert.ok) {
925
- if (!NOT_FOUND.test(cert.stderr)) return fail(`describe ${certName}: ${cert.stderr.trim()}`);
924
+ if (!isGcloudNotFound(cert.stderr)) return fail(`describe ${certName}: ${cert.stderr.trim()}`);
926
925
  const created = await run([
927
926
  "compute",
928
927
  "ssl-certificates",
@@ -47,7 +47,7 @@ import { createHash, randomUUID } from "node:crypto";
47
47
  import { readlinkSync } from "node:fs";
48
48
  import { hostname, networkInterfaces } from "node:os";
49
49
  import { z } from "zod";
50
- import type { GcloudResult } from "./gcloud.js";
50
+ import { type GcloudResult, isGcloudNotFound } from "./gcloud.js";
51
51
 
52
52
  /** A Cloud Run job execution, fully addressed. */
53
53
  export interface CloudRunExecutionRef {
@@ -229,8 +229,6 @@ export type ExecutionState =
229
229
  /** Cloud Run could not be asked; `error` says why. */
230
230
  | { readonly kind: "unknown"; readonly error: string };
231
231
 
232
- const NOT_FOUND = /NOT_FOUND|not found|could not be found|does not exist/i;
233
-
234
232
  const executionStatusSchema = z.object({
235
233
  status: z
236
234
  .object({
@@ -257,7 +255,7 @@ const executionStatusSchema = z.object({
257
255
  */
258
256
  export function parseExecutionState(result: GcloudResult): ExecutionState {
259
257
  if (!result.ok) {
260
- if (NOT_FOUND.test(result.stderr)) return { kind: "not-found" };
258
+ if (isGcloudNotFound(result.stderr)) return { kind: "not-found" };
261
259
  return {
262
260
  kind: "unknown",
263
261
  error: result.stderr.trim() || `gcloud exited ${result.exitCode}`,