#!/usr/bin/env node import { spawn } from 'node:child_process'; const isInsideEdgeOneBuilder = process.env.NEXT_PRIVATE_STANDALONE === 'true'; const command = isInsideEdgeOneBuilder ? 'BUILD_TARGET=edgeone EDGEONE_PAGES=1 pnpm build' : 'BUILD_TARGET=edgeone EDGEONE_PAGES=1 edgeone makers build'; const child = spawn(command, { stdio: 'inherit', shell: true, env: { ...process.env, BUILD_TARGET: 'edgeone', EDGEONE_PAGES: '1', }, }); child.on('exit', (code, signal) => { if (signal) { process.kill(process.pid, signal); return; } process.exit(code ?? 1); });