Skip to content

Commit e18fb81

Browse files
committed
chore: setup proper protection bypass
1 parent 216b273 commit e18fb81

File tree

9 files changed

+45
-33
lines changed

9 files changed

+45
-33
lines changed

apps/next-app-router/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vercel
2+
.env*.local

apps/next-app-router/app/layout.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import {unstable__adapter, unstable__environment} from '@sanity/client'
44
import DraftModeButton from './DraftModeButton'
55
import type {Metadata} from 'next'
66

7-
export const runtime = 'edge'
8-
97
export const metadata: Metadata = {
108
title: `next-app-router-${process.env.VARIANT || 'default'}`,
119
}

apps/next-app-router/app/page.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import {PreviewTable, PreviewFooter} from './previews'
1616
import {Suspense} from 'react'
1717
import LiveStoreVariant from './variants/live-store'
1818

19-
export const runtime = 'edge'
20-
2119
export default async function Page() {
2220
const footer = await sanityFetch<FooterProps['data']>({
2321
query: footerQuery,

apps/next-pages-router/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vercel
2+
.env*.local

apps/remix/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
/public/build
66
.vercel
77
*.env
8+
.env*.local

apps/studio/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vercel
2-
.sanity
2+
.sanity
3+
.env*.local

apps/studio/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@sanity/icons": "3.5.7",
1313
"@sanity/preview-kit": "workspace:*",
1414
"@sanity/ui": "2.11.4",
15+
"@sanity/vercel-protection-bypass": "1.0.3",
1516
"@sanity/vision": "3.71.0",
1617
"@types/react": "^19.0.7",
1718
"@types/react-dom": "^19.0.3",

apps/studio/sanity.config.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import {groqdPlaygroundTool} from 'groqd-playground'
22

33
import {visionTool} from '@sanity/vision'
44
import {defineConfig, defineField, defineType} from 'sanity'
5-
import {deskTool} from 'sanity/desk'
5+
import {structureTool} from 'sanity/structure'
66
import {benchmarkTool} from './src/benchmark'
77
import {IframeOptions, Iframe} from 'sanity-plugin-iframe-pane'
88
import {presentationTool} from 'sanity/presentation'
9+
import {vercelProtectionBypassTool} from '@sanity/vercel-protection-bypass'
910

1011
const iframeOptions = {
1112
reload: {
@@ -29,7 +30,7 @@ export default defineConfig({
2930
projectId: process.env.SANITY_STUDIO_PROJECT_ID!,
3031
dataset: process.env.SANITY_STUDIO_DATASET!,
3132
plugins: [
32-
deskTool({
33+
structureTool({
3334
defaultDocumentNode: (S, {schemaType}) => {
3435
switch (schemaType) {
3536
case `page`:
@@ -81,6 +82,7 @@ export default defineConfig({
8182
benchmarkTool(),
8283
visionTool(),
8384
groqdPlaygroundTool(),
85+
vercelProtectionBypassTool(),
8486
],
8587
schema: {
8688
types: [

pnpm-lock.yaml

+35-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)