supbuddy 3.2.2 → 3.2.4
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 +40 -31
- package/dist/daemon/worker.cjs +81 -71
- package/package.json +1 -1
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.
|
|
19810
|
+
return "3.2.4".trim() || "0.0.0-dev";
|
|
19811
19811
|
}
|
|
19812
19812
|
function isDevBuild(env3) {
|
|
19813
19813
|
return cliBuildKind(env3) === "dev";
|
|
@@ -25149,7 +25149,8 @@ var init_schemas = __esm({
|
|
|
25149
25149
|
});
|
|
25150
25150
|
|
|
25151
25151
|
// ../../packages/shared/worker-port.ts
|
|
25152
|
-
|
|
25152
|
+
import nodeProcess from "process";
|
|
25153
|
+
function resolveWorkerPort(env3 = typeof nodeProcess !== "undefined" ? nodeProcess.env : {}) {
|
|
25153
25154
|
const raw = env3[WORKER_PORT_ENV];
|
|
25154
25155
|
if (raw !== void 0 && raw !== "") {
|
|
25155
25156
|
const n = Number(raw);
|
|
@@ -27808,6 +27809,7 @@ __export(store_exports, {
|
|
|
27808
27809
|
persistState: () => persistState,
|
|
27809
27810
|
useStore: () => useStore2
|
|
27810
27811
|
});
|
|
27812
|
+
import nodeProcess2 from "process";
|
|
27811
27813
|
import crypto from "crypto";
|
|
27812
27814
|
import fs7 from "fs/promises";
|
|
27813
27815
|
import path10 from "path";
|
|
@@ -27826,12 +27828,12 @@ function schedulePersist() {
|
|
|
27826
27828
|
}, 1e3);
|
|
27827
27829
|
}
|
|
27828
27830
|
async function getAppSupportDir() {
|
|
27829
|
-
const override =
|
|
27831
|
+
const override = nodeProcess2.env.SUPBUDDY_STATE_DIR;
|
|
27830
27832
|
if (override) {
|
|
27831
27833
|
await fs7.mkdir(override, { recursive: true });
|
|
27832
27834
|
return override;
|
|
27833
27835
|
}
|
|
27834
|
-
if (
|
|
27836
|
+
if (nodeProcess2.env.VITEST || nodeProcess2.env.NODE_ENV === "test") {
|
|
27835
27837
|
const testDir = path10.join(os5.tmpdir(), `supbuddy-vitest-${process.pid}`);
|
|
27836
27838
|
await fs7.mkdir(testDir, { recursive: true });
|
|
27837
27839
|
return testDir;
|
|
@@ -27841,9 +27843,9 @@ async function getAppSupportDir() {
|
|
|
27841
27843
|
if (platform === "darwin") {
|
|
27842
27844
|
userDataPath = path10.join(os5.homedir(), "Library", "Application Support", "Supbuddy");
|
|
27843
27845
|
} else if (platform === "win32") {
|
|
27844
|
-
userDataPath = path10.join(
|
|
27846
|
+
userDataPath = path10.join(nodeProcess2.env.APPDATA || path10.join(os5.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
27845
27847
|
} else {
|
|
27846
|
-
userDataPath = path10.join(
|
|
27848
|
+
userDataPath = path10.join(nodeProcess2.env.XDG_CONFIG_HOME || path10.join(os5.homedir(), ".config"), "Supbuddy");
|
|
27847
27849
|
}
|
|
27848
27850
|
await fs7.mkdir(userDataPath, { recursive: true });
|
|
27849
27851
|
return userDataPath;
|
|
@@ -28764,13 +28766,14 @@ var init_dind_manager = __esm({
|
|
|
28764
28766
|
});
|
|
28765
28767
|
|
|
28766
28768
|
// ../../packages/core/image-cache.ts
|
|
28769
|
+
import nodeProcess3 from "process";
|
|
28767
28770
|
import fs8 from "fs/promises";
|
|
28768
28771
|
import path11 from "path";
|
|
28769
28772
|
import os6 from "os";
|
|
28770
28773
|
function getCacheDir() {
|
|
28771
|
-
const override =
|
|
28774
|
+
const override = nodeProcess3.env.SUPBUDDY_STATE_DIR;
|
|
28772
28775
|
if (override) return path11.join(override, "image-cache");
|
|
28773
|
-
if (
|
|
28776
|
+
if (nodeProcess3.env.VITEST || nodeProcess3.env.NODE_ENV === "test") {
|
|
28774
28777
|
return path11.join(os6.tmpdir(), `supbuddy-vitest-${process.pid}`, "image-cache");
|
|
28775
28778
|
}
|
|
28776
28779
|
const platform = process.platform;
|
|
@@ -28778,9 +28781,9 @@ function getCacheDir() {
|
|
|
28778
28781
|
if (platform === "darwin") {
|
|
28779
28782
|
base = path11.join(os6.homedir(), "Library", "Application Support", "Supbuddy");
|
|
28780
28783
|
} else if (platform === "win32") {
|
|
28781
|
-
base = path11.join(
|
|
28784
|
+
base = path11.join(nodeProcess3.env.APPDATA || path11.join(os6.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
28782
28785
|
} else {
|
|
28783
|
-
base = path11.join(
|
|
28786
|
+
base = path11.join(nodeProcess3.env.XDG_CONFIG_HOME || path11.join(os6.homedir(), ".config"), "Supbuddy");
|
|
28784
28787
|
}
|
|
28785
28788
|
return path11.join(base, "image-cache");
|
|
28786
28789
|
}
|
|
@@ -31891,6 +31894,7 @@ var init_compose_scanner = __esm({
|
|
|
31891
31894
|
});
|
|
31892
31895
|
|
|
31893
31896
|
// ../../packages/core/caddy-ca-manager.ts
|
|
31897
|
+
import nodeProcess4 from "process";
|
|
31894
31898
|
import fs9 from "fs/promises";
|
|
31895
31899
|
import path12 from "path";
|
|
31896
31900
|
import os7 from "os";
|
|
@@ -31901,12 +31905,12 @@ async function getCaddyDataDir() {
|
|
|
31901
31905
|
userDataPath = path12.join(os7.homedir(), "Library", "Application Support", "Supbuddy");
|
|
31902
31906
|
} else if (platform === "win32") {
|
|
31903
31907
|
userDataPath = path12.join(
|
|
31904
|
-
|
|
31908
|
+
nodeProcess4.env.APPDATA || path12.join(os7.homedir(), "AppData", "Roaming"),
|
|
31905
31909
|
"Supbuddy"
|
|
31906
31910
|
);
|
|
31907
31911
|
} else {
|
|
31908
31912
|
userDataPath = path12.join(
|
|
31909
|
-
|
|
31913
|
+
nodeProcess4.env.XDG_CONFIG_HOME || path12.join(os7.homedir(), ".config"),
|
|
31910
31914
|
"Supbuddy"
|
|
31911
31915
|
);
|
|
31912
31916
|
}
|
|
@@ -32039,6 +32043,7 @@ import fs10 from "fs/promises";
|
|
|
32039
32043
|
import fsSync from "fs";
|
|
32040
32044
|
import path13 from "path";
|
|
32041
32045
|
import os8 from "os";
|
|
32046
|
+
import nodeProcess5 from "process";
|
|
32042
32047
|
import crypto2 from "crypto";
|
|
32043
32048
|
import { execFile as execFile3, execFileSync as execFileSync2 } from "child_process";
|
|
32044
32049
|
import { promisify as promisify4 } from "util";
|
|
@@ -32049,12 +32054,12 @@ function getSupbuddyDataDir() {
|
|
|
32049
32054
|
}
|
|
32050
32055
|
if (platform === "win32") {
|
|
32051
32056
|
return path13.join(
|
|
32052
|
-
|
|
32057
|
+
nodeProcess5.env.APPDATA || path13.join(os8.homedir(), "AppData", "Roaming"),
|
|
32053
32058
|
"Supbuddy"
|
|
32054
32059
|
);
|
|
32055
32060
|
}
|
|
32056
32061
|
return path13.join(
|
|
32057
|
-
|
|
32062
|
+
nodeProcess5.env.XDG_CONFIG_HOME || path13.join(os8.homedir(), ".config"),
|
|
32058
32063
|
"Supbuddy"
|
|
32059
32064
|
);
|
|
32060
32065
|
}
|
|
@@ -32195,7 +32200,7 @@ async function scanProcessesForNodeExtra() {
|
|
|
32195
32200
|
}
|
|
32196
32201
|
async function probeLoginShellNodeExtra() {
|
|
32197
32202
|
if (process.platform === "win32") return null;
|
|
32198
|
-
const shell =
|
|
32203
|
+
const shell = nodeProcess5.env.SHELL || "/bin/sh";
|
|
32199
32204
|
if (!PROBEABLE_SHELLS.has(path13.basename(shell))) return null;
|
|
32200
32205
|
try {
|
|
32201
32206
|
const { stdout } = await execFileP(
|
|
@@ -32205,8 +32210,8 @@ async function probeLoginShellNodeExtra() {
|
|
|
32205
32210
|
// A clean slate — HOME/USER only, so the profile chain is the ONLY source.
|
|
32206
32211
|
env: {
|
|
32207
32212
|
HOME: os8.homedir(),
|
|
32208
|
-
USER:
|
|
32209
|
-
LOGNAME:
|
|
32213
|
+
USER: nodeProcess5.env.USER ?? "",
|
|
32214
|
+
LOGNAME: nodeProcess5.env.LOGNAME ?? nodeProcess5.env.USER ?? "",
|
|
32210
32215
|
PATH: "/usr/bin:/bin:/usr/sbin:/sbin",
|
|
32211
32216
|
TERM: "dumb"
|
|
32212
32217
|
},
|
|
@@ -32241,7 +32246,7 @@ function getPlistPath() {
|
|
|
32241
32246
|
}
|
|
32242
32247
|
function getEnvironmentDPath() {
|
|
32243
32248
|
return path13.join(
|
|
32244
|
-
|
|
32249
|
+
nodeProcess5.env.XDG_CONFIG_HOME || path13.join(os8.homedir(), ".config"),
|
|
32245
32250
|
"environment.d",
|
|
32246
32251
|
"supbuddy-ca.conf"
|
|
32247
32252
|
);
|
|
@@ -32446,7 +32451,7 @@ async function getStatus(lastRefreshedAt, opts = {}) {
|
|
|
32446
32451
|
observations.push({ origin: "managed", value: env3.NODE_EXTRA_CA_CERTS, detail: getMethod() });
|
|
32447
32452
|
}
|
|
32448
32453
|
if (effective.loginShell) {
|
|
32449
|
-
observations.push({ origin: "login-shell", value: effective.loginShell, detail:
|
|
32454
|
+
observations.push({ origin: "login-shell", value: effective.loginShell, detail: nodeProcess5.env.SHELL ?? "login shell" });
|
|
32450
32455
|
}
|
|
32451
32456
|
observations.push(...effective.processes);
|
|
32452
32457
|
const classified = classifyNodeExtraCaCerts(observations, bundlePath);
|
|
@@ -32522,6 +32527,7 @@ var init_bundled_runtime_trust2 = __esm({
|
|
|
32522
32527
|
});
|
|
32523
32528
|
|
|
32524
32529
|
// ../../packages/core/script-manager.ts
|
|
32530
|
+
import nodeProcess6 from "process";
|
|
32525
32531
|
var init_script_manager = __esm({
|
|
32526
32532
|
"../../packages/core/script-manager.ts"() {
|
|
32527
32533
|
"use strict";
|
|
@@ -37353,6 +37359,7 @@ var init_dns_server = __esm({
|
|
|
37353
37359
|
});
|
|
37354
37360
|
|
|
37355
37361
|
// ../../packages/core/caddyfile-generator.ts
|
|
37362
|
+
import nodeProcess7 from "process";
|
|
37356
37363
|
import fs13 from "fs/promises";
|
|
37357
37364
|
import path16 from "path";
|
|
37358
37365
|
import os9 from "os";
|
|
@@ -37363,12 +37370,12 @@ async function getCaddyfileDir() {
|
|
|
37363
37370
|
userDataPath = path16.join(os9.homedir(), "Library", "Application Support", "Supbuddy");
|
|
37364
37371
|
} else if (platform === "win32") {
|
|
37365
37372
|
userDataPath = path16.join(
|
|
37366
|
-
|
|
37373
|
+
nodeProcess7.env.APPDATA || path16.join(os9.homedir(), "AppData", "Roaming"),
|
|
37367
37374
|
"Supbuddy"
|
|
37368
37375
|
);
|
|
37369
37376
|
} else {
|
|
37370
37377
|
userDataPath = path16.join(
|
|
37371
|
-
|
|
37378
|
+
nodeProcess7.env.XDG_CONFIG_HOME || path16.join(os9.homedir(), ".config"),
|
|
37372
37379
|
"Supbuddy"
|
|
37373
37380
|
);
|
|
37374
37381
|
}
|
|
@@ -37800,7 +37807,7 @@ __export(supabase_manager_exports, {
|
|
|
37800
37807
|
import { spawn as spawn4 } from "child_process";
|
|
37801
37808
|
import { promisify as promisify6 } from "util";
|
|
37802
37809
|
import { exec as exec4 } from "child_process";
|
|
37803
|
-
import
|
|
37810
|
+
import nodeProcess8 from "process";
|
|
37804
37811
|
function runSerial(fn) {
|
|
37805
37812
|
const run = serialChain.then(fn, fn);
|
|
37806
37813
|
serialChain = run.then(() => void 0, () => void 0);
|
|
@@ -37971,7 +37978,7 @@ Edit Supabase config.toml to use different ports, or stop the other project firs
|
|
|
37971
37978
|
return new Promise((resolve, reject) => {
|
|
37972
37979
|
const child = spawn4("supabase", ["start"], {
|
|
37973
37980
|
cwd: projectPath,
|
|
37974
|
-
env: { ...
|
|
37981
|
+
env: { ...nodeProcess8.env, ...projectEnv },
|
|
37975
37982
|
stdio: ["ignore", "pipe", "pipe"]
|
|
37976
37983
|
});
|
|
37977
37984
|
const operation = {
|
|
@@ -38612,7 +38619,7 @@ import { promisify as promisify7 } from "util";
|
|
|
38612
38619
|
import { randomUUID } from "crypto";
|
|
38613
38620
|
import path18 from "path";
|
|
38614
38621
|
import fs15 from "fs/promises";
|
|
38615
|
-
import
|
|
38622
|
+
import nodeProcess9 from "process";
|
|
38616
38623
|
function getCaddyBinaryPath() {
|
|
38617
38624
|
const platform = process.platform;
|
|
38618
38625
|
const arch = process.arch;
|
|
@@ -38624,11 +38631,11 @@ function getCaddyBinaryPath() {
|
|
|
38624
38631
|
} else {
|
|
38625
38632
|
binaryName = arch === "arm64" ? "caddy-linux-arm64" : "caddy-linux-amd64";
|
|
38626
38633
|
}
|
|
38627
|
-
const bundledBinDir =
|
|
38634
|
+
const bundledBinDir = nodeProcess9.env.SUPBUDDY_BIN_DIR;
|
|
38628
38635
|
if (bundledBinDir) {
|
|
38629
38636
|
return path18.join(bundledBinDir, binaryName);
|
|
38630
38637
|
}
|
|
38631
|
-
const isDev =
|
|
38638
|
+
const isDev = nodeProcess9.env.NODE_ENV !== "production";
|
|
38632
38639
|
if (isDev) {
|
|
38633
38640
|
return path18.join(process.cwd(), "resources", "bin", binaryName);
|
|
38634
38641
|
}
|
|
@@ -38729,10 +38736,10 @@ async function doStartCaddyServer() {
|
|
|
38729
38736
|
console.log(`[Caddy] Binary: ${binaryPath}`);
|
|
38730
38737
|
console.log(`[Caddy] Config: ${caddyfilePath}`);
|
|
38731
38738
|
console.log(`[Caddy] Data directory: ${dataDir}`);
|
|
38732
|
-
const isDev =
|
|
38733
|
-
const homeDir =
|
|
38739
|
+
const isDev = nodeProcess9.env.NODE_ENV !== "production";
|
|
38740
|
+
const homeDir = nodeProcess9.env.HOME || __require("os").homedir();
|
|
38734
38741
|
const caddyEnv = {
|
|
38735
|
-
...
|
|
38742
|
+
...nodeProcess9.env,
|
|
38736
38743
|
HOME: homeDir,
|
|
38737
38744
|
XDG_DATA_HOME: dataDir,
|
|
38738
38745
|
XDG_CONFIG_HOME: path18.dirname(caddyfilePath)
|
|
@@ -39521,6 +39528,7 @@ var init_ca_and_trust = __esm({
|
|
|
39521
39528
|
});
|
|
39522
39529
|
|
|
39523
39530
|
// ../../packages/core/system-doctor/checks/orphan-mcp-secrets.ts
|
|
39531
|
+
import nodeProcess10 from "process";
|
|
39524
39532
|
import path19 from "path";
|
|
39525
39533
|
function secretKey(clientId) {
|
|
39526
39534
|
return clientId.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
@@ -40496,10 +40504,11 @@ var init_gitignore = __esm({
|
|
|
40496
40504
|
});
|
|
40497
40505
|
|
|
40498
40506
|
// ../../packages/core/project-context/capabilities.ts
|
|
40507
|
+
import nodeProcess11 from "process";
|
|
40499
40508
|
import path26 from "path";
|
|
40500
40509
|
import os10 from "os";
|
|
40501
40510
|
function globalHomeDir() {
|
|
40502
|
-
return
|
|
40511
|
+
return nodeProcess11.env.SUPBUDDY_HOME_DIR || os10.homedir();
|
|
40503
40512
|
}
|
|
40504
40513
|
function resolveTargetScope(scope, cap) {
|
|
40505
40514
|
const s = scope ?? "auto";
|
|
@@ -41396,7 +41405,7 @@ var init_bundle_exporter = __esm({
|
|
|
41396
41405
|
|
|
41397
41406
|
// ../../packages/core/cloud.ts
|
|
41398
41407
|
import fs27 from "fs/promises";
|
|
41399
|
-
import
|
|
41408
|
+
import nodeProcess12 from "process";
|
|
41400
41409
|
import path30 from "path";
|
|
41401
41410
|
import { execFile as execFile7 } from "child_process";
|
|
41402
41411
|
import { promisify as promisify12 } from "util";
|
package/dist/daemon/worker.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
+
const nodeProcess = require("node:process");
|
|
24
25
|
const crypto$1 = require("crypto");
|
|
25
26
|
const os$1 = require("os");
|
|
26
27
|
const path = require("path");
|
|
@@ -38,7 +39,6 @@ const util$1 = require("util");
|
|
|
38
39
|
const url = require("url");
|
|
39
40
|
const net$1 = require("net");
|
|
40
41
|
const https$3 = require("https");
|
|
41
|
-
const nodeProcess = require("node:process");
|
|
42
42
|
const node_child_process = require("node:child_process");
|
|
43
43
|
const promises = require("node:fs/promises");
|
|
44
44
|
const os$2 = require("node:os");
|
|
@@ -12656,7 +12656,7 @@ function setup(env) {
|
|
|
12656
12656
|
}
|
|
12657
12657
|
var common$1 = setup;
|
|
12658
12658
|
(function(module2, exports2) {
|
|
12659
|
-
var
|
|
12659
|
+
var define_process_env_default = {};
|
|
12660
12660
|
exports2.formatArgs = formatArgs;
|
|
12661
12661
|
exports2.save = save;
|
|
12662
12662
|
exports2.load = load2;
|
|
@@ -12802,7 +12802,7 @@ var common$1 = setup;
|
|
|
12802
12802
|
} catch (error) {
|
|
12803
12803
|
}
|
|
12804
12804
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
12805
|
-
r =
|
|
12805
|
+
r = define_process_env_default.DEBUG;
|
|
12806
12806
|
}
|
|
12807
12807
|
return r;
|
|
12808
12808
|
}
|
|
@@ -25933,10 +25933,9 @@ function parseAddonsExtension(composeData) {
|
|
|
25933
25933
|
if (block == null) return null;
|
|
25934
25934
|
return SupbuddyAddonsExtensionSchema.parse(block);
|
|
25935
25935
|
}
|
|
25936
|
-
var define_process_env_default$f = {};
|
|
25937
25936
|
const WORKER_PORT_ENV = "WORKER_PORT";
|
|
25938
25937
|
const DEFAULT_WORKER_PORT = 48760;
|
|
25939
|
-
function resolveWorkerPort(env = typeof
|
|
25938
|
+
function resolveWorkerPort(env = typeof nodeProcess !== "undefined" ? nodeProcess.env : {}) {
|
|
25940
25939
|
const raw = env[WORKER_PORT_ENV];
|
|
25941
25940
|
if (raw !== void 0 && raw !== "") {
|
|
25942
25941
|
const n = Number(raw);
|
|
@@ -26115,7 +26114,6 @@ function planGlobalTldCascade(projects, mappings, newTld) {
|
|
|
26115
26114
|
});
|
|
26116
26115
|
return { projectUpdates, mappingUpdates };
|
|
26117
26116
|
}
|
|
26118
|
-
var define_process_env_default$e = {};
|
|
26119
26117
|
function coerceProjectName(name2, fallback = "Untitled project") {
|
|
26120
26118
|
if (typeof name2 === "string") return name2;
|
|
26121
26119
|
if (name2 && typeof name2.name === "string") return name2.name;
|
|
@@ -26612,12 +26610,12 @@ function schedulePersist() {
|
|
|
26612
26610
|
}, 1e3);
|
|
26613
26611
|
}
|
|
26614
26612
|
async function getAppSupportDir() {
|
|
26615
|
-
const override =
|
|
26613
|
+
const override = nodeProcess.env.SUPBUDDY_STATE_DIR;
|
|
26616
26614
|
if (override) {
|
|
26617
26615
|
await fs.mkdir(override, { recursive: true });
|
|
26618
26616
|
return override;
|
|
26619
26617
|
}
|
|
26620
|
-
if (
|
|
26618
|
+
if (nodeProcess.env.VITEST || nodeProcess.env.NODE_ENV === "test") {
|
|
26621
26619
|
const testDir = path.join(os$1.tmpdir(), `supbuddy-vitest-${process.pid}`);
|
|
26622
26620
|
await fs.mkdir(testDir, { recursive: true });
|
|
26623
26621
|
return testDir;
|
|
@@ -26627,9 +26625,9 @@ async function getAppSupportDir() {
|
|
|
26627
26625
|
if (platform === "darwin") {
|
|
26628
26626
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
26629
26627
|
} else if (platform === "win32") {
|
|
26630
|
-
userDataPath = path.join(
|
|
26628
|
+
userDataPath = path.join(nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
26631
26629
|
} else {
|
|
26632
|
-
userDataPath = path.join(
|
|
26630
|
+
userDataPath = path.join(nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"), "Supbuddy");
|
|
26633
26631
|
}
|
|
26634
26632
|
await fs.mkdir(userDataPath, { recursive: true });
|
|
26635
26633
|
return userDataPath;
|
|
@@ -26846,7 +26844,6 @@ function planProjectActivation(input) {
|
|
|
26846
26844
|
releaseGlobalRefs: input.enabledChanged && !input.enabled
|
|
26847
26845
|
};
|
|
26848
26846
|
}
|
|
26849
|
-
var define_process_env_default$d = {};
|
|
26850
26847
|
async function getCaddyfileDir() {
|
|
26851
26848
|
const platform = process.platform;
|
|
26852
26849
|
let userDataPath;
|
|
@@ -26854,12 +26851,12 @@ async function getCaddyfileDir() {
|
|
|
26854
26851
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
26855
26852
|
} else if (platform === "win32") {
|
|
26856
26853
|
userDataPath = path.join(
|
|
26857
|
-
|
|
26854
|
+
nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
26858
26855
|
"Supbuddy"
|
|
26859
26856
|
);
|
|
26860
26857
|
} else {
|
|
26861
26858
|
userDataPath = path.join(
|
|
26862
|
-
|
|
26859
|
+
nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
26863
26860
|
"Supbuddy"
|
|
26864
26861
|
);
|
|
26865
26862
|
}
|
|
@@ -28281,7 +28278,6 @@ function isMappingServeable(mapping, getProject) {
|
|
|
28281
28278
|
const project = getProject(mapping.projectId);
|
|
28282
28279
|
return !!project && project.enabled === true;
|
|
28283
28280
|
}
|
|
28284
|
-
var define_process_env_default$c = {};
|
|
28285
28281
|
let caddyProcess = null;
|
|
28286
28282
|
let stdoutBuffer = "";
|
|
28287
28283
|
let stderrBuffer = "";
|
|
@@ -28320,6 +28316,10 @@ function getCaddyBinaryPath() {
|
|
|
28320
28316
|
if (bundledBinDir) {
|
|
28321
28317
|
return path.join(bundledBinDir, binaryName);
|
|
28322
28318
|
}
|
|
28319
|
+
const isDev = nodeProcess.env.NODE_ENV !== "production";
|
|
28320
|
+
if (isDev) {
|
|
28321
|
+
return path.join(process.cwd(), "resources", "bin", binaryName);
|
|
28322
|
+
}
|
|
28323
28323
|
const resourcesPath = process.resourcesPath;
|
|
28324
28324
|
if (!resourcesPath) {
|
|
28325
28325
|
throw new Error(
|
|
@@ -28421,10 +28421,10 @@ async function doStartCaddyServer() {
|
|
|
28421
28421
|
console.log(`[Caddy] Binary: ${binaryPath}`);
|
|
28422
28422
|
console.log(`[Caddy] Config: ${caddyfilePath}`);
|
|
28423
28423
|
console.log(`[Caddy] Data directory: ${dataDir}`);
|
|
28424
|
-
const isDev =
|
|
28425
|
-
const homeDir =
|
|
28424
|
+
const isDev = nodeProcess.env.NODE_ENV !== "production";
|
|
28425
|
+
const homeDir = nodeProcess.env.HOME || require("os").homedir();
|
|
28426
28426
|
const caddyEnv = {
|
|
28427
|
-
...
|
|
28427
|
+
...nodeProcess.env,
|
|
28428
28428
|
HOME: homeDir,
|
|
28429
28429
|
XDG_DATA_HOME: dataDir,
|
|
28430
28430
|
XDG_CONFIG_HOME: path.dirname(caddyfilePath)
|
|
@@ -28855,7 +28855,6 @@ function deriveReportedStatus(tracked, live, opts = {}) {
|
|
|
28855
28855
|
if (tracked === "running" && !live.caddyAlive) return "crashed";
|
|
28856
28856
|
return tracked;
|
|
28857
28857
|
}
|
|
28858
|
-
var define_process_env_default$b = {};
|
|
28859
28858
|
const defaultElevate$1 = async ({ command, prompt, tmpFiles = [] }) => {
|
|
28860
28859
|
if (!process.send) {
|
|
28861
28860
|
return { success: false, error: "No host bridge available for elevation" };
|
|
@@ -28883,12 +28882,12 @@ async function getCaddyDataDir() {
|
|
|
28883
28882
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
28884
28883
|
} else if (platform === "win32") {
|
|
28885
28884
|
userDataPath = path.join(
|
|
28886
|
-
|
|
28885
|
+
nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
28887
28886
|
"Supbuddy"
|
|
28888
28887
|
);
|
|
28889
28888
|
} else {
|
|
28890
28889
|
userDataPath = path.join(
|
|
28891
|
-
|
|
28890
|
+
nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
28892
28891
|
"Supbuddy"
|
|
28893
28892
|
);
|
|
28894
28893
|
}
|
|
@@ -29265,7 +29264,6 @@ const caddyCaManager = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
29265
29264
|
parseKeychainSha1Fingerprints,
|
|
29266
29265
|
uninstallCaddyCA
|
|
29267
29266
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
29268
|
-
var define_process_env_default$a = {};
|
|
29269
29267
|
const execFileP$1 = util$1.promisify(child_process.execFile);
|
|
29270
29268
|
const PLIST_LABEL = "com.cueplusplus.supbuddy.bundled-runtime-ca-trust";
|
|
29271
29269
|
const MANAGED_ENV_VARS = ["NODE_EXTRA_CA_CERTS"];
|
|
@@ -29278,12 +29276,12 @@ function getSupbuddyDataDir() {
|
|
|
29278
29276
|
}
|
|
29279
29277
|
if (platform === "win32") {
|
|
29280
29278
|
return path.join(
|
|
29281
|
-
|
|
29279
|
+
nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
29282
29280
|
"Supbuddy"
|
|
29283
29281
|
);
|
|
29284
29282
|
}
|
|
29285
29283
|
return path.join(
|
|
29286
|
-
|
|
29284
|
+
nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
29287
29285
|
"Supbuddy"
|
|
29288
29286
|
);
|
|
29289
29287
|
}
|
|
@@ -29322,7 +29320,7 @@ function planCaEnvSanitization(env) {
|
|
|
29322
29320
|
const setNodeExtra = ne == null || ne === "" || isSupbuddyOwnedCaPath(ne) ? getBundlePath() : null;
|
|
29323
29321
|
return { unset, setNodeExtra };
|
|
29324
29322
|
}
|
|
29325
|
-
function getSanitizedSpawnEnv(base =
|
|
29323
|
+
function getSanitizedSpawnEnv(base = nodeProcess.env) {
|
|
29326
29324
|
const out = { ...base };
|
|
29327
29325
|
const plan2 = planCaEnvSanitization(out);
|
|
29328
29326
|
for (const v of plan2.unset) delete out[v];
|
|
@@ -29332,10 +29330,10 @@ function getSanitizedSpawnEnv(base = define_process_env_default$a) {
|
|
|
29332
29330
|
return out;
|
|
29333
29331
|
}
|
|
29334
29332
|
function sanitizeOwnProcessEnv() {
|
|
29335
|
-
const plan2 = planCaEnvSanitization(
|
|
29336
|
-
for (const v of plan2.unset) delete
|
|
29333
|
+
const plan2 = planCaEnvSanitization(nodeProcess.env);
|
|
29334
|
+
for (const v of plan2.unset) delete nodeProcess.env[v];
|
|
29337
29335
|
if (plan2.setNodeExtra && fsSync.existsSync(plan2.setNodeExtra)) {
|
|
29338
|
-
|
|
29336
|
+
nodeProcess.env.NODE_EXTRA_CA_CERTS = plan2.setNodeExtra;
|
|
29339
29337
|
}
|
|
29340
29338
|
if (plan2.unset.length) {
|
|
29341
29339
|
console.log("[brt] sanitized stale CA replace-vars from daemon env:", plan2.unset.join(", "));
|
|
@@ -29466,7 +29464,7 @@ async function scanProcessesForNodeExtra() {
|
|
|
29466
29464
|
const PROBEABLE_SHELLS = /* @__PURE__ */ new Set(["sh", "bash", "zsh", "ksh", "dash", "fish"]);
|
|
29467
29465
|
async function probeLoginShellNodeExtra() {
|
|
29468
29466
|
if (process.platform === "win32") return null;
|
|
29469
|
-
const shell =
|
|
29467
|
+
const shell = nodeProcess.env.SHELL || "/bin/sh";
|
|
29470
29468
|
if (!PROBEABLE_SHELLS.has(path.basename(shell))) return null;
|
|
29471
29469
|
try {
|
|
29472
29470
|
const { stdout } = await execFileP$1(
|
|
@@ -29476,8 +29474,8 @@ async function probeLoginShellNodeExtra() {
|
|
|
29476
29474
|
// A clean slate — HOME/USER only, so the profile chain is the ONLY source.
|
|
29477
29475
|
env: {
|
|
29478
29476
|
HOME: os$1.homedir(),
|
|
29479
|
-
USER:
|
|
29480
|
-
LOGNAME:
|
|
29477
|
+
USER: nodeProcess.env.USER ?? "",
|
|
29478
|
+
LOGNAME: nodeProcess.env.LOGNAME ?? nodeProcess.env.USER ?? "",
|
|
29481
29479
|
PATH: "/usr/bin:/bin:/usr/sbin:/sbin",
|
|
29482
29480
|
TERM: "dumb"
|
|
29483
29481
|
},
|
|
@@ -29517,7 +29515,7 @@ function getPlistPath() {
|
|
|
29517
29515
|
}
|
|
29518
29516
|
function getEnvironmentDPath() {
|
|
29519
29517
|
return path.join(
|
|
29520
|
-
|
|
29518
|
+
nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
29521
29519
|
"environment.d",
|
|
29522
29520
|
"supbuddy-ca.conf"
|
|
29523
29521
|
);
|
|
@@ -29974,7 +29972,7 @@ async function getStatus(lastRefreshedAt, opts = {}) {
|
|
|
29974
29972
|
observations.push({ origin: "managed", value: env.NODE_EXTRA_CA_CERTS, detail: getMethod() });
|
|
29975
29973
|
}
|
|
29976
29974
|
if (effective.loginShell) {
|
|
29977
|
-
observations.push({ origin: "login-shell", value: effective.loginShell, detail:
|
|
29975
|
+
observations.push({ origin: "login-shell", value: effective.loginShell, detail: nodeProcess.env.SHELL ?? "login shell" });
|
|
29978
29976
|
}
|
|
29979
29977
|
observations.push(...effective.processes);
|
|
29980
29978
|
const classified = classifyNodeExtraCaCerts(observations, bundlePath);
|
|
@@ -30192,7 +30190,7 @@ async function testTrust(opts) {
|
|
|
30192
30190
|
try {
|
|
30193
30191
|
const { stdout, stderr } = await execFileP$1(process.execPath, ["-e", script], {
|
|
30194
30192
|
env: {
|
|
30195
|
-
...
|
|
30193
|
+
...nodeProcess.env,
|
|
30196
30194
|
NODE_EXTRA_CA_CERTS: bundlePath
|
|
30197
30195
|
},
|
|
30198
30196
|
encoding: "utf-8",
|
|
@@ -33790,7 +33788,6 @@ const composeScanner = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
33790
33788
|
resolveComposeProject,
|
|
33791
33789
|
scanDockerCompose
|
|
33792
33790
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
33793
|
-
var define_process_env_default$9 = {};
|
|
33794
33791
|
const runningScripts = /* @__PURE__ */ new Map();
|
|
33795
33792
|
const MAX_LOG_LINES = 1e3;
|
|
33796
33793
|
function compareNodeVersions(a, b) {
|
|
@@ -33803,8 +33800,8 @@ function compareNodeVersions(a, b) {
|
|
|
33803
33800
|
return 0;
|
|
33804
33801
|
}
|
|
33805
33802
|
function getAugmentedPath() {
|
|
33806
|
-
const currentPath =
|
|
33807
|
-
const homeDir =
|
|
33803
|
+
const currentPath = nodeProcess.env.PATH || "";
|
|
33804
|
+
const homeDir = nodeProcess.env.HOME || require("os").homedir() || "";
|
|
33808
33805
|
const extraPaths = [
|
|
33809
33806
|
"/opt/homebrew/bin",
|
|
33810
33807
|
"/opt/homebrew/sbin",
|
|
@@ -33873,7 +33870,7 @@ async function startScript(projectId, projectPath, scriptName, command, packageM
|
|
|
33873
33870
|
console.log(`[ScriptManager] Starting script: ${scriptName} (${packageManager} run ${scriptName}) in ${projectPath}`);
|
|
33874
33871
|
console.log(`[ScriptManager] PATH: ${augmentedPath}`);
|
|
33875
33872
|
try {
|
|
33876
|
-
child_process.execSync(`command -v ${packageManager}`, { env: getSanitizedSpawnEnv({ ...
|
|
33873
|
+
child_process.execSync(`command -v ${packageManager}`, { env: getSanitizedSpawnEnv({ ...nodeProcess.env, PATH: augmentedPath }), stdio: "pipe" });
|
|
33877
33874
|
} catch {
|
|
33878
33875
|
const installHint = packageManager === "yarn" ? "Install it with: npm install -g yarn" : packageManager === "pnpm" ? "Install it with: npm install -g pnpm" : "Ensure Node.js is installed and npm is available in your PATH";
|
|
33879
33876
|
const errorMsg = `"${packageManager}" is not installed or not found in PATH. ${installHint}`;
|
|
@@ -33902,7 +33899,7 @@ async function startScript(projectId, projectPath, scriptName, command, packageM
|
|
|
33902
33899
|
shell: true,
|
|
33903
33900
|
// Sanitize so a stale inherited Supbuddy-owned SSL_CERT_FILE (replace-
|
|
33904
33901
|
// semantics, honored by Node 26) never reaches the user's dev server.
|
|
33905
|
-
env: getSanitizedSpawnEnv({ ...
|
|
33902
|
+
env: getSanitizedSpawnEnv({ ...nodeProcess.env, PATH: augmentedPath, FORCE_COLOR: "1" })
|
|
33906
33903
|
});
|
|
33907
33904
|
} catch (err) {
|
|
33908
33905
|
console.error(`[ScriptManager] Failed to spawn: ${err.message}`);
|
|
@@ -43705,9 +43702,8 @@ class McpAuditLog extends require$$0$1.EventEmitter {
|
|
|
43705
43702
|
}
|
|
43706
43703
|
}
|
|
43707
43704
|
}
|
|
43708
|
-
var define_process_env_default$8 = {};
|
|
43709
43705
|
function getAuditPath() {
|
|
43710
|
-
const dir =
|
|
43706
|
+
const dir = nodeProcess.env.SUPBUDDY_STATE_DIR ?? path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
43711
43707
|
return path.join(dir, "mcp-audit.jsonl");
|
|
43712
43708
|
}
|
|
43713
43709
|
const cap = () => useStore.getState().settings.mcp?.audit_cap ?? 5e3;
|
|
@@ -44918,8 +44914,11 @@ async function clearCloudSession(dir) {
|
|
|
44918
44914
|
}
|
|
44919
44915
|
async function cloudApiError(res, what) {
|
|
44920
44916
|
const body = await res.json().catch(() => ({}));
|
|
44921
|
-
|
|
44922
|
-
return
|
|
44917
|
+
const err = res.status === 401 ? new Error("Not signed in to Supbuddy Cloud") : new Error(body.error ? `${what} failed: ${body.error}` : `${what} failed (${res.status})`);
|
|
44918
|
+
return Object.assign(err, { status: res.status });
|
|
44919
|
+
}
|
|
44920
|
+
function isUnauthenticated(e) {
|
|
44921
|
+
return typeof e === "object" && e !== null && e.status === 401;
|
|
44923
44922
|
}
|
|
44924
44923
|
function bearerJson(session) {
|
|
44925
44924
|
return { Authorization: `Bearer ${session.accessToken}`, "Content-Type": "application/json" };
|
|
@@ -45101,11 +45100,17 @@ const LIVE_STACK_STATUSES = /* @__PURE__ */ new Set(["provisioning", "booting",
|
|
|
45101
45100
|
function shouldReuseStack(existing, force) {
|
|
45102
45101
|
return !force && existing !== null && LIVE_STACK_STATUSES.has(existing.status);
|
|
45103
45102
|
}
|
|
45104
|
-
async function cloudProjectStatus(cfg, session, stackId) {
|
|
45103
|
+
async function cloudProjectStatus(cfg, session, stackId, onSessionRefreshed) {
|
|
45105
45104
|
const f2 = cfg.fetchImpl ?? fetch;
|
|
45106
|
-
const
|
|
45107
|
-
headers: { Authorization: `Bearer ${
|
|
45105
|
+
const get2 = (token) => f2(`${cfg.apiBase}/api/cloud/stacks/${stackId}`, {
|
|
45106
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
45108
45107
|
});
|
|
45108
|
+
let res = await get2(session.accessToken);
|
|
45109
|
+
if (res.status === 401) {
|
|
45110
|
+
const refreshed = await refreshCloudSession(cfg, session);
|
|
45111
|
+
res = await get2(refreshed.accessToken);
|
|
45112
|
+
if (res.ok) onSessionRefreshed?.(refreshed);
|
|
45113
|
+
}
|
|
45109
45114
|
if (res.status === 404) return null;
|
|
45110
45115
|
if (!res.ok) throw await cloudApiError(res, "Get stack");
|
|
45111
45116
|
const raw = await res.json();
|
|
@@ -45268,7 +45273,20 @@ async function daemonCloudProjectStatus(projectId) {
|
|
|
45268
45273
|
if (!cfg || !currentSession) return { global: global2, project: { cloud: link, stack: null } };
|
|
45269
45274
|
currentSession = await ensureValidSession(cfg, currentSession);
|
|
45270
45275
|
await saveCloudSession(currentSession);
|
|
45271
|
-
|
|
45276
|
+
let stack = null;
|
|
45277
|
+
try {
|
|
45278
|
+
stack = await cloudProjectStatus(cfg, currentSession, link.stackId, (next) => {
|
|
45279
|
+
currentSession = next;
|
|
45280
|
+
void saveCloudSession(next);
|
|
45281
|
+
});
|
|
45282
|
+
} catch (e) {
|
|
45283
|
+
if (isUnauthenticated(e)) {
|
|
45284
|
+
currentSession = null;
|
|
45285
|
+
await clearCloudSession().catch(() => {
|
|
45286
|
+
});
|
|
45287
|
+
return { global: getCloudState(), project: { cloud: link, stack: null } };
|
|
45288
|
+
}
|
|
45289
|
+
}
|
|
45272
45290
|
return { global: global2, project: { cloud: link, stack } };
|
|
45273
45291
|
}
|
|
45274
45292
|
async function daemonCloudTeardownProject(projectId) {
|
|
@@ -46343,9 +46361,8 @@ async function installClaudeCode(target, projectRoot, token) {
|
|
|
46343
46361
|
await writeAtomic(filePath, asJsonString(existing));
|
|
46344
46362
|
return { written: true, path: filePath, backup };
|
|
46345
46363
|
}
|
|
46346
|
-
var define_process_env_default$7 = {};
|
|
46347
46364
|
async function installClaudeDesktop(token) {
|
|
46348
|
-
const filePath = process.platform === "darwin" ? path.join(os$1.homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json") : process.platform === "win32" ? path.join(
|
|
46365
|
+
const filePath = process.platform === "darwin" ? path.join(os$1.homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json") : process.platform === "win32" ? path.join(nodeProcess.env.APPDATA ?? "", "Claude", "claude_desktop_config.json") : path.join(os$1.homedir(), ".config", "Claude", "claude_desktop_config.json");
|
|
46349
46366
|
const existing = await readJsoncOrEmpty(filePath);
|
|
46350
46367
|
existing.mcpServers = existing.mcpServers ?? {};
|
|
46351
46368
|
existing.mcpServers.supbuddy = {
|
|
@@ -49108,9 +49125,8 @@ async function removeGitignoreEntries(projectPath) {
|
|
|
49108
49125
|
const stripped = (existing.slice(0, block.startIdx) + existing.slice(block.endIdx)).replace(/\n{3,}/g, "\n\n");
|
|
49109
49126
|
await fs.writeFile(p, stripped, "utf-8");
|
|
49110
49127
|
}
|
|
49111
|
-
var define_process_env_default$6 = {};
|
|
49112
49128
|
function globalHomeDir() {
|
|
49113
|
-
return
|
|
49129
|
+
return nodeProcess.env.SUPBUDDY_HOME_DIR || os$1.homedir();
|
|
49114
49130
|
}
|
|
49115
49131
|
const USER_SKILL_REF = "__user__";
|
|
49116
49132
|
const TARGET_CAPABILITIES = {
|
|
@@ -50654,11 +50670,10 @@ const isolationBridge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
50654
50670
|
registerIsolationSwitch,
|
|
50655
50671
|
runIsolationSwitch
|
|
50656
50672
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
50657
|
-
var define_process_env_default$5 = {};
|
|
50658
50673
|
function getCacheDir() {
|
|
50659
|
-
const override =
|
|
50674
|
+
const override = nodeProcess.env.SUPBUDDY_STATE_DIR;
|
|
50660
50675
|
if (override) return path.join(override, "image-cache");
|
|
50661
|
-
if (
|
|
50676
|
+
if (nodeProcess.env.VITEST || nodeProcess.env.NODE_ENV === "test") {
|
|
50662
50677
|
return path.join(os$1.tmpdir(), `supbuddy-vitest-${process.pid}`, "image-cache");
|
|
50663
50678
|
}
|
|
50664
50679
|
const platform = process.platform;
|
|
@@ -50666,9 +50681,9 @@ function getCacheDir() {
|
|
|
50666
50681
|
if (platform === "darwin") {
|
|
50667
50682
|
base = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
50668
50683
|
} else if (platform === "win32") {
|
|
50669
|
-
base = path.join(
|
|
50684
|
+
base = path.join(nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
50670
50685
|
} else {
|
|
50671
|
-
base = path.join(
|
|
50686
|
+
base = path.join(nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"), "Supbuddy");
|
|
50672
50687
|
}
|
|
50673
50688
|
return path.join(base, "image-cache");
|
|
50674
50689
|
}
|
|
@@ -51416,7 +51431,6 @@ function finishVmMigration(projectId, io2) {
|
|
|
51416
51431
|
io2?.emit?.("projects-updated", useStore.getState().projects);
|
|
51417
51432
|
});
|
|
51418
51433
|
}
|
|
51419
|
-
var define_process_env_default$4 = {};
|
|
51420
51434
|
if (typeof globalThis.crypto === "undefined") {
|
|
51421
51435
|
globalThis.crypto = crypto$1;
|
|
51422
51436
|
}
|
|
@@ -52016,7 +52030,7 @@ async function handleStartProxy() {
|
|
|
52016
52030
|
const fsd = await __vitePreload(() => import("node:fs"), false ? __VITE_PRELOAD__ : void 0);
|
|
52017
52031
|
const osd = await __vitePreload(() => import("node:os"), false ? __VITE_PRELOAD__ : void 0);
|
|
52018
52032
|
const pd = await __vitePreload(() => import("node:path"), false ? __VITE_PRELOAD__ : void 0);
|
|
52019
|
-
const dir =
|
|
52033
|
+
const dir = nodeProcess.env.SUPBUDDY_STATE_DIR || pd.join(osd.homedir(), "Library", "Application Support", "Supbuddy");
|
|
52020
52034
|
fsd.appendFileSync(pd.join(dir, "proxy-error.log"), `[${(/* @__PURE__ */ new Date()).toISOString()}] ${error.stack}
|
|
52021
52035
|
`);
|
|
52022
52036
|
} catch {
|
|
@@ -54707,7 +54721,7 @@ function killProcessOnPort(port) {
|
|
|
54707
54721
|
try {
|
|
54708
54722
|
const fsSync2 = require("node:fs");
|
|
54709
54723
|
const pathSync = require("node:path");
|
|
54710
|
-
const dir =
|
|
54724
|
+
const dir = nodeProcess.env.SUPBUDDY_STATE_DIR || pathSync.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
54711
54725
|
const parsed = JSON.parse(fsSync2.readFileSync(pathSync.join(dir, "daemon.json"), "utf-8"));
|
|
54712
54726
|
recordedPid = Number.isInteger(parsed?.pid) ? parsed.pid : null;
|
|
54713
54727
|
} catch {
|
|
@@ -54899,7 +54913,7 @@ async function init() {
|
|
|
54899
54913
|
setTimeout(() => process.exit(0), 50);
|
|
54900
54914
|
};
|
|
54901
54915
|
}
|
|
54902
|
-
if (!
|
|
54916
|
+
if (!nodeProcess.env.VITEST) {
|
|
54903
54917
|
init().catch(console.error);
|
|
54904
54918
|
}
|
|
54905
54919
|
const execAsync$2 = util$1.promisify(child_process.exec);
|
|
@@ -57168,11 +57182,10 @@ exec /usr/bin/${name2} ${opts} "$@"
|
|
|
57168
57182
|
});
|
|
57169
57183
|
return { ok: true, session };
|
|
57170
57184
|
}
|
|
57171
|
-
var define_process_env_default$3 = {};
|
|
57172
57185
|
const execFileAsync$1 = require$$0$3.promisify(node_child_process.execFile);
|
|
57173
57186
|
const sessions = /* @__PURE__ */ new Map();
|
|
57174
57187
|
const shimDirFor = (dataDir) => path$1.join(tailnetPaths(dataDir).dir, "shim");
|
|
57175
|
-
const mutagenEnv = (dataDir) => ({ ...
|
|
57188
|
+
const mutagenEnv = (dataDir) => ({ ...nodeProcess.env, PATH: `${shimDirFor(dataDir)}:${nodeProcess.env.PATH}` });
|
|
57176
57189
|
function runtimeDeps(deps) {
|
|
57177
57190
|
const bins = resolveTailscaledBinaries();
|
|
57178
57191
|
const mutagen = resolveMutagenBinary();
|
|
@@ -57256,11 +57269,10 @@ async function stopProjectSync(deps, projectId) {
|
|
|
57256
57269
|
sessions.delete(projectId);
|
|
57257
57270
|
return { stopped: true };
|
|
57258
57271
|
}
|
|
57259
|
-
var define_process_env_default$2 = {};
|
|
57260
57272
|
function syncDataDir() {
|
|
57261
|
-
const override =
|
|
57273
|
+
const override = nodeProcess.env.SUPBUDDY_STATE_DIR;
|
|
57262
57274
|
if (override) return override;
|
|
57263
|
-
if (
|
|
57275
|
+
if (nodeProcess.env.VITEST || nodeProcess.env.NODE_ENV === "test") {
|
|
57264
57276
|
return path$1.join(os$2.tmpdir(), `supbuddy-vitest-${process.pid}`);
|
|
57265
57277
|
}
|
|
57266
57278
|
if (process.platform === "darwin") {
|
|
@@ -57767,24 +57779,23 @@ const caAndTrust = {
|
|
|
57767
57779
|
return actions;
|
|
57768
57780
|
}
|
|
57769
57781
|
};
|
|
57770
|
-
var define_process_env_default$1 = {};
|
|
57771
57782
|
const SECRET_RE = /^mcp-(.+)\.secret$/;
|
|
57772
57783
|
function secretKey(clientId) {
|
|
57773
57784
|
return clientId.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
57774
57785
|
}
|
|
57775
57786
|
function appSupportDirSync() {
|
|
57776
|
-
const override =
|
|
57787
|
+
const override = nodeProcess.env.SUPBUDDY_STATE_DIR;
|
|
57777
57788
|
if (override) return override;
|
|
57778
|
-
if (
|
|
57789
|
+
if (nodeProcess.env.VITEST || nodeProcess.env.NODE_ENV === "test") {
|
|
57779
57790
|
return path.join(os$1.tmpdir(), `supbuddy-vitest-${process.pid}`);
|
|
57780
57791
|
}
|
|
57781
57792
|
if (process.platform === "darwin") {
|
|
57782
57793
|
return path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
57783
57794
|
}
|
|
57784
57795
|
if (process.platform === "win32") {
|
|
57785
|
-
return path.join(
|
|
57796
|
+
return path.join(nodeProcess.env.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
57786
57797
|
}
|
|
57787
|
-
return path.join(
|
|
57798
|
+
return path.join(nodeProcess.env.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"), "Supbuddy");
|
|
57788
57799
|
}
|
|
57789
57800
|
function secretsDirSync() {
|
|
57790
57801
|
return path.join(appSupportDirSync(), "secrets");
|
|
@@ -59618,10 +59629,9 @@ const orphanElectronTokenFiles = {
|
|
|
59618
59629
|
];
|
|
59619
59630
|
}
|
|
59620
59631
|
};
|
|
59621
|
-
var define_process_env_default = {};
|
|
59622
59632
|
function userSources(platform) {
|
|
59623
59633
|
const home = os$1.homedir();
|
|
59624
|
-
const claudeDesktop = platform === "darwin" ? path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json") : platform === "win32" ? path.join(
|
|
59634
|
+
const claudeDesktop = platform === "darwin" ? path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json") : platform === "win32" ? path.join(nodeProcess.env.APPDATA ?? "", "Claude", "claude_desktop_config.json") : path.join(home, ".config", "Claude", "claude_desktop_config.json");
|
|
59625
59635
|
return [
|
|
59626
59636
|
{ path: path.join(home, ".claude.json"), format: "json" },
|
|
59627
59637
|
{ path: claudeDesktop, format: "json" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supbuddy",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
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",
|