Openstatus www.openstatus.dev

Connect monitor to pages (#78)

* feat: add monitors to pages

* feat: add monitors to pages

* feat: add monitors to pages

* feat: add monitors to pages

* chore: update migration

authored by

Thibault Le Ouay and committed by
GitHub
c18c4733 d22df495

+1827 -136
+1 -1
apps/web/package.json
··· 47 47 "lucide-react": "^0.244.0", 48 48 "micro": "10.0.1", 49 49 "nanoid": "^4.0.2", 50 - "next": "13.4.8", 50 + "next": "13.4.12", 51 51 "next-contentlayer": "0.3.4", 52 52 "next-plausible": "3.7.2", 53 53 "react": "18.2.0",
+7 -13
apps/web/src/app/app/(dashboard)/[workspaceId]/status-pages/_components/action-button.tsx
··· 6 6 import type * as z from "zod"; 7 7 8 8 import type { 9 - insertMonitorSchema, 10 - insertPageSchema, 9 + allMonitorsSchema, 10 + insertPageSchemaWithMonitors, 11 + selectPageSchema, 11 12 } from "@openstatus/db/src/schema"; 12 13 13 14 import { StatusPageForm } from "@/components/forms/status-page-form"; ··· 41 42 } from "@/components/ui/dropdown-menu"; 42 43 import { api } from "@/trpc/client"; 43 44 44 - type MonitorSchema = z.infer<typeof insertMonitorSchema>; 45 - type PageSchema = z.infer<typeof insertPageSchema>; 45 + type PageSchema = z.infer<typeof selectPageSchema>; 46 46 47 47 // allMonitors 48 48 interface ActionButtonProps { 49 49 page: PageSchema; 50 - allMonitors?: MonitorSchema[]; 50 + allMonitors?: z.infer<typeof allMonitorsSchema>; 51 51 } 52 52 53 53 export function ActionButton({ page, allMonitors }: ActionButtonProps) { ··· 57 57 const [saving, setSaving] = React.useState(false); 58 58 59 59 async function onUpdate({ 60 - monitors, 61 60 workspaceId, 62 61 ...props 63 - }: PageSchema & { monitors: string[] }) { 62 + }: z.infer<typeof insertPageSchemaWithMonitors>) { 64 63 setSaving(true); 65 64 await api.page.updatePage.mutate({ 66 65 id: page.id, ··· 140 139 id="status-page-update" 141 140 onSubmit={onUpdate} 142 141 defaultValues={page} 143 - allMonitors={ 144 - allMonitors?.map((m) => ({ 145 - label: m.name || "", 146 - value: String(m.id) || "", 147 - })) ?? [] 148 - } 142 + allMonitors={allMonitors} 149 143 /> 150 144 </div> 151 145 <DialogFooter>
+5 -14
apps/web/src/app/app/(dashboard)/[workspaceId]/status-pages/_components/create-form.tsx
··· 5 5 import type * as z from "zod"; 6 6 7 7 import type { 8 - insertMonitorSchema, 9 - insertPageSchema, 8 + allMonitorsSchema, 9 + insertPageSchemaWithMonitors, 10 10 } from "@openstatus/db/src/schema"; 11 11 12 12 import { StatusPageForm } from "@/components/forms/status-page-form"; ··· 23 23 } from "@/components/ui/dialog"; 24 24 import { api } from "@/trpc/client"; 25 25 26 - type MonitorSchema = z.infer<typeof insertMonitorSchema>; 27 - type PageSchema = z.infer<typeof insertPageSchema>; 28 - 29 26 interface Props { 30 27 workspaceId: number; 31 - allMonitors?: MonitorSchema[]; 28 + allMonitors?: z.infer<typeof allMonitorsSchema>; 32 29 disabled?: boolean; 33 30 } 34 31 ··· 38 35 const [saving, setSaving] = React.useState(false); 39 36 40 37 async function onCreate({ 41 - monitors, // TODO: 42 38 ...props 43 - }: PageSchema & { monitors: string[] }) { 39 + }: z.infer<typeof insertPageSchemaWithMonitors>) { 44 40 setSaving(true); 45 41 // await api.monitor.getMonitorsByWorkspace.revalidate(); 46 42 await api.page.createPage.mutate({ ...props, workspaceId }); ··· 63 59 <StatusPageForm 64 60 id="status-page-create" 65 61 onSubmit={onCreate} 66 - allMonitors={ 67 - allMonitors?.map((m) => ({ 68 - label: m.name || "", 69 - value: String(m.id) || "", 70 - })) ?? [] 71 - } 62 + allMonitors={allMonitors} 72 63 /> 73 64 </div> 74 65 <DialogFooter>
+5 -4
apps/web/src/app/app/(dashboard)/[workspaceId]/status-pages/_components/empty-state.tsx
··· 1 1 import Link from "next/link"; 2 2 import type * as z from "zod"; 3 3 4 - import type { insertMonitorSchema } from "@openstatus/db/src/schema"; 4 + import type { 5 + allMonitorsSchema, 6 + insertMonitorSchema, 7 + } from "@openstatus/db/src/schema"; 5 8 6 9 import { EmptyState as DefaultEmptyState } from "@/components/dashboard/empty-state"; 7 10 import { Button } from "@/components/ui/button"; 8 11 import { CreateForm } from "./create-form"; 9 12 10 - type MonitorSchema = z.infer<typeof insertMonitorSchema>; 11 - 12 13 export function EmptyState({ 13 14 workspaceId, 14 15 allMonitors, 15 16 }: { 16 17 workspaceId: number; 17 - allMonitors?: MonitorSchema[]; 18 + allMonitors?: z.infer<typeof allMonitorsSchema>; 18 19 }) { 19 20 // Navigate user to monitor if they don't have one 20 21 if (!Boolean(allMonitors?.length)) {
+20 -20
apps/web/src/components/forms/status-page-form.tsx
··· 3 3 import * as React from "react"; 4 4 import { zodResolver } from "@hookform/resolvers/zod"; 5 5 import { useForm } from "react-hook-form"; 6 - import * as z from "zod"; 6 + import type * as z from "zod"; 7 7 8 - import { insertPageSchema } from "@openstatus/db/src/schema"; 8 + import type { allMonitorsSchema } from "@openstatus/db/src/schema"; 9 + import { insertPageSchemaWithMonitors } from "@openstatus/db/src/schema"; 9 10 10 11 import { 11 12 Form, ··· 20 21 import { Checkbox } from "../ui/checkbox"; 21 22 22 23 // REMINDER: only use the props you need! 23 - const schema = insertPageSchema 24 - .pick({ title: true, slug: true, description: true }) 25 - .merge( 26 - z.object({ 27 - monitors: z.string().array().optional(), // HOW TO PASS 28 - }), 29 - ); 30 24 31 - type Schema = z.infer<typeof schema>; 25 + type Schema = z.infer<typeof insertPageSchemaWithMonitors>; 32 26 33 27 interface Props { 34 28 id: string; 35 29 defaultValues?: Schema; 36 30 onSubmit: (values: Schema) => Promise<void>; 37 - allMonitors?: Record<"label" | "value", string>[]; 31 + allMonitors?: z.infer<typeof allMonitorsSchema>; 38 32 } 39 33 40 34 export function StatusPageForm({ ··· 44 38 allMonitors, 45 39 }: Props) { 46 40 const form = useForm<Schema>({ 47 - resolver: zodResolver(schema), 41 + resolver: zodResolver(insertPageSchemaWithMonitors), 48 42 defaultValues: { 49 43 title: defaultValues?.title || "", 50 44 slug: defaultValues?.slug || "", // TODO: verify if is unique 51 45 description: defaultValues?.description || "", 52 46 monitors: [], 47 + workspaceId: 0, 53 48 }, 54 49 }); 55 - 56 50 return ( 57 51 <Form {...form}> 58 - <form onSubmit={form.handleSubmit(onSubmit)} id={id}> 52 + <form 53 + onSubmit={form.handleSubmit(onSubmit, (e) => { 54 + console.log(e); 55 + console.log(form.getValues()); 56 + })} 57 + id={id} 58 + > 59 59 <div className="grid w-full items-center space-y-6"> 60 60 <FormField 61 61 control={form.control} ··· 116 116 </div> 117 117 {allMonitors?.map((item) => ( 118 118 <FormField 119 - key={item.value} 119 + key={item.id} 120 120 control={form.control} 121 121 name="monitors" 122 122 render={({ field }) => { 123 123 return ( 124 124 <FormItem 125 - key={item.value} 125 + key={item.id} 126 126 className="flex flex-row items-start space-x-3 space-y-0" 127 127 > 128 128 <FormControl> 129 129 <Checkbox 130 - checked={field.value?.includes(item.value)} 130 + checked={field.value?.includes(item.id)} 131 131 onCheckedChange={(checked) => { 132 132 return checked 133 133 ? field.onChange([ 134 134 ...(field.value || []), 135 - item.value, 135 + item.id, 136 136 ]) 137 137 : field.onChange( 138 138 field.value?.filter( 139 - (value) => value !== item.value, 139 + (value) => value !== item.id, 140 140 ), 141 141 ); 142 142 }} 143 143 /> 144 144 </FormControl> 145 145 <FormLabel className="font-normal"> 146 - {item.label} 146 + {item.name} 147 147 </FormLabel> 148 148 </FormItem> 149 149 );
-1
apps/web/src/middleware.ts
··· 73 73 auth.userId && 74 74 (req.nextUrl.pathname === "/app" || req.nextUrl.pathname === "/app/") 75 75 ) { 76 - console.log(auth.userId); 77 76 // improve on sign-up if the webhook has not been triggered yet 78 77 const userQuery = db 79 78 .select()
+9 -10
packages/api/src/router/monitor.ts
··· 2 2 3 3 import { eq } from "@openstatus/db"; 4 4 import { 5 + allMonitorsSchema, 5 6 insertMonitorSchema, 6 7 monitor, 7 - selectMonitorSchema, 8 8 user, 9 9 usersToWorkspaces, 10 10 } from "@openstatus/db/src/schema"; ··· 30 30 .get(); 31 31 32 32 // the user don't have access to this workspace 33 - if (!result.users_to_workspaces) return; 33 + if (!result || !result.users_to_workspaces) return; 34 34 35 35 await opts.ctx.db.insert(monitor).values(opts.input).returning().get(); 36 36 }), ··· 56 56 .innerJoin(currentUser, eq(usersToWorkspaces.userId, currentUser.id)) 57 57 .get(); 58 58 59 - if (!result.users_to_workspaces) return; 59 + if (!result || !result.users_to_workspaces) return; 60 60 61 61 return mon; 62 62 }), ··· 90 90 .innerJoin(currentUser, eq(usersToWorkspaces.userId, currentUser.id)) 91 91 .get(); 92 92 93 - if (!result.users_to_workspaces) return; 93 + if (!result || !result.users_to_workspaces) return; 94 94 95 95 opts.ctx.db 96 96 .update(monitor) ··· 120 120 .innerJoin(currentUser, eq(usersToWorkspaces.userId, currentUser.id)) 121 121 .get(); 122 122 123 - if (!result.users_to_workspaces) return; 123 + if (!result || !result.users_to_workspaces) return; 124 124 125 125 opts.ctx.db 126 126 .update(monitor) ··· 186 186 .innerJoin(currentUser, eq(usersToWorkspaces.userId, currentUser.id)) 187 187 .get(); 188 188 189 - if (!result.users_to_workspaces) return; 189 + if (!result || !result.users_to_workspaces) return; 190 190 191 191 opts.ctx.db.delete(monitor).where(eq(monitor.id, opts.input.monitorId)); 192 192 }), ··· 206 206 ) 207 207 .innerJoin(currentUser, eq(usersToWorkspaces.userId, currentUser.id)) 208 208 .get(); 209 - 210 209 // the user don't have access to this workspace 211 - if (!result.users_to_workspaces) return; 210 + if (!result || !result.users_to_workspaces) return; 212 211 213 212 const monitors = await opts.ctx.db 214 213 .select() 215 214 .from(monitor) 216 215 .where(eq(monitor.workspaceId, opts.input.workspaceId)) 217 216 .all(); 218 - const selectMonitorsArray = selectMonitorSchema.array(); 217 + // const selectMonitorsArray = selectMonitorSchema.array(); 219 218 220 - return selectMonitorsArray.parse(monitors); 219 + return allMonitorsSchema.parse(monitors); 221 220 }), 222 221 });
+36 -10
packages/api/src/router/page.ts
··· 3 3 import { eq } from "@openstatus/db"; 4 4 import { 5 5 insertPageSchema, 6 + insertPageSchemaWithMonitors, 7 + monitor, 8 + monitorsToPages, 6 9 page, 7 10 selectIncidentSchema, 8 11 selectMonitorSchema, ··· 14 17 // TODO: deletePageById - updatePageById 15 18 export const pageRouter = createTRPCRouter({ 16 19 createPage: protectedProcedure 17 - .input(insertPageSchema) 20 + .input(insertPageSchemaWithMonitors) 18 21 .mutation(async (opts) => { 19 - return opts.ctx.db.insert(page).values(opts.input).returning().get(); 22 + const { monitors, ...pageInput } = opts.input; 23 + const newPage = await opts.ctx.db 24 + .insert(page) 25 + .values(pageInput) 26 + .returning() 27 + .get(); 28 + if (monitors) { 29 + // We should make sure the user has access to the monitors 30 + const values = monitors.map((monitorId) => ({ 31 + monitorId: monitorId, 32 + pageId: newPage.id, 33 + })); 34 + 35 + await opts.ctx.db.insert(monitorsToPages).values(values).run(); 36 + } 20 37 }), 21 38 22 39 getPageById: protectedProcedure ··· 24 41 .query(async (opts) => { 25 42 return await opts.ctx.db.query.page.findFirst({ 26 43 where: eq(page.id, opts.input.id), 27 - with: { monitors: true, incidents: true }, 44 + with: { monitorsToPages: { with: { monitor: true } }, incidents: true }, 28 45 }); 29 46 }), 30 47 updatePage: protectedProcedure 31 - .input(insertPageSchema) 48 + .input(insertPageSchemaWithMonitors) 32 49 .mutation(async (opts) => { 33 - console.log(opts.input); 34 - const r = await opts.ctx.db 50 + const { monitors, ...pageInput } = opts.input; 51 + 52 + await opts.ctx.db 35 53 .update(page) 36 - .set(opts.input) 54 + .set(pageInput) 37 55 .where(eq(page.id, Number(opts.input.id))) 38 56 .returning() 39 57 .get(); 40 - console.log(r); 41 - return r; 58 + 59 + if (monitors) { 60 + // We should make sure the user has access to the monitors 61 + const values = monitors.map((monitorId) => ({ 62 + monitorId: monitorId, 63 + pageId: Number(opts.input.id), 64 + })); 65 + 66 + await opts.ctx.db.insert(monitorsToPages).values(values).run(); 67 + } 42 68 }), 43 69 deletePage: protectedProcedure 44 70 .input(z.object({ pageId: z.number() })) ··· 61 87 .query(async (opts) => { 62 88 const result = opts.ctx.db.query.page.findFirst({ 63 89 where: eq(page.slug, opts.input.slug), 64 - with: { monitors: true, incidents: true }, 90 + with: { monitorsToPages: { with: { monitor: true } }, incidents: true }, 65 91 }); 66 92 const selectPageSchemaWithRelation = selectPageSchema.extend({ 67 93 monitors: z.array(selectMonitorSchema),
+31
packages/db/drizzle/0001_dry_hammerhead.sql
··· 1 + DROP INDEX IF EXISTS page_custom_domain_unique;--> statement-breakpoint 2 + /* 3 + SQLite does not support "Drop default from column" out of the box, we do not generate automatic migration for that, so it has to be done manually 4 + Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php 5 + https://www.sqlite.org/lang_altertable.html 6 + https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3 7 + 8 + Due to that we don't generate migration automatically and it has to be done manually 9 + */ 10 + 11 + ALTER TABLE `page` RENAME TO `page_old`; 12 + --> statement-breakpoint 13 + 14 + CREATE TABLE `page` ( 15 + id integer PRIMARY KEY NOT NULL, 16 + workspace_id integer NOT NULL, 17 + title text NOT NULL, 18 + description text NOT NULL, 19 + icon text(256), 20 + slug text(256) NOT NULL, 21 + custom_domain text(256), 22 + updated_at integer DEFAULT (strftime('%s', 'now')), 23 + FOREIGN KEY (workspace_id) REFERENCES workspace(id) ON UPDATE no action ON DELETE no action 24 + ); 25 + --> statement-breakpoint 26 + 27 + INSERT INTO `page` SELECT * FROM `page_old`; 28 + 29 + --> statement-breakpoint 30 + DROP TABLE `page_old`; 31 +
+7
packages/db/drizzle/0002_strong_mister_sinister.sql
··· 1 + CREATE TABLE `monitors_to_pages` ( 2 + `monitor_id` integer NOT NULL, 3 + `page_id` integer NOT NULL, 4 + PRIMARY KEY(`monitor_id`, `page_id`), 5 + FOREIGN KEY (`monitor_id`) REFERENCES `monitor`(`id`) ON UPDATE no action ON DELETE no action, 6 + FOREIGN KEY (`page_id`) REFERENCES `page`(`id`) ON UPDATE no action ON DELETE no action 7 + );
+49
packages/db/drizzle/0003_windy_lionheart.sql
··· 1 + /* 2 + SQLite does not support "Dropping foreign key" out of the box, we do not generate automatic migration for that, so it has to be done manually 3 + Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php 4 + https://www.sqlite.org/lang_altertable.html 5 + 6 + Due to that we don't generate migration automatically and it has to be done manually 7 + */ 8 + 9 + ALTER TABLE `monitor` RENAME TO `monitor_old`; 10 + --> statement-breakpoint 11 + 12 + CREATE TABLE `monitor` ( 13 + `id` integer PRIMARY KEY NOT NULL, 14 + `job_type` text(3) DEFAULT 'other' NOT NULL, 15 + `periodicity` text(6) DEFAULT 'other' NOT NULL, 16 + `status` text(2) DEFAULT 'inactive' NOT NULL, 17 + `active` integer DEFAULT false, 18 + `url` text(512) NOT NULL, 19 + `name` text(256) DEFAULT '' NOT NULL, 20 + `description` text DEFAULT '' NOT NULL, 21 + `workspace_id` integer, 22 + `updated_at` integer DEFAULT (strftime('%s', 'now')), 23 + FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE no action ON DELETE no action 24 + ); 25 + --> statement-breakpoint 26 + 27 + INSERT INTO `monitor` SELECT `id`,`job_type`,`periodicity`,`status`,`active`,`url`,`name`,`description`,`workspace_id`,`updated_at` FROM `monitor_old`; 28 + --> statement-breakpoint 29 + 30 + ALTER TABLE `monitors_to_pages` RENAME TO `monitors_to_pages_old`; 31 + --> statement-breakpoint 32 + 33 + CREATE TABLE `monitors_to_pages` ( 34 + `monitor_id` integer NOT NULL, 35 + `page_id` integer NOT NULL, 36 + PRIMARY KEY(`monitor_id`, `page_id`), 37 + FOREIGN KEY (`monitor_id`) REFERENCES `monitor`(`id`) ON UPDATE no action ON DELETE no action, 38 + FOREIGN KEY (`page_id`) REFERENCES `page`(`id`) ON UPDATE no action ON DELETE no action 39 + ); 40 + --> statement-breakpoint 41 + 42 + INSERT INTO `monitors_to_pages` SELECT * FROM `monitors_to_pages_old`; 43 + 44 + 45 + --> statement-breakpoint 46 + DROP TABLE `monitor_old`; 47 + --> statement-breakpoint 48 + 49 + DROP TABLE `monitors_to_pages_old`;
+482
packages/db/drizzle/meta/0001_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "8cf0919d-6852-47b5-ad24-7d9e48504b51", 5 + "prevId": "1c9c9848-d580-4543-9104-566450666ad5", 6 + "tables": { 7 + "incident": { 8 + "name": "incident", 9 + "columns": { 10 + "id": { 11 + "name": "id", 12 + "type": "integer", 13 + "primaryKey": true, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status": { 18 + "name": "status", 19 + "type": "text(2)", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "page_id": { 25 + "name": "page_id", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": true, 29 + "autoincrement": false 30 + }, 31 + "updated_at": { 32 + "name": "updated_at", 33 + "type": "integer", 34 + "primaryKey": false, 35 + "notNull": false, 36 + "autoincrement": false, 37 + "default": "(strftime('%s', 'now'))" 38 + } 39 + }, 40 + "indexes": {}, 41 + "foreignKeys": { 42 + "incident_page_id_page_id_fk": { 43 + "name": "incident_page_id_page_id_fk", 44 + "tableFrom": "incident", 45 + "tableTo": "page", 46 + "columnsFrom": [ 47 + "page_id" 48 + ], 49 + "columnsTo": [ 50 + "id" 51 + ], 52 + "onDelete": "no action", 53 + "onUpdate": "no action" 54 + } 55 + }, 56 + "compositePrimaryKeys": {}, 57 + "uniqueConstraints": {} 58 + }, 59 + "incident_update": { 60 + "name": "incident_update", 61 + "columns": { 62 + "id": { 63 + "name": "id", 64 + "type": "integer", 65 + "primaryKey": true, 66 + "notNull": true, 67 + "autoincrement": false 68 + }, 69 + "incident_date": { 70 + "name": "incident_date", 71 + "type": "integer", 72 + "primaryKey": false, 73 + "notNull": false, 74 + "autoincrement": false 75 + }, 76 + "title": { 77 + "name": "title", 78 + "type": "text(256)", 79 + "primaryKey": false, 80 + "notNull": false, 81 + "autoincrement": false 82 + }, 83 + "message": { 84 + "name": "message", 85 + "type": "text", 86 + "primaryKey": false, 87 + "notNull": false, 88 + "autoincrement": false 89 + }, 90 + "incident_id": { 91 + "name": "incident_id", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": true, 95 + "autoincrement": false 96 + }, 97 + "updated_at": { 98 + "name": "updated_at", 99 + "type": "integer", 100 + "primaryKey": false, 101 + "notNull": false, 102 + "autoincrement": false, 103 + "default": "(strftime('%s', 'now'))" 104 + } 105 + }, 106 + "indexes": {}, 107 + "foreignKeys": { 108 + "incident_update_incident_id_incident_id_fk": { 109 + "name": "incident_update_incident_id_incident_id_fk", 110 + "tableFrom": "incident_update", 111 + "tableTo": "incident", 112 + "columnsFrom": [ 113 + "incident_id" 114 + ], 115 + "columnsTo": [ 116 + "id" 117 + ], 118 + "onDelete": "no action", 119 + "onUpdate": "no action" 120 + } 121 + }, 122 + "compositePrimaryKeys": {}, 123 + "uniqueConstraints": {} 124 + }, 125 + "page": { 126 + "name": "page", 127 + "columns": { 128 + "id": { 129 + "name": "id", 130 + "type": "integer", 131 + "primaryKey": true, 132 + "notNull": true, 133 + "autoincrement": false 134 + }, 135 + "workspace_id": { 136 + "name": "workspace_id", 137 + "type": "integer", 138 + "primaryKey": false, 139 + "notNull": true, 140 + "autoincrement": false 141 + }, 142 + "title": { 143 + "name": "title", 144 + "type": "text", 145 + "primaryKey": false, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "description": { 150 + "name": "description", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "icon": { 157 + "name": "icon", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": false, 161 + "autoincrement": false 162 + }, 163 + "slug": { 164 + "name": "slug", 165 + "type": "text(256)", 166 + "primaryKey": false, 167 + "notNull": true, 168 + "autoincrement": false 169 + }, 170 + "custom_domain": { 171 + "name": "custom_domain", 172 + "type": "text(256)", 173 + "primaryKey": false, 174 + "notNull": true, 175 + "autoincrement": false 176 + }, 177 + "updated_at": { 178 + "name": "updated_at", 179 + "type": "integer", 180 + "primaryKey": false, 181 + "notNull": false, 182 + "autoincrement": false, 183 + "default": "(strftime('%s', 'now'))" 184 + } 185 + }, 186 + "indexes": { 187 + "page_slug_unique": { 188 + "name": "page_slug_unique", 189 + "columns": [ 190 + "slug" 191 + ], 192 + "isUnique": true 193 + } 194 + }, 195 + "foreignKeys": { 196 + "page_workspace_id_workspace_id_fk": { 197 + "name": "page_workspace_id_workspace_id_fk", 198 + "tableFrom": "page", 199 + "tableTo": "workspace", 200 + "columnsFrom": [ 201 + "workspace_id" 202 + ], 203 + "columnsTo": [ 204 + "id" 205 + ], 206 + "onDelete": "no action", 207 + "onUpdate": "no action" 208 + } 209 + }, 210 + "compositePrimaryKeys": {}, 211 + "uniqueConstraints": {} 212 + }, 213 + "monitor": { 214 + "name": "monitor", 215 + "columns": { 216 + "id": { 217 + "name": "id", 218 + "type": "integer", 219 + "primaryKey": true, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "job_type": { 224 + "name": "job_type", 225 + "type": "text(3)", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false, 229 + "default": "'other'" 230 + }, 231 + "periodicity": { 232 + "name": "periodicity", 233 + "type": "text(6)", 234 + "primaryKey": false, 235 + "notNull": true, 236 + "autoincrement": false, 237 + "default": "'other'" 238 + }, 239 + "status": { 240 + "name": "status", 241 + "type": "text(2)", 242 + "primaryKey": false, 243 + "notNull": true, 244 + "autoincrement": false, 245 + "default": "'inactive'" 246 + }, 247 + "active": { 248 + "name": "active", 249 + "type": "integer", 250 + "primaryKey": false, 251 + "notNull": false, 252 + "autoincrement": false, 253 + "default": false 254 + }, 255 + "url": { 256 + "name": "url", 257 + "type": "text(512)", 258 + "primaryKey": false, 259 + "notNull": true, 260 + "autoincrement": false 261 + }, 262 + "name": { 263 + "name": "name", 264 + "type": "text(256)", 265 + "primaryKey": false, 266 + "notNull": true, 267 + "autoincrement": false, 268 + "default": "''" 269 + }, 270 + "description": { 271 + "name": "description", 272 + "type": "text", 273 + "primaryKey": false, 274 + "notNull": true, 275 + "autoincrement": false, 276 + "default": "''" 277 + }, 278 + "page_id": { 279 + "name": "page_id", 280 + "type": "integer", 281 + "primaryKey": false, 282 + "notNull": false, 283 + "autoincrement": false 284 + }, 285 + "workspace_id": { 286 + "name": "workspace_id", 287 + "type": "integer", 288 + "primaryKey": false, 289 + "notNull": false, 290 + "autoincrement": false 291 + }, 292 + "updated_at": { 293 + "name": "updated_at", 294 + "type": "integer", 295 + "primaryKey": false, 296 + "notNull": false, 297 + "autoincrement": false, 298 + "default": "(strftime('%s', 'now'))" 299 + } 300 + }, 301 + "indexes": {}, 302 + "foreignKeys": { 303 + "monitor_page_id_page_id_fk": { 304 + "name": "monitor_page_id_page_id_fk", 305 + "tableFrom": "monitor", 306 + "tableTo": "page", 307 + "columnsFrom": [ 308 + "page_id" 309 + ], 310 + "columnsTo": [ 311 + "id" 312 + ], 313 + "onDelete": "no action", 314 + "onUpdate": "no action" 315 + }, 316 + "monitor_workspace_id_workspace_id_fk": { 317 + "name": "monitor_workspace_id_workspace_id_fk", 318 + "tableFrom": "monitor", 319 + "tableTo": "workspace", 320 + "columnsFrom": [ 321 + "workspace_id" 322 + ], 323 + "columnsTo": [ 324 + "id" 325 + ], 326 + "onDelete": "no action", 327 + "onUpdate": "no action" 328 + } 329 + }, 330 + "compositePrimaryKeys": {}, 331 + "uniqueConstraints": {} 332 + }, 333 + "user": { 334 + "name": "user", 335 + "columns": { 336 + "id": { 337 + "name": "id", 338 + "type": "integer", 339 + "primaryKey": true, 340 + "notNull": true, 341 + "autoincrement": false 342 + }, 343 + "tenant_id": { 344 + "name": "tenant_id", 345 + "type": "text(256)", 346 + "primaryKey": false, 347 + "notNull": false, 348 + "autoincrement": false 349 + }, 350 + "updated_at": { 351 + "name": "updated_at", 352 + "type": "integer", 353 + "primaryKey": false, 354 + "notNull": false, 355 + "autoincrement": false, 356 + "default": "(strftime('%s', 'now'))" 357 + } 358 + }, 359 + "indexes": { 360 + "user_tenant_id_unique": { 361 + "name": "user_tenant_id_unique", 362 + "columns": [ 363 + "tenant_id" 364 + ], 365 + "isUnique": true 366 + } 367 + }, 368 + "foreignKeys": {}, 369 + "compositePrimaryKeys": {}, 370 + "uniqueConstraints": {} 371 + }, 372 + "users_to_workspaces": { 373 + "name": "users_to_workspaces", 374 + "columns": { 375 + "user_id": { 376 + "name": "user_id", 377 + "type": "integer", 378 + "primaryKey": false, 379 + "notNull": true, 380 + "autoincrement": false 381 + }, 382 + "workspace_id": { 383 + "name": "workspace_id", 384 + "type": "integer", 385 + "primaryKey": false, 386 + "notNull": true, 387 + "autoincrement": false 388 + } 389 + }, 390 + "indexes": {}, 391 + "foreignKeys": { 392 + "users_to_workspaces_user_id_user_id_fk": { 393 + "name": "users_to_workspaces_user_id_user_id_fk", 394 + "tableFrom": "users_to_workspaces", 395 + "tableTo": "user", 396 + "columnsFrom": [ 397 + "user_id" 398 + ], 399 + "columnsTo": [ 400 + "id" 401 + ], 402 + "onDelete": "no action", 403 + "onUpdate": "no action" 404 + }, 405 + "users_to_workspaces_workspace_id_workspace_id_fk": { 406 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 407 + "tableFrom": "users_to_workspaces", 408 + "tableTo": "workspace", 409 + "columnsFrom": [ 410 + "workspace_id" 411 + ], 412 + "columnsTo": [ 413 + "id" 414 + ], 415 + "onDelete": "no action", 416 + "onUpdate": "no action" 417 + } 418 + }, 419 + "compositePrimaryKeys": { 420 + "users_to_workspaces_user_id_workspace_id_pk": { 421 + "columns": [ 422 + "user_id", 423 + "workspace_id" 424 + ] 425 + } 426 + }, 427 + "uniqueConstraints": {} 428 + }, 429 + "workspace": { 430 + "name": "workspace", 431 + "columns": { 432 + "id": { 433 + "name": "id", 434 + "type": "integer", 435 + "primaryKey": true, 436 + "notNull": true, 437 + "autoincrement": false 438 + }, 439 + "stripe_id": { 440 + "name": "stripe_id", 441 + "type": "text(256)", 442 + "primaryKey": false, 443 + "notNull": false, 444 + "autoincrement": false 445 + }, 446 + "name": { 447 + "name": "name", 448 + "type": "text", 449 + "primaryKey": false, 450 + "notNull": false, 451 + "autoincrement": false 452 + }, 453 + "updated_at": { 454 + "name": "updated_at", 455 + "type": "integer", 456 + "primaryKey": false, 457 + "notNull": false, 458 + "autoincrement": false, 459 + "default": "(strftime('%s', 'now'))" 460 + } 461 + }, 462 + "indexes": { 463 + "workspace_stripe_id_unique": { 464 + "name": "workspace_stripe_id_unique", 465 + "columns": [ 466 + "stripe_id" 467 + ], 468 + "isUnique": true 469 + } 470 + }, 471 + "foreignKeys": {}, 472 + "compositePrimaryKeys": {}, 473 + "uniqueConstraints": {} 474 + } 475 + }, 476 + "enums": {}, 477 + "_meta": { 478 + "schemas": {}, 479 + "tables": {}, 480 + "columns": {} 481 + } 482 + }
+539
packages/db/drizzle/meta/0002_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "473566b5-0c33-467b-8a08-16bf6760c961", 5 + "prevId": "8cf0919d-6852-47b5-ad24-7d9e48504b51", 6 + "tables": { 7 + "incident": { 8 + "name": "incident", 9 + "columns": { 10 + "id": { 11 + "name": "id", 12 + "type": "integer", 13 + "primaryKey": true, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status": { 18 + "name": "status", 19 + "type": "text(2)", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "page_id": { 25 + "name": "page_id", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": true, 29 + "autoincrement": false 30 + }, 31 + "updated_at": { 32 + "name": "updated_at", 33 + "type": "integer", 34 + "primaryKey": false, 35 + "notNull": false, 36 + "autoincrement": false, 37 + "default": "(strftime('%s', 'now'))" 38 + } 39 + }, 40 + "indexes": {}, 41 + "foreignKeys": { 42 + "incident_page_id_page_id_fk": { 43 + "name": "incident_page_id_page_id_fk", 44 + "tableFrom": "incident", 45 + "tableTo": "page", 46 + "columnsFrom": [ 47 + "page_id" 48 + ], 49 + "columnsTo": [ 50 + "id" 51 + ], 52 + "onDelete": "no action", 53 + "onUpdate": "no action" 54 + } 55 + }, 56 + "compositePrimaryKeys": {}, 57 + "uniqueConstraints": {} 58 + }, 59 + "incident_update": { 60 + "name": "incident_update", 61 + "columns": { 62 + "id": { 63 + "name": "id", 64 + "type": "integer", 65 + "primaryKey": true, 66 + "notNull": true, 67 + "autoincrement": false 68 + }, 69 + "incident_date": { 70 + "name": "incident_date", 71 + "type": "integer", 72 + "primaryKey": false, 73 + "notNull": false, 74 + "autoincrement": false 75 + }, 76 + "title": { 77 + "name": "title", 78 + "type": "text(256)", 79 + "primaryKey": false, 80 + "notNull": false, 81 + "autoincrement": false 82 + }, 83 + "message": { 84 + "name": "message", 85 + "type": "text", 86 + "primaryKey": false, 87 + "notNull": false, 88 + "autoincrement": false 89 + }, 90 + "incident_id": { 91 + "name": "incident_id", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": true, 95 + "autoincrement": false 96 + }, 97 + "updated_at": { 98 + "name": "updated_at", 99 + "type": "integer", 100 + "primaryKey": false, 101 + "notNull": false, 102 + "autoincrement": false, 103 + "default": "(strftime('%s', 'now'))" 104 + } 105 + }, 106 + "indexes": {}, 107 + "foreignKeys": { 108 + "incident_update_incident_id_incident_id_fk": { 109 + "name": "incident_update_incident_id_incident_id_fk", 110 + "tableFrom": "incident_update", 111 + "tableTo": "incident", 112 + "columnsFrom": [ 113 + "incident_id" 114 + ], 115 + "columnsTo": [ 116 + "id" 117 + ], 118 + "onDelete": "no action", 119 + "onUpdate": "no action" 120 + } 121 + }, 122 + "compositePrimaryKeys": {}, 123 + "uniqueConstraints": {} 124 + }, 125 + "page": { 126 + "name": "page", 127 + "columns": { 128 + "id": { 129 + "name": "id", 130 + "type": "integer", 131 + "primaryKey": true, 132 + "notNull": true, 133 + "autoincrement": false 134 + }, 135 + "workspace_id": { 136 + "name": "workspace_id", 137 + "type": "integer", 138 + "primaryKey": false, 139 + "notNull": true, 140 + "autoincrement": false 141 + }, 142 + "title": { 143 + "name": "title", 144 + "type": "text", 145 + "primaryKey": false, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "description": { 150 + "name": "description", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "icon": { 157 + "name": "icon", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": false, 161 + "autoincrement": false 162 + }, 163 + "slug": { 164 + "name": "slug", 165 + "type": "text(256)", 166 + "primaryKey": false, 167 + "notNull": true, 168 + "autoincrement": false 169 + }, 170 + "custom_domain": { 171 + "name": "custom_domain", 172 + "type": "text(256)", 173 + "primaryKey": false, 174 + "notNull": true, 175 + "autoincrement": false 176 + }, 177 + "updated_at": { 178 + "name": "updated_at", 179 + "type": "integer", 180 + "primaryKey": false, 181 + "notNull": false, 182 + "autoincrement": false, 183 + "default": "(strftime('%s', 'now'))" 184 + } 185 + }, 186 + "indexes": { 187 + "page_slug_unique": { 188 + "name": "page_slug_unique", 189 + "columns": [ 190 + "slug" 191 + ], 192 + "isUnique": true 193 + } 194 + }, 195 + "foreignKeys": { 196 + "page_workspace_id_workspace_id_fk": { 197 + "name": "page_workspace_id_workspace_id_fk", 198 + "tableFrom": "page", 199 + "tableTo": "workspace", 200 + "columnsFrom": [ 201 + "workspace_id" 202 + ], 203 + "columnsTo": [ 204 + "id" 205 + ], 206 + "onDelete": "no action", 207 + "onUpdate": "no action" 208 + } 209 + }, 210 + "compositePrimaryKeys": {}, 211 + "uniqueConstraints": {} 212 + }, 213 + "monitor": { 214 + "name": "monitor", 215 + "columns": { 216 + "id": { 217 + "name": "id", 218 + "type": "integer", 219 + "primaryKey": true, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "job_type": { 224 + "name": "job_type", 225 + "type": "text(3)", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false, 229 + "default": "'other'" 230 + }, 231 + "periodicity": { 232 + "name": "periodicity", 233 + "type": "text(6)", 234 + "primaryKey": false, 235 + "notNull": true, 236 + "autoincrement": false, 237 + "default": "'other'" 238 + }, 239 + "status": { 240 + "name": "status", 241 + "type": "text(2)", 242 + "primaryKey": false, 243 + "notNull": true, 244 + "autoincrement": false, 245 + "default": "'inactive'" 246 + }, 247 + "active": { 248 + "name": "active", 249 + "type": "integer", 250 + "primaryKey": false, 251 + "notNull": false, 252 + "autoincrement": false, 253 + "default": false 254 + }, 255 + "url": { 256 + "name": "url", 257 + "type": "text(512)", 258 + "primaryKey": false, 259 + "notNull": true, 260 + "autoincrement": false 261 + }, 262 + "name": { 263 + "name": "name", 264 + "type": "text(256)", 265 + "primaryKey": false, 266 + "notNull": true, 267 + "autoincrement": false, 268 + "default": "''" 269 + }, 270 + "description": { 271 + "name": "description", 272 + "type": "text", 273 + "primaryKey": false, 274 + "notNull": true, 275 + "autoincrement": false, 276 + "default": "''" 277 + }, 278 + "page_id": { 279 + "name": "page_id", 280 + "type": "integer", 281 + "primaryKey": false, 282 + "notNull": false, 283 + "autoincrement": false 284 + }, 285 + "workspace_id": { 286 + "name": "workspace_id", 287 + "type": "integer", 288 + "primaryKey": false, 289 + "notNull": false, 290 + "autoincrement": false 291 + }, 292 + "updated_at": { 293 + "name": "updated_at", 294 + "type": "integer", 295 + "primaryKey": false, 296 + "notNull": false, 297 + "autoincrement": false, 298 + "default": "(strftime('%s', 'now'))" 299 + } 300 + }, 301 + "indexes": {}, 302 + "foreignKeys": { 303 + "monitor_page_id_page_id_fk": { 304 + "name": "monitor_page_id_page_id_fk", 305 + "tableFrom": "monitor", 306 + "tableTo": "page", 307 + "columnsFrom": [ 308 + "page_id" 309 + ], 310 + "columnsTo": [ 311 + "id" 312 + ], 313 + "onDelete": "no action", 314 + "onUpdate": "no action" 315 + }, 316 + "monitor_workspace_id_workspace_id_fk": { 317 + "name": "monitor_workspace_id_workspace_id_fk", 318 + "tableFrom": "monitor", 319 + "tableTo": "workspace", 320 + "columnsFrom": [ 321 + "workspace_id" 322 + ], 323 + "columnsTo": [ 324 + "id" 325 + ], 326 + "onDelete": "no action", 327 + "onUpdate": "no action" 328 + } 329 + }, 330 + "compositePrimaryKeys": {}, 331 + "uniqueConstraints": {} 332 + }, 333 + "monitors_to_pages": { 334 + "name": "monitors_to_pages", 335 + "columns": { 336 + "monitor_id": { 337 + "name": "monitor_id", 338 + "type": "integer", 339 + "primaryKey": false, 340 + "notNull": true, 341 + "autoincrement": false 342 + }, 343 + "page_id": { 344 + "name": "page_id", 345 + "type": "integer", 346 + "primaryKey": false, 347 + "notNull": true, 348 + "autoincrement": false 349 + } 350 + }, 351 + "indexes": {}, 352 + "foreignKeys": { 353 + "monitors_to_pages_monitor_id_monitor_id_fk": { 354 + "name": "monitors_to_pages_monitor_id_monitor_id_fk", 355 + "tableFrom": "monitors_to_pages", 356 + "tableTo": "monitor", 357 + "columnsFrom": [ 358 + "monitor_id" 359 + ], 360 + "columnsTo": [ 361 + "id" 362 + ], 363 + "onDelete": "no action", 364 + "onUpdate": "no action" 365 + }, 366 + "monitors_to_pages_page_id_page_id_fk": { 367 + "name": "monitors_to_pages_page_id_page_id_fk", 368 + "tableFrom": "monitors_to_pages", 369 + "tableTo": "page", 370 + "columnsFrom": [ 371 + "page_id" 372 + ], 373 + "columnsTo": [ 374 + "id" 375 + ], 376 + "onDelete": "no action", 377 + "onUpdate": "no action" 378 + } 379 + }, 380 + "compositePrimaryKeys": { 381 + "monitors_to_pages_monitor_id_page_id_pk": { 382 + "columns": [ 383 + "monitor_id", 384 + "page_id" 385 + ] 386 + } 387 + }, 388 + "uniqueConstraints": {} 389 + }, 390 + "user": { 391 + "name": "user", 392 + "columns": { 393 + "id": { 394 + "name": "id", 395 + "type": "integer", 396 + "primaryKey": true, 397 + "notNull": true, 398 + "autoincrement": false 399 + }, 400 + "tenant_id": { 401 + "name": "tenant_id", 402 + "type": "text(256)", 403 + "primaryKey": false, 404 + "notNull": false, 405 + "autoincrement": false 406 + }, 407 + "updated_at": { 408 + "name": "updated_at", 409 + "type": "integer", 410 + "primaryKey": false, 411 + "notNull": false, 412 + "autoincrement": false, 413 + "default": "(strftime('%s', 'now'))" 414 + } 415 + }, 416 + "indexes": { 417 + "user_tenant_id_unique": { 418 + "name": "user_tenant_id_unique", 419 + "columns": [ 420 + "tenant_id" 421 + ], 422 + "isUnique": true 423 + } 424 + }, 425 + "foreignKeys": {}, 426 + "compositePrimaryKeys": {}, 427 + "uniqueConstraints": {} 428 + }, 429 + "users_to_workspaces": { 430 + "name": "users_to_workspaces", 431 + "columns": { 432 + "user_id": { 433 + "name": "user_id", 434 + "type": "integer", 435 + "primaryKey": false, 436 + "notNull": true, 437 + "autoincrement": false 438 + }, 439 + "workspace_id": { 440 + "name": "workspace_id", 441 + "type": "integer", 442 + "primaryKey": false, 443 + "notNull": true, 444 + "autoincrement": false 445 + } 446 + }, 447 + "indexes": {}, 448 + "foreignKeys": { 449 + "users_to_workspaces_user_id_user_id_fk": { 450 + "name": "users_to_workspaces_user_id_user_id_fk", 451 + "tableFrom": "users_to_workspaces", 452 + "tableTo": "user", 453 + "columnsFrom": [ 454 + "user_id" 455 + ], 456 + "columnsTo": [ 457 + "id" 458 + ], 459 + "onDelete": "no action", 460 + "onUpdate": "no action" 461 + }, 462 + "users_to_workspaces_workspace_id_workspace_id_fk": { 463 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 464 + "tableFrom": "users_to_workspaces", 465 + "tableTo": "workspace", 466 + "columnsFrom": [ 467 + "workspace_id" 468 + ], 469 + "columnsTo": [ 470 + "id" 471 + ], 472 + "onDelete": "no action", 473 + "onUpdate": "no action" 474 + } 475 + }, 476 + "compositePrimaryKeys": { 477 + "users_to_workspaces_user_id_workspace_id_pk": { 478 + "columns": [ 479 + "user_id", 480 + "workspace_id" 481 + ] 482 + } 483 + }, 484 + "uniqueConstraints": {} 485 + }, 486 + "workspace": { 487 + "name": "workspace", 488 + "columns": { 489 + "id": { 490 + "name": "id", 491 + "type": "integer", 492 + "primaryKey": true, 493 + "notNull": true, 494 + "autoincrement": false 495 + }, 496 + "stripe_id": { 497 + "name": "stripe_id", 498 + "type": "text(256)", 499 + "primaryKey": false, 500 + "notNull": false, 501 + "autoincrement": false 502 + }, 503 + "name": { 504 + "name": "name", 505 + "type": "text", 506 + "primaryKey": false, 507 + "notNull": false, 508 + "autoincrement": false 509 + }, 510 + "updated_at": { 511 + "name": "updated_at", 512 + "type": "integer", 513 + "primaryKey": false, 514 + "notNull": false, 515 + "autoincrement": false, 516 + "default": "(strftime('%s', 'now'))" 517 + } 518 + }, 519 + "indexes": { 520 + "workspace_stripe_id_unique": { 521 + "name": "workspace_stripe_id_unique", 522 + "columns": [ 523 + "stripe_id" 524 + ], 525 + "isUnique": true 526 + } 527 + }, 528 + "foreignKeys": {}, 529 + "compositePrimaryKeys": {}, 530 + "uniqueConstraints": {} 531 + } 532 + }, 533 + "enums": {}, 534 + "_meta": { 535 + "schemas": {}, 536 + "tables": {}, 537 + "columns": {} 538 + } 539 + }
+519
packages/db/drizzle/meta/0003_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "d6e08620-b030-4de6-ba58-cdfe94c47878", 5 + "prevId": "473566b5-0c33-467b-8a08-16bf6760c961", 6 + "tables": { 7 + "incident": { 8 + "name": "incident", 9 + "columns": { 10 + "id": { 11 + "name": "id", 12 + "type": "integer", 13 + "primaryKey": true, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status": { 18 + "name": "status", 19 + "type": "text(2)", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "page_id": { 25 + "name": "page_id", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": true, 29 + "autoincrement": false 30 + }, 31 + "updated_at": { 32 + "name": "updated_at", 33 + "type": "integer", 34 + "primaryKey": false, 35 + "notNull": false, 36 + "autoincrement": false, 37 + "default": "(strftime('%s', 'now'))" 38 + } 39 + }, 40 + "indexes": {}, 41 + "foreignKeys": { 42 + "incident_page_id_page_id_fk": { 43 + "name": "incident_page_id_page_id_fk", 44 + "tableFrom": "incident", 45 + "tableTo": "page", 46 + "columnsFrom": [ 47 + "page_id" 48 + ], 49 + "columnsTo": [ 50 + "id" 51 + ], 52 + "onDelete": "no action", 53 + "onUpdate": "no action" 54 + } 55 + }, 56 + "compositePrimaryKeys": {}, 57 + "uniqueConstraints": {} 58 + }, 59 + "incident_update": { 60 + "name": "incident_update", 61 + "columns": { 62 + "id": { 63 + "name": "id", 64 + "type": "integer", 65 + "primaryKey": true, 66 + "notNull": true, 67 + "autoincrement": false 68 + }, 69 + "incident_date": { 70 + "name": "incident_date", 71 + "type": "integer", 72 + "primaryKey": false, 73 + "notNull": false, 74 + "autoincrement": false 75 + }, 76 + "title": { 77 + "name": "title", 78 + "type": "text(256)", 79 + "primaryKey": false, 80 + "notNull": false, 81 + "autoincrement": false 82 + }, 83 + "message": { 84 + "name": "message", 85 + "type": "text", 86 + "primaryKey": false, 87 + "notNull": false, 88 + "autoincrement": false 89 + }, 90 + "incident_id": { 91 + "name": "incident_id", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": true, 95 + "autoincrement": false 96 + }, 97 + "updated_at": { 98 + "name": "updated_at", 99 + "type": "integer", 100 + "primaryKey": false, 101 + "notNull": false, 102 + "autoincrement": false, 103 + "default": "(strftime('%s', 'now'))" 104 + } 105 + }, 106 + "indexes": {}, 107 + "foreignKeys": { 108 + "incident_update_incident_id_incident_id_fk": { 109 + "name": "incident_update_incident_id_incident_id_fk", 110 + "tableFrom": "incident_update", 111 + "tableTo": "incident", 112 + "columnsFrom": [ 113 + "incident_id" 114 + ], 115 + "columnsTo": [ 116 + "id" 117 + ], 118 + "onDelete": "no action", 119 + "onUpdate": "no action" 120 + } 121 + }, 122 + "compositePrimaryKeys": {}, 123 + "uniqueConstraints": {} 124 + }, 125 + "page": { 126 + "name": "page", 127 + "columns": { 128 + "id": { 129 + "name": "id", 130 + "type": "integer", 131 + "primaryKey": true, 132 + "notNull": true, 133 + "autoincrement": false 134 + }, 135 + "workspace_id": { 136 + "name": "workspace_id", 137 + "type": "integer", 138 + "primaryKey": false, 139 + "notNull": true, 140 + "autoincrement": false 141 + }, 142 + "title": { 143 + "name": "title", 144 + "type": "text", 145 + "primaryKey": false, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "description": { 150 + "name": "description", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "icon": { 157 + "name": "icon", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": false, 161 + "autoincrement": false 162 + }, 163 + "slug": { 164 + "name": "slug", 165 + "type": "text(256)", 166 + "primaryKey": false, 167 + "notNull": true, 168 + "autoincrement": false 169 + }, 170 + "custom_domain": { 171 + "name": "custom_domain", 172 + "type": "text(256)", 173 + "primaryKey": false, 174 + "notNull": true, 175 + "autoincrement": false 176 + }, 177 + "updated_at": { 178 + "name": "updated_at", 179 + "type": "integer", 180 + "primaryKey": false, 181 + "notNull": false, 182 + "autoincrement": false, 183 + "default": "(strftime('%s', 'now'))" 184 + } 185 + }, 186 + "indexes": { 187 + "page_slug_unique": { 188 + "name": "page_slug_unique", 189 + "columns": [ 190 + "slug" 191 + ], 192 + "isUnique": true 193 + } 194 + }, 195 + "foreignKeys": { 196 + "page_workspace_id_workspace_id_fk": { 197 + "name": "page_workspace_id_workspace_id_fk", 198 + "tableFrom": "page", 199 + "tableTo": "workspace", 200 + "columnsFrom": [ 201 + "workspace_id" 202 + ], 203 + "columnsTo": [ 204 + "id" 205 + ], 206 + "onDelete": "no action", 207 + "onUpdate": "no action" 208 + } 209 + }, 210 + "compositePrimaryKeys": {}, 211 + "uniqueConstraints": {} 212 + }, 213 + "monitor": { 214 + "name": "monitor", 215 + "columns": { 216 + "id": { 217 + "name": "id", 218 + "type": "integer", 219 + "primaryKey": true, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "job_type": { 224 + "name": "job_type", 225 + "type": "text(3)", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false, 229 + "default": "'other'" 230 + }, 231 + "periodicity": { 232 + "name": "periodicity", 233 + "type": "text(6)", 234 + "primaryKey": false, 235 + "notNull": true, 236 + "autoincrement": false, 237 + "default": "'other'" 238 + }, 239 + "status": { 240 + "name": "status", 241 + "type": "text(2)", 242 + "primaryKey": false, 243 + "notNull": true, 244 + "autoincrement": false, 245 + "default": "'inactive'" 246 + }, 247 + "active": { 248 + "name": "active", 249 + "type": "integer", 250 + "primaryKey": false, 251 + "notNull": false, 252 + "autoincrement": false, 253 + "default": false 254 + }, 255 + "url": { 256 + "name": "url", 257 + "type": "text(512)", 258 + "primaryKey": false, 259 + "notNull": true, 260 + "autoincrement": false 261 + }, 262 + "name": { 263 + "name": "name", 264 + "type": "text(256)", 265 + "primaryKey": false, 266 + "notNull": true, 267 + "autoincrement": false, 268 + "default": "''" 269 + }, 270 + "description": { 271 + "name": "description", 272 + "type": "text", 273 + "primaryKey": false, 274 + "notNull": true, 275 + "autoincrement": false, 276 + "default": "''" 277 + }, 278 + "workspace_id": { 279 + "name": "workspace_id", 280 + "type": "integer", 281 + "primaryKey": false, 282 + "notNull": false, 283 + "autoincrement": false 284 + }, 285 + "updated_at": { 286 + "name": "updated_at", 287 + "type": "integer", 288 + "primaryKey": false, 289 + "notNull": false, 290 + "autoincrement": false, 291 + "default": "(strftime('%s', 'now'))" 292 + } 293 + }, 294 + "indexes": {}, 295 + "foreignKeys": { 296 + "monitor_workspace_id_workspace_id_fk": { 297 + "name": "monitor_workspace_id_workspace_id_fk", 298 + "tableFrom": "monitor", 299 + "tableTo": "workspace", 300 + "columnsFrom": [ 301 + "workspace_id" 302 + ], 303 + "columnsTo": [ 304 + "id" 305 + ], 306 + "onDelete": "no action", 307 + "onUpdate": "no action" 308 + } 309 + }, 310 + "compositePrimaryKeys": {}, 311 + "uniqueConstraints": {} 312 + }, 313 + "monitors_to_pages": { 314 + "name": "monitors_to_pages", 315 + "columns": { 316 + "monitor_id": { 317 + "name": "monitor_id", 318 + "type": "integer", 319 + "primaryKey": false, 320 + "notNull": true, 321 + "autoincrement": false 322 + }, 323 + "page_id": { 324 + "name": "page_id", 325 + "type": "integer", 326 + "primaryKey": false, 327 + "notNull": true, 328 + "autoincrement": false 329 + } 330 + }, 331 + "indexes": {}, 332 + "foreignKeys": { 333 + "monitors_to_pages_monitor_id_monitor_id_fk": { 334 + "name": "monitors_to_pages_monitor_id_monitor_id_fk", 335 + "tableFrom": "monitors_to_pages", 336 + "tableTo": "monitor", 337 + "columnsFrom": [ 338 + "monitor_id" 339 + ], 340 + "columnsTo": [ 341 + "id" 342 + ], 343 + "onDelete": "no action", 344 + "onUpdate": "no action" 345 + }, 346 + "monitors_to_pages_page_id_page_id_fk": { 347 + "name": "monitors_to_pages_page_id_page_id_fk", 348 + "tableFrom": "monitors_to_pages", 349 + "tableTo": "page", 350 + "columnsFrom": [ 351 + "page_id" 352 + ], 353 + "columnsTo": [ 354 + "id" 355 + ], 356 + "onDelete": "no action", 357 + "onUpdate": "no action" 358 + } 359 + }, 360 + "compositePrimaryKeys": { 361 + "monitors_to_pages_monitor_id_page_id_pk": { 362 + "columns": [ 363 + "monitor_id", 364 + "page_id" 365 + ] 366 + } 367 + }, 368 + "uniqueConstraints": {} 369 + }, 370 + "user": { 371 + "name": "user", 372 + "columns": { 373 + "id": { 374 + "name": "id", 375 + "type": "integer", 376 + "primaryKey": true, 377 + "notNull": true, 378 + "autoincrement": false 379 + }, 380 + "tenant_id": { 381 + "name": "tenant_id", 382 + "type": "text(256)", 383 + "primaryKey": false, 384 + "notNull": false, 385 + "autoincrement": false 386 + }, 387 + "updated_at": { 388 + "name": "updated_at", 389 + "type": "integer", 390 + "primaryKey": false, 391 + "notNull": false, 392 + "autoincrement": false, 393 + "default": "(strftime('%s', 'now'))" 394 + } 395 + }, 396 + "indexes": { 397 + "user_tenant_id_unique": { 398 + "name": "user_tenant_id_unique", 399 + "columns": [ 400 + "tenant_id" 401 + ], 402 + "isUnique": true 403 + } 404 + }, 405 + "foreignKeys": {}, 406 + "compositePrimaryKeys": {}, 407 + "uniqueConstraints": {} 408 + }, 409 + "users_to_workspaces": { 410 + "name": "users_to_workspaces", 411 + "columns": { 412 + "user_id": { 413 + "name": "user_id", 414 + "type": "integer", 415 + "primaryKey": false, 416 + "notNull": true, 417 + "autoincrement": false 418 + }, 419 + "workspace_id": { 420 + "name": "workspace_id", 421 + "type": "integer", 422 + "primaryKey": false, 423 + "notNull": true, 424 + "autoincrement": false 425 + } 426 + }, 427 + "indexes": {}, 428 + "foreignKeys": { 429 + "users_to_workspaces_user_id_user_id_fk": { 430 + "name": "users_to_workspaces_user_id_user_id_fk", 431 + "tableFrom": "users_to_workspaces", 432 + "tableTo": "user", 433 + "columnsFrom": [ 434 + "user_id" 435 + ], 436 + "columnsTo": [ 437 + "id" 438 + ], 439 + "onDelete": "no action", 440 + "onUpdate": "no action" 441 + }, 442 + "users_to_workspaces_workspace_id_workspace_id_fk": { 443 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 444 + "tableFrom": "users_to_workspaces", 445 + "tableTo": "workspace", 446 + "columnsFrom": [ 447 + "workspace_id" 448 + ], 449 + "columnsTo": [ 450 + "id" 451 + ], 452 + "onDelete": "no action", 453 + "onUpdate": "no action" 454 + } 455 + }, 456 + "compositePrimaryKeys": { 457 + "users_to_workspaces_user_id_workspace_id_pk": { 458 + "columns": [ 459 + "user_id", 460 + "workspace_id" 461 + ] 462 + } 463 + }, 464 + "uniqueConstraints": {} 465 + }, 466 + "workspace": { 467 + "name": "workspace", 468 + "columns": { 469 + "id": { 470 + "name": "id", 471 + "type": "integer", 472 + "primaryKey": true, 473 + "notNull": true, 474 + "autoincrement": false 475 + }, 476 + "stripe_id": { 477 + "name": "stripe_id", 478 + "type": "text(256)", 479 + "primaryKey": false, 480 + "notNull": false, 481 + "autoincrement": false 482 + }, 483 + "name": { 484 + "name": "name", 485 + "type": "text", 486 + "primaryKey": false, 487 + "notNull": false, 488 + "autoincrement": false 489 + }, 490 + "updated_at": { 491 + "name": "updated_at", 492 + "type": "integer", 493 + "primaryKey": false, 494 + "notNull": false, 495 + "autoincrement": false, 496 + "default": "(strftime('%s', 'now'))" 497 + } 498 + }, 499 + "indexes": { 500 + "workspace_stripe_id_unique": { 501 + "name": "workspace_stripe_id_unique", 502 + "columns": [ 503 + "stripe_id" 504 + ], 505 + "isUnique": true 506 + } 507 + }, 508 + "foreignKeys": {}, 509 + "compositePrimaryKeys": {}, 510 + "uniqueConstraints": {} 511 + } 512 + }, 513 + "enums": {}, 514 + "_meta": { 515 + "schemas": {}, 516 + "tables": {}, 517 + "columns": {} 518 + } 519 + }
+21
packages/db/drizzle/meta/_journal.json
··· 8 8 "when": 1690046393803, 9 9 "tag": "0000_nebulous_shape", 10 10 "breakpoints": true 11 + }, 12 + { 13 + "idx": 1, 14 + "version": "5", 15 + "when": 1690052668260, 16 + "tag": "0001_dry_hammerhead", 17 + "breakpoints": true 18 + }, 19 + { 20 + "idx": 2, 21 + "version": "5", 22 + "when": 1690056788155, 23 + "tag": "0002_strong_mister_sinister", 24 + "breakpoints": true 25 + }, 26 + { 27 + "idx": 3, 28 + "version": "5", 29 + "when": 1690126549474, 30 + "tag": "0003_windy_lionheart", 31 + "breakpoints": true 11 32 } 12 33 ] 13 34 }
+39 -7
packages/db/src/schema/monitor.ts
··· 1 1 import { relations, sql } from "drizzle-orm"; 2 - import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; 2 + import { 3 + integer, 4 + primaryKey, 5 + sqliteTable, 6 + text, 7 + } from "drizzle-orm/sqlite-core"; 3 8 import { createInsertSchema, createSelectSchema } from "drizzle-zod"; 4 9 import { z } from "zod"; 5 10 ··· 22 27 name: text("name", { length: 256 }).default("").notNull(), 23 28 description: text("description").default("").notNull(), 24 29 25 - pageId: integer("page_id").references(() => page.id), 26 30 workspaceId: integer("workspace_id").references(() => workspace.id), 27 31 28 32 createdAt: integer("updated_at", { mode: "timestamp" }).default( ··· 33 37 ), 34 38 }); 35 39 36 - export const monitorRelation = relations(monitor, ({ one }) => ({ 37 - page: one(page, { 38 - fields: [monitor.pageId], 39 - references: [page.id], 40 - }), 40 + export const monitorRelation = relations(monitor, ({ one, many }) => ({ 41 + monitorsToPages: many(monitorsToPages), 41 42 workspace: one(workspace, { 42 43 fields: [monitor.workspaceId], 43 44 references: [workspace.id], 44 45 }), 45 46 })); 46 47 48 + export const monitorsToPages = sqliteTable( 49 + "monitors_to_pages", 50 + { 51 + monitorId: integer("monitor_id") 52 + .notNull() 53 + .references(() => monitor.id), 54 + pageId: integer("page_id") 55 + .notNull() 56 + .references(() => page.id), 57 + }, 58 + (t) => ({ 59 + pk: primaryKey(t.monitorId, t.pageId), 60 + }), 61 + ); 62 + 63 + export const monitorsToPagesRelation = relations( 64 + monitorsToPages, 65 + ({ one }) => ({ 66 + monitor: one(monitor, { 67 + fields: [monitorsToPages.monitorId], 68 + references: [monitor.id], 69 + }), 70 + page: one(page, { 71 + fields: [monitorsToPages.pageId], 72 + references: [page.id], 73 + }), 74 + }), 75 + ); 76 + 47 77 export const periodicityEnum = z.enum([ 48 78 "1m", 49 79 "5m", ··· 67 97 jobType: z.enum(["website", "cron", "other"]).default("other"), 68 98 active: z.boolean().default(false), 69 99 }); 100 + 101 + export const allMonitorsSchema = z.array(selectMonitorSchema);
+8 -7
packages/db/src/schema/page.ts
··· 3 3 import { createInsertSchema, createSelectSchema } from "drizzle-zod"; 4 4 import { z } from "zod"; 5 5 6 - import { incident, selectIncidentSchema } from "./incident"; 7 - import { monitor, selectMonitorSchema } from "./monitor"; 6 + import { incident } from "./incident"; 7 + import { monitorsToPages } from "./monitor"; 8 8 import { workspace } from "./workspace"; 9 9 10 10 export const page = sqliteTable("page", { ··· 18 18 description: text("description").notNull(), // description of the page 19 19 icon: text("icon", { length: 256 }), // icon of the page 20 20 slug: text("slug", { length: 256 }).notNull().unique(), // which is used for https://slug.openstatus.dev 21 - customDomain: text("custom_domain", { length: 256 }) 22 - .notNull() 23 - .default("") 24 - .unique(), 21 + customDomain: text("custom_domain", { length: 256 }).notNull(), 25 22 26 23 createdAt: integer("updated_at", { mode: "timestamp" }).default( 27 24 sql`(strftime('%s', 'now'))`, ··· 32 29 }); 33 30 34 31 export const pageRelations = relations(page, ({ many, one }) => ({ 32 + monitorsToPages: many(monitorsToPages), 35 33 incidents: many(incident), 36 34 workspace: one(workspace, { 37 35 fields: [page.workspaceId], 38 36 references: [workspace.id], 39 37 }), 40 - monitors: many(monitor), 41 38 })); 42 39 43 40 // Schema for inserting a Page - can be used to validate API requests ··· 45 42 customDomain: z.string().optional(), 46 43 }); 47 44 45 + export const insertPageSchemaWithMonitors = insertPageSchema.extend({ 46 + customDomain: z.string().optional().default(""), 47 + monitors: z.array(z.number()).optional(), 48 + }); 48 49 // Schema for selecting a Page - can be used to validate API responses 49 50 export const selectPageSchema = createSelectSchema(page);
+49 -49
pnpm-lock.yaml
··· 46 46 dependencies: 47 47 '@clerk/nextjs': 48 48 specifier: 4.21.14 49 - version: 4.21.14(next@13.4.8)(react-dom@18.2.0)(react@18.2.0) 49 + version: 4.21.14(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) 50 50 '@hookform/resolvers': 51 51 specifier: ^3.1.1 52 52 version: 3.1.1(react-hook-form@7.45.1) ··· 121 121 version: 10.32.0(@trpc/server@10.32.0) 122 122 '@trpc/next': 123 123 specifier: 10.32.0 124 - version: 10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/react-query@10.32.0)(@trpc/server@10.32.0)(next@13.4.8)(react-dom@18.2.0)(react@18.2.0) 124 + version: 10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/react-query@10.32.0)(@trpc/server@10.32.0)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) 125 125 '@trpc/react-query': 126 126 specifier: 10.32.0 127 127 version: 10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/server@10.32.0)(react-dom@18.2.0)(react@18.2.0) ··· 159 159 specifier: ^4.0.2 160 160 version: 4.0.2 161 161 next: 162 - specifier: 13.4.8 163 - version: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 162 + specifier: 13.4.12 163 + version: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 164 164 next-contentlayer: 165 165 specifier: 0.3.4 166 - version: 0.3.4(contentlayer@0.3.4)(esbuild@0.18.10)(next@13.4.8)(react-dom@18.2.0)(react@18.2.0) 166 + version: 0.3.4(contentlayer@0.3.4)(esbuild@0.18.10)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) 167 167 next-plausible: 168 168 specifier: 3.7.2 169 - version: 3.7.2(next@13.4.8)(react-dom@18.2.0)(react@18.2.0) 169 + version: 3.7.2(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) 170 170 react: 171 171 specifier: 18.2.0 172 172 version: 18.2.0 ··· 254 254 dependencies: 255 255 '@clerk/nextjs': 256 256 specifier: 4.21.10 257 - version: 4.21.10(next@13.4.8)(react-dom@18.2.0)(react@18.2.0) 257 + version: 4.21.10(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) 258 258 '@openstatus/db': 259 259 specifier: workspace:^ 260 260 version: link:../db ··· 758 758 tslib: 2.4.1 759 759 dev: false 760 760 761 - /@clerk/nextjs@4.21.10(next@13.4.8)(react-dom@18.2.0)(react@18.2.0): 761 + /@clerk/nextjs@4.21.10(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): 762 762 resolution: {integrity: sha512-5G02qZOBwbYvBxbHVPKpINyhZ1a3TLZ3noBExx5JHo8+UbpEp7ENd1TyFF/oO0EWG/VTbloP1Gegjm2XG9KeKw==} 763 763 engines: {node: '>=14'} 764 764 peerDependencies: ··· 770 770 '@clerk/clerk-react': 4.20.5(react@18.2.0) 771 771 '@clerk/clerk-sdk-node': 4.10.12 772 772 '@clerk/types': 3.46.0 773 - next: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 773 + next: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 774 774 path-to-regexp: 6.2.1 775 775 react: 18.2.0 776 776 react-dom: 18.2.0(react@18.2.0) 777 777 tslib: 2.4.1 778 778 dev: false 779 779 780 - /@clerk/nextjs@4.21.14(next@13.4.8)(react-dom@18.2.0)(react@18.2.0): 780 + /@clerk/nextjs@4.21.14(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): 781 781 resolution: {integrity: sha512-r+s9EKG0CPPj31p6UZmxPQ2A3+JVE70PmBYiC/pRrF3Oo57pYJGVmBB+eUWVYaYJNcJxhYoYb/QLsL8Xl0dUVQ==} 782 782 engines: {node: '>=14'} 783 783 peerDependencies: ··· 789 789 '@clerk/clerk-react': 4.22.0(react@18.2.0) 790 790 '@clerk/clerk-sdk-node': 4.10.15 791 791 '@clerk/types': 3.46.1 792 - next: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 792 + next: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 793 793 path-to-regexp: 6.2.1 794 794 react: 18.2.0 795 795 react-dom: 18.2.0(react@18.2.0) ··· 2090 2090 - supports-color 2091 2091 dev: false 2092 2092 2093 - /@next/env@13.4.8: 2094 - resolution: {integrity: sha512-twuSf1klb3k9wXI7IZhbZGtFCWvGD4wXTY2rmvzIgVhXhs7ISThrbNyutBx3jWIL8Y/Hk9+woytFz5QsgtcRKQ==} 2093 + /@next/env@13.4.12: 2094 + resolution: {integrity: sha512-RmHanbV21saP/6OEPBJ7yJMuys68cIf8OBBWd7+uj40LdpmswVAwe1uzeuFyUsd6SfeITWT3XnQfn6wULeKwDQ==} 2095 2095 dev: false 2096 2096 2097 2097 /@next/eslint-plugin-next@13.4.1: ··· 2100 2100 glob: 7.1.7 2101 2101 dev: false 2102 2102 2103 - /@next/swc-darwin-arm64@13.4.8: 2104 - resolution: {integrity: sha512-MSFplVM4dTWOuKAUv0XR9gY7AWtMSBu9os9f+kp+s5rWhM1I2CdR3obFttd6366nS/W/VZxbPM5oEIdlIa46zA==} 2103 + /@next/swc-darwin-arm64@13.4.12: 2104 + resolution: {integrity: sha512-deUrbCXTMZ6ZhbOoloqecnUeNpUOupi8SE2tx4jPfNS9uyUR9zK4iXBvH65opVcA/9F5I/p8vDXSYbUlbmBjZg==} 2105 2105 engines: {node: '>= 10'} 2106 2106 cpu: [arm64] 2107 2107 os: [darwin] ··· 2109 2109 dev: false 2110 2110 optional: true 2111 2111 2112 - /@next/swc-darwin-x64@13.4.8: 2113 - resolution: {integrity: sha512-Reox+UXgonon9P0WNDE6w85DGtyBqGitl/ryznOvn6TvfxEaZIpTgeu3ZrJLU9dHSMhiK7YAM793mE/Zii2/Qw==} 2112 + /@next/swc-darwin-x64@13.4.12: 2113 + resolution: {integrity: sha512-WRvH7RxgRHlC1yb5oG0ZLx8F7uci9AivM5/HGGv9ZyG2Als8Ij64GC3d+mQ5sJhWjusyU6T6V1WKTUoTmOB0zQ==} 2114 2114 engines: {node: '>= 10'} 2115 2115 cpu: [x64] 2116 2116 os: [darwin] ··· 2118 2118 dev: false 2119 2119 optional: true 2120 2120 2121 - /@next/swc-linux-arm64-gnu@13.4.8: 2122 - resolution: {integrity: sha512-kdyzYvAYtqQVgzIKNN7e1rLU8aZv86FDSRqPlOkKZlvqudvTO0iohuTPmnEEDlECeBM6qRPShNffotDcU/R2KA==} 2121 + /@next/swc-linux-arm64-gnu@13.4.12: 2122 + resolution: {integrity: sha512-YEKracAWuxp54tKiAvvq73PUs9lok57cc8meYRibTWe/VdPB2vLgkTVWFcw31YDuRXdEhdX0fWS6Q+ESBhnEig==} 2123 2123 engines: {node: '>= 10'} 2124 2124 cpu: [arm64] 2125 2125 os: [linux] ··· 2127 2127 dev: false 2128 2128 optional: true 2129 2129 2130 - /@next/swc-linux-arm64-musl@13.4.8: 2131 - resolution: {integrity: sha512-oWxx4yRkUGcR81XwbI+T0zhZ3bDF6V1aVLpG+C7hSG50ULpV8gC39UxVO22/bv93ZlcfMY4zl8xkz9Klct6dpQ==} 2130 + /@next/swc-linux-arm64-musl@13.4.12: 2131 + resolution: {integrity: sha512-LhJR7/RAjdHJ2Isl2pgc/JaoxNk0KtBgkVpiDJPVExVWA1c6gzY57+3zWuxuyWzTG+fhLZo2Y80pLXgIJv7g3g==} 2132 2132 engines: {node: '>= 10'} 2133 2133 cpu: [arm64] 2134 2134 os: [linux] ··· 2136 2136 dev: false 2137 2137 optional: true 2138 2138 2139 - /@next/swc-linux-x64-gnu@13.4.8: 2140 - resolution: {integrity: sha512-anhtvuO6eE9YRhYnaEGTfbpH3L5gT/9qPFcNoi6xS432r/4DAtpJY8kNktqkTVevVIC/pVumqO8tV59PR3zbNg==} 2139 + /@next/swc-linux-x64-gnu@13.4.12: 2140 + resolution: {integrity: sha512-1DWLL/B9nBNiQRng+1aqs3OaZcxC16Nf+mOnpcrZZSdyKHek3WQh6j/fkbukObgNGwmCoVevLUa/p3UFTTqgqg==} 2141 2141 engines: {node: '>= 10'} 2142 2142 cpu: [x64] 2143 2143 os: [linux] ··· 2145 2145 dev: false 2146 2146 optional: true 2147 2147 2148 - /@next/swc-linux-x64-musl@13.4.8: 2149 - resolution: {integrity: sha512-aR+J4wWfNgH1DwCCBNjan7Iumx0lLtn+2/rEYuhIrYLY4vnxqSVGz9u3fXcgUwo6Q9LT8NFkaqK1vPprdq+BXg==} 2148 + /@next/swc-linux-x64-musl@13.4.12: 2149 + resolution: {integrity: sha512-kEAJmgYFhp0VL+eRWmUkVxLVunn7oL9Mdue/FS8yzRBVj7Z0AnIrHpTIeIUl1bbdQq1VaoOztnKicAjfkLTRCQ==} 2150 2150 engines: {node: '>= 10'} 2151 2151 cpu: [x64] 2152 2152 os: [linux] ··· 2154 2154 dev: false 2155 2155 optional: true 2156 2156 2157 - /@next/swc-win32-arm64-msvc@13.4.8: 2158 - resolution: {integrity: sha512-OWBKIrJwQBTqrat0xhxEB/jcsjJR3+diD9nc/Y8F1mRdQzsn4bPsomgJyuqPVZs6Lz3K18qdIkvywmfSq75SsQ==} 2157 + /@next/swc-win32-arm64-msvc@13.4.12: 2158 + resolution: {integrity: sha512-GMLuL/loR6yIIRTnPRY6UGbLL9MBdw2anxkOnANxvLvsml4F0HNIgvnU3Ej4BjbqMTNjD4hcPFdlEow4XHPdZA==} 2159 2159 engines: {node: '>= 10'} 2160 2160 cpu: [arm64] 2161 2161 os: [win32] ··· 2163 2163 dev: false 2164 2164 optional: true 2165 2165 2166 - /@next/swc-win32-ia32-msvc@13.4.8: 2167 - resolution: {integrity: sha512-agiPWGjUndXGTOn4ChbKipQXRA6/UPkywAWIkx7BhgGv48TiJfHTK6MGfBoL9tS6B4mtW39++uy0wFPnfD0JWg==} 2166 + /@next/swc-win32-ia32-msvc@13.4.12: 2167 + resolution: {integrity: sha512-PhgNqN2Vnkm7XaMdRmmX0ZSwZXQAtamBVSa9A/V1dfKQCV1rjIZeiy/dbBnVYGdj63ANfsOR/30XpxP71W0eww==} 2168 2168 engines: {node: '>= 10'} 2169 2169 cpu: [ia32] 2170 2170 os: [win32] ··· 2172 2172 dev: false 2173 2173 optional: true 2174 2174 2175 - /@next/swc-win32-x64-msvc@13.4.8: 2176 - resolution: {integrity: sha512-UIRKoByVKbuR6SnFG4JM8EMFlJrfEGuUQ1ihxzEleWcNwRMMiVaCj1KyqfTOW8VTQhJ0u8P1Ngg6q1RwnIBTtw==} 2175 + /@next/swc-win32-x64-msvc@13.4.12: 2176 + resolution: {integrity: sha512-Z+56e/Ljt0bUs+T+jPjhFyxYBcdY2RIq9ELFU+qAMQMteHo7ymbV7CKmlcX59RI9C4YzN8PgMgLyAoi916b5HA==} 2177 2177 engines: {node: '>= 10'} 2178 2178 cpu: [x64] 2179 2179 os: [win32] ··· 3921 3921 '@trpc/server': 10.32.0 3922 3922 dev: false 3923 3923 3924 - /@trpc/next@10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/react-query@10.32.0)(@trpc/server@10.32.0)(next@13.4.8)(react-dom@18.2.0)(react@18.2.0): 3924 + /@trpc/next@10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/react-query@10.32.0)(@trpc/server@10.32.0)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): 3925 3925 resolution: {integrity: sha512-qJ3yvJDTVmiOOPW1x/FCpmOvtcMJXnP2t3EbcUFrqwgH+D1KdbU2Kk1iSa89Gwy/BBEmXUxaKkWoM3e4Id80gw==} 3926 3926 peerDependencies: 3927 3927 '@tanstack/react-query': ^4.18.0 ··· 3936 3936 '@trpc/client': 10.32.0(@trpc/server@10.32.0) 3937 3937 '@trpc/react-query': 10.32.0(@tanstack/react-query@4.29.19)(@trpc/client@10.32.0)(@trpc/server@10.32.0)(react-dom@18.2.0)(react@18.2.0) 3938 3938 '@trpc/server': 10.32.0 3939 - next: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 3939 + next: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 3940 3940 react: 18.2.0 3941 3941 react-dom: 18.2.0(react@18.2.0) 3942 3942 react-ssr-prepass: 1.5.0(react@18.2.0) ··· 8360 8360 resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} 8361 8361 dev: true 8362 8362 8363 - /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.18.10)(next@13.4.8)(react-dom@18.2.0)(react@18.2.0): 8363 + /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.18.10)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): 8364 8364 resolution: {integrity: sha512-UtUCwgAl159KwfhNaOwyiI7Lg6sdioyKMeh+E7jxx0CJ29JuXGxBEYmCI6+72NxFGIFZKx8lvttbbQhbnYWYSw==} 8365 8365 peerDependencies: 8366 8366 contentlayer: 0.3.4 ··· 8371 8371 '@contentlayer/core': 0.3.4(esbuild@0.18.10) 8372 8372 '@contentlayer/utils': 0.3.4 8373 8373 contentlayer: 0.3.4(esbuild@0.18.10) 8374 - next: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 8374 + next: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 8375 8375 react: 18.2.0 8376 8376 react-dom: 18.2.0(react@18.2.0) 8377 8377 transitivePeerDependencies: ··· 8381 8381 - supports-color 8382 8382 dev: false 8383 8383 8384 - /next-plausible@3.7.2(next@13.4.8)(react-dom@18.2.0)(react@18.2.0): 8384 + /next-plausible@3.7.2(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): 8385 8385 resolution: {integrity: sha512-9PqFiVtD1kZO5gHFYTcgilHhg2WhMzD6I4NK/RUh9DGavD1N11IhNAvyGLFmvB3f4FtHC9IoAsauYDtQBt+riA==} 8386 8386 peerDependencies: 8387 8387 next: ^11.1.0 || ^12.0.0 || ^13.0.0 8388 8388 react: ^16.8.0 || ^17.0.0 || ^18.0.0 8389 8389 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 8390 8390 dependencies: 8391 - next: 13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 8391 + next: 13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 8392 8392 react: 18.2.0 8393 8393 react-dom: 18.2.0(react@18.2.0) 8394 8394 dev: false ··· 8397 8397 resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} 8398 8398 dev: true 8399 8399 8400 - /next@13.4.8(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0): 8401 - resolution: {integrity: sha512-lxUjndYKjZHGK3CWeN2RI+/6ni6EUvjiqGWXAYPxUfGIdFGQ5XoisrqAJ/dF74aP27buAfs8MKIbIMMdxjqSBg==} 8400 + /next@13.4.12(@babel/core@7.22.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0): 8401 + resolution: {integrity: sha512-eHfnru9x6NRmTMcjQp6Nz0J4XH9OubmzOa7CkWL+AUrUxpibub3vWwttjduu9No16dug1kq04hiUUpo7J3m3Xw==} 8402 8402 engines: {node: '>=16.8.0'} 8403 8403 hasBin: true 8404 8404 peerDependencies: ··· 8415 8415 sass: 8416 8416 optional: true 8417 8417 dependencies: 8418 - '@next/env': 13.4.8 8418 + '@next/env': 13.4.12 8419 8419 '@opentelemetry/api': 1.4.1 8420 8420 '@swc/helpers': 0.5.1 8421 8421 busboy: 1.6.0 ··· 8427 8427 watchpack: 2.4.0 8428 8428 zod: 3.21.4 8429 8429 optionalDependencies: 8430 - '@next/swc-darwin-arm64': 13.4.8 8431 - '@next/swc-darwin-x64': 13.4.8 8432 - '@next/swc-linux-arm64-gnu': 13.4.8 8433 - '@next/swc-linux-arm64-musl': 13.4.8 8434 - '@next/swc-linux-x64-gnu': 13.4.8 8435 - '@next/swc-linux-x64-musl': 13.4.8 8436 - '@next/swc-win32-arm64-msvc': 13.4.8 8437 - '@next/swc-win32-ia32-msvc': 13.4.8 8438 - '@next/swc-win32-x64-msvc': 13.4.8 8430 + '@next/swc-darwin-arm64': 13.4.12 8431 + '@next/swc-darwin-x64': 13.4.12 8432 + '@next/swc-linux-arm64-gnu': 13.4.12 8433 + '@next/swc-linux-arm64-musl': 13.4.12 8434 + '@next/swc-linux-x64-gnu': 13.4.12 8435 + '@next/swc-linux-x64-musl': 13.4.12 8436 + '@next/swc-win32-arm64-msvc': 13.4.12 8437 + '@next/swc-win32-ia32-msvc': 13.4.12 8438 + '@next/swc-win32-x64-msvc': 13.4.12 8439 8439 transitivePeerDependencies: 8440 8440 - '@babel/core' 8441 8441 - babel-plugin-macros