@tetherto/dev-websites-core 0.0.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cms-5bS91IRZ.mjs","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/collections/createApiTokens.ts","../src/cms/hooks/slugify.ts","../src/cms/shared/seo-fields.ts","../src/cms/collections/createAuthors.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/lexical/editor.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/index.ts","../src/cms/hooks/set-published-at.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createChangelog.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createUsers.ts","../src/cms/globals/createSiteSettings.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts"],"sourcesContent":["import type { Access, FieldAccess, PayloadRequest } from 'payload'\n\nexport type AccessOptions = {\n /**\n * When true, disabled `api-tokens` users are denied public reads.\n * Defaults to on when the stock `api-tokens` collection is enabled.\n */\n apiTokens?: boolean\n}\n\nexport type AccessHelpers = {\n adminOnly: ({ req }: { req: PayloadRequest }) => boolean\n adminOrPublished: Access\n publicRead: Access\n adminOnlyField: FieldAccess\n}\n\nconst isAdminUser = (req: PayloadRequest): boolean => req.user?.collection === 'users'\n\nconst isDisabledApiToken = (req: PayloadRequest): boolean =>\n req.user?.collection === 'api-tokens' && req.user?.enabled === false\n\n/**\n * Build access helpers. Pass `{ apiTokens: true }` when the `api-tokens`\n * collection is registered (stock by default via `buildCmsConfig`).\n */\nexport function createAccessHelpers(options: AccessOptions = {}): AccessHelpers {\n const apiTokens = options.apiTokens === true\n\n const adminOnly = ({ req }: { req: PayloadRequest }): boolean => isAdminUser(req)\n\n const adminOrPublished: Access = ({ req }) => {\n if (isAdminUser(req)) return true\n if (apiTokens && isDisabledApiToken(req)) return false\n return { _status: { equals: 'published' } }\n }\n\n const publicRead: Access = ({ req }) => {\n if (apiTokens && isDisabledApiToken(req)) return false\n return true\n }\n\n const adminOnlyField: FieldAccess = ({ req }) => isAdminUser(req)\n\n return { adminOnly, adminOrPublished, publicRead, adminOnlyField }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { Access, CollectionConfig } from 'payload'\n\nconst adminOrSelf: Access = ({ req }) => {\n if (req.user?.collection === 'users') return true\n if (req.user?.collection === 'api-tokens') return { id: { equals: req.user.id } }\n return false\n}\n\n/**\n * Stock API-key auth collection for server-to-server Payload REST/GraphQL clients.\n * Disable per site with `overrides['api-tokens'] = false`.\n */\nexport function createApiTokens(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'api-tokens',\n labels: {\n singular: 'API Token',\n plural: 'API Tokens',\n },\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'description', 'enabled', 'createdAt'],\n description:\n 'Server-to-server tokens for non-admin clients calling the Payload REST/GraphQL API. ' +\n 'Each token authenticates as an api-tokens user and is restricted to published, public-readable content.',\n },\n auth: {\n useAPIKey: true,\n disableLocalStrategy: true,\n },\n access: {\n read: adminOrSelf,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n admin: {\n description: 'Human-readable label, e.g. \"mobile-app-prod\" or \"partner-foo\".',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n admin: {\n description: 'Who is this token for and what is it used for? Free-form notes.',\n },\n },\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description:\n 'Disable to soft-revoke. To hard-revoke, clear the API Key field or delete the document.',\n },\n },\n ],\n }\n}\n","import type { FieldHook } from 'payload'\n\nexport const slugify: FieldHook = ({ value }) =>\n typeof value === 'string'\n ? value\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-]/g, '')\n : value\n","import type { GroupField, Validate } from 'payload'\n\nconst MAX_META_TITLE = 60\nconst MAX_META_DESCRIPTION = 160\n\nconst validateMetaTitle: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta title is required.'\n if (value.length > MAX_META_TITLE)\n return `Meta title must be ${MAX_META_TITLE} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateMetaDescription: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta description is required.'\n if (value.length > MAX_META_DESCRIPTION)\n return `Meta description must be ${MAX_META_DESCRIPTION} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateUrl: Validate<string | null | undefined> = (value) => {\n if (!value) return true\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/page).'\n }\n}\n\nexport const seoFields: GroupField = {\n name: 'seo',\n type: 'group',\n label: 'SEO',\n fields: [\n {\n name: 'metaTitle',\n type: 'text',\n required: true,\n localized: true,\n maxLength: MAX_META_TITLE,\n validate: validateMetaTitle,\n admin: {\n description: `Required. ${MAX_META_TITLE} characters max — shown in browser tabs and search results.`,\n },\n },\n {\n name: 'metaDescription',\n type: 'textarea',\n required: true,\n localized: true,\n validate: validateMetaDescription,\n admin: {\n description: `Required. ${MAX_META_DESCRIPTION} characters max — shown in search result snippets.`,\n },\n },\n {\n name: 'ogImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description:\n 'Used when the page is shared on social media (1200×630 recommended). Falls back to cover image if empty.',\n },\n },\n {\n name: 'canonicalUrl',\n type: 'text',\n validate: validateUrl,\n admin: {\n description: 'Override for syndicated content. Leave empty to auto-derive from slug.',\n },\n },\n {\n name: 'noIndex',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description: 'When checked, search engines will not index this page.',\n },\n },\n {\n name: 'noFollow',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description:\n 'When checked, search engines will not follow links on this page (paired with noIndex if needed).',\n },\n },\n ],\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createAuthors(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'authors',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'role'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'role',\n type: 'text',\n localized: true,\n admin: {\n description: 'Job title or role (e.g. \"Lead Engineer\")',\n },\n },\n {\n name: 'bio',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n admin: { position: 'sidebar' },\n fields: [\n { name: 'website', type: 'text' },\n { name: 'twitter', type: 'text', admin: { description: '@handle or full URL' } },\n { name: 'linkedin', type: 'text' },\n { name: 'github', type: 'text' },\n ],\n },\n {\n ...seoFields,\n fields: [\n ...seoFields.fields,\n {\n name: 'jsonLd',\n type: 'group',\n label: 'Structured Data Overrides',\n admin: {\n description: 'Used in JSON-LD Person schema on author pages and article bylines.',\n },\n fields: [\n {\n name: 'jobTitle',\n type: 'text',\n admin: { description: 'schema.org jobTitle (defaults to role if empty)' },\n },\n {\n name: 'worksFor',\n type: 'text',\n admin: { description: 'Organization name for schema.org worksFor' },\n },\n {\n name: 'sameAs',\n type: 'array',\n admin: {\n description: 'Extra canonical URLs for this person (Wikipedia, Crunchbase, etc.)',\n },\n fields: [{ name: 'url', type: 'text', required: true }],\n },\n ],\n },\n ],\n },\n ],\n }\n}\n","/** Shared language options for CMS code blocks and Lexical CodeBlock feature. */\nexport const languageOptions = [\n { label: 'TypeScript', value: 'typescript' },\n { label: 'JavaScript', value: 'javascript' },\n { label: 'Python', value: 'python' },\n { label: 'Bash / Shell', value: 'bash' },\n { label: 'Shell', value: 'shell' },\n { label: 'JSON', value: 'json' },\n { label: 'CSS', value: 'css' },\n { label: 'HTML', value: 'html' },\n { label: 'Rust', value: 'rust' },\n { label: 'Go', value: 'go' },\n { label: 'YAML', value: 'yaml' },\n { label: 'Markdown', value: 'markdown' },\n { label: 'Plain Text', value: 'plaintext' },\n]\n\nexport const codeBlockLanguages: Record<string, string> = Object.fromEntries(\n languageOptions.map((opt) => [opt.value, opt.label])\n)\n\nexport const defaultCodeLanguage = 'plaintext'\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeBlock: Block = {\n slug: 'code',\n labels: { singular: 'Code Block', plural: 'Code Blocks' },\n fields: [\n {\n name: 'language',\n type: 'select',\n defaultValue: 'typescript',\n options: languageOptions,\n },\n {\n name: 'filename',\n type: 'text',\n admin: { description: 'Optional filename label shown above the block' },\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'typescript' },\n },\n ],\n}\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeTabsBlock: Block = {\n slug: 'code-tabs',\n labels: { singular: 'Code Tabs', plural: 'Code Tabs' },\n fields: [\n {\n name: 'tabs',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'label',\n type: 'text',\n required: true,\n admin: { description: 'Tab label (e.g. Windows, Linux, Android)' },\n },\n {\n name: 'language',\n type: 'select',\n defaultValue: 'bash',\n options: languageOptions,\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'bash' },\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const downloadCtaBlock: Block = {\n slug: 'download-cta',\n labels: { singular: 'Download CTA', plural: 'Download CTAs' },\n fields: [\n {\n name: 'eyebrow',\n type: 'text',\n localized: true,\n },\n {\n name: 'heading',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'headingAccent',\n type: 'text',\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'submitLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'downloadUrl',\n type: 'text',\n required: true,\n },\n {\n name: 'downloadLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'successMessage',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'consent',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'footnote',\n type: 'textarea',\n localized: true,\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const imageBlock: Block = {\n slug: 'image',\n labels: { singular: 'Image', plural: 'Images' },\n fields: [\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n required: true,\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const videoBlock: Block = {\n slug: 'video',\n labels: { singular: 'Video', plural: 'Videos' },\n fields: [\n {\n name: 'video',\n type: 'upload',\n relationTo: 'media',\n required: true,\n filterOptions: {\n mimeType: { contains: 'video' },\n },\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import {\n BlocksFeature,\n CodeBlock,\n EXPERIMENTAL_TableFeature,\n UploadFeature,\n editorConfigFactory,\n lexicalEditor,\n} from '@payloadcms/richtext-lexical'\n\nimport { codeBlockLanguages, defaultCodeLanguage } from '../blocks/language-options.js'\nimport { videoBlock } from '../blocks/video.js'\n\nimport type { FeatureProviderServer } from '@payloadcms/richtext-lexical'\nimport type { SanitizedConfig } from 'payload'\n\nconst richTextFeatures = ({\n defaultFeatures,\n}: {\n defaultFeatures: FeatureProviderServer[]\n rootFeatures: FeatureProviderServer[]\n}) => [\n ...defaultFeatures.filter((feature) => feature.key !== 'upload'),\n UploadFeature({\n collections: {\n media: {\n fields: [\n {\n name: 'caption',\n type: 'text',\n },\n ],\n },\n },\n }),\n BlocksFeature({\n blocks: [\n CodeBlock({\n languages: codeBlockLanguages,\n defaultLanguage: defaultCodeLanguage,\n }),\n videoBlock,\n ],\n }),\n EXPERIMENTAL_TableFeature(),\n]\n\n/**\n * Shared Lexical editor for every `richText` field.\n *\n * Adds `CodeBlock`, inline `video` block, media upload captions, and\n * `EXPERIMENTAL_TableFeature` on top of Payload defaults.\n */\n// Return type is derived from `lexicalEditor` (a public export) rather than the\n// inferred `LexicalRichTextAdapterProvider` (not re-exported), so the generated\n// declaration stays portable while keeping the narrow Lexical adapter type that\n// consumers like `editorConfigFactory.fromEditor` require.\nexport const richTextEditor = (): ReturnType<typeof lexicalEditor> =>\n lexicalEditor({\n features: richTextFeatures,\n })\n\n/** Resolve Lexical editor config for seed scripts / markdown conversion. */\nexport async function getRichTextEditorConfig(config: SanitizedConfig) {\n return editorConfigFactory.fromFeatures({\n config,\n features: richTextFeatures,\n })\n}\n","import { richTextEditor } from '../lexical/editor.js'\n\nimport type { Block } from 'payload'\n\nexport const richTextBlock: Block = {\n slug: 'rich-text',\n labels: { singular: 'Rich Text', plural: 'Rich Text Blocks' },\n fields: [\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const stepsBlock: Block = {\n slug: 'steps',\n labels: { singular: 'Steps List', plural: 'Steps Lists' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n admin: { description: 'Optional avatar or icon shown next to the step' },\n },\n ],\n },\n ],\n}\n","import { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport const leafBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n]\n","import { leafBlocks } from './leaf-blocks.js'\n\nimport type { Block } from 'payload'\n\nexport const accordionBlock: Block = {\n slug: 'accordion',\n labels: { singular: 'Accordion', plural: 'Accordions' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'defaultOpen',\n type: 'checkbox',\n defaultValue: false,\n },\n {\n name: 'content',\n type: 'blocks',\n blocks: leafBlocks,\n localized: true,\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const sectionHeadingBlock: Block = {\n slug: 'section-heading',\n labels: { singular: 'Section Heading', plural: 'Section Headings' },\n fields: [\n {\n name: 'text',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n}\n","import { accordionBlock } from './accordion.js'\nimport { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { sectionHeadingBlock } from './section-heading.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport { richTextBlock } from './rich-text.js'\nexport { codeBlock } from './code.js'\nexport { codeTabsBlock } from './code-tabs.js'\nexport { imageBlock } from './image.js'\nexport { videoBlock } from './video.js'\nexport { downloadCtaBlock } from './download-cta.js'\nexport { stepsBlock } from './steps.js'\nexport { accordionBlock } from './accordion.js'\nexport { sectionHeadingBlock } from './section-heading.js'\nexport { leafBlocks } from './leaf-blocks.js'\nexport { languageOptions, codeBlockLanguages, defaultCodeLanguage } from './language-options.js'\n\nexport const blogContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const pageContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const showcaseContentBlocks: Block[] = [\n sectionHeadingBlock,\n richTextBlock,\n codeBlock,\n imageBlock,\n]\n","import type { CollectionBeforeChangeHook } from 'payload'\n\nexport const setPublishedAt: CollectionBeforeChangeHook = ({ data }) => {\n if (data && !data.publishedAt && data._status === 'published') {\n data.publishedAt = new Date().toISOString()\n }\n return data\n}\n","import type { CollectionConfig } from 'payload'\n\nexport const draftsWithAutosave: CollectionConfig['versions'] = {\n maxPerDoc: 25,\n drafts: {\n autosave: {\n interval: 800,\n },\n schedulePublish: true,\n },\n}\n","import { blogContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock blog-posts collection (no site revalidation — add via overrides.hooks). */\nexport function createBlogPosts(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'blog-posts',\n defaultSort: '-publishedAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'author', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per post.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'imageAlt',\n type: 'text',\n localized: true,\n admin: {\n description:\n 'Alt text used for the auto-generated social/OG image (`og:image:alt`). Should describe the post for screen readers.',\n },\n },\n {\n name: 'excerpt',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short summary shown in listing cards and meta description fallback.',\n },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: blogContentBlocks,\n },\n {\n name: 'author',\n type: 'relationship',\n relationTo: 'authors',\n admin: { position: 'sidebar' },\n },\n {\n name: 'category',\n type: 'relationship',\n relationTo: 'categories',\n admin: { position: 'sidebar' },\n },\n {\n name: 'readingTime',\n type: 'number',\n min: 1,\n admin: {\n position: 'sidebar',\n description: 'Estimated reading time in minutes.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n {\n name: 'showLatestNews',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description: 'Show a \"Latest News\" section at the bottom of this post.',\n },\n },\n seoFields,\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createCategories(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'categories',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/**\n * Stock changelog collection (shared fields only).\n * Site-specific body / GitHub / related-block fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createChangelog(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog',\n labels: { singular: 'Changelog', plural: 'Changelog' },\n defaultSort: '-releaseDate',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'version', 'versionType', 'tags', 'releaseDate', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description:\n 'Release headline shown on the changelog detail page (e.g. \"Added Solana Support\").',\n },\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per entry.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'version',\n type: 'text',\n admin: {\n position: 'sidebar',\n description:\n 'Optional semantic version label shown in the badge, e.g. v1.1.0 or 2.3.0. Omit for non-versioned announcements.',\n },\n },\n {\n name: 'versionType',\n type: 'select',\n options: [\n { label: 'Major', value: 'major' },\n { label: 'Minor', value: 'minor' },\n { label: 'Patch', value: 'patch' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Release line for badge styling (major / minor / patch). Editors set this explicitly.',\n },\n },\n {\n name: 'releaseDate',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayOnly', displayFormat: 'MMM d, yyyy' },\n },\n },\n {\n name: 'tags',\n type: 'relationship',\n relationTo: 'changelog-tags',\n hasMany: true,\n label: 'Tags',\n admin: {\n position: 'sidebar',\n description: 'Editor-managed tags from the Changelog Tags collection.',\n },\n },\n {\n name: 'heroImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Large visual above the article body on the changelog detail page.',\n },\n },\n {\n name: 'summary',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short excerpt for listing cards and previews.',\n },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock changelog-tags (no site revalidation — add via overrides.hooks). */\nexport function createChangelogTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog-tags',\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description: 'Tags shown on changelog entries.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by listing filters.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors. Not rendered publicly yet.' },\n },\n ],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock media upload collection (always publicly readable once uploaded). */\nexport function createMedia(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'media',\n admin: {\n useAsTitle: 'filename',\n defaultColumns: ['filename', 'alt', 'updatedAt'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n upload: {\n imageSizes: [\n {\n name: 'thumbnail',\n width: 400,\n height: 300,\n position: 'centre',\n },\n {\n name: 'card',\n width: 768,\n height: 512,\n position: 'centre',\n },\n {\n name: 'tablet',\n width: 1024,\n height: undefined,\n position: 'centre',\n },\n ],\n adminThumbnail: 'thumbnail',\n mimeTypes: ['image/*', 'video/*', 'application/pdf'],\n },\n fields: [\n {\n name: 'alt',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n }\n}\n","import { pageContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nfunction createContentPageCollection(\n access: AccessHelpers,\n slug: 'pages' | 'legal-pages'\n): CollectionConfig {\n return {\n slug,\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per page.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: pageContentBlocks,\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n seoFields,\n ],\n }\n}\n\nexport function createPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'pages')\n}\n\nexport function createLegalPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'legal-pages')\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createUsers(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'users',\n admin: {\n useAsTitle: 'email',\n },\n auth: true,\n access: {\n read: access.adminOnly,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { GlobalConfig } from 'payload'\n\nexport function createSiteSettings(access: AccessHelpers): GlobalConfig {\n return {\n slug: 'site-settings',\n label: 'Site Settings',\n access: {\n read: access.publicRead,\n update: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Public site name used in titles and structured data.',\n },\n },\n {\n name: 'defaultDescription',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Fallback meta description when a page does not define its own.',\n },\n },\n {\n name: 'defaultOgImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Default Open Graph image (1200×630 recommended).',\n },\n },\n {\n name: 'organization',\n type: 'group',\n label: 'Organization',\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'legalName',\n type: 'text',\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'logo',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'foundingDate',\n type: 'text',\n admin: { description: 'Year or ISO date for schema.org structured data.' },\n },\n ],\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n fields: [\n { name: 'twitter', type: 'text' },\n { name: 'github', type: 'text' },\n { name: 'linkedin', type: 'text' },\n ],\n },\n ],\n }\n}\n","import type { CollectionConfig, Field, GlobalConfig } from 'payload'\n\ntype OverridableConfig = CollectionConfig | GlobalConfig\n\ntype Override<TConfig extends OverridableConfig> =\n | false\n | {\n fields?: (base: Field[]) => Field[]\n hooks?: Partial<TConfig['hooks']>\n admin?: Partial<TConfig['admin']>\n access?: Partial<TConfig['access']>\n config?: (base: TConfig) => TConfig\n }\n\nexport type CollectionOverride = Override<CollectionConfig>\nexport type GlobalOverride = Override<GlobalConfig>\n\ntype HookArrays = Record<string, unknown[] | undefined>\n\n// Payload collection/global hooks are all arrays of functions, so overrides are\n// appended to the base hooks rather than replacing them.\nfunction mergeHooks(base: HookArrays | undefined, extra: HookArrays | undefined): HookArrays {\n const keys = new Set([...Object.keys(base ?? {}), ...Object.keys(extra ?? {})])\n const merged: HookArrays = {}\n keys.forEach((key) => {\n const combined = [...(base?.[key] ?? []), ...(extra?.[key] ?? [])]\n if (combined.length) merged[key] = combined\n })\n return merged\n}\n\nfunction applyOverride<TConfig extends OverridableConfig>(\n base: TConfig,\n override: Override<TConfig> | undefined\n): TConfig | null {\n if (override === false) return null\n if (!override) return base\n\n const next = {\n ...base,\n ...(override.admin && { admin: { ...base.admin, ...override.admin } }),\n ...(override.access && { access: { ...base.access, ...override.access } }),\n ...(override.fields && { fields: override.fields(base.fields ?? []) }),\n ...(override.hooks && { hooks: mergeHooks(base.hooks, override.hooks as HookArrays) }),\n } as TConfig\n\n return override.config ? override.config(next) : next\n}\n\nexport const applyCollectionOverride = (\n base: CollectionConfig,\n override: CollectionOverride | undefined\n): CollectionConfig | null => applyOverride(base, override)\n\nexport const applyGlobalOverride = (\n base: GlobalConfig,\n override: GlobalOverride | undefined\n): GlobalConfig | null => applyOverride(base, override)\n","import type { CollectionOverride, GlobalOverride } from './applyOverride.js'\n\n/** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */\nexport const STOCK_COLLECTION_SLUGS = [\n 'users',\n 'api-tokens',\n 'media',\n 'authors',\n 'categories',\n 'blog-posts',\n 'pages',\n 'legal-pages',\n 'changelog-tags',\n 'changelog',\n] as const\n\nexport type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number]\n\n/** Typed map of collection/global overrides for `buildCmsConfig`. */\nexport type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {\n 'site-settings'?: GlobalOverride\n}\n","import { buildConfig } from 'payload'\n\nimport { createAccessHelpers, type AccessOptions } from './shared/access.js'\nimport { createApiTokens } from './collections/createApiTokens.js'\nimport { createAuthors } from './collections/createAuthors.js'\nimport { createBlogPosts } from './collections/createBlogPosts.js'\nimport { createCategories } from './collections/createCategories.js'\nimport { createChangelog } from './collections/createChangelog.js'\nimport { createChangelogTags } from './collections/createChangelogTags.js'\nimport { createMedia } from './collections/createMedia.js'\nimport { createLegalPages, createPages } from './collections/createPages.js'\nimport { createUsers } from './collections/createUsers.js'\nimport { createSiteSettings } from './globals/createSiteSettings.js'\nimport { richTextEditor } from './lexical/editor.js'\nimport { applyCollectionOverride, applyGlobalOverride } from './applyOverride.js'\nimport { STOCK_COLLECTION_SLUGS, type Overrides, type StockCollectionSlug } from './overrides.js'\n\nimport type { CollectionConfig, Config, GlobalConfig, Plugin } from 'payload'\n\nexport type BuildCmsConfigOptions<TLocale extends string = string> = {\n secret: string\n // Payload DB adapter instance (e.g. mongooseAdapter({ url }))\n db: Config['db']\n /** Sharp instance from the `sharp` package. */\n sharp?: Config['sharp']\n cors?: Config['cors']\n csrf?: Config['csrf']\n locales: readonly TLocale[]\n /** Must be one of `locales`. */\n defaultLocale: TLocale\n admin?: Config['admin']\n plugins?: Plugin[]\n /** Defaults to the package Lexical editor. */\n editor?: Config['editor']\n access?: AccessOptions\n /** Collection/global slug → override | false. */\n overrides?: Overrides\n extraCollections?: CollectionConfig[]\n extraGlobals?: GlobalConfig[]\n typescript?: Config['typescript']\n /** Extra top-level Payload config keys (e.g. endpoints, graphQL). */\n payload?: Partial<\n Omit<\n Config,\n | 'secret'\n | 'db'\n | 'sharp'\n | 'cors'\n | 'csrf'\n | 'admin'\n | 'plugins'\n | 'editor'\n | 'collections'\n | 'globals'\n | 'localization'\n | 'typescript'\n >\n >\n}\n\n/** Drop keys whose value is `undefined` so they don't clobber Payload defaults. */\nfunction defined<T extends Record<string, unknown>>(obj: T): Partial<T> {\n return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>\n}\n\n/**\n * Build a Payload config from shared stock collections/globals plus site\n * overrides and extras. Types are still generated in the consuming app.\n */\nexport function buildCmsConfig<const TLocale extends string>(\n options: BuildCmsConfigOptions<TLocale>\n) {\n const overrides = options.overrides ?? {}\n const access = createAccessHelpers({\n ...options.access,\n apiTokens: options.access?.apiTokens ?? overrides['api-tokens'] !== false,\n })\n\n const stock: Record<StockCollectionSlug, CollectionConfig> = {\n 'users': createUsers(access),\n 'api-tokens': createApiTokens(access),\n 'media': createMedia(access),\n 'authors': createAuthors(access),\n 'categories': createCategories(access),\n 'blog-posts': createBlogPosts(access),\n 'pages': createPages(access),\n 'legal-pages': createLegalPages(access),\n 'changelog-tags': createChangelogTags(access),\n 'changelog': createChangelog(access),\n }\n\n const collections = [\n ...STOCK_COLLECTION_SLUGS.map((slug) =>\n applyCollectionOverride(stock[slug], overrides[slug])\n ).filter((c): c is CollectionConfig => c !== null),\n ...(options.extraCollections ?? []),\n ]\n\n const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides['site-settings'])\n const globals = [...(siteSettings ? [siteSettings] : []), ...(options.extraGlobals ?? [])]\n\n return buildConfig({\n ...options.payload,\n ...defined({\n sharp: options.sharp,\n cors: options.cors,\n csrf: options.csrf,\n plugins: options.plugins,\n }),\n secret: options.secret,\n db: options.db,\n admin: {\n user: 'users',\n ...options.admin,\n },\n editor: options.editor ?? richTextEditor(),\n collections,\n ...(globals.length ? { globals } : {}),\n localization: {\n locales: options.locales.map((code) => ({\n code,\n label: code.toUpperCase(),\n })),\n defaultLocale: options.defaultLocale,\n fallback: true,\n },\n typescript: options.typescript ?? {\n outputFile: 'src/payload-types.ts',\n },\n })\n}\n","import { createLogger } from '../utils/logger/logger.js'\n\nconst log = createLogger('env')\n\n/**\n * Read a required env var. During Next.js `phase-production-build` and\n * `generate:importmap` (when NEXT_PHASE is unset) returns \"\" instead of throwing,\n * because those phases do not connect to the DB.\n */\nexport function requireEnvAtRuntime(name: string): string {\n const value = process.env[name]\n const isBuildTime = !process.env.NEXT_PHASE || process.env.NEXT_PHASE === 'phase-production-build'\n if (!value && !isBuildTime) {\n log.error(`Missing required environment variable: ${name}`)\n throw new Error(`Missing required environment variable: ${name}`)\n }\n return value ?? ''\n}\n","import { s3Storage } from '@payloadcms/storage-s3'\n\nimport type { Plugin } from 'payload'\n\nexport type CreateS3MediaPluginOptions = {\n /** Defaults to `process.env.AWS_S3_BUCKET`. */\n bucket?: string\n accessKeyId?: string\n secretAccessKey?: string\n region?: string\n /** Custom S3-compatible endpoint (MinIO, etc.). Defaults to `AWS_S3_ENDPOINT`. */\n endpoint?: string\n /** Defaults to `AWS_S3_FORCE_PATH_STYLE === 'true'`. */\n forcePathStyle?: boolean\n /** Collection slug that owns uploads. Defaults to `media`. */\n collection?: string\n}\n\n/** Payload S3 storage plugin wired for the stock `media` collection. */\nexport function createS3MediaPlugin(options: CreateS3MediaPluginOptions = {}): Plugin {\n const bucket = options.bucket ?? process.env.AWS_S3_BUCKET ?? ''\n const endpoint = options.endpoint ?? process.env.AWS_S3_ENDPOINT ?? ''\n const forcePathStyle = options.forcePathStyle ?? process.env.AWS_S3_FORCE_PATH_STYLE === 'true'\n\n return s3Storage({\n enabled: Boolean(bucket),\n collections: {\n [options.collection ?? 'media']: true,\n },\n bucket,\n config: {\n credentials: {\n accessKeyId: options.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID ?? '',\n secretAccessKey: options.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY ?? '',\n },\n region: options.region ?? process.env.AWS_S3_REGION ?? 'us-east-1',\n ...(endpoint ? { endpoint } : {}),\n ...(forcePathStyle ? { forcePathStyle: true } : {}),\n },\n })\n}\n"],"mappings":";;;;;AAiBA,MAAM,eAAe,QAAiC,IAAI,MAAM,eAAe;AAE/E,MAAM,sBAAsB,QAC1B,IAAI,MAAM,eAAe,gBAAgB,IAAI,MAAM,YAAY;;;;;AAMjE,SAAgB,oBAAoB,UAAyB,CAAC,GAAkB;CAC9E,MAAM,YAAY,QAAQ,cAAc;CAExC,MAAM,aAAa,EAAE,UAA4C,YAAY,GAAG;CAEhF,MAAM,oBAA4B,EAAE,UAAU;EAC5C,IAAI,YAAY,GAAG,GAAG,OAAO;EAC7B,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,YAAY,EAAE;CAC5C;CAEA,MAAM,cAAsB,EAAE,UAAU;EACtC,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO;CACT;CAEA,MAAM,kBAA+B,EAAE,UAAU,YAAY,GAAG;CAEhE,OAAO;EAAE;EAAW;EAAkB;EAAY;CAAe;AACnE;;;AC1CA,MAAM,eAAuB,EAAE,UAAU;CACvC,IAAI,IAAI,MAAM,eAAe,SAAS,OAAO;CAC7C,IAAI,IAAI,MAAM,eAAe,cAAc,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,EAAE;CAChF,OAAO;AACT;;;;;AAMA,SAAgB,gBAAgB,QAAyC;CACvE,OAAO;EACL,MAAM;EACN,QAAQ;GACN,UAAU;GACV,QAAQ;EACV;EACA,OAAO;GACL,YAAY;GACZ,gBAAgB;IAAC;IAAQ;IAAe;IAAW;GAAW;GAC9D,aACE;EAEJ;EACA,MAAM;GACJ,WAAW;GACX,sBAAsB;EACxB;EACA,QAAQ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AiB;CAC9D,MAAM,WAAW,QAAQ,YAAY,QAAQ,IAAI,mBAAmB;CACpE,MAAM,iBAAiB,QAAQ,kBAAkB,QAAQ,IAAI,4BAA4B;CAEzF,OAAO,UAAU;EACf,SAAS,QAAQ,MAAM;EACvB,aAAa,GACV,QAAQ,cAAc,UAAU,KACnC;EACA;EACA,QAAQ;GACN,aAAa;IACX,aAAa,QAAQ,eAAe,QAAQ,IAAI,qBAAqB;IACrE,iBAAiB,QAAQ,mBAAmB,QAAQ,IAAI,yBAAyB;GACnF;GACA,QAAQ,QAAQ,UAAU,QAAQ,IAAI,iBAAiB;GACvD,GAAI,WAAW,EAAE,SAAS,IAAI,CAAC;GAC/B,GAAI,iBAAiB,EAAE,gBAAgB,KAAK,IAAI,CAAC;EACnD;CACF,CAAC;AACH"}
@@ -0,0 +1,2 @@
1
+ import { n as Languages, t as LanguageLabel } from "../index-D36IEwUg.mjs";
2
+ export { LanguageLabel, Languages };
@@ -0,0 +1,2 @@
1
+ import { n as Languages, t as LanguageLabel } from "../i18n-Dy3VrbBw.mjs";
2
+ export { LanguageLabel, Languages };
@@ -0,0 +1,10 @@
1
+ //#region src/i18n/languages.ts
2
+ let Languages = /* @__PURE__ */ function(Languages) {
3
+ Languages["English"] = "en";
4
+ return Languages;
5
+ }({});
6
+ const LanguageLabel = { ["en"]: "En" };
7
+ //#endregion
8
+ export { Languages as n, LanguageLabel as t };
9
+
10
+ //# sourceMappingURL=i18n-Dy3VrbBw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n-Dy3VrbBw.mjs","names":[],"sources":["../src/i18n/languages.ts"],"sourcesContent":["export enum Languages {\n English = 'en',\n}\n\nexport const LanguageLabel: Record<Languages, string> = {\n [Languages.English]: 'En',\n}\n"],"mappings":";AAAA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,MAAa,gBAA2C,GAAA,OACjC,KACvB"}
@@ -0,0 +1,214 @@
1
+ import { Access, Block, CollectionBeforeChangeHook, CollectionConfig, Config, Field, FieldAccess, FieldHook, GlobalConfig, GroupField, PayloadRequest, Plugin, SanitizedConfig } from "payload";
2
+ import { lexicalEditor } from "@payloadcms/richtext-lexical";
3
+ //#region src/cms/shared/access.d.ts
4
+ type AccessOptions = {
5
+ /**
6
+ * When true, disabled `api-tokens` users are denied public reads.
7
+ * Defaults to on when the stock `api-tokens` collection is enabled.
8
+ */
9
+ apiTokens?: boolean;
10
+ };
11
+ type AccessHelpers = {
12
+ adminOnly: ({ req }: {
13
+ req: PayloadRequest;
14
+ }) => boolean;
15
+ adminOrPublished: Access;
16
+ publicRead: Access;
17
+ adminOnlyField: FieldAccess;
18
+ };
19
+ /**
20
+ * Build access helpers. Pass `{ apiTokens: true }` when the `api-tokens`
21
+ * collection is registered (stock by default via `buildCmsConfig`).
22
+ */
23
+ declare function createAccessHelpers(options?: AccessOptions): AccessHelpers;
24
+ //#endregion
25
+ //#region src/cms/applyOverride.d.ts
26
+ type OverridableConfig = CollectionConfig | GlobalConfig;
27
+ type Override<TConfig extends OverridableConfig> = false | {
28
+ fields?: (base: Field[]) => Field[];
29
+ hooks?: Partial<TConfig['hooks']>;
30
+ admin?: Partial<TConfig['admin']>;
31
+ access?: Partial<TConfig['access']>;
32
+ config?: (base: TConfig) => TConfig;
33
+ };
34
+ type CollectionOverride = Override<CollectionConfig>;
35
+ type GlobalOverride = Override<GlobalConfig>;
36
+ declare const applyCollectionOverride: (base: CollectionConfig, override: CollectionOverride | undefined) => CollectionConfig | null;
37
+ declare const applyGlobalOverride: (base: GlobalConfig, override: GlobalOverride | undefined) => GlobalConfig | null;
38
+ //#endregion
39
+ //#region src/cms/overrides.d.ts
40
+ /** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */
41
+ declare const STOCK_COLLECTION_SLUGS: readonly ["users", "api-tokens", "media", "authors", "categories", "blog-posts", "pages", "legal-pages", "changelog-tags", "changelog"];
42
+ type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number];
43
+ /** Typed map of collection/global overrides for `buildCmsConfig`. */
44
+ type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {
45
+ 'site-settings'?: GlobalOverride;
46
+ };
47
+ //#endregion
48
+ //#region src/cms/buildCmsConfig.d.ts
49
+ type BuildCmsConfigOptions<TLocale extends string = string> = {
50
+ secret: string;
51
+ db: Config['db'];
52
+ /** Sharp instance from the `sharp` package. */
53
+ sharp?: Config['sharp'];
54
+ cors?: Config['cors'];
55
+ csrf?: Config['csrf'];
56
+ locales: readonly TLocale[];
57
+ /** Must be one of `locales`. */
58
+ defaultLocale: TLocale;
59
+ admin?: Config['admin'];
60
+ plugins?: Plugin[];
61
+ /** Defaults to the package Lexical editor. */
62
+ editor?: Config['editor'];
63
+ access?: AccessOptions;
64
+ /** Collection/global slug → override | false. */
65
+ overrides?: Overrides;
66
+ extraCollections?: CollectionConfig[];
67
+ extraGlobals?: GlobalConfig[];
68
+ typescript?: Config['typescript'];
69
+ /** Extra top-level Payload config keys (e.g. endpoints, graphQL). */
70
+ payload?: Partial<Omit<Config, 'secret' | 'db' | 'sharp' | 'cors' | 'csrf' | 'admin' | 'plugins' | 'editor' | 'collections' | 'globals' | 'localization' | 'typescript'>>;
71
+ };
72
+ /**
73
+ * Build a Payload config from shared stock collections/globals plus site
74
+ * overrides and extras. Types are still generated in the consuming app.
75
+ */
76
+ declare function buildCmsConfig<const TLocale extends string>(options: BuildCmsConfigOptions<TLocale>): Promise<import("payload").SanitizedConfig>;
77
+ //#endregion
78
+ //#region src/cms/shared/drafts-with-autosave.d.ts
79
+ declare const draftsWithAutosave: CollectionConfig['versions'];
80
+ //#endregion
81
+ //#region src/cms/shared/seo-fields.d.ts
82
+ declare const seoFields: GroupField;
83
+ //#endregion
84
+ //#region src/cms/hooks/slugify.d.ts
85
+ declare const slugify: FieldHook;
86
+ //#endregion
87
+ //#region src/cms/hooks/set-published-at.d.ts
88
+ declare const setPublishedAt: CollectionBeforeChangeHook;
89
+ //#endregion
90
+ //#region src/cms/blocks/rich-text.d.ts
91
+ declare const richTextBlock: Block;
92
+ //#endregion
93
+ //#region src/cms/blocks/code.d.ts
94
+ declare const codeBlock: Block;
95
+ //#endregion
96
+ //#region src/cms/blocks/code-tabs.d.ts
97
+ declare const codeTabsBlock: Block;
98
+ //#endregion
99
+ //#region src/cms/blocks/image.d.ts
100
+ declare const imageBlock: Block;
101
+ //#endregion
102
+ //#region src/cms/blocks/video.d.ts
103
+ declare const videoBlock: Block;
104
+ //#endregion
105
+ //#region src/cms/blocks/download-cta.d.ts
106
+ declare const downloadCtaBlock: Block;
107
+ //#endregion
108
+ //#region src/cms/blocks/steps.d.ts
109
+ declare const stepsBlock: Block;
110
+ //#endregion
111
+ //#region src/cms/blocks/accordion.d.ts
112
+ declare const accordionBlock: Block;
113
+ //#endregion
114
+ //#region src/cms/blocks/section-heading.d.ts
115
+ declare const sectionHeadingBlock: Block;
116
+ //#endregion
117
+ //#region src/cms/blocks/leaf-blocks.d.ts
118
+ declare const leafBlocks: Block[];
119
+ //#endregion
120
+ //#region src/cms/blocks/language-options.d.ts
121
+ /** Shared language options for CMS code blocks and Lexical CodeBlock feature. */
122
+ declare const languageOptions: {
123
+ label: string;
124
+ value: string;
125
+ }[];
126
+ declare const codeBlockLanguages: Record<string, string>;
127
+ declare const defaultCodeLanguage = "plaintext";
128
+ //#endregion
129
+ //#region src/cms/blocks/index.d.ts
130
+ declare const blogContentBlocks: Block[];
131
+ declare const pageContentBlocks: Block[];
132
+ declare const showcaseContentBlocks: Block[];
133
+ //#endregion
134
+ //#region src/cms/lexical/editor.d.ts
135
+ /**
136
+ * Shared Lexical editor for every `richText` field.
137
+ *
138
+ * Adds `CodeBlock`, inline `video` block, media upload captions, and
139
+ * `EXPERIMENTAL_TableFeature` on top of Payload defaults.
140
+ */
141
+ declare const richTextEditor: () => ReturnType<typeof lexicalEditor>;
142
+ /** Resolve Lexical editor config for seed scripts / markdown conversion. */
143
+ declare function getRichTextEditorConfig(config: SanitizedConfig): Promise<import("@payloadcms/richtext-lexical").SanitizedServerEditorConfig>;
144
+ //#endregion
145
+ //#region src/cms/requireEnv.d.ts
146
+ /**
147
+ * Read a required env var. During Next.js `phase-production-build` and
148
+ * `generate:importmap` (when NEXT_PHASE is unset) returns "" instead of throwing,
149
+ * because those phases do not connect to the DB.
150
+ */
151
+ declare function requireEnvAtRuntime(name: string): string;
152
+ //#endregion
153
+ //#region src/cms/createS3MediaPlugin.d.ts
154
+ type CreateS3MediaPluginOptions = {
155
+ /** Defaults to `process.env.AWS_S3_BUCKET`. */
156
+ bucket?: string;
157
+ accessKeyId?: string;
158
+ secretAccessKey?: string;
159
+ region?: string;
160
+ /** Custom S3-compatible endpoint (MinIO, etc.). Defaults to `AWS_S3_ENDPOINT`. */
161
+ endpoint?: string;
162
+ /** Defaults to `AWS_S3_FORCE_PATH_STYLE === 'true'`. */
163
+ forcePathStyle?: boolean;
164
+ /** Collection slug that owns uploads. Defaults to `media`. */
165
+ collection?: string;
166
+ };
167
+ /** Payload S3 storage plugin wired for the stock `media` collection. */
168
+ declare function createS3MediaPlugin(options?: CreateS3MediaPluginOptions): Plugin;
169
+ //#endregion
170
+ //#region src/cms/collections/createUsers.d.ts
171
+ declare function createUsers(access: AccessHelpers): CollectionConfig;
172
+ //#endregion
173
+ //#region src/cms/collections/createApiTokens.d.ts
174
+ /**
175
+ * Stock API-key auth collection for server-to-server Payload REST/GraphQL clients.
176
+ * Disable per site with `overrides['api-tokens'] = false`.
177
+ */
178
+ declare function createApiTokens(access: AccessHelpers): CollectionConfig;
179
+ //#endregion
180
+ //#region src/cms/collections/createMedia.d.ts
181
+ /** Stock media upload collection (always publicly readable once uploaded). */
182
+ declare function createMedia(access: AccessHelpers): CollectionConfig;
183
+ //#endregion
184
+ //#region src/cms/collections/createAuthors.d.ts
185
+ declare function createAuthors(access: AccessHelpers): CollectionConfig;
186
+ //#endregion
187
+ //#region src/cms/collections/createCategories.d.ts
188
+ declare function createCategories(access: AccessHelpers): CollectionConfig;
189
+ //#endregion
190
+ //#region src/cms/collections/createBlogPosts.d.ts
191
+ /** Stock blog-posts collection (no site revalidation — add via overrides.hooks). */
192
+ declare function createBlogPosts(access: AccessHelpers): CollectionConfig;
193
+ //#endregion
194
+ //#region src/cms/collections/createPages.d.ts
195
+ declare function createPages(access: AccessHelpers): CollectionConfig;
196
+ declare function createLegalPages(access: AccessHelpers): CollectionConfig;
197
+ //#endregion
198
+ //#region src/cms/collections/createChangelogTags.d.ts
199
+ /** Stock changelog-tags (no site revalidation — add via overrides.hooks). */
200
+ declare function createChangelogTags(access: AccessHelpers): CollectionConfig;
201
+ //#endregion
202
+ //#region src/cms/collections/createChangelog.d.ts
203
+ /**
204
+ * Stock changelog collection (shared fields only).
205
+ * Site-specific body / GitHub / related-block fields — add via `overrides.fields`.
206
+ * Revalidation — add via `overrides.hooks`.
207
+ */
208
+ declare function createChangelog(access: AccessHelpers): CollectionConfig;
209
+ //#endregion
210
+ //#region src/cms/globals/createSiteSettings.d.ts
211
+ declare function createSiteSettings(access: AccessHelpers): GlobalConfig;
212
+ //#endregion
213
+ export { codeTabsBlock as A, STOCK_COLLECTION_SLUGS as B, leafBlocks as C, downloadCtaBlock as D, stepsBlock as E, seoFields as F, applyGlobalOverride as G, CollectionOverride as H, draftsWithAutosave as I, createAccessHelpers as J, AccessHelpers as K, BuildCmsConfigOptions as L, richTextBlock as M, setPublishedAt as N, videoBlock as O, slugify as P, buildCmsConfig as R, languageOptions as S, accordionBlock as T, GlobalOverride as U, StockCollectionSlug as V, applyCollectionOverride as W, blogContentBlocks as _, createPages as a, codeBlockLanguages as b, createAuthors as c, createUsers as d, CreateS3MediaPluginOptions as f, richTextEditor as g, getRichTextEditorConfig as h, createLegalPages as i, codeBlock as j, imageBlock as k, createMedia as l, requireEnvAtRuntime as m, createChangelog as n, createBlogPosts as o, createS3MediaPlugin as p, AccessOptions as q, createChangelogTags as r, createCategories as s, createSiteSettings as t, createApiTokens as u, pageContentBlocks as v, sectionHeadingBlock as w, defaultCodeLanguage as x, showcaseContentBlocks as y, Overrides as z };
214
+ //# sourceMappingURL=index-9B8SfwdR.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-9B8SfwdR.d.mts","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/shared/seo-fields.ts","../src/cms/hooks/slugify.ts","../src/cms/hooks/set-published-at.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/index.ts","../src/cms/lexical/editor.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts","../src/cms/collections/createUsers.ts","../src/cms/collections/createApiTokens.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createAuthors.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createChangelog.ts","../src/cms/globals/createSiteSettings.ts"],"mappings":";;;KAEY;;;;;EAKV;;KAGU;EACV,cAAc;IAAS,KAAK;;EAC5B,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;;;;;;iBAYF,oBAAoB,UAAS,gBAAqB;;;KCxB7D,oBAAoB,mBAAmB;KAEvC,SAAS,gBAAgB;EAGxB,UAAU,MAAM,YAAY;EAC5B,QAAQ,QAAQ;EAChB,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,UAAU,MAAM,YAAY;;KAGtB,qBAAqB,SAAS;KAC9B,iBAAiB,SAAS;cAkCzB,0BACX,MAAM,kBACN,UA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K5C,gBAAgB,QAAQ,gBAAgB;;;iBCRxC,mBAAmB,QAAQ,gBAAgB"}
@@ -0,0 +1,8 @@
1
+ //#region src/i18n/languages.d.ts
2
+ declare enum Languages {
3
+ English = "en"
4
+ }
5
+ declare const LanguageLabel: Record<Languages, string>;
6
+ //#endregion
7
+ export { Languages as n, LanguageLabel as t };
8
+ //# sourceMappingURL=index-D36IEwUg.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D36IEwUg.d.mts","names":[],"sources":["../src/i18n/languages.ts"],"mappings":";aAAY;EACV;;cAGW,eAAe,OAAO"}
@@ -0,0 +1,23 @@
1
+ //#region src/utils/stripShikiPreBackground.d.ts
2
+ declare function stripShikiPreBackground(html: string): string;
3
+ //#endregion
4
+ //#region src/utils/toPlainValue.d.ts
5
+ declare function toPlainValue<T>(value: T): T;
6
+ //#endregion
7
+ //#region src/utils/logger/logger.d.ts
8
+ /**
9
+ * Tiny, dependency-free structured logger. Prefer `createLogger(scope)` over
10
+ * `console.*` so callers can filter by `LOG_LEVEL` and keep a consistent prefix.
11
+ */
12
+ type Logger = {
13
+ debug: (message: string) => void;
14
+ info: (message: string) => void;
15
+ warn: (message: string) => void;
16
+ error: (message: string) => void;
17
+ /** Returns a logger whose scope is `${parent}:${suffix}`. */
18
+ child: (suffix: string) => Logger;
19
+ };
20
+ declare function createLogger(scope: string): Logger;
21
+ //#endregion
22
+ export { stripShikiPreBackground as i, createLogger as n, toPlainValue as r, Logger as t };
23
+ //# sourceMappingURL=index-Dyi7DDoO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Dyi7DDoO.d.mts","names":[],"sources":["../src/utils/stripShikiPreBackground.ts","../src/utils/toPlainValue.ts","../src/utils/logger/logger.ts"],"mappings":";iBAAgB,wBAAwB;;;iBCAxB,aAAa,GAAG,OAAO,IAAI;;;;;;;KCwB/B;EACV,QAAQ;EACR,OAAO;EACP,OAAO;EACP,QAAQ;;EAER,QAAQ,mBAAmB;;iBA0Bb,aAAa,gBAAgB"}
@@ -0,0 +1,63 @@
1
+ import { t as PayloadMedia } from "./readMediaBuffer-1C3QTpkO.mjs";
2
+ import { Metadata } from "next";
3
+ //#region src/seo/site-url.d.ts
4
+ type GetSiteUrlOptions = {
5
+ /** Fallback when no env URL is set. Defaults to `http://localhost:3000`. */
6
+ fallback?: string;
7
+ };
8
+ /** Resolve the public site origin from env (`NEXT_PUBLIC_SITE_URL` / `VERCEL_URL`). */
9
+ declare function getSiteUrl(options?: GetSiteUrlOptions): string;
10
+ //#endregion
11
+ //#region src/seo/metadata.d.ts
12
+ type OgImage = {
13
+ url: string;
14
+ width?: number;
15
+ height?: number;
16
+ alt?: string;
17
+ };
18
+ type CreateMetadataInput = {
19
+ title: string;
20
+ description?: string;
21
+ pathname?: string;
22
+ canonicalUrl?: string;
23
+ noIndex?: boolean;
24
+ noFollow?: boolean;
25
+ locale?: string;
26
+ images?: OgImage[];
27
+ ogType?: 'website' | 'article';
28
+ article?: {
29
+ publishedTime?: string;
30
+ modifiedTime?: string;
31
+ expirationTime?: string;
32
+ section?: string;
33
+ tags?: string[];
34
+ authors?: string[];
35
+ };
36
+ twitterCreator?: string;
37
+ /** Per-call overrides (e.g. localized site name). */
38
+ siteName?: string;
39
+ defaultDescription?: string;
40
+ };
41
+ type CreateMetadataFactoryOptions = {
42
+ siteName: string;
43
+ defaultDescription: string;
44
+ locales: readonly string[];
45
+ defaultLocale: string;
46
+ /** Maps locale → Open Graph locale tag (e.g. `en` → `en_US`). */
47
+ getOpenGraphLocale: (locale: string) => string;
48
+ localePrefix?: 'always' | 'as-needed' | 'never';
49
+ getSiteUrl?: () => string;
50
+ };
51
+ declare function createMetadataFactory(options: CreateMetadataFactoryOptions): {
52
+ createMetadata: (input: CreateMetadataInput) => Metadata;
53
+ createRootMetadata: (overrides?: {
54
+ siteName?: string;
55
+ defaultDescription?: string;
56
+ }) => Metadata;
57
+ };
58
+ //#endregion
59
+ //#region src/seo/og-background.d.ts
60
+ declare function getOgBackgroundDataUrl(media: PayloadMedia | null | undefined): Promise<string | undefined>;
61
+ //#endregion
62
+ export { createMetadataFactory as a, OgImage as i, CreateMetadataFactoryOptions as n, GetSiteUrlOptions as o, CreateMetadataInput as r, getSiteUrl as s, getOgBackgroundDataUrl as t };
63
+ //# sourceMappingURL=index-tTs9h9BS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-tTs9h9BS.d.mts","names":[],"sources":["../src/seo/site-url.ts","../src/seo/metadata.ts","../src/seo/og-background.ts"],"mappings":";;;KAIY;;EAEV;;;iBAIc,WAAW,UAAS;;;KCNxB;EACV;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;;EAEA;EACA;;KAGU;EACV;EACA;EACA;EACA;;EAEA,qBAAqB;EACrB;EACA;;iBAUc,sBAAsB,SAAS;EAId,iBAAA,OAAA,wBAAsB;EA0Eb,qBAAA;IACtC;IACA;QACE;;;;iBC1HgB,uBACpB,OAAO,kCACN"}
@@ -0,0 +1,6 @@
1
+ import { A as codeTabsBlock, B as STOCK_COLLECTION_SLUGS, C as leafBlocks, D as downloadCtaBlock, E as stepsBlock, F as seoFields, G as applyGlobalOverride, H as CollectionOverride, I as draftsWithAutosave, J as createAccessHelpers, K as AccessHelpers, L as BuildCmsConfigOptions, M as richTextBlock, N as setPublishedAt, O as videoBlock, P as slugify, R as buildCmsConfig, S as languageOptions, T as accordionBlock, U as GlobalOverride, V as StockCollectionSlug, W as applyCollectionOverride, _ as blogContentBlocks, a as createPages, b as codeBlockLanguages, c as createAuthors, d as createUsers, f as CreateS3MediaPluginOptions, g as richTextEditor, h as getRichTextEditorConfig, i as createLegalPages, j as codeBlock, k as imageBlock, l as createMedia, m as requireEnvAtRuntime, n as createChangelog, o as createBlogPosts, p as createS3MediaPlugin, q as AccessOptions, r as createChangelogTags, s as createCategories, t as createSiteSettings, u as createApiTokens, v as pageContentBlocks, w as sectionHeadingBlock, x as defaultCodeLanguage, y as showcaseContentBlocks, z as Overrides } from "./index-9B8SfwdR.mjs";
2
+ import { n as readPayloadMediaAsDataUrl, r as readPayloadMediaBuffer, t as PayloadMedia } from "./readMediaBuffer-1C3QTpkO.mjs";
3
+ import { n as Languages, t as LanguageLabel } from "./index-D36IEwUg.mjs";
4
+ import { a as createMetadataFactory, i as OgImage, n as CreateMetadataFactoryOptions, o as GetSiteUrlOptions, r as CreateMetadataInput, s as getSiteUrl, t as getOgBackgroundDataUrl } from "./index-tTs9h9BS.mjs";
5
+ import { i as stripShikiPreBackground, n as createLogger, r as toPlainValue, t as Logger } from "./index-Dyi7DDoO.mjs";
6
+ export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateMetadataFactoryOptions, type CreateMetadataInput, type CreateS3MediaPluginOptions, type GetSiteUrlOptions, type GlobalOverride, LanguageLabel, Languages, type Logger, type OgImage, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
package/dist/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { A as downloadCtaBlock, B as createAccessHelpers, C as leafBlocks, D as richTextEditor, E as getRichTextEditorConfig, F as languageOptions, I as createAuthors, L as seoFields, M as codeBlock, N as codeBlockLanguages, O as videoBlock, P as defaultCodeLanguage, R as slugify, S as accordionBlock, T as richTextBlock, _ as setPublishedAt, a as applyCollectionOverride, b as showcaseContentBlocks, c as createUsers, d as createMedia, f as createChangelogTags, g as draftsWithAutosave, h as createBlogPosts, i as STOCK_COLLECTION_SLUGS, j as codeTabsBlock, k as imageBlock, l as createLegalPages, m as createCategories, n as requireEnvAtRuntime, o as applyGlobalOverride, p as createChangelog, r as buildCmsConfig, s as createSiteSettings, t as createS3MediaPlugin, u as createPages, v as blogContentBlocks, w as stepsBlock, x as sectionHeadingBlock, y as pageContentBlocks, z as createApiTokens } from "./cms-5bS91IRZ.mjs";
2
+ import { t as createLogger } from "./logger-BPURnavq.mjs";
3
+ import { n as readPayloadMediaBuffer, t as readPayloadMediaAsDataUrl } from "./readMediaBuffer-DWkTbYVn.mjs";
4
+ import { n as createMetadataFactory, r as getSiteUrl, t as getOgBackgroundDataUrl } from "./seo-e5XjgQ7l.mjs";
5
+ import { n as Languages, t as LanguageLabel } from "./i18n-Dy3VrbBw.mjs";
6
+ import { n as stripShikiPreBackground, t as toPlainValue } from "./utils-CVVQQltg.mjs";
7
+ export { LanguageLabel, Languages, STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
@@ -0,0 +1,44 @@
1
+ //#region src/utils/logger/logger.ts
2
+ const LEVEL_RANK = {
3
+ debug: 10,
4
+ info: 20,
5
+ warn: 30,
6
+ error: 40
7
+ };
8
+ function resolveMinLevel() {
9
+ const raw = (process.env.LOG_LEVEL ?? "").toLowerCase();
10
+ if (raw === "debug" || raw === "info" || raw === "warn" || raw === "error") return raw;
11
+ return process.env.NODE_ENV === "production" ? "info" : "debug";
12
+ }
13
+ const minLevel = resolveMinLevel();
14
+ function emit(level, scope, message) {
15
+ if (LEVEL_RANK[level] < LEVEL_RANK[minLevel]) return;
16
+ const line = `[${scope}] ${message}`;
17
+ switch (level) {
18
+ case "debug":
19
+ console.debug(line);
20
+ return;
21
+ case "info":
22
+ console.info(line);
23
+ return;
24
+ case "warn":
25
+ console.warn(line);
26
+ return;
27
+ case "error":
28
+ console.error(line);
29
+ return;
30
+ }
31
+ }
32
+ function createLogger(scope) {
33
+ return {
34
+ debug: (m) => emit("debug", scope, m),
35
+ info: (m) => emit("info", scope, m),
36
+ warn: (m) => emit("warn", scope, m),
37
+ error: (m) => emit("error", scope, m),
38
+ child: (suffix) => createLogger(`${scope}:${suffix}`)
39
+ };
40
+ }
41
+ //#endregion
42
+ export { createLogger as t };
43
+
44
+ //# sourceMappingURL=logger-BPURnavq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger-BPURnavq.mjs","names":[],"sources":["../src/utils/logger/logger.ts"],"sourcesContent":["/**\n * Tiny, dependency-free structured logger. Prefer `createLogger(scope)` over\n * `console.*` so callers can filter by `LOG_LEVEL` and keep a consistent prefix.\n */\n\ntype LogLevel = 'debug' | 'info' | 'warn' | 'error'\n\nconst LEVEL_RANK: Record<LogLevel, number> = {\n debug: 10,\n info: 20,\n warn: 30,\n error: 40,\n}\n\nfunction resolveMinLevel(): LogLevel {\n const raw = (process.env.LOG_LEVEL ?? '').toLowerCase()\n if (raw === 'debug' || raw === 'info' || raw === 'warn' || raw === 'error') {\n return raw\n }\n return process.env.NODE_ENV === 'production' ? 'info' : 'debug'\n}\n\nconst minLevel = resolveMinLevel()\n\nexport type Logger = {\n debug: (message: string) => void\n info: (message: string) => void\n warn: (message: string) => void\n error: (message: string) => void\n /** Returns a logger whose scope is `${parent}:${suffix}`. */\n child: (suffix: string) => Logger\n}\n\nfunction emit(level: LogLevel, scope: string, message: string): void {\n if (LEVEL_RANK[level] < LEVEL_RANK[minLevel]) return\n const line = `[${scope}] ${message}`\n switch (level) {\n case 'debug':\n // eslint-disable-next-line no-console\n console.debug(line)\n return\n case 'info':\n // eslint-disable-next-line no-console\n console.info(line)\n return\n case 'warn':\n // eslint-disable-next-line no-console\n console.warn(line)\n return\n case 'error':\n // eslint-disable-next-line no-console\n console.error(line)\n return\n }\n}\n\nexport function createLogger(scope: string): Logger {\n return {\n debug: (m) => emit('debug', scope, m),\n info: (m) => emit('info', scope, m),\n warn: (m) => emit('warn', scope, m),\n error: (m) => emit('error', scope, m),\n child: (suffix) => createLogger(`${scope}:${suffix}`),\n }\n}\n"],"mappings":";AAOA,MAAM,aAAuC;CAC3C,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;AACT;AAEA,SAAS,kBAA4B;CACnC,MAAM,OAAO,QAAQ,IAAI,aAAa,GAAA,CAAI,YAAY;CACtD,IAAI,QAAQ,WAAW,QAAQ,UAAU,QAAQ,UAAU,QAAQ,SACjE,OAAO;CAET,OAAO,QAAQ,IAAI,aAAa,eAAe,SAAS;AAC1D;AAEA,MAAM,WAAW,gBAAgB;AAWjC,SAAS,KAAK,OAAiB,OAAe,SAAuB;CACnE,IAAI,WAAW,SAAS,WAAW,WAAW;CAC9C,MAAM,OAAO,IAAI,MAAM,IAAI;CAC3B,QAAQ,OAAR;EACE,KAAK;GAEH,QAAQ,MAAM,IAAI;GAClB;EACF,KAAK;GAEH,QAAQ,KAAK,IAAI;GACjB;EACF,KAAK;GAEH,QAAQ,KAAK,IAAI;GACjB;EACF,KAAK;GAEH,QAAQ,MAAM,IAAI;GAClB;CACJ;AACF;AAEA,SAAgB,aAAa,OAAuB;CAClD,OAAO;EACL,QAAQ,MAAM,KAAK,SAAS,OAAO,CAAC;EACpC,OAAO,MAAM,KAAK,QAAQ,OAAO,CAAC;EAClC,OAAO,MAAM,KAAK,QAAQ,OAAO,CAAC;EAClC,QAAQ,MAAM,KAAK,SAAS,OAAO,CAAC;EACpC,QAAQ,WAAW,aAAa,GAAG,MAAM,GAAG,QAAQ;CACtD;AACF"}
@@ -0,0 +1,15 @@
1
+ //#region src/cms/payload/readMediaBuffer.d.ts
2
+ /**
3
+ * Read a Payload-managed Media file's raw bytes, bypassing the public HTTP
4
+ * surface. Uses S3 when `AWS_S3_BUCKET` is set; otherwise reads from
5
+ * `<cwd>/media/<filename>` (Payload's default upload staticDir for `media`).
6
+ */
7
+ type PayloadMedia = {
8
+ filename?: string | null;
9
+ mimeType?: string | null;
10
+ };
11
+ declare function readPayloadMediaBuffer(media: PayloadMedia): Promise<Buffer>;
12
+ declare function readPayloadMediaAsDataUrl(media: PayloadMedia): Promise<string>;
13
+ //#endregion
14
+ export { readPayloadMediaAsDataUrl as n, readPayloadMediaBuffer as r, PayloadMedia as t };
15
+ //# sourceMappingURL=readMediaBuffer-1C3QTpkO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readMediaBuffer-1C3QTpkO.d.mts","names":[],"sources":["../src/cms/payload/readMediaBuffer.ts"],"mappings":";;;;;;KAeY;EACV;EACA;;iBA8CoB,uBAAuB,OAAO,eAAe,QAAQ;iBAUrD,0BAA0B,OAAO,eAAe"}