@donotdev/cli 0.0.15 → 0.0.16
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 +36 -20
- package/dist/bin/commands/build.js +69 -52
- package/dist/bin/commands/bump.js +7 -13
- package/dist/bin/commands/create-app.js +77 -29
- package/dist/bin/commands/create-project.js +109 -135
- package/dist/bin/commands/deploy.js +97 -45
- package/dist/bin/commands/dev.js +43 -24
- package/dist/bin/commands/doctor.d.ts +6 -0
- package/dist/bin/commands/doctor.d.ts.map +1 -0
- package/dist/bin/commands/{lint.js → doctor.js} +1178 -147
- package/dist/bin/commands/doctor.js.map +1 -0
- package/dist/bin/commands/emu.js +297 -107
- package/dist/bin/commands/make-admin.js +77499 -11
- package/dist/bin/commands/preview.js +44 -25
- package/dist/bin/commands/setup.d.ts +6 -0
- package/dist/bin/commands/setup.d.ts.map +1 -0
- package/dist/bin/commands/setup.js +11733 -0
- package/dist/bin/commands/setup.js.map +1 -0
- package/dist/bin/commands/type-check.js +2018 -283
- package/dist/bin/dndev.js +54 -58
- package/dist/bin/donotdev.js +28 -44
- package/dist/index.js +633 -416
- package/package.json +2 -2
- package/templates/app-expo/.env.example +2 -22
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/assets/adaptive-icon.png +0 -0
- package/templates/app-expo/assets/favicon.png +0 -0
- package/templates/app-expo/assets/icon.png +0 -0
- package/templates/app-expo/assets/splash.png +0 -0
- package/templates/app-expo/src/config/app.ts.example +46 -0
- package/templates/app-expo/src/config/providers.ts.example +7 -0
- package/templates/app-next/src/config/providers.ts.example +7 -0
- package/templates/app-vite/src/config/providers.ts.example +7 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/functions-firebase/README.md.example +1 -1
- package/templates/functions-firebase/functions-firebase/.env.example.example +1 -1
- package/templates/functions-firebase/functions-firebase/README.md.example +1 -1
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +1 -1
- package/templates/functions-firebase/functions.config.js.example +1 -1
- package/templates/functions-supabase/supabase/config.toml.example +59 -0
- package/templates/functions-supabase/supabase/functions/.env.example +13 -0
- package/templates/functions-supabase/supabase/functions/deno.json.example +8 -0
- package/templates/overlay-firebase/env.fragment.example +1 -1
- package/templates/overlay-firebase/env.fragment.expo.example +1 -1
- package/templates/overlay-firebase/env.fragment.nextjs.example +1 -1
- package/templates/overlay-supabase/env.fragment.example +8 -3
- package/templates/overlay-supabase/env.fragment.expo.example +8 -3
- package/templates/overlay-supabase/env.fragment.nextjs.example +8 -3
- package/templates/overlay-vercel/env.fragment.example +1 -1
- package/templates/overlay-vercel/env.fragment.nextjs.example +1 -1
- package/templates/root-consumer/AI.md.example +15 -0
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +2 -2
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +6 -6
- package/templates/root-consumer/guides/dndev/INDEX.md.example +2 -2
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +3 -3
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +98 -0
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +4 -4
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +60 -0
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +62 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +3 -3
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +2 -2
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +7 -8
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +9 -5
- package/dist/bin/commands/lint.d.ts +0 -11
- package/dist/bin/commands/lint.d.ts.map +0 -1
- package/dist/bin/commands/lint.js.map +0 -1
- package/dist/bin/commands/staging.d.ts +0 -11
- package/dist/bin/commands/staging.d.ts.map +0 -1
- package/dist/bin/commands/staging.js +0 -12
- package/dist/bin/commands/staging.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# OAuth Provider Setup Guide
|
|
2
|
+
|
|
3
|
+
Each OAuth provider requires manual registration in their developer console.
|
|
4
|
+
`dndev setup oauth` computes the correct redirect URI for you.
|
|
5
|
+
|
|
6
|
+
## Redirect URIs
|
|
7
|
+
|
|
8
|
+
### Firebase
|
|
9
|
+
```
|
|
10
|
+
https://{{PROJECT_ID}}.firebaseapp.com/__/auth/handler
|
|
11
|
+
```
|
|
12
|
+
> If you use a custom auth domain, replace `{{PROJECT_ID}}.firebaseapp.com` with your custom domain.
|
|
13
|
+
|
|
14
|
+
### Supabase
|
|
15
|
+
```
|
|
16
|
+
https://{{PROJECT_ID}}.supabase.co/auth/v1/callback
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Google OAuth
|
|
22
|
+
|
|
23
|
+
1. Go to https://console.cloud.google.com/apis/credentials
|
|
24
|
+
2. Create **OAuth 2.0 Client ID** (type: Web application)
|
|
25
|
+
3. Add **Authorized redirect URI** (see above)
|
|
26
|
+
4. Copy **Client ID** and **Client Secret**
|
|
27
|
+
5. Enable in your backend:
|
|
28
|
+
- Firebase: Console > Authentication > Sign-in method > Google
|
|
29
|
+
- Supabase: Dashboard > Authentication > Providers > Google
|
|
30
|
+
|
|
31
|
+
## GitHub OAuth
|
|
32
|
+
|
|
33
|
+
1. Go to https://github.com/settings/developers
|
|
34
|
+
2. Click **New OAuth App**
|
|
35
|
+
3. Set **Authorization callback URL** (see redirect URI above)
|
|
36
|
+
4. Copy **Client ID** and **Client Secret**
|
|
37
|
+
5. Enable in your backend:
|
|
38
|
+
- Firebase: Console > Authentication > Sign-in method > GitHub
|
|
39
|
+
- Supabase: Dashboard > Authentication > Providers > GitHub
|
|
40
|
+
|
|
41
|
+
## Apple Sign In
|
|
42
|
+
|
|
43
|
+
1. Go to https://developer.apple.com/account/resources/identifiers/list/serviceId
|
|
44
|
+
2. Create a **Services ID**
|
|
45
|
+
3. Enable **Sign In with Apple**
|
|
46
|
+
4. Add **Redirect URL** (see above)
|
|
47
|
+
5. Create a **Key** for Sign In with Apple
|
|
48
|
+
6. Enable in your backend:
|
|
49
|
+
- Firebase: Console > Authentication > Sign-in method > Apple
|
|
50
|
+
- Supabase: Dashboard > Authentication > Providers > Apple
|
|
51
|
+
|
|
52
|
+
> **Note:** Apple requires an Apple Developer Program membership ($99/year).
|
|
53
|
+
|
|
54
|
+
## Verify
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
dndev doctor
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check that auth providers are detected and backend configuration is referenced.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Stripe Setup Guide
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
- Stripe account (https://dashboard.stripe.com)
|
|
5
|
+
- `@donotdev/billing` installed
|
|
6
|
+
|
|
7
|
+
## 1. Get API Keys
|
|
8
|
+
|
|
9
|
+
1. Go to https://dashboard.stripe.com/apikeys
|
|
10
|
+
2. Copy your **Publishable key** (`pk_test_...`) → `.env`
|
|
11
|
+
3. Copy your **Secret key** (`sk_test_...`) → `supabase/functions/.env` or `functions/.env`
|
|
12
|
+
|
|
13
|
+
> **Security:** Never commit secret keys. Stripe also supports restricted keys (`rk_test_...`, `rk_live_...`) for tighter permissions.
|
|
14
|
+
|
|
15
|
+
## 2. Configure Webhook
|
|
16
|
+
|
|
17
|
+
1. Go to https://dashboard.stripe.com/webhooks
|
|
18
|
+
2. Click **Add endpoint**
|
|
19
|
+
3. Set endpoint URL:
|
|
20
|
+
- Supabase: `https://{{PROJECT_ID}}.supabase.co/functions/v1/stripe-webhook`
|
|
21
|
+
- Firebase: `https://europe-west1-{{PROJECT_ID}}.cloudfunctions.net/stripeWebhook` (replace `europe-west1` with your region if different)
|
|
22
|
+
4. Select events:
|
|
23
|
+
- `checkout.session.completed`
|
|
24
|
+
- `customer.subscription.created`
|
|
25
|
+
- `customer.subscription.updated`
|
|
26
|
+
- `customer.subscription.deleted`
|
|
27
|
+
- `invoice.payment_succeeded`
|
|
28
|
+
- `invoice.payment_failed`
|
|
29
|
+
5. Copy the **Signing secret** (`whsec_...`) → `supabase/functions/.env`
|
|
30
|
+
|
|
31
|
+
## 3. Environment Variables
|
|
32
|
+
|
|
33
|
+
### App `.env` (public)
|
|
34
|
+
```
|
|
35
|
+
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Functions `.env` (secret)
|
|
39
|
+
```
|
|
40
|
+
STRIPE_SECRET_KEY=sk_test_...
|
|
41
|
+
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 4. Test Clocks (Optional)
|
|
45
|
+
|
|
46
|
+
For subscription testing without waiting for real billing cycles:
|
|
47
|
+
1. Go to https://dashboard.stripe.com/test/test-clocks
|
|
48
|
+
2. Create a test clock
|
|
49
|
+
3. Create customers attached to the test clock
|
|
50
|
+
4. Advance time to trigger billing events
|
|
51
|
+
|
|
52
|
+
## 5. Verify
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
dndev setup stripe # Interactive key setup + validation
|
|
56
|
+
dndev doctor # Health check for all providers
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Check that:
|
|
60
|
+
- Publishable key format is valid
|
|
61
|
+
- Secret key format is valid
|
|
62
|
+
- Key modes match (both test or both live)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## Step 1: Run Supabase Setup
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
dndev supabase
|
|
10
|
+
dndev setup supabase
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This command:
|
|
@@ -114,11 +114,11 @@ Supabase gives you **Auth, Postgres, Storage, and Edge Functions**. It does **no
|
|
|
114
114
|
|
|
115
115
|
## Local Development
|
|
116
116
|
|
|
117
|
-
- **Against hosted Supabase:** After `supabase
|
|
117
|
+
- **Against hosted Supabase:** After `dndev setup supabase`, run `bun dev` — the app talks to your Supabase project.
|
|
118
118
|
- **Local Supabase:** Install the [Supabase CLI](https://supabase.com/docs/guides/cli) and run `supabase start` for a local Postgres + Auth + Storage stack. Point `VITE_SUPABASE_URL` and keys to the local instance.
|
|
119
119
|
|
|
120
120
|
---
|
|
121
121
|
|
|
122
122
|
## Summary
|
|
123
123
|
|
|
124
|
-
**`dndev supabase
|
|
124
|
+
**`dndev setup supabase`** → paste URL + anon key → **`dn generate sql`** → apply migrations → **`bun dev`**. The adapter normalizes read (snake→camel, ISO) and leaves timestamps to the DB on write.
|
|
@@ -29,7 +29,7 @@ Get the Firebase web config from: **Project Settings → General → Your apps
|
|
|
29
29
|
## Step 2: Run Setup
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
dndev firebase
|
|
32
|
+
dndev setup firebase
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
This writes Firebase SDK config to your app's `.env`. The `overlay-vercel` providers.ts initializes the Firebase client SDK.
|
|
@@ -173,4 +173,4 @@ See [ENV_SETUP.md → Secrets Philosophy](./ENV_SETUP.md#secrets-philosophy) for
|
|
|
173
173
|
|
|
174
174
|
---
|
|
175
175
|
|
|
176
|
-
**`dndev firebase
|
|
176
|
+
**`dndev setup firebase` → configure Vercel project → set env vars → `git push`. Vercel deploys automatically.**
|
|
@@ -168,18 +168,17 @@ Present completed spec summary:
|
|
|
168
168
|
**READ:**
|
|
169
169
|
- `guides/wai-way/page_patterns.md` - Page structure patterns
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
# Create new app
|
|
173
|
-
dndev create-app my-app --preset [from spec]
|
|
171
|
+
**`dndev` is an installed CLI — run directly, never via `bunx` or `npx`.**
|
|
174
172
|
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
```bash
|
|
174
|
+
# Create new app (interactive wizard — no --preset flag, it prompts you)
|
|
175
|
+
dndev create-app
|
|
177
176
|
|
|
178
|
-
# Start emulators
|
|
177
|
+
# Start emulators (if Firebase backend was selected)
|
|
179
178
|
dndev emu start
|
|
180
179
|
|
|
181
|
-
#
|
|
182
|
-
|
|
180
|
+
# Start the dev server
|
|
181
|
+
dndev dev
|
|
183
182
|
```
|
|
184
183
|
|
|
185
184
|
### Step 1.1: Create Page Files
|
|
@@ -11,14 +11,18 @@
|
|
|
11
11
|
|
|
12
12
|
## Step 1: Create App
|
|
13
13
|
|
|
14
|
+
**`dndev` is an installed CLI — run directly, never via `bunx` or `npx`.**
|
|
15
|
+
|
|
14
16
|
```bash
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
# Interactive wizard — prompts for builder, backend, features (no --preset flag)
|
|
18
|
+
dndev create-app
|
|
19
|
+
|
|
20
|
+
# Start emulators (if Firebase backend was selected)
|
|
17
21
|
dndev emu start
|
|
18
|
-
bun dev
|
|
19
|
-
```
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
# Start the dev server
|
|
24
|
+
dndev dev
|
|
25
|
+
```
|
|
22
26
|
|
|
23
27
|
---
|
|
24
28
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Lint Command Wrapper
|
|
3
|
-
* @description Re-exports lint from tooling for CLI bundling.
|
|
4
|
-
* Each command wrapper is bundled separately as a fully self-contained script.
|
|
5
|
-
*
|
|
6
|
-
* @version 0.0.4
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
|
-
export { lint as main } from '@donotdev/tooling';
|
|
11
|
-
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/lint.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../../src/bin/commands/lint.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Staging Command Wrapper
|
|
3
|
-
* @description Staging is a thin wrapper around deploy with --staging flag.
|
|
4
|
-
* Re-exports deploy from tooling — the staging flag is set by the CLI entry point.
|
|
5
|
-
*
|
|
6
|
-
* @version 0.0.1
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
|
-
export { deploy as main } from '@donotdev/tooling';
|
|
11
|
-
//# sourceMappingURL=staging.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/staging.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// packages/cli/src/bin/commands/staging.ts
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Staging Command Wrapper
|
|
4
|
-
* @description Staging is a thin wrapper around deploy with --staging flag.
|
|
5
|
-
* Re-exports deploy from tooling — the staging flag is set by the CLI entry point.
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
export { deploy as main } from '@donotdev/tooling';
|
|
12
|
-
//# sourceMappingURL=staging.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staging.js","sourceRoot":"","sources":["../../../src/bin/commands/staging.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|