Skip to content

Commit 200152a

Browse files
authored
chore: update nextjs
1 parent a0b5d95 commit 200152a

11 files changed

Lines changed: 1950 additions & 3170 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
1+
import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'
22

33
export const importMap = {
4-
4+
"@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1
55
}

dev/app/(payload)/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import React from 'react';
21
import '@payloadcms/next/css';
32
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
43
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
54
import config from '@payload-config';
5+
import type { ReactNode } from 'react';
66
import type { ServerFunctionClient } from 'payload';
77
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts';
88

9-
import { importMap } from './admin/importMap.js';
109
import './custom.scss';
10+
import { importMap } from './admin/importMap.js';
1111

1212
interface Args {
13-
children: React.ReactNode;
13+
children: ReactNode;
1414
}
1515

1616
const serverFunction: ServerFunctionClient = async function (args) {

dev/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference path="./.next/types/routes.d.ts" />
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

dev/payload-types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ export interface Config {
9898
'payload-jobs-stats': PayloadJobsStatsSelect<false> | PayloadJobsStatsSelect<true>;
9999
};
100100
locale: null;
101-
user: User & {
102-
collection: 'users';
103-
};
101+
user: User;
104102
jobs: {
105103
tasks: {
106104
'cleanup-payload-auditor-log': TaskCleanupPayloadAuditorLog;
@@ -174,6 +172,7 @@ export interface User {
174172
}[]
175173
| null;
176174
password?: string | null;
175+
collection: 'users';
177176
}
178177
/**
179178
* This interface was referenced by `Config`'s JSON-Schema

dev/payload.config.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,27 @@ if (!process.env.ROOT_DIR) {
2323
export default buildConfig({
2424
admin: { importMap: { baseDir: path.resolve(dirname) } },
2525
collections: [media, users],
26-
db: mongooseAdapter({ url: process.env.DATABASE_URI || '' }),
26+
db: mongooseAdapter({ url: process.env.DATABASE_URI || '', connectOptions: {
27+
dbName: 'payload-auditor-db',
28+
appName: 'payload-auditor-app',
29+
} }),
2730
editor: lexicalEditor(),
2831
email: testEmailAdapter,
2932
// plugins
3033
plugins: [
3134
auditorPlugin({
3235
automation: { logCleanup: { cronTime: '*/1 * * * *', queueName: 'test', olderThan: 30000 } },
3336
collection: {
34-
configureRootCollection(defaults) {
35-
return {
36-
...defaults,
37-
slug: 'some-name',
38-
labels: {
39-
singular: 'some-name',
40-
plural: 'some-names',
41-
},
42-
};
43-
},
37+
// configureRootCollection(defaults) {
38+
// return {
39+
// ...defaults,
40+
// slug: 'some-name',
41+
// labels: {
42+
// singular: 'some-name',
43+
// plural: 'some-names',
44+
// },
45+
// };
46+
// },
4447
trackCollections: [
4548
{
4649
slug: 'media',

0 commit comments

Comments
 (0)