Skip to content

Commit

Permalink
fix: removed 'server-only' import
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeHulpoi committed Nov 19, 2024
1 parent feb9d64 commit 53691ac
Show file tree
Hide file tree
Showing 12 changed files with 1,283 additions and 2,093 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ next-env.d.ts
/*.tgz
.eslintcache
dev/.next
dev/.env
.swc
/test-results/
/playwright-report/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import type { Metadata } from 'next';

import config from '../../../payload/payload.config';
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '../../../../payload/payload.config';
import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views';
import { importMap } from '../importMap';

type Args = {
params: {
params: Promise<{
segments: string[];
};
searchParams: {
}>;
searchParams: Promise<{
[key: string]: string | string[];
};
}>;
};

export const generateMetadata = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import type { Metadata } from 'next';

import config from '../../../payload/payload.config';
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '../../../../payload/payload.config';
import { RootPage, generatePageMetadata } from '@payloadcms/next/views';
import { importMap } from '../importMap';

type Args = {
params: {
params: Promise<{
segments: string[];
};
searchParams: {
}>;
searchParams: Promise<{
[key: string]: string | string[];
};
}>;
};

export const generateMetadata = ({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY it because it could be re-written at any time. */
import config from '../../../payload/payload.config';
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '../../../../payload/payload.config';
import '@payloadcms/next/css';
import {
REST_DELETE,
REST_GET,
REST_OPTIONS,
REST_PATCH,
REST_POST,
REST_PUT,
} from '@payloadcms/next/routes';

export const GET = REST_GET(config);
export const POST = REST_POST(config);
export const DELETE = REST_DELETE(config);
export const PATCH = REST_PATCH(config);
export const PUT = REST_PUT(config);
export const OPTIONS = REST_OPTIONS(config);
8 changes: 8 additions & 0 deletions dev/src/app/(payload)/api/graphql/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '../../../../payload/payload.config';
import { GRAPHQL_POST, REST_OPTIONS } from '@payloadcms/next/routes';

export const POST = GRAPHQL_POST(config);

export const OPTIONS = REST_OPTIONS(config);
33 changes: 33 additions & 0 deletions dev/src/app/(payload)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '../../payload/payload.config';
import '@payloadcms/next/css';
import type { ServerFunctionClient } from 'payload';
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts';
import React from 'react';

import { importMap } from './admin/importMap.js';

type Args = {
children: React.ReactNode;
};

const serverFunction: ServerFunctionClient = async function (args) {
'use server';
return handleServerFunctions({
...args,
config,
importMap,
});
};

const Layout = ({ children }: Args) => (
<RootLayout
config={config}
importMap={importMap}
serverFunction={serverFunction}>
{children}
</RootLayout>
);

export default Layout;
20 changes: 0 additions & 20 deletions dev/src/app/admin/layout.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions dev/src/app/api/graphql/route.ts

This file was deleted.

36 changes: 16 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "payload-recaptcha-v3",
"version": "3.0.0-beta.1",
"version": "3.0.0",
"description": "This library implements a collection protection in Payload CMS using Google reCAPTCHA v3.",
"license": "MIT",
"type": "module",
Expand All @@ -25,10 +25,6 @@
"import": "./dist/index.js",
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./withPlugin": {
"import": "./dist/withPlugin.js",
"require": "./dist/withPlugin.js"
}
},
"scripts": {
Expand Down Expand Up @@ -57,21 +53,21 @@
"qs": "^6.12.1"
},
"peerDependencies": {
"next": "15.0.0-canary.104",
"payload": "3.0.0-beta.90"
"next": "^15.0.0",
"payload": "^3.0.0"
},
"devDependencies": {
"@payloadcms/db-mongodb": "3.0.0-beta.90",
"@payloadcms/next": "3.0.0-beta.90",
"@payloadcms/richtext-lexical": "3.0.0-beta.90",
"@payloadcms/db-mongodb": "^3.0.0",
"@payloadcms/next": "^3.0.0",
"@payloadcms/richtext-lexical": "^3.0.0",
"@playwright/test": "^1.45.1",
"@swc/cli": "0.3.12",
"@swc/jest": "0.2.36",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@types/qs": "^6.9.15",
"@types/react": "npm:[email protected]beta.0",
"@types/react-dom": "npm:[email protected]beta.0",
"@types/react": "npm:[email protected]rc.1",
"@types/react-dom": "npm:[email protected]rc.1",
"copyfiles": "^2.4.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -80,11 +76,11 @@
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^14.0.0",
"next": "15.0.0-canary.104",
"payload": "3.0.0-beta.90",
"next": "^15.0.0",
"payload": "^3.0.0",
"prettier": "^3.3.2",
"react": "19.0.0-rc-6230622a1a-20240610",
"react-dom": "19.0.0-rc-6230622a1a-20240610",
"react": "19.0.0-rc-65a56d0e-20241020",
"react-dom": "19.0.0-rc-65a56d0e-20241020",
"rimraf": "^5.0.7",
"ts-node": "^10.9.2",
"turbo": "^2.0.6",
Expand All @@ -100,12 +96,12 @@
},
"pnpm": {
"overrides": {
"@types/react": "npm:[email protected].0",
"@types/react-dom": "npm:[email protected].0"
"@types/react": "npm:[email protected].1",
"@types/react-dom": "npm:[email protected].1"
}
},
"overrides": {
"@types/react": "npm:[email protected].0",
"@types/react-dom": "npm:[email protected].0"
"@types/react": "npm:[email protected].1",
"@types/react-dom": "npm:[email protected].1"
}
}
Loading

0 comments on commit 53691ac

Please sign in to comment.