@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/README.md +81 -7
- package/bin/with-env.mjs +17 -0
- package/dist/app-registry-BoAnenqC.js +38 -0
- package/dist/{cli-t3gWyy3w.js → cli-BEFBVH8e.js} +2286 -718
- package/dist/launch.js +19 -10
- package/dist/load-Cp8AMERM.js +640 -0
- package/dist/load-Czhayrsk.js +2 -0
- package/dist/{menu-DYQ-Dd-O.js → menu-CJC7OElU.js} +473 -178
- package/dist/{failure-log-DOt6E3hS.js → root-CsocfxnK.js} +104 -5
- package/dist/session-CmDxHEMn.js +2 -0
- package/dist/session-rbONwFvY.js +431 -0
- package/dist/{stack-C_50FafG.js → stack-7Lbym6Wq.js} +2 -3
- package/dist/stack-7qA2UP9g.js +2 -0
- package/dist/supabase-project-BoJKMCxL.js +766 -0
- package/dist/{telemetry-C07-ioHm.js → telemetry-BKFDtzXI.js} +8 -9
- package/dist/telemetry.js +1 -1
- package/dist/with-env.js +370 -0
- package/dist/worker-env-CAFmquhW.js +36 -0
- package/dist/wrangler-env-BrlNe4pm.js +34 -0
- package/env.ts +1 -1
- package/package.json +11 -20
- package/dist/local-env-BuHU5Ckd.js +0 -357
- package/dist/local-env-MqH18s-N.js +0 -2
- package/dist/peers-DvUH5VxX.js +0 -354
- package/dist/root-CjPWNkBu.js +0 -99
- package/dist/stack-o1Kml3V0.js +0 -2
- package/dist/supabase-project-C93xRFkN.js +0 -436
package/dist/launch.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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);
|