Release 0.233
0.233.2: app export, import and duplicate; the app error log (apps first-class, Phase 3)
.mantleappexport and import.GET /api/apps/:id/exportdownloads a zip of the code and a copy of the data (?data=0without).POST /api/apps/import-package(the file as the raw body) makes a new app from one: the package, schema and database (SQLite quick_check, then a clean copy in the SQL child) are checked before anything is made; the code is built here and published when it was published; unknown tools are left out and reported. docs/app-authoring-guide.md, “Export, import and duplicate”.- Duplicate.
app_duplicate/POST /api/apps/:id/duplicatecopies an app with its builds (live at once), draft, tools, schema and data (with_data: falsefor code only). Admin-only, unshared, no history but a “copied from” version, no table exports. - App error log (G4). Every broker (owner, member, client, share) logs
the errors it answers a running app with: kind
errorinapp_access_log, with the message, the SQL or the tool slug, who ran it and the status. Capped at 30 rows per app per minute; busy waits are not logged; a server fault keeps the generic text. Read withapp_errors(owner only, group apps) orGET /api/apps/:id/access-log?kind=error(kindandlimitare new). An access-log write that throws before it is sent no longer reaches the caller. - App table exports survive a restart (D8). The first app write of a
burst stamps the app’s exports
dirty_since(migration 0221,0221_app_table_exports_dirty); the sync that reads the rows clears it. The web process resumes the dirty ones at boot. The maintenance taskapp-export-catch-up(pnpm -C server/web app-export:catch-up, dry run unless--apply) syncs any dirty for 20 minutes; by hand only, since a changed table is re-indexed (not on the nightly cron).
0.233.1: recently deleted apps, app_update, an import that checks first (apps first-class, Phase 3)
- Recently deleted. Deleting an app keeps a
pre_deletesnapshot (code, name, look and data) and its history for 30 days; it comes back with the same id (app_undelete,POST /api/apps/deleted/:id/restore), admin-only and unshared.app_deleted_list/GET /api/apps/deletedlist them;DELETE /api/apps/deleted/:idpurges one now; the nightlyapp-trash-purgesweep (pnpm -C server/web app-trash:purge) after 30 days. A delete whose snapshot cannot be taken does not happen. - Migration 0220 (
0220_node_snapshots_outlive_node): drops the node_snapshots foreign key so the history outlives the app. app_update: rename an app, change its description, icon, colour or tags.PATCH /api/apps/:idtakesdescription.- Import checks first.
POST /api/apps/importvalidates the tool slugs and tries the schema before it writes anything (a bad one used to leave a half-made app), follows the create route’s field rules, and snapshots an existing app before it overwrites it. - One build step (
buildAndStageAppin @mantle/tools) behindapp_build, Preview, Commit, import andapps:push.
0.233.0: app history, versions and snapshots (apps first-class, Phase 2)
An app’s code AND its data can now be put back (docs/app-authoring-guide.md, “History: versions and snapshots”).
- Versions. Every publish records the code that went live, with an
optional note (
app_publishtakesnote). - Snapshots. The code and a copy of the app’s database
(
app_snapshot_create, or the History tab). One is taken automatically before every restore and beforeapp_db_schema_setchanges the schema of an app with data. The newest 20 automatic ones are kept per app; the owner’s own count againstAPP_SNAPSHOT_MAX_MB(default 2048). - Restore in three modes (
app_snapshot_restore, confirm-gated, orPOST /api/apps/:id/snapshots/:sid/restore):codeinto the draft,databack as the live database,fullboth live. A data restore puts a marker beside the file: every broker and the SQL child answer busy (429) for the few seconds the swap takes. - Routes:
GET/POST /api/apps/:id/snapshots,GET/PATCH/DELETE …/snapshots/:sid,…/restore,…/download(the.sqlitecopy). - Tools:
app_snapshot_create,app_snapshot_list(groupapps);app_snapshot_restore,app_snapshot_delete(groupapp-admin, both confirm-gated). - Contract:
@crossworks/client-typesgainsAppSnapshotandAppRestoreMode. Additive. - The backup copies each app’s snapshots with its database; deleting an app removes them.
- Migration 0219 (
0219_node_snapshots): thenode_snapshotstable (one numbered line per item, apps now, tables later),apps.restored_from_seq, and v1 for every published app (pure SQL).