Files
zeekay 09c5e16c5c feat: rebrand all packages to @hanzo/cms scope (Payload v3.85.2 fork)
- payload -> @hanzo/cms (core), bin payload -> hanzo-cms
- create-payload-app -> @hanzo/create-cms-app
- @payloadcms/<x> -> @hanzo/cms-<x> across the whole dependency graph
- 3545 files, 72 package.json, 4419 scoped refs, 3852 core import specifiers, 82 scss imports
- MIT attribution to Payload CMS Inc. preserved (LICENSE.md, author emails)

Upstream: github.com/payloadcms/payload @ v3.85.2 (MIT)
2026-07-01 17:56:00 -07:00

46 lines
1.2 KiB
TypeScript

import { fileURLToPath } from 'node:url'
import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import { resendAdapter } from '@hanzo/cms-email-resend'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'
export default buildConfigWithDefaults({
admin: {
importMap: {
baseDir: path.resolve(dirname),
},
},
collections: [],
// NOTE: The from address and api key should be properly set
// See email-resend README for more information
email: resendAdapter({
apiKey: process.env.RESEND_API_KEY || '',
defaultFromAddress: '[email protected]',
defaultFromName: 'Payload CMS',
}),
onInit: async (payload) => {
await payload.create({
collection: 'users',
data: {
email: devUser.email,
password: devUser.password,
},
})
const email = await payload.sendEmail({
subject: 'This was sent on init',
text: 'This is my message body',
to: '[email protected]',
})
payload.logger.info({ email, msg: 'Email sent' })
},
typescript: {
outputFile: path.resolve(dirname, 'payload-types.ts'),
},
})