fix(web-next): support USE_DEV_SEED=false and load root .env globally
- Add USE_DEV_SEED=false branch to bindAll dispatcher - Use dotenv-cli to inject root .env into all Turbo tasks - Add globalDependencies for .env cache invalidation
This commit is contained in:
@@ -151,6 +151,10 @@ export async function bindAllDevSeed(): Promise<void> {
|
||||
* (IRealtimeBroadcaster, IRealtimeHandlerRegistry) and pass them through.
|
||||
*/
|
||||
export async function bindAll(): Promise<void> {
|
||||
if (process.env.USE_DEV_SEED === "false") {
|
||||
await bindAllProduction();
|
||||
return;
|
||||
}
|
||||
if (process.env.USE_DEV_SEED === "true") {
|
||||
await bindAllDevSeed();
|
||||
return;
|
||||
|
||||
11
package.json
11
package.json
@@ -7,8 +7,8 @@
|
||||
"node": ">=20"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"dev": "turbo run dev",
|
||||
"build": "dotenv -- turbo run build",
|
||||
"dev": "dotenv -- turbo run dev",
|
||||
"lint": "turbo run lint",
|
||||
"test": "turbo run test",
|
||||
"test:e2e": "turbo run test:e2e",
|
||||
@@ -32,19 +32,20 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ai-hero/sandcastle": "^0.5.10",
|
||||
"@typescript-eslint/parser": "^8.25.0",
|
||||
"zod": "^3.25.0",
|
||||
"@playwright/test": "^1.49.0",
|
||||
"@stryker-mutator/core": "^8.7.0",
|
||||
"@stryker-mutator/vitest-runner": "^8.7.0",
|
||||
"@turbo/gen": "^2.4.0",
|
||||
"@types/node": "^22.0.0",
|
||||
"@typescript-eslint/parser": "^8.25.0",
|
||||
"dotenv-cli": "^11.0.0",
|
||||
"fallow": "^2.73.0",
|
||||
"husky": "^9.0.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"prettier": "^3.5.0",
|
||||
"turbo": "^2.4.0",
|
||||
"typescript": "^5.8.0"
|
||||
"typescript": "^5.8.0",
|
||||
"zod": "^3.25.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,js,mjs,jsx}": [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"$schema": "https://turborepo.dev/schema.json",
|
||||
"globalDependencies": [".env"],
|
||||
"globalEnv": [
|
||||
"CI",
|
||||
"DATABASE_URL",
|
||||
|
||||
Reference in New Issue
Block a user