-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jacek/backend-vitest
- Loading branch information
Showing
278 changed files
with
7,810 additions
and
3,280 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleAttributePerLine": true, | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"jsxSingleQuote": true, | ||
"plugins": ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"], | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleAttributePerLine": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
integration/templates/astro-node/src/layouts/ViewTransitionsLayout.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
import { ViewTransitions } from 'astro:transitions'; | ||
interface Props { | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="description" content="Astro description" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title}</title> | ||
<ViewTransitions /> | ||
</head> | ||
<body> | ||
<main> | ||
<slot /> | ||
</main> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
integration/templates/astro-node/src/pages/transitions/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
import { SignedIn, SignedOut, UserButton } from "@clerk/astro/components"; | ||
import Layout from "../../layouts/ViewTransitionsLayout.astro"; | ||
--- | ||
|
||
<Layout title="Sign in"> | ||
<div class="w-full flex justify-center"> | ||
<SignedOut> | ||
<a href="/transitions/sign-in">Sign in</a> | ||
</SignedOut> | ||
<SignedIn> | ||
<UserButton /> | ||
</SignedIn> | ||
</div> | ||
</Layout> |
10 changes: 10 additions & 0 deletions
10
integration/templates/astro-node/src/pages/transitions/sign-in.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import { SignIn } from "@clerk/astro/components"; | ||
import Layout from "../../layouts/ViewTransitionsLayout.astro"; | ||
--- | ||
|
||
<Layout title="Sign in"> | ||
<div class="w-full flex justify-center"> | ||
<SignIn forceRedirectUrl="/transitions" /> | ||
</div> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/api/me/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export function GET() { | ||
const { userId } = auth(); | ||
export async function GET() { | ||
const { userId } = await auth(); | ||
return new Response(JSON.stringify({ userId })); | ||
} |
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/api/settings/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export function GET() { | ||
const { userId } = auth().protect(has => has({ role: 'admin' }) || has({ role: 'org:editor' })); | ||
export async function GET() { | ||
const { userId } = await auth.protect((has: any) => has({ role: 'admin' }) || has({ role: 'org:editor' })); | ||
return new Response(JSON.stringify({ userId })); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
integration/templates/next-app-router/src/app/only-admin/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
return <div>User is admin</div>; | ||
} |
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/organizations-by-id/[id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/organizations-by-id/[id]/settings/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/organizations-by-slug/[slug]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/organizations-by-slug/[slug]/settings/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
integration/templates/next-app-router/src/app/page-protected/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export default function Page() { | ||
auth().protect(); | ||
export default async function Page() { | ||
await auth.protect(); | ||
|
||
return <div>Protected Page</div>; | ||
} |
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/personal-account/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/settings/auth-has/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/settings/auth-protect/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export default function Page() { | ||
auth().protect({ role: 'admin' }); | ||
export default async function Page() { | ||
await auth.protect({ role: 'admin' }); | ||
return <p>User has access</p>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.