Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ’… here and here (#347)

* ๐Ÿ’… here and here

* ๐Ÿ’… here and here

authored by

Thibault Le Ouay and committed by
GitHub
938597ed 5a833e1a

+24 -19
+4 -2
apps/web/src/app/status-page/[domain]/page.tsx
··· 55 55 twitter: { 56 56 ...twitterMetadata, 57 57 images: [ 58 - `/api/og?monitorId=${firstMonitor?.id}&title=${page?.title}&description=${page?.description || `The ${page?.title} status page` 58 + `/api/og?monitorId=${firstMonitor?.id}&title=${page?.title}&description=${ 59 + page?.description || `The ${page?.title} status page` 59 60 }`, 60 61 ], 61 62 title: page?.title, ··· 64 65 openGraph: { 65 66 ...ogMetadata, 66 67 images: [ 67 - `/api/og?monitorId=${firstMonitor?.id}&title=${page?.title}&description=${page?.description || `The ${page?.title} status page` 68 + `/api/og?monitorId=${firstMonitor?.id}&title=${page?.title}&description=${ 69 + page?.description || `The ${page?.title} status page` 68 70 }`, 69 71 ], 70 72 title: page?.title,
+1 -2
packages/analytics/package.json
··· 4 4 "description": "", 5 5 "main": "src/index.ts", 6 6 "dependencies": { 7 - "@jitsu/js": "^1.2.1", 7 + "@jitsu/js": "1.2.1", 8 8 "@t3-oss/env-core": "0.6.0", 9 9 "zod": "3.21.4" 10 10 }, 11 11 "devDependencies": { 12 12 "@types/node": "20.3.1", 13 - "ts-node": "10.9.1", 14 13 "@openstatus/tsconfig": "workspace:*", 15 14 "typescript": "5.1.6" 16 15 },
+2 -1
packages/analytics/src/type.ts
··· 15 15 } 16 16 | { event: "User Upgraded"; email: string } 17 17 | { event: "User Signed In" } 18 - | { event: "User Vercel Beta" }; 18 + | { event: "User Vercel Beta" } 19 + | { event: "Notification Created"; provider: string };
+10
packages/api/src/router/notification.ts
··· 1 1 import { z } from "zod"; 2 2 3 + import { analytics, trackAnalytics } from "@openstatus/analytics"; 3 4 import { and, eq } from "@openstatus/db"; 4 5 import { 5 6 allNotifications, ··· 33 34 .values({ ...data, workspaceId: result.workspace.id }) 34 35 .returning() 35 36 .get(); 37 + 38 + await analytics.identify(result.user.id, { 39 + userId: result.user.id, 40 + email: result.user.email, 41 + }); 42 + await trackAnalytics({ 43 + event: "Notification Created", 44 + provider: _notification.provider, 45 + }); 36 46 37 47 return _notification; 38 48 }),
+4 -4
packages/api/src/router/stripe/index.ts
··· 46 46 email?: string; 47 47 } = { 48 48 metadata: { 49 - workspaceId: String(workspace.id), 49 + workspaceId: String(result.id), 50 50 }, 51 - email: opts.ctx.auth.user?.emailAddresses[0].emailAddress || "", 51 + email: userHasAccess.currentUser.email || "", 52 52 }; 53 53 54 54 const stripeUser = await stripe.customers.create(customerData); ··· 62 62 } 63 63 64 64 const session = await stripe.billingPortal.sessions.create({ 65 - customer: stripeId || "", 65 + customer: stripeId, 66 66 return_url: `${url}/app/${result.slug}/settings`, 67 67 }); 68 68 ··· 107 107 email?: string; 108 108 } = { 109 109 metadata: { 110 - workspaceId: String(workspace.id), 110 + workspaceId: String(result.id), 111 111 }, 112 112 email: currentUser?.email || "", 113 113 };
+2 -3
packages/db/package.json
··· 6 6 "scripts": { 7 7 "generate": "drizzle-kit generate:sqlite", 8 8 "push": "drizzle-kit push:sqlite", 9 - "migrate": "ts-node --esm src/migrate.mts", 9 + "migrate": "bun src/migrate.mts", 10 10 "studio": "drizzle-kit studio", 11 11 "seed": "bun src/seed.mts" 12 12 }, ··· 25 25 "typescript": "5.1.6", 26 26 "bufferutil": "4.0.7", 27 27 "utf-8-validate": "6.0.3", 28 - "encoding": "0.1.13", 29 - "ts-node": "10.9.1" 28 + "encoding": "0.1.13" 30 29 }, 31 30 "author": "" 32 31 }
+1 -7
pnpm-lock.yaml
··· 318 318 packages/analytics: 319 319 dependencies: 320 320 '@jitsu/js': 321 - specifier: ^1.2.1 321 + specifier: 1.2.1 322 322 version: 1.2.1(@types/dlv@1.1.2) 323 323 '@t3-oss/env-core': 324 324 specifier: 0.6.0 ··· 333 333 '@types/node': 334 334 specifier: 20.3.1 335 335 version: 20.3.1 336 - ts-node: 337 - specifier: 10.9.1 338 - version: 10.9.1(@types/node@20.3.1)(typescript@5.1.6) 339 336 typescript: 340 337 specifier: 5.1.6 341 338 version: 5.1.6 ··· 459 456 encoding: 460 457 specifier: 0.1.13 461 458 version: 0.1.13 462 - ts-node: 463 - specifier: 10.9.1 464 - version: 10.9.1(@types/node@20.3.1)(typescript@5.1.6) 465 459 typescript: 466 460 specifier: 5.1.6 467 461 version: 5.1.6