Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev/app/(payload)/admin/importMap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'

export const importMap = {

"@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1
}
6 changes: 3 additions & 3 deletions dev/app/(payload)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from 'react';
import '@payloadcms/next/css';
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '@payload-config';
import type { ReactNode } from 'react';
import type { ServerFunctionClient } from 'payload';
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts';

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

interface Args {
children: React.ReactNode;
children: ReactNode;
}

const serverFunction: ServerFunctionClient = async function (args) {
Expand Down
2 changes: 1 addition & 1 deletion dev/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
5 changes: 2 additions & 3 deletions dev/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ export interface Config {
'payload-jobs-stats': PayloadJobsStatsSelect<false> | PayloadJobsStatsSelect<true>;
};
locale: null;
user: User & {
collection: 'users';
};
user: User;
jobs: {
tasks: {
'cleanup-payload-auditor-log': TaskCleanupPayloadAuditorLog;
Expand Down Expand Up @@ -174,6 +172,7 @@ export interface User {
}[]
| null;
password?: string | null;
collection: 'users';
}
/**
* This interface was referenced by `Config`'s JSON-Schema
Expand Down
25 changes: 14 additions & 11 deletions dev/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,27 @@ if (!process.env.ROOT_DIR) {
export default buildConfig({
admin: { importMap: { baseDir: path.resolve(dirname) } },
collections: [media, users],
db: mongooseAdapter({ url: process.env.DATABASE_URI || '' }),
db: mongooseAdapter({ url: process.env.DATABASE_URI || '', connectOptions: {
dbName: 'payload-auditor-db',
appName: 'payload-auditor-app',
} }),
editor: lexicalEditor(),
email: testEmailAdapter,
// plugins
plugins: [
auditorPlugin({
automation: { logCleanup: { cronTime: '*/1 * * * *', queueName: 'test', olderThan: 30000 } },
collection: {
configureRootCollection(defaults) {
return {
...defaults,
slug: 'some-name',
labels: {
singular: 'some-name',
plural: 'some-names',
},
};
},
// configureRootCollection(defaults) {
// return {
// ...defaults,
// slug: 'some-name',
// labels: {
// singular: 'some-name',
// plural: 'some-names',
// },
// };
// },
trackCollections: [
{
slug: 'media',
Expand Down
Loading
Loading