Commit 256ca79
committed
fix(seed): refuse to run against a prod / preprod database
Address review feedback on #3306: the seed script was relying solely
on `EGAPRO_AUTO_SEED_CONFORMITE` (scoped to .kontinuous/env/dev) to
stay out of higher environments. Add a defence-in-depth guard inside
the script itself so even a mis-configured flag cannot overwrite real
declarations with synthetic ones.
`assertNotProduction()` aborts with exit 1 when
`NEXT_PUBLIC_EGAPRO_ENV` or `EGAPRO_ENV` equals "prod", "production",
"preprod" or "preproduction". `EGAPRO_ALLOW_SEED_IN_PROD=true`
bypasses the check — kept as a deliberate break-glass escape hatch.1 parent bb97948 commit 256ca79
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
43 | 76 | | |
44 | 77 | | |
45 | 78 | | |
| |||
205 | 238 | | |
206 | 239 | | |
207 | 240 | | |
| 241 | + | |
208 | 242 | | |
209 | 243 | | |
210 | 244 | | |
| |||
0 commit comments