mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-09 21:02:19 +08:00
- e2e helpers: also expand the port-prefix placeholder in HEXCLAVE_*/
NEXT_PUBLIC_HEXCLAVE_* vars (the renamed .env.development keys no longer
matched the STACK_-only prefix filter, leaving literal ${...} in every URL).
- docker/local-emulator/generate-env-development.mjs: read source keys under
the canonical HEXCLAVE_* name with STACK_* fallback and emit canonical keys
(the exact-name lookups threw after the source env files were renamed).
- prisma.config.ts: resolve the datasource URL from
HEXCLAVE_DATABASE_CONNECTION_STRING with legacy fallback (Prisma's env()
helper only knew the legacy name); same for the psql-inner script.
- backend vitest: accept both env prefixes and dual-read the DB connection
string in the auto-migration tests.
- getProcessEnv: empty-as-unset fallback (||), consistent with getEnvVariable —
an empty HEXCLAVE_* template placeholder must not shadow a real legacy value.
- errors.tsx debugger flag and dashboard next.config emulator flag: dual-read
the canonical name.
- Vite examples and docs snippets: VITE_STACK_* → VITE_HEXCLAVE_* (the old
names were dead after their .env.development files were renamed).
27 lines
616 B
TypeScript
27 lines
616 B
TypeScript
import { resolve } from 'path'
|
|
import { loadEnv } from 'vite'
|
|
import { defineConfig, mergeConfig } from 'vitest/config'
|
|
import sharedConfig from '../../vitest.shared'
|
|
|
|
export default mergeConfig(
|
|
sharedConfig,
|
|
defineConfig({
|
|
test: {
|
|
testTimeout: 60000,
|
|
hookTimeout: 60000,
|
|
env: {
|
|
...loadEnv('', process.cwd(), ''),
|
|
...loadEnv('development', process.cwd(), ''),
|
|
},
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, './src')
|
|
}
|
|
},
|
|
envDir: __dirname,
|
|
envPrefix: ['HEXCLAVE_', 'STACK_'],
|
|
})
|
|
)
|