Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix conflicts and build issues

Kiran K494e82250bc4
diff --git a/apps/web/app/api/oauth-apps/[clientId]/disconnect/route.ts b/apps/web/app/api/oauth-apps/[clientId]/disconnect/route.ts
index d211db6de7..0eea016e44 100644
--- a/apps/web/app/api/oauth-apps/[clientId]/disconnect/route.ts
+++ b/apps/web/app/api/oauth-apps/[clientId]/disconnect/route.ts
@@ -26,6 +26,6 @@ export const DELETE = withWorkspace(
return NextResponse.json({ id: params.clientId });
},
{
- requiredScopes: ["oauth_apps.write"],
+ requiredPermissions: ["workspaces.write"],
},
);
diff --git a/apps/web/app/api/oauth-apps/[clientId]/route.ts b/apps/web/app/api/oauth-apps/[clientId]/route.ts
index 3ae5989e2d..f561d694b7 100644
--- a/apps/web/app/api/oauth-apps/[clientId]/route.ts
+++ b/apps/web/app/api/oauth-apps/[clientId]/route.ts
@@ -25,7 +25,7 @@ export const GET = withWorkspace(
return NextResponse.json(oAuthAppSchema.parse(app));
},
{
- requiredScopes: ["oauth_apps.read"],
+ requiredPermissions: ["oauth_apps.read"],
},
);
@@ -53,7 +53,7 @@ export const PATCH = withWorkspace(
return NextResponse.json(oAuthAppSchema.parse(app));
},
{
- requiredScopes: ["oauth_apps.write"],
+ requiredPermissions: ["oauth_apps.write"],
},
);
@@ -83,6 +83,6 @@ export const DELETE = withWorkspace(
return NextResponse.json({ id: params.clientId });
},
{
- requiredScopes: ["oauth_apps.write"],
+ requiredPermissions: ["oauth_apps.write"],
},
);
diff --git a/apps/web/app/api/oauth-apps/authorized/route.ts b/apps/web/app/api/oauth-apps/authorized/route.ts
index 6ef707040b..f264f44d07 100644
--- a/apps/web/app/api/oauth-apps/authorized/route.ts
+++ b/apps/web/app/api/oauth-apps/authorized/route.ts
@@ -47,6 +47,6 @@ export const GET = withWorkspace(
return NextResponse.json(appsAuthorized);
},
{
- requiredScopes: ["workspaces.read"],
+ requiredPermissions: ["workspaces.read"],
},
);
diff --git a/apps/web/app/api/oauth-apps/route.ts b/apps/web/app/api/oauth-apps/route.ts
index 4f05ab749d..93e36ad0b5 100644
--- a/apps/web/app/api/oauth-apps/route.ts
+++ b/apps/web/app/api/oauth-apps/route.ts
@@ -46,7 +46,7 @@ export const POST = withWorkspace(
);
},
{
- requiredScopes: ["oauth_apps.write"],
+ requiredPermissions: ["oauth_apps.write"],
},
);
@@ -62,6 +62,6 @@ export const GET = withWorkspace(
return NextResponse.json(z.array(oAuthAppSchema).parse(apps));
},
{
- requiredScopes: ["oauth_apps.read"],
+ requiredPermissions: ["oauth_apps.read"],
},
);
diff --git a/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx b/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
index 84241bf302..55c5addfe1 100644
--- a/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
+++ b/apps/web/app/app.dub.co/(auth)/invites/[code]/page.tsx
@@ -11,7 +11,7 @@ const PageCopy = ({ title, message }: { title: string; message: string }) => {
return (
<>
<h1 className="font-display text-3xl font-bold sm:text-4xl">{title}</h1>
- <p className="max-w-lg text-pretty text-gray-600 sm:text-lg">{message}</p>
+ <p className="text-pretty max-w-lg text-gray-600 sm:text-lg">{message}</p>
</>
);
};
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
index 3a845d5081..d26d49657b 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
@@ -107,6 +107,7 @@ const TokenRow = (token: TokenProps) => {
id: token.id,
name: token.name,
isMachine: token.user.isMachine,
+ // @ts-ignore
scopes: token.scopes,
},
});
diff --git a/apps/web/lib/api/tokens/scopes.ts b/apps/web/lib/api/tokens/scopes.ts
index 9384bed9c0..6eded47d3b 100644
--- a/apps/web/lib/api/tokens/scopes.ts
+++ b/apps/web/lib/api/tokens/scopes.ts
@@ -28,6 +28,8 @@ export const PERMISSION_ACTIONS = [
"tokens.read",
"tokens.write",
"conversions.write",
+ "oauth_apps.read",
+ "oauth_apps.write",
] as const;
export const RESOURCES: Resource[] = [
@@ -217,6 +219,16 @@ export const PERMISSIONS: Permission[] = [
description: "track conversions",
roles: ["owner"],
},
+ {
+ action: "oauth_apps.read",
+ description: "Read OAuth apps",
+ roles: ["owner", "member"],
+ },
+ {
+ action: "oauth_apps.write",
+ description: "Create, update, or delete OAuth apps",
+ roles: ["owner"],
+ },
];
export const SCOPES_BY_RESOURCE: ScopeByResource = SCOPES.reduce(
diff --git a/apps/web/ui/domains/domain-card.tsx b/apps/web/ui/domains/domain-card.tsx
index ec82ee075b..1689e4232e 100644
--- a/apps/web/ui/domains/domain-card.tsx
+++ b/apps/web/ui/domains/domain-card.tsx
@@ -203,7 +203,7 @@ export default function DomainCard({ props }: { props: DomainProps }) {
>
{data ? (
data.status === "Valid Configuration" ? (
- <div className="mt-6 flex items-center gap-2 text-pretty rounded-lg bg-green-100/80 p-3 text-sm text-green-600">
+ <div className="text-pretty mt-6 flex items-center gap-2 rounded-lg bg-green-100/80 p-3 text-sm text-green-600">
<CircleCheck className="h-5 w-5 shrink-0" />
<div>
Good news! Your DNS records are set up correctly, but it can
diff --git a/packages/ui/src/nav-logo.tsx b/packages/ui/src/nav-logo.tsx
index 925cf662d4..5c0a3d5d4d 100644
--- a/packages/ui/src/nav-logo.tsx
+++ b/packages/ui/src/nav-logo.tsx
@@ -82,7 +82,7 @@ export function NavLogo({
setIsPopoverOpen(false);
}}
>
- <div className="grid gap-1 rounded-lg border border-gray-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black">
+ <div className="grid gap-1 rounded-lg border border-gray-200 bg-white p-2 drop-shadow-sm dark:border-white/[0.15] dark:bg-black sm:min-w-[240px]">
<ContextMenuButton
text="Copy Logo as SVG"
variant="outline"
diff --git a/packages/ui/src/nav/content/shared.tsx b/packages/ui/src/nav/content/shared.tsx
index 1467ed9b0f..542649aed9 100644
--- a/packages/ui/src/nav/content/shared.tsx
+++ b/packages/ui/src/nav/content/shared.tsx
@@ -44,7 +44,7 @@ export function ContentLinkCard({
)}
</div>
{showArrow && (
- <ExpandingArrow className="invisible -ml-6 h-4 w-4 text-gray-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80" />
+ <ExpandingArrow className="invisible -ml-6 h-4 w-4 text-gray-700 group-aria-selected:visible dark:text-white/80 sm:group-hover:visible" />
)}
</div>
</Link>
diff --git a/packages/ui/src/nav/nav-mobile.tsx b/packages/ui/src/nav/nav-mobile.tsx
index 8d601ecaea..a1d0ab82d6 100644
--- a/packages/ui/src/nav/nav-mobile.tsx
+++ b/packages/ui/src/nav/nav-mobile.tsx
@@ -35,7 +35,7 @@ export function NavMobile({ theme = "light" }: { theme?: NavTheme }) {
<button
onClick={() => setOpen(!open)}
className={cn(
- "fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",
+ "fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 dark:hover:bg-white/20 dark:active:bg-white/30 lg:hidden",
open && "hover:bg-gray-100 active:bg-gray-200",
)}
>
@@ -47,7 +47,7 @@ export function NavMobile({ theme = "light" }: { theme?: NavTheme }) {
</button>
<nav
className={cn(
- "fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",
+ "fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 dark:bg-black dark:text-white/70 lg:hidden",
open && "block",
)}
>
diff --git a/packages/ui/src/tooltip.tsx b/packages/ui/src/tooltip.tsx
index 53f733ac7c..fa9263d041 100644
--- a/packages/ui/src/tooltip.tsx
+++ b/packages/ui/src/tooltip.tsx
@@ -46,7 +46,7 @@ export function Tooltip({ children, content, side = "top" }: TooltipProps) {
className="animate-slide-up-fade z-[99] items-center overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm"
>
{typeof content === "string" ? (
- <span className="block max-w-xs text-pretty px-4 py-2 text-center text-sm text-gray-700">
+ <span className="text-pretty block max-w-xs px-4 py-2 text-center text-sm text-gray-700">
{content}
</span>
) : (