@donotdev/cli 0.2.2 → 0.2.3

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.
Files changed (45) hide show
  1. package/dependencies-matrix.json +39 -38
  2. package/dist/bin/commands/agent-setup.js +135 -67
  3. package/dist/bin/commands/build.js +288 -232
  4. package/dist/bin/commands/bump.js +293 -250
  5. package/dist/bin/commands/cacheout.js +59 -49
  6. package/dist/bin/commands/coach.js +80 -50
  7. package/dist/bin/commands/create-app.js +501 -228
  8. package/dist/bin/commands/create-project.js +377 -241
  9. package/dist/bin/commands/db.js +1873 -1804
  10. package/dist/bin/commands/deploy.js +476 -287
  11. package/dist/bin/commands/dev.js +139 -108
  12. package/dist/bin/commands/doctor.js +91 -57
  13. package/dist/bin/commands/emu.js +196 -154
  14. package/dist/bin/commands/format.js +83 -50
  15. package/dist/bin/commands/get-demo.js +422 -197
  16. package/dist/bin/commands/make-admin.js +813 -707
  17. package/dist/bin/commands/preview.js +139 -108
  18. package/dist/bin/commands/seed.js +1874 -1809
  19. package/dist/bin/commands/setup-cicd.js +258 -204
  20. package/dist/bin/commands/setup.js +346 -247
  21. package/dist/bin/commands/staging.js +476 -287
  22. package/dist/bin/commands/sync-secrets.js +472 -141
  23. package/dist/bin/commands/type-check.js +163 -119
  24. package/dist/bin/commands/wai.js +53 -46
  25. package/dist/bin/dndev.js +10 -1
  26. package/dist/bin/donotdev.js +18 -8
  27. package/dist/index.js +590 -373
  28. package/package.json +2 -2
  29. package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  30. package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +1 -1
  31. package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +1 -1
  32. package/templates/app-next/src/app/AppDocument.tsx.example +57 -0
  33. package/templates/app-next/src/app/ClientLayout.tsx.example +6 -2
  34. package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  35. package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +1 -1
  36. package/templates/app-next/src/pages/legal/TermsPage.tsx.example +1 -1
  37. package/templates/app-vite/src/pages/FormPageExample.tsx.example +21 -16
  38. package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  39. package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +1 -1
  40. package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +1 -1
  41. package/templates/overlay-supabase/src/config/providers.nextjs.ts.example +37 -0
  42. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +5 -1
  43. package/templates/root-consumer/.gitignore.example +7 -1
  44. package/templates/app-next/src/app/layout.tsx.example +0 -80
  45. package/templates/app-next/src/app/not-found.tsx.example +0 -40
@@ -82,25 +82,29 @@ var init_main = __esm({
82
82
  }
83
83
  });
84
84
 
85
- // node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
86
- var require_src = __commonJS({
87
- "node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
88
- "use strict";
85
+ // node_modules/.bun/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
86
+ var ESC, CSI, cursor, erase, clear;
87
+ var init_dist3 = __esm({
88
+ "node_modules/.bun/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js"() {
89
89
  init_utils2();
90
- var ESC = "\x1B";
91
- var CSI = `${ESC}[`;
92
- var beep = "\x07";
93
- var cursor3 = {
90
+ ESC = "\x1B";
91
+ CSI = `${ESC}[`;
92
+ cursor = {
94
93
  to(x, y) {
95
- if (!y) return `${CSI}${x + 1}G`;
94
+ if (!y)
95
+ return `${CSI}${x + 1}G`;
96
96
  return `${CSI}${y + 1};${x + 1}H`;
97
97
  },
98
98
  move(x, y) {
99
99
  let ret = "";
100
- if (x < 0) ret += `${CSI}${-x}D`;
101
- else if (x > 0) ret += `${CSI}${x}C`;
102
- if (y < 0) ret += `${CSI}${-y}A`;
103
- else if (y > 0) ret += `${CSI}${y}B`;
100
+ if (x < 0)
101
+ ret += `${CSI}${-x}D`;
102
+ else if (x > 0)
103
+ ret += `${CSI}${x}C`;
104
+ if (y < 0)
105
+ ret += `${CSI}${-y}A`;
106
+ else if (y > 0)
107
+ ret += `${CSI}${y}B`;
104
108
  return ret;
105
109
  },
106
110
  up: (count = 1) => `${CSI}${count}A`,
@@ -115,11 +119,7 @@ var require_src = __commonJS({
115
119
  save: `${ESC}7`,
116
120
  restore: `${ESC}8`
117
121
  };
118
- var scroll = {
119
- up: (count = 1) => `${CSI}S`.repeat(count),
120
- down: (count = 1) => `${CSI}T`.repeat(count)
121
- };
122
- var erase3 = {
122
+ erase = {
123
123
  screen: `${CSI}2J`,
124
124
  up: (count = 1) => `${CSI}1J`.repeat(count),
125
125
  down: (count = 1) => `${CSI}J`.repeat(count),
@@ -127,28 +127,31 @@ var require_src = __commonJS({
127
127
  lineEnd: `${CSI}K`,
128
128
  lineStart: `${CSI}1K`,
129
129
  lines(count) {
130
- let clear = "";
130
+ let clear2 = "";
131
131
  for (let i2 = 0; i2 < count; i2++)
132
- clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
132
+ clear2 += this.line + (i2 < count - 1 ? cursor.up() : "");
133
133
  if (count)
134
- clear += cursor3.left;
135
- return clear;
134
+ clear2 += cursor.left;
135
+ return clear2;
136
136
  }
137
137
  };
138
- module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
138
+ clear = {
139
+ screen: `${ESC}c`
140
+ };
139
141
  }
140
142
  });
141
143
 
142
- // node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
144
+ // node_modules/.bun/@clack+core@1.6.0/node_modules/@clack/core/dist/index.mjs
143
145
  import { styleText } from "node:util";
144
146
  import { stdout, stdin } from "node:process";
145
147
  import { ReadStream } from "node:tty";
146
- var import_sisteransi, a$1, t, settings, R;
147
- var init_dist3 = __esm({
148
- "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
148
+ var a$1, t, settings, R;
149
+ var init_dist4 = __esm({
150
+ "node_modules/.bun/@clack+core@1.6.0/node_modules/@clack/core/dist/index.mjs"() {
149
151
  init_utils2();
150
152
  init_main();
151
- import_sisteransi = __toESM(require_src(), 1);
153
+ init_dist3();
154
+ init_dist2();
152
155
  a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
153
156
  t = [
154
157
  "January",
@@ -197,7 +200,7 @@ var init_dist3 = __esm({
197
200
  }
198
201
  });
199
202
 
200
- // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
203
+ // node_modules/.bun/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.mjs
201
204
  import { styleText as styleText2, stripVTControlCharacters } from "node:util";
202
205
  import process$1 from "node:process";
203
206
  import { existsSync, lstatSync, readdirSync } from "node:fs";
@@ -208,17 +211,17 @@ function isUnicodeSupported() {
208
211
  }
209
212
  return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
210
213
  }
211
- var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, u2, SELECT_INSTRUCTIONS, i;
212
- var init_dist4 = __esm({
213
- "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
214
+ var unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, u2, SELECT_INSTRUCTIONS, i;
215
+ var init_dist5 = __esm({
216
+ "node_modules/.bun/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.mjs"() {
214
217
  init_utils2();
215
- init_dist3();
216
- init_dist3();
218
+ init_dist4();
219
+ init_dist4();
217
220
  init_main();
218
221
  init_dist2();
219
- import_sisteransi2 = __toESM(require_src(), 1);
222
+ init_dist3();
220
223
  unicode = isUnicodeSupported();
221
- unicodeOr = (o, e) => unicode ? o : e;
224
+ unicodeOr = (e, o) => unicode ? e : o;
222
225
  S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
223
226
  S_STEP_CANCEL = unicodeOr("\u25A0", "x");
224
227
  S_STEP_ERROR = unicodeOr("\u25B2", "x");
@@ -255,9 +258,9 @@ var init_dist4 = __esm({
255
258
  secondarySymbol: r2 = styleText2("gray", S_BAR),
256
259
  output: m = process.stdout,
257
260
  spacing: l = 1,
258
- withGuide: c
261
+ withGuide: c2
259
262
  } = {}) => {
260
- const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
263
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
261
264
  for (let i2 = 0; i2 < l; i2++)
262
265
  t2.push(f);
263
266
  const g = Array.isArray(s) ? s : s.split(`
@@ -351,8 +354,8 @@ var init_cli_output = __esm({
351
354
  "packages/tooling/src/utils/cli-output.ts"() {
352
355
  "use strict";
353
356
  init_utils2();
354
- init_dist4();
355
- init_dist4();
357
+ init_dist5();
358
+ init_dist5();
356
359
  colors = {
357
360
  reset: "\x1B[0m",
358
361
  // Success (green)
@@ -6442,6 +6445,9 @@ import {
6442
6445
  extname
6443
6446
  } from "node:path";
6444
6447
  import { fileURLToPath } from "node:url";
6448
+ function isEexistError(error2) {
6449
+ return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
6450
+ }
6445
6451
  function safeExecuteAsync(fn, message) {
6446
6452
  return fn().catch((error2) => {
6447
6453
  throw new Error(
@@ -6813,7 +6819,7 @@ var init_PathResolver = __esm({
6813
6819
  try {
6814
6820
  await fs.promises.mkdir(dir, { recursive: true });
6815
6821
  } catch (error2) {
6816
- if (error2?.code !== "EEXIST") throw error2;
6822
+ if (!isEexistError(error2)) throw error2;
6817
6823
  }
6818
6824
  const detectedFormat = this._detectFormat(filePath, format);
6819
6825
  let writeContent;
@@ -6875,7 +6881,7 @@ var init_PathResolver = __esm({
6875
6881
  try {
6876
6882
  fs.mkdirSync(dir, { recursive: true });
6877
6883
  } catch (error2) {
6878
- if (error2?.code !== "EEXIST") throw error2;
6884
+ if (!isEexistError(error2)) throw error2;
6879
6885
  }
6880
6886
  const detectedFormat = this._detectFormat(filePath, format);
6881
6887
  let writeContent;
@@ -6932,7 +6938,7 @@ var init_PathResolver = __esm({
6932
6938
  try {
6933
6939
  await fs.promises.mkdir(dir, { recursive: true });
6934
6940
  } catch (error2) {
6935
- if (error2?.code !== "EEXIST") throw error2;
6941
+ if (!isEexistError(error2)) throw error2;
6936
6942
  }
6937
6943
  try {
6938
6944
  return await safeExecuteAsync(async () => {
@@ -6974,7 +6980,7 @@ var init_PathResolver = __esm({
6974
6980
  try {
6975
6981
  fs.mkdirSync(dir, { recursive: true });
6976
6982
  } catch (error2) {
6977
- if (error2?.code !== "EEXIST") throw error2;
6983
+ if (!isEexistError(error2)) throw error2;
6978
6984
  }
6979
6985
  try {
6980
6986
  fs.copyFileSync(srcPath, normalizedDestPath);
@@ -7090,7 +7096,7 @@ var init_PathResolver = __esm({
7090
7096
  try {
7091
7097
  await fs.promises.mkdir(dirPath, { recursive: true });
7092
7098
  } catch (error2) {
7093
- if (error2?.code !== "EEXIST") throw error2;
7099
+ if (!isEexistError(error2)) throw error2;
7094
7100
  }
7095
7101
  }
7096
7102
  /**
@@ -7102,7 +7108,7 @@ var init_PathResolver = __esm({
7102
7108
  try {
7103
7109
  fs.mkdirSync(dirPath, { recursive: true });
7104
7110
  } catch (error2) {
7105
- if (error2?.code !== "EEXIST") throw error2;
7111
+ if (!isEexistError(error2)) throw error2;
7106
7112
  }
7107
7113
  }
7108
7114
  /**
@@ -7351,6 +7357,7 @@ var init_PathResolver = __esm({
7351
7357
  * @param patternType - Type of patterns (css, routes, i18n, assets, pwa)
7352
7358
  * @returns Resolved patterns with absolute paths
7353
7359
  */
7360
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- why: mirrors the public PathResolver.d.ts signature; tightening it is a breaking change (any-audit)
7354
7361
  async resolvePatterns(patternType) {
7355
7362
  if (!constants.getPatternsFor) {
7356
7363
  return { framework: [], consumer: [], all: [] };
package/dist/bin/dndev.js CHANGED
@@ -595,6 +595,14 @@ var init_command_registry = __esm({
595
595
  description: "platform (firebase|vercel) for runtime target"
596
596
  },
597
597
  { flags: "-p, --project <project>", description: "project ID" },
598
+ {
599
+ flags: "--app <app>",
600
+ description: "Vercel app to sync (apps/<app>)"
601
+ },
602
+ {
603
+ flags: "--vercel-project <id>",
604
+ description: "Vercel project ID (overrides VERCEL_PROJECT_ID from the app .env)"
605
+ },
598
606
  {
599
607
  flags: "--repo <repo>",
600
608
  description: "GitHub repo (owner/repo) for github target"
@@ -995,7 +1003,7 @@ function registerCommand(program2, def, action) {
995
1003
  }
996
1004
 
997
1005
  // packages/cli/src/bin/dndev.mjs
998
- var CLI_VERSION = true ? "0.2.2" : "0.0.0";
1006
+ var CLI_VERSION = true ? "0.2.3" : "0.0.0";
999
1007
  var args = process.argv.slice(2);
1000
1008
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
1001
1009
  console.log(CLI_VERSION);
@@ -1071,6 +1079,7 @@ var ACTION_OVERRIDES = {
1071
1079
  },
1072
1080
  "sync-secrets": async (options) => {
1073
1081
  if (options.project) options.projectId = options.project;
1082
+ if (options.vercelProject) options.vercelProjectId = options.vercelProject;
1074
1083
  const { main } = await import("./commands/sync-secrets.js");
1075
1084
  process.exitCode = await main(options);
1076
1085
  },
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __esm = (fn, res) => function __init() {
5
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ var __esm = (fn, res, err) => function __init() {
5
+ if (err) throw err[0];
6
+ try {
7
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ } catch (e) {
9
+ throw err = [e], e;
10
+ }
6
11
  };
7
12
  var __export = (target, all) => {
8
13
  for (var name in all)
@@ -423,17 +428,13 @@ var init_command_registry = __esm({
423
428
  // ---------------------------------------------------------------------------
424
429
  {
425
430
  name: "bundle [package]",
426
- description: "Build all packages, create changeset, and publish",
431
+ description: "Build all packages and publish",
427
432
  category: "build",
428
433
  options: [
429
434
  { flags: "--package <package>", description: "build a specific package" },
430
435
  { flags: "--all", description: "build all packages" },
431
436
  { flags: "--skip-build", description: "skip build step" },
432
437
  { flags: "--skip-minify", description: "skip minification" },
433
- {
434
- flags: "--changeset",
435
- description: "create changeset before publish (default: skip)"
436
- },
437
438
  { flags: "--skip-publish", description: "skip publishing" },
438
439
  {
439
440
  flags: "--skip-validation",
@@ -594,6 +595,14 @@ var init_command_registry = __esm({
594
595
  description: "platform (firebase|vercel) for runtime target"
595
596
  },
596
597
  { flags: "-p, --project <project>", description: "project ID" },
598
+ {
599
+ flags: "--app <app>",
600
+ description: "Vercel app to sync (apps/<app>)"
601
+ },
602
+ {
603
+ flags: "--vercel-project <id>",
604
+ description: "Vercel project ID (overrides VERCEL_PROJECT_ID from the app .env)"
605
+ },
597
606
  {
598
607
  flags: "--repo <repo>",
599
608
  description: "GitHub repo (owner/repo) for github target"
@@ -994,7 +1003,7 @@ function registerCommand(program2, def, action) {
994
1003
  }
995
1004
 
996
1005
  // packages/cli/src/bin/dndev.mjs
997
- var CLI_VERSION = true ? "0.1.42" : "0.0.0";
1006
+ var CLI_VERSION = true ? "0.2.3" : "0.0.0";
998
1007
  var args = process.argv.slice(2);
999
1008
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
1000
1009
  console.log(CLI_VERSION);
@@ -1070,6 +1079,7 @@ var ACTION_OVERRIDES = {
1070
1079
  },
1071
1080
  "sync-secrets": async (options) => {
1072
1081
  if (options.project) options.projectId = options.project;
1082
+ if (options.vercelProject) options.vercelProjectId = options.vercelProject;
1073
1083
  const { main } = await import("./commands/sync-secrets.js");
1074
1084
  process.exitCode = await main(options);
1075
1085
  },