Commit Graph

3 Commits

Author SHA1 Message Date
amianthus
22cb850369 Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-05-20 17:00:05 +01:00
amianthus
0512d58303 fix(pw): 🐛 disable emulate and skip .env.local against prod db
bunfig preloads scripts/preload-env.ts which loaded dw .env.local files
BEFORE pw could rename them, so pw inherited the dev DB URL and dev.ts
auto-set EMULATE_GOOGLE_URL. The previous stash-rename approach raced
the preload and lost. Now: preload-env.ts honours PW_MODE=1 and skips
.env.local loading; pw sets EMULATE_GOOGLE_URL='' so dev.ts's ??
fallback can't reinstate emulate; the stash dance is gone. A 'bun pw
restore' command remains for one-time cleanup of pre-fix .pw-stash
files.
2026-05-20 14:33:23 +01:00
amianthus
2d0cf2611d feat(pw): add bun pw for prod env dev testing
Adds a lightweight script to run an existing dw worktree with production
environment variables from Infisical. Key behaviors:

- Reuses dw registry for worktree number / port / alias discovery
- Temporarily stashes .env.local files so preload-env.ts cannot
  override Infisical-injected prod secrets with dev Neon branch URLs
- Restores stashed .env.local files on exit (SIGINT/SIGTERM/child exit)
- Only overrides SQS queue URLs to local ElasticMQ (avoids consuming
  prod messages); everything else (DB, Redis, Stripe) flows from Infisical
- Provides pw identify and pw restore subcommands
2026-05-20 13:17:44 +01:00