supbuddy 3.1.13 → 3.1.14
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 +72 -65
- package/dist/daemon/worker.cjs +4 -1
- package/dist/lib.d.ts +2 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -19786,6 +19786,71 @@ var init_state_dir = __esm({
|
|
|
19786
19786
|
}
|
|
19787
19787
|
});
|
|
19788
19788
|
|
|
19789
|
+
// src/build-identity.ts
|
|
19790
|
+
var build_identity_exports = {};
|
|
19791
|
+
__export(build_identity_exports, {
|
|
19792
|
+
PRODUCTION_BIN_NAMES: () => PRODUCTION_BIN_NAMES,
|
|
19793
|
+
SHADOW_ESCAPE_HATCH: () => SHADOW_ESCAPE_HATCH,
|
|
19794
|
+
checkDevShadow: () => checkDevShadow,
|
|
19795
|
+
cliBuildKind: () => cliBuildKind,
|
|
19796
|
+
cliVersion: () => cliVersion,
|
|
19797
|
+
describeBuildMismatch: () => describeBuildMismatch,
|
|
19798
|
+
invokedAs: () => invokedAs,
|
|
19799
|
+
isDevBuild: () => isDevBuild
|
|
19800
|
+
});
|
|
19801
|
+
function cliBuildKind(env3 = process.env) {
|
|
19802
|
+
const raw = "npm".trim();
|
|
19803
|
+
return raw === "host" || raw === "npm" ? raw : "dev";
|
|
19804
|
+
}
|
|
19805
|
+
function cliVersion(env3 = process.env) {
|
|
19806
|
+
return "3.1.14".trim() || "0.0.0-dev";
|
|
19807
|
+
}
|
|
19808
|
+
function isDevBuild(env3) {
|
|
19809
|
+
return cliBuildKind(env3) === "dev";
|
|
19810
|
+
}
|
|
19811
|
+
function invokedAs(argv = process.argv) {
|
|
19812
|
+
const p = argv[1] ?? "";
|
|
19813
|
+
const base = p.split(/[\\/]/).pop() ?? "";
|
|
19814
|
+
return base.replace(/\.(js|ts|mjs|cjs)$/, "");
|
|
19815
|
+
}
|
|
19816
|
+
function checkDevShadow(argv = process.argv, env3 = process.env) {
|
|
19817
|
+
const kind = cliBuildKind(env3);
|
|
19818
|
+
const name = invokedAs(argv);
|
|
19819
|
+
const isProductionName = PRODUCTION_BIN_NAMES.includes(name);
|
|
19820
|
+
if (kind !== "dev" || !isProductionName) return { blocked: false, kind, name };
|
|
19821
|
+
const allowed = ["1", "true", "yes"].includes((env3[SHADOW_ESCAPE_HATCH] ?? "").toLowerCase());
|
|
19822
|
+
const message = [
|
|
19823
|
+
`This is a DEV build of the CLI answering to the name \`${name}\`.`,
|
|
19824
|
+
"",
|
|
19825
|
+
"That is almost always an accident: a `pnpm link`/`npm link` or a hand-made symlink has put your",
|
|
19826
|
+
"working tree ahead of the installed CLI on PATH, so `" + name + "` now runs unreleased code against",
|
|
19827
|
+
"your real daemon \u2014 including privileged repairs like `doctor --fix`.",
|
|
19828
|
+
"",
|
|
19829
|
+
"To run the dev CLI, use the dev runner (it can never shadow anything):",
|
|
19830
|
+
" ./scripts/supbuddy-dev <command>",
|
|
19831
|
+
"",
|
|
19832
|
+
"To find and remove the shadow:",
|
|
19833
|
+
` which -a ${name}`,
|
|
19834
|
+
` rm <the path that points into your checkout>`,
|
|
19835
|
+
"",
|
|
19836
|
+
`If you truly meant this, set ${SHADOW_ESCAPE_HATCH}=1 (it will still warn on every run).`
|
|
19837
|
+
].join("\n");
|
|
19838
|
+
return { blocked: !allowed, kind, name, message };
|
|
19839
|
+
}
|
|
19840
|
+
function describeBuildMismatch(cli, daemonSource) {
|
|
19841
|
+
if (!daemonSource || daemonSource === cli) return null;
|
|
19842
|
+
const severity = cli === "dev" || daemonSource === "dev" ? "unreleased code" : "different installs";
|
|
19843
|
+
return `warning: ${cli} CLI is talking to a ${daemonSource} daemon (${severity}). Run \`supbuddy version\` for both identities.`;
|
|
19844
|
+
}
|
|
19845
|
+
var PRODUCTION_BIN_NAMES, SHADOW_ESCAPE_HATCH;
|
|
19846
|
+
var init_build_identity = __esm({
|
|
19847
|
+
"src/build-identity.ts"() {
|
|
19848
|
+
"use strict";
|
|
19849
|
+
PRODUCTION_BIN_NAMES = ["supbuddy", "sup"];
|
|
19850
|
+
SHADOW_ESCAPE_HATCH = "SUPBUDDY_ALLOW_DEV_SHADOW";
|
|
19851
|
+
}
|
|
19852
|
+
});
|
|
19853
|
+
|
|
19789
19854
|
// src/caddy-resolve.ts
|
|
19790
19855
|
import { createRequire } from "module";
|
|
19791
19856
|
import path6 from "path";
|
|
@@ -25242,6 +25307,12 @@ async function startDaemon(opts = {}) {
|
|
|
25242
25307
|
// app and the CLI are on separate version lines (app 3.5.x, CLI 3.1.x), so
|
|
25243
25308
|
// comparing them would mark every daemon stale and restart-loop.
|
|
25244
25309
|
workerVersion: resolveWorkerVersion(mode),
|
|
25310
|
+
// THE CLI'S OWN VERSION, always, whatever the mode. `workerVersion` is the APP's version for a bundled
|
|
25311
|
+
// daemon — deliberately, because that is what the sidecar's staleness ordering needs — which left nothing
|
|
25312
|
+
// anywhere able to answer "which CLI is installed". The update panel showed **unknown** on a machine with
|
|
25313
|
+
// a perfectly good CLI at 3.1.13, because the only number it could reach was an app version it correctly
|
|
25314
|
+
// refused to compare against npm. Stamped at build time, so it is right for bundled, npm and source alike.
|
|
25315
|
+
cliVersion: cliVersion(),
|
|
25245
25316
|
workerSource: mode
|
|
25246
25317
|
});
|
|
25247
25318
|
const netmon = createNetworkMonitor({
|
|
@@ -25355,6 +25426,7 @@ var init_daemon = __esm({
|
|
|
25355
25426
|
init_relay_server();
|
|
25356
25427
|
init_network_monitor();
|
|
25357
25428
|
init_state_dir();
|
|
25429
|
+
init_build_identity();
|
|
25358
25430
|
init_caddy_resolve();
|
|
25359
25431
|
init_shared();
|
|
25360
25432
|
__dirname2 = path7.dirname(fileURLToPath(import.meta.url));
|
|
@@ -43635,71 +43707,6 @@ var init_run = __esm({
|
|
|
43635
43707
|
}
|
|
43636
43708
|
});
|
|
43637
43709
|
|
|
43638
|
-
// src/build-identity.ts
|
|
43639
|
-
var build_identity_exports = {};
|
|
43640
|
-
__export(build_identity_exports, {
|
|
43641
|
-
PRODUCTION_BIN_NAMES: () => PRODUCTION_BIN_NAMES,
|
|
43642
|
-
SHADOW_ESCAPE_HATCH: () => SHADOW_ESCAPE_HATCH,
|
|
43643
|
-
checkDevShadow: () => checkDevShadow,
|
|
43644
|
-
cliBuildKind: () => cliBuildKind,
|
|
43645
|
-
cliVersion: () => cliVersion,
|
|
43646
|
-
describeBuildMismatch: () => describeBuildMismatch,
|
|
43647
|
-
invokedAs: () => invokedAs,
|
|
43648
|
-
isDevBuild: () => isDevBuild
|
|
43649
|
-
});
|
|
43650
|
-
function cliBuildKind(env3 = process.env) {
|
|
43651
|
-
const raw = "npm".trim();
|
|
43652
|
-
return raw === "host" || raw === "npm" ? raw : "dev";
|
|
43653
|
-
}
|
|
43654
|
-
function cliVersion(env3 = process.env) {
|
|
43655
|
-
return "3.1.13".trim() || "0.0.0-dev";
|
|
43656
|
-
}
|
|
43657
|
-
function isDevBuild(env3) {
|
|
43658
|
-
return cliBuildKind(env3) === "dev";
|
|
43659
|
-
}
|
|
43660
|
-
function invokedAs(argv = process.argv) {
|
|
43661
|
-
const p = argv[1] ?? "";
|
|
43662
|
-
const base = p.split(/[\\/]/).pop() ?? "";
|
|
43663
|
-
return base.replace(/\.(js|ts|mjs|cjs)$/, "");
|
|
43664
|
-
}
|
|
43665
|
-
function checkDevShadow(argv = process.argv, env3 = process.env) {
|
|
43666
|
-
const kind = cliBuildKind(env3);
|
|
43667
|
-
const name = invokedAs(argv);
|
|
43668
|
-
const isProductionName = PRODUCTION_BIN_NAMES.includes(name);
|
|
43669
|
-
if (kind !== "dev" || !isProductionName) return { blocked: false, kind, name };
|
|
43670
|
-
const allowed = ["1", "true", "yes"].includes((env3[SHADOW_ESCAPE_HATCH] ?? "").toLowerCase());
|
|
43671
|
-
const message = [
|
|
43672
|
-
`This is a DEV build of the CLI answering to the name \`${name}\`.`,
|
|
43673
|
-
"",
|
|
43674
|
-
"That is almost always an accident: a `pnpm link`/`npm link` or a hand-made symlink has put your",
|
|
43675
|
-
"working tree ahead of the installed CLI on PATH, so `" + name + "` now runs unreleased code against",
|
|
43676
|
-
"your real daemon \u2014 including privileged repairs like `doctor --fix`.",
|
|
43677
|
-
"",
|
|
43678
|
-
"To run the dev CLI, use the dev runner (it can never shadow anything):",
|
|
43679
|
-
" ./scripts/supbuddy-dev <command>",
|
|
43680
|
-
"",
|
|
43681
|
-
"To find and remove the shadow:",
|
|
43682
|
-
` which -a ${name}`,
|
|
43683
|
-
` rm <the path that points into your checkout>`,
|
|
43684
|
-
"",
|
|
43685
|
-
`If you truly meant this, set ${SHADOW_ESCAPE_HATCH}=1 (it will still warn on every run).`
|
|
43686
|
-
].join("\n");
|
|
43687
|
-
return { blocked: !allowed, kind, name, message };
|
|
43688
|
-
}
|
|
43689
|
-
function describeBuildMismatch(cli, daemonSource) {
|
|
43690
|
-
if (!daemonSource || daemonSource === cli) return null;
|
|
43691
|
-
const severity = cli === "dev" || daemonSource === "dev" ? "unreleased code" : "different installs";
|
|
43692
|
-
return `warning: ${cli} CLI is talking to a ${daemonSource} daemon (${severity}). Run \`supbuddy version\` for both identities.`;
|
|
43693
|
-
}
|
|
43694
|
-
var PRODUCTION_BIN_NAMES, SHADOW_ESCAPE_HATCH;
|
|
43695
|
-
var init_build_identity = __esm({
|
|
43696
|
-
"src/build-identity.ts"() {
|
|
43697
|
-
"use strict";
|
|
43698
|
-
PRODUCTION_BIN_NAMES = ["supbuddy", "sup"];
|
|
43699
|
-
SHADOW_ESCAPE_HATCH = "SUPBUDDY_ALLOW_DEV_SHADOW";
|
|
43700
|
-
}
|
|
43701
|
-
});
|
|
43702
|
-
|
|
43703
43710
|
// src/bin.ts
|
|
43704
43711
|
init_daemon();
|
|
43705
43712
|
init_daemon_json();
|
package/dist/daemon/worker.cjs
CHANGED
|
@@ -54007,7 +54007,10 @@ process.on("message", async (message) => {
|
|
|
54007
54007
|
const status = await getCliUpdateStatus2({
|
|
54008
54008
|
daemonVersion: dj?.workerVersion ?? null,
|
|
54009
54009
|
source: dj?.workerSource ?? null,
|
|
54010
|
-
|
|
54010
|
+
// The CLI's OWN stamped version, recorded by the daemon that spawned this worker. Without it a
|
|
54011
|
+
// bundled install had no CLI number to show at all and the panel said "unknown" — on a machine
|
|
54012
|
+
// where `supbuddy version` answers perfectly well.
|
|
54013
|
+
cliVersion: message.data?.cliVersion ?? dj?.cliVersion ?? null
|
|
54011
54014
|
});
|
|
54012
54015
|
process.send({
|
|
54013
54016
|
type: "cli:update-status:response",
|
package/dist/lib.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ interface DaemonInfo {
|
|
|
44
44
|
/** Where that worker came from: the spawner's bundle, the installed npm package,
|
|
45
45
|
* or repo source via tsx. Together with `workerVersion` it answers "what code
|
|
46
46
|
* is this daemon running" without inferring it from paths. */
|
|
47
|
+
/** The CLI's own stamped version — distinct from `workerVersion`, which is the APP version when bundled. */
|
|
48
|
+
cliVersion?: string;
|
|
47
49
|
workerSource?: 'host' | 'npm' | 'dev';
|
|
48
50
|
}
|
|
49
51
|
declare function readDaemonInfo(stateDir: string): Promise<DaemonInfo | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supbuddy",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
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",
|