feat: version bump
This commit is contained in:
parent
c108f24de3
commit
48af8a0063
20 changed files with 27125 additions and 19049 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -45,3 +45,5 @@ next-env.d.ts
|
||||||
.env
|
.env
|
||||||
|
|
||||||
/media
|
/media
|
||||||
|
|
||||||
|
*storybook.log
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import type { StorybookConfig } from '@storybook/nextjs'
|
|
||||||
|
|
||||||
const config: StorybookConfig = {
|
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
||||||
addons: [
|
|
||||||
'@storybook/addon-onboarding',
|
|
||||||
'@storybook/addon-links',
|
|
||||||
'@storybook/addon-essentials',
|
|
||||||
'@chromatic-com/storybook',
|
|
||||||
'@storybook/addon-interactions',
|
|
||||||
],
|
|
||||||
framework: {
|
|
||||||
name: '@storybook/nextjs',
|
|
||||||
options: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
export default config
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
import type { Preview } from '@storybook/react'
|
|
||||||
import { defaultFont } from '@/assets/fonts'
|
|
||||||
|
|
||||||
const preview: Preview = {
|
|
||||||
decorators: [
|
|
||||||
(Story) => {
|
|
||||||
return (
|
|
||||||
<div className={defaultFont.className} style={{fontSize: 20}}>
|
|
||||||
<Story />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
},
|
|
||||||
],
|
|
||||||
parameters: {
|
|
||||||
controls: {
|
|
||||||
matchers: {
|
|
||||||
color: /(background|color)$/i,
|
|
||||||
date: /Date$/i,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
backgrounds: {
|
|
||||||
values: [
|
|
||||||
{ name: "light", value: "#ffffff" },
|
|
||||||
{ name: "shade2", value: "#CBD6D5" },
|
|
||||||
{ name: 'dark', value: "#728F8D" }
|
|
||||||
],
|
|
||||||
default: "light"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default preview
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
||||||
|
|
||||||
FROM node:18-alpine AS base
|
FROM node:22-alpine AS base
|
||||||
RUN corepack enable;
|
RUN corepack enable;
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
|
||||||
RUN apk add --no-cache libc6-compat
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies based on the preferred package manager
|
# Install dependencies based on the preferred package manager
|
||||||
COPY package.json yarn.lock* .yarnrc.yml package-lock.json* pnpm-lock.yaml* ./
|
COPY package.json yarn.lock* .yarnrc.yml package-lock.json* pnpm-lock.yaml* ./
|
||||||
RUN \
|
RUN \
|
||||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
||||||
elif [ -f package-lock.json ]; then npm ci; \
|
elif [ -f package-lock.json ]; then npm ci && npm install --os=linux --libc=musl --cpu=x64 sharp; \
|
||||||
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
|
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
|
||||||
else echo "Lockfile not found." && exit 1; \
|
else echo "Lockfile not found." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
|
||||||
|
|
||||||
FROM node:21-alpine AS base
|
|
||||||
|
|
||||||
# Install dependencies only when needed
|
|
||||||
FROM base AS deps
|
|
||||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
|
||||||
RUN apk add --no-cache libc6-compat
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Install dependencies based on the preferred package manager
|
|
||||||
COPY package.json .yarnrc.yml yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
|
||||||
RUN yarn set version stable
|
|
||||||
RUN \
|
|
||||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
|
||||||
elif [ -f package-lock.json ]; then npm ci; \
|
|
||||||
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
|
|
||||||
else echo "Lockfile not found." && exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
|
||||||
FROM base AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Next.js collects completely anonymous telemetry data about general usage.
|
|
||||||
# Learn more here: https://nextjs.org/telemetry
|
|
||||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
|
||||||
# ENV NEXT_TELEMETRY_DISABLED 1
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
if [ -f yarn.lock ]; then yarn run build; \
|
|
||||||
elif [ -f package-lock.json ]; then npm run build; \
|
|
||||||
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
|
|
||||||
else echo "Lockfile not found." && exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
|
||||||
FROM base AS runner
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
|
||||||
# Uncomment the following line in case you want to disable telemetry during runtime.
|
|
||||||
# ENV NEXT_TELEMETRY_DISABLED 1
|
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
|
||||||
RUN adduser --system --uid 1001 nextjs
|
|
||||||
|
|
||||||
COPY --from=builder /app/public ./public
|
|
||||||
|
|
||||||
# Set the correct permission for prerender cache
|
|
||||||
RUN mkdir .next
|
|
||||||
RUN chown nextjs:nodejs .next
|
|
||||||
|
|
||||||
# Automatically leverage output traces to reduce image size
|
|
||||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
||||||
|
|
||||||
USER nextjs
|
|
||||||
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
ENV PORT 3000
|
|
||||||
|
|
||||||
# server.js is created by next build from the standalone output
|
|
||||||
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
|
||||||
CMD HOSTNAME="0.0.0.0" node server.js
|
|
||||||
94
README.md
94
README.md
|
|
@ -1,50 +1,82 @@
|
||||||
# Heilige Drei Könige Website
|
# Heilige Drei Könige Website
|
||||||
This is the repository for the Heilige Drei Könige Catholic Church website, built using
|
|
||||||
Payload CMS v3, NextJS, React and Postges.
|
|
||||||
|
|
||||||
## Getting Started
|
This repository contains the source code for the Heilige Drei Könige Catholic Church website, built with:
|
||||||
|
|
||||||
### Prerequisites
|
- Next.js
|
||||||
- Node.js and npm: Make sure you have Node.js and npm installed on your machine.
|
- React
|
||||||
- Postgres: You'll need a PostgresSQL database to store the website data.
|
- Payload CMS v3
|
||||||
|
- PostgreSQL
|
||||||
|
|
||||||
|
## Quick start
|
||||||
|
|
||||||
### Postgres Database
|
1) Requirements
|
||||||
|
- Node.js 22+ (see `engines` in `package.json`)
|
||||||
You will need the an Postgres database including the postgis extension
|
- npm (or your preferred package manager)
|
||||||
|
- Database PostgreSQL with PostGIS extension
|
||||||
|
|
||||||
|
2) Install dependencies
|
||||||
```bash
|
```bash
|
||||||
docker pull postgis/postgis
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Migration
|
3) Configure environment
|
||||||
|
|
||||||
To create a new database migration use:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn payload migrate:create [name]
|
|
||||||
```
|
|
||||||
|
|
||||||
After the changes are pushed to the production server, the migration has to be
|
|
||||||
executed on the production database with `yarn payload migrate`
|
|
||||||
|
|
||||||
Todo: integrate this step in Continious Deployment
|
|
||||||
|
|
||||||
### Environment variables
|
|
||||||
|
|
||||||
Please set the environment variables in the `.env` file
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
```
|
```
|
||||||
|
Then update the values as needed. Example keys from `.env.example`:
|
||||||
|
- `DATABASE_URI` — database connection string (Mongo example provided). For Postgres, use a URL like `postgres://user:password@host:5432/dbname`.
|
||||||
|
- `PAYLOAD_SECRET` — secret used by Payload
|
||||||
|
- `GOOGLE_BUCKET` — GCS bucket name (if using @payloadcms/storage-gcs)
|
||||||
|
- `RESEND_API_KEY` — API key for Resend (emails)
|
||||||
|
|
||||||
### Development server
|
4) Run the development server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
By default the app runs at http://localhost:3000
|
||||||
|
|
||||||
|
## Database options
|
||||||
|
|
||||||
|
### PostgreSQL + PostGIS
|
||||||
|
You can run a Postgres image with PostGIS locally:
|
||||||
|
```bash
|
||||||
|
docker pull postgis/postgis
|
||||||
|
```
|
||||||
|
Create and run a container, then set your `DATABASE_URI` to the Postgres URL. Ensure the PostGIS extension is enabled in your database.
|
||||||
|
|
||||||
|
Alternatively, you can enable the Postgres service in `docker-compose.yml` (currently commented out) and use that as your local DB.
|
||||||
|
|
||||||
|
## Migrations (Payload)
|
||||||
|
|
||||||
|
Create a new migration:
|
||||||
|
```bash
|
||||||
|
npm run payload migrate:create --<name>
|
||||||
|
```
|
||||||
|
|
||||||
|
Apply pending migrations:
|
||||||
|
```bash
|
||||||
|
npm run payload migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: After deploying changes to production, ensure migrations are executed against the production database. (Todo: Integrate this step into Continuous Deployment.)
|
||||||
|
|
||||||
|
## Admin panel (Payload)
|
||||||
|
Once the server is running, open:
|
||||||
|
- http://localhost:3000/admin
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
Common scripts available in `package.json`:
|
||||||
|
- `npm run dev` — start Next.js dev server
|
||||||
|
- `npm run build` — build for production
|
||||||
|
- `npm start` — start the production server
|
||||||
|
- `npm test` — run tests (Vitest)
|
||||||
|
- `npm run storybook` — start Storybook on port 6006
|
||||||
|
|
||||||
## Storybook
|
## Storybook
|
||||||
Storybook is a popular open-source tool used for building UI components and pages in isolation. Think of it as a playground for your user interface elements. It allows developers to create, test, and document components independently from the main application.
|
Storybook lets you develop and preview UI components in isolation.
|
||||||
|
|
||||||
Run `yarn storybook` to view the storybook
|
Start Storybook:
|
||||||
|
```bash
|
||||||
|
npm run storybook
|
||||||
|
```
|
||||||
|
Open http://localhost:6006
|
||||||
|
|
@ -4,11 +4,6 @@ import { withPayload } from '@payloadcms/next/withPayload'
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
// Your Next.js config here
|
// Your Next.js config here
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
eslint: {
|
|
||||||
// Warning: This allows production builds to successfully complete even if
|
|
||||||
// your project has ESLint errors.
|
|
||||||
ignoreDuringBuilds: true,
|
|
||||||
},
|
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
19010
package-lock.json
generated
Normal file
19010
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
71
package.json
71
package.json
|
|
@ -15,55 +15,46 @@
|
||||||
"serve": "cross-env NODE_OPTIONS=--no-deprecation next start",
|
"serve": "cross-env NODE_OPTIONS=--no-deprecation next start",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"chromatic": "npx chromatic --project-token=chpt_70d6a2e05af185a",
|
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nyariv/sandboxjs": "0.8.24",
|
"@nyariv/sandboxjs": "0.8.28",
|
||||||
"@payloadcms/db-postgres": "^3.53.0",
|
"@payloadcms/db-postgres": "^3.74.0",
|
||||||
"@payloadcms/next": "^3.53.0",
|
"@payloadcms/next": "^3.74.0",
|
||||||
"@payloadcms/richtext-lexical": "^3.53.0",
|
"@payloadcms/richtext-lexical": "^3.74.0",
|
||||||
"@payloadcms/storage-gcs": "^3.53.0",
|
"@payloadcms/storage-gcs": "^3.74.0",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^10.1.0",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.12.0",
|
||||||
"languagedetect": "^2.0.0",
|
"languagedetect": "^2.0.0",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"next": "15.3.8",
|
"next": "16.1.6",
|
||||||
"payload": "^3.53.0",
|
"payload": "^3.74.0",
|
||||||
"qs-esm": "^7.0.2",
|
"qs-esm": "^7.0.3",
|
||||||
"react": "19.0.0",
|
"react": "19.2.4",
|
||||||
"react-dom": "19.0.0",
|
"react-dom": "19.2.4",
|
||||||
"resend": "^4.1.2",
|
"resend": "^6.9.1",
|
||||||
"sharp": "0.32.6",
|
"sharp": "0.34.5",
|
||||||
"zod": "^3.24.1"
|
"zod": "^4.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@chromatic-com/storybook": "^1.6.1",
|
"@swc/cli": "^0.7.10",
|
||||||
"@storybook/addon-essentials": "^8.2.9",
|
"@swc/core": "^1.15.11",
|
||||||
"@storybook/addon-interactions": "^8.2.9",
|
"@types/node": "^20.19.32",
|
||||||
"@storybook/addon-links": "^8.2.9",
|
"@types/react": "19.2.13",
|
||||||
"@storybook/addon-onboarding": "^8.2.9",
|
"@types/react-dom": "19.2.3",
|
||||||
"@storybook/blocks": "^8.2.9",
|
"eslint": "9.26.0",
|
||||||
"@storybook/nextjs": "^8.2.9",
|
"eslint-config-next": "16.1.6",
|
||||||
"@storybook/react": "^8.2.9",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"@storybook/test": "^8.2.9",
|
"typescript": "5.9.3",
|
||||||
"@swc/cli": "^0.4.0",
|
"vitest": "^4.0.18",
|
||||||
"@swc/core": "^1.7.10",
|
"storybook": "^10.2.7",
|
||||||
"@types/node": "^20.12.12",
|
"@storybook/nextjs-vite": "^10.2.7",
|
||||||
"@types/react": "19.0.0",
|
"vite": "^7.3.1",
|
||||||
"@types/react-dom": "19.0.0",
|
"eslint-plugin-storybook": "^10.2.7"
|
||||||
"chromatic": "^11.12.0",
|
|
||||||
"eslint": "^8",
|
|
||||||
"eslint-config-next": "15.1.7",
|
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"eslint-plugin-storybook": "^0.8.0",
|
|
||||||
"storybook": "^8.2.9",
|
|
||||||
"typescript": "5.5.4",
|
|
||||||
"vitest": "^3.1.1"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.20.2 || >=20.9.0"
|
"node": ">=22.0.0"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.4.1"
|
"packageManager": "npm@10.9.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { NextPrevButtons } from '@/components/NextPrevButtons/NextPrevButtons'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { weekNumber } from '@/utils/week'
|
import { weekNumber } from '@/utils/week'
|
||||||
import { EventRow } from '@/components/EventRow/EventRow'
|
import { EventRow } from '@/components/EventRow/EventRow'
|
||||||
import Error from '@/pages/_error'
|
import Error from '@/components/Error/Error'
|
||||||
import { fetchWorship } from '@/fetch/worship'
|
import { fetchWorship } from '@/fetch/worship'
|
||||||
import { tranformWorship } from '@/utils/dto/worship'
|
import { tranformWorship } from '@/utils/dto/worship'
|
||||||
import { AdminMenu } from '@/components/AdminMenu/AdminMenu'
|
import { AdminMenu } from '@/components/AdminMenu/AdminMenu'
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { fetchHighlightsBetweenDates } from '@/fetch/highlights'
|
||||||
import { Row } from '@/components/Flex/Row'
|
import { Row } from '@/components/Flex/Row'
|
||||||
import { Col } from '@/components/Flex/Col'
|
import { Col } from '@/components/Flex/Col'
|
||||||
import { highlightLink } from '@/utils/dto/highlight'
|
import { highlightLink } from '@/utils/dto/highlight'
|
||||||
import Error from '@/pages/_error'
|
import Error from '@/components/Error/Error'
|
||||||
import { AdminMenu } from '@/components/AdminMenu/AdminMenu'
|
import { AdminMenu } from '@/components/AdminMenu/AdminMenu'
|
||||||
import { isAuthenticated } from '@/utils/auth'
|
import { isAuthenticated } from '@/utils/auth'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864
|
||||||
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||||
import { default as default_9bcae99938dc292be0063ce32055e14c } from '../../../components/Logo/Logo'
|
import { default as default_9bcae99938dc292be0063ce32055e14c } from '../../../components/Logo/Logo'
|
||||||
import { GcsClientUploadHandler as GcsClientUploadHandler_06e62ca02c7c441053a9b643e5545934 } from '@payloadcms/storage-gcs/client'
|
import { GcsClientUploadHandler as GcsClientUploadHandler_06e62ca02c7c441053a9b643e5545934 } from '@payloadcms/storage-gcs/client'
|
||||||
|
import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'
|
||||||
|
|
||||||
export const importMap = {
|
export const importMap = {
|
||||||
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
|
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
|
||||||
|
|
@ -27,5 +28,6 @@ export const importMap = {
|
||||||
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||||
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||||
"/components/Logo/Logo#default": default_9bcae99938dc292be0063ce32055e14c,
|
"/components/Logo/Logo#default": default_9bcae99938dc292be0063ce32055e14c,
|
||||||
"@payloadcms/storage-gcs/client#GcsClientUploadHandler": GcsClientUploadHandler_06e62ca02c7c441053a9b643e5545934
|
"@payloadcms/storage-gcs/client#GcsClientUploadHandler": GcsClientUploadHandler_06e62ca02c7c441053a9b643e5545934,
|
||||||
|
"@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,6 @@ export const MenuGlobal: GlobalConfig = {
|
||||||
update: isAdmin()
|
update: isAdmin()
|
||||||
},
|
},
|
||||||
hooks: {
|
hooks: {
|
||||||
afterChange: [() => revalidateTag("menu")]
|
afterChange: [() => revalidateTag("menu", "max")]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
7923
src/migrations/20260205_155735_version_bump.json
Normal file
7923
src/migrations/20260205_155735_version_bump.json
Normal file
File diff suppressed because it is too large
Load diff
24
src/migrations/20260205_155735_version_bump.ts
Normal file
24
src/migrations/20260205_155735_version_bump.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||||
|
|
||||||
|
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
CREATE TABLE "payload_kv" (
|
||||||
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||||
|
"key" varchar NOT NULL,
|
||||||
|
"data" jsonb NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-02-08T15:57:34.492Z';
|
||||||
|
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-02-08T15:57:34.801Z';
|
||||||
|
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-03-07T15:57:34.871Z';
|
||||||
|
CREATE UNIQUE INDEX "payload_kv_key_idx" ON "payload_kv" USING btree ("key");`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "payload_kv" DISABLE ROW LEVEL SECURITY;
|
||||||
|
DROP TABLE "payload_kv" CASCADE;
|
||||||
|
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-01-11T10:35:28.881Z';
|
||||||
|
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-01-11T10:35:28.965Z';
|
||||||
|
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-02-05T10:35:29.018Z';`)
|
||||||
|
}
|
||||||
|
|
@ -15,6 +15,7 @@ import * as migration_20250915_075218 from './20250915_075218';
|
||||||
import * as migration_20251118_150529_youtube_player from './20251118_150529_youtube_player';
|
import * as migration_20251118_150529_youtube_player from './20251118_150529_youtube_player';
|
||||||
import * as migration_20260106_085445_donationforms from './20260106_085445_donationforms';
|
import * as migration_20260106_085445_donationforms from './20260106_085445_donationforms';
|
||||||
import * as migration_20260106_103529_donation_appeal from './20260106_103529_donation_appeal';
|
import * as migration_20260106_103529_donation_appeal from './20260106_103529_donation_appeal';
|
||||||
|
import * as migration_20260205_155735_version_bump from './20260205_155735_version_bump';
|
||||||
|
|
||||||
export const migrations = [
|
export const migrations = [
|
||||||
{
|
{
|
||||||
|
|
@ -100,6 +101,11 @@ export const migrations = [
|
||||||
{
|
{
|
||||||
up: migration_20260106_103529_donation_appeal.up,
|
up: migration_20260106_103529_donation_appeal.up,
|
||||||
down: migration_20260106_103529_donation_appeal.down,
|
down: migration_20260106_103529_donation_appeal.down,
|
||||||
name: '20260106_103529_donation_appeal'
|
name: '20260106_103529_donation_appeal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260205_155735_version_bump.up,
|
||||||
|
down: migration_20260205_155735_version_bump.down,
|
||||||
|
name: '20260205_155735_version_bump'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ export interface Config {
|
||||||
documents: Document;
|
documents: Document;
|
||||||
media: Media;
|
media: Media;
|
||||||
users: User;
|
users: User;
|
||||||
|
'payload-kv': PayloadKv;
|
||||||
'payload-locked-documents': PayloadLockedDocument;
|
'payload-locked-documents': PayloadLockedDocument;
|
||||||
'payload-preferences': PayloadPreference;
|
'payload-preferences': PayloadPreference;
|
||||||
'payload-migrations': PayloadMigration;
|
'payload-migrations': PayloadMigration;
|
||||||
|
|
@ -109,6 +110,7 @@ export interface Config {
|
||||||
documents: DocumentsSelect<false> | DocumentsSelect<true>;
|
documents: DocumentsSelect<false> | DocumentsSelect<true>;
|
||||||
media: MediaSelect<false> | MediaSelect<true>;
|
media: MediaSelect<false> | MediaSelect<true>;
|
||||||
users: UsersSelect<false> | UsersSelect<true>;
|
users: UsersSelect<false> | UsersSelect<true>;
|
||||||
|
'payload-kv': PayloadKvSelect<false> | PayloadKvSelect<true>;
|
||||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||||
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
||||||
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
||||||
|
|
@ -116,6 +118,7 @@ export interface Config {
|
||||||
db: {
|
db: {
|
||||||
defaultIDType: string;
|
defaultIDType: string;
|
||||||
};
|
};
|
||||||
|
fallbackLocale: null;
|
||||||
globals: {
|
globals: {
|
||||||
menu: Menu;
|
menu: Menu;
|
||||||
};
|
};
|
||||||
|
|
@ -174,7 +177,7 @@ export interface Parish {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -391,7 +394,7 @@ export interface Blog {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -541,7 +544,7 @@ export interface Group {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -560,7 +563,7 @@ export interface Group {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -650,7 +653,7 @@ export interface Classified {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -676,7 +679,7 @@ export interface DonationForm {
|
||||||
root: {
|
root: {
|
||||||
type: string;
|
type: string;
|
||||||
children: {
|
children: {
|
||||||
type: string;
|
type: any;
|
||||||
version: number;
|
version: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
|
|
@ -730,6 +733,23 @@ export interface User {
|
||||||
| null;
|
| null;
|
||||||
password?: string | null;
|
password?: string | null;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "payload-kv".
|
||||||
|
*/
|
||||||
|
export interface PayloadKv {
|
||||||
|
id: string;
|
||||||
|
key: string;
|
||||||
|
data:
|
||||||
|
| {
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
| unknown[]
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| null;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "payload-locked-documents".
|
* via the `definition` "payload-locked-documents".
|
||||||
|
|
@ -1348,6 +1368,14 @@ export interface UsersSelect<T extends boolean = true> {
|
||||||
expiresAt?: T;
|
expiresAt?: T;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "payload-kv_select".
|
||||||
|
*/
|
||||||
|
export interface PayloadKvSelect<T extends boolean = true> {
|
||||||
|
key?: T;
|
||||||
|
data?: T;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "payload-locked-documents_select".
|
* via the `definition` "payload-locked-documents_select".
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"esnext"
|
||||||
|
],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
@ -11,7 +15,7 @@
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "react-jsx",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|
@ -19,11 +23,23 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": [
|
||||||
"@payload-config": ["./src/payload.config.ts"]
|
"./src/*"
|
||||||
|
],
|
||||||
|
"@payload-config": [
|
||||||
|
"./src/payload.config.ts"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"target": "ES2017"
|
"target": "ES2017"
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": [
|
||||||
"exclude": ["node_modules"]
|
"next-env.d.ts",
|
||||||
|
"**/*.ts",
|
||||||
|
"**/*.tsx",
|
||||||
|
".next/types/**/*.ts",
|
||||||
|
".next/dev/types/**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue