bin ipal-doctor + @intecion/ipal-kit/doctor: static rules (versions, Node 22, AGENT.md §3 layout and naming, database names, env rules, headers, X-Powered-By, CSP, 2FA, cookie scanner, adminMeta, AGENTS.md, skills, seeds, block library via blockLibraryManifest, ipal-audit --quick), registry rules (latest plugin, pnpm audit --prod), live rules (--url, ipal-seo-check), deep rules (--deep via payload run; GET /api/ipal/doctor, off until IPAL_DOCTOR_TOKEN). Human / JSON output, --strict, exit codes 0/1/2/3, --sites drift table, ipal-doctor.json with reasons, until, files, seen. Fixes found on the way: sitemap leaves out the System pages 404 page; ipal-audit finds array labels after fields, any form seed, runs grep in UTF-8; ipal-seo-check counts duplicate titles per language. Reference site at zero findings (static), CI steps on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import type { GlobalConfig } from 'payload'
|
||
|
||
import { buildGlobalRevalidateHook, rowLabel } from '@intecion/ipal-kit'
|
||
import { revalidatePath } from 'next/cache'
|
||
|
||
/** Company data for a PL market site: footer, contact block details, LocalBusiness JSON-LD. */
|
||
export const Company: GlobalConfig = {
|
||
slug: 'company',
|
||
access: { read: () => true },
|
||
fields: [
|
||
{ name: 'name', type: 'text', required: true },
|
||
{ name: 'legalName', type: 'text' },
|
||
{ name: 'taxId', type: 'text', label: 'NIP' },
|
||
{ name: 'taxIdLabel', type: 'text', admin: { description: 'Shown before the tax ID in the footer.' }, defaultValue: 'NIP', label: 'Tax ID label', localized: true },
|
||
{
|
||
name: 'address',
|
||
type: 'group',
|
||
fields: [
|
||
{ name: 'street', type: 'text' },
|
||
{ name: 'postalCode', type: 'text' },
|
||
{ name: 'city', type: 'text' },
|
||
{ name: 'country', type: 'text', defaultValue: 'PL' },
|
||
],
|
||
},
|
||
{ name: 'phone', type: 'text' },
|
||
{ name: 'email', type: 'email' },
|
||
{ name: 'hours', type: 'text', localized: true, admin: { description: 'Shown next to the contact form, e.g. "Mon–Fri 9:00–17:00".' } },
|
||
{
|
||
name: 'socials',
|
||
type: 'array',
|
||
admin: { components: rowLabel('label', 'Profile'), initCollapsed: true },
|
||
labels: { plural: 'Profiles', singular: 'Profile' },
|
||
fields: [
|
||
{ name: 'label', type: 'text', required: true },
|
||
{ name: 'url', type: 'text', required: true },
|
||
],
|
||
},
|
||
],
|
||
hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] },
|
||
}
|