@devdogsuga/devtools 0.1.50 → 0.1.51-next.526

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-CJC7OElU.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
  /**
@@ -141,7 +139,12 @@ function ignoreClosedPipes() {
141
139
  * remember to add here too.
142
140
  */
143
141
  function isEnvFreeCommand(rest) {
144
- return catalog.findCommand(helpPath(rest))?.envFree === true;
142
+ const path = helpPath(rest);
143
+ for (let length = path.length; length > 0; length -= 1) {
144
+ const node = catalog.findCommand(path.slice(0, length));
145
+ if (node) return node.envFree === true;
146
+ }
147
+ return false;
145
148
  }
146
149
  /**
147
150
  * Whether the command reads nothing but the checkout, so the session behaves
@@ -155,7 +158,7 @@ function skipsEnvEntry(rest) {
155
158
  /** The offer's stack start (`env-entry.ts` holds the TTY prompt, this holds
156
159
  * the lifecycle command), imported lazily like the rest of the commands. */
157
160
  async function startStack() {
158
- const { runStackCommand } = await import("./stack-o1Kml3V0.js");
161
+ const { runStackCommand } = await import("./stack-7qA2UP9g.js");
159
162
  return runStackCommand("start");
160
163
  }
161
164
  /**
@@ -166,7 +169,7 @@ async function startStack() {
166
169
  * post-tier-resolution path.
167
170
  */
168
171
  async function dispatch(argv) {
169
- const { main } = await import("./cli-t3gWyy3w.js");
172
+ const { main } = await import("./cli-BEFBVH8e.js");
170
173
  try {
171
174
  await main(argv);
172
175
  } catch (err) {
@@ -198,7 +201,7 @@ async function gated(tier, commandArgv, proceed, blocked) {
198
201
  }
199
202
  /**
200
203
  * The session resolution from before `askSession` existed, for a repo whose
201
- * `@devdogsuga/env` does not have it yet: the development database is asked
204
+ * `@devdogsuga/sdk/env` does not have it yet: the development database is asked
202
205
  * about every time and never remembered.
203
206
  */
204
207
  async function resolveAskingEveryTime(envSession, envLoad, opts) {
@@ -236,6 +239,12 @@ async function launch(argv) {
236
239
  });
237
240
  ignoreClosedPipes();
238
241
  initDevtoolsTelemetry(rest[0] ?? "menu");
242
+ if (findProductRoot() !== null) {
243
+ setProductMode(true);
244
+ process.env.DEPLOY_ENV = "development";
245
+ await dispatch(rest);
246
+ return;
247
+ }
239
248
  const isMenuInvocation = rest.length === 0 || process.stdin.isTTY === true && bareGroupStartPath(catalog, rest) !== null;
240
249
  if (rest.includes("--help") || rest.includes("-h")) {
241
250
  await dispatch(rest);