This repository was archived by the owner on May 9, 2026. It is now read-only.
@clearcms/spec@0.3.1
Patch Changes
-
#19
bebbdc1Thanks @slavasolutions! -clear-admin backupandclear-admin restore— first-class operator commands.- admin — new
clear-admin backup [--out=<dir>] [--slug=<s>]writes a tarball
containing the bucket directory,clear.db, and amanifest.json
describing every file with sha256 + bytes + captured package versions.
Default output dir:$CLEAR_BACKUP_DIRor~/clear/_backups/<slug>/. - admin — new
clear-admin restore <tarball> [<target-dir>] [--force]
extracts a backup, verifies every file's sha256 against the manifest,
refuses to overwrite a non-empty target unless--forceis passed, and
prints concrete next steps on success. - admin — the in-monorepo
pnpm backup/pnpm restorescripts now
delegate to the same modules so they produce v1 manifests too. - spec — new
@clearcms/spec/backup-manifestexport with the
BackupManifestSchemaZod validator (closed-shape, version-gated).
JSON Schema artifact atdist/schemas/backup-manifest.json.
closes #13
- admin — new
-
#35
fde9eabThanks @slavasolutions! - Schema-awareclear-admin import <dir>.- admin —
clear-admin import <dir>now reads the target collection's
schema first and maps each markdown file's frontmatter onto the
declared fields. The body lands in the schema's firstkind: "richtext"field by default. Two new escape hatches:- Per-file override
clear:bodyField: <name>in frontmatter routes
the body into the named field instead. --no-synthesizeerrors out (with a documented message) when the
schema has no richtext field and no override is set, instead of
auto-appending abodyfield.
- Per-file override
- admin — unknown frontmatter keys are now logged as warnings (per
file) and dropped from the imported item, instead of leaking into
dataas untyped values. Keys in the reservedclear:namespace are
skipped silently. - admin — when synthesis fires, the importer appends a single
body: { kind: "richtext" }entry to
bucket/schema/fields/<collection>.jsonand runssyncBucketToDbso
the DB index matches the new shape. - admin —
--helpand inline import usage list the new flags. - spec — new
BODY_FIELD_FRONTMATTER_KEY = 'clear:bodyField'and
RESERVED_FRONTMATTER_PREFIX = 'clear:'constants exported from
@clearcms/specso adopter tooling can match the importer's contract
without copying the strings.
Re-import is still one-way (overwrite, not merge); two-way sync remains
out of scope for v0.x.closes #34
- admin —