chore: restructure repository into packages/ folder (#3197)

We're having a growing number of packages in this repository. This PR
moves them into a `packages/` directory like it's commonly done in other
projects.
This commit is contained in:
Marvin Hagemeister
2025-08-06 15:52:45 +02:00
committed by GitHub
parent 27e407a1e3
commit 815b1940e3
184 changed files with 94 additions and 82 deletions
+3
View File
@@ -0,0 +1,3 @@
# Fresh build id
Don't use this package directly. It's considered internal for Fresh.
+11
View File
@@ -0,0 +1,11 @@
{
"name": "@fresh/build-id",
"version": "1.0.0",
"license": "MIT",
"exports": {
".": "./mod.ts"
},
"imports": {
"@std/encoding": "jsr:@std/encoding@^1.0.10"
}
}
+19
View File
@@ -0,0 +1,19 @@
import { encodeHex } from "@std/encoding/hex";
export const DENO_DEPLOYMENT_ID: string | undefined = Deno.env.get(
"DENO_DEPLOYMENT_ID",
);
const deploymentId = DENO_DEPLOYMENT_ID ||
// For CI
Deno.env.get("GITHUB_SHA") ||
crypto.randomUUID();
const buildIdHash = await crypto.subtle.digest(
"SHA-1",
new TextEncoder().encode(deploymentId),
);
export let BUILD_ID: string = encodeHex(buildIdHash);
export function setBuildId(buildId: string): void {
BUILD_ID = buildId;
}