Dashboard › craft › Distillation
d511f289-b018-441c-9283-61c5bc59049c["6d7f7fe928cd135ca48dad0fe978f3b3","33bfef6515913f32da204a99726971ed","2419d8bc34a2ffeb820ec591e43c25a5","26cd665514dda6f60782ae538917ae8a","c1b29eb4fb9da208fbea24ede1f60c3d","5cbc3da09c7d9eff1c6e79b442bd9169","5f839676a06f681757fa4686759e412d","b51f5edf12c507867757e26dfde0bf75","a49dbc4e24c21603f9c413733bd5b9f9","22aee831480923e6fa18b74d800dcab6","673766ad59643dc9edd0def34fccf663","8deec465e7ae12e5441b20f96f038c73","8cedbfc6ec8e52eddbfc15baba255604","bb6288403b2722eeb864b68cb079f7c0","a0b8778ca36033b9062f9610b683ff05","074af52d5b15e7c3079604383fc27bfc","065370a5079baf3154ec92e405690c35","ef5cadc467b810fbe56bb6d8f12510a2","a125e0c7bbed6858b599470d00de8edb","3041373a4dc2c1e1e23a6f5098232a75","3d07c1eb039bbd7bab533802597f59a6","064c67a043a147725c6b1bdaf07aef9a","5a42164e8a5dcb7ca758de0cb3d912b7","391e5aab9055102db86a238e7240222e","c697b1f00555a85c51fd6e2c9388fafc","b392750c1e1a8e002065f34ccc3b5d23","b93959e42871e05341eb48620e9382e8","1b0cde3c0b504ce37ebeb4b4a600b9e9","651a3f4e318b3a4fb9f4d472a9233422","bb6c44ddfe1375cfaace1164e69c3ef7","5421c1da20d00934a3f306a64a03ff8a","5348a8df708859e3e799fa32a296a651","2c1fe0eea5f676d610d9425375df84b2","187bb19b05a22d7647340cfe9044be9a","a3112586bf076cd951d8bec0920c9610","90d733f5ced67776dda674429d0206a4","7f3e4934d3f9553a0f09951f17850628","14b9efc6e6ae1f5f0ba761ab31b11b30","4ab04dd86dfeb9a1ee4d19445cdc15d9","259427528674c5c1a8438c8010754fe3","701d6a7633ce04a16adcbd2fc4a09da2","e71ff14cfe253705c29ee289cb751443","40c3aae85d127eaf2383a08c2e5c8def","ea28dc50d4dd2b06f8b9970b904e6f34","7c0936af3dadf905b59468aefdbf98a6","54e2857a66b7ec02b414abada7d58598"]
tsc --noEmit exit 0 (clean). Lint: 7 problems, 0 errors, 7 warnings, including 228:12 warning '_err' is defined but never used @typescript-eslint/no-unused-vars.volta.node = 24.18.0 → global fetch available, no polyfill/new dependency, raw fetch used (no CF SDK).publish() (cloudflare.ts:343) — dry-run check at line 378 returns before resolveProductionBranch() (lines 393-396, the only fetch() caller) and before spawnProcess (line 418). Confirmed: dry-run makes zero network calls (critical invariant holds). Noted minor non-bug: dry-run preview omits --branch when branch is unconfigured/inferred, so dry-run output isn't byte-exact vs. real run when inference is in play.${VAR} expansion guard (cloudflare.ts:175-186, regex /^\$\{.*\}$/) protects config-sourced projectName/productionBranch/workingDir from being expanded against env (which includes CLOUDFLARE_API_TOKEN) by spawnProcess, but does NOT cover the API-inferred production branch pushed into argv at line 262. Recommended fix: apply same check to resolved branch in resolveProductionBranch(), treating a match as unresolved (return undefined).!response.ok path throws HTTP ${status} ${statusText} (no token); network/DNS errors via undici don't include headers; token only ever in Authorization header, never in argv or logs.--branch (wrangler defaults to production) on non-2xx/missing-field/network error. Recommendation: distinguish 404 (project-not-found, real misconfig → should hard-fail via reportError) from transient 5xx/network blips (keep soft-fail warn+continue).encodeURIComponent correctly applied to accountId and projectName (lines 303-304) — no URL injection. response.json() parse errors caught in try (line 327). Default flip to worker — grep clean, no other code assumes old pages default. projectName still required only for pages deployType (lines 165-169); bare {name:'cloudflare'} = worker needs no projectName. accountId and token both read at construct-time (lines 201, 212) — consistent, tests correctly isolate via beforeEach/afterEach env reset; || undefined treats empty-string env as unset. ${VAR} guard's typeof value === 'string' check (line 180) skips undefined safely. Quoted: "accountId not guarded against ${VAR} — correct by construction: it comes from process.env, never from config, so it can't be a config-injected expansion" and "it's forwarded via env (line 412), not argv, so replaceEnvVariable never touches it." Worker-never-calls-API confirmed: resolveProductionBranch() gated on deployType === 'pages' at lines 393-396; quoted: "Test worker deploy never calls the Pages API proves it." Docs reviewed as accurate (worker default note lines 10-12, optional account id line 29, 3-step branch resolution lines 37-41, no-OIDC note line 32, Account → Cloudflare Pages → Edit scope).${VAR} regex check into reusable constant (ENV_EXPANSION_REGEX), apply to API-inferred branch, and distinguish a 404 (project-not-found) as a hard error via reportError while keeping soft-fail (warn+continue) for transient errors.reportError throws in test context based on prior "no artifacts found" test expecting rejects.toThrow; planned that a 404 hard-fail via reportError inside publish() would propagate as a rejection./Pages project "missing-project" not found/. Initial test run: 1 failed, 26 passed (27 total) — AssertionError: promise resolved "undefined" instead of rejecting.reportError doesn't throw in this test context. Actual root cause found: the reportError call for the 404 case was placed INSIDE the method's own try block, so the error it threw was caught by that same method's catch and swallowed into a warning instead of propagating. Fix: restructured resolveProductionBranch() so the try only wraps the network fetch + JSON parse (returning a result), and