@donotdev/cli 0.0.16 → 0.0.18
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 +38 -26
- package/dist/bin/commands/bump.js +9 -2
- package/dist/bin/commands/create-app.js +185 -81
- package/dist/bin/commands/create-project.js +186 -85
- package/dist/bin/commands/deploy.js +51 -20
- package/dist/bin/commands/doctor.js +249 -56
- package/dist/bin/commands/emu.js +18 -20
- package/dist/bin/commands/make-admin.js +30 -10
- package/dist/bin/commands/setup.js +512 -122
- package/dist/bin/commands/type-check.d.ts.map +1 -1
- package/dist/bin/commands/type-check.js +7 -3
- package/dist/bin/commands/type-check.js.map +1 -1
- package/dist/bin/dndev.js +9 -6
- package/dist/bin/donotdev.js +35 -20
- package/dist/index.js +262 -129
- package/package.json +1 -1
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +15 -1
- package/templates/root-consumer/.claude/commands/build.md.example +24 -2
- package/templates/root-consumer/.claude/commands/design.md.example +17 -0
- package/templates/root-consumer/.claude/commands/polish.md.example +17 -0
- package/templates/root-consumer/AI.md.example +50 -18
- 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_AUTH.md.example +13 -6
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +149 -1086
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +68 -16
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +6 -111
- package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +64 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +123 -32
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +108 -91
- package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +2 -2
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +1 -1
- package/dist/bin/commands/firebase-setup.d.ts +0 -6
- package/dist/bin/commands/firebase-setup.d.ts.map +0 -1
- package/dist/bin/commands/firebase-setup.js +0 -7
- package/dist/bin/commands/firebase-setup.js.map +0 -1
- package/dist/bin/commands/supabase-setup.d.ts +0 -6
- package/dist/bin/commands/supabase-setup.d.ts.map +0 -1
- package/dist/bin/commands/supabase-setup.js +0 -7
- package/dist/bin/commands/supabase-setup.js.map +0 -1
- package/templates/functions-firebase/functions-firebase/README.md.example +0 -123
- package/templates/functions-firebase/functions-firebase/build.mjs.example +0 -5
- package/templates/functions-firebase/functions-firebase/src/auth/getCustomClaims.ts.example +0 -19
- package/templates/functions-firebase/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -21
- package/templates/functions-firebase/functions-firebase/src/auth/index.ts.example +0 -11
- package/templates/functions-firebase/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -21
- package/templates/functions-firebase/functions-firebase/src/auth/setCustomClaims.ts.example +0 -21
- package/templates/functions-firebase/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -24
- package/templates/functions-firebase/functions-firebase/src/billing/index.ts.example +0 -10
- package/templates/functions-firebase/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/index.ts.example +0 -39
- package/templates/functions-firebase/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/disconnect.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/exchangeToken.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/getConnections.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/index.ts.example +0 -17
- package/templates/functions-firebase/functions-firebase/src/oauth/refreshToken.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +0 -21
- package/templates/functions-vercel/functions-vercel/README.md.example +0 -116
- package/templates/functions-vercel/functions-vercel/build.mjs.example +0 -52
- package/templates/functions-vercel/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/crud/createEntity.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/crud/getEntity.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/crud/listEntities.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/crud/updateEntity.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -20
- package/templates/functions-vercel/functions-vercel/tsconfig.json.example +0 -21
- package/templates/functions-vercel/functions-vercel/vercel.json.example +0 -14
- package/templates/github/github/workflows/firebase-deploy.yml.example +0 -79
- /package/templates/functions-firebase/{functions-firebase/.env.example.example → .env.example} +0 -0
- /package/templates/functions-vercel/{functions-vercel/.env.example.example → .env.example} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// functions/src/api/oauth/exchangeToken.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview {{APP_NAME}} Exchange Token Wrapper
|
|
5
|
-
* @description Wrapper for framework's exchangeToken with {{APP_NAME}}-specific configuration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
-
import { exchangeToken as frameworkExchangeToken } from '@donotdev/functions/vercel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* {{APP_NAME}} OAuth token exchange
|
|
13
|
-
* Wraps the framework function with {{APP_NAME}}-specific configuration
|
|
14
|
-
*/
|
|
15
|
-
export default async function handler(
|
|
16
|
-
req: NextApiRequest,
|
|
17
|
-
res: NextApiResponse
|
|
18
|
-
) {
|
|
19
|
-
return frameworkExchangeToken(req, res);
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// functions/src/api/oauth/getConnections.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview {{APP_NAME}} Get Connections Wrapper
|
|
5
|
-
* @description Wrapper for framework's getConnections with {{APP_NAME}}-specific configuration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
-
import { getConnections as frameworkGetConnections } from '@donotdev/functions/vercel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* {{APP_NAME}} OAuth connections retrieval
|
|
13
|
-
* Wraps the framework function with {{APP_NAME}}-specific configuration
|
|
14
|
-
*/
|
|
15
|
-
export default async function handler(
|
|
16
|
-
req: NextApiRequest,
|
|
17
|
-
res: NextApiResponse
|
|
18
|
-
) {
|
|
19
|
-
return frameworkGetConnections(req, res);
|
|
20
|
-
}
|
package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// functions/src/api/oauth/grantGitHubAccess.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview {{APP_NAME}} GitHub Access Wrapper
|
|
5
|
-
* @description Wrapper for framework's grantGitHubAccess with {{APP_NAME}}-specific configuration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
-
import { grantGitHubAccess as frameworkGrantGitHubAccess } from '@donotdev/functions/vercel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* {{APP_NAME}} GitHub access granting
|
|
13
|
-
* Wraps the framework function with {{APP_NAME}}-specific configuration
|
|
14
|
-
*/
|
|
15
|
-
export default async function handler(
|
|
16
|
-
req: NextApiRequest,
|
|
17
|
-
res: NextApiResponse
|
|
18
|
-
) {
|
|
19
|
-
return frameworkGrantGitHubAccess(req, res);
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// functions/src/api/oauth/refreshToken.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview {{APP_NAME}} Refresh Token Wrapper
|
|
5
|
-
* @description Wrapper for framework's refreshToken with {{APP_NAME}}-specific configuration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
-
import { refreshToken as frameworkRefreshToken } from '@donotdev/functions/vercel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* {{APP_NAME}} OAuth token refresh
|
|
13
|
-
* Wraps the framework function with {{APP_NAME}}-specific configuration
|
|
14
|
-
*/
|
|
15
|
-
export default async function handler(
|
|
16
|
-
req: NextApiRequest,
|
|
17
|
-
res: NextApiResponse
|
|
18
|
-
) {
|
|
19
|
-
return frameworkRefreshToken(req, res);
|
|
20
|
-
}
|
package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// functions/src/api/oauth/revokeGitHubAccess.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview {{APP_NAME}} GitHub Access Revocation Wrapper
|
|
5
|
-
* @description Wrapper for framework's revokeGitHubAccess with {{APP_NAME}}-specific configuration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
-
import { revokeGitHubAccess as frameworkRevokeGitHubAccess } from '@donotdev/functions/vercel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* {{APP_NAME}} GitHub access revocation
|
|
13
|
-
* Wraps the framework function with {{APP_NAME}}-specific configuration
|
|
14
|
-
*/
|
|
15
|
-
export default async function handler(
|
|
16
|
-
req: NextApiRequest,
|
|
17
|
-
res: NextApiResponse
|
|
18
|
-
) {
|
|
19
|
-
return frameworkRevokeGitHubAccess(req, res);
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../tsconfig.functions.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./lib",
|
|
5
|
-
"rootDir": "./src",
|
|
6
|
-
"target": "ES2022",
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"allowSyntheticDefaultImports": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"strict": true,
|
|
13
|
-
"forceConsistentCasingInFileNames": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"declaration": true,
|
|
16
|
-
"declarationMap": true,
|
|
17
|
-
"sourceMap": true
|
|
18
|
-
},
|
|
19
|
-
"include": ["src/**/*"],
|
|
20
|
-
"exclude": ["node_modules", "lib", "**/*.test.ts"]
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"functions": {
|
|
3
|
-
"src/api/**/*.ts": {
|
|
4
|
-
"runtime": "nodejs22.x"
|
|
5
|
-
}
|
|
6
|
-
},
|
|
7
|
-
"env": {
|
|
8
|
-
"STRIPE_SECRET_KEY": "@stripe-secret-key",
|
|
9
|
-
"STRIPE_WEBHOOK_SECRET": "@stripe-webhook-secret",
|
|
10
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "@github-token",
|
|
11
|
-
"GITHUB_REPO_OWNER": "@github-repo-owner",
|
|
12
|
-
"GITHUB_REPO_NAME": "@github-repo-name"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
name: Deploy to Firebase Hosting
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build_and_deploy:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
# Step 1: Create parent directory for proper relative paths
|
|
12
|
-
- name: Create parent directory structure
|
|
13
|
-
run: |
|
|
14
|
-
mkdir -p $GITHUB_WORKSPACE/../dndev
|
|
15
|
-
ls -la $GITHUB_WORKSPACE/..
|
|
16
|
-
|
|
17
|
-
# Step 2: Checkout main repository
|
|
18
|
-
- name: Checkout {{projectName}} Repository
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
with:
|
|
21
|
-
path: {{projectName}}
|
|
22
|
-
|
|
23
|
-
# Step 3: Checkout dndev repository
|
|
24
|
-
- name: Checkout DnDev Repository
|
|
25
|
-
uses: actions/checkout@v4
|
|
26
|
-
with:
|
|
27
|
-
repository: ${{ github.repository_owner }}/dndev # Uses same owner as project repo
|
|
28
|
-
token: ${{ secrets.GH_PAT }} # Personal access token with repo scope
|
|
29
|
-
path: dndev
|
|
30
|
-
|
|
31
|
-
# Step 4: Set up Node.js
|
|
32
|
-
- name: Set up Node.js
|
|
33
|
-
uses: actions/setup-node@v4
|
|
34
|
-
with:
|
|
35
|
-
node-version: '22' # Using Node 22 LTS
|
|
36
|
-
|
|
37
|
-
# Step 5: Setup Bun
|
|
38
|
-
- name: Install Bun
|
|
39
|
-
uses: oven-sh/setup-bun@v1
|
|
40
|
-
with:
|
|
41
|
-
bun-version: 1.3.0
|
|
42
|
-
|
|
43
|
-
# Step 6: Setup Bun cache
|
|
44
|
-
- name: Setup Bun cache
|
|
45
|
-
uses: actions/cache@v3
|
|
46
|
-
with:
|
|
47
|
-
path: ~/.bun/install/cache
|
|
48
|
-
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lockb') }}
|
|
49
|
-
restore-keys: |
|
|
50
|
-
${{ runner.os }}-bun-cache-
|
|
51
|
-
|
|
52
|
-
# Step 7: Install dependencies
|
|
53
|
-
- name: Install Dependencies
|
|
54
|
-
working-directory: {{projectName}}
|
|
55
|
-
run: bun install
|
|
56
|
-
|
|
57
|
-
# Step 8: Build the project
|
|
58
|
-
- name: Build
|
|
59
|
-
working-directory: {{projectName}}
|
|
60
|
-
run: bun run build
|
|
61
|
-
|
|
62
|
-
# Step 10: Copy firebase.json to the right location
|
|
63
|
-
- name: Copy Firebase configuration
|
|
64
|
-
run: |
|
|
65
|
-
cp {{projectName}}/firebase.json .
|
|
66
|
-
cp {{projectName}}/.firebaserc .
|
|
67
|
-
ls -la
|
|
68
|
-
|
|
69
|
-
# Step 11: Deploy to Firebase Hosting
|
|
70
|
-
- name: Deploy to Firebase Hosting
|
|
71
|
-
uses: FirebaseExtended/action-hosting-deploy@v0
|
|
72
|
-
with:
|
|
73
|
-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
|
74
|
-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_{{firebaseSecretName}} }}'
|
|
75
|
-
channelId: live
|
|
76
|
-
projectId: {{firebaseProjectId}}
|
|
77
|
-
entryPoint: '.' # Uses firebase.json at the root
|
|
78
|
-
env:
|
|
79
|
-
FIREBASE_CLI_PREVIEWS: hostingchannels
|
/package/templates/functions-firebase/{functions-firebase/.env.example.example → .env.example}
RENAMED
|
File without changes
|
|
File without changes
|