feat(vite): read build id from env if present (#3233)

Fix #3232

Disclaimer: This code was mostly generated by GitHub Copilot agent using
Sonnet-4, but tested and verified by me.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
fry69
2025-08-21 13:31:45 +02:00
committed by GitHub
co-authored by Marvin Hagemeister
parent 647d6f9adb
commit 9f09786b06
5 changed files with 70 additions and 7 deletions
+1
View File
@@ -6,6 +6,7 @@ export const DENO_DEPLOYMENT_ID: string | undefined = Deno.env.get(
const deploymentId = DENO_DEPLOYMENT_ID ||
// For CI
Deno.env.get("GITHUB_SHA") ||
Deno.env.get("CI_COMMIT_SHA") ||
crypto.randomUUID();
const buildIdHash = await crypto.subtle.digest(
"SHA-1",