crosscode uninstall/export/purge <church> [product ...]: with products named only those
go and the church keeps the others; naming every product it still has removes the church
(folder and app user), so the last product to go takes the church with it. The report
gives products and remaining. Uninstalling cross-events-demo's Events removed its Accounts
too, which the Hub still showed as live.
Contracts 1.16.0: optional products on export/uninstall/purge, PRODUCT_UNINSTALL_MIN_AGENT.
Agent 1.5.0 passes them to crosscode. The Website plan moves to contracts 1.17.0 / Hub 2.13.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Events and Accounts: Background jobs are switched on or off and rescheduled from the admin;
the choice is kept in the database (job_overrides), wins over the .env and applies at once.
Accounts gets an Admin -> Background jobs page and per-job env flags, as Events.
- Accounts: every email styled as Cross Events' (church colour, logo, button, footer), same
plain text (src/lib/emails.ts).
- Contracts 1.12.0: env-read / env-set agent jobs, envReadResultSchema, isSecretEnvName.
- crosscode script: `crosscode env <church> <product>` reads the .env (secrets hidden) and, with
--set/--unset/--restart, changes one file, rebuilds the frontend when its file changed, reloads,
and puts the file back if the site doesn't answer (lib/envedit.cjs, tests/envedit.bats).
- Agent 1.3.0: runs env-read and env-set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- scripts: `crosscode demo <church> --profile … [--admin-email …]`: backup,
set-demo.js as the site's user, reload, wait for /health.
- Contracts 1.7.0: the seed-demo job, DEMO_PROFILES, SEED_DEMO_MIN_AGENT.
- Agent 1.2.0: seed-demo → crosscode demo.
- Events 2.4.1: set-demo.js stops with a clear message when it can't read
.env (was "client password must be a string", then a hang); keeps the
oldest admin when the default one isn't on the site; --admin-email=.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crosscode install takes --products accounts (one product per install);
crosscode add <church> <product> installs a product next to a church's
others, as its app user, undoing only its own folder, database, PM2 and
site if a step fails. install_events/install_accounts share the checks,
ports and nginx site. Agent 1.1.0: install jobs for Accounts, and
add-product jobs (behind frp, with the Hub's ports and release).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Every command takes --json (crosscode.script-report/1 on stdout, the
log on stderr) and --config (the .env values by layer, from the agent).
- .env files come from the release's env.template.json (lib/envtpl.js):
written whole on install; on deploy only new variables are appended,
and a new required one with no value stops the deploy at the checks.
- install --frp: Hub-given ports, a marked frpc.ini block (backup,
frpc verify, reload; [common] admin lines added once), no nginx.
A database on another server via DB_ADMIN_URL. Refuses an existing
database or role. Everything the run made is removed if it fails.
- restart, export (crosscode.church-export/1 ZIP), uninstall (final
backup, uploads and .env kept 30 days) and purge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One script for installing, updating and moving church installs, replacing
hope-events' scripts/deploy.sh and install.sh:
- deploy <church> [events] / --every-church, with --version, --main, --check
and --allow-local-changes: checks every product first (files changed by
hand, Node, release requirements from WHATS-NEW.md headings), then each
product in order with backup, checkout, install, migrate, build, PM2 reload
and a /health version check; a failure rolls that product back and stops.
- status [<church>]: checked-out and latest release, /health, and the old
folder kept after adopt.
- install <church> --products events --domain <address>: a new church under
/var/www/sites/<church>, writing church.env.
- adopt <church> --events-dir <old> builds the monorepo checkout next to the
running install and switches PM2 over; adopt --undo goes back to it.
Product hooks live in scripts/products/events.sh. shellcheck (lint:scripts)
and 47 bats tests (test:scripts) are part of npm run check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>