diff --git a/apps/website/e2e/server.ts b/apps/website/e2e/server.ts index 3ef510d..7e128ce 100644 --- a/apps/website/e2e/server.ts +++ b/apps/website/e2e/server.ts @@ -4,7 +4,8 @@ * (freshPostgres, below), and the demo church published. The pages run as a production build on * 3310 and send /api here. * - * Test helpers: POST /test/demo?template= loads the demo church on that template; + * Test helpers: POST /test/demo?template= loads the demo church on that template (or + * ?profile=, a demo profile); * POST /test/design { variants?, style?, home? } changes the design and publishes again. */ import { execSync } from 'node:child_process'; @@ -15,7 +16,7 @@ import express from 'express'; import pg from 'pg'; import sharp from 'sharp'; import { PrismaPg } from '@prisma/adapter-pg'; -import { websiteTemplateSchema } from '@crosscode/contracts'; +import { agent, websiteTemplateSchema } from '@crosscode/contracts'; import { PrismaClient } from '../backend/src/generated/prisma/client.js'; import { createApp } from '../backend/src/app.js'; import { createCtx } from '../backend/src/context.js'; @@ -67,6 +68,14 @@ await loadDemo(ctx, websiteTemplateSchema.parse(process.env.DEMO_TEMPLATE ?? 'he const app = express(); app.post('/test/demo', async (req, res) => { + // ?profile=: one of the demo profiles (the crosscode-site screenshots of another church on + // a template); it keeps the church profile the template demo saved (Acacia Hill). + const profile = String(req.query.profile ?? ''); + if (profile) { + if (!(agent.WEBSITE_DEMO_PROFILES as readonly string[]).includes(profile)) return res.status(400).json({ error: 'profile' }); + await loadDemo(ctx, profile as agent.WebsiteDemoProfile, { uploadDir: uploads }); + return res.json({ ok: true, profile }); + } const t = websiteTemplateSchema.safeParse(req.query.template); if (!t.success) return res.status(400).json({ error: 'template' }); await loadDemo(ctx, t.data, { uploadDir: uploads }); diff --git a/docs/VERSIONS.md b/docs/VERSIONS.md index 2d0a409..3e1e89f 100644 --- a/docs/VERSIONS.md +++ b/docs/VERSIONS.md @@ -16,7 +16,7 @@ separately below; the two often differ. | Server agent | `crosscode-platform` (`apps/agent`) | **1.6.0** | `agent@1.6.0` | 2026-11-27 | | Contracts | `crosscode-platform` (`packages/contracts`) | **1.19.0** | `contracts@1.19.0` | 2026-11-27 | | Cross Code Hub | `events-hub` | **2.25.0** | `v2.25.0` | 2026-11-27 | -| crosscode.co.za | `crosscode-site` | **1.7.1** | `v1.7.1` | 2026-11-27 | +| crosscode.co.za | `crosscode-site` | **1.8.0** | `v1.8.0` | 2026-11-27 | | `crosscode` script | `crosscode-platform` (`scripts/`) | `main` | none | 2026-11-27 (last change: an uninstall keeps the Website's backup snapshots shared, `rsync -aH`) | The `crosscode` script has no version: every server's copy (`/opt/crosscode/tools`) pulls `main` @@ -38,6 +38,13 @@ need their own tags until something outside this repo depends on them. ## What each latest release was for +- **crosscode.co.za 1.8.0 (2026-11-27):** each Church Website template's page shows the whole + demo website (a gallery of Plan your visit, About us, Ministries, Leadership, Events, an event, + Messages and Contact) and "the same template, a different church" (the template's second demo + profile). Screenshot URLs carry a hash of the file (`?v=`): `/assets/` is cached for 30 days, so + after deploying 1.7.1 the template grid still showed the old illustrated screenshots. The + Website's e2e server takes `/test/demo?profile=` for these screenshots (test helper only, no + Website release). **Not deployed yet.** - **Church Website 1.6.0 + crosscode.co.za 1.7.1 (2026-11-27):** the demo church has real photos: 104 Unsplash stock photos (models; free under the Unsplash License, credited in `apps/website/backend/demo-photos/CREDITS.md`, 12 MB) instead of the generated "hills and sun"