supbuddy 3.2.0 → 3.2.1

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
@@ -19807,7 +19807,7 @@ function cliBuildKind(env3 = process.env) {
19807
19807
  return raw === "host" || raw === "npm" ? raw : "dev";
19808
19808
  }
19809
19809
  function cliVersion(env3 = process.env) {
19810
- return "3.2.0".trim() || "0.0.0-dev";
19810
+ return "3.2.1".trim() || "0.0.0-dev";
19811
19811
  }
19812
19812
  function isDevBuild(env3) {
19813
19813
  return cliBuildKind(env3) === "dev";
@@ -40054,9 +40054,14 @@ ${scriptsSection}
40054
40054
  }
40055
40055
  function renderMappingsMd(ctx) {
40056
40056
  const rows = ctx.mappings.length === 0 ? "_No mappings._" : [
40057
- "| Domain | Port | HTTPS | Enabled |",
40058
- "|--------|------|-------|---------|",
40059
- ...ctx.mappings.map((m) => `| ${m.domain} | ${m.port} | ${m.https ? "yes" : "no"} | ${m.enabled ? "yes" : "no"} |`)
40057
+ // There was an HTTPS column here reading `m.https`, a field DomainMapping does not have — so it
40058
+ // was undefined for every row and rendered "no" for every mapping, while Caddy serves them all
40059
+ // over HTTPS and this same bundle hands agents https:// URLs elsewhere. The URL is what a reader
40060
+ // actually needs, and it cannot drift from the scheme because the rest of the context builds it
40061
+ // with the same function.
40062
+ "| Domain | Port | URL | Enabled |",
40063
+ "|--------|------|-----|---------|",
40064
+ ...ctx.mappings.map((m) => `| ${m.domain} | ${m.port} | ${buildProxiedUrl(m.domain, ctx.proxyState)} | ${m.enabled ? "yes" : "no"} |`)
40060
40065
  ].join("\n");
40061
40066
  return HEADER(".supbuddy/mappings.md") + `# Domain mappings
40062
40067
 
@@ -33798,6 +33798,15 @@ const composeScanner = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
33798
33798
  var define_process_env_default$a = {};
33799
33799
  const runningScripts = /* @__PURE__ */ new Map();
33800
33800
  const MAX_LOG_LINES = 1e3;
33801
+ function compareNodeVersions(a, b) {
33802
+ const parts = (v) => v.replace(/^v/, "").split(".").map((n) => Number.parseInt(n, 10) || 0);
33803
+ const [x, y] = [parts(a), parts(b)];
33804
+ for (let i2 = 0; i2 < Math.max(x.length, y.length); i2++) {
33805
+ const d = (x[i2] ?? 0) - (y[i2] ?? 0);
33806
+ if (d !== 0) return d;
33807
+ }
33808
+ return 0;
33809
+ }
33801
33810
  function getAugmentedPath() {
33802
33811
  const currentPath = define_process_env_default$a.PATH || "";
33803
33812
  const homeDir = define_process_env_default$a.HOME || require("os").homedir() || "";
@@ -33812,7 +33821,7 @@ function getAugmentedPath() {
33812
33821
  if (homeDir) {
33813
33822
  const nvmDir = path__namespace.join(homeDir, ".nvm", "versions", "node");
33814
33823
  try {
33815
- const versions = fsSync.promises.readdirSync(nvmDir).filter((v) => v.startsWith("v")).sort().reverse();
33824
+ const versions = fsSync.readdirSync(nvmDir).filter((v) => v.startsWith("v")).sort(compareNodeVersions).reverse();
33816
33825
  for (const v of versions) {
33817
33826
  extraPaths.push(path__namespace.join(nvmDir, v, "bin"));
33818
33827
  }
@@ -34084,6 +34093,7 @@ const scriptManager = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
34084
34093
  __proto__: null,
34085
34094
  detectPackageManager,
34086
34095
  getAllRunningScripts,
34096
+ getAugmentedPath,
34087
34097
  getScriptLogs,
34088
34098
  getScriptStatus,
34089
34099
  restartScript,
@@ -44593,13 +44603,21 @@ async function checksumFile(filePath) {
44593
44603
  const content = await fs.readFile(filePath);
44594
44604
  return `sha256:${crypto$1.createHash("sha256").update(content).digest("hex")}`;
44595
44605
  }
44606
+ function normalizeComposePorts(ports) {
44607
+ if (!ports) return void 0;
44608
+ return ports.map((p) => {
44609
+ if (typeof p === "string") return p;
44610
+ const base = p.published === void 0 || p.published === "" ? String(p.target ?? "") : `${p.published}:${p.target ?? ""}`;
44611
+ return p.protocol ? `${base}/${p.protocol}` : base;
44612
+ });
44613
+ }
44596
44614
  async function exportStackOnlyBundle(project) {
44597
44615
  if (!project.path) throw new Error("Project has no path");
44598
44616
  const resolved = await resolveComposeProject(project.path);
44599
44617
  const services = resolved ? Object.entries(resolved.services).map(([name2, m]) => ({
44600
44618
  name: name2,
44601
44619
  image: m.config.image,
44602
- ports: m.config.ports
44620
+ ports: normalizeComposePorts(m.config.ports)
44603
44621
  })) : [];
44604
44622
  let envSanitized = null;
44605
44623
  try {
@@ -47173,8 +47191,6 @@ function envPrefixForApp(app) {
47173
47191
  return "NEXT_PUBLIC_";
47174
47192
  case "vite":
47175
47193
  return "VITE_";
47176
- case "expo":
47177
- return "EXPO_PUBLIC_";
47178
47194
  default:
47179
47195
  return "";
47180
47196
  }
@@ -48670,9 +48686,14 @@ ${scriptsSection}
48670
48686
  }
48671
48687
  function renderMappingsMd(ctx) {
48672
48688
  const rows = ctx.mappings.length === 0 ? "_No mappings._" : [
48673
- "| Domain | Port | HTTPS | Enabled |",
48674
- "|--------|------|-------|---------|",
48675
- ...ctx.mappings.map((m) => `| ${m.domain} | ${m.port} | ${m.https ? "yes" : "no"} | ${m.enabled ? "yes" : "no"} |`)
48689
+ // There was an HTTPS column here reading `m.https`, a field DomainMapping does not have — so it
48690
+ // was undefined for every row and rendered "no" for every mapping, while Caddy serves them all
48691
+ // over HTTPS and this same bundle hands agents https:// URLs elsewhere. The URL is what a reader
48692
+ // actually needs, and it cannot drift from the scheme because the rest of the context builds it
48693
+ // with the same function.
48694
+ "| Domain | Port | URL | Enabled |",
48695
+ "|--------|------|-----|---------|",
48696
+ ...ctx.mappings.map((m) => `| ${m.domain} | ${m.port} | ${buildProxiedUrl(m.domain, ctx.proxyState)} | ${m.enabled ? "yes" : "no"} |`)
48676
48697
  ].join("\n");
48677
48698
  return HEADER(".supbuddy/mappings.md") + `# Domain mappings
48678
48699
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supbuddy",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Run multiple Supabase projects at once on custom local domains with HTTPS. A headless CLI and daemon (proxy, DNS, Supabase/Compose lifecycle, MCP) for macOS and Linux.",
5
5
  "keywords": [
6
6
  "supabase",