buildwithnexus 0.2.7 → 0.2.8
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 +35 -28
- package/dist/nexus-release.tar.gz +0 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -16,7 +16,7 @@ var BANNER = `
|
|
|
16
16
|
`;
|
|
17
17
|
function showBanner() {
|
|
18
18
|
console.log(BANNER);
|
|
19
|
-
console.log(chalk.dim(" v0.2.
|
|
19
|
+
console.log(chalk.dim(" v0.2.8 \xB7 buildwithnexus.dev\n"));
|
|
20
20
|
}
|
|
21
21
|
function showPhase(phase, total, description) {
|
|
22
22
|
const progress = chalk.cyan(`[${phase}/${total}]`);
|
|
@@ -369,7 +369,7 @@ function detectPlatform() {
|
|
|
369
369
|
os: "mac",
|
|
370
370
|
arch: arch === "arm64" ? "arm64" : "x64",
|
|
371
371
|
qemuBinary: "qemu-system-aarch64",
|
|
372
|
-
qemuCpuFlag: "-cpu host",
|
|
372
|
+
qemuCpuFlag: "-accel hvf -cpu host",
|
|
373
373
|
ubuntuImage: "jammy-server-cloudimg-arm64.img",
|
|
374
374
|
biosPath: "/opt/homebrew/share/qemu/edk2-aarch64-code.fd"
|
|
375
375
|
};
|
|
@@ -593,31 +593,38 @@ async function resolvePortConflicts(ports) {
|
|
|
593
593
|
async function launchVm(platform, diskPath, initIsoPath, ram, cpus, ports) {
|
|
594
594
|
const machineArg = platform.os === "mac" ? "-machine virt,gic-version=3" : "-machine pc";
|
|
595
595
|
const biosArgs = fs3.existsSync(platform.biosPath) ? ["-bios", platform.biosPath] : [];
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
596
|
+
function buildArgs(cpuFlag) {
|
|
597
|
+
return [
|
|
598
|
+
...machineArg.split(" "),
|
|
599
|
+
...cpuFlag.split(" "),
|
|
600
|
+
"-m",
|
|
601
|
+
`${ram}G`,
|
|
602
|
+
"-smp",
|
|
603
|
+
`${cpus}`,
|
|
604
|
+
"-drive",
|
|
605
|
+
`file=${diskPath},if=virtio,cache=writethrough`,
|
|
606
|
+
"-drive",
|
|
607
|
+
`file=${initIsoPath},if=virtio,format=raw,cache=writethrough`,
|
|
608
|
+
"-display",
|
|
609
|
+
"none",
|
|
610
|
+
"-serial",
|
|
611
|
+
"none",
|
|
612
|
+
"-net",
|
|
613
|
+
"nic,model=virtio",
|
|
614
|
+
"-net",
|
|
615
|
+
`user,hostfwd=tcp::${ports.ssh}-:22,hostfwd=tcp::${ports.http}-:4200,hostfwd=tcp::${ports.https}-:443`,
|
|
616
|
+
...biosArgs,
|
|
617
|
+
"-pidfile",
|
|
618
|
+
PID_FILE,
|
|
619
|
+
"-daemonize"
|
|
620
|
+
];
|
|
621
|
+
}
|
|
622
|
+
try {
|
|
623
|
+
await execa(platform.qemuBinary, buildArgs(platform.qemuCpuFlag), { env: scrubEnv() });
|
|
624
|
+
} catch {
|
|
625
|
+
const fallbackCpu = platform.os === "mac" ? "-cpu max" : "-cpu qemu64";
|
|
626
|
+
await execa(platform.qemuBinary, buildArgs(fallbackCpu), { env: scrubEnv() });
|
|
627
|
+
}
|
|
621
628
|
return ports;
|
|
622
629
|
}
|
|
623
630
|
function readValidPid() {
|
|
@@ -1693,7 +1700,7 @@ var brainstormCommand = new Command11("brainstorm").description("Brainstorm an i
|
|
|
1693
1700
|
});
|
|
1694
1701
|
|
|
1695
1702
|
// src/cli.ts
|
|
1696
|
-
var cli = new Command12().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.2.
|
|
1703
|
+
var cli = new Command12().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.2.8");
|
|
1697
1704
|
cli.addCommand(initCommand);
|
|
1698
1705
|
cli.addCommand(startCommand);
|
|
1699
1706
|
cli.addCommand(stopCommand);
|
|
Binary file
|