Skip to content

Commit 5003a2b

Browse files
committed
Remove build-time IPinfo fallback
1 parent 3cc9421 commit 5003a2b

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

bun.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@types/react": "19.2.14",
5151
"@types/react-dom": "19.2.3",
5252
"baseline-browser-mapping": "^2.9.14",
53+
"caniuse-lite": "^1.0.30001792",
5354
"zod": "^4.2.1",
5455
"signal-exit": "3.0.7"
5556
},

packages/internal/src/env.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { serverEnvSchema, serverProcessEnv } from './env-schema'
33
// Only provide safe defaults in CI to avoid schema failures during tests
44
// In local dev, missing env vars should fail fast so devs know to configure them
55
const isCI = process.env.CI === 'true' || process.env.CI === '1'
6-
const isNextProductionBuild =
7-
process.env.NEXT_PHASE === 'phase-production-build'
86
const envInput = { ...serverProcessEnv }
97

108
const ensureEnvDefault = (key: keyof typeof envInput, value: string) => {
@@ -43,13 +41,6 @@ if (isCI) {
4341
ensureEnvDefault('DISCORD_APPLICATION_ID', 'test')
4442
}
4543

46-
// Next imports server route modules while collecting production build data.
47-
// Freebuff auth routes do not use IPinfo, so keep build-time validation from
48-
// requiring the runtime-only country-gating token. Runtime still fails fast.
49-
if (isNextProductionBuild) {
50-
ensureEnvDefault('IPINFO_TOKEN', 'build-time-placeholder')
51-
}
52-
5344
// Only log environment in non-production
5445
if (process.env.NEXT_PUBLIC_CB_ENVIRONMENT !== 'prod') {
5546
console.log('Using environment:', process.env.NEXT_PUBLIC_CB_ENVIRONMENT)

0 commit comments

Comments
 (0)