diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 58c2534..16f06af 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,7 +46,7 @@ jobs: s/D1_DATABASE_ID_PLACEHOLDER/$ENV{D1_DATABASE_ID}/g; s/KV_NAMESPACE_ID_PLACEHOLDER/$ENV{KV_NAMESPACE_ID}/g; s/TABLE_PREFIX_PLACEHOLDER/$ENV{TABLE_PREFIX}/g; - s/__APP_VERSION__/$ENV{APP_VERSION}/g; + s/__APP_VERSION__/'\''$ENV{APP_VERSION}'\''/g; ' wrangler.toml - name: Write secrets file diff --git a/scripts/deploy.mjs b/scripts/deploy.mjs index de4e5c2..8f8d848 100644 --- a/scripts/deploy.mjs +++ b/scripts/deploy.mjs @@ -5,7 +5,7 @@ const version = JSON.parse(readFileSync("package.json", "utf8")).version; const path = "worker/wrangler.toml"; const original = readFileSync(path, "utf8"); -writeFileSync(path, original.replaceAll("__APP_VERSION__", version)); +writeFileSync(path, original.replaceAll("__APP_VERSION__", `'${version}'`)); try { execSync("pnpm exec wrangler deploy", { cwd: "worker", stdio: "inherit" }); } finally { diff --git a/worker/src/routes/me.ts b/worker/src/routes/me.ts index e5998f1..dcd7dac 100644 --- a/worker/src/routes/me.ts +++ b/worker/src/routes/me.ts @@ -537,15 +537,13 @@ meRoutes.get("/api-keys", async (c) => { const records = await listApiKeyIndex(c.env.KV, userId); records.sort((a, b) => b.created_at.localeCompare(a.created_at)); return c.json({ - keys: records.map( - ({ id, name, created_at, expires_at, last_used_at }) => ({ - id, - name, - created_at, - expires_at, - last_used_at, - }), - ), + keys: records.map(({ id, name, created_at, expires_at, last_used_at }) => ({ + id, + name, + created_at, + expires_at, + last_used_at, + })), }); });