@donotdev/cli 0.0.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.
- package/LICENSE.md +48 -0
- package/README.md +291 -0
- package/dependencies-matrix.json +694 -0
- package/dist/bin/commands/build.d.ts +11 -0
- package/dist/bin/commands/build.d.ts.map +1 -0
- package/dist/bin/commands/build.js +8162 -0
- package/dist/bin/commands/build.js.map +1 -0
- package/dist/bin/commands/bump.d.ts +11 -0
- package/dist/bin/commands/bump.d.ts.map +1 -0
- package/dist/bin/commands/bump.js +8004 -0
- package/dist/bin/commands/bump.js.map +1 -0
- package/dist/bin/commands/cacheout.d.ts +11 -0
- package/dist/bin/commands/cacheout.d.ts.map +1 -0
- package/dist/bin/commands/cacheout.js +7630 -0
- package/dist/bin/commands/cacheout.js.map +1 -0
- package/dist/bin/commands/create-app.d.ts +11 -0
- package/dist/bin/commands/create-app.d.ts.map +1 -0
- package/dist/bin/commands/create-app.js +9032 -0
- package/dist/bin/commands/create-app.js.map +1 -0
- package/dist/bin/commands/create-project.d.ts +11 -0
- package/dist/bin/commands/create-project.d.ts.map +1 -0
- package/dist/bin/commands/create-project.js +9643 -0
- package/dist/bin/commands/create-project.js.map +1 -0
- package/dist/bin/commands/deploy.d.ts +11 -0
- package/dist/bin/commands/deploy.d.ts.map +1 -0
- package/dist/bin/commands/deploy.js +9007 -0
- package/dist/bin/commands/deploy.js.map +1 -0
- package/dist/bin/commands/dev.d.ts +11 -0
- package/dist/bin/commands/dev.d.ts.map +1 -0
- package/dist/bin/commands/dev.js +7892 -0
- package/dist/bin/commands/dev.js.map +1 -0
- package/dist/bin/commands/emu.d.ts +11 -0
- package/dist/bin/commands/emu.d.ts.map +1 -0
- package/dist/bin/commands/emu.js +8302 -0
- package/dist/bin/commands/emu.js.map +1 -0
- package/dist/bin/commands/format.d.ts +11 -0
- package/dist/bin/commands/format.d.ts.map +1 -0
- package/dist/bin/commands/format.js +8009 -0
- package/dist/bin/commands/format.js.map +1 -0
- package/dist/bin/commands/lint.d.ts +11 -0
- package/dist/bin/commands/lint.d.ts.map +1 -0
- package/dist/bin/commands/lint.js +7481 -0
- package/dist/bin/commands/lint.js.map +1 -0
- package/dist/bin/commands/preview.d.ts +11 -0
- package/dist/bin/commands/preview.d.ts.map +1 -0
- package/dist/bin/commands/preview.js +7909 -0
- package/dist/bin/commands/preview.js.map +1 -0
- package/dist/bin/commands/sync-secrets.d.ts +11 -0
- package/dist/bin/commands/sync-secrets.d.ts.map +1 -0
- package/dist/bin/commands/sync-secrets.js +8227 -0
- package/dist/bin/commands/sync-secrets.js.map +1 -0
- package/dist/bin/dndev.js +222 -0
- package/dist/bin/donotdev.js +222 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12820 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
- package/templates/app-demo/index.html.example +20 -0
- package/templates/app-demo/public/favicon.ico.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +144 -0
- package/templates/app-demo/public/logo.png.example +0 -0
- package/templates/app-demo/public/logo.svg.example +1 -0
- package/templates/app-demo/public/manifest.json.example +10 -0
- package/templates/app-demo/src/App.tsx.example +17 -0
- package/templates/app-demo/src/Routes.tsx.example +20 -0
- package/templates/app-demo/src/components/ThemeToggle.tsx.example +48 -0
- package/templates/app-demo/src/globals.css.example +4 -0
- package/templates/app-demo/src/main.tsx.example +27 -0
- package/templates/app-demo/src/pages/DetailPage.tsx.example +103 -0
- package/templates/app-demo/src/pages/FullPage.tsx.example +142 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +79 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +511 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +152 -0
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +266 -0
- package/templates/app-demo/src/pages/components/LayoutRoute.tsx.example +20 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +921 -0
- package/templates/app-demo/src/themes.css.example +179 -0
- package/templates/app-demo/tsconfig.json.example +9 -0
- package/templates/app-demo/vite.config.ts.example +53 -0
- package/templates/app-next/.env.example +92 -0
- package/templates/app-next/next.config.ts.example +8 -0
- package/templates/app-next/postcss.config.js.example +58 -0
- package/templates/app-next/service-account-key.json.example +2 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +39 -0
- package/templates/app-next/src/app/layout.tsx.example +52 -0
- package/templates/app-next/src/app/not-found.tsx.example +21 -0
- package/templates/app-next/src/config/app.ts.example +75 -0
- package/templates/app-next/src/config/legal.ts.example +170 -0
- package/templates/app-next/src/globals.css.example +15 -0
- package/templates/app-next/src/locales/dndev_en.json.example +516 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +20 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-next/src/themes.css.example +179 -0
- package/templates/app-next/tsconfig.json.example +11 -0
- package/templates/app-payload/.env.example +28 -0
- package/templates/app-payload/README.md.example +233 -0
- package/templates/app-payload/collections/Company.ts.example +125 -0
- package/templates/app-payload/collections/Hero.ts.example +62 -0
- package/templates/app-payload/collections/Media.ts.example +41 -0
- package/templates/app-payload/collections/Products.ts.example +115 -0
- package/templates/app-payload/collections/Services.ts.example +104 -0
- package/templates/app-payload/collections/Testimonials.ts.example +92 -0
- package/templates/app-payload/collections/Users.ts.example +35 -0
- package/templates/app-payload/src/server.ts.example +79 -0
- package/templates/app-payload/tsconfig.json.example +24 -0
- package/templates/app-vite/.env.example +77 -0
- package/templates/app-vite/index.html.example +127 -0
- package/templates/app-vite/service-account-key.json.example +2 -0
- package/templates/app-vite/src/App.tsx.example +39 -0
- package/templates/app-vite/src/Routes.tsx.example +16 -0
- package/templates/app-vite/src/config/app.ts.example +75 -0
- package/templates/app-vite/src/config/legal.ts.example +170 -0
- package/templates/app-vite/src/globals.css.example +11 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +516 -0
- package/templates/app-vite/src/main.tsx.example +21 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +22 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-vite/src/pages/locales/README.md.example +1 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +5 -0
- package/templates/app-vite/src/themes.css.example +179 -0
- package/templates/app-vite/tsconfig.json.example +9 -0
- package/templates/app-vite/vite.config.ts.example +9 -0
- package/templates/functions-firebase/README.md.example +129 -0
- package/templates/functions-firebase/build.mjs.example +52 -0
- package/templates/functions-firebase/functions-firebase/.env.example.example +45 -0
- package/templates/functions-firebase/functions-firebase/README.md.example +123 -0
- package/templates/functions-firebase/functions-firebase/build.mjs.example +52 -0
- package/templates/functions-firebase/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
- package/templates/functions-firebase/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/auth/index.ts.example +11 -0
- package/templates/functions-firebase/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
- package/templates/functions-firebase/functions-firebase/src/billing/index.ts.example +10 -0
- package/templates/functions-firebase/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +19 -0
- package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +12 -0
- package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/index.ts.example +45 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/disconnect.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/getConnections.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/index.ts.example +17 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +21 -0
- package/templates/functions-firebase/functions.yaml.example +14 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
- package/templates/functions-firebase/src/auth/index.ts.example +11 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
- package/templates/functions-firebase/src/billing/index.ts.example +10 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +19 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +14 -0
- package/templates/functions-firebase/src/crud/index.ts.example +12 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +14 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +14 -0
- package/templates/functions-firebase/src/index.ts.example +45 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +17 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/tsconfig.json.example +24 -0
- package/templates/functions-vercel/README.md.example +116 -0
- package/templates/functions-vercel/build.mjs.example +52 -0
- package/templates/functions-vercel/functions-vercel/.env.example.example +37 -0
- package/templates/functions-vercel/functions-vercel/README.md.example +116 -0
- package/templates/functions-vercel/functions-vercel/build.mjs.example +52 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/tsconfig.json.example +21 -0
- package/templates/functions-vercel/functions-vercel/vercel.json.example +14 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/tsconfig.json.example +24 -0
- package/templates/functions-vercel/vercel.json.example +14 -0
- package/templates/github/github/workflows/firebase-deploy.yml.example +79 -0
- package/templates/github/workflows/firebase-deploy.yml.example +79 -0
- package/templates/root-consumer/.env.example +19 -0
- package/templates/root-consumer/.gitignore.example +82 -0
- package/templates/root-consumer/.prettierrc.cjs.example +12 -0
- package/templates/root-consumer/CLAUDE.md.example +73 -0
- package/templates/root-consumer/README.md.example +295 -0
- package/templates/root-consumer/bunfig.toml.example +68 -0
- package/templates/root-consumer/eslint.config.js.example +336 -0
- package/templates/root-consumer/firebase.json.example +348 -0
- package/templates/root-consumer/guides/AGENT_START_HERE.md.example +98 -0
- package/templates/root-consumer/guides/APP_CHECK_SETUP.md.example +111 -0
- package/templates/root-consumer/guides/AUTH_SETUP.md.example +92 -0
- package/templates/root-consumer/guides/BILLING_SETUP.md.example +120 -0
- package/templates/root-consumer/guides/CLI.md.example +293 -0
- package/templates/root-consumer/guides/COMPONENTS.md.example +875 -0
- package/templates/root-consumer/guides/CONFIG_SETUP.md.example +132 -0
- package/templates/root-consumer/guides/EMULATOR_SETUP.md.example +48 -0
- package/templates/root-consumer/guides/FEATURES.md.example +286 -0
- package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +97 -0
- package/templates/root-consumer/guides/FUNCTIONS.md.example +177 -0
- package/templates/root-consumer/guides/GETTING_STARTED.md.example +451 -0
- package/templates/root-consumer/guides/HOW_TO_USE.md.example +296 -0
- package/templates/root-consumer/guides/I18N_SETUP.md.example +204 -0
- package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +79 -0
- package/templates/root-consumer/guides/INDEX.md.example +50 -0
- package/templates/root-consumer/guides/INSTALLATION.md.example +296 -0
- package/templates/root-consumer/guides/LAYOUTS.md.example +310 -0
- package/templates/root-consumer/guides/PAGES_SETUP.md.example +123 -0
- package/templates/root-consumer/guides/STYLING.md.example +273 -0
- package/templates/root-consumer/guides/THEMING_SETUP.md.example +119 -0
- package/templates/root-consumer/guides/VERSION_CONTROL.md.example +181 -0
- package/templates/root-consumer/tsconfig.functions.json.example +15 -0
- package/templates/root-consumer/tsconfig.json.example +18 -0
- package/templates/root-consumer/turbo.json.example +46 -0
- package/templates/root-consumer/vercel.json.example +124 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/auth/removeCustomClaims.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Remove Custom Claims Wrapper
|
|
5
|
+
* @description Wrapper for framework's removeCustomClaims with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { removeCustomClaims as frameworkRemoveCustomClaims } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} custom claims removal
|
|
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 frameworkRemoveCustomClaims(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/auth/setCustomClaims.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Set Custom Claims Wrapper
|
|
5
|
+
* @description Wrapper for framework's setCustomClaims with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { setCustomClaims as frameworkSetCustomClaims } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} custom claims setting
|
|
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 frameworkSetCustomClaims(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/billing/handleStripeWebhook.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Stripe Webhook Wrapper
|
|
5
|
+
* @description Wrapper for framework's handleStripeWebhook with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { handleStripeWebhook as frameworkHandleStripeWebhook } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} Stripe webhook handler
|
|
13
|
+
* Configured with {{APP_NAME}}-specific product types and settings
|
|
14
|
+
*/
|
|
15
|
+
export default async function handler(
|
|
16
|
+
req: NextApiRequest,
|
|
17
|
+
res: NextApiResponse
|
|
18
|
+
) {
|
|
19
|
+
return frameworkHandleStripeWebhook(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/billing/processPaymentSuccess.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Payment Success Wrapper
|
|
5
|
+
* @description Wrapper for framework's processPaymentSuccess with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { processPaymentSuccess as frameworkProcessPaymentSuccess } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} payment success processing
|
|
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 frameworkProcessPaymentSuccess(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/billing/refreshSubscriptionStatus.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Subscription Status Wrapper
|
|
5
|
+
* @description Wrapper for framework's refreshSubscriptionStatus with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { refreshSubscriptionStatus as frameworkRefreshSubscriptionStatus } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} subscription status 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 frameworkRefreshSubscriptionStatus(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/crud/createEntity.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Create Entity Wrapper
|
|
5
|
+
* @description Wrapper for framework's createEntity with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { createEntity as frameworkCreateEntity } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} entity creation
|
|
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 frameworkCreateEntity(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/crud/deleteEntity.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Delete Entity Wrapper
|
|
5
|
+
* @description Wrapper for framework's deleteEntity with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { deleteEntity as frameworkDeleteEntity } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} entity deletion
|
|
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 frameworkDeleteEntity(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/crud/getEntity.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Get Entity Wrapper
|
|
5
|
+
* @description Wrapper for framework's getEntity with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { getEntity as frameworkGetEntity } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} entity 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 frameworkGetEntity(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/crud/listEntities.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} List Entities Wrapper
|
|
5
|
+
* @description Wrapper for framework's listEntities with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { listEntities as frameworkListEntities } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} entities listing
|
|
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 frameworkListEntities(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/crud/updateEntity.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Update Entity Wrapper
|
|
5
|
+
* @description Wrapper for framework's updateEntity with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { updateEntity as frameworkUpdateEntity } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} entity update
|
|
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 frameworkUpdateEntity(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/oauth/checkGitHubAccess.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} GitHub Access Check Wrapper
|
|
5
|
+
* @description Wrapper for framework's checkGitHubAccess with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { checkGitHubAccess as frameworkCheckGitHubAccess } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} GitHub access checking
|
|
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 frameworkCheckGitHubAccess(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// functions/src/api/oauth/disconnect.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview {{APP_NAME}} Disconnect OAuth Wrapper
|
|
5
|
+
* @description Wrapper for framework's disconnect with {{APP_NAME}}-specific configuration
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
9
|
+
import { disconnect as frameworkDisconnect } from '@donotdev/functions/vercel';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* {{APP_NAME}} OAuth disconnection
|
|
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 frameworkDisconnect(req, res);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"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
|
+
"outDir": "./lib",
|
|
17
|
+
"rootDir": "./src",
|
|
18
|
+
"declaration": true,
|
|
19
|
+
"declarationMap": true,
|
|
20
|
+
"sourceMap": true
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*"],
|
|
23
|
+
"exclude": ["node_modules", "lib", "**/*.test.ts"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"src/api/**/*.ts": {
|
|
4
|
+
"runtime": "nodejs20.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
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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: '20' # Using Node 20
|
|
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
|
|
@@ -0,0 +1,79 @@
|
|
|
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: '20' # Using Node 20
|
|
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
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# DoNotDev Framework License Key
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# This root-level .env file should ONLY contain the framework license key.
|
|
5
|
+
# App-specific environment variables (Firebase, emulators, etc.) should be
|
|
6
|
+
# placed in each app's own .env files (apps/*/.env).
|
|
7
|
+
#
|
|
8
|
+
# ⚠️ WARNING: If a root .env file exists, Vite/Next.js will load it and
|
|
9
|
+
# it will take priority over app-specific .env files. Only create a root .env
|
|
10
|
+
# if you want to share the same license key across all apps.
|
|
11
|
+
#
|
|
12
|
+
# Get your license key from: https://donotdev.com/pricing
|
|
13
|
+
# Removes watermark and enables all features
|
|
14
|
+
#
|
|
15
|
+
# For Vite projects:
|
|
16
|
+
VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
17
|
+
#
|
|
18
|
+
# For Next.js projects:
|
|
19
|
+
NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules
|
|
3
|
+
.bun/install/cache/
|
|
4
|
+
|
|
5
|
+
# Build outputs
|
|
6
|
+
dist
|
|
7
|
+
build
|
|
8
|
+
.turbo/
|
|
9
|
+
.vite/
|
|
10
|
+
.next/
|
|
11
|
+
coverage/
|
|
12
|
+
storybook-static/
|
|
13
|
+
*.tsbuildinfo
|
|
14
|
+
stats.html
|
|
15
|
+
|
|
16
|
+
# Environment variables
|
|
17
|
+
.env
|
|
18
|
+
.env.*
|
|
19
|
+
!.env.example
|
|
20
|
+
# Note: .env.local and .env.*.local are gitignored (local overrides)
|
|
21
|
+
# .env.production.local is gitignored (production secrets)
|
|
22
|
+
|
|
23
|
+
# IDE files
|
|
24
|
+
.vscode/*
|
|
25
|
+
!.vscode/extensions.json
|
|
26
|
+
.vscode/settings.json
|
|
27
|
+
.idea/
|
|
28
|
+
*.suo
|
|
29
|
+
*.ntvs*
|
|
30
|
+
*.njsproj
|
|
31
|
+
*.sln
|
|
32
|
+
*.sw?
|
|
33
|
+
|
|
34
|
+
# Logs
|
|
35
|
+
logs
|
|
36
|
+
*.log
|
|
37
|
+
npm-debug.log*
|
|
38
|
+
yarn-debug.log*
|
|
39
|
+
yarn-error.log*
|
|
40
|
+
bun-debug.log*
|
|
41
|
+
lerna-debug.log*
|
|
42
|
+
firebase-debug.log*
|
|
43
|
+
ui-debug.log*
|
|
44
|
+
.test-report.json
|
|
45
|
+
|
|
46
|
+
# System files
|
|
47
|
+
.DS_Store
|
|
48
|
+
Thumbs.db
|
|
49
|
+
ehthumbs.db
|
|
50
|
+
Desktop.ini
|
|
51
|
+
|
|
52
|
+
# Generated files
|
|
53
|
+
*.local
|
|
54
|
+
*.patch
|
|
55
|
+
*.txt
|
|
56
|
+
*.ps1
|
|
57
|
+
|
|
58
|
+
# Cache
|
|
59
|
+
.cache/
|
|
60
|
+
.firebase/
|
|
61
|
+
.eslintcache
|
|
62
|
+
.stylelintcache
|
|
63
|
+
|
|
64
|
+
# Firebase service account keys (sensitive, project-specific)
|
|
65
|
+
service-account-key.json
|
|
66
|
+
**/functions/service-account-key.json
|
|
67
|
+
|
|
68
|
+
# Lock files (using Bun)
|
|
69
|
+
package-lock.json
|
|
70
|
+
yarn.lock
|
|
71
|
+
pnpm-lock.yaml
|
|
72
|
+
bun.lockb
|
|
73
|
+
|
|
74
|
+
# Temporary files
|
|
75
|
+
.temp
|
|
76
|
+
.tmp
|
|
77
|
+
tmp/
|
|
78
|
+
temp/
|
|
79
|
+
|
|
80
|
+
# Testing
|
|
81
|
+
/cypress/videos/
|
|
82
|
+
/cypress/screenshots/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// .prettierrc.cjs
|
|
2
|
+
// Prettier configuration for DoNotDev projects
|
|
3
|
+
// This config matches the framework's default formatting rules
|
|
4
|
+
module.exports = {
|
|
5
|
+
semi: true,
|
|
6
|
+
singleQuote: true,
|
|
7
|
+
trailingComma: 'es5',
|
|
8
|
+
tabWidth: 2,
|
|
9
|
+
printWidth: 80,
|
|
10
|
+
arrowParens: 'always',
|
|
11
|
+
endOfLine: 'lf',
|
|
12
|
+
};
|