buildwithnexus 0.2.0 → 0.2.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/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.0 \xB7 buildwithnexus.dev\n"));
19
+ console.log(chalk.dim(" v0.2.2 \xB7 buildwithnexus.dev\n"));
20
20
  }
21
21
  function showPhase(phase, total, description) {
22
22
  const progress = chalk.cyan(`[${phase}/${total}]`);
@@ -474,7 +474,7 @@ async function isQemuInstalled(platform) {
474
474
  }
475
475
  async function installQemu(platform) {
476
476
  if (platform.os === "mac") {
477
- await execa("brew", ["install", "qemu"], { stdio: "inherit", env: scrubEnv() });
477
+ await execa("brew", ["install", "qemu", "cdrtools"], { stdio: "inherit", env: scrubEnv() });
478
478
  } else if (platform.os === "linux") {
479
479
  try {
480
480
  await execa("sudo", ["apt-get", "update"], { stdio: "inherit", env: scrubEnv() });
@@ -709,6 +709,7 @@ async function createCloudInitIso(userDataPath) {
709
709
  fs5.writeFileSync(metaDataPath, "instance-id: nexus-vm-1\nlocal-hostname: nexus-vm\n", { mode: 384 });
710
710
  const isoPath = path5.join(IMAGES_DIR2, "init.iso");
711
711
  const env = scrubEnv();
712
+ let created = false;
712
713
  try {
713
714
  await execa3("mkisofs", [
714
715
  "-output",
@@ -720,17 +721,50 @@ async function createCloudInitIso(userDataPath) {
720
721
  userDataPath,
721
722
  metaDataPath
722
723
  ], { env });
724
+ created = true;
723
725
  } catch {
724
- await execa3("genisoimage", [
725
- "-output",
726
- isoPath,
727
- "-volid",
728
- "cidata",
729
- "-joliet",
730
- "-rock",
731
- userDataPath,
732
- metaDataPath
733
- ], { env });
726
+ }
727
+ if (!created) {
728
+ try {
729
+ await execa3("genisoimage", [
730
+ "-output",
731
+ isoPath,
732
+ "-volid",
733
+ "cidata",
734
+ "-joliet",
735
+ "-rock",
736
+ userDataPath,
737
+ metaDataPath
738
+ ], { env });
739
+ created = true;
740
+ } catch {
741
+ }
742
+ }
743
+ if (!created) {
744
+ try {
745
+ const stagingDir = path5.join(CONFIGS_DIR, "cidata-staging");
746
+ fs5.mkdirSync(stagingDir, { recursive: true, mode: 448 });
747
+ fs5.copyFileSync(userDataPath, path5.join(stagingDir, "user-data"));
748
+ fs5.copyFileSync(metaDataPath, path5.join(stagingDir, "meta-data"));
749
+ await execa3("hdiutil", [
750
+ "makehybrid",
751
+ "-o",
752
+ isoPath,
753
+ "-joliet",
754
+ "-iso",
755
+ "-default-volume-name",
756
+ "cidata",
757
+ stagingDir
758
+ ], { env });
759
+ fs5.rmSync(stagingDir, { recursive: true, force: true });
760
+ created = true;
761
+ } catch {
762
+ }
763
+ }
764
+ if (!created) {
765
+ throw new Error(
766
+ "Cannot create cloud-init ISO: none of mkisofs, genisoimage, or hdiutil are available. On macOS, install cdrtools: brew install cdrtools. On Linux: sudo apt install genisoimage"
767
+ );
734
768
  }
735
769
  fs5.chmodSync(isoPath, 384);
736
770
  fs5.unlinkSync(userDataPath);
@@ -1557,7 +1591,7 @@ var brainstormCommand = new Command11("brainstorm").description("Brainstorm an i
1557
1591
  });
1558
1592
 
1559
1593
  // src/cli.ts
1560
- var cli = new Command12().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.2.0");
1594
+ var cli = new Command12().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.2.2");
1561
1595
  cli.addCommand(initCommand);
1562
1596
  cli.addCommand(startCommand);
1563
1597
  cli.addCommand(stopCommand);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildwithnexus",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Launch an autonomous AI runtime with triple-nested VM isolation in one command",
5
5
  "type": "module",
6
6
  "bin": {