@devdogsuga/devtools 0.1.50 → 0.1.51-next.527

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/launch.js CHANGED
@@ -1,9 +1,7 @@
1
- import { a as cliName, t as installFailureLog } from "./failure-log-DOt6E3hS.js";
2
- import { C as helpPath, S as catalog, _ as bail, g as setMenuEnvHook, h as realEnvEntryDeps, m as enterSessionEnvironment, n as bareGroupStartPath, u as nonEmpty, v as errorMessage, x as unwrap } from "./menu-DYQ-Dd-O.js";
3
- import { b as resolveDryRun, h as formatCommand, x as setDryRun, y as isDryRun } from "./supabase-project-C93xRFkN.js";
4
- import { n as discoverRepoRoot, r as findRepoRoot, t as RepoNotFoundError } from "./root-CjPWNkBu.js";
5
- import { i as loadEnvSession, r as loadEnvLoad } from "./peers-DvUH5VxX.js";
6
- import { d as hasYes, f as isNonInteractive, m as stripTierFlag, n as captureDevtoolsError, o as initDevtoolsTelemetry, p as stripNoEnvFlag, s as lastSentryEventId } from "./telemetry-C07-ioHm.js";
1
+ import { i as installFailureLog, n as discoverRepoRoot, r as findRepoRoot, t as RepoNotFoundError, u as cliName } from "./root-CsocfxnK.js";
2
+ import { D as setProductMode, O as catalog, _ as bail, g as setMenuEnvHook, h as realEnvEntryDeps, k as helpPath, m as enterSessionEnvironment, n as bareGroupStartPath, u as nonEmpty, v as errorMessage, w as findProductRoot, x as unwrap } from "./menu-DjE4EZKO.js";
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
+ 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";
7
5
  import { confirm, select } from "@clack/prompts";
8
6
  //#region ../cli-core/src/session.ts
9
7
  /**
@@ -126,6 +124,14 @@ function ignoreClosedPipes() {
126
124
  }
127
125
  //#endregion
128
126
  //#region src/launch.ts
127
+ /** The catalog node `rest` dispatches to. */
128
+ function declaredCommand(rest) {
129
+ const path = helpPath(rest);
130
+ for (let length = path.length; length > 0; length -= 1) {
131
+ const node = catalog.findCommand(path.slice(0, length));
132
+ if (node) return node;
133
+ }
134
+ }
129
135
  /**
130
136
  * Whether the command `rest` dispatches to is declared `envFree` in
131
137
  * the command catalog — the leading run of non-flag tokens is the
@@ -141,7 +147,7 @@ function ignoreClosedPipes() {
141
147
  * remember to add here too.
142
148
  */
143
149
  function isEnvFreeCommand(rest) {
144
- return catalog.findCommand(helpPath(rest))?.envFree === true;
150
+ return declaredCommand(rest)?.envFree === true;
145
151
  }
146
152
  /**
147
153
  * Whether the command reads nothing but the checkout, so the session behaves
@@ -150,12 +156,12 @@ function isEnvFreeCommand(rest) {
150
156
  * runner that has no `.env` at all.
151
157
  */
152
158
  function skipsEnvEntry(rest) {
153
- return catalog.findCommand(helpPath(rest))?.noEnv === true;
159
+ return declaredCommand(rest)?.noEnv === true;
154
160
  }
155
161
  /** The offer's stack start (`env-entry.ts` holds the TTY prompt, this holds
156
162
  * the lifecycle command), imported lazily like the rest of the commands. */
157
163
  async function startStack() {
158
- const { runStackCommand } = await import("./stack-o1Kml3V0.js");
164
+ const { runStackCommand } = await import("./stack-7qA2UP9g.js");
159
165
  return runStackCommand("start");
160
166
  }
161
167
  /**
@@ -166,7 +172,7 @@ async function startStack() {
166
172
  * post-tier-resolution path.
167
173
  */
168
174
  async function dispatch(argv) {
169
- const { main } = await import("./cli-t3gWyy3w.js");
175
+ const { main } = await import("./cli-D4LUUxUR.js");
170
176
  try {
171
177
  await main(argv);
172
178
  } catch (err) {
@@ -198,7 +204,7 @@ async function gated(tier, commandArgv, proceed, blocked) {
198
204
  }
199
205
  /**
200
206
  * The session resolution from before `askSession` existed, for a repo whose
201
- * `@devdogsuga/env` does not have it yet: the development database is asked
207
+ * `@devdogsuga/sdk/env` does not have it yet: the development database is asked
202
208
  * about every time and never remembered.
203
209
  */
204
210
  async function resolveAskingEveryTime(envSession, envLoad, opts) {
@@ -236,6 +242,12 @@ async function launch(argv) {
236
242
  });
237
243
  ignoreClosedPipes();
238
244
  initDevtoolsTelemetry(rest[0] ?? "menu");
245
+ if (findProductRoot() !== null) {
246
+ setProductMode(true);
247
+ process.env.DEPLOY_ENV = "development";
248
+ await dispatch(rest);
249
+ return;
250
+ }
239
251
  const isMenuInvocation = rest.length === 0 || process.stdin.isTTY === true && bareGroupStartPath(catalog, rest) !== null;
240
252
  if (rest.includes("--help") || rest.includes("-h")) {
241
253
  await dispatch(rest);