Skip to content

fix: restore valid TypeScript source in src/lib/backend/env.ts - #2044

Open
woahwhattheheck wants to merge 1 commit into
Commitlabs-Org:masterfrom
woahwhattheheck:fix/env-ts-restore-corruption-20261004
Open

woahwhattheheck wants to merge 1 commit into
Commitlabs-Org:masterfrom
woahwhattheheck:fix/env-ts-restore-corruption-20261004

Conversation

@woahwhattheheck

Copy link
Copy Markdown

Problem

src/lib/backend/env.ts on master (0d84703) is not valid TypeScript. Commit a43dd17 (#1986) replaced the file with a base64-encoded artifact that:

  • cannot be parsed as TypeScript — the stored content is itself base64 text and also contains a stray invalid character,
  • is truncated mid-declaration at _cachedEnv, dropping getValidatedEnv, _resetEnvCache, and the production fail-fast validation block used by src/lib/backend/config.ts,
  • carries identifier corruptions in the schema: 10 occurrences of zZ. where z. (the zod import) is meant, 2 occurrences of PASSTHRASE for PASSPHRASE, and a dropped space in the URL error message.

Fix

Restores the file to its exact content from immediately before a43dd17 (pre-change blob 53aaa7a7b475129501846635a72875bd6fe935b9). The restored source parses cleanly, exports getValidatedEnv/_resetEnvCache again, and makes no other semantic change to the schema or the _cachedEnv caching behavior.

Verification

  • The restored module parses successfully under a real TypeScript parser; the corrupted artifact fails the same parse.
  • Byte-exact match to the last-good source; the change is limited to this one file.

Commit a43dd17 (Commitlabs-Org#1986) replaced this file with a base64-encoded blob that is not parseable TypeScript, contains a stray invalid character at offset 8679, is truncated at the _cachedEnv declaration (dropping getValidatedEnv, _resetEnvCache and the production fail-fast check used by src/lib/backend/config.ts), and carries identifier typos (10x zZ.*, 2x PASSTHRASE, plus a dropped space in the URL message). This restores the exact pre-change source (blob 53aaa7a), undoing that corruption with no other semantic change.
@vercel

vercel Bot commented Oct 5, 2026

Copy link
Copy Markdown

@woahwhattheheck is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant