committed by
GitHub
parent
aba9076805
commit
c9f0ec5d89
4
.github/workflows/workflow.yml
vendored
4
.github/workflows/workflow.yml
vendored
@@ -54,7 +54,6 @@ jobs:
|
||||
SUPABASE_DB_WEBHOOK_SECRET: ${{ secrets.SUPABASE_DB_WEBHOOK_SECRET }}
|
||||
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
|
||||
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
|
||||
PLAYWRIGHT_SERVER_COMMAND: pnpm --filter web start:test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -110,6 +109,9 @@ jobs:
|
||||
- name: Production Build (test env)
|
||||
run: pnpm --filter web build:test
|
||||
|
||||
- name: Next.js Server
|
||||
run: pnpm --filter web start:test &
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: pnpm run test
|
||||
|
||||
|
||||
3
.npmrc
3
.npmrc
@@ -1,4 +1,5 @@
|
||||
peer-legacy-deps=true
|
||||
dedupe-peer-dependents=true
|
||||
use-lockfile-v6=true
|
||||
resolution-mode=highest
|
||||
resolution-mode=highest
|
||||
package-manager-strict=false
|
||||
@@ -29,22 +29,22 @@ export default defineConfig({
|
||||
screenshot: 'only-on-failure',
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry'
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
||||
// test timeout set to 1 minutes
|
||||
timeout: 60 * 1000,
|
||||
expect: {
|
||||
// expect timeout set to 10 seconds
|
||||
timeout: 10 * 1000
|
||||
timeout: 10 * 1000,
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] }
|
||||
}
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
/* Test against mobile viewports. */
|
||||
// {
|
||||
// name: 'Mobile Chrome',
|
||||
@@ -67,12 +67,14 @@ export default defineConfig({
|
||||
],
|
||||
|
||||
/* Run your local dev server before starting the tests */
|
||||
webServer: process.env.PLAYWRIGHT_SERVER_COMMAND ? {
|
||||
cwd: '../../',
|
||||
command: process.env.PLAYWRIGHT_SERVER_COMMAND,
|
||||
url: 'http://localhost:3000',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
stdout: 'pipe',
|
||||
stderr: 'pipe',
|
||||
} : undefined
|
||||
webServer: process.env.PLAYWRIGHT_SERVER_COMMAND
|
||||
? {
|
||||
cwd: '../../',
|
||||
command: process.env.PLAYWRIGHT_SERVER_COMMAND,
|
||||
url: 'http://localhost:3000',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
stdout: 'pipe',
|
||||
stderr: 'pipe',
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
|
||||
@@ -30,8 +30,6 @@ test.describe('Auth flow', () => {
|
||||
await auth.visitConfirmEmailLink(email);
|
||||
|
||||
await page.waitForURL('**/home');
|
||||
|
||||
expect(page.url()).toContain('http://localhost:3000/home');
|
||||
});
|
||||
|
||||
test('will sign-in with the correct credentials', async ({ page }) => {
|
||||
|
||||
@@ -46,7 +46,7 @@ export class Mailbox {
|
||||
deleteAfter: boolean;
|
||||
},
|
||||
) {
|
||||
const url = `http://localhost:54324/api/v1/mailbox/${mailbox}`;
|
||||
const url = `http://127.0.0.1:54324/api/v1/mailbox/${mailbox}`;
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@edge-csrf/nextjs": "2.0.0",
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/accounts": "workspace:^",
|
||||
"@kit/admin": "workspace:^",
|
||||
"@kit/auth": "workspace:^",
|
||||
@@ -56,7 +56,7 @@
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@supabase/supabase-js": "^2.43.4",
|
||||
"@tanstack/react-query": "5.40.1",
|
||||
"@tanstack/react-query-next-experimental": "^5.40.0",
|
||||
"@tanstack/react-query-next-experimental": "^5.40.1",
|
||||
"@tanstack/react-table": "^8.17.3",
|
||||
"date-fns": "^3.6.0",
|
||||
"lucide-react": "^0.383.0",
|
||||
@@ -85,9 +85,9 @@
|
||||
"autoprefixer": "^10.4.19",
|
||||
"dotenv-cli": "^7.4.2",
|
||||
"eslint": "^8.57.0",
|
||||
"prettier": "^3.3.0",
|
||||
"prettier": "^3.3.1",
|
||||
"supabase": "^1.172.2",
|
||||
"tailwindcss": "3.4.3",
|
||||
"tailwindcss": "3.4.4",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
||||
15
package.json
15
package.json
@@ -26,7 +26,9 @@
|
||||
"supabase:web:stop": "pnpm --filter web supabase:stop",
|
||||
"supabase:web:typegen": "pnpm --filter web supabase:typegen",
|
||||
"supabase:web:reset": "pnpm --filter web supabase:reset",
|
||||
"stripe:listen": "pnpm --filter '@kit/stripe' start"
|
||||
"stripe:listen": "pnpm --filter '@kit/stripe' start",
|
||||
"env:generate": "turbo gen env",
|
||||
"env:validate": "turbo gen validate-env"
|
||||
},
|
||||
"prettier": "@kit/prettier-config",
|
||||
"workspaces": [
|
||||
@@ -36,11 +38,11 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@manypkg/cli": "^0.21.4",
|
||||
"@turbo/gen": "^1.13.3",
|
||||
"@turbo/gen": "^2.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"pnpm": "^9.1.4",
|
||||
"prettier": "^3.3.0",
|
||||
"turbo": "^1.13.3",
|
||||
"pnpm": "^9.2.0",
|
||||
"prettier": "^3.3.1",
|
||||
"turbo": "^2.0.1",
|
||||
"typescript": "^5.4.5",
|
||||
"yarn": "^1.22.22"
|
||||
},
|
||||
@@ -49,5 +51,6 @@
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.1.4"
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"./marketing": "./src/components/marketing.tsx"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/billing": "workspace:^",
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/lemon-squeezy": "workspace:^",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"nanoid": "^5.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/billing-gateway": "workspace:^",
|
||||
"@kit/email-templates": "workspace:^",
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"prettier": "@kit/prettier-config",
|
||||
"devDependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/next": "workspace:^",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./captcha/server": "./src/captcha/server/index.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/shared": "workspace:^",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"nanoid": "^5.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@kit/accounts": "workspace:^",
|
||||
"@kit/billing-gateway": "workspace:*",
|
||||
"@kit/email-templates": "workspace:^",
|
||||
|
||||
@@ -24,11 +24,9 @@ export async function registerMonitoringInstrumentation() {
|
||||
}
|
||||
|
||||
case InstrumentationProvider.Sentry: {
|
||||
const { registerInstrumentation } = await import(
|
||||
'@kit/sentry/instrumentation'
|
||||
);
|
||||
// Sentry v8 automatically sets this up
|
||||
|
||||
return registerInstrumentation();
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,35 +1,3 @@
|
||||
# Sentry Monitoring / @kit/sentry
|
||||
|
||||
Please set the following environment variable:
|
||||
|
||||
```bash
|
||||
NEXT_PUBLIC_MONITORING_PROVIDER=sentry
|
||||
NEXT_PUBLIC_SENTRY_DSN=your_dsn
|
||||
```
|
||||
|
||||
Create the following file at the root of your project:
|
||||
|
||||
```tsx title="sentry.client.config.ts"
|
||||
export * from '@kit/sentry/config/client';
|
||||
```
|
||||
|
||||
Create the following file at the root of your project:
|
||||
|
||||
```tsx title="sentry.server.config.ts"
|
||||
export * from '@kit/sentry/config/server';
|
||||
```
|
||||
|
||||
Create the following file at the root of your project:
|
||||
|
||||
```tsx title="sentry.edge.config.ts"
|
||||
export * from '@kit/sentry/config/edge';
|
||||
```
|
||||
|
||||
Finally, update the Next.js configuration in your `next.config.js` file:
|
||||
|
||||
```tsx title="next.config.mjs"
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
|
||||
// wrap your Next.js configuration with the Sentry configuration
|
||||
withSentryConfig(nextConfig);
|
||||
```
|
||||
Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/sentry).
|
||||
@@ -12,17 +12,11 @@
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./provider": "./src/components/provider.tsx",
|
||||
"./instrumentation": "./src/instrumentation.ts",
|
||||
"./config/client": "./src/sentry.client.config.ts",
|
||||
"./config/server": "./src/sentry.client.server.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@opentelemetry/exporter-jaeger": "1.24.1",
|
||||
"@opentelemetry/resources": "1.24.1",
|
||||
"@opentelemetry/sdk-node": "0.51.1",
|
||||
"@opentelemetry/semantic-conventions": "^1.24.1",
|
||||
"@sentry/nextjs": "^8.7.0",
|
||||
"@sentry/opentelemetry-node": "^7.114.0"
|
||||
"@sentry/nextjs": "^8.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @name registerInstrumentation
|
||||
* @description This file is used to register Sentry instrumentation for your Next.js application.
|
||||
*
|
||||
* Please set the MONITORING_PROVIDER environment variable to 'sentry' to register Sentry instrumentation.
|
||||
*/
|
||||
export async function registerInstrumentation() {
|
||||
const { initializeSentryServerClient } = await import(
|
||||
'./sentry.server.config'
|
||||
);
|
||||
|
||||
// initialize the Sentry client in the server
|
||||
void initializeSentryServerClient();
|
||||
|
||||
if (process.env.ENABLE_MONITORING_INSTRUMENTATION !== 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure the instrumentation is only run in a Node.js environment
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
const serviceName = process.env.INSTRUMENTATION_SERVICE_NAME;
|
||||
|
||||
if (!serviceName) {
|
||||
throw new Error(
|
||||
`You have set the Sentry instrumentation provider, but have not set the INSTRUMENTATION_SERVICE_NAME environment variable. Please set the INSTRUMENTATION_SERVICE_NAME environment variable.`,
|
||||
);
|
||||
}
|
||||
|
||||
const { Resource } = await import('@opentelemetry/resources');
|
||||
const { NodeSDK } = await import('@opentelemetry/sdk-node');
|
||||
|
||||
const { SEMRESATTRS_SERVICE_NAME } = await import(
|
||||
'@opentelemetry/semantic-conventions'
|
||||
);
|
||||
|
||||
const { SentrySpanProcessor, SentryPropagator } = await import(
|
||||
'@sentry/opentelemetry-node'
|
||||
);
|
||||
|
||||
const sdk = new NodeSDK({
|
||||
resource: new Resource({
|
||||
[SEMRESATTRS_SERVICE_NAME]: serviceName,
|
||||
}),
|
||||
spanProcessors: [new SentrySpanProcessor()],
|
||||
textMapPropagator: new SentryPropagator(),
|
||||
});
|
||||
|
||||
sdk.start();
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.4.0",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@radix-ui/react-accordion": "1.1.2",
|
||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||
"@radix-ui/react-avatar": "^1.0.4",
|
||||
@@ -49,12 +49,12 @@
|
||||
"eslint": "^8.57.0",
|
||||
"next": "14.2.3",
|
||||
"next-themes": "0.3.0",
|
||||
"prettier": "^3.3.0",
|
||||
"prettier": "^3.3.1",
|
||||
"react-day-picker": "^8.10.1",
|
||||
"react-hook-form": "^7.51.4",
|
||||
"react-i18next": "^14.1.2",
|
||||
"sonner": "^1.4.41",
|
||||
"tailwindcss": "3.4.3",
|
||||
"tailwindcss": "3.4.4",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.4.5",
|
||||
"zod": "^3.23.8"
|
||||
|
||||
813
pnpm-lock.yaml
generated
813
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^7.12.0",
|
||||
"@typescript-eslint/parser": "^7.12.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-turbo": "^1.13.3",
|
||||
"eslint-config-turbo": "^2.0.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-react": "^7.34.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.2"
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
||||
"@tanstack/react-table": "^8.17.3",
|
||||
"next": "14.2.3",
|
||||
"prettier": "^3.3.0",
|
||||
"prettier": "^3.3.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"autoprefixer": "^10.4.19",
|
||||
"next": "14.2.3",
|
||||
"postcss": "8.4.38",
|
||||
"tailwindcss": "3.4.3",
|
||||
"tailwindcss": "3.4.4",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"@kit/prettier-config": "workspace:^",
|
||||
"@kit/tsconfig": "workspace:^",
|
||||
"eslint": "^8.57.0",
|
||||
"prettier": "^3.3.0",
|
||||
"prettier": "^3.3.1",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
||||
112
turbo.json
112
turbo.json
@@ -3,60 +3,6 @@
|
||||
"globalDependencies": [
|
||||
"**/.env"
|
||||
],
|
||||
"pipeline": {
|
||||
"topo": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"outputs": [
|
||||
".next/**",
|
||||
"!.next/cache/**",
|
||||
"next-env.d.ts"
|
||||
]
|
||||
},
|
||||
"dev": {
|
||||
"persistent": true,
|
||||
"cache": false
|
||||
},
|
||||
"format": {
|
||||
"outputs": [
|
||||
"node_modules/.cache/.prettiercache"
|
||||
],
|
||||
"outputMode": "new-only"
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
],
|
||||
"outputs": [
|
||||
"node_modules/.cache/.eslintcache"
|
||||
]
|
||||
},
|
||||
"typecheck": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
],
|
||||
"outputs": [
|
||||
"node_modules/.cache/tsbuildinfo.json"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
]
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
},
|
||||
"//#clean": {
|
||||
"cache": false
|
||||
}
|
||||
},
|
||||
"globalEnv": [
|
||||
"STRIPE_SECRET_KEY",
|
||||
"STRIPE_WEBHOOK_SECRET",
|
||||
@@ -91,5 +37,59 @@
|
||||
"NEXT_PUBLIC_SUPABASE_URL",
|
||||
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
|
||||
"SUPABASE_SERVICE_ROLE_KEY"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tasks": {
|
||||
"topo": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"outputs": [
|
||||
".next/**",
|
||||
"!.next/cache/**",
|
||||
"next-env.d.ts"
|
||||
]
|
||||
},
|
||||
"dev": {
|
||||
"persistent": true,
|
||||
"cache": false
|
||||
},
|
||||
"format": {
|
||||
"outputs": [
|
||||
"node_modules/.cache/.prettiercache"
|
||||
],
|
||||
"outputLogs": "new-only"
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
],
|
||||
"outputs": [
|
||||
"node_modules/.cache/.eslintcache"
|
||||
]
|
||||
},
|
||||
"typecheck": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
],
|
||||
"outputs": [
|
||||
"node_modules/.cache/tsbuildinfo.json"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
"^topo"
|
||||
]
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
},
|
||||
"//#clean": {
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user