Compare commits

...

1 commit

2 changed files with 7 additions and 2 deletions

View file

@ -226,6 +226,11 @@ export function backendDevPlugin(root, env = process.env) {
process.once('SIGINT', () => { stopAll(); process.exit(0) })
process.once('SIGTERM', () => { stopAll(); process.exit(0) })
}
// ★ NO DEV BACKEND FOR A CHECK. A gate or a server-side-render check that boots vite from this config does not
// need PocketBase or the voice engine, and starting them cost a 32 MB download in a fresh worktree, a spawned
// process and a port clash (127.0.0.1:8090) with a dev server already running. DOXA_NO_DEV_BACKEND=1 keeps the
// quiet offline answers above and starts nothing; the gate runner (run-parallel.mjs) sets it for every gate.
if (process.env.DOXA_NO_DEV_BACKEND === '1') { logger.info('[dx-backend-dev] DOXA_NO_DEV_BACKEND=1: no dev backend started'); return }
for (const b of backends) {
if (b.remote) {
logger.info(`[${b.name}] not started here: ${b.route} → ${b.remote}`)

View file

@ -41,7 +41,7 @@
* USAGE
* node internal/run-parallel.mjs --label=pre -- check:a check:b ... # runs `bun run <name>`
* node internal/run-parallel.mjs --bundles # BUNDLE=<d> bun x vite build, for every plugin-designs/<d>/
* env: GATES_CONCURRENCY (default min(cpus,6)) · BUILD_CONCURRENCY (default 4)
* env: GATES_CONCURRENCY (default min(cpus,6)) · BUILD_CONCURRENCY (default 4) · every step gets DOXA_NO_DEV_BACKEND=1
*/
import { spawn, spawnSync } from 'node:child_process'
import { readdirSync, existsSync, readFileSync } from 'node:fs'
@ -193,7 +193,7 @@ async function runStep(step) {
const started = Date.now()
const child = spawn(step.cmd, step.args, {
cwd: ROOT,
env: { ...process.env, ...step.env },
env: { DOXA_NO_DEV_BACKEND: '1', ...process.env, ...step.env }, // gates never start the dev backends (backend-dev-plugin.mjs)
stdio: ['ignore', 'pipe', 'pipe'],
})
let out = ''