@donotdev/cli 0.0.24 → 0.0.26

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 (34) hide show
  1. package/README.md +7 -295
  2. package/dependencies-matrix.json +47 -135
  3. package/dist/bin/commands/agent-setup.js +3 -3
  4. package/dist/bin/commands/build.js +144 -143
  5. package/dist/bin/commands/bump.js +146 -145
  6. package/dist/bin/commands/cacheout.js +143 -142
  7. package/dist/bin/commands/coach.js +157 -152
  8. package/dist/bin/commands/create-app.js +23 -23
  9. package/dist/bin/commands/create-project.js +166 -165
  10. package/dist/bin/commands/db.js +46705 -46704
  11. package/dist/bin/commands/deploy.js +684 -580
  12. package/dist/bin/commands/dev.js +180 -160
  13. package/dist/bin/commands/doctor.js +153 -152
  14. package/dist/bin/commands/emu.js +174 -168
  15. package/dist/bin/commands/format.js +144 -143
  16. package/dist/bin/commands/get-demo.js +2 -2
  17. package/dist/bin/commands/make-admin.js +64122 -64043
  18. package/dist/bin/commands/preview.js +179 -160
  19. package/dist/bin/commands/seed.js +46705 -46704
  20. package/dist/bin/commands/setup-cicd.js +165 -159
  21. package/dist/bin/commands/setup.js +414 -214
  22. package/dist/bin/commands/staging.js +684 -580
  23. package/dist/bin/commands/sync-secrets.js +143 -142
  24. package/dist/bin/commands/type-check.js +143 -142
  25. package/dist/bin/commands/wai.js +1 -1
  26. package/dist/bin/dndev.js +79 -1
  27. package/dist/index.js +713 -593
  28. package/package.json +1 -1
  29. package/templates/root-consumer/.cursor/mcp.json.example +1 -1
  30. package/templates/root-consumer/.gemini/settings.json.example +1 -1
  31. package/templates/root-consumer/.mcp.json.example +1 -1
  32. package/templates/root-consumer/bunfig.toml.example +6 -53
  33. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +26 -9
  34. package/templates/root-consumer/vercel.json.example +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "Command-line interface for DoNotDev Framework",
5
5
  "type": "module",
6
6
  "private": false,
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "donotdev": {
4
4
  "command": "bunx",
5
- "args": ["@donotdev/mcp-server"]
5
+ "args": ["@donotdev/mcp-server@latest"]
6
6
  }
7
7
  }
8
8
  }
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "donotdev": {
4
4
  "command": "bunx",
5
- "args": ["@donotdev/mcp-server"],
5
+ "args": ["@donotdev/mcp-server@latest"],
6
6
  "trust": true
7
7
  }
8
8
  }
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "donotdev": {
4
4
  "command": "bunx",
5
- "args": ["@donotdev/mcp-server"]
5
+ "args": ["@donotdev/mcp-server@latest"]
6
6
  }
7
7
  }
8
8
  }
@@ -1,68 +1,21 @@
1
- # Bun Configuration for DoNotDev Framework
2
- # Copy this to bunfig.toml and adjust as needed
1
+ # Bun Configuration for DoNotDev Consumer App
3
2
  # Documentation: https://bun.sh/docs/runtime/bunfig
4
3
 
5
4
  [install]
6
- # Enable workspace support for monorepo
5
+ # Enable workspace support for local apps/packages
7
6
  workspace = true
8
7
 
9
8
  # Dependency installation settings
10
- exact = false # Allow version ranges (^, ~) for flexibility
11
- production = false # Install devDependencies (needed for framework development)
12
- optional = true # Install optional dependencies
13
- peer = true # Warn on missing peer dependencies (mandatory peers like valibot must be installed)
9
+ exact = false
10
+ optional = true
11
+ peer = true
14
12
 
15
13
  # Workspace linking strategy
16
- # "hoisted" = shared node_modules at root (faster, less disk space, better tool compatibility)
17
- # "isolated" = separate node_modules per package (better phantom dependency protection)
18
14
  linker = "hoisted"
19
15
 
20
- # Hoist essential tools for cross-platform compatibility
21
- # NOTE: path-to-regexp is required for Firebase emulators compatibility
22
- publicHoistPattern = [
23
- "*eslint*",
24
- "*typescript*",
25
- "*prettier*",
26
- "*turbo*",
27
- "*react*",
28
- "*@types/react*",
29
- "*esbuild*",
30
- "@esbuild/*",
31
- "@donotdev/*",
32
- "vite",
33
- "next",
34
- "path-to-regexp"
35
- ]
36
-
37
- # Cache configuration
38
- cache = true # Enable dependency caching (default, massive speed boost)
39
-
40
- # Security scanning (optional - requires installation)
41
- # [install.security]
42
- # scanner = "@socketsecurity/bun-security-scanner"
43
-
44
16
  [run]
45
- # Use Bun runtime for scripts (significantly faster than Node.js)
46
17
  bun = true
47
-
48
- # Cross-platform shell handling
49
- # "bun" = use Bun's internal shell (RECOMMENDED for cross-platform compatibility)
50
- # Ensures consistent behavior across Windows/WSL/Mac/Linux
51
18
  shell = "bun"
52
19
 
53
20
  [install.lockfile]
54
- # Lockfile version (v2 is modern standard for Bun 1.3+)
55
- version = 2
56
-
57
- # Additional notes:
58
- # - Always commit bun.lockb to version control
59
- # - Use workspace:* protocol for internal package dependencies
60
- # - For merge conflicts in bun.lockb: accept one side, run bun install, commit
61
- #
62
- # Firebase Emulators Compatibility:
63
- # If using Firebase emulators, add these overrides to your root package.json:
64
- # "overrides": {
65
- # "path-to-regexp": "0.1.7",
66
- # "express>path-to-regexp": "0.1.7",
67
- # "firebase-tools>express>path-to-regexp": "0.1.7"
68
- # }
21
+ version = 2
@@ -40,19 +40,26 @@ VERCEL_TOKEN=your_vercel_token
40
40
  **Per-app (public):** add to `apps/<your-app>/.env`:
41
41
 
42
42
  ```env
43
- VERCEL_ORG_ID=your_team_id
44
43
  VERCEL_PROJECT_ID=your_project_id
45
44
  ```
46
45
 
46
+ **Team/Pro accounts only** — add to `apps/<your-app>/.env`:
47
+
48
+ ```env
49
+ VERCEL_ORG_ID=your_team_id
50
+ ```
51
+
52
+ > **Hobby/free accounts: Do NOT set `VERCEL_ORG_ID`.** Setting it on a hobby account causes 403 Forbidden errors. If you're unsure, run `dndev setup` — it detects your account type automatically.
53
+
47
54
  **Where to find them:**
48
55
 
49
- | Variable | Where | File |
50
- |----------|-------|------|
51
- | `VERCEL_TOKEN` | [vercel.com/account/tokens](https://vercel.com/account/tokens) — scope to your team | `.dndev.secrets` |
52
- | `VERCEL_ORG_ID` | Vercel Dashboard → Settings → General → **Team ID** | `apps/<app>/.env` |
53
- | `VERCEL_PROJECT_ID` | Vercel Dashboard → Your Project → Settings → General → **Project ID** | `apps/<app>/.env` |
56
+ | Variable | Where | File | Required? |
57
+ |----------|-------|------|-----------|
58
+ | `VERCEL_TOKEN` | [vercel.com/account/tokens](https://vercel.com/account/tokens) — scope to your team | `.dndev.secrets` | Always |
59
+ | `VERCEL_PROJECT_ID` | Vercel Dashboard → Your Project → Settings → General → **Project ID** | `apps/<app>/.env` | Always |
60
+ | `VERCEL_ORG_ID` | Vercel Dashboard → Settings → General → **Team ID** | `apps/<app>/.env` | Team/Pro only |
54
61
 
55
- That's it. No `vercel login`, no `vercel link`, no interactive prompts.
62
+ That's it. No `vercel login`, no `vercel link`, no interactive prompts. Run `dndev setup` to validate everything.
56
63
 
57
64
  ---
58
65
 
@@ -90,7 +97,7 @@ For Next.js apps, replace the `VITE_` prefix with `NEXT_PUBLIC_` (same var names
90
97
  dndev deploy
91
98
  ```
92
99
 
93
- That's it. The CLI reads your credentials from `.env.local` and deploys to production.
100
+ That's it. The CLI reads your credentials from `.dndev.secrets` and `.env` and deploys to production.
94
101
 
95
102
  **Option B — Git push (auto-deploy)**
96
103
 
@@ -198,9 +205,19 @@ dndev emu start
198
205
 
199
206
  **"Missing Vercel credentials"**
200
207
  → Check `VERCEL_TOKEN` is in `.dndev.secrets` at project root
201
- → Check `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` are in `apps/<app>/.env`
208
+ → Check `VERCEL_PROJECT_ID` is in `apps/<app>/.env`
202
209
  → Run `dndev setup` to validate
203
210
 
211
+ **"403 Forbidden" / "token does not have access"**
212
+ → Hobby/free account? Remove `VERCEL_ORG_ID` from `apps/<app>/.env` — hobby accounts don't use team IDs
213
+ → Team account? Ensure the token is scoped to the correct team at https://vercel.com/account/tokens
214
+
215
+ **"401 Unauthorized" / "token is invalid or expired"**
216
+ → Generate a new token at https://vercel.com/account/tokens and update `.dndev.secrets`
217
+
218
+ **"404 project not found"**
219
+ → Check `VERCEL_PROJECT_ID` matches the Project ID in Vercel Dashboard → Project → Settings → General
220
+
204
221
  **"Build fails on Vercel"**
205
222
  → Check Root Directory is set to your app directory
206
223
  → Ensure `package.json` has correct `build` script
@@ -1,6 +1,7 @@
1
1
  {{#isNextjs}}
2
2
  {
3
- "framework": "nextjs",{{#includeFunctions}}
3
+ "framework": "nextjs",
4
+ "installCommand": "bun install",{{#includeFunctions}}
4
5
  "functions": {
5
6
  "functions/src/api/**/*.ts": {
6
7
  "runtime": "@vercel/node@3"