@devdogsuga/devtools 0.1.37 → 0.1.39
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/LICENSE +28 -0
- package/dist/{cli-DvADNoml.js → cli-CeCAuSJd.js} +3 -3
- package/dist/launch.js +38 -14
- package/dist/{menu-C7gh8v-s.js → menu-Craj11Sn.js} +1 -1
- package/dist/{stack-BGhuPk4Z.js → stack-7PuRcaI2.js} +1 -1
- package/dist/stack-B5UHASY2.js +2 -0
- package/dist/{supabase-project-B7JMicl-.js → supabase-project-Bw8sBFcE.js} +3 -1
- package/env.ts +10 -0
- package/package.json +7 -7
- package/dist/stack-CKiRU68w.js +0 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DevDogs at UGA contributors
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as cliName, d as positionals, u as flagValue } from "./failure-log-B5GG_8T1.js";
|
|
2
|
-
import { C as helpPath, S as catalog, T as renderHelp, _ as bail, a as recordEnteredTier, b as explainError, c as describeEnvironment, d as resolveDbConnection, f as sessionIsLocal, i as beginInvocation, l as probeEnvironment, n as bareGroupStartPath, o as recordResolved, p as sessionLabel, r as runMenu, s as reproducibleCommand, t as bareGroupStartFlags, u as nonEmpty, v as errorMessage, w as renderCommandList, x as unwrap, y as explain } from "./menu-
|
|
3
|
-
import { _ as dryRunKind, c as reportRuns, f as supabase, g as runInGroup, h as reportRan, l as run$1, s as dbPush, u as runWithStderr, v as isDryRun, x as wouldRunLine } from "./supabase-project-
|
|
2
|
+
import { C as helpPath, S as catalog, T as renderHelp, _ as bail, a as recordEnteredTier, b as explainError, c as describeEnvironment, d as resolveDbConnection, f as sessionIsLocal, i as beginInvocation, l as probeEnvironment, n as bareGroupStartPath, o as recordResolved, p as sessionLabel, r as runMenu, s as reproducibleCommand, t as bareGroupStartFlags, u as nonEmpty, v as errorMessage, w as renderCommandList, x as unwrap, y as explain } from "./menu-Craj11Sn.js";
|
|
3
|
+
import { _ as dryRunKind, c as reportRuns, f as supabase, g as runInGroup, h as reportRan, l as run$1, s as dbPush, u as runWithStderr, v as isDryRun, x as wouldRunLine } from "./supabase-project-Bw8sBFcE.js";
|
|
4
4
|
import { a as ownVersion, n as discoverRepoRoot, r as findRepoRoot } from "./root-C2OmZDwD.js";
|
|
5
5
|
import { i as loadEnvSession, n as loadEnv, r as loadEnvLoad, t as getEnvSync } from "./peers-RBplwovA.js";
|
|
6
6
|
import { d as hasYes, f as isNonInteractive, n as captureDevtoolsError, o as initDevtoolsTelemetry, r as devtoolsEnvironment, t as captureDevtoolsDeprecation } from "./telemetry-Do13RFhc.js";
|
|
7
7
|
import { n as assertRegistryLoaded, r as loadRegistry, t as scopedProcessEnv } from "./local-env-hH4encfD.js";
|
|
8
|
-
import { t as runStackCommand } from "./stack-
|
|
8
|
+
import { t as runStackCommand } from "./stack-7PuRcaI2.js";
|
|
9
9
|
import { cancel, confirm, intro, isCancel, log, multiselect, note, outro, password, select, spinner, text } from "@clack/prompts";
|
|
10
10
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
11
11
|
import { chmod, readFile, writeFile } from "node:fs/promises";
|
package/dist/launch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as cliName, t as installFailureLog } from "./failure-log-B5GG_8T1.js";
|
|
2
|
-
import { C as helpPath, S as catalog, g as setMenuEnvHook, h as realEnvEntryDeps, m as enterSessionEnvironment, n as bareGroupStartPath, u as nonEmpty, v as errorMessage, x as unwrap } from "./menu-
|
|
3
|
-
import { b as setDryRun, m as formatCommand, v as isDryRun, y as resolveDryRun } from "./supabase-project-
|
|
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-Craj11Sn.js";
|
|
3
|
+
import { b as setDryRun, m as formatCommand, v as isDryRun, y as resolveDryRun } from "./supabase-project-Bw8sBFcE.js";
|
|
4
4
|
import { n as discoverRepoRoot, r as findRepoRoot, t as RepoNotFoundError } from "./root-C2OmZDwD.js";
|
|
5
5
|
import { i as loadEnvSession, r as loadEnvLoad } from "./peers-RBplwovA.js";
|
|
6
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-Do13RFhc.js";
|
|
@@ -155,7 +155,7 @@ function skipsEnvEntry(rest) {
|
|
|
155
155
|
/** The offer's stack start (`env-entry.ts` holds the TTY prompt, this holds
|
|
156
156
|
* the lifecycle command), imported lazily like the rest of the commands. */
|
|
157
157
|
async function startStack() {
|
|
158
|
-
const { runStackCommand } = await import("./stack-
|
|
158
|
+
const { runStackCommand } = await import("./stack-B5UHASY2.js");
|
|
159
159
|
return runStackCommand("start");
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
@@ -166,7 +166,7 @@ async function startStack() {
|
|
|
166
166
|
* post-tier-resolution path.
|
|
167
167
|
*/
|
|
168
168
|
async function dispatch(argv) {
|
|
169
|
-
const { main } = await import("./cli-
|
|
169
|
+
const { main } = await import("./cli-CeCAuSJd.js");
|
|
170
170
|
try {
|
|
171
171
|
await main(argv);
|
|
172
172
|
} catch (err) {
|
|
@@ -197,6 +197,27 @@ async function gated(tier, commandArgv, proceed, blocked) {
|
|
|
197
197
|
return proceed();
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
+
* The session resolution from before `askSession` existed, for a repo whose
|
|
201
|
+
* `@devdogsuga/env` does not have it yet: the development database is asked
|
|
202
|
+
* about every time and never remembered.
|
|
203
|
+
*/
|
|
204
|
+
async function resolveAskingEveryTime(envSession, envLoad, opts) {
|
|
205
|
+
const deployEnv = process.env.DEPLOY_ENV ?? "";
|
|
206
|
+
const remoteCandidate = (process.env.DEV_DB ?? "") === "" && (opts.explicit === "development" || opts.explicit === void 0 && (deployEnv === "" || deployEnv === "development")) ? await envSession.developmentRemoteCandidate(opts.root) : void 0;
|
|
207
|
+
const localStackOnline = typeof remoteCandidate === "string" ? await envLoad.probeLocalStack() : void 0;
|
|
208
|
+
return envSession.resolveSessionTier({
|
|
209
|
+
explicit: opts.explicit,
|
|
210
|
+
deployEnv: process.env.DEPLOY_ENV,
|
|
211
|
+
devDb: process.env.DEV_DB,
|
|
212
|
+
available: opts.available,
|
|
213
|
+
isTTY: process.stdin.isTTY === true,
|
|
214
|
+
prompt: promptTier,
|
|
215
|
+
promptMessage: "Which environment should this session use?",
|
|
216
|
+
remoteCandidate,
|
|
217
|
+
localStackOnline
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
200
221
|
* Resolves the session's deploy tier, enters it (or defers entry to the
|
|
201
222
|
* menu — see this file's header), and hands off to `cli.ts`.
|
|
202
223
|
*
|
|
@@ -238,19 +259,22 @@ async function launch(argv) {
|
|
|
238
259
|
process.stderr.write("devtools: no tier named. With no terminal (or CI=true) the tier must be explicit: pass --tier <development:local|development:remote|staging|production> or set DEPLOY_ENV.\n");
|
|
239
260
|
process.exit(1);
|
|
240
261
|
}
|
|
241
|
-
const
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
|
|
262
|
+
const repoRoot = findRepoRoot();
|
|
263
|
+
const available = noEnv ? [] : await envSession.availableTiers(repoRoot);
|
|
264
|
+
const resolution = noEnv ? resolveWithoutEnv(envSession, explicit) : typeof envSession.askSession === "function" ? await envSession.askSession({
|
|
265
|
+
root: repoRoot,
|
|
245
266
|
explicit,
|
|
246
267
|
deployEnv: process.env.DEPLOY_ENV,
|
|
247
268
|
devDb: process.env.DEV_DB,
|
|
248
|
-
available
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
269
|
+
available,
|
|
270
|
+
canAsk: !isNonInteractive(),
|
|
271
|
+
unanswered: "refuse",
|
|
272
|
+
name: "devtools",
|
|
273
|
+
onCancel: () => bail()
|
|
274
|
+
}) : await resolveAskingEveryTime(envSession, envLoad, {
|
|
275
|
+
root: repoRoot,
|
|
276
|
+
explicit,
|
|
277
|
+
available
|
|
254
278
|
});
|
|
255
279
|
if (!resolution.ok) {
|
|
256
280
|
process.stderr.write(`devtools: ${resolution.reason}\n`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as YES, d as positionals, i as suppressFailureLog, l as createCatalog, o as JSON_FLAG, s as SCOPES } from "./failure-log-B5GG_8T1.js";
|
|
2
|
-
import { a as listContainerNames, i as foreignStackProjectId, n as containerPrefix, o as readProjectId, p as supabaseCapture, r as foreignStackMessage, t as STACK_API_PORT } from "./supabase-project-
|
|
2
|
+
import { a as listContainerNames, i as foreignStackProjectId, n as containerPrefix, o as readProjectId, p as supabaseCapture, r as foreignStackMessage, t as STACK_API_PORT } from "./supabase-project-Bw8sBFcE.js";
|
|
3
3
|
import { r as findRepoRoot } from "./root-C2OmZDwD.js";
|
|
4
4
|
import { n as loadEnv, r as loadEnvLoad } from "./peers-RBplwovA.js";
|
|
5
5
|
import { c as reportDevtoolsError, f as isNonInteractive } from "./telemetry-Do13RFhc.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as listContainerNames, d as seedBuckets, f as supabase, i as foreignStackProjectId, o as readProjectId, p as supabaseCapture, r as foreignStackMessage, t as STACK_API_PORT, v as isDryRun } from "./supabase-project-
|
|
1
|
+
import { a as listContainerNames, d as seedBuckets, f as supabase, i as foreignStackProjectId, o as readProjectId, p as supabaseCapture, r as foreignStackMessage, t as STACK_API_PORT, v as isDryRun } from "./supabase-project-Bw8sBFcE.js";
|
|
2
2
|
import { r as findRepoRoot } from "./root-C2OmZDwD.js";
|
|
3
3
|
import { i as loadEnvSession, r as loadEnvLoad } from "./peers-RBplwovA.js";
|
|
4
4
|
import { writeFile } from "node:fs/promises";
|
|
@@ -279,7 +279,8 @@ const supabaseCapture = (...args) => capture([
|
|
|
279
279
|
* The one spelling of the migration push, shared by the contributor `db
|
|
280
280
|
* migrate` path (`stack.ts`'s `pushMigrations`) and CI's `deploy migrate`.
|
|
281
281
|
* `--yes` is the unattended apply CI wants; the contributor path omits it so a
|
|
282
|
-
* human still confirms.
|
|
282
|
+
* human still confirms. `includeSeed` adds the `[db.seed]` files, which the
|
|
283
|
+
* CLI runs once each and records in `supabase_migrations.seed_files`. Neither variant regenerates types — that is
|
|
283
284
|
* `pushMigrations`' own second step, layered on top only where a checkout is
|
|
284
285
|
* meant to be rewritten. A CI apply must NOT write back into the repo, which is
|
|
285
286
|
* exactly why the bare push is factored out here rather than reused whole.
|
|
@@ -291,6 +292,7 @@ function dbPush(dbUrl, opts = {}) {
|
|
|
291
292
|
"--db-url",
|
|
292
293
|
dbUrl
|
|
293
294
|
];
|
|
295
|
+
if (opts.includeSeed) args.push("--include-seed");
|
|
294
296
|
if (opts.yes) args.push("--yes");
|
|
295
297
|
return supabase(...args);
|
|
296
298
|
}
|
package/env.ts
CHANGED
|
@@ -148,6 +148,16 @@ declare({
|
|
|
148
148
|
scope: "developer",
|
|
149
149
|
secrecy: "public",
|
|
150
150
|
}),
|
|
151
|
+
DEV_DB: define(z.enum(["local", "remote"]).optional(), {
|
|
152
|
+
doc:
|
|
153
|
+
"Which development database this machine uses when .env names a " +
|
|
154
|
+
"remote DB_URL: local (the Docker stack) or remote (that DB_URL). " +
|
|
155
|
+
"Written by the first-run question in with-env and devtools when " +
|
|
156
|
+
'you choose "Remember my decision"; delete it to be asked again. ' +
|
|
157
|
+
"An exported DEV_DB, or --tier development:local|remote, wins.",
|
|
158
|
+
scope: "developer",
|
|
159
|
+
secrecy: "public",
|
|
160
|
+
}),
|
|
151
161
|
SKIP_ENV_VALIDATION: define(z.string().optional(), {
|
|
152
162
|
doc:
|
|
153
163
|
"Any non-empty value skips env-schema validation, for builds that " +
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devdogsuga/devtools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Contributor CLI for a DevDogsUGA checkout: the real tools with the session's tier filled in, a menu over them, and the checks CI runs. Ships built JS; run via `pnpm dlx @devdogsuga/devtools` (or the `devtools` bin once installed) from inside a DevDogsUGA clone.",
|
|
7
|
-
"license": "
|
|
7
|
+
"license": "BSD-3-Clause",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/DevDogsUGA/Backstage.git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"tsx": "^4.23.12",
|
|
32
32
|
"typescript": "^6.0.3",
|
|
33
33
|
"zod": "4.4.3",
|
|
34
|
-
"@devdogsuga/telemetry": "0.1.
|
|
34
|
+
"@devdogsuga/telemetry": "0.1.5"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@devdogsuga/db": "*",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"eslint": "^9.39.5",
|
|
52
52
|
"tsdown": "^0.23.0",
|
|
53
53
|
"vitest": "^4.1.11",
|
|
54
|
-
"@devdogsuga/
|
|
55
|
-
"@devdogsuga/
|
|
56
|
-
"@devdogsuga/
|
|
57
|
-
"@devdogsuga/
|
|
54
|
+
"@devdogsuga/db": "0.1.4",
|
|
55
|
+
"@devdogsuga/env": "0.1.5",
|
|
56
|
+
"@devdogsuga/config": "0.1.3",
|
|
57
|
+
"@devdogsuga/cli-core": "0.0.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsdown && node scripts/write-build-info.mjs && node ../../scripts/check-bundle-imports.mjs",
|
package/dist/stack-CKiRU68w.js
DELETED