From d2d09c56518a15d11e82517ed3c1a7d5532afb7c Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Wed, 14 Aug 2024 03:16:39 +0900 Subject: [PATCH 1/3] chore: revert #12 --- .github/workflows/ci.yaml | 3 +- .github/workflows/deploy.yml | 3 +- .mise.toml | 2 - bun.lockb | Bin 48396 -> 46803 bytes package.json | 11 ++--- src/index.ts | 76 +++++++++++++++++++---------------- 6 files changed, 47 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 490aa36..3bb5a5e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,8 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Bun - # https://github.com/oven-sh/setup-bun/issues/37#issuecomment-2256820622 - uses: oven-sh/setup-bun@feat/implement-wildcard-resolution-into-the-action + uses: oven-sh/setup-bun@v1 with: bun-version: 1.0.x diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 81f595c..7bf1660 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,8 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Bun - # https://github.com/oven-sh/setup-bun/issues/37#issuecomment-2256820622 - uses: oven-sh/setup-bun@feat/implement-wildcard-resolution-into-the-action + uses: oven-sh/setup-bun@v1 with: bun-version: 1.0.x diff --git a/.mise.toml b/.mise.toml index e5ccf8b..e4d3255 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,4 +1,2 @@ [tools] bun = "1" -# Note: Required for the lefthook pre-commit hook -node = "20.16.0" diff --git a/bun.lockb b/bun.lockb index 727d1be432a6d7e2c374076ea28f80b7d0084cc5..30278cebb90f62940996ba66f6722bf0138d86a9 100755 GIT binary patch delta 7253 zcmeHMYgANMmcI8=1(Z-A2vU$j-o6k71PThcJQcB2K*dr~0ihI>M*v?`6!85-#oc*m z(uu_Bv`#v93>{l>oXFVbX*!yjBopH}qHV`?d_+5m%9z;SzExLTtFwB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&l6u>;uTJW1L3uuU!Ed-U(aQ45!XGzgVB`KzeB--rW_M#jL(YG!%Ij0N{$R%I@BPQTUP*lz`LEOZEALgW z?Vph9ZyL3ux4^zInz~M_S01=hBVTYX`Xu0bZvo{AtaGbHJO1&aKlDnz52Nktv@QqQ zpaDYkMjS2E_)il-c|ZPQOi|TVga3_T*mm5YyVSGd@PK#R-%JFr25-Hoc4%4tamg?h z#jZCDXv5KgcaTR%#h(^yT<;^tDaspc1(WFG28GPj^W4{>bUdi;yvUsYr}s67@YG7 diff --git a/package.json b/package.json index a59336d..71ac7c8 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "url": "https://pulsate.dev" }, "scripts": { - "dev": "bun run --watch src/index.ts", - "start": "NODE_ENV=production bun run build/index.js", + "dev": "bun run src/index.ts", + "start": "bun run build/index.js", "build": "bun build --entrypoints ./src/index.ts --outdir ./build --target bun", "format": "bunx @biomejs/biome format --write ./src", "lint": "bunx @biomejs/biome lint ./src", @@ -21,7 +21,7 @@ "postinstall": "lefthook install" }, "dependencies": { - "elysia": "^1.1.6", + "hono": "^4.1.3", "lefthook": "^1.6.7" }, "devDependencies": { @@ -31,8 +31,5 @@ }, "peerDependencies": { "typescript": "^5.0.0" - }, - "trustedDependencies": [ - "@biomejs/biome" - ] + } } diff --git a/src/index.ts b/src/index.ts index 74c68f2..6e73352 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,35 +1,41 @@ -import { Elysia } from "elysia"; - -const app = new Elysia(); - -app - .get("/", ({ redirect }) => { - return redirect("https://pulsate.dev", 302); - }) - .get("/docs", ({ redirect }) => { - return redirect("https://docs.pulsate.dev", 302); - }) - .get("/api", ({ redirect }) => { - return redirect("https://api.pulsate.dev/reference", 302); - }) - .get("/discord", ({ redirect }) => { - return redirect("https://discord.gg/NmczMnWGvh", 302); - }) - .get("/github", ({ redirect }) => { - return redirect("https://github.com/pulsate-dev", 302); - }) - .get("/x", ({ redirect }) => { - return redirect("https://x.com/pulsate_dev", 302); - }) - .get("/youtube", ({ redirect }) => { - return redirect("https://youtube.com/@pulsate-dev", 302); - }) - .get("/discussions", ({ redirect }) => { - return redirect("https://github.com/orgs/pulsate-dev/discussions", 302); - }); - -export default { - async fetch(request: Request): Promise { - return await app.fetch(request); - }, -}; +import { Hono } from "hono"; + +const app = new Hono(); + +app.get("/", (c) => { + return c.redirect("https://pulsate.dev", 302); +}); + +app.get("/docs", (c) => { + return c.redirect("https://docs.pulsate.dev", 302); +}); + +app.get("/api", (c) => { + return c.redirect("https://api.pulsate.dev/reference", 302); +}); + +app.get("/discord", (c) => { + return c.redirect("https://discord.gg/NmczMnWGvh", 302); +}); + +app.get("/github", (c) => { + return c.redirect("https://github.com/pulsate-dev/", 302); +}); + +app.get("/x", (c) => { + return c.redirect("https://x.com/pulsate_dev", 302); +}); + +app.get("/youtube", (c) => { + return c.redirect("https://youtube.com/@pulsate-dev", 302); +}); + +app.get("/bluesky", (c) => { + return c.redirect("https://bsky.app/profile/pulsate.dev", 302); +}); + +app.get("/discussions", (c) => { + return c.redirect("https://github.com/orgs/pulsate-dev/discussions", 302); +}); + +export default app; From 6c06b93632f5c775fbdd66ff53b00a2d177c5486 Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Wed, 14 Aug 2024 02:43:59 +0900 Subject: [PATCH 2/3] chore: cherry-pick `e0751a085972c3e2e8a1f4ffb7a4d3cdf98b177f` --- .github/workflows/ci.yaml | 3 ++- .github/workflows/deploy.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3bb5a5e..490aa36 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,8 @@ jobs: uses: actions/checkout@v4 - name: Setup Bun - uses: oven-sh/setup-bun@v1 + # https://github.com/oven-sh/setup-bun/issues/37#issuecomment-2256820622 + uses: oven-sh/setup-bun@feat/implement-wildcard-resolution-into-the-action with: bun-version: 1.0.x diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7bf1660..81f595c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,8 @@ jobs: uses: actions/checkout@v4 - name: Setup Bun - uses: oven-sh/setup-bun@v1 + # https://github.com/oven-sh/setup-bun/issues/37#issuecomment-2256820622 + uses: oven-sh/setup-bun@feat/implement-wildcard-resolution-into-the-action with: bun-version: 1.0.x From 9179d879581b7f2b7b44c38d5dfca992a07976dd Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Wed, 14 Aug 2024 02:41:41 +0900 Subject: [PATCH 3/3] chore: Add `Node.js` tool-chain --- .mise.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mise.toml b/.mise.toml index e4d3255..e5ccf8b 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,2 +1,4 @@ [tools] bun = "1" +# Note: Required for the lefthook pre-commit hook +node = "20.16.0"