supbuddy 3.2.1 → 3.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 +63 -69
- package/dist/daemon/worker.cjs +61 -64
- 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.2".trim() || "0.0.0-dev";
|
|
19811
19811
|
}
|
|
19812
19812
|
function isDevBuild(env3) {
|
|
19813
19813
|
return cliBuildKind(env3) === "dev";
|
|
@@ -19855,7 +19855,7 @@ var init_build_identity = __esm({
|
|
|
19855
19855
|
}
|
|
19856
19856
|
});
|
|
19857
19857
|
|
|
19858
|
-
// src/caddy-resolve.
|
|
19858
|
+
// src/caddy-resolve.ts
|
|
19859
19859
|
import { createRequire } from "module";
|
|
19860
19860
|
import path6 from "path";
|
|
19861
19861
|
function caddyPackageName(platform = process.platform, arch = process.arch) {
|
|
@@ -19869,8 +19869,7 @@ function caddyPackageName(platform = process.platform, arch = process.arch) {
|
|
|
19869
19869
|
}
|
|
19870
19870
|
function resolvePackagedCaddyDir(deps = {}) {
|
|
19871
19871
|
const pkgName = deps.pkgName !== void 0 ? deps.pkgName : caddyPackageName();
|
|
19872
|
-
if (!pkgName)
|
|
19873
|
-
return null;
|
|
19872
|
+
if (!pkgName) return null;
|
|
19874
19873
|
const resolve = deps.resolve ?? ((id) => requireFromHere.resolve(id));
|
|
19875
19874
|
try {
|
|
19876
19875
|
return path6.dirname(resolve(`${pkgName}/package.json`));
|
|
@@ -19880,7 +19879,7 @@ function resolvePackagedCaddyDir(deps = {}) {
|
|
|
19880
19879
|
}
|
|
19881
19880
|
var requireFromHere;
|
|
19882
19881
|
var init_caddy_resolve = __esm({
|
|
19883
|
-
"src/caddy-resolve.
|
|
19882
|
+
"src/caddy-resolve.ts"() {
|
|
19884
19883
|
"use strict";
|
|
19885
19884
|
requireFromHere = createRequire(import.meta.url);
|
|
19886
19885
|
}
|
|
@@ -28765,8 +28764,6 @@ var init_dind_manager = __esm({
|
|
|
28765
28764
|
});
|
|
28766
28765
|
|
|
28767
28766
|
// ../../packages/core/image-cache.ts
|
|
28768
|
-
import { promisify as promisify3 } from "util";
|
|
28769
|
-
import { execFile as execFile2, spawn as spawn4 } from "child_process";
|
|
28770
28767
|
import fs8 from "fs/promises";
|
|
28771
28768
|
import path11 from "path";
|
|
28772
28769
|
import os6 from "os";
|
|
@@ -28817,12 +28814,10 @@ async function clearImageCache() {
|
|
|
28817
28814
|
} catch {
|
|
28818
28815
|
}
|
|
28819
28816
|
}
|
|
28820
|
-
var execFileAsync2;
|
|
28821
28817
|
var init_image_cache = __esm({
|
|
28822
28818
|
"../../packages/core/image-cache.ts"() {
|
|
28823
28819
|
"use strict";
|
|
28824
28820
|
init_dind_manager();
|
|
28825
|
-
execFileAsync2 = promisify3(execFile2);
|
|
28826
28821
|
}
|
|
28827
28822
|
});
|
|
28828
28823
|
|
|
@@ -31883,15 +31878,15 @@ var init_js_yaml = __esm({
|
|
|
31883
31878
|
});
|
|
31884
31879
|
|
|
31885
31880
|
// ../../packages/core/compose-scanner.ts
|
|
31886
|
-
import { promisify as
|
|
31887
|
-
import { exec as exec2, execFile as
|
|
31888
|
-
var execAsync2,
|
|
31881
|
+
import { promisify as promisify3 } from "util";
|
|
31882
|
+
import { exec as exec2, execFile as execFile2 } from "child_process";
|
|
31883
|
+
var execAsync2, execFileAsync2;
|
|
31889
31884
|
var init_compose_scanner = __esm({
|
|
31890
31885
|
"../../packages/core/compose-scanner.ts"() {
|
|
31891
31886
|
"use strict";
|
|
31892
31887
|
init_js_yaml();
|
|
31893
|
-
execAsync2 =
|
|
31894
|
-
|
|
31888
|
+
execAsync2 = promisify3(exec2);
|
|
31889
|
+
execFileAsync2 = promisify3(execFile2);
|
|
31895
31890
|
}
|
|
31896
31891
|
});
|
|
31897
31892
|
|
|
@@ -32045,8 +32040,8 @@ import fsSync from "fs";
|
|
|
32045
32040
|
import path13 from "path";
|
|
32046
32041
|
import os8 from "os";
|
|
32047
32042
|
import crypto2 from "crypto";
|
|
32048
|
-
import { execFile as
|
|
32049
|
-
import { promisify as
|
|
32043
|
+
import { execFile as execFile3, execFileSync as execFileSync2 } from "child_process";
|
|
32044
|
+
import { promisify as promisify4 } from "util";
|
|
32050
32045
|
function getSupbuddyDataDir() {
|
|
32051
32046
|
const platform = process.platform;
|
|
32052
32047
|
if (platform === "darwin") {
|
|
@@ -32514,7 +32509,7 @@ var init_bundled_runtime_trust2 = __esm({
|
|
|
32514
32509
|
"../../packages/core/bundled-runtime-trust.ts"() {
|
|
32515
32510
|
"use strict";
|
|
32516
32511
|
init_caddy_ca_manager();
|
|
32517
|
-
execFileP =
|
|
32512
|
+
execFileP = promisify4(execFile3);
|
|
32518
32513
|
PLIST_LABEL = "com.cueplusplus.supbuddy.bundled-runtime-ca-trust";
|
|
32519
32514
|
MANAGED_ENV_VARS = ["NODE_EXTRA_CA_CERTS"];
|
|
32520
32515
|
LEGACY_REPLACE_VARS = ["SSL_CERT_FILE", "REQUESTS_CA_BUNDLE"];
|
|
@@ -32565,7 +32560,7 @@ var init_docker_watcher = __esm({
|
|
|
32565
32560
|
|
|
32566
32561
|
// ../../packages/core/tailscale.ts
|
|
32567
32562
|
import { exec as exec3 } from "child_process";
|
|
32568
|
-
import { promisify as
|
|
32563
|
+
import { promisify as promisify5 } from "util";
|
|
32569
32564
|
import fs11 from "fs/promises";
|
|
32570
32565
|
import path14 from "path";
|
|
32571
32566
|
async function tailscaleKeyPath() {
|
|
@@ -32631,7 +32626,7 @@ var init_tailscale = __esm({
|
|
|
32631
32626
|
"../../packages/core/tailscale.ts"() {
|
|
32632
32627
|
"use strict";
|
|
32633
32628
|
init_store();
|
|
32634
|
-
execAsync3 =
|
|
32629
|
+
execAsync3 = promisify5(exec3);
|
|
32635
32630
|
detectionInterval = null;
|
|
32636
32631
|
apiKey = null;
|
|
32637
32632
|
}
|
|
@@ -37802,8 +37797,8 @@ __export(supabase_manager_exports, {
|
|
|
37802
37797
|
stopSupabase: () => stopSupabase,
|
|
37803
37798
|
takenSupabaseProjectIds: () => takenSupabaseProjectIds
|
|
37804
37799
|
});
|
|
37805
|
-
import { spawn as
|
|
37806
|
-
import { promisify as
|
|
37800
|
+
import { spawn as spawn4 } from "child_process";
|
|
37801
|
+
import { promisify as promisify6 } from "util";
|
|
37807
37802
|
import { exec as exec4 } from "child_process";
|
|
37808
37803
|
import nodeProcess from "process";
|
|
37809
37804
|
function runSerial(fn) {
|
|
@@ -37851,9 +37846,6 @@ async function isDockerRunning() {
|
|
|
37851
37846
|
}
|
|
37852
37847
|
async function isSupabaseInitialized(projectPath) {
|
|
37853
37848
|
try {
|
|
37854
|
-
const { exec: exec9 } = await import("child_process");
|
|
37855
|
-
const { promisify: promisify15 } = await import("util");
|
|
37856
|
-
const execAsync9 = promisify15(exec9);
|
|
37857
37849
|
const fs33 = await import("fs/promises");
|
|
37858
37850
|
const path39 = await import("path");
|
|
37859
37851
|
const supabasePath = path39.join(projectPath, "supabase");
|
|
@@ -37919,8 +37911,8 @@ async function readSupabasePorts(projectPath) {
|
|
|
37919
37911
|
async function isPortInUse(port) {
|
|
37920
37912
|
try {
|
|
37921
37913
|
const { exec: exec9 } = await import("child_process");
|
|
37922
|
-
const { promisify:
|
|
37923
|
-
const execAsync9 =
|
|
37914
|
+
const { promisify: promisify14 } = await import("util");
|
|
37915
|
+
const execAsync9 = promisify14(exec9);
|
|
37924
37916
|
const { stdout } = await execAsync9(`lsof -nP -iTCP:${port} -sTCP:LISTEN -F pcn`, { timeout: 3e3 });
|
|
37925
37917
|
if (!stdout.trim()) return { inUse: false };
|
|
37926
37918
|
const match = stdout.match(/c([^\n]+)/);
|
|
@@ -37977,7 +37969,7 @@ Edit Supabase config.toml to use different ports, or stop the other project firs
|
|
|
37977
37969
|
}
|
|
37978
37970
|
const projectEnv = await resolveProjectEnv(projectPath);
|
|
37979
37971
|
return new Promise((resolve, reject) => {
|
|
37980
|
-
const child =
|
|
37972
|
+
const child = spawn4("supabase", ["start"], {
|
|
37981
37973
|
cwd: projectPath,
|
|
37982
37974
|
env: { ...nodeProcess.env, ...projectEnv },
|
|
37983
37975
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -37991,7 +37983,6 @@ Edit Supabase config.toml to use different ports, or stop the other project firs
|
|
|
37991
37983
|
};
|
|
37992
37984
|
activeOperations.set(projectId, operation);
|
|
37993
37985
|
let output = "";
|
|
37994
|
-
let hasError = false;
|
|
37995
37986
|
io2.emit("supabase:operation", {
|
|
37996
37987
|
projectId,
|
|
37997
37988
|
operation: "start",
|
|
@@ -38034,7 +38025,6 @@ Edit Supabase config.toml to use different ports, or stop the other project firs
|
|
|
38034
38025
|
switch (ev.kind) {
|
|
38035
38026
|
case "error":
|
|
38036
38027
|
console.error(`[SupabaseManager] ${ev.text}`);
|
|
38037
|
-
hasError = true;
|
|
38038
38028
|
break;
|
|
38039
38029
|
case "warning":
|
|
38040
38030
|
console.log(`[SupabaseManager] ${ev.text}`);
|
|
@@ -38108,7 +38098,7 @@ async function stopSupabase(projectId, projectPath, io2) {
|
|
|
38108
38098
|
throw new Error("Operation already in progress for this project");
|
|
38109
38099
|
}
|
|
38110
38100
|
return new Promise((resolve, reject) => {
|
|
38111
|
-
const child =
|
|
38101
|
+
const child = spawn4("supabase", ["stop"], {
|
|
38112
38102
|
cwd: projectPath,
|
|
38113
38103
|
stdio: ["ignore", "pipe", "pipe"]
|
|
38114
38104
|
});
|
|
@@ -38121,7 +38111,6 @@ async function stopSupabase(projectId, projectPath, io2) {
|
|
|
38121
38111
|
};
|
|
38122
38112
|
activeOperations.set(projectId, operation);
|
|
38123
38113
|
let output = "";
|
|
38124
|
-
let hasError = false;
|
|
38125
38114
|
io2.emit("supabase:operation", {
|
|
38126
38115
|
projectId,
|
|
38127
38116
|
operation: "stop",
|
|
@@ -38138,7 +38127,6 @@ async function stopSupabase(projectId, projectPath, io2) {
|
|
|
38138
38127
|
output += stderrOutput;
|
|
38139
38128
|
if (!isWarning(stderrOutput)) {
|
|
38140
38129
|
console.error(`[SupabaseManager] Error: ${stderrOutput}`);
|
|
38141
|
-
hasError = true;
|
|
38142
38130
|
} else {
|
|
38143
38131
|
console.log(`[SupabaseManager] Warning: ${stderrOutput.trim()}`);
|
|
38144
38132
|
}
|
|
@@ -38379,7 +38367,7 @@ var init_supabase_manager = __esm({
|
|
|
38379
38367
|
init_supabase_progress();
|
|
38380
38368
|
serialChain = Promise.resolve();
|
|
38381
38369
|
THIN_SUPABASE_SOFT_CAP = 6;
|
|
38382
|
-
execAsync4 =
|
|
38370
|
+
execAsync4 = promisify6(exec4);
|
|
38383
38371
|
activeOperations = /* @__PURE__ */ new Map();
|
|
38384
38372
|
renameLocks = /* @__PURE__ */ new Map();
|
|
38385
38373
|
}
|
|
@@ -38619,8 +38607,8 @@ var init_caddy_supervisor = __esm({
|
|
|
38619
38607
|
});
|
|
38620
38608
|
|
|
38621
38609
|
// ../../packages/core/caddy-manager.ts
|
|
38622
|
-
import { spawn as
|
|
38623
|
-
import { promisify as
|
|
38610
|
+
import { spawn as spawn5, execFile as execFile4 } from "child_process";
|
|
38611
|
+
import { promisify as promisify7 } from "util";
|
|
38624
38612
|
import { randomUUID } from "crypto";
|
|
38625
38613
|
import path18 from "path";
|
|
38626
38614
|
import fs15 from "fs/promises";
|
|
@@ -38643,9 +38631,14 @@ function getCaddyBinaryPath() {
|
|
|
38643
38631
|
const isDev = process.env.NODE_ENV !== "production";
|
|
38644
38632
|
if (isDev) {
|
|
38645
38633
|
return path18.join(process.cwd(), "resources", "bin", binaryName);
|
|
38646
|
-
} else {
|
|
38647
|
-
return path18.join(process.resourcesPath, "bin", binaryName);
|
|
38648
38634
|
}
|
|
38635
|
+
const resourcesPath = process.resourcesPath;
|
|
38636
|
+
if (!resourcesPath) {
|
|
38637
|
+
throw new Error(
|
|
38638
|
+
`cannot locate ${binaryName}: SUPBUDDY_BIN_DIR is not set and this runtime has no process.resourcesPath (that is Electron-only). The host must set SUPBUDDY_BIN_DIR to the directory holding the bundled binaries.`
|
|
38639
|
+
);
|
|
38640
|
+
}
|
|
38641
|
+
return path18.join(resourcesPath, "bin", binaryName);
|
|
38649
38642
|
}
|
|
38650
38643
|
async function reapStaleCaddyProcesses() {
|
|
38651
38644
|
if (process.platform === "win32") return;
|
|
@@ -38700,7 +38693,7 @@ function parseCaddyPidsFromPsOutput(stdout, matchToken, selfPid) {
|
|
|
38700
38693
|
async function listCaddyPids(matchToken) {
|
|
38701
38694
|
if (process.platform === "win32") return [];
|
|
38702
38695
|
return await new Promise((resolve) => {
|
|
38703
|
-
|
|
38696
|
+
execFile4("/bin/ps", ["-axo", "pid=,stat=,command="], (err, stdout) => {
|
|
38704
38697
|
if (err) {
|
|
38705
38698
|
console.warn("[Caddy] /bin/ps failed during reap scan:", err);
|
|
38706
38699
|
return resolve([]);
|
|
@@ -38744,7 +38737,7 @@ async function doStartCaddyServer() {
|
|
|
38744
38737
|
XDG_DATA_HOME: dataDir,
|
|
38745
38738
|
XDG_CONFIG_HOME: path18.dirname(caddyfilePath)
|
|
38746
38739
|
};
|
|
38747
|
-
caddyProcess =
|
|
38740
|
+
caddyProcess = spawn5(binaryPath, ["run", "--config", caddyfilePath, "--adapter", "caddyfile"], {
|
|
38748
38741
|
env: caddyEnv,
|
|
38749
38742
|
stdio: [isDev ? "inherit" : "ignore", "pipe", "pipe"]
|
|
38750
38743
|
});
|
|
@@ -38920,10 +38913,10 @@ async function validateCaddyfileContent(content) {
|
|
|
38920
38913
|
const binaryPath = getCaddyBinaryPath();
|
|
38921
38914
|
const dir = await getCaddyfileDir();
|
|
38922
38915
|
const tmpPath = path18.join(dir, `Caddyfile.validate.${process.pid}.${caddyValidateCounter++}.tmp`);
|
|
38923
|
-
const
|
|
38916
|
+
const execFileAsync5 = promisify7(execFile4);
|
|
38924
38917
|
try {
|
|
38925
38918
|
await fs15.writeFile(tmpPath, content, "utf-8");
|
|
38926
|
-
await
|
|
38919
|
+
await execFileAsync5(binaryPath, ["validate", "--config", tmpPath, "--adapter", "caddyfile"]);
|
|
38927
38920
|
return { ok: true };
|
|
38928
38921
|
} catch (err) {
|
|
38929
38922
|
const e = err;
|
|
@@ -39083,23 +39076,23 @@ var init_stop_services = __esm({
|
|
|
39083
39076
|
});
|
|
39084
39077
|
|
|
39085
39078
|
// ../../packages/core/caddy-docker.ts
|
|
39086
|
-
import { promisify as
|
|
39087
|
-
import { execFile as
|
|
39079
|
+
import { promisify as promisify8 } from "util";
|
|
39080
|
+
import { execFile as execFile5 } from "child_process";
|
|
39088
39081
|
async function stopCaddyContainer() {
|
|
39089
39082
|
console.log("[CaddyDocker] Stopping container...");
|
|
39090
|
-
await
|
|
39083
|
+
await execFileAsync3("docker", ["stop", CADDY_CONTAINER], { timeout: 3e4 }).catch(() => {
|
|
39091
39084
|
});
|
|
39092
39085
|
}
|
|
39093
39086
|
async function removeCaddyContainer() {
|
|
39094
|
-
await
|
|
39087
|
+
await execFileAsync3("docker", ["rm", "-f", CADDY_CONTAINER], { timeout: 1e4 }).catch(() => {
|
|
39095
39088
|
});
|
|
39096
39089
|
}
|
|
39097
|
-
var
|
|
39090
|
+
var execFileAsync3, CADDY_CONTAINER;
|
|
39098
39091
|
var init_caddy_docker = __esm({
|
|
39099
39092
|
"../../packages/core/caddy-docker.ts"() {
|
|
39100
39093
|
"use strict";
|
|
39101
39094
|
init_caddyfile_generator();
|
|
39102
|
-
|
|
39095
|
+
execFileAsync3 = promisify8(execFile5);
|
|
39103
39096
|
CADDY_CONTAINER = "supbuddy-caddy";
|
|
39104
39097
|
}
|
|
39105
39098
|
});
|
|
@@ -39184,7 +39177,7 @@ var init_caddy_docker_leftovers = __esm({
|
|
|
39184
39177
|
|
|
39185
39178
|
// ../../packages/core/port-forwarding.ts
|
|
39186
39179
|
import { exec as exec5 } from "child_process";
|
|
39187
|
-
import { promisify as
|
|
39180
|
+
import { promisify as promisify9 } from "util";
|
|
39188
39181
|
import fs16 from "fs/promises";
|
|
39189
39182
|
async function probe443(timeoutMs = 1e3) {
|
|
39190
39183
|
return probePort(443, timeoutMs);
|
|
@@ -39251,7 +39244,7 @@ var execAsync5;
|
|
|
39251
39244
|
var init_port_forwarding = __esm({
|
|
39252
39245
|
"../../packages/core/port-forwarding.ts"() {
|
|
39253
39246
|
"use strict";
|
|
39254
|
-
execAsync5 =
|
|
39247
|
+
execAsync5 = promisify9(exec5);
|
|
39255
39248
|
}
|
|
39256
39249
|
});
|
|
39257
39250
|
|
|
@@ -39610,7 +39603,7 @@ var init_revoked_mcp_secrets = __esm({
|
|
|
39610
39603
|
});
|
|
39611
39604
|
|
|
39612
39605
|
// ../../packages/core/supabase-dump.ts
|
|
39613
|
-
import { spawn as
|
|
39606
|
+
import { spawn as spawn6 } from "child_process";
|
|
39614
39607
|
import { createHash } from "crypto";
|
|
39615
39608
|
import { createWriteStream } from "fs";
|
|
39616
39609
|
import { mkdtemp, stat, rm } from "fs/promises";
|
|
@@ -39633,7 +39626,7 @@ async function dumpInto(dir, container) {
|
|
|
39633
39626
|
const file = join(dir, "supabase.pgc");
|
|
39634
39627
|
const hash = createHash("sha256");
|
|
39635
39628
|
await new Promise((resolve, reject) => {
|
|
39636
|
-
const child =
|
|
39629
|
+
const child = spawn6("docker", [
|
|
39637
39630
|
"exec",
|
|
39638
39631
|
container,
|
|
39639
39632
|
"pg_dump",
|
|
@@ -41038,7 +41031,7 @@ var init_sync_manager = __esm({
|
|
|
41038
41031
|
|
|
41039
41032
|
// ../../packages/core/project-cleanup.ts
|
|
41040
41033
|
import { exec as exec6 } from "child_process";
|
|
41041
|
-
import { promisify as
|
|
41034
|
+
import { promisify as promisify10 } from "util";
|
|
41042
41035
|
async function cleanupProjectRuntime(project) {
|
|
41043
41036
|
const projectName = project.name ?? project.id;
|
|
41044
41037
|
try {
|
|
@@ -41097,7 +41090,7 @@ var execAsync6;
|
|
|
41097
41090
|
var init_project_cleanup = __esm({
|
|
41098
41091
|
"../../packages/core/project-cleanup.ts"() {
|
|
41099
41092
|
"use strict";
|
|
41100
|
-
execAsync6 =
|
|
41093
|
+
execAsync6 = promisify10(exec6);
|
|
41101
41094
|
}
|
|
41102
41095
|
});
|
|
41103
41096
|
|
|
@@ -41387,25 +41380,26 @@ var init_repo_artifacts = __esm({
|
|
|
41387
41380
|
});
|
|
41388
41381
|
|
|
41389
41382
|
// ../../packages/core/bundle-exporter.ts
|
|
41390
|
-
import { promisify as
|
|
41391
|
-
import { exec as exec7, execFile as
|
|
41392
|
-
var execAsync7,
|
|
41383
|
+
import { promisify as promisify11 } from "util";
|
|
41384
|
+
import { exec as exec7, execFile as execFile6 } from "child_process";
|
|
41385
|
+
var execAsync7, execFileAsync4;
|
|
41393
41386
|
var init_bundle_exporter = __esm({
|
|
41394
41387
|
"../../packages/core/bundle-exporter.ts"() {
|
|
41395
41388
|
"use strict";
|
|
41396
41389
|
init_shared();
|
|
41397
41390
|
init_compose_scanner();
|
|
41398
41391
|
init_dind_manager();
|
|
41399
|
-
execAsync7 =
|
|
41400
|
-
|
|
41392
|
+
execAsync7 = promisify11(exec7);
|
|
41393
|
+
execFileAsync4 = promisify11(execFile6);
|
|
41401
41394
|
}
|
|
41402
41395
|
});
|
|
41403
41396
|
|
|
41404
41397
|
// ../../packages/core/cloud.ts
|
|
41405
41398
|
import fs27 from "fs/promises";
|
|
41399
|
+
import nodeProcess3 from "process";
|
|
41406
41400
|
import path30 from "path";
|
|
41407
|
-
import { execFile as
|
|
41408
|
-
import { promisify as
|
|
41401
|
+
import { execFile as execFile7 } from "child_process";
|
|
41402
|
+
import { promisify as promisify12 } from "util";
|
|
41409
41403
|
async function sessionPath(dir) {
|
|
41410
41404
|
const d = dir ?? path30.join(await getAppSupportDir(), "secrets");
|
|
41411
41405
|
await fs27.mkdir(d, { recursive: true, mode: 448 });
|
|
@@ -41422,7 +41416,7 @@ var init_cloud = __esm({
|
|
|
41422
41416
|
init_store();
|
|
41423
41417
|
init_bundle_exporter();
|
|
41424
41418
|
init_supabase_dump();
|
|
41425
|
-
execFileP2 =
|
|
41419
|
+
execFileP2 = promisify12(execFile7);
|
|
41426
41420
|
REFRESH_BUFFER_MS = 60 * 1e3;
|
|
41427
41421
|
}
|
|
41428
41422
|
});
|
|
@@ -41690,13 +41684,13 @@ var init_engine = __esm({
|
|
|
41690
41684
|
|
|
41691
41685
|
// ../../packages/core/isolation-drift.ts
|
|
41692
41686
|
import { exec as exec8 } from "child_process";
|
|
41693
|
-
import { promisify as
|
|
41687
|
+
import { promisify as promisify13 } from "util";
|
|
41694
41688
|
var execAsync8, defaultRunner;
|
|
41695
41689
|
var init_isolation_drift = __esm({
|
|
41696
41690
|
"../../packages/core/isolation-drift.ts"() {
|
|
41697
41691
|
"use strict";
|
|
41698
41692
|
init_project_scanner();
|
|
41699
|
-
execAsync8 =
|
|
41693
|
+
execAsync8 = promisify13(exec8);
|
|
41700
41694
|
defaultRunner = async (cmd) => {
|
|
41701
41695
|
try {
|
|
41702
41696
|
const { stdout } = await execAsync8(cmd, { timeout: 5e3 });
|
|
@@ -43315,7 +43309,7 @@ import os13 from "os";
|
|
|
43315
43309
|
import path36 from "path";
|
|
43316
43310
|
import crypto6 from "crypto";
|
|
43317
43311
|
import readline3 from "readline";
|
|
43318
|
-
import { execFile as
|
|
43312
|
+
import { execFile as execFile8, execFileSync as execFileSync3, spawn as spawn7 } from "child_process";
|
|
43319
43313
|
function semver(tag) {
|
|
43320
43314
|
const core2 = tag.replace(/^v/, "").split(/[-+]/)[0];
|
|
43321
43315
|
const parts = core2.split(".").map((n) => parseInt(n, 10));
|
|
@@ -43458,7 +43452,7 @@ async function swapApp(newApp) {
|
|
|
43458
43452
|
const shell = `rm -rf ${sq(INSTALLED_APP)} && mv ${sq(newApp)} ${sq(INSTALLED_APP)}`;
|
|
43459
43453
|
const osa = `do shell script "${shell.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}" with administrator privileges`;
|
|
43460
43454
|
await new Promise((resolve, reject) => {
|
|
43461
|
-
|
|
43455
|
+
execFile8("osascript", ["-e", osa], (err) => err ? reject(err) : resolve());
|
|
43462
43456
|
});
|
|
43463
43457
|
}
|
|
43464
43458
|
function relaunchApp() {
|
|
@@ -43466,7 +43460,7 @@ function relaunchApp() {
|
|
|
43466
43460
|
execFileSync3("pkill", ["-x", "Supbuddy"]);
|
|
43467
43461
|
} catch {
|
|
43468
43462
|
}
|
|
43469
|
-
|
|
43463
|
+
spawn7("open", [INSTALLED_APP], { detached: true, stdio: "ignore" }).unref();
|
|
43470
43464
|
}
|
|
43471
43465
|
async function runUpdate(opts = {}) {
|
|
43472
43466
|
if (process.platform !== "darwin") {
|
|
@@ -43631,7 +43625,7 @@ __export(run_exports, {
|
|
|
43631
43625
|
runDev: () => runDev,
|
|
43632
43626
|
selectDevUrls: () => selectDevUrls
|
|
43633
43627
|
});
|
|
43634
|
-
import { spawn as
|
|
43628
|
+
import { spawn as spawn8, execSync as execSync2 } from "child_process";
|
|
43635
43629
|
import fs32 from "fs";
|
|
43636
43630
|
import path37 from "path";
|
|
43637
43631
|
function readMeta(startDir) {
|
|
@@ -43746,10 +43740,10 @@ async function runDev(rawArgv, opts = {}) {
|
|
|
43746
43740
|
}
|
|
43747
43741
|
return await new Promise((resolve) => {
|
|
43748
43742
|
const filterBanner = framework === "next" || framework === "vite";
|
|
43749
|
-
const child = filterBanner ?
|
|
43743
|
+
const child = filterBanner ? spawn8(argv[0], argv.slice(1), {
|
|
43750
43744
|
stdio: ["inherit", "pipe", "pipe"],
|
|
43751
43745
|
env: { ...process.env, FORCE_COLOR: process.env.FORCE_COLOR ?? "1" }
|
|
43752
|
-
}) :
|
|
43746
|
+
}) : spawn8(argv[0], argv.slice(1), { stdio: "inherit", env: process.env });
|
|
43753
43747
|
if (filterBanner) {
|
|
43754
43748
|
const drop = (line) => isBoundBannerLine(line, ip);
|
|
43755
43749
|
if (child.stdout) pipeFiltered(child.stdout, process.stdout, drop);
|
package/dist/daemon/worker.cjs
CHANGED
|
@@ -25933,10 +25933,10 @@ function parseAddonsExtension(composeData) {
|
|
|
25933
25933
|
if (block == null) return null;
|
|
25934
25934
|
return SupbuddyAddonsExtensionSchema.parse(block);
|
|
25935
25935
|
}
|
|
25936
|
-
var define_process_env_default$
|
|
25936
|
+
var define_process_env_default$f = {};
|
|
25937
25937
|
const WORKER_PORT_ENV = "WORKER_PORT";
|
|
25938
25938
|
const DEFAULT_WORKER_PORT = 48760;
|
|
25939
|
-
function resolveWorkerPort(env = typeof process !== "undefined" ? define_process_env_default$
|
|
25939
|
+
function resolveWorkerPort(env = typeof process !== "undefined" ? define_process_env_default$f : {}) {
|
|
25940
25940
|
const raw = env[WORKER_PORT_ENV];
|
|
25941
25941
|
if (raw !== void 0 && raw !== "") {
|
|
25942
25942
|
const n = Number(raw);
|
|
@@ -26115,7 +26115,7 @@ function planGlobalTldCascade(projects, mappings, newTld) {
|
|
|
26115
26115
|
});
|
|
26116
26116
|
return { projectUpdates, mappingUpdates };
|
|
26117
26117
|
}
|
|
26118
|
-
var define_process_env_default$
|
|
26118
|
+
var define_process_env_default$e = {};
|
|
26119
26119
|
function coerceProjectName(name2, fallback = "Untitled project") {
|
|
26120
26120
|
if (typeof name2 === "string") return name2;
|
|
26121
26121
|
if (name2 && typeof name2.name === "string") return name2.name;
|
|
@@ -26612,12 +26612,12 @@ function schedulePersist() {
|
|
|
26612
26612
|
}, 1e3);
|
|
26613
26613
|
}
|
|
26614
26614
|
async function getAppSupportDir() {
|
|
26615
|
-
const override = define_process_env_default$
|
|
26615
|
+
const override = define_process_env_default$e.SUPBUDDY_STATE_DIR;
|
|
26616
26616
|
if (override) {
|
|
26617
26617
|
await fs.mkdir(override, { recursive: true });
|
|
26618
26618
|
return override;
|
|
26619
26619
|
}
|
|
26620
|
-
if (define_process_env_default$
|
|
26620
|
+
if (define_process_env_default$e.VITEST || false) {
|
|
26621
26621
|
const testDir = path.join(os$1.tmpdir(), `supbuddy-vitest-${process.pid}`);
|
|
26622
26622
|
await fs.mkdir(testDir, { recursive: true });
|
|
26623
26623
|
return testDir;
|
|
@@ -26627,9 +26627,9 @@ async function getAppSupportDir() {
|
|
|
26627
26627
|
if (platform === "darwin") {
|
|
26628
26628
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
26629
26629
|
} else if (platform === "win32") {
|
|
26630
|
-
userDataPath = path.join(define_process_env_default$
|
|
26630
|
+
userDataPath = path.join(define_process_env_default$e.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"), "Supbuddy");
|
|
26631
26631
|
} else {
|
|
26632
|
-
userDataPath = path.join(define_process_env_default$
|
|
26632
|
+
userDataPath = path.join(define_process_env_default$e.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"), "Supbuddy");
|
|
26633
26633
|
}
|
|
26634
26634
|
await fs.mkdir(userDataPath, { recursive: true });
|
|
26635
26635
|
return userDataPath;
|
|
@@ -26846,7 +26846,7 @@ function planProjectActivation(input) {
|
|
|
26846
26846
|
releaseGlobalRefs: input.enabledChanged && !input.enabled
|
|
26847
26847
|
};
|
|
26848
26848
|
}
|
|
26849
|
-
var define_process_env_default$
|
|
26849
|
+
var define_process_env_default$d = {};
|
|
26850
26850
|
async function getCaddyfileDir() {
|
|
26851
26851
|
const platform = process.platform;
|
|
26852
26852
|
let userDataPath;
|
|
@@ -26854,12 +26854,12 @@ async function getCaddyfileDir() {
|
|
|
26854
26854
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
26855
26855
|
} else if (platform === "win32") {
|
|
26856
26856
|
userDataPath = path.join(
|
|
26857
|
-
define_process_env_default$
|
|
26857
|
+
define_process_env_default$d.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
26858
26858
|
"Supbuddy"
|
|
26859
26859
|
);
|
|
26860
26860
|
} else {
|
|
26861
26861
|
userDataPath = path.join(
|
|
26862
|
-
define_process_env_default$
|
|
26862
|
+
define_process_env_default$d.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
26863
26863
|
"Supbuddy"
|
|
26864
26864
|
);
|
|
26865
26865
|
}
|
|
@@ -27540,15 +27540,6 @@ async function isDockerRunning() {
|
|
|
27540
27540
|
}
|
|
27541
27541
|
async function isSupabaseInitialized(projectPath) {
|
|
27542
27542
|
try {
|
|
27543
|
-
const { exec: exec2 } = await __vitePreload(async () => {
|
|
27544
|
-
const { exec: exec22 } = await import("child_process");
|
|
27545
|
-
return { exec: exec22 };
|
|
27546
|
-
}, false ? __VITE_PRELOAD__ : void 0);
|
|
27547
|
-
const { promisify: promisify2 } = await __vitePreload(async () => {
|
|
27548
|
-
const { promisify: promisify22 } = await import("util");
|
|
27549
|
-
return { promisify: promisify22 };
|
|
27550
|
-
}, false ? __VITE_PRELOAD__ : void 0);
|
|
27551
|
-
const execAsync2 = promisify2(exec2);
|
|
27552
27543
|
const fs2 = await __vitePreload(() => import("fs/promises"), false ? __VITE_PRELOAD__ : void 0);
|
|
27553
27544
|
const path2 = await __vitePreload(() => import("path"), false ? __VITE_PRELOAD__ : void 0);
|
|
27554
27545
|
const supabasePath = path2.join(projectPath, "supabase");
|
|
@@ -28290,7 +28281,7 @@ function isMappingServeable(mapping, getProject) {
|
|
|
28290
28281
|
const project = getProject(mapping.projectId);
|
|
28291
28282
|
return !!project && project.enabled === true;
|
|
28292
28283
|
}
|
|
28293
|
-
var define_process_env_default$
|
|
28284
|
+
var define_process_env_default$c = {};
|
|
28294
28285
|
let caddyProcess = null;
|
|
28295
28286
|
let stdoutBuffer = "";
|
|
28296
28287
|
let stderrBuffer = "";
|
|
@@ -28329,9 +28320,13 @@ function getCaddyBinaryPath() {
|
|
|
28329
28320
|
if (bundledBinDir) {
|
|
28330
28321
|
return path.join(bundledBinDir, binaryName);
|
|
28331
28322
|
}
|
|
28332
|
-
|
|
28333
|
-
|
|
28323
|
+
const resourcesPath = process.resourcesPath;
|
|
28324
|
+
if (!resourcesPath) {
|
|
28325
|
+
throw new Error(
|
|
28326
|
+
`cannot locate ${binaryName}: SUPBUDDY_BIN_DIR is not set and this runtime has no process.resourcesPath (that is Electron-only). The host must set SUPBUDDY_BIN_DIR to the directory holding the bundled binaries.`
|
|
28327
|
+
);
|
|
28334
28328
|
}
|
|
28329
|
+
return path.join(resourcesPath, "bin", binaryName);
|
|
28335
28330
|
}
|
|
28336
28331
|
async function reapStaleCaddyProcesses() {
|
|
28337
28332
|
if (process.platform === "win32") return;
|
|
@@ -28427,9 +28422,9 @@ async function doStartCaddyServer() {
|
|
|
28427
28422
|
console.log(`[Caddy] Config: ${caddyfilePath}`);
|
|
28428
28423
|
console.log(`[Caddy] Data directory: ${dataDir}`);
|
|
28429
28424
|
const isDev = false;
|
|
28430
|
-
const homeDir = define_process_env_default$
|
|
28425
|
+
const homeDir = define_process_env_default$c.HOME || require("os").homedir();
|
|
28431
28426
|
const caddyEnv = {
|
|
28432
|
-
...define_process_env_default$
|
|
28427
|
+
...define_process_env_default$c,
|
|
28433
28428
|
HOME: homeDir,
|
|
28434
28429
|
XDG_DATA_HOME: dataDir,
|
|
28435
28430
|
XDG_CONFIG_HOME: path.dirname(caddyfilePath)
|
|
@@ -28860,7 +28855,7 @@ function deriveReportedStatus(tracked, live, opts = {}) {
|
|
|
28860
28855
|
if (tracked === "running" && !live.caddyAlive) return "crashed";
|
|
28861
28856
|
return tracked;
|
|
28862
28857
|
}
|
|
28863
|
-
var define_process_env_default$
|
|
28858
|
+
var define_process_env_default$b = {};
|
|
28864
28859
|
const defaultElevate$1 = async ({ command, prompt, tmpFiles = [] }) => {
|
|
28865
28860
|
if (!process.send) {
|
|
28866
28861
|
return { success: false, error: "No host bridge available for elevation" };
|
|
@@ -28888,12 +28883,12 @@ async function getCaddyDataDir() {
|
|
|
28888
28883
|
userDataPath = path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
28889
28884
|
} else if (platform === "win32") {
|
|
28890
28885
|
userDataPath = path.join(
|
|
28891
|
-
define_process_env_default$
|
|
28886
|
+
define_process_env_default$b.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
28892
28887
|
"Supbuddy"
|
|
28893
28888
|
);
|
|
28894
28889
|
} else {
|
|
28895
28890
|
userDataPath = path.join(
|
|
28896
|
-
define_process_env_default$
|
|
28891
|
+
define_process_env_default$b.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
28897
28892
|
"Supbuddy"
|
|
28898
28893
|
);
|
|
28899
28894
|
}
|
|
@@ -29270,7 +29265,7 @@ const caddyCaManager = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
29270
29265
|
parseKeychainSha1Fingerprints,
|
|
29271
29266
|
uninstallCaddyCA
|
|
29272
29267
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
29273
|
-
var define_process_env_default$
|
|
29268
|
+
var define_process_env_default$a = {};
|
|
29274
29269
|
const execFileP$1 = util$1.promisify(child_process.execFile);
|
|
29275
29270
|
const PLIST_LABEL = "com.cueplusplus.supbuddy.bundled-runtime-ca-trust";
|
|
29276
29271
|
const MANAGED_ENV_VARS = ["NODE_EXTRA_CA_CERTS"];
|
|
@@ -29283,12 +29278,12 @@ function getSupbuddyDataDir() {
|
|
|
29283
29278
|
}
|
|
29284
29279
|
if (platform === "win32") {
|
|
29285
29280
|
return path.join(
|
|
29286
|
-
define_process_env_default$
|
|
29281
|
+
define_process_env_default$a.APPDATA || path.join(os$1.homedir(), "AppData", "Roaming"),
|
|
29287
29282
|
"Supbuddy"
|
|
29288
29283
|
);
|
|
29289
29284
|
}
|
|
29290
29285
|
return path.join(
|
|
29291
|
-
define_process_env_default$
|
|
29286
|
+
define_process_env_default$a.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
29292
29287
|
"Supbuddy"
|
|
29293
29288
|
);
|
|
29294
29289
|
}
|
|
@@ -29327,7 +29322,7 @@ function planCaEnvSanitization(env) {
|
|
|
29327
29322
|
const setNodeExtra = ne == null || ne === "" || isSupbuddyOwnedCaPath(ne) ? getBundlePath() : null;
|
|
29328
29323
|
return { unset, setNodeExtra };
|
|
29329
29324
|
}
|
|
29330
|
-
function getSanitizedSpawnEnv(base = define_process_env_default$
|
|
29325
|
+
function getSanitizedSpawnEnv(base = define_process_env_default$a) {
|
|
29331
29326
|
const out = { ...base };
|
|
29332
29327
|
const plan2 = planCaEnvSanitization(out);
|
|
29333
29328
|
for (const v of plan2.unset) delete out[v];
|
|
@@ -29337,10 +29332,10 @@ function getSanitizedSpawnEnv(base = define_process_env_default$b) {
|
|
|
29337
29332
|
return out;
|
|
29338
29333
|
}
|
|
29339
29334
|
function sanitizeOwnProcessEnv() {
|
|
29340
|
-
const plan2 = planCaEnvSanitization(define_process_env_default$
|
|
29341
|
-
for (const v of plan2.unset) delete define_process_env_default$
|
|
29335
|
+
const plan2 = planCaEnvSanitization(define_process_env_default$a);
|
|
29336
|
+
for (const v of plan2.unset) delete define_process_env_default$a[v];
|
|
29342
29337
|
if (plan2.setNodeExtra && fsSync.existsSync(plan2.setNodeExtra)) {
|
|
29343
|
-
define_process_env_default$
|
|
29338
|
+
define_process_env_default$a.NODE_EXTRA_CA_CERTS = plan2.setNodeExtra;
|
|
29344
29339
|
}
|
|
29345
29340
|
if (plan2.unset.length) {
|
|
29346
29341
|
console.log("[brt] sanitized stale CA replace-vars from daemon env:", plan2.unset.join(", "));
|
|
@@ -29471,7 +29466,7 @@ async function scanProcessesForNodeExtra() {
|
|
|
29471
29466
|
const PROBEABLE_SHELLS = /* @__PURE__ */ new Set(["sh", "bash", "zsh", "ksh", "dash", "fish"]);
|
|
29472
29467
|
async function probeLoginShellNodeExtra() {
|
|
29473
29468
|
if (process.platform === "win32") return null;
|
|
29474
|
-
const shell = define_process_env_default$
|
|
29469
|
+
const shell = define_process_env_default$a.SHELL || "/bin/sh";
|
|
29475
29470
|
if (!PROBEABLE_SHELLS.has(path.basename(shell))) return null;
|
|
29476
29471
|
try {
|
|
29477
29472
|
const { stdout } = await execFileP$1(
|
|
@@ -29481,8 +29476,8 @@ async function probeLoginShellNodeExtra() {
|
|
|
29481
29476
|
// A clean slate — HOME/USER only, so the profile chain is the ONLY source.
|
|
29482
29477
|
env: {
|
|
29483
29478
|
HOME: os$1.homedir(),
|
|
29484
|
-
USER: define_process_env_default$
|
|
29485
|
-
LOGNAME: define_process_env_default$
|
|
29479
|
+
USER: define_process_env_default$a.USER ?? "",
|
|
29480
|
+
LOGNAME: define_process_env_default$a.LOGNAME ?? define_process_env_default$a.USER ?? "",
|
|
29486
29481
|
PATH: "/usr/bin:/bin:/usr/sbin:/sbin",
|
|
29487
29482
|
TERM: "dumb"
|
|
29488
29483
|
},
|
|
@@ -29522,7 +29517,7 @@ function getPlistPath() {
|
|
|
29522
29517
|
}
|
|
29523
29518
|
function getEnvironmentDPath() {
|
|
29524
29519
|
return path.join(
|
|
29525
|
-
define_process_env_default$
|
|
29520
|
+
define_process_env_default$a.XDG_CONFIG_HOME || path.join(os$1.homedir(), ".config"),
|
|
29526
29521
|
"environment.d",
|
|
29527
29522
|
"supbuddy-ca.conf"
|
|
29528
29523
|
);
|
|
@@ -29979,7 +29974,7 @@ async function getStatus(lastRefreshedAt, opts = {}) {
|
|
|
29979
29974
|
observations.push({ origin: "managed", value: env.NODE_EXTRA_CA_CERTS, detail: getMethod() });
|
|
29980
29975
|
}
|
|
29981
29976
|
if (effective.loginShell) {
|
|
29982
|
-
observations.push({ origin: "login-shell", value: effective.loginShell, detail: define_process_env_default$
|
|
29977
|
+
observations.push({ origin: "login-shell", value: effective.loginShell, detail: define_process_env_default$a.SHELL ?? "login shell" });
|
|
29983
29978
|
}
|
|
29984
29979
|
observations.push(...effective.processes);
|
|
29985
29980
|
const classified = classifyNodeExtraCaCerts(observations, bundlePath);
|
|
@@ -30197,7 +30192,7 @@ async function testTrust(opts) {
|
|
|
30197
30192
|
try {
|
|
30198
30193
|
const { stdout, stderr } = await execFileP$1(process.execPath, ["-e", script], {
|
|
30199
30194
|
env: {
|
|
30200
|
-
...define_process_env_default$
|
|
30195
|
+
...define_process_env_default$a,
|
|
30201
30196
|
NODE_EXTRA_CA_CERTS: bundlePath
|
|
30202
30197
|
},
|
|
30203
30198
|
encoding: "utf-8",
|
|
@@ -30412,7 +30407,7 @@ fi
|
|
|
30412
30407
|
}
|
|
30413
30408
|
async function canUseSudo() {
|
|
30414
30409
|
try {
|
|
30415
|
-
|
|
30410
|
+
await execAsync$c("sudo -n true 2>&1");
|
|
30416
30411
|
return true;
|
|
30417
30412
|
} catch (error) {
|
|
30418
30413
|
return false;
|
|
@@ -33795,7 +33790,7 @@ const composeScanner = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
33795
33790
|
resolveComposeProject,
|
|
33796
33791
|
scanDockerCompose
|
|
33797
33792
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
33798
|
-
var define_process_env_default$
|
|
33793
|
+
var define_process_env_default$9 = {};
|
|
33799
33794
|
const runningScripts = /* @__PURE__ */ new Map();
|
|
33800
33795
|
const MAX_LOG_LINES = 1e3;
|
|
33801
33796
|
function compareNodeVersions(a, b) {
|
|
@@ -33808,8 +33803,8 @@ function compareNodeVersions(a, b) {
|
|
|
33808
33803
|
return 0;
|
|
33809
33804
|
}
|
|
33810
33805
|
function getAugmentedPath() {
|
|
33811
|
-
const currentPath = define_process_env_default$
|
|
33812
|
-
const homeDir = define_process_env_default$
|
|
33806
|
+
const currentPath = define_process_env_default$9.PATH || "";
|
|
33807
|
+
const homeDir = define_process_env_default$9.HOME || require("os").homedir() || "";
|
|
33813
33808
|
const extraPaths = [
|
|
33814
33809
|
"/opt/homebrew/bin",
|
|
33815
33810
|
"/opt/homebrew/sbin",
|
|
@@ -33878,7 +33873,7 @@ async function startScript(projectId, projectPath, scriptName, command, packageM
|
|
|
33878
33873
|
console.log(`[ScriptManager] Starting script: ${scriptName} (${packageManager} run ${scriptName}) in ${projectPath}`);
|
|
33879
33874
|
console.log(`[ScriptManager] PATH: ${augmentedPath}`);
|
|
33880
33875
|
try {
|
|
33881
|
-
child_process.execSync(`command -v ${packageManager}`, { env: getSanitizedSpawnEnv({ ...define_process_env_default$
|
|
33876
|
+
child_process.execSync(`command -v ${packageManager}`, { env: getSanitizedSpawnEnv({ ...define_process_env_default$9, PATH: augmentedPath }), stdio: "pipe" });
|
|
33882
33877
|
} catch {
|
|
33883
33878
|
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";
|
|
33884
33879
|
const errorMsg = `"${packageManager}" is not installed or not found in PATH. ${installHint}`;
|
|
@@ -33907,7 +33902,7 @@ async function startScript(projectId, projectPath, scriptName, command, packageM
|
|
|
33907
33902
|
shell: true,
|
|
33908
33903
|
// Sanitize so a stale inherited Supbuddy-owned SSL_CERT_FILE (replace-
|
|
33909
33904
|
// semantics, honored by Node 26) never reaches the user's dev server.
|
|
33910
|
-
env: getSanitizedSpawnEnv({ ...define_process_env_default$
|
|
33905
|
+
env: getSanitizedSpawnEnv({ ...define_process_env_default$9, PATH: augmentedPath, FORCE_COLOR: "1" })
|
|
33911
33906
|
});
|
|
33912
33907
|
} catch (err) {
|
|
33913
33908
|
console.error(`[ScriptManager] Failed to spawn: ${err.message}`);
|
|
@@ -34866,15 +34861,6 @@ async function detectSupabaseSDK(projectPath) {
|
|
|
34866
34861
|
async function scanDockerServices(projectPath) {
|
|
34867
34862
|
const services = [];
|
|
34868
34863
|
try {
|
|
34869
|
-
const { exec } = await __vitePreload(async () => {
|
|
34870
|
-
const { exec: exec2 } = await import("child_process");
|
|
34871
|
-
return { exec: exec2 };
|
|
34872
|
-
}, false ? __VITE_PRELOAD__ : void 0);
|
|
34873
|
-
const { promisify } = await __vitePreload(async () => {
|
|
34874
|
-
const { promisify: promisify2 } = await import("util");
|
|
34875
|
-
return { promisify: promisify2 };
|
|
34876
|
-
}, false ? __VITE_PRELOAD__ : void 0);
|
|
34877
|
-
const execAsync2 = promisify(exec);
|
|
34878
34864
|
const composeFiles = ["docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"];
|
|
34879
34865
|
let composeFile = null;
|
|
34880
34866
|
for (const file of composeFiles) {
|
|
@@ -43569,7 +43555,6 @@ function checkScope(tool, scopes) {
|
|
|
43569
43555
|
}
|
|
43570
43556
|
class RateLimiter {
|
|
43571
43557
|
buckets = /* @__PURE__ */ new Map();
|
|
43572
|
-
now = () => Date.now();
|
|
43573
43558
|
// Test seam: lets tests fast-forward without actually waiting.
|
|
43574
43559
|
testOffset = 0;
|
|
43575
43560
|
advanceTime(ms2) {
|
|
@@ -43720,9 +43705,9 @@ class McpAuditLog extends require$$0$1.EventEmitter {
|
|
|
43720
43705
|
}
|
|
43721
43706
|
}
|
|
43722
43707
|
}
|
|
43723
|
-
var define_process_env_default$
|
|
43708
|
+
var define_process_env_default$8 = {};
|
|
43724
43709
|
function getAuditPath() {
|
|
43725
|
-
const dir = define_process_env_default$
|
|
43710
|
+
const dir = define_process_env_default$8.SUPBUDDY_STATE_DIR ?? path.join(os$1.homedir(), "Library", "Application Support", "Supbuddy");
|
|
43726
43711
|
return path.join(dir, "mcp-audit.jsonl");
|
|
43727
43712
|
}
|
|
43728
43713
|
const cap = () => useStore.getState().settings.mcp?.audit_cap ?? 5e3;
|
|
@@ -44875,7 +44860,6 @@ async function dumpInto(dir, container) {
|
|
|
44875
44860
|
const { size } = await fs.stat(file);
|
|
44876
44861
|
return { dir, file, bytes: size, sha256: hash.digest("hex") };
|
|
44877
44862
|
}
|
|
44878
|
-
var define_process_env_default$8 = {};
|
|
44879
44863
|
const execFileP = util$1.promisify(child_process.execFile);
|
|
44880
44864
|
const REFRESH_BUFFER_MS = 60 * 1e3;
|
|
44881
44865
|
function toSession(t, emailFallback) {
|
|
@@ -45150,11 +45134,21 @@ async function cloudTeardownStack(cfg, session, stackId) {
|
|
|
45150
45134
|
}
|
|
45151
45135
|
let currentSession = null;
|
|
45152
45136
|
function cloudConfigFromEnv() {
|
|
45153
|
-
const
|
|
45154
|
-
const
|
|
45155
|
-
const
|
|
45137
|
+
const env = nodeProcess.env;
|
|
45138
|
+
const supabaseUrl = env.SUPBUDDY_CLOUD_SUPABASE_URL || bakedCloudSupabaseUrl();
|
|
45139
|
+
const anonKey = env.SUPBUDDY_CLOUD_ANON_KEY || bakedCloudAnonKey();
|
|
45140
|
+
const apiBase = env.SUPBUDDY_CLOUD_API_BASE || bakedCloudApiBase();
|
|
45156
45141
|
return supabaseUrl && anonKey && apiBase ? { supabaseUrl, anonKey, apiBase } : null;
|
|
45157
45142
|
}
|
|
45143
|
+
function bakedCloudSupabaseUrl() {
|
|
45144
|
+
return "https://ascxsovqvxyvpgvhjszo.supabase.co";
|
|
45145
|
+
}
|
|
45146
|
+
function bakedCloudAnonKey() {
|
|
45147
|
+
return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFzY3hzb3Zxdnh5dnBndmhqc3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzU5MTMxNzEsImV4cCI6MjA5MTQ4OTE3MX0.2Gb0z5FYglsQlm5QdfYS5y5TZO-NoCwIiTXWCk9C_Ds";
|
|
45148
|
+
}
|
|
45149
|
+
function bakedCloudApiBase() {
|
|
45150
|
+
return "https://supbuddy.cloud";
|
|
45151
|
+
}
|
|
45158
45152
|
function getCloudState() {
|
|
45159
45153
|
return {
|
|
45160
45154
|
configured: cloudConfigFromEnv() !== null,
|
|
@@ -50661,7 +50655,6 @@ const isolationBridge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
50661
50655
|
runIsolationSwitch
|
|
50662
50656
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
50663
50657
|
var define_process_env_default$5 = {};
|
|
50664
|
-
util$1.promisify(child_process.execFile);
|
|
50665
50658
|
function getCacheDir() {
|
|
50666
50659
|
const override = define_process_env_default$5.SUPBUDDY_STATE_DIR;
|
|
50667
50660
|
if (override) return path.join(override, "image-cache");
|
|
@@ -51271,7 +51264,11 @@ async function dumpVm(dind2, vmdb, dumpArgs, outFile) {
|
|
|
51271
51264
|
function _pgRestoreFile(child, rs) {
|
|
51272
51265
|
return new Promise((resolve, reject) => {
|
|
51273
51266
|
let err = "";
|
|
51274
|
-
child.stderr
|
|
51267
|
+
child.stderr?.on("data", (d) => err += d.toString());
|
|
51268
|
+
if (!child.stdin) {
|
|
51269
|
+
reject(new Error("pg_restore was spawned without a writable stdin, so the dump cannot be fed to it"));
|
|
51270
|
+
return;
|
|
51271
|
+
}
|
|
51275
51272
|
rs.on("error", (e) => reject(e));
|
|
51276
51273
|
rs.pipe(child.stdin);
|
|
51277
51274
|
child.on("error", (e) => reject(e));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supbuddy",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
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",
|