@donotdev/cli 0.0.5 → 0.0.6

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 (48) hide show
  1. package/dependencies-matrix.json +57 -33
  2. package/dist/bin/commands/build.js +9 -3
  3. package/dist/bin/commands/bump.js +19 -7
  4. package/dist/bin/commands/cacheout.js +9 -3
  5. package/dist/bin/commands/create-app.js +21 -7
  6. package/dist/bin/commands/create-project.js +22 -7
  7. package/dist/bin/commands/deploy.js +22 -14
  8. package/dist/bin/commands/dev.js +9 -3
  9. package/dist/bin/commands/emu.js +9 -3
  10. package/dist/bin/commands/format.js +9 -3
  11. package/dist/bin/commands/lint.js +9 -3
  12. package/dist/bin/commands/make-admin.d.ts +11 -0
  13. package/dist/bin/commands/make-admin.d.ts.map +1 -0
  14. package/dist/bin/commands/make-admin.js +12 -0
  15. package/dist/bin/commands/make-admin.js.map +1 -0
  16. package/dist/bin/commands/preview.js +9 -3
  17. package/dist/bin/commands/sync-secrets.js +9 -3
  18. package/dist/index.js +33 -17
  19. package/package.json +1 -1
  20. package/templates/app-demo/index.html.example +4 -0
  21. package/templates/app-demo/src/App.tsx.example +28 -10
  22. package/templates/app-demo/src/config/app.ts.example +56 -0
  23. package/templates/app-next/src/app/ClientLayout.tsx.example +4 -3
  24. package/templates/app-next/src/app/layout.tsx.example +17 -25
  25. package/templates/app-next/src/globals.css.example +10 -7
  26. package/templates/app-next/src/locales/dndev_en.json.example +68 -0
  27. package/templates/app-next/src/pages/locales/example_en.json.example +5 -0
  28. package/templates/app-vite/index.html.example +3 -0
  29. package/templates/app-vite/src/globals.css.example +14 -6
  30. package/templates/app-vite/src/locales/dndev_en.json.example +68 -0
  31. package/templates/functions-firebase/README.md.example +25 -0
  32. package/templates/functions-firebase/tsconfig.json.example +3 -13
  33. package/templates/functions-vercel/tsconfig.json.example +1 -13
  34. package/templates/root-consumer/firebase.json.example +1 -1
  35. package/templates/root-consumer/guides/COMPONENTS_ADV.md.example +456 -360
  36. package/templates/root-consumer/guides/COMPONENTS_ATOMIC.md.example +42 -0
  37. package/templates/root-consumer/guides/INDEX.md.example +3 -0
  38. package/templates/root-consumer/guides/SETUP_APP_CONFIG.md.example +5 -2
  39. package/templates/root-consumer/guides/SETUP_BILLING.md.example +44 -4
  40. package/templates/root-consumer/guides/SETUP_CRUD.md.example +1244 -0
  41. package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +52 -0
  42. package/templates/root-consumer/guides/SETUP_PAGES.md.example +17 -0
  43. package/templates/root-consumer/guides/SETUP_PWA.md.example +213 -0
  44. package/templates/root-consumer/guides/USE_ROUTING.md.example +503 -0
  45. package/templates/root-consumer/vercel.json.example +315 -20
  46. package/templates/app-demo/src/Routes.tsx.example +0 -20
  47. package/templates/app-vite/src/Routes.tsx.example +0 -16
  48. package/templates/app-vite/src/pages/locales/README.md.example +0 -1
@@ -496,6 +496,10 @@
496
496
  "copied": "Copied!",
497
497
  "copyCodeToClipboard": "Copy code to clipboard"
498
498
  },
499
+ "video": {
500
+ "clickToWatch": "Click to watch video",
501
+ "watchVideo": "Watch Video"
502
+ },
499
503
  "inspector": {
500
504
  "pageSource": "Page Source",
501
505
  "inspectPageSourceCode": "Inspect page source code"
@@ -512,5 +516,69 @@
512
516
  "goHome": "Go Home",
513
517
  "goBack": "Go Back",
514
518
  "contactSupport": "If the problem persists, please contact support."
519
+ },
520
+ "redirectOverlay": {
521
+ "phases": {
522
+ "connecting": "Connecting to secure server...",
523
+ "preparing": "Preparing your session...",
524
+ "redirecting": "Redirecting...",
525
+ "timeout": "Taking longer than expected..."
526
+ },
527
+ "cancel": "Cancel",
528
+ "doNotRefresh": "Please do not refresh or press back",
529
+ "default": {
530
+ "title": "Redirecting",
531
+ "message": "Please wait while we redirect you...",
532
+ "subtitle": "This may take a moment",
533
+ "ariaLabel": "Redirecting, please wait"
534
+ },
535
+ "stripe-checkout": {
536
+ "title": "Redirecting to Stripe",
537
+ "message": "Initializing secure payment...",
538
+ "subtitle": "This may take a moment on first load",
539
+ "ariaLabel": "Preparing secure checkout, please wait"
540
+ },
541
+ "stripe-portal": {
542
+ "title": "Redirecting to Stripe",
543
+ "message": "Opening billing portal...",
544
+ "subtitle": "Manage your subscription and invoices",
545
+ "ariaLabel": "Opening billing portal, please wait"
546
+ },
547
+ "oauth-google": {
548
+ "title": "Signing in with Google",
549
+ "message": "Connecting to Google...",
550
+ "subtitle": "You will be redirected to sign in",
551
+ "ariaLabel": "Signing in with Google, please wait"
552
+ },
553
+ "oauth-github": {
554
+ "title": "Signing in with GitHub",
555
+ "message": "Connecting to GitHub...",
556
+ "subtitle": "You will be redirected to sign in",
557
+ "ariaLabel": "Signing in with GitHub, please wait"
558
+ },
559
+ "oauth-apple": {
560
+ "title": "Signing in with Apple",
561
+ "message": "Connecting to Apple...",
562
+ "subtitle": "You will be redirected to sign in",
563
+ "ariaLabel": "Signing in with Apple, please wait"
564
+ },
565
+ "oauth-microsoft": {
566
+ "title": "Signing in with Microsoft",
567
+ "message": "Connecting to Microsoft...",
568
+ "subtitle": "You will be redirected to sign in",
569
+ "ariaLabel": "Signing in with Microsoft, please wait"
570
+ },
571
+ "oauth-facebook": {
572
+ "title": "Signing in with Facebook",
573
+ "message": "Connecting to Facebook...",
574
+ "subtitle": "You will be redirected to sign in",
575
+ "ariaLabel": "Signing in with Facebook, please wait"
576
+ },
577
+ "auth-email-link": {
578
+ "title": "Sending verification",
579
+ "message": "Preparing your verification link...",
580
+ "subtitle": "Check your email inbox",
581
+ "ariaLabel": "Sending verification email, please wait"
582
+ }
515
583
  }
516
584
  }
@@ -2,6 +2,31 @@
2
2
 
3
3
  This directory contains the Firebase Functions for the {{APP_NAME}} app, generated using the DoNotDev framework's scaffolding system.
4
4
 
5
+ ## ⚠️ CRITICAL: Import Rules
6
+
7
+ **Functions run on Node.js - you MUST use `/server` imports or your function will crash on deploy.**
8
+
9
+ ```typescript
10
+ // ✅ CORRECT - Functions MUST use /server imports
11
+ import { getFirebaseAdminAuth } from '@donotdev/firebase/server';
12
+ import { getFirebaseAdminFirestore } from '@donotdev/firebase/server';
13
+ import { handleError } from '@donotdev/core/server';
14
+
15
+ // ❌ WRONG - This will crash on deploy (pulls in React/client code)
16
+ import { getAuth } from '@donotdev/firebase';
17
+ import { getFirestore } from '@donotdev/firebase';
18
+ import { handleError } from '@donotdev/core';
19
+ ```
20
+
21
+ **Why?** Functions run in Node.js, not the browser. Client imports (`@donotdev/firebase`) include React and browser-only code that will crash your function.
22
+
23
+ **Rule:** Always use `/server` suffix for:
24
+ - `@donotdev/firebase/server` (not `@donotdev/firebase`)
25
+ - `@donotdev/core/server` (not `@donotdev/core`)
26
+ - `@donotdev/utils/server` (not `@donotdev/utils`)
27
+
28
+ ---
29
+
5
30
  ## Structure
6
31
 
7
32
  ```
@@ -1,18 +1,8 @@
1
1
  {
2
+ "extends": "../../../tsconfig.functions.json",
2
3
  "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "lib": ["ES2022"],
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "esModuleInterop": true,
10
- "resolveJsonModule": true,
11
- "isolatedModules": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "allowSyntheticDefaultImports": true,
14
- "noUncheckedIndexedAccess": true,
15
- "types": ["node"],
4
+ "module": "preserve",
5
+ "moduleResolution": "bundler",
16
6
  "outDir": "./lib",
17
7
  "rootDir": "./src",
18
8
  "declaration": true,
@@ -1,18 +1,6 @@
1
1
  {
2
+ "extends": "../../../tsconfig.functions.json",
2
3
  "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "lib": ["ES2022"],
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "esModuleInterop": true,
10
- "resolveJsonModule": true,
11
- "isolatedModules": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "allowSyntheticDefaultImports": true,
14
- "noUncheckedIndexedAccess": true,
15
- "types": ["node"],
16
4
  "outDir": "./lib",
17
5
  "rootDir": "./src",
18
6
  "declaration": true,
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "key": "Content-Security-Policy",
34
- "value": "default-src 'self'; script-src 'self' https://accounts.google.com https://apis.google.com https://www.google.com https://www.gstatic.com; connect-src 'self' http://localhost:* ws://localhost:* https://accounts.google.com https://apis.google.com https://www.googleapis.com https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://firestore.googleapis.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebaseio.com https://{{YOUR_REGION}}-{{YOUR_FIREBASE_PROJECT_ID}}.cloudfunctions.net https://*.a.run.app https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app https://recaptchaenterprise.googleapis.com https://content-firebaseappcheck.googleapis.com https://firebaseappcheck.googleapis.com https://www.google.com https://github.com https://api.github.com https://api.stripe.com https://checkout.stripe.com; img-src 'self' data: https: http://localhost:* https://avatars.githubusercontent.com https://lh3.googleusercontent.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app; frame-src 'self' http://localhost:* https://accounts.google.com https://checkout.stripe.com https://js.stripe.com https://www.google.com https://recaptcha.google.com; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; form-action 'self' http://localhost:* https://accounts.google.com https://github.com https://checkout.stripe.com"
34
+ "value": "default-src 'self'; script-src 'self' https://accounts.google.com https://apis.google.com https://www.google.com https://www.gstatic.com; connect-src 'self' http://localhost:* ws://localhost:* https://accounts.google.com https://apis.google.com https://www.googleapis.com https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://firestore.googleapis.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebaseio.com https://{{YOUR_REGION}}-{{YOUR_FIREBASE_PROJECT_ID}}.cloudfunctions.net https://*.a.run.app https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app https://recaptchaenterprise.googleapis.com https://content-firebaseappcheck.googleapis.com https://firebaseappcheck.googleapis.com https://www.google.com https://github.com https://api.github.com https://api.stripe.com https://checkout.stripe.com; img-src 'self' data: blob: https: http://localhost:* https://avatars.githubusercontent.com https://lh3.googleusercontent.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app; frame-src 'self' http://localhost:* https://accounts.google.com https://checkout.stripe.com https://js.stripe.com https://www.google.com https://recaptcha.google.com; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; form-action 'self' http://localhost:* https://accounts.google.com https://github.com https://checkout.stripe.com"
35
35
  },
36
36
  {
37
37
  "key": "X-Content-Type-Options",