@devdogsuga/devtools 0.1.25 → 0.1.27
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 +72 -11
- package/bin/devtools.mjs +4 -4
- package/dist/cli-CZKkNHK5.js +6619 -0
- package/dist/failure-log-BBPGejQv.js +256 -0
- package/dist/launch.js +267 -281
- package/dist/local-env-D8HC2JK_.js +351 -0
- package/dist/local-env-DrBCXqD8.js +2 -0
- package/dist/menu-CQBsQRgH.js +1684 -0
- package/dist/peer-redirect-hooks.js +15 -0
- package/dist/peers-RBplwovA.js +229 -0
- package/dist/root-C2OmZDwD.js +94 -0
- package/dist/stack-Bx-55oi_.js +2 -0
- package/dist/stack-BynCgRVS.js +181 -0
- package/dist/supabase-project-0knM0mqd.js +426 -0
- package/dist/telemetry-C4foD8MD.js +249 -0
- package/dist/telemetry.js +2 -148
- package/package.json +10 -29
- package/bin/devtools-ci-bare.mjs +0 -48
- package/bin/devtools-ci.mjs +0 -31
- package/dist/args.d.ts +0 -26
- package/dist/args.js +0 -78
- package/dist/bws/bw.d.ts +0 -18
- package/dist/bws/bw.js +0 -70
- package/dist/bws/client.d.ts +0 -43
- package/dist/bws/client.js +0 -363
- package/dist/bws/environments.d.ts +0 -96
- package/dist/bws/environments.js +0 -111
- package/dist/bws/pace.d.ts +0 -25
- package/dist/bws/pace.js +0 -43
- package/dist/bws/retry.d.ts +0 -12
- package/dist/bws/retry.js +0 -39
- package/dist/bws/store.d.ts +0 -1
- package/dist/bws/store.js +0 -32
- package/dist/bws/token.d.ts +0 -31
- package/dist/bws/token.js +0 -88
- package/dist/bws/vault.d.ts +0 -29
- package/dist/bws/vault.js +0 -200
- package/dist/catalog.d.ts +0 -57
- package/dist/catalog.js +0 -57
- package/dist/cf/build.d.ts +0 -13
- package/dist/cf/build.js +0 -65
- package/dist/cf/commands.d.ts +0 -1
- package/dist/cf/commands.js +0 -172
- package/dist/cf/local-env.d.ts +0 -58
- package/dist/cf/local-env.js +0 -177
- package/dist/ci.d.ts +0 -1
- package/dist/ci.js +0 -328
- package/dist/cli.d.ts +0 -11
- package/dist/cli.js +0 -1094
- package/dist/commands.d.ts +0 -261
- package/dist/commands.js +0 -1318
- package/dist/completions.d.ts +0 -4
- package/dist/completions.js +0 -110
- package/dist/cron/commands.d.ts +0 -47
- package/dist/cron/commands.js +0 -372
- package/dist/cron/discovery.d.ts +0 -55
- package/dist/cron/discovery.js +0 -85
- package/dist/cron/schema.d.ts +0 -45
- package/dist/cron/schema.js +0 -35
- package/dist/db/config-push.d.ts +0 -8
- package/dist/db/config-push.js +0 -11
- package/dist/db/connection.d.ts +0 -79
- package/dist/db/connection.js +0 -114
- package/dist/db/exec.d.ts +0 -1
- package/dist/db/exec.js +0 -11
- package/dist/db/generate-types.d.ts +0 -1
- package/dist/db/generate-types.js +0 -4
- package/dist/db/generated-env.d.ts +0 -69
- package/dist/db/generated-env.js +0 -113
- package/dist/db/introspect.d.ts +0 -1
- package/dist/db/introspect.js +0 -122
- package/dist/db/local-env.d.ts +0 -65
- package/dist/db/local-env.js +0 -23
- package/dist/db/new-migration.d.ts +0 -8
- package/dist/db/new-migration.js +0 -69
- package/dist/db/pooler.d.ts +0 -23
- package/dist/db/pooler.js +0 -55
- package/dist/db/run.d.ts +0 -68
- package/dist/db/run.js +0 -156
- package/dist/db/seed-buckets.d.ts +0 -2
- package/dist/db/seed-buckets.js +0 -4
- package/dist/db/seed-production.d.ts +0 -8
- package/dist/db/seed-production.js +0 -79
- package/dist/db/seed-roles.d.ts +0 -7
- package/dist/db/seed-roles.js +0 -33
- package/dist/db/session-refresh.d.ts +0 -43
- package/dist/db/session-refresh.js +0 -40
- package/dist/deploy/migrations.d.ts +0 -20
- package/dist/deploy/migrations.js +0 -68
- package/dist/deploy/orphans.d.ts +0 -20
- package/dist/deploy/orphans.js +0 -177
- package/dist/deploy/preflight.d.ts +0 -53
- package/dist/deploy/preflight.js +0 -189
- package/dist/deploy/report.d.ts +0 -26
- package/dist/deploy/report.js +0 -70
- package/dist/deploy/require-planner.d.ts +0 -2
- package/dist/deploy/require-planner.js +0 -60
- package/dist/deploy/require-token.d.ts +0 -15
- package/dist/deploy/require-token.js +0 -78
- package/dist/deploy/secrets-file.d.ts +0 -17
- package/dist/deploy/secrets-file.js +0 -166
- package/dist/deploy/write-env.d.ts +0 -40
- package/dist/deploy/write-env.js +0 -395
- package/dist/docs/index-pages.d.ts +0 -38
- package/dist/docs/index-pages.js +0 -186
- package/dist/emails/commands.d.ts +0 -15
- package/dist/emails/commands.js +0 -130
- package/dist/emails/email-types.d.ts +0 -13
- package/dist/emails/email-types.js +0 -1
- package/dist/emails/fixtures.d.ts +0 -20
- package/dist/emails/fixtures.js +0 -20
- package/dist/env/audit.d.ts +0 -206
- package/dist/env/audit.js +0 -436
- package/dist/env/cloudflare.d.ts +0 -21
- package/dist/env/cloudflare.js +0 -61
- package/dist/env/commands.d.ts +0 -99
- package/dist/env/commands.js +0 -613
- package/dist/env/discovery.d.ts +0 -15
- package/dist/env/discovery.js +0 -239
- package/dist/env/document.d.ts +0 -119
- package/dist/env/document.js +0 -323
- package/dist/env/example.d.ts +0 -68
- package/dist/env/example.js +0 -605
- package/dist/env/selection.d.ts +0 -105
- package/dist/env/selection.js +0 -228
- package/dist/env-entry.d.ts +0 -49
- package/dist/env-entry.js +0 -204
- package/dist/environment-doctor.d.ts +0 -45
- package/dist/environment-doctor.js +0 -429
- package/dist/environment.d.ts +0 -92
- package/dist/environment.js +0 -185
- package/dist/fingerprint.d.ts +0 -10
- package/dist/fingerprint.js +0 -18
- package/dist/gen/campus-map.d.ts +0 -1
- package/dist/gen/campus-map.js +0 -473
- package/dist/gen/commands.d.ts +0 -1
- package/dist/gen/commands.js +0 -25
- package/dist/gen/hypno.d.ts +0 -1
- package/dist/gen/hypno.js +0 -134
- package/dist/gh/client.d.ts +0 -80
- package/dist/gh/client.js +0 -259
- package/dist/gh/environments.d.ts +0 -83
- package/dist/gh/environments.js +0 -178
- package/dist/gh/rulesets/actors.d.ts +0 -14
- package/dist/gh/rulesets/actors.js +0 -69
- package/dist/gh/rulesets/api.d.ts +0 -15
- package/dist/gh/rulesets/api.js +0 -104
- package/dist/gh/rulesets/commands.d.ts +0 -3
- package/dist/gh/rulesets/commands.js +0 -203
- package/dist/gh/rulesets/desired.d.ts +0 -112
- package/dist/gh/rulesets/desired.js +0 -271
- package/dist/gh/rulesets/diff.d.ts +0 -65
- package/dist/gh/rulesets/diff.js +0 -170
- package/dist/gh/rulesets/types.d.ts +0 -76
- package/dist/gh/rulesets/types.js +0 -13
- package/dist/gh/settings/api.d.ts +0 -40
- package/dist/gh/settings/api.js +0 -180
- package/dist/gh/settings/commands.d.ts +0 -1
- package/dist/gh/settings/commands.js +0 -254
- package/dist/gh/settings/desired.d.ts +0 -53
- package/dist/gh/settings/desired.js +0 -43
- package/dist/gh/settings/diff.d.ts +0 -57
- package/dist/gh/settings/diff.js +0 -161
- package/dist/gh/settings/types.d.ts +0 -92
- package/dist/gh/settings/types.js +0 -11
- package/dist/gh/settings/workflows.d.ts +0 -41
- package/dist/gh/settings/workflows.js +0 -128
- package/dist/grantRoot.d.ts +0 -42
- package/dist/grantRoot.js +0 -89
- package/dist/help.d.ts +0 -18
- package/dist/help.js +0 -169
- package/dist/images/commands.d.ts +0 -32
- package/dist/images/commands.js +0 -231
- package/dist/images/events.d.ts +0 -47
- package/dist/images/events.js +0 -116
- package/dist/images/graphics.d.ts +0 -70
- package/dist/images/graphics.js +0 -234
- package/dist/images/open-graph-types.d.ts +0 -75
- package/dist/images/open-graph-types.js +0 -1
- package/dist/images/prompts.d.ts +0 -34
- package/dist/images/prompts.js +0 -100
- package/dist/images/render.d.ts +0 -21
- package/dist/images/render.js +0 -61
- package/dist/images/select.d.ts +0 -64
- package/dist/images/select.js +0 -96
- package/dist/instance.d.ts +0 -69
- package/dist/instance.js +0 -102
- package/dist/invocation.d.ts +0 -49
- package/dist/invocation.js +0 -78
- package/dist/launch-ci.d.ts +0 -1
- package/dist/launch-ci.js +0 -90
- package/dist/launch.d.ts +0 -18
- package/dist/menu.d.ts +0 -43
- package/dist/menu.js +0 -300
- package/dist/moderation.d.ts +0 -70
- package/dist/moderation.js +0 -128
- package/dist/oauth/browser.d.ts +0 -1
- package/dist/oauth/browser.js +0 -13
- package/dist/oauth/config.d.ts +0 -24
- package/dist/oauth/config.js +0 -24
- package/dist/oauth/connect-url.d.ts +0 -17
- package/dist/oauth/connect-url.js +0 -23
- package/dist/oauth/db.d.ts +0 -37
- package/dist/oauth/db.js +0 -108
- package/dist/oauth/device.d.ts +0 -93
- package/dist/oauth/device.js +0 -198
- package/dist/oauth/discovery.d.ts +0 -28
- package/dist/oauth/discovery.js +0 -54
- package/dist/oauth/env-file.d.ts +0 -6
- package/dist/oauth/env-file.js +0 -35
- package/dist/oauth/exchange.d.ts +0 -43
- package/dist/oauth/exchange.js +0 -93
- package/dist/oauth/label.d.ts +0 -1
- package/dist/oauth/label.js +0 -25
- package/dist/oauth/loopback.d.ts +0 -52
- package/dist/oauth/loopback.js +0 -168
- package/dist/oauth/pkce.d.ts +0 -6
- package/dist/oauth/pkce.js +0 -34
- package/dist/oauth/target.d.ts +0 -54
- package/dist/oauth/target.js +0 -102
- package/dist/oauth/transport.d.ts +0 -41
- package/dist/oauth/transport.js +0 -32
- package/dist/oauth/wizard.d.ts +0 -40
- package/dist/oauth/wizard.js +0 -578
- package/dist/persona.d.ts +0 -18
- package/dist/persona.js +0 -221
- package/dist/pick.d.ts +0 -6
- package/dist/pick.js +0 -64
- package/dist/pipes.d.ts +0 -1
- package/dist/pipes.js +0 -25
- package/dist/planner/checks.d.ts +0 -26
- package/dist/planner/checks.js +0 -104
- package/dist/planner/commands.d.ts +0 -10
- package/dist/planner/commands.js +0 -367
- package/dist/planner/db.d.ts +0 -15
- package/dist/planner/db.js +0 -33
- package/dist/planner/role.d.ts +0 -33
- package/dist/planner/role.js +0 -68
- package/dist/repo/peer-redirect-hooks.d.ts +0 -16
- package/dist/repo/peer-redirect-hooks.js +0 -10
- package/dist/repo/peer-redirect.d.ts +0 -4
- package/dist/repo/peer-redirect.js +0 -26
- package/dist/repo/peers.d.ts +0 -39
- package/dist/repo/peers.js +0 -139
- package/dist/repo/resolve.d.ts +0 -41
- package/dist/repo/resolve.js +0 -152
- package/dist/repo/root.d.ts +0 -23
- package/dist/repo/root.js +0 -91
- package/dist/repo/source.d.ts +0 -14
- package/dist/repo/source.js +0 -54
- package/dist/repo/supabase-project.d.ts +0 -60
- package/dist/repo/supabase-project.js +0 -124
- package/dist/repo/tsx-loader.d.ts +0 -6
- package/dist/repo/tsx-loader.js +0 -41
- package/dist/run/pick.d.ts +0 -90
- package/dist/run/pick.js +0 -664
- package/dist/setup.d.ts +0 -1
- package/dist/setup.js +0 -280
- package/dist/stack.d.ts +0 -48
- package/dist/stack.js +0 -403
- package/dist/telemetry.d.ts +0 -59
- package/dist/tier.d.ts +0 -40
- package/dist/tier.js +0 -96
- package/dist/ui.d.ts +0 -40
- package/dist/ui.js +0 -71
- package/dist/version.d.ts +0 -7
- package/dist/version.js +0 -17
- package/dist/workers.d.ts +0 -5
- package/dist/workers.js +0 -33
- package/dist/workflows/commands.d.ts +0 -54
- package/dist/workflows/commands.js +0 -763
package/README.md
CHANGED
|
@@ -1,18 +1,67 @@
|
|
|
1
1
|
# @devdogsuga/devtools
|
|
2
2
|
|
|
3
|
-
Contributor CLI for
|
|
4
|
-
|
|
3
|
+
Contributor CLI for a DevDogsUGA checkout: the real tools with the session's
|
|
4
|
+
tier filled in, a menu over them, and the checks CI runs.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
pnpm devtools
|
|
8
|
-
pnpm devtools
|
|
9
|
-
pnpm devtools
|
|
10
|
-
pnpm devtools
|
|
11
|
-
pnpm devtools cron run
|
|
12
|
-
pnpm devtools workflows run
|
|
13
|
-
pnpm devtools workflows serve
|
|
7
|
+
pnpm devtools # no arguments: menu of interactive commands
|
|
8
|
+
pnpm devtools setup # prepare a checkout, then print the database next steps
|
|
9
|
+
pnpm devtools doctor # first stop: machine, tier, stack, types, buckets, seeded data
|
|
10
|
+
pnpm devtools supabase start # boot Supabase on this machine
|
|
11
|
+
pnpm devtools cron run # choose a configured route cron
|
|
12
|
+
pnpm devtools workflows run # choose a configured Cloudflare Workflow
|
|
13
|
+
pnpm devtools workflows serve # keep an app-scoped Wrangler runtime open
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
```bash
|
|
17
|
+
pnpm devtools supabase db push # the real tool, with the tier's --db-url filled in
|
|
18
|
+
pnpm devtools wrangler|drizzle-kit|psql …
|
|
19
|
+
pnpm devtools preset apply-migrations # db push, then asks about types:db
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`supabase` adds `--db-url` or `--project-ref` from the session's tier unless you
|
|
23
|
+
passed `--local`, `--linked`, `--db-url` or `--project-ref` yourself. It never
|
|
24
|
+
falls back to the linked project and never adds `--yes`. Every run prints the
|
|
25
|
+
exact command afterwards.
|
|
26
|
+
|
|
27
|
+
Against `staging` or `production`, every command asks once before it runs
|
|
28
|
+
(`--yes` answers it). With no terminal, or `CI=true`, there is no menu and no
|
|
29
|
+
banner, the tier must be named (`--tier` or `DEPLOY_ENV`), confirmations need
|
|
30
|
+
`--yes`, and `--no-env` skips loading env files.
|
|
31
|
+
|
|
32
|
+
`pnpm devtools script` picks a package and then one of its scripts (or a script
|
|
33
|
+
and then a package that has it) and runs `pnpm -F <package> run <script>`;
|
|
34
|
+
`pnpm devtools script <package> <script>` skips the questions.
|
|
35
|
+
|
|
36
|
+
`--dry-run` prints what would run and runs nothing. A tool call prints as
|
|
37
|
+
`Would run: <command>`; a command that spawns or writes without a dry-run mode
|
|
38
|
+
of its own stops and prints its own command line. For the passthroughs and
|
|
39
|
+
`run`, the tool owns every flag after its name, so put ours first:
|
|
40
|
+
`pnpm devtools --dry-run supabase db push`.
|
|
41
|
+
|
|
42
|
+
When a run fails, devtools writes a log (`~/.local/state/devdogs/logs`, or
|
|
43
|
+
`DEVTOOLS_LOG_DIR`) with the command, versions, the tool commands that ran and
|
|
44
|
+
devtools' own output, secrets redacted, and prints its path and the Sentry
|
|
45
|
+
event id if telemetry sent one. Attach it to a #tech-support message.
|
|
46
|
+
|
|
47
|
+
`check migrations|env|workers|scripts` is what CI runs over the checkout (it
|
|
48
|
+
replaces DevDogsUGA's `packages/repo-checks`). They read the checkout and
|
|
49
|
+
nothing else: no tier, no env file. `pnpm devtools --help --json` prints every
|
|
50
|
+
command path (deprecated ones marked), for tools that check what a page shows.
|
|
51
|
+
|
|
52
|
+
The `db` and `cf` namespaces are gone: `supabase`, `wrangler`, `drizzle-kit`
|
|
53
|
+
and `psql` plus package scripts (`types:db`, `types:drizzle`, `types:cf`,
|
|
54
|
+
`preview`) replace them. `run` stays as a deprecated alias, hidden from the
|
|
55
|
+
menu, for callers that have not moved yet (TASK-404 removes it); `--help` names
|
|
56
|
+
its replacement. The retired `db`, `cf`, `gen`, `emails` and `grant-root` names
|
|
57
|
+
are refused with where they went.
|
|
58
|
+
|
|
59
|
+
What always needs production secrets is not here. `deploy`, `env
|
|
60
|
+
pull|push|audit` and `planner` are in `@devdogsuga/backstage`
|
|
61
|
+
(`pnpm dlx @devdogsuga/backstage …`, no checkout needed to start); `devtools
|
|
62
|
+
env` keeps `init`, `example` and `reset`, and `bw` is gone (backstage's `env`
|
|
63
|
+
signs in to Bitwarden itself). CI calls `backstage` directly.
|
|
64
|
+
|
|
16
65
|
The menu is generated from the same command tree the argv parser walks, so
|
|
17
66
|
there is no second list to fall out of step — reach for `--help` at any level
|
|
18
67
|
rather than a table here.
|
|
@@ -23,13 +72,13 @@ This CLI reports its own crashes to Sentry (see `src/telemetry.ts`), on by
|
|
|
23
72
|
default, in both `pnpm devtools` and `devtools-ci`:
|
|
24
73
|
|
|
25
74
|
- **What**: uncaught errors only — a captured exception plus a `command` tag
|
|
26
|
-
naming the subcommand that threw (e.g. `
|
|
75
|
+
naming the subcommand that threw (e.g. `doctor`, `deploy platform`).
|
|
27
76
|
Nothing about a successful run is ever sent.
|
|
28
77
|
- **When**: every run, unless `DEVTOOLS_TELEMETRY=0` is set (per-machine or
|
|
29
78
|
per-job opt-out) — or the build has no DSN. The DSN is baked in when
|
|
30
79
|
Backstage's `publish.yaml` builds the package, from the repo's
|
|
31
80
|
`DEVTOOLS_SENTRY_DSN` Actions variable, so only published builds report;
|
|
32
|
-
local builds and `pnpm pack
|
|
81
|
+
local builds and `pnpm pack` tarballs don't. Either condition means
|
|
33
82
|
no `Sentry.init()` call happens: no network request, no console output.
|
|
34
83
|
- **What's scrubbed**: this CLI touches local `.env` files, so every event
|
|
35
84
|
passes through
|
|
@@ -39,6 +88,18 @@ default, in both `pnpm devtools` and `devtools-ci`:
|
|
|
39
88
|
stack frames. See Backstage's `packages/telemetry/src/scrub.ts` for exactly what each
|
|
40
89
|
scrubber matches.
|
|
41
90
|
|
|
91
|
+
## Layout
|
|
92
|
+
|
|
93
|
+
`src/` is one folder per domain (kebab-case). A domain declares its commands in
|
|
94
|
+
`catalog.ts` (inert data) and owns its handlers in `commands.ts`; `src/catalog.ts`
|
|
95
|
+
composes the tree and `src/cli.ts` maps top-level command names to handlers. The
|
|
96
|
+
shared core (repo and peer loading, ui, telemetry, tier and env entry, the
|
|
97
|
+
catalog, help and menu) lives in the private `@devdogsuga/cli-core` package,
|
|
98
|
+
which `tsdown` inlines into `dist/`. Only that is bundled: every other
|
|
99
|
+
import stays external and must be declared in this package's `dependencies` or
|
|
100
|
+
`peerDependencies`, and the build fails when one is not
|
|
101
|
+
(`../../scripts/check-bundle-imports.mjs` reads the built output).
|
|
102
|
+
|
|
42
103
|
[Command guide](../../docs/toolkit/guides/devtools.md) ·
|
|
43
104
|
[API reference](https://devdogsuga.org/docs/toolkit/reference/api/devtools) ·
|
|
44
105
|
[Quickstart](../../docs/monorepo/guides/quickstart.md)
|
package/bin/devtools.mjs
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Entry point for the `devtools` bin.
|
|
4
4
|
*
|
|
5
|
-
* Ships built JS (see the package's `build` script —
|
|
6
|
-
*
|
|
5
|
+
* Ships built JS (see the package's `build` script — tsdown bundles `src/` and
|
|
6
|
+
* the private `@devdogsuga/cli-core` into a flat `dist/`) and runs it
|
|
7
|
+
* directly with plain `node`: no `tsx` wrapper, no
|
|
7
8
|
* `--conditions=devdogs-source` flag. Those were needed when devtools lived
|
|
8
9
|
* INSIDE the DevDogsUGA workspace and imported sibling `@devdogsuga/*`
|
|
9
10
|
* packages by TypeScript source; published as its own package and run via
|
|
@@ -28,8 +29,7 @@ try {
|
|
|
28
29
|
await launch(process.argv.slice(2));
|
|
29
30
|
} catch (err) {
|
|
30
31
|
// Whatever escapes before a command is dispatched (repo discovery, tier
|
|
31
|
-
// resolution, env entry) — the dispatch itself reports its own.
|
|
32
|
-
// `bin/devtools-ci-bare.mjs` for the same shape.
|
|
32
|
+
// resolution, env entry) — the dispatch itself reports its own.
|
|
33
33
|
process.stderr.write(
|
|
34
34
|
`devtools: ${err instanceof Error ? err.message : String(err)}\n`,
|
|
35
35
|
);
|