@donotdev/cli 0.3.6 → 0.3.8
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/dependencies-matrix.json +41 -21
- package/dist/bin/commands/agent-setup.js +927 -132
- package/dist/bin/commands/build.js +30 -33
- package/dist/bin/commands/bump.js +450 -329
- package/dist/bin/commands/create-project.js +61 -15
- package/dist/bin/commands/db-check.js +443 -222
- package/dist/bin/commands/db.js +443 -222
- package/dist/bin/commands/deploy.js +8487 -8064
- package/dist/bin/commands/dev.js +230 -2
- package/dist/bin/commands/make-admin.js +30 -33
- package/dist/bin/commands/seed.js +454 -229
- package/dist/bin/commands/setup-cicd.js +43 -209
- package/dist/bin/commands/setup.js +6382 -2851
- package/dist/bin/commands/staging.js +8087 -7816
- package/dist/bin/commands/sync-secrets.js +117 -116
- package/dist/bin/commands/type-check.js +30 -33
- package/dist/bin/commands/uat.js +26340 -0
- package/dist/bin/dndev.js +48 -37
- package/dist/index.js +9630 -8218
- package/package.json +1 -1
- package/templates/app-vite/src/pages/HomePage.tsx.example +0 -12
- package/templates/root-consumer/.claude/agents/coder.md.example +1 -1
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +1 -1
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +11 -2
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +33 -42
- package/templates/root-consumer/.claude/settings.json.example +11 -0
- package/templates/root-consumer/README.md.example +1 -3
package/dist/bin/dndev.js
CHANGED
|
@@ -640,7 +640,11 @@ var init_command_registry = __esm({
|
|
|
640
640
|
appCommand: true,
|
|
641
641
|
actionPattern: "app",
|
|
642
642
|
options: [
|
|
643
|
-
{ flags: "-c, --concurrency <n>", description: "set concurrency" }
|
|
643
|
+
{ flags: "-c, --concurrency <n>", description: "set concurrency" },
|
|
644
|
+
{
|
|
645
|
+
flags: "--uat",
|
|
646
|
+
description: "Run locally against the UAT backend (apps/<app>/.env.uat; refuses production values)"
|
|
647
|
+
}
|
|
644
648
|
],
|
|
645
649
|
loader: "../apps/dev.ts",
|
|
646
650
|
exportName: "dev"
|
|
@@ -942,7 +946,7 @@ var init_command_registry = __esm({
|
|
|
942
946
|
options: [
|
|
943
947
|
{
|
|
944
948
|
flags: "-y, --yes",
|
|
945
|
-
description: "Accept every default answer: packages and
|
|
949
|
+
description: "Accept every default answer: packages, docs, AI harness and the demo/dndev apps already present, no major updates, then bun install"
|
|
946
950
|
}
|
|
947
951
|
],
|
|
948
952
|
loader: "../maintenance/bump.ts",
|
|
@@ -960,7 +964,7 @@ var init_command_registry = __esm({
|
|
|
960
964
|
// ---------------------------------------------------------------------------
|
|
961
965
|
{
|
|
962
966
|
name: "deploy [app]",
|
|
963
|
-
description: "Deploy app",
|
|
967
|
+
description: "Deploy app to production (UAT: uat <app>)",
|
|
964
968
|
category: "deployment",
|
|
965
969
|
public: true,
|
|
966
970
|
appCommand: true,
|
|
@@ -978,10 +982,6 @@ var init_command_registry = __esm({
|
|
|
978
982
|
flags: "--force",
|
|
979
983
|
description: "Delete deployed Firebase functions missing from the local source (default: off; the deploy aborts and names them)"
|
|
980
984
|
},
|
|
981
|
-
{
|
|
982
|
-
flags: "--staging",
|
|
983
|
-
description: "Deploy to staging (uses .env.staging and staging credentials)"
|
|
984
|
-
},
|
|
985
985
|
{
|
|
986
986
|
flags: "--scope <scope>",
|
|
987
987
|
description: "What to deploy: frontend, functions, rules, both or all. Implies --yes"
|
|
@@ -999,43 +999,31 @@ var init_command_registry = __esm({
|
|
|
999
999
|
exportName: "deploy"
|
|
1000
1000
|
},
|
|
1001
1001
|
{
|
|
1002
|
-
name: "
|
|
1003
|
-
description: "
|
|
1004
|
-
alias: "uat",
|
|
1002
|
+
name: "uat [app]",
|
|
1003
|
+
description: "Ship the code on this machine to UAT (Supabase + Vercel apps): apps/<app>/.env.uat, .dndev.uat.secrets; never production values; history-aware migrations, noindex",
|
|
1005
1004
|
category: "deployment",
|
|
1006
1005
|
public: true,
|
|
1007
1006
|
appCommand: true,
|
|
1008
1007
|
options: [
|
|
1009
|
-
{
|
|
1010
|
-
flags: "-p, --project <project>",
|
|
1011
|
-
description: "Project ID (overrides default)"
|
|
1012
|
-
},
|
|
1013
1008
|
{
|
|
1014
1009
|
flags: "--skip-build",
|
|
1015
1010
|
description: "Reuse existing builds (dist/, out/, .vercel/output, functions, edge .build/). Default: build"
|
|
1016
1011
|
},
|
|
1017
|
-
{
|
|
1018
|
-
flags: "--from-git",
|
|
1019
|
-
description: "Next.js on Vercel: let Vercel build from linked Git (default: local vercel build + upload)"
|
|
1020
|
-
},
|
|
1021
|
-
{
|
|
1022
|
-
flags: "--force",
|
|
1023
|
-
description: "Delete deployed Firebase functions missing from the local source (default: off; the deploy aborts and names them)"
|
|
1024
|
-
},
|
|
1025
1012
|
{
|
|
1026
1013
|
flags: "--scope <scope>",
|
|
1027
|
-
description: "What to deploy: frontend, functions,
|
|
1014
|
+
description: "What to deploy: frontend, functions, both or all. Implies --yes"
|
|
1028
1015
|
},
|
|
1029
1016
|
{
|
|
1030
1017
|
flags: "-y, --yes",
|
|
1031
1018
|
description: "Non-interactive: never prompt; a missing required value fails, naming its flag (also when stdin is not a TTY)"
|
|
1032
1019
|
},
|
|
1033
1020
|
{
|
|
1034
|
-
flags: "--
|
|
1035
|
-
description: "
|
|
1021
|
+
flags: "--refresh-data",
|
|
1022
|
+
description: "Copy production data into UAT (anonymized; storage incremental), then deploy; overwrites UAT data; asks for confirmation unless --yes"
|
|
1036
1023
|
}
|
|
1037
1024
|
],
|
|
1038
|
-
loader: "../apps/
|
|
1025
|
+
loader: "../apps/uat.ts",
|
|
1026
|
+
exportName: "uat"
|
|
1039
1027
|
},
|
|
1040
1028
|
{
|
|
1041
1029
|
name: "sync-secrets",
|
|
@@ -1105,10 +1093,15 @@ var init_command_registry = __esm({
|
|
|
1105
1093
|
},
|
|
1106
1094
|
{
|
|
1107
1095
|
name: "setup [provider]",
|
|
1108
|
-
description: "Set up infrastructure providers (firebase, supabase, vercel)",
|
|
1096
|
+
description: "Set up infrastructure providers (firebase, supabase, vercel) or the UAT environment (uat)",
|
|
1109
1097
|
category: "deployment",
|
|
1110
1098
|
public: true,
|
|
1111
|
-
options: [
|
|
1099
|
+
options: [
|
|
1100
|
+
{
|
|
1101
|
+
flags: "-y, --yes",
|
|
1102
|
+
description: "dn setup uat: create missing UAT resources without prompting"
|
|
1103
|
+
}
|
|
1104
|
+
],
|
|
1112
1105
|
loader: "../cli/setup/setup.ts",
|
|
1113
1106
|
exportName: "setup"
|
|
1114
1107
|
},
|
|
@@ -1122,10 +1115,6 @@ var init_command_registry = __esm({
|
|
|
1122
1115
|
{
|
|
1123
1116
|
flags: "--app <app>",
|
|
1124
1117
|
description: "App name (auto-detected if single app)"
|
|
1125
|
-
},
|
|
1126
|
-
{
|
|
1127
|
-
flags: "--staging",
|
|
1128
|
-
description: "Include staging workflow generation"
|
|
1129
1118
|
}
|
|
1130
1119
|
],
|
|
1131
1120
|
loader: "../scaffolding/setup-cicd.ts",
|
|
@@ -1297,11 +1286,19 @@ var init_command_registry = __esm({
|
|
|
1297
1286
|
},
|
|
1298
1287
|
{
|
|
1299
1288
|
flags: "--output-dir <dir>",
|
|
1300
|
-
description: "output directory for migrations (default: supabase/migrations)"
|
|
1289
|
+
description: "output directory for migrations (default: supabase/migrations of the app the command runs for: the nearest folder up with supabase/config.toml, or the only app with one under apps/; fails when none)"
|
|
1301
1290
|
},
|
|
1302
1291
|
{
|
|
1303
1292
|
flags: "--no-single-file",
|
|
1304
1293
|
description: "emit one migration file per entity"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
flags: "--only <collections...>",
|
|
1297
|
+
description: "emit only these collections into ONE new migration <version>_<first>[_and_more].sql (version: now, or the latest existing + 1 so it sorts last); never touches *_entity_tables.sql (for a live app adding a feature's entities; feature-owned collections accepted)"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
flags: "--app-dir <dir>",
|
|
1301
|
+
description: "app folder whose src/config/app.ts turns framework features on (their entities are included when installed; default: the app of the output dir)"
|
|
1305
1302
|
}
|
|
1306
1303
|
],
|
|
1307
1304
|
loader: "../generators/sql-generator.ts"
|
|
@@ -1512,7 +1509,7 @@ function registerCommand(program2, def, action) {
|
|
|
1512
1509
|
}
|
|
1513
1510
|
|
|
1514
1511
|
// packages/cli/src/bin/dndev.mjs
|
|
1515
|
-
var CLI_VERSION = true ? "0.3.
|
|
1512
|
+
var CLI_VERSION = true ? "0.3.8" : "0.0.0";
|
|
1516
1513
|
var args = process.argv.slice(2);
|
|
1517
1514
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
|
|
1518
1515
|
console.log(CLI_VERSION);
|
|
@@ -1578,9 +1575,23 @@ var ACTION_OVERRIDES = {
|
|
|
1578
1575
|
const { main } = await import("./commands/cacheout.js");
|
|
1579
1576
|
process.exitCode = await main(options);
|
|
1580
1577
|
},
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1578
|
+
// Every parsed flag goes through (not only the common ones): uat.ts maps each
|
|
1579
|
+
// uat flag explicitly and sets uat: true itself, never from a flag.
|
|
1580
|
+
"uat": async (options, app) => {
|
|
1581
|
+
try {
|
|
1582
|
+
const { main } = await import("./commands/uat.js");
|
|
1583
|
+
await main({ ...options, app });
|
|
1584
|
+
} catch (error2) {
|
|
1585
|
+
console.error(`Command failed: ${error2.message}`);
|
|
1586
|
+
process.exitCode = error2.context?.exitCode || 1;
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
// dev: --uat on top of the common options (runAppCommand passes those only).
|
|
1590
|
+
"dev": async (options, app) => {
|
|
1591
|
+
await runAppCommand("./commands/dev.js", app, {
|
|
1592
|
+
...extractCommonOptions(options),
|
|
1593
|
+
uat: options.uat
|
|
1594
|
+
});
|
|
1584
1595
|
},
|
|
1585
1596
|
"deploy": async (options, app) => {
|
|
1586
1597
|
const { main } = await import("./commands/deploy.js");
|