buildwithnexus 0.5.6 → 0.5.7

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/bin.js CHANGED
@@ -498,30 +498,35 @@ async function resolvePortConflicts(ports) {
498
498
  async function launchVm(platform, diskPath, initIsoPath, ram, cpus, ports) {
499
499
  const machineArgs = platform.os === "mac" ? ["-machine", "virt,gic-version=3"] : ["-machine", "pc"];
500
500
  const biosArgs = fs4.existsSync(platform.biosPath) ? ["-bios", platform.biosPath] : [];
501
- const buildArgs = (cpuArgs) => [
502
- ...machineArgs,
503
- ...cpuArgs,
504
- "-m",
505
- `${ram}G`,
506
- "-smp",
507
- `${cpus}`,
508
- "-drive",
509
- `file=${diskPath},if=virtio,cache=writethrough`,
510
- "-drive",
511
- `file=${initIsoPath},if=virtio,format=raw,cache=writethrough`,
512
- "-display",
513
- "none",
514
- "-serial",
515
- "none",
516
- "-net",
517
- "nic,model=virtio",
518
- "-net",
519
- `user,hostfwd=tcp::${ports.ssh}-:22,hostfwd=tcp::${ports.http}-:4200,hostfwd=tcp::${ports.https}-:443`,
520
- ...biosArgs,
521
- "-pidfile",
522
- PID_FILE,
523
- "-daemonize"
524
- ];
501
+ const buildArgs = (cpuArgs) => {
502
+ const logsDir = path4.join(NEXUS_HOME2, "vm", "logs");
503
+ fs4.mkdirSync(logsDir, { recursive: true });
504
+ const serialLogPath = path4.join(logsDir, "serial.log");
505
+ return [
506
+ ...machineArgs,
507
+ ...cpuArgs,
508
+ "-m",
509
+ `${ram}G`,
510
+ "-smp",
511
+ `${cpus}`,
512
+ "-drive",
513
+ `file=${diskPath},if=virtio,cache=writethrough`,
514
+ "-drive",
515
+ `file=${initIsoPath},if=virtio,format=raw,cache=writethrough`,
516
+ "-display",
517
+ "none",
518
+ "-serial",
519
+ `file:${serialLogPath}`,
520
+ "-net",
521
+ "nic,model=virtio",
522
+ "-net",
523
+ `user,hostfwd=tcp::${ports.ssh}-:22,hostfwd=tcp::${ports.http}-:4200,hostfwd=tcp::${ports.https}-:443`,
524
+ ...biosArgs,
525
+ "-pidfile",
526
+ PID_FILE,
527
+ "-daemonize"
528
+ ];
529
+ };
525
530
  try {
526
531
  await execa(platform.qemuBinary, buildArgs(platform.qemuCpuFlag.split(" ")), { env: scrubEnv() });
527
532
  } catch {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildwithnexus",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Launch an autonomous AI runtime with triple-nested VM isolation in one command",
5
5
  "type": "module",
6
6
  "bin": {