@neat.is/core 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +76 -27
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +76 -27
- package/dist/cli.js.map +1 -1
- package/dist/neatd.cjs +14 -2
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +14 -2
- package/dist/neatd.js.map +1 -1
- package/package.json +2 -2
package/dist/neatd.cjs
CHANGED
|
@@ -4999,6 +4999,9 @@ function resolveWebPackageDir() {
|
|
|
4999
4999
|
const pkgJsonPath = req.resolve("@neat.is/web/package.json");
|
|
5000
5000
|
return import_node_path34.default.dirname(pkgJsonPath);
|
|
5001
5001
|
}
|
|
5002
|
+
function resolveStandaloneServerEntry(webDir) {
|
|
5003
|
+
return import_node_path34.default.join(webDir, ".next/standalone/packages/web/server.js");
|
|
5004
|
+
}
|
|
5002
5005
|
async function spawnWebUI(restPort) {
|
|
5003
5006
|
const portRaw = process.env.NEAT_WEB_PORT;
|
|
5004
5007
|
const port = portRaw && portRaw.length > 0 ? Number.parseInt(portRaw, 10) : DEFAULT_WEB_PORT;
|
|
@@ -5007,13 +5010,22 @@ async function spawnWebUI(restPort) {
|
|
|
5007
5010
|
}
|
|
5008
5011
|
await assertPortFree(port);
|
|
5009
5012
|
const cwd = resolveWebPackageDir();
|
|
5013
|
+
const serverEntry = resolveStandaloneServerEntry(cwd);
|
|
5014
|
+
try {
|
|
5015
|
+
require.resolve(serverEntry);
|
|
5016
|
+
} catch {
|
|
5017
|
+
throw new Error(
|
|
5018
|
+
`neatd: web UI standalone build missing at ${serverEntry}. The published @neat.is/web tarball should include it; if you're running from a monorepo checkout, run \`npm run build --workspace @neat.is/web\` first, or set NEAT_WEB_DISABLED=1 to skip the web UI.`
|
|
5019
|
+
);
|
|
5020
|
+
}
|
|
5010
5021
|
const env = {
|
|
5011
5022
|
...process.env,
|
|
5012
5023
|
PORT: String(port),
|
|
5024
|
+
HOSTNAME: process.env.HOSTNAME ?? "0.0.0.0",
|
|
5013
5025
|
NEAT_API_URL: process.env.NEAT_API_URL ?? `http://localhost:${restPort}`
|
|
5014
5026
|
};
|
|
5015
|
-
const child = (0, import_node_child_process.spawn)(
|
|
5016
|
-
cwd,
|
|
5027
|
+
const child = (0, import_node_child_process.spawn)(process.execPath, [serverEntry], {
|
|
5028
|
+
cwd: import_node_path34.default.dirname(serverEntry),
|
|
5017
5029
|
env,
|
|
5018
5030
|
stdio: ["ignore", "inherit", "inherit"],
|
|
5019
5031
|
detached: false
|