@devdogsuga/devtools 0.1.51-next.527 → 0.1.51-next.538
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as ownPackageDir, g as positionals, h as flagValue, l as ownVersion, n as discoverRepoRoot, r as findRepoRoot, u as cliName } from "./root-CsocfxnK.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as helpPath, C as currentProduct, D as isProductMode, E as activeCatalog, M as renderHelp, S as ProductConfigError, T as loadProductConfig, _ as bail, a as recordEnteredTier, b as explainError, c as describeEnvironment, d as resolveDbConnection, f as sessionIsLocal, i as beginInvocation, j as renderCommandList, k as catalog, l as probeEnvironment, n as bareGroupStartPath, o as recordResolved, p as sessionLabel, r as runMenu, s as reproducibleCommand, t as bareGroupStartFlags, u as nonEmpty, v as errorMessage, x as unwrap, y as explain } from "./menu-C30rQm5v.js";
|
|
3
3
|
import { A as dryRunKind, C as layoutAt, E as resolveLayout, O as reportRan, P as wouldRunLine, S as findApp, T as resolveAppPath, _ as loadEnvLoad, b as appWorkspaceRoot, c as reportRuns, f as supabase, g as loadEnv, h as getEnvSync, j as isDryRun, k as runInGroup, l as run$1, m as supabaseRoot, s as dbPush, u as runWithStderr, v as loadEnvSession, w as listApps, x as devdogsugaRootOrNull, y as repoPeerUrl } from "./supabase-project-BoJKMCxL.js";
|
|
4
4
|
import { d as hasYes, f as isNonInteractive, n as captureDevtoolsError, o as initDevtoolsTelemetry } from "./telemetry-BKFDtzXI.js";
|
|
5
5
|
import { t as runStackCommand } from "./stack-7Lbym6Wq.js";
|
|
@@ -4906,16 +4906,26 @@ function runStatus(argv, cwd) {
|
|
|
4906
4906
|
]
|
|
4907
4907
|
});
|
|
4908
4908
|
}
|
|
4909
|
+
/** The Supabase CLI version a product repo pins, or null outside one. */
|
|
4910
|
+
function productPin(cwd) {
|
|
4911
|
+
try {
|
|
4912
|
+
return loadProductConfig(cwd).supabase.version;
|
|
4913
|
+
} catch {
|
|
4914
|
+
return null;
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4909
4917
|
/**
|
|
4910
4918
|
* Runs `supabase status -o env` in `cwd` and extracts the local API URL and
|
|
4911
4919
|
* service role key. Throws a descriptive error if Supabase isn't running or
|
|
4912
4920
|
* the CLI isn't installed.
|
|
4913
4921
|
*
|
|
4914
|
-
*
|
|
4915
|
-
* a sibling project, where the Supabase CLI is normally installed globally
|
|
4916
|
-
* this monorepo, where it is a workspace devDependency and not on PATH at all
|
|
4917
|
-
*
|
|
4918
|
-
*
|
|
4922
|
+
* Up to three invocations are tried, because this wizard runs in three worlds:
|
|
4923
|
+
* a sibling project, where the Supabase CLI is normally installed globally;
|
|
4924
|
+
* this monorepo, where it is a workspace devDependency and not on PATH at all;
|
|
4925
|
+
* and a product repo (`devtools.config.json`), where `devtools setup` ran the
|
|
4926
|
+
* pinned CLI through `npx` and a new member has none installed. A global install
|
|
4927
|
+
* wins, since `pnpm exec` in a non-pnpm project would fail for reasons that have
|
|
4928
|
+
* nothing to do with Supabase.
|
|
4919
4929
|
*/
|
|
4920
4930
|
function detectLocalSupabase(cwd) {
|
|
4921
4931
|
const repoRoot = discoverRepoRoot(cwd);
|
|
@@ -4923,29 +4933,36 @@ function detectLocalSupabase(cwd) {
|
|
|
4923
4933
|
const layout = layoutAt(repoRoot);
|
|
4924
4934
|
if (layout.kind === "backstage" && layout.hasDevdogsuga) cwd = layout.devdogsugaRoot;
|
|
4925
4935
|
}
|
|
4936
|
+
const status = [
|
|
4937
|
+
"status",
|
|
4938
|
+
"-o",
|
|
4939
|
+
"env"
|
|
4940
|
+
];
|
|
4941
|
+
const attempts = [["supabase", ...status], [
|
|
4942
|
+
"pnpm",
|
|
4943
|
+
"exec",
|
|
4944
|
+
"supabase",
|
|
4945
|
+
...status
|
|
4946
|
+
]];
|
|
4947
|
+
const pin = productPin(cwd);
|
|
4948
|
+
if (pin !== null) attempts.push([
|
|
4949
|
+
"npx",
|
|
4950
|
+
"--yes",
|
|
4951
|
+
`supabase@${pin}`,
|
|
4952
|
+
...status
|
|
4953
|
+
]);
|
|
4926
4954
|
let output;
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
"exec",
|
|
4939
|
-
"supabase",
|
|
4940
|
-
"status",
|
|
4941
|
-
"-o",
|
|
4942
|
-
"env"
|
|
4943
|
-
], cwd);
|
|
4944
|
-
} catch {
|
|
4945
|
-
if (first.code === "ENOENT") throw new Error("supabase CLI not found — install it from https://supabase.com/docs/guides/cli");
|
|
4946
|
-
const stderr = (first.stderr ?? "").trim();
|
|
4947
|
-
throw new Error(stderr || (first instanceof Error ? first.message : String(first)));
|
|
4948
|
-
}
|
|
4955
|
+
let first;
|
|
4956
|
+
for (const argv of attempts) try {
|
|
4957
|
+
output = runStatus(argv, cwd);
|
|
4958
|
+
break;
|
|
4959
|
+
} catch (error) {
|
|
4960
|
+
first ??= error;
|
|
4961
|
+
}
|
|
4962
|
+
if (output === void 0) {
|
|
4963
|
+
if (first.code === "ENOENT") throw new Error("supabase CLI not found — install it from https://supabase.com/docs/guides/cli");
|
|
4964
|
+
const stderr = (first.stderr ?? "").trim();
|
|
4965
|
+
throw new Error(stderr || (first instanceof Error ? first.message : String(first)));
|
|
4949
4966
|
}
|
|
4950
4967
|
const env = parse(output);
|
|
4951
4968
|
const apiUrl = env["API_URL"];
|
package/dist/launch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as installFailureLog, n as discoverRepoRoot, r as findRepoRoot, t as RepoNotFoundError, u as cliName } from "./root-CsocfxnK.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as helpPath, O as setProductMode, _ as bail, g as setMenuEnvHook, h as realEnvEntryDeps, k as catalog, m as enterSessionEnvironment, n as bareGroupStartPath, u as nonEmpty, v as errorMessage, w as findProductRoot, x as unwrap } from "./menu-C30rQm5v.js";
|
|
3
3
|
import { D as formatCommand, M as resolveDryRun, N as setDryRun, _ as loadEnvLoad, j as isDryRun, v as loadEnvSession } from "./supabase-project-BoJKMCxL.js";
|
|
4
4
|
import { d as hasYes, f as isNonInteractive, m as stripTierFlag, n as captureDevtoolsError, o as initDevtoolsTelemetry, p as stripNoEnvFlag, s as lastSentryEventId } from "./telemetry-BKFDtzXI.js";
|
|
5
5
|
import { confirm, select } from "@clack/prompts";
|
|
@@ -172,7 +172,7 @@ async function startStack() {
|
|
|
172
172
|
* post-tier-resolution path.
|
|
173
173
|
*/
|
|
174
174
|
async function dispatch(argv) {
|
|
175
|
-
const { main } = await import("./cli-
|
|
175
|
+
const { main } = await import("./cli-CT8KKwtW.js");
|
|
176
176
|
try {
|
|
177
177
|
await main(argv);
|
|
178
178
|
} catch (err) {
|
|
@@ -1978,4 +1978,4 @@ async function runMenu(catalog, dispatch, env = probeEnvironment(), options = {}
|
|
|
1978
1978
|
return dispatch(chosen.argv);
|
|
1979
1979
|
}
|
|
1980
1980
|
//#endregion
|
|
1981
|
-
export {
|
|
1981
|
+
export { helpPath as A, currentProduct as C, isProductMode as D, activeCatalog as E, renderHelp as M, setProductMode as O, ProductConfigError as S, loadProductConfig as T, bail as _, recordEnteredTier as a, explainError as b, describeEnvironment as c, resolveDbConnection as d, sessionIsLocal as f, setMenuEnvHook as g, realEnvEntryDeps as h, beginInvocation as i, renderCommandList as j, catalog as k, probeEnvironment as l, enterSessionEnvironment as m, bareGroupStartPath as n, recordResolved as o, sessionLabel as p, runMenu as r, reproducibleCommand as s, bareGroupStartFlags as t, nonEmpty as u, errorMessage as v, findProductRoot as w, unwrap as x, explain as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devdogsuga/devtools",
|
|
3
|
-
"version": "0.1.51-next.
|
|
3
|
+
"version": "0.1.51-next.538",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Contributor CLI for DevDogs repositories (the platform monorepo, DogDays, DogPack): the real tools with the session's tier filled in, `setup`, `db sync`, `db types`, `dev-data`, a menu over them, the checks CI runs, and the `with-env` launcher. Ships built JS; run via `pnpm dlx @devdogsuga/devtools` or `npx @devdogsuga/devtools` (or the `devtools` bin once installed) from inside a clone.",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"eslint": "^9.39.5",
|
|
45
45
|
"tsdown": "^0.23.0",
|
|
46
46
|
"vitest": "^4.1.11",
|
|
47
|
-
"@devdogsuga/cli-core": "0.0.0",
|
|
48
47
|
"@devdogsuga/sdk": "0.1.0",
|
|
49
|
-
"@devdogsuga/config": "0.1.4-next.526"
|
|
48
|
+
"@devdogsuga/config": "0.1.4-next.526",
|
|
49
|
+
"@devdogsuga/cli-core": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsdown && node scripts/write-build-info.mjs && node ../../scripts/check-bundle-imports.mjs",
|