@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/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-D4LUUxUR.js} +2286 -718
- package/dist/launch.js +23 -11
- package/dist/load-Cp8AMERM.js +640 -0
- package/dist/load-Czhayrsk.js +2 -0
- package/dist/{menu-DYQ-Dd-O.js → menu-DjE4EZKO.js} +475 -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-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
|
|
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
|
|
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-
|
|
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-
|
|
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);
|