refactor(env): collapse 7 shallow env modules into env/server.ts (#20 sub-#1)#25
Merged
Merged
Conversation
…sub-#1) - Single env/server.ts with lazy getters; reads only on access (Workers-safe). - Delete env/{openai,secret,db,telegram,cloudflare,required,package}.ts. - Keep env/public.ts (separate browser-facing concern). - Migrate all importers to serverEnv.X / bucket.X. - Update CLAUDE.md architecture block; add CONTEXT.md glossary (imagePipeline / imageStore / escalator). Refs #20 sub-#1. Closes #20. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
purranormal-activity | 6127f19 | Commit Preview URL Branch Preview URL |
May 24 2026, 02:58 PM |
- drizzle: wrap client in lazy Proxy singleton so connection config is not read until first db.select() call. Module import no longer touches process.env.TURSO_*. - telegram: drop URL memoisation (or document if kept); per-call template eval is trivially cheap and matches the rest of the lazy-env stance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
env/server.tswith lazy getters — Workers-safe (noprocess.envreads at module load).openai,secret,db,telegram,cloudflare,required,package.env/public.ts(separate browser-facing concern).serverEnv.X/bucket.X.CLAUDE.mdarchitecture block.CONTEXT.mdglossary (imagePipeline / imageStore / escalator).Refs #20 sub-#1. Closes #20 (last of three sub-PRs).
Test plan
pnpm lintcleanpnpm typecheckcleanpnpm buildgreenpnpm testgreenpnpm dev-> home + explore + new + edit + image upload all render.🤖 Generated with Claude Code