@devdogsuga/devtools 0.1.51-next.544 → 0.1.51-next.545

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/README.md CHANGED
@@ -97,12 +97,15 @@ name `devdogs-monorepo` or `backstage`; the layout code is
97
97
 
98
98
  A repository with a `devtools.config.json` at its root is a **product** (DogDays, DogPack): devtools
99
99
  reads the file and serves a smaller command set that needs no tiers, no env registry and no workspace.
100
- DogPack has no `package.json`, so it runs the published CLI directly:
100
+ Both products carry a `package.json` whose `devtools` script is a `pnpm dlx` run of the published CLI, so
101
+ inside a checkout:
101
102
 
102
103
  ```sh
103
- npx @devdogsuga/devtools@next setup
104
+ pnpm devtools setup
104
105
  ```
105
106
 
107
+ Anywhere else, the one-off form is `pnpm dlx @devdogsuga/devtools@next setup`.
108
+
106
109
  | Command | What it does |
107
110
  | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
108
111
  | `setup [--local \| --hosted]` | Writes `.env` from `.env.example`; starts the Docker stack (or takes your own hosted project's URL, keys and session-pooler `DB_URL`); `db sync`; the types; then `oauth`. |
@@ -136,7 +139,7 @@ How it works, in short:
136
139
  `oauth` (the tooling file) check that they are git-ignored and add them to the repo's `.gitignore`
137
140
  when they are not (Flutter's default ignore file leaves them out).
138
141
  - **The pinned CLI.** devtools finds `supabase` in `node_modules/.bin` or on PATH when its version is the
139
- pin, and otherwise runs `npx --yes supabase@<pin>`.
142
+ pin, and otherwise runs `pnpm dlx supabase@<pin>` (`npx --yes supabase@<pin>` only when pnpm is not on PATH).
140
143
  - **A hosted project** needs custom OAuth providers turned on and the app's return addresses allowed.
141
144
  `setup` does both through the Management API when `SUPABASE_ACCESS_TOKEN` is set, and prints the two
142
145
  dashboard steps when it is not.
@@ -4920,7 +4920,7 @@ function productPin(cwd) {
4920
4920
  * a sibling project, where the Supabase CLI is normally installed globally;
4921
4921
  * this monorepo, where it is a workspace devDependency and not on PATH at all;
4922
4922
  * and a product repo (`devtools.config.json`), where `devtools setup` ran the
4923
- * pinned CLI through `npx` and a new member has none installed. A global install
4923
+ * pinned CLI through `pnpm dlx` and a new member has none installed. A global install
4924
4924
  * wins, since `pnpm exec` in a non-pnpm project would fail for reasons that have
4925
4925
  * nothing to do with Supabase.
4926
4926
  */
@@ -4942,19 +4942,32 @@ function detectLocalSupabase(cwd) {
4942
4942
  ...status
4943
4943
  ]];
4944
4944
  const pin = productPin(cwd);
4945
- if (pin !== null) attempts.push([
4946
- "npx",
4947
- "--yes",
4948
- `supabase@${pin}`,
4949
- ...status
4950
- ]);
4945
+ if (pin !== null) {
4946
+ attempts.push([
4947
+ "pnpm",
4948
+ "dlx",
4949
+ `supabase@${pin}`,
4950
+ ...status
4951
+ ]);
4952
+ attempts.push([
4953
+ "npx",
4954
+ "--yes",
4955
+ `supabase@${pin}`,
4956
+ ...status
4957
+ ]);
4958
+ }
4951
4959
  let output;
4952
4960
  let first;
4953
- for (const argv of attempts) try {
4954
- output = runStatus(argv, cwd);
4955
- break;
4956
- } catch (error) {
4957
- first ??= error;
4961
+ let pnpmMissing = false;
4962
+ for (const argv of attempts) {
4963
+ if (argv[0] === "npx" && !pnpmMissing) continue;
4964
+ try {
4965
+ output = runStatus(argv, cwd);
4966
+ break;
4967
+ } catch (error) {
4968
+ first ??= error;
4969
+ if (argv[0] === "pnpm" && error.code === "ENOENT") pnpmMissing = true;
4970
+ }
4958
4971
  }
4959
4972
  if (output === void 0) {
4960
4973
  if (first.code === "ENOENT") throw new Error("supabase CLI not found — install it from https://supabase.com/docs/guides/cli");
@@ -7034,7 +7047,9 @@ function commandLine(command, args) {
7034
7047
  *
7035
7048
  * 1. `node_modules/.bin/supabase` in the repo, when its version is the pin;
7036
7049
  * 2. a `supabase` on PATH whose version is the pin;
7037
- * 3. `npx --yes supabase@<pin>`, which downloads and caches the right one.
7050
+ * 3. `pnpm dlx supabase@<pin>`, which downloads and caches the right one.
7051
+ * Members are expected to have pnpm (both product repos pin it);
7052
+ * 4. `npx --yes supabase@<pin>`, only when pnpm is not on PATH.
7038
7053
  *
7039
7054
  * The pin is also part of the generated-types hash, so a contributor on a
7040
7055
  * different CLI would generate different types than CI; matching it is not
@@ -7063,6 +7078,13 @@ async function resolveSupabaseCli(root, pin, run, fileExists = existsSync) {
7063
7078
  const result = await run(candidate.command, ["--version"], { cwd: root });
7064
7079
  if (result.code === 0 && versionOf(result.stdout) === pin) return candidate;
7065
7080
  } catch {}
7081
+ try {
7082
+ if ((await run("pnpm", ["--version"], { cwd: root })).code === 0) return {
7083
+ command: "pnpm",
7084
+ prefix: ["dlx", `supabase@${pin}`],
7085
+ source: "pnpm"
7086
+ };
7087
+ } catch {}
7066
7088
  return {
7067
7089
  command: "npx",
7068
7090
  prefix: ["--yes", `supabase@${pin}`],
@@ -8051,7 +8073,7 @@ async function runDoctor(product, deps) {
8051
8073
  const info = (message) => void lines.push(`INFO ${message}`);
8052
8074
  ok(`${product.config.name} (${product.config.product}), Supabase CLI pinned at ${product.config.supabase.version}`);
8053
8075
  const cli = await cliFor(product, deps);
8054
- if (cli.source === "npx") info(`The pinned Supabase CLI is fetched with npx on first use (${cliLine(cli, ["--version"])}).`);
8076
+ if (cli.source === "pnpm" || cli.source === "npx") info(`The pinned Supabase CLI is fetched with ${cli.command} on first use (${cliLine(cli, ["--version"])}).`);
8055
8077
  else ok(`Supabase CLI ${product.config.supabase.version} (${cli.source})`);
8056
8078
  const docker = await deps.run("docker", [
8057
8079
  "info",
package/dist/launch.js CHANGED
@@ -183,7 +183,7 @@ async function startStack() {
183
183
  * post-tier-resolution path.
184
184
  */
185
185
  async function dispatch(argv) {
186
- const { main } = await import("./cli-D98LfCHU.js");
186
+ const { main } = await import("./cli-DNZ-6WEI.js");
187
187
  try {
188
188
  await main(argv);
189
189
  } catch (err) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@devdogsuga/devtools",
3
- "version": "0.1.51-next.544",
3
+ "version": "0.1.51-next.545",
4
4
  "private": false,
5
5
  "type": "module",
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.",
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 devtools` in a product repo, `pnpm dlx @devdogsuga/devtools` (or the `devtools` bin once installed) from inside a clone.",
7
7
  "license": "BSD-3-Clause",
8
8
  "repository": {
9
9
  "type": "git",
@@ -47,8 +47,8 @@
47
47
  "tsdown": "^0.23.0",
48
48
  "vitest": "^4.1.11",
49
49
  "@devdogsuga/cli-core": "0.0.0",
50
- "@devdogsuga/sdk": "0.1.0",
51
- "@devdogsuga/config": "0.1.4-next.526"
50
+ "@devdogsuga/config": "0.1.4-next.526",
51
+ "@devdogsuga/sdk": "0.1.0"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "tsdown && node scripts/write-build-info.mjs && node ../../scripts/check-bundle-imports.mjs",