@rubytech/create-maxy 1.0.635 → 1.0.636

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/index.js CHANGED
@@ -8,6 +8,7 @@ const PAYLOAD_DIR = resolve(import.meta.dirname, "../payload");
8
8
  // The bundler stamps brand.json into the payload at build time.
9
9
  const BRAND_PATH = join(PAYLOAD_DIR, "platform", "config", "brand.json");
10
10
  if (!existsSync(BRAND_PATH)) {
11
+ console.error("Setup failed: brand.json not found in payload (package may be corrupted)");
11
12
  console.error("FATAL: brand.json not found in payload. Package may be corrupted.");
12
13
  process.exit(1);
13
14
  }
@@ -16,6 +17,7 @@ try {
16
17
  BRAND = JSON.parse(readFileSync(BRAND_PATH, "utf-8"));
17
18
  }
18
19
  catch (err) {
20
+ console.error(`Setup failed: failed to parse brand.json: ${err.message}`);
19
21
  console.error(`FATAL: Failed to parse brand.json: ${err.message}`);
20
22
  process.exit(1);
21
23
  }
@@ -1335,6 +1337,7 @@ function createTunnelSymlink(linkPath, target) {
1335
1337
  catch (err) {
1336
1338
  const code = err.code;
1337
1339
  if (code !== "ENOENT") {
1340
+ console.error(`Setup failed: ${linkPath} lstat failed: ${err.message}`);
1338
1341
  console.error(`[create-maxy:error] ${linkPath} lstat failed: ${err.message}`);
1339
1342
  process.exit(1);
1340
1343
  }
@@ -1346,6 +1349,7 @@ function createTunnelSymlink(linkPath, target) {
1346
1349
  return;
1347
1350
  }
1348
1351
  if (!lstat.isSymbolicLink()) {
1352
+ console.error(`Setup failed: ${linkPath} collision (regular file)`);
1349
1353
  console.error(`[create-maxy:collision] ${linkPath} already exists target=<regular-file>`);
1350
1354
  console.error(` Remove the file and re-run: npx -y @rubytech/create-maxy`);
1351
1355
  process.exit(1);
@@ -1356,6 +1360,7 @@ function createTunnelSymlink(linkPath, target) {
1356
1360
  resolvedTarget = resolve(dirname(linkPath), raw);
1357
1361
  }
1358
1362
  catch (err) {
1363
+ console.error(`Setup failed: ${linkPath} symlink unreadable: ${err.message}`);
1359
1364
  console.error(`[create-maxy:collision] ${linkPath} symlink unreadable: ${err.message}`);
1360
1365
  console.error(` Remove the file and re-run: npx -y @rubytech/create-maxy`);
1361
1366
  process.exit(1);
@@ -1386,6 +1391,7 @@ function createTunnelSymlink(linkPath, target) {
1386
1391
  logFile(` symlink repaired (dangling): ${linkPath} was ${resolvedTarget}, now ${targetAbs}`);
1387
1392
  return;
1388
1393
  }
1394
+ console.error(`Setup failed: ${linkPath} collision (symlink to ${resolvedTarget})`);
1389
1395
  console.error(`[create-maxy:collision] ${linkPath} already exists target=${resolvedTarget}`);
1390
1396
  console.error(` This symlink was created by a different install (not within ${INSTALL_DIR}).`);
1391
1397
  console.error(` Remove or relocate it, then re-run: npx -y @rubytech/create-maxy`);
@@ -1401,6 +1407,7 @@ function installTunnelScripts() {
1401
1407
  chmodSync(src, 0o755);
1402
1408
  }
1403
1409
  catch (err) {
1410
+ console.error(`Setup failed: tunnel script missing or chmod failed: ${src}`);
1404
1411
  console.error(`[create-maxy:error] tunnel script missing or chmod failed: ${src}`);
1405
1412
  console.error(` ${err.message}`);
1406
1413
  process.exit(1);
@@ -1684,6 +1691,7 @@ WantedBy=multi-user.target
1684
1691
  vncLog = `(no boot log found at ${vncLogPath})`;
1685
1692
  }
1686
1693
  console.error("");
1694
+ console.error("Setup failed: Browser automation unavailable — CDP port 9222 not responding");
1687
1695
  console.error(" ERROR: Browser automation unavailable — CDP port 9222 not responding.");
1688
1696
  console.error(" Chromium should be started by vnc.sh (ExecStartPre). Check the boot log:");
1689
1697
  console.error("");
@@ -1704,6 +1712,7 @@ WantedBy=multi-user.target
1704
1712
  }
1705
1713
  catch (err) {
1706
1714
  console.error("");
1715
+ console.error(`Setup failed: tunnel script symlink missing or not executable: ${linkPath}`);
1707
1716
  console.error(` [create-maxy:error] tunnel script symlink missing or not executable: ${linkPath}`);
1708
1717
  console.error(` ${err.message}`);
1709
1718
  process.exit(1);
@@ -1721,6 +1730,7 @@ if (_args.includes("--uninstall")) {
1721
1730
  const exportPath = exportIdx !== -1 ? _args[exportIdx + 1] : undefined;
1722
1731
  const skipConfirm = _args.includes("--yes");
1723
1732
  if (exportIdx !== -1 && !exportPath) {
1733
+ console.error("Setup failed: --export-data requires a path argument");
1724
1734
  console.error("--export-data requires a path argument.");
1725
1735
  process.exit(1);
1726
1736
  }
@@ -1741,6 +1751,7 @@ if (portIdx !== -1) {
1741
1751
  const raw = _args[portIdx + 1];
1742
1752
  const parsed = raw ? parseInt(raw, 10) : NaN;
1743
1753
  if (isNaN(parsed) || parsed < 1024 || parsed > 65535) {
1754
+ console.error(`Setup failed: --port requires a numeric value between 1024 and 65535 (got: ${raw ?? "nothing"})`);
1744
1755
  console.error(`Error: --port requires a numeric value between 1024 and 65535 (got: ${raw ?? "nothing"}).`);
1745
1756
  process.exit(1);
1746
1757
  }
@@ -1797,11 +1808,13 @@ const hostnameIdx = _args.indexOf("--hostname");
1797
1808
  if (hostnameIdx !== -1) {
1798
1809
  const raw = _args[hostnameIdx + 1];
1799
1810
  if (!raw || raw.startsWith("--")) {
1811
+ console.error("Setup failed: --hostname requires a value");
1800
1812
  console.error("Error: --hostname requires a value (e.g. --hostname muvin).");
1801
1813
  process.exit(1);
1802
1814
  }
1803
1815
  // RFC 1123: lowercase alphanumeric + hyphens, max 63 chars, no leading/trailing hyphen
1804
1816
  if (!/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/.test(raw)) {
1817
+ console.error(`Setup failed: --hostname value '${raw}' is invalid`);
1805
1818
  console.error(`Error: --hostname value '${raw}' is invalid. Must be lowercase letters, digits, and hyphens only (max 63 chars, no leading/trailing hyphen).`);
1806
1819
  process.exit(1);
1807
1820
  }
@@ -1813,10 +1826,12 @@ const displayIdx = _args.indexOf("--display");
1813
1826
  if (displayIdx !== -1) {
1814
1827
  const raw = _args[displayIdx + 1];
1815
1828
  if (!raw || raw.startsWith("--")) {
1829
+ console.error("Setup failed: --display requires a value");
1816
1830
  console.error("Error: --display requires a value: native or virtual.");
1817
1831
  process.exit(1);
1818
1832
  }
1819
1833
  if (raw !== "native" && raw !== "virtual") {
1834
+ console.error(`Setup failed: --display value '${raw}' is invalid`);
1820
1835
  console.error(`Error: --display value '${raw}' is invalid. Must be 'native' or 'virtual'.`);
1821
1836
  process.exit(1);
1822
1837
  }
@@ -1864,12 +1879,14 @@ let EMBED_SOURCE = "default";
1864
1879
  const embedModelIdx = _args.indexOf("--embed-model");
1865
1880
  const embedDimsIdx = _args.indexOf("--embed-dimensions");
1866
1881
  if (embedDimsIdx !== -1 && embedModelIdx === -1) {
1882
+ console.error("Setup failed: --embed-dimensions requires --embed-model");
1867
1883
  console.error("Error: --embed-dimensions requires --embed-model (dimensions are model-specific).");
1868
1884
  process.exit(1);
1869
1885
  }
1870
1886
  if (embedModelIdx !== -1) {
1871
1887
  const raw = _args[embedModelIdx + 1];
1872
1888
  if (!raw || raw.startsWith("--")) {
1889
+ console.error("Setup failed: --embed-model requires a value");
1873
1890
  console.error("Error: --embed-model requires a value (e.g. --embed-model mxbai-embed-large).");
1874
1891
  process.exit(1);
1875
1892
  }
@@ -1880,6 +1897,7 @@ if (embedModelIdx !== -1) {
1880
1897
  const rawDims = _args[embedDimsIdx + 1];
1881
1898
  const parsed = rawDims ? parseInt(rawDims, 10) : NaN;
1882
1899
  if (isNaN(parsed) || parsed <= 0) {
1900
+ console.error(`Setup failed: --embed-dimensions requires a positive integer (got: ${rawDims ?? "nothing"})`);
1883
1901
  console.error(`Error: --embed-dimensions requires a positive integer (got: ${rawDims ?? "nothing"}).`);
1884
1902
  process.exit(1);
1885
1903
  }
@@ -1891,6 +1909,7 @@ if (embedModelIdx !== -1) {
1891
1909
  }
1892
1910
  else {
1893
1911
  // Unknown model without explicit dimensions — cannot proceed
1912
+ console.error(`Setup failed: unknown embedding model '${EMBED_MODEL}'`);
1894
1913
  console.error(`Error: Unknown embedding model '${EMBED_MODEL}'.`);
1895
1914
  console.error("Known models and their dimensions:");
1896
1915
  for (const [model, dims] of Object.entries(EMBED_MODEL_DIMS)) {
@@ -1943,6 +1962,7 @@ if (neo4jPortIdx !== -1) {
1943
1962
  const raw = _args[neo4jPortIdx + 1];
1944
1963
  const parsed = raw ? parseInt(raw, 10) : NaN;
1945
1964
  if (isNaN(parsed) || parsed < 1024 || parsed > 65535) {
1965
+ console.error(`Setup failed: --neo4j-port requires a numeric value between 1024 and 65535 (got: ${raw ?? "nothing"})`);
1946
1966
  console.error(`Error: --neo4j-port requires a numeric value between 1024 and 65535 (got: ${raw ?? "nothing"}).`);
1947
1967
  process.exit(1);
1948
1968
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.635",
3
+ "version": "1.0.636",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -0,0 +1,77 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ // app/lib/upgrade-progress-parser.ts
32
+ import { existsSync, readFileSync } from "fs";
33
+ var STEP_RE = /\[(\d+)\/(\d+)\]\s+(.+)/;
34
+ var ANSI_RE = /\x1b\[[0-9;?]*[a-zA-Z]/g;
35
+ var stripAnsi = (s) => s.replace(ANSI_RE, "").replace(/\r/g, "").trimEnd();
36
+ var MAX_SUBSTEPS = 20;
37
+ function parseUpgradeProgress(content) {
38
+ const rawLines = content.split("\n");
39
+ let step = 0;
40
+ let total = 0;
41
+ let label = "";
42
+ let markerIdx = -1;
43
+ for (let i = rawLines.length - 1; i >= 0; i--) {
44
+ const match = rawLines[i].match(STEP_RE);
45
+ if (match) {
46
+ step = parseInt(match[1], 10);
47
+ total = parseInt(match[2], 10);
48
+ label = match[3].replace(/\.{3}$/, "").trim();
49
+ markerIdx = i;
50
+ break;
51
+ }
52
+ }
53
+ const subSteps = markerIdx >= 0 ? rawLines.slice(markerIdx + 1).map(stripAnsi).filter((l) => l.length > 0).slice(-MAX_SUBSTEPS) : [];
54
+ const tail = rawLines.slice(-20).join("\n");
55
+ const finished = tail.includes("Open in your browser:");
56
+ const failed = tail.includes("Setup failed:");
57
+ return { step, total, label, started: true, finished, failed, subSteps };
58
+ }
59
+ function readProgressLog(path) {
60
+ if (!existsSync(path)) {
61
+ return { step: 0, total: 0, label: "", started: false, subSteps: [] };
62
+ }
63
+ let content;
64
+ try {
65
+ content = readFileSync(path, "utf-8");
66
+ } catch {
67
+ return { step: 0, total: 0, label: "", started: false, subSteps: [] };
68
+ }
69
+ return parseUpgradeProgress(content);
70
+ }
71
+
72
+ export {
73
+ __commonJS,
74
+ __export,
75
+ __toESM,
76
+ readProgressLog
77
+ };