From b7a12bdee336df12597841ab1b94664012e337a2 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Fri, 1 May 2026 14:33:20 -0700 Subject: [PATCH] chore(deploy): add explicit named deploy scripts and dry-run variants Adds deploy:staging, deploy:production, and dry-run variants per cloudflare-bill-audit-2026-04.md Phase -1 to prevent accidental top-level dev deploys during the worker-logs sunset. Updates the deployment table in CLAUDE.md to point to the explicit scripts. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 13 ++++++++----- package.json | 5 +++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 76e16b6..0f35b19 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -128,11 +128,14 @@ This repo is a fork of [whoabuddy/worker-logs](https://github.com/whoabuddy/work ### Deployment Environments -| Environment | Domain | Deploy Command | -|-------------|--------|----------------| -| Local dev | localhost:8787 | `npm run dev` | -| Staging | logs.aibtc.dev | `npm run deploy -- --env staging` | -| Production | logs.aibtc.com | `npm run deploy -- --env production` | +| Environment | Domain | Deploy Command | Dry Run | +|-------------|--------|----------------|---------| +| Local dev | localhost:8787 | `npm run dev` | — | +| Top-level (dev only) | workers.dev preview | `npm run deploy` | `npm run deploy:dry-run` | +| Staging | logs.aibtc.dev | `npm run deploy:staging` | `npm run deploy:dry-run:staging` | +| Production | logs.aibtc.com | `npm run deploy:production` | `npm run deploy:dry-run:production` | + +> **Safety:** the bare `npm run deploy` script targets the top-level dev config, not staging or production. During the worker-logs sunset (see `cloudflare-bill-audit-2026-04.md`), prefer the explicit `deploy:staging` / `deploy:production` scripts so no one accidentally ships a config-less deploy. ### Syncing with upstream diff --git a/package.json b/package.json index 7f70df1..142ec52 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,11 @@ "scripts": { "dev": "npm run wrangler -- dev --ip 0.0.0.0", "deploy": "npm run wrangler -- deploy", + "deploy:staging": "npm run wrangler -- deploy --env staging", + "deploy:production": "npm run wrangler -- deploy --env production", + "deploy:dry-run": "npm run wrangler -- deploy --dry-run", + "deploy:dry-run:staging": "npm run wrangler -- deploy --env staging --dry-run", + "deploy:dry-run:production": "npm run wrangler -- deploy --env production --dry-run", "cf-typegen": "npm run wrangler -- types", "wrangler": "set -a && . ./.env && set +a && npx wrangler", "test": "vitest run",