This commit is contained in:
Jordi Enric
2024-03-31 17:02:17 +02:00
parent 7a33a884f4
commit 6a2bcaff16
22 changed files with 959 additions and 371 deletions
+1
View File
@@ -19,6 +19,7 @@
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "1.0.5",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
@@ -1,5 +1,5 @@
/* eslint-disable @next/next/no-img-element */
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { Input } from "../ui/input";
import { Button } from "../ui/button";
import { Code, Info, Plus, Trash } from "lucide-react";
@@ -12,6 +12,13 @@ import "react-calendar/dist/Calendar.css";
import "react-clock/dist/Clock.css";
import Image from "next/image";
import { CopyCell } from "../copy-cell";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "../ui/select";
type MetadataItem = {
key: string;
@@ -45,19 +52,55 @@ const EditorSettings = (props: Props) => {
props.selectedTags || []
);
const today = new Date().toISOString().split("T")[0] || "";
const [publishedAt, setPublishedAt] = useState<string>(
props.published_at || today
);
function formatPublishedDate() {
function formatDate(date: string) {
try {
const date = new Date(publishedAt).toISOString().split(".")[0];
return date;
return new Date(date).toISOString().split(".")[0];
} catch (error) {
toast.error("Invalid date");
// do nothing
}
}
const publishedAtValue = formatPublishedDate();
const [publishedAt, setPublishedAt] = useState<{
day: number;
month: number;
year: number;
hour: number;
minute: number;
}>({
day: new Date(props.published_at || today).getDate(),
month: new Date(props.published_at || today).getMonth(),
year: new Date(props.published_at || today).getFullYear(),
hour: new Date(props.published_at || today).getHours(),
minute: new Date(props.published_at || today).getMinutes(),
});
function publishedAtToDate() {
return new Date(
publishedAt.year,
publishedAt.month,
publishedAt.day,
publishedAt.hour,
publishedAt.minute
).toISOString();
}
useEffect(() => {
try {
const date = publishedAtToDate();
props.onChange({
tags: selectedTags,
metadata,
published_at: date,
});
} catch (error) {
toast.error("Invalid date");
}
}, [publishedAt]);
const publishedAtValue = formatDate(publishedAtToDate());
function addMetadata() {
setMetadata([...metadata, { key: "", value: "" }]);
@@ -90,22 +133,107 @@ const EditorSettings = (props: Props) => {
<div className="[&_h2]:font-mono [&_h2]:text-sm [&_h2]:font-medium">
<section className="mt-2">
<h2 className="mt-2 pb-2 font-mono">Published date</h2>
<DateTimePicker
autoFocus={false}
calendarIcon={null}
clearIcon={null}
shouldOpenWidgets={() => false}
value={new Date(publishedAt)}
onChange={(date) => {
if (!date) return;
setPublishedAt(date.toISOString());
props.onChange({
tags: selectedTags,
metadata,
published_at: date.toISOString(),
});
}}
/>
<div className="flex gap-4">
<div>
<label className="text-xs text-zinc-500" htmlFor="date">
Date
</label>
<div className="flex gap-1">
<Input
type="number"
name="day"
placeholder="Day"
className="w-14 rounded-r-sm"
min="1"
max="31"
value={publishedAt.day}
onChange={(e) => {
setPublishedAt({
...publishedAt,
day: parseInt(e.target.value),
});
}}
/>
<Select
value={publishedAt.month.toString()}
onValueChange={(e) => {
setPublishedAt({
...publishedAt,
month: parseInt(e),
});
}}
>
<SelectTrigger className="w-[120px] rounded-sm">
<SelectValue placeholder="Month" />
</SelectTrigger>
<SelectContent>
<SelectItem value="0">January</SelectItem>
<SelectItem value="1">February</SelectItem>
<SelectItem value="2">March</SelectItem>
<SelectItem value="3">April</SelectItem>
<SelectItem value="4">May</SelectItem>
<SelectItem value="5">June</SelectItem>
<SelectItem value="6">July</SelectItem>
<SelectItem value="7">August</SelectItem>
<SelectItem value="8">September</SelectItem>
<SelectItem value="9">October</SelectItem>
<SelectItem value="10">November</SelectItem>
<SelectItem value="11">December</SelectItem>
</SelectContent>
</Select>
<Input
type="number"
name="year"
placeholder="Year"
className="w-20 rounded-l-sm"
value={publishedAt.year}
onChange={(e) => {
setPublishedAt({
...publishedAt,
year: parseInt(e.target.value),
});
}}
/>
</div>
</div>
<div>
<label className="text-xs text-zinc-500" htmlFor="time">
Time
</label>
<div className="flex gap-1">
<Input
type="number"
name="hour"
placeholder="Hour"
className="w-14 rounded-r-sm"
min="0"
max="23"
value={publishedAt.hour}
onChange={(e) => {
setPublishedAt({
...publishedAt,
hour: parseInt(e.target.value),
});
}}
/>
<Input
type="number"
name="minute"
placeholder="Minute"
className="w-14 rounded-l-sm"
min="0"
max="59"
value={publishedAt.minute}
onChange={(e) => {
setPublishedAt({
...publishedAt,
minute: parseInt(e.target.value),
});
}}
/>
</div>
</div>
</div>
{/* <Input
type="datetime-local"
name="published_at"
@@ -167,7 +167,7 @@ export const ZendoEditor = (props: Props) => {
slug: data.slug,
cover_image: data.cover_image || "",
published: data.published,
published_at: publishedAt,
published_at: publishedAt || new Date().toISOString(),
metadata,
tags,
});
+9 -2
View File
@@ -8,17 +8,24 @@ import {
} from "./ui/dropdown-menu";
import Link from "next/link";
import { useUser } from "@/utils/supabase/browser";
import { useIsSubscribed, useSubscriptionQuery } from "@/queries/subscription";
import { cn } from "@/lib/utils";
type Props = {};
const UserButton = (props: Props) => {
const user = useUser();
const isSubbed = useIsSubscribed();
return (
<>
<DropdownMenu>
<DropdownMenuTrigger className="rounded-full">
<div className="flex h-7 w-7 items-center justify-center rounded-full bg-slate-800 font-bold text-white">
<DropdownMenuTrigger className="flex items-center gap-2 rounded-full">
<div
className={cn(
"flex h-7 w-7 items-center justify-center rounded-full bg-zinc-800 font-bold text-white"
)}
>
{user?.email?.slice(0, 1).toUpperCase()}
</div>
</DropdownMenuTrigger>
+1 -1
View File
@@ -7,5 +7,5 @@ const Logo = () => (
);
export default function ZendoLogo() {
return <div className="text-lg font-semibold tracking-tight">zenblog</div>;
return <div className="text-lg font-medium tracking-tight">zenblog</div>;
}
+18
View File
@@ -0,0 +1,18 @@
import React, { PropsWithChildren } from "react";
export const IsDevMode = ({ children }: PropsWithChildren) => {
const isDev = process.env.NODE_ENV === "development";
if (!isDev) {
return null;
}
return (
<div className="rounded-md border-2 border-dashed border-yellow-300 p-2">
<span className="text-xs font-medium text-yellow-600">
Development Tip:
</span>
{children}
</div>
);
};
+1 -1
View File
@@ -23,7 +23,7 @@ const buttonVariants = cva(
},
size: {
default: "h-10 px-3 py-2",
sm: "h-8 px-3 text-xs",
sm: "h-[30px] px-3 text-xs",
lg: "h-11 px-8",
icon: "h-8 w-8 text-zinc-500 dark:text-zinc-50 [&>svg]:w-[18px]",
},
+158
View File
@@ -0,0 +1,158 @@
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { cn } from "@/lib/utils";
const Select = SelectPrimitive.Root;
const SelectGroup = SelectPrimitive.Group;
const SelectValue = SelectPrimitive.Value;
const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Trigger
ref={ref}
className={cn(
"border-input bg-background ring-offset-background placeholder:text-muted-foreground flex h-8 w-full items-center justify-between rounded-lg border px-3 py-2 text-sm transition-all focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className
)}
{...props}
>
{children}
<SelectPrimitive.Icon asChild>
<ChevronDown className="h-4 w-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
const SelectScrollUpButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
>(({ className, ...props }, ref) => (
<SelectPrimitive.ScrollUpButton
ref={ref}
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronUp className="h-4 w-4" />
</SelectPrimitive.ScrollUpButton>
));
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
const SelectScrollDownButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
>(({ className, ...props }, ref) => (
<SelectPrimitive.ScrollDownButton
ref={ref}
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronDown className="h-4 w-4" />
</SelectPrimitive.ScrollDownButton>
));
SelectScrollDownButton.displayName =
SelectPrimitive.ScrollDownButton.displayName;
const SelectContent = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
>(({ className, children, position = "popper", ...props }, ref) => (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
ref={ref}
className={cn(
"text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white shadow-md",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className
)}
position={position}
{...props}
>
<SelectScrollUpButton />
<SelectPrimitive.Viewport
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
)}
>
{children}
</SelectPrimitive.Viewport>
<SelectScrollDownButton />
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
));
SelectContent.displayName = SelectPrimitive.Content.displayName;
const SelectLabel = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
>(({ className, ...props }, ref) => (
<SelectPrimitive.Label
ref={ref}
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
{...props}
/>
));
SelectLabel.displayName = SelectPrimitive.Label.displayName;
const SelectItem = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Item
ref={ref}
className={cn(
"focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
<Check className="h-4 w-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
));
SelectItem.displayName = SelectPrimitive.Item.displayName;
const SelectSeparator = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
>(({ className, ...props }, ref) => (
<SelectPrimitive.Separator
ref={ref}
className={cn("bg-muted -mx-1 my-1 h-px", className)}
{...props}
/>
));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export {
Select,
SelectGroup,
SelectValue,
SelectTrigger,
SelectContent,
SelectLabel,
SelectItem,
SelectSeparator,
SelectScrollUpButton,
SelectScrollDownButton,
};
+13
View File
@@ -1,3 +1,4 @@
import { IsDevMode } from "@/components/is-dev-mode";
import { Button } from "@/components/ui/button";
import { Tabs, TabsTrigger, TabsList } from "@/components/ui/tabs";
import AppLayout from "@/layouts/AppLayout";
@@ -107,6 +108,18 @@ export const SubscribeSection = () => {
<h2 className="text-xl font-medium">Pricing</h2>
<p className="font-mono text-sm text-zinc-500">Cancel anytime</p>
<IsDevMode>
<pre>
Run this to sync stripe with the local database:
<br />
`npm run stripe:webhook` // listen for stripe events
<br />
`npm run stripe:sync` // sync stripe products and prices
<br />
Then refresh the page and subscribe to a plan
</pre>
</IsDevMode>
<Tabs
className="mt-4"
value={interval}
@@ -74,7 +74,7 @@ export default function BlogPosts() {
<AppLayout loading={isLoading}>
<div className="mx-auto mt-4 max-w-5xl p-4">
<div className="flex items-center justify-between">
<h1 className="mb-2 text-xl font-semibold">
<h1 className="mb-2 text-xl">
<span className="mr-2 text-2xl">{blog.emoji}</span>
{blog.title}
</h1>
@@ -153,7 +153,7 @@ export default function BlogPosts() {
<div>
<StatePill published={post.published || false} />
</div>
<h2 className="ml-1 text-lg font-medium">
<h2 className="ml-1 text-lg font-normal">
{post.title}
</h2>
</div>
+1 -1
View File
@@ -14,7 +14,7 @@ export function useSubscriptionQuery() {
.select("*")
.limit(1);
if (error) {
if (error || !data[0]) {
console.error(error);
return {
status: "inactive",
+6 -3
View File
@@ -16,13 +16,16 @@ export default async function Home({
<main className="">
{post.cover_image && (
<img
className="mx-auto max-w-4xl border"
className="max-w-4xl border p-8"
src={post.cover_image}
alt={post.title}
/>
)}
<div className="prose mx-auto max-w-xl p-4">
<h1 className="">{post.title}</h1>
<div className="prose max-w-xl p-8">
<Link className="text-xs font-medium text-blue-500 underline" href="/">
Back to blog
</Link>
<h1 className="text-xl font-normal">{post.title}</h1>
<pre>{JSON.stringify(post.content)}</pre>
</div>
</main>
+5 -5
View File
@@ -1,10 +1,10 @@
import type { Metadata } from "next";
import { IBM_Plex_Mono } from "next/font/google";
import { Inter } from "next/font/google";
import "./globals.css";
import Link from "next/link";
const ibmPlexMono = IBM_Plex_Mono({
weight: ["500", "600"],
const inter = Inter({
weight: ["400", "500", "600"],
subsets: ["latin"],
});
@@ -20,8 +20,8 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={`${ibmPlexMono.className} font-mono`}>
<nav className="px-8 py-24">
<body className={`${inter.className}`}>
<nav className="p-8">
<Link href="/">Zenblog + NextJS</Link>
</nav>
{children}
+9 -5
View File
@@ -16,17 +16,21 @@ export default async function Home() {
};
return (
<main className="flex min-h-[500px] flex-col gap-4 p-8">
<main className="flex min-h-[500px] flex-col gap-1 p-6">
{posts.map((post) => (
<Link
className="flex items-center gap-4"
className="max-w-xs rounded-md p-2 opacity-70 transition-all hover:bg-zinc-50 hover:opacity-100"
href={`/blog/${post.slug}`}
key={post.slug}
>
<span className="text-slate-400">
<div className="mr-4 text-xs text-slate-400">
{formatDate(post.published_at)}
</span>
<span>{post.title}</span>
</div>
<div>{post.title}</div>
{/* <img
src={`http://localhost:3000/api/og?title=${post.title}&emoji=✍️&url=Blog`}
alt=""
/> */}
</Link>
))}
</main>
+441 -27
View File
@@ -174,6 +174,7 @@
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "1.0.5",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
@@ -2172,6 +2173,14 @@
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@radix-ui/number": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.1.tgz",
"integrity": "sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
}
},
"node_modules/@radix-ui/primitive": {
"version": "1.0.0",
"license": "MIT",
@@ -3673,6 +3682,411 @@
}
}
},
"node_modules/@radix-ui/react-select": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.0.0.tgz",
"integrity": "sha512-RH5b7af4oHtkcHS7pG6Sgv5rk5Wxa7XI8W5gvB1N/yiuDGZxko1ynvOiVhFM7Cis2A8zxF9bTOUVbRDzPepe6w==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/number": "1.0.1",
"@radix-ui/primitive": "1.0.1",
"@radix-ui/react-collection": "1.0.3",
"@radix-ui/react-compose-refs": "1.0.1",
"@radix-ui/react-context": "1.0.1",
"@radix-ui/react-direction": "1.0.1",
"@radix-ui/react-dismissable-layer": "1.0.5",
"@radix-ui/react-focus-guards": "1.0.1",
"@radix-ui/react-focus-scope": "1.0.4",
"@radix-ui/react-id": "1.0.1",
"@radix-ui/react-popper": "1.1.3",
"@radix-ui/react-portal": "1.0.4",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-slot": "1.0.2",
"@radix-ui/react-use-callback-ref": "1.0.1",
"@radix-ui/react-use-controllable-state": "1.0.1",
"@radix-ui/react-use-layout-effect": "1.0.1",
"@radix-ui/react-use-previous": "1.0.1",
"@radix-ui/react-visually-hidden": "1.0.3",
"aria-hidden": "^1.1.1",
"react-remove-scroll": "2.5.5"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz",
"integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==",
"dependencies": {
"@babel/runtime": "^7.13.10"
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-arrow": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz",
"integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-primitive": "1.0.3"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-compose-refs": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
"integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-context": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz",
"integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-dismissable-layer": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",
"integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/primitive": "1.0.1",
"@radix-ui/react-compose-refs": "1.0.1",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-use-callback-ref": "1.0.1",
"@radix-ui/react-use-escape-keydown": "1.0.3"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-guards": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz",
"integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-scope": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",
"integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-compose-refs": "1.0.1",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-use-callback-ref": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-id": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz",
"integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-layout-effect": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz",
"integrity": "sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@floating-ui/react-dom": "^2.0.0",
"@radix-ui/react-arrow": "1.0.3",
"@radix-ui/react-compose-refs": "1.0.1",
"@radix-ui/react-context": "1.0.1",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-use-callback-ref": "1.0.1",
"@radix-ui/react-use-layout-effect": "1.0.1",
"@radix-ui/react-use-rect": "1.0.1",
"@radix-ui/react-use-size": "1.0.1",
"@radix-ui/rect": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-portal": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",
"integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-primitive": "1.0.3"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
"integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-slot": "1.0.2"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
"integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-compose-refs": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-callback-ref": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
"integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-controllable-state": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz",
"integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-callback-ref": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-escape-keydown": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz",
"integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-callback-ref": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-layout-effect": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
"integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-rect": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz",
"integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/rect": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-use-size": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz",
"integrity": "sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-layout-effect": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/rect": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz",
"integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
}
},
"node_modules/@radix-ui/react-slot": {
"version": "1.0.1",
"license": "MIT",
@@ -16294,9 +16708,9 @@
"license": "MIT"
},
"node_modules/@next/swc-darwin-arm64": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.4.tgz",
"integrity": "sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.0.tgz",
"integrity": "sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ==",
"cpu": [
"arm64"
],
@@ -16309,9 +16723,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.4.tgz",
"integrity": "sha512-IZQ3C7Bx0k2rYtrZZxKKiusMTM9WWcK5ajyhOZkYYTCc8xytmwSzR1skU7qLgVT/EY9xtXDG0WhY6fyujnI3rw==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.0.tgz",
"integrity": "sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g==",
"cpu": [
"x64"
],
@@ -16324,9 +16738,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.4.tgz",
"integrity": "sha512-VwwZKrBQo/MGb1VOrxJ6LrKvbpo7UbROuyMRvQKTFKhNaXjUmKTu7wxVkIuCARAfiI8JpaWAnKR+D6tzpCcM4w==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.0.tgz",
"integrity": "sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ==",
"cpu": [
"arm64"
],
@@ -16339,9 +16753,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.4.tgz",
"integrity": "sha512-8QftwPEW37XxXoAwsn+nXlodKWHfpMaSvt81W43Wh8dv0gkheD+30ezWMcFGHLI71KiWmHK5PSQbTQGUiidvLQ==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.0.tgz",
"integrity": "sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g==",
"cpu": [
"arm64"
],
@@ -16354,9 +16768,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.4.tgz",
"integrity": "sha512-/s/Pme3VKfZAfISlYVq2hzFS8AcAIOTnoKupc/j4WlvF6GQ0VouS2Q2KEgPuO1eMBwakWPB1aYFIA4VNVh667A==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.0.tgz",
"integrity": "sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ==",
"cpu": [
"x64"
],
@@ -16369,9 +16783,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.4.tgz",
"integrity": "sha512-m8z/6Fyal4L9Bnlxde5g2Mfa1Z7dasMQyhEhskDATpqr+Y0mjOBZcXQ7G5U+vgL22cI4T7MfvgtrM2jdopqWaw==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.0.tgz",
"integrity": "sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg==",
"cpu": [
"x64"
],
@@ -16384,9 +16798,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.4.tgz",
"integrity": "sha512-7Wv4PRiWIAWbm5XrGz3D8HUkCVDMMz9igffZG4NB1p4u1KoItwx9qjATHz88kwCEal/HXmbShucaslXCQXUM5w==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.0.tgz",
"integrity": "sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ==",
"cpu": [
"arm64"
],
@@ -16399,9 +16813,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.4.tgz",
"integrity": "sha512-zLeNEAPULsl0phfGb4kdzF/cAVIfaC7hY+kt0/d+y9mzcZHsMS3hAS829WbJ31DkSlVKQeHEjZHIdhN+Pg7Gyg==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.0.tgz",
"integrity": "sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw==",
"cpu": [
"ia32"
],
@@ -16414,9 +16828,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.4.tgz",
"integrity": "sha512-yEh2+R8qDlDCjxVpzOTEpBLQTEFAcP2A8fUFLaWNap9GitYKkKv1//y2S6XY6zsR4rCOPRpU7plYDR+az2n30A==",
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.0.tgz",
"integrity": "sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==",
"cpu": [
"x64"
],
+2 -1
View File
@@ -28,7 +28,8 @@
},
"workspaces": [
"apps/*",
"packages/*"
"packages/*",
"demos/*"
],
"dependencies": {
"@supabase/ssr": "^0.1.0",
@@ -216,6 +216,31 @@ CREATE OR REPLACE VIEW "public"."posts_with_blog_and_subscription_status" AS
ALTER TABLE "public"."posts_with_blog_and_subscription_status" OWNER TO "postgres";
CREATE OR REPLACE VIEW "public"."posts_with_blog_and_subscription_status_v2" AS
SELECT "p"."created_at",
"p"."blog_id",
"p"."title",
"p"."published",
"p"."published_at",
"p"."content",
"p"."updated_at",
"p"."slug",
"p"."id" AS "post_id",
"p"."cover_image",
"p"."metadata",
"p"."deleted",
COALESCE("array_agg"("bt"."name") FILTER (WHERE ("bt"."id" IS NOT NULL)), '{}'::"text"[]) AS "tags",
"s"."status" AS "subscription_status"
FROM (((("public"."posts" "p"
LEFT JOIN "public"."blogs" "b" ON (("p"."blog_id" = "b"."id")))
LEFT JOIN "public"."subscriptions" "s" ON (("b"."user_id" = "s"."user_id")))
LEFT JOIN "public"."post_tags" "pt" ON (("p"."id" = "pt"."post_id")))
LEFT JOIN "public"."blog_tags" "bt" ON (("pt"."tag_id" = "bt"."id")))
GROUP BY "p"."created_at", "p"."blog_id", "p"."title", "p"."published", "p"."published_at", "p"."content", "p"."updated_at", "p"."slug", "p"."id", "p"."cover_image", "p"."metadata", "p"."deleted", "p"."user_id", "s"."status"
ORDER BY "p"."created_at" DESC;
ALTER TABLE "public"."posts_with_blog_and_subscription_status_v2" OWNER TO "postgres";
CREATE OR REPLACE VIEW "public"."posts_with_tags" AS
SELECT "p"."created_at",
"p"."blog_id",
@@ -237,6 +262,28 @@ CREATE OR REPLACE VIEW "public"."posts_with_tags" AS
ALTER TABLE "public"."posts_with_tags" OWNER TO "postgres";
CREATE OR REPLACE VIEW "public"."posts_with_tags_v2" AS
SELECT "p"."created_at",
"p"."blog_id",
"p"."title",
"p"."published",
"p"."content",
"p"."updated_at",
"p"."slug",
"p"."id" AS "post_id",
"p"."cover_image",
"p"."metadata",
"p"."deleted",
"p"."published_at",
COALESCE("array_agg"("bt"."name") FILTER (WHERE ("bt"."id" IS NOT NULL)), '{}'::"text"[]) AS "tags"
FROM (("public"."posts" "p"
LEFT JOIN "public"."post_tags" "pt" ON (("p"."id" = "pt"."post_id")))
LEFT JOIN "public"."blog_tags" "bt" ON (("pt"."tag_id" = "bt"."id")))
GROUP BY "p"."created_at", "p"."blog_id", "p"."title", "p"."published", "p"."content", "p"."updated_at", "p"."slug", "p"."id", "p"."cover_image", "p"."metadata", "p"."deleted", "p"."user_id", "p"."published_at"
ORDER BY "p"."created_at" DESC;
ALTER TABLE "public"."posts_with_tags_v2" OWNER TO "postgres";
CREATE TABLE IF NOT EXISTS "public"."prices" (
"id" bigint NOT NULL,
"created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
@@ -544,10 +591,18 @@ GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status" TO "service_role";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "service_role";
GRANT ALL ON TABLE "public"."posts_with_tags" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_tags" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_tags" TO "service_role";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "service_role";
GRANT ALL ON TABLE "public"."prices" TO "anon";
GRANT ALL ON TABLE "public"."prices" TO "authenticated";
GRANT ALL ON TABLE "public"."prices" TO "service_role";
@@ -0,0 +1,27 @@
CREATE OR REPLACE VIEW "public"."posts_with_blog_and_subscription_status_v2" AS
SELECT "p"."created_at",
"p"."blog_id",
"p"."title",
"p"."published",
"p"."published_at",
"p"."content",
"p"."updated_at",
"p"."slug",
"p"."id" AS "post_id",
"p"."cover_image",
"p"."metadata",
"p"."deleted",
COALESCE("array_agg"("bt"."name") FILTER (WHERE ("bt"."id" IS NOT NULL)), '{}'::"text"[]) AS "tags",
"s"."status" AS "subscription_status"
FROM (((("public"."posts" "p"
LEFT JOIN "public"."blogs" "b" ON (("p"."blog_id" = "b"."id")))
LEFT JOIN "public"."subscriptions" "s" ON (("b"."user_id" = "s"."user_id")))
LEFT JOIN "public"."post_tags" "pt" ON (("p"."id" = "pt"."post_id")))
LEFT JOIN "public"."blog_tags" "bt" ON (("pt"."tag_id" = "bt"."id")))
GROUP BY "p"."created_at", "p"."blog_id", "p"."title", "p"."published", "p"."published_at", "p"."content", "p"."updated_at", "p"."slug", "p"."id", "p"."cover_image", "p"."metadata", "p"."deleted", "p"."user_id", "s"."status"
ORDER BY "p"."created_at" DESC;
ALTER TABLE "public"."posts_with_blog_and_subscription_status_v2" OWNER TO "postgres";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "service_role";
@@ -0,0 +1,5 @@
drop view if exists "public"."posts_with_blog_and_subscription_status_v2";
drop view if exists "public"."posts_with_tags_v2";
@@ -0,0 +1,27 @@
CREATE OR REPLACE VIEW "public"."posts_with_blog_and_subscription_status_v2" AS
SELECT "p"."created_at",
"p"."blog_id",
"p"."title",
"p"."published",
"p"."published_at",
"p"."content",
"p"."updated_at",
"p"."slug",
"p"."id" AS "post_id",
"p"."cover_image",
"p"."metadata",
"p"."deleted",
COALESCE("array_agg"("bt"."name") FILTER (WHERE ("bt"."id" IS NOT NULL)), '{}'::"text"[]) AS "tags",
"s"."status" AS "subscription_status"
FROM (((("public"."posts" "p"
LEFT JOIN "public"."blogs" "b" ON (("p"."blog_id" = "b"."id")))
LEFT JOIN "public"."subscriptions" "s" ON (("b"."user_id" = "s"."user_id")))
LEFT JOIN "public"."post_tags" "pt" ON (("p"."id" = "pt"."post_id")))
LEFT JOIN "public"."blog_tags" "bt" ON (("pt"."tag_id" = "bt"."id")))
GROUP BY "p"."created_at", "p"."blog_id", "p"."title", "p"."published", "p"."published_at", "p"."content", "p"."updated_at", "p"."slug", "p"."id", "p"."cover_image", "p"."metadata", "p"."deleted", "p"."user_id", "s"."status"
ORDER BY "p"."created_at" DESC;
ALTER TABLE "public"."posts_with_blog_and_subscription_status_v2" OWNER TO "postgres";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_blog_and_subscription_status_v2" TO "service_role";
@@ -0,0 +1,25 @@
CREATE OR REPLACE VIEW "public"."posts_with_tags_v2" AS
SELECT "p"."created_at",
"p"."blog_id",
"p"."title",
"p"."published",
"p"."content",
"p"."updated_at",
"p"."slug",
"p"."id" AS "post_id",
"p"."cover_image",
"p"."metadata",
"p"."deleted",
"p"."published_at",
COALESCE("array_agg"("bt"."name") FILTER (WHERE ("bt"."id" IS NOT NULL)), '{}'::"text"[]) AS "tags"
FROM (("public"."posts" "p"
LEFT JOIN "public"."post_tags" "pt" ON (("p"."id" = "pt"."post_id")))
LEFT JOIN "public"."blog_tags" "bt" ON (("pt"."tag_id" = "bt"."id")))
GROUP BY "p"."created_at", "p"."blog_id", "p"."title", "p"."published", "p"."content", "p"."updated_at", "p"."slug", "p"."id", "p"."cover_image", "p"."metadata", "p"."deleted", "p"."user_id", "p"."published_at"
ORDER BY "p"."created_at" DESC;
ALTER TABLE "public"."posts_with_tags_v2" OWNER TO "postgres";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "anon";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "authenticated";
GRANT ALL ON TABLE "public"."posts_with_tags_v2" TO "service_role";
-298
View File
@@ -1,298 +0,0 @@
SET session_replication_role = replica;
pg_dump: warning: there are circular foreign-key constraints on this table:
pg_dump: detail: key
pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.
pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
-- Dumped by pg_dump version 15.5 (Ubuntu 15.5-1.pgdg20.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Data for Name: audit_log_entries; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."audit_log_entries" ("instance_id", "id", "payload", "created_at", "ip_address") VALUES
('00000000-0000-0000-0000-000000000000', 'eb2da736-be5e-4598-81de-3315674e398d', '{"action":"user_confirmation_requested","actor_id":"a49658c5-b57d-4ba5-bf74-5666a9101917","actor_username":"jordi@gmail.com","actor_via_sso":false,"log_type":"user","traits":{"provider":"email"}}', '2024-03-05 00:17:55.443109+00', ''),
('00000000-0000-0000-0000-000000000000', 'af12c60a-0543-4888-af0a-292365b90c9c', '{"action":"user_signedup","actor_id":"a49658c5-b57d-4ba5-bf74-5666a9101917","actor_username":"jordi@gmail.com","actor_via_sso":false,"log_type":"team"}', '2024-03-05 00:18:09.084507+00', ''),
('00000000-0000-0000-0000-000000000000', '012bd42d-12b8-4d54-85a5-a58fd973318b', '{"action":"login","actor_id":"a49658c5-b57d-4ba5-bf74-5666a9101917","actor_username":"jordi@gmail.com","actor_via_sso":false,"log_type":"account","traits":{"provider":"email"}}', '2024-03-05 00:18:15.936182+00', ''),
('00000000-0000-0000-0000-000000000000', '5612f1e9-8e8d-4433-9693-a91838af82cc', '{"action":"login","actor_id":"a49658c5-b57d-4ba5-bf74-5666a9101917","actor_username":"jordi@gmail.com","actor_via_sso":false,"log_type":"account","traits":{"provider":"email"}}', '2024-03-05 00:18:52.28643+00', '');
--
-- Data for Name: flow_state; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."flow_state" ("id", "user_id", "auth_code", "code_challenge_method", "code_challenge", "provider_type", "provider_access_token", "provider_refresh_token", "created_at", "updated_at", "authentication_method") VALUES
('bbb177fd-7477-4571-9dba-1478f405d58b', 'a49658c5-b57d-4ba5-bf74-5666a9101917', 'e4ebd130-8509-410c-9e21-83ca68870053', 's256', 'MGBXpFrapVpDRkpVZjNdIsXEBCXpJWELBqd71ob_U9Q', 'email', '', '', '2024-03-05 00:17:55.444055+00', '2024-03-05 00:17:55.444055+00', 'email/signup');
--
-- Data for Name: users; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."users" ("instance_id", "id", "aud", "role", "email", "encrypted_password", "email_confirmed_at", "invited_at", "confirmation_token", "confirmation_sent_at", "recovery_token", "recovery_sent_at", "email_change_token_new", "email_change", "email_change_sent_at", "last_sign_in_at", "raw_app_meta_data", "raw_user_meta_data", "is_super_admin", "created_at", "updated_at", "phone", "phone_confirmed_at", "phone_change", "phone_change_token", "phone_change_sent_at", "email_change_token_current", "email_change_confirm_status", "banned_until", "reauthentication_token", "reauthentication_sent_at", "is_sso_user", "deleted_at") VALUES
('00000000-0000-0000-0000-000000000000', 'a49658c5-b57d-4ba5-bf74-5666a9101917', 'authenticated', 'authenticated', 'jordi@gmail.com', '$2a$10$qhmY3MbVYEEdtef/Op4cqOo/4Ni4n4xRMW4yCY8pYf/d7eHRVPkbu', '2024-03-05 00:18:09.085532+00', NULL, '', '2024-03-05 00:17:55.4447+00', '', NULL, '', '', NULL, '2024-03-05 00:18:52.288168+00', '{"provider": "email", "providers": ["email"]}', '{}', NULL, '2024-03-05 00:17:55.434241+00', '2024-03-05 00:18:52.29079+00', NULL, NULL, '', '', NULL, '', 0, NULL, '', NULL, false, NULL);
--
-- Data for Name: identities; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."identities" ("provider_id", "user_id", "identity_data", "provider", "last_sign_in_at", "created_at", "updated_at", "id") VALUES
('a49658c5-b57d-4ba5-bf74-5666a9101917', 'a49658c5-b57d-4ba5-bf74-5666a9101917', '{"sub": "a49658c5-b57d-4ba5-bf74-5666a9101917", "email": "jordi@gmail.com", "email_verified": false, "phone_verified": false}', 'email', '2024-03-05 00:17:55.441584+00', '2024-03-05 00:17:55.44178+00', '2024-03-05 00:17:55.44178+00', 'fddf68e3-5d1a-4e9e-a518-6724b3c50e08');
--
-- Data for Name: instances; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: sessions; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."sessions" ("id", "user_id", "created_at", "updated_at", "factor_id", "aal", "not_after", "refreshed_at", "user_agent", "ip", "tag") VALUES
('bf3aa832-7419-4023-85dd-09d92742b5e8', 'a49658c5-b57d-4ba5-bf74-5666a9101917', '2024-03-05 00:18:15.936867+00', '2024-03-05 00:18:15.936867+00', NULL, 'aal1', NULL, NULL, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36', '192.168.117.1', NULL),
('0e6b8c25-16eb-4f32-9a12-3bf05c2bc7b2', 'a49658c5-b57d-4ba5-bf74-5666a9101917', '2024-03-05 00:18:52.288341+00', '2024-03-05 00:18:52.288341+00', NULL, 'aal1', NULL, NULL, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36', '192.168.117.1', NULL);
--
-- Data for Name: mfa_amr_claims; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."mfa_amr_claims" ("session_id", "created_at", "updated_at", "authentication_method", "id") VALUES
('bf3aa832-7419-4023-85dd-09d92742b5e8', '2024-03-05 00:18:15.94131+00', '2024-03-05 00:18:15.94131+00', 'password', '61c6afba-3c56-44c3-868d-e3a5ef0f7d3a'),
('0e6b8c25-16eb-4f32-9a12-3bf05c2bc7b2', '2024-03-05 00:18:52.291097+00', '2024-03-05 00:18:52.291097+00', 'password', 'b8f3f531-def6-4e21-90bf-54f7a65437b7');
--
-- Data for Name: mfa_factors; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: mfa_challenges; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."refresh_tokens" ("instance_id", "id", "token", "user_id", "revoked", "created_at", "updated_at", "parent", "session_id") VALUES
('00000000-0000-0000-0000-000000000000', 1, 'nLBR0XyCLL0jHRJ3CqWLxA', 'a49658c5-b57d-4ba5-bf74-5666a9101917', false, '2024-03-05 00:18:15.938685+00', '2024-03-05 00:18:15.938685+00', NULL, 'bf3aa832-7419-4023-85dd-09d92742b5e8'),
('00000000-0000-0000-0000-000000000000', 2, '7KUspHoB8oKft1LTk_0hVA', 'a49658c5-b57d-4ba5-bf74-5666a9101917', false, '2024-03-05 00:18:52.289442+00', '2024-03-05 00:18:52.289442+00', NULL, '0e6b8c25-16eb-4f32-9a12-3bf05c2bc7b2');
--
-- Data for Name: sso_providers; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: saml_providers; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: saml_relay_states; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: sso_domains; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
--
-- Data for Name: key; Type: TABLE DATA; Schema: pgsodium; Owner: supabase_admin
--
--
-- Data for Name: blogs; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "public"."blogs" ("id", "created_at", "title", "emoji", "user_id", "description", "public_id") VALUES
('673a21e5-145f-4c7f-815d-5627ac681f8e', '2024-03-05 00:19:59.145301+00', 'my blog', '📝', 'a49658c5-b57d-4ba5-bf74-5666a9101917', '', 'ae1f8438-8acd-44ac-9bfc-931de82a5f6b');
--
-- Data for Name: blog_tags; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: feedback; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: homepage_signup; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: posts; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "public"."posts" ("created_at", "user_id", "blog_id", "title", "published", "content", "updated_at", "slug", "id", "cover_image", "metadata", "deleted") VALUES
('2024-03-05 00:20:12.55528+00', 'a49658c5-b57d-4ba5-bf74-5666a9101917', '673a21e5-145f-4c7f-815d-5627ac681f8e', 'cool post', false, '{"type": "doc", "content": [{"type": "paragraph"}]}', '2024-03-05 00:20:12.55528+00', 'cool-post', '9c9868a9-25ac-43bf-a900-c3e7af332e0e', '', '{}', false);
--
-- Data for Name: post_tags; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: prices; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "public"."prices" ("id", "created_at", "price", "stripe_price_id") VALUES
(1, '2024-03-05 00:13:41.724809+00', '{"id": "price_1OjWqnJfDYgxbs7ZTx9uUklY", "type": "recurring", "active": true, "object": "price", "created": 1707872485, "product": "prod_PXkoPOxUafT0Ig", "currency": "usd", "livemode": false, "metadata": {}, "nickname": null, "recurring": {"interval": "year", "usage_type": "licensed", "interval_count": 1, "aggregate_usage": null, "trial_period_days": null}, "lookup_key": "pro_yearly", "tiers_mode": null, "unit_amount": 6900, "tax_behavior": "unspecified", "billing_scheme": "per_unit", "custom_unit_amount": null, "transform_quantity": null, "unit_amount_decimal": "6900"}', 'price_1OjWqnJfDYgxbs7ZTx9uUklY');
--
-- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "public"."products" ("id", "created_at", "product", "stripe_product_id") VALUES
(1, '2024-03-05 00:13:40.948122+00', '{"id": "prod_PXkoPOxUafT0Ig", "url": null, "name": "Pro plan", "type": "service", "active": true, "images": [], "object": "product", "created": 1707666659, "updated": 1709463616, "features": [], "livemode": false, "metadata": {}, "tax_code": "txcd_10000000", "shippable": null, "attributes": [], "unit_label": null, "description": "The zenblog pro plan, perfect for solo devs and entrepreneurs.", "default_price": "price_1OjWqnJfDYgxbs7ZTx9uUklY", "package_dimensions": null, "statement_descriptor": null}', 'prod_PXkoPOxUafT0Ig');
--
-- Data for Name: subscriptions; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "public"."subscriptions" ("created_at", "user_id", "status", "stripe_subscription_id", "subscription") VALUES
('2024-03-05 00:18:40.547732+00', 'a49658c5-b57d-4ba5-bf74-5666a9101917', 'active', 'sub_1OqliLJfDYgxbs7ZFySuoJA2', '{"id": "sub_1OqliLJfDYgxbs7ZFySuoJA2", "plan": {"id": "price_1OjWqnJfDYgxbs7ZTx9uUklY", "active": true, "amount": 6900, "object": "plan", "created": 1707872485, "product": "prod_PXkoPOxUafT0Ig", "currency": "usd", "interval": "year", "livemode": false, "metadata": {}, "nickname": null, "tiers_mode": null, "usage_type": "licensed", "amount_decimal": "6900", "billing_scheme": "per_unit", "interval_count": 1, "aggregate_usage": null, "transform_usage": null, "trial_period_days": null}, "items": {"url": "/v1/subscription_items?subscription=sub_1OqliLJfDYgxbs7ZFySuoJA2", "data": [{"id": "si_Pg7yY19RdaKZn8", "plan": {"id": "price_1OjWqnJfDYgxbs7ZTx9uUklY", "active": true, "amount": 6900, "object": "plan", "created": 1707872485, "product": "prod_PXkoPOxUafT0Ig", "currency": "usd", "interval": "year", "livemode": false, "metadata": {}, "nickname": null, "tiers_mode": null, "usage_type": "licensed", "amount_decimal": "6900", "billing_scheme": "per_unit", "interval_count": 1, "aggregate_usage": null, "transform_usage": null, "trial_period_days": null}, "price": {"id": "price_1OjWqnJfDYgxbs7ZTx9uUklY", "type": "recurring", "active": true, "object": "price", "created": 1707872485, "product": "prod_PXkoPOxUafT0Ig", "currency": "usd", "livemode": false, "metadata": {}, "nickname": null, "recurring": {"interval": "year", "usage_type": "licensed", "interval_count": 1, "aggregate_usage": null, "trial_period_days": null}, "lookup_key": "pro_yearly", "tiers_mode": null, "unit_amount": 6900, "tax_behavior": "unspecified", "billing_scheme": "per_unit", "custom_unit_amount": null, "transform_quantity": null, "unit_amount_decimal": "6900"}, "object": "subscription_item", "created": 1709597917, "metadata": {}, "quantity": 1, "tax_rates": [], "subscription": "sub_1OqliLJfDYgxbs7ZFySuoJA2", "billing_thresholds": null}], "object": "list", "has_more": false, "total_count": 1}, "object": "subscription", "status": "active", "created": 1709597917, "currency": "usd", "customer": "cus_Pg7yrD9WwB1SRM", "discount": null, "ended_at": null, "livemode": false, "metadata": {}, "quantity": 1, "schedule": null, "cancel_at": null, "trial_end": null, "start_date": 1709597917, "test_clock": null, "application": null, "canceled_at": null, "description": null, "trial_start": null, "on_behalf_of": null, "automatic_tax": {"enabled": false, "liability": null}, "transfer_data": null, "days_until_due": null, "default_source": null, "latest_invoice": "in_1OqliLJfDYgxbs7ZG750ga7A", "pending_update": null, "trial_settings": {"end_behavior": {"missing_payment_method": "create_invoice"}}, "invoice_settings": {"issuer": {"type": "self"}, "account_tax_ids": null}, "pause_collection": null, "payment_settings": {"payment_method_types": null, "payment_method_options": {"card": {"network": null, "request_three_d_secure": "automatic"}, "konbini": null, "acss_debit": null, "bancontact": null, "us_bank_account": null, "customer_balance": null}, "save_default_payment_method": "off"}, "collection_method": "charge_automatically", "default_tax_rates": [], "billing_thresholds": null, "current_period_end": 1741133917, "billing_cycle_anchor": 1709597917, "cancel_at_period_end": false, "cancellation_details": {"reason": null, "comment": null, "feedback": null}, "current_period_start": 1709597917, "pending_setup_intent": null, "default_payment_method": "pm_1OqliKJfDYgxbs7ZWUdKewWy", "application_fee_percent": null, "billing_cycle_anchor_config": null, "pending_invoice_item_interval": null, "next_pending_invoice_item_invoice": null}');
--
-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: buckets; Type: TABLE DATA; Schema: storage; Owner: supabase_storage_admin
--
INSERT INTO "storage"."buckets" ("id", "name", "owner", "created_at", "updated_at", "public", "avif_autodetection", "file_size_limit", "allowed_mime_types", "owner_id") VALUES
('images', 'images', NULL, '2024-03-05 00:20:57.175142+00', '2024-03-05 00:20:57.175142+00', true, false, NULL, NULL, NULL);
--
-- Data for Name: objects; Type: TABLE DATA; Schema: storage; Owner: supabase_storage_admin
--
--
-- Data for Name: hooks; Type: TABLE DATA; Schema: supabase_functions; Owner: supabase_functions_admin
--
--
-- Data for Name: secrets; Type: TABLE DATA; Schema: vault; Owner: supabase_admin
--
--
-- Name: refresh_tokens_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: supabase_auth_admin
--
SELECT pg_catalog.setval('"auth"."refresh_tokens_id_seq"', 2, true);
--
-- Name: key_key_id_seq; Type: SEQUENCE SET; Schema: pgsodium; Owner: supabase_admin
--
SELECT pg_catalog.setval('"pgsodium"."key_key_id_seq"', 1, false);
--
-- Name: feedback_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."feedback_id_seq"', 1, false);
--
-- Name: homepage_signup_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."homepage_signup_id_seq"', 1, false);
--
-- Name: post_tags_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."post_tags_id_seq"', 1, false);
--
-- Name: prices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."prices_id_seq"', 1, true);
--
-- Name: products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."products_id_seq"', 1, true);
--
-- Name: teams_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('"public"."teams_id_seq"', 1, false);
--
-- Name: hooks_id_seq; Type: SEQUENCE SET; Schema: supabase_functions; Owner: supabase_functions_admin
--
SELECT pg_catalog.setval('"supabase_functions"."hooks_id_seq"', 1, false);
--
-- PostgreSQL database dump complete
--
RESET ALL;