Repository navigation
v0.9.0
A review of the whole project, and the changes that came from it. The content
format is simpler: one folder for each entry and each singleton, rich text in a
repeater row named by the row's key, and a save that keeps what the model does
not declare. A specification describes the format, and tests check it against
fixtures. @micacms/core exports a smaller public API, and four packages are
published. Publish, Discard, Delete and Reorder check the revision that the
editor saw, so a colleague's later save shows as a conflict. The self-hosted
image finds its content root, repairs its clone after a force push, and reports
problems in /ready. The budget tests use the 1.0 target: 1,000 entries in a
collection, 5,000 files and 5 editors. The editor has a new look with a dark
mode.
Read Breaking before upgrading from 0.8. This release has no migration: move
the content files to the new layout by hand, or start again from your Git
history.
Breaking
- One folder for each entry and each singleton. An entry is
<collection>/<slug>/index.json, a singleton is<name>/index.json, and
mediais a reserved name. The manifest records no layout.
mica migrate-layoutis removed. Removed:collectionEntryPath,
singletonPath,entryLayout,deriveLayout,recordLayout,
misplacedFilesandLayoutError. New:entryFolderand
entryDataPath(@micacms/core,@micacms/astro,@micacms/editor,
@micacms/runtime). - Rich text in a repeater row is stored in a file named by the row's key,
such assections.k3f9a2.body.mdoc, and a row with rich text has a_key
in the JSON. A new order of the rows changes onlyindex.json
(@micacms/core). - A save keeps what the model does not declare, the keys and the
.mdoc
files. Adefaultfills a field only in a new entry; a read fills a missing
value with its empty value.withDefaultsis nowwithEmptyValues, and
serializeEntrytakes the stored JSON (@micacms/core,@micacms/runtime). - Stricter model rules. The model refuses two names that differ only in
case, aslugFieldthat is not a slug, a lower bound above an upper one, a
default that is not a valid value, and a textpatternthat repeats a group
with a repeat inside, such as(a+)+. An unknown field option stops the
build, and makes its collection read-only in an older editor
(@micacms/core,@micacms/astro). - The public API of
@micacms/coreis smaller. The main entry point has
the model, validation, the content format, the readers and the model file.
Removed:getCollection,getSingleton,uniqueSlugandtoIssues. - Four published packages:
@micacms/core,@micacms/astro,
@micacms/editor(with the built editor UI) and@micacms/runtime.
@micacms/editor-uiand@micacms/auth-oidcare no longer published. - The content root is set in one place,
defineSite({ root }).
micaCollectionshas norootoption (@micacms/astro). - Self-hosted configuration:
MICA_REPOSITORY_ROOTis removed. The image finds the content root by its
.mica/schema.json;MICA_CONTENT_PATHnames it only when the repository
has more than one. The top of the repository cannot be the content root.MICA_PUBLIC_URLandMICA_SESSION_SECRETare always required.
MICA_PUBLIC_URLmust be an origin without a path.NODE_ENVchanges nothing. Plain HTTP is allowed only for an address on
this machine.MICA_SIGNIN_WINDOW_MSis nowMICA_SIGNIN_WINDOW_MINUTES.MICA_ADMIN_ORIGINSandMICA_ADMIN_DIRare local-editor settings only.
/readyhas the statusdegraded(still HTTP 200) when something needs
a person, one reason for each problem, andlastSyncAt.
restart_requiredis removed;lfs_refused,model_unreadable,
pending_push,conflictand others are new (@micacms/runtime).- The CLI. Each command takes only its own options, and a path is always
the content root.mica importtakes--collection <name>in place of names.
checkandimportexit with 78 without a readable model
(@micacms/editor). - Uploads are one file for each request, sent as the request body.
Internal:ContentFileshasreadHead,readStreamandreceivein place
ofreadBinary(@micacms/runtime,@micacms/editor).
Added
- A specification of the content format in
docs/content-format.md, with
fixtures that a test reads and writes back byte for byte (@micacms/core). - A new look for the editor: green actions, a light sidebar, the
Instrument Sans and IBM Plex Mono fonts, status labels with a coloured dot,
and a dark mode. Under Appearance, an editor chooses light, dark or the mode
of the system (@micacms/editor). - One way to change an order for the entries of a collection, the items of
a list, the chosen entries of a relation and the files of a media field: a
handle drags an item or moves it with the keyboard, and arrow buttons move it
one step (@micacms/editor). - The self-hosted image:
- finds its content root in the clone;
- follows a rewritten branch (a force push or a reset) and a new repository
URL, and keeps the drafts as conflicts until an editor chooses; - starts with the model in its clone and syncs in the background, and holds
a new version that it cannot use (LFS under the content root, or a model
that it cannot read); - runs only once for each data volume, with a lease, and finishes the work
that a stop or a crash interrupted; - reads
MICA_SESSION_SECRET_FILE,MICA_OIDC_CLIENT_SECRET_FILEand
MICA_REPOSITORY_TOKEN_FILE; the token file is read for each Git call; - has a
compactcommand that makes the clone small again; checkalso tests the identity provider, shows the redirect URI, and
checks the data volume and the clone.
- The CLI finds the content root by its
.mica/schema.jsonwhen no path
is given (@micacms/editor). - In
astro dev, a change tosrc/mica.tslogs how to load the new model
(@micacms/astro). - New recipe
remove-field.mjs(@micacms/core).
Changed
- Publish, Discard, Delete and Reorder check the revision that the editor
saw. A colleague's later save is a conflict, not lost or published unseen
(@micacms/runtime,@micacms/editor). - Faster at the 1.0 target. Publish with a deletion reads the unchanged
files from the working tree, not one Git process for each file. The budget
tests use 1,000 entries in one collection, 5,000 files and five editors at
the same time (@micacms/runtime). - No whole media file in memory. An upload streams to disk, the file route
streams, a revision is a cached, streamed hash, and a URL change copies the
media on disk (@micacms/runtime). - A slow network does not block the start, the sync or Publish: a sync
skips its turn while one runs, a stalled transfer stops, and Git has
settings for large repositories with many images. mica initwrites the starter's model, the same one as
examples/starterand the getting-started page (@micacms/editor).- The release workflow builds without write rights and publishes from a
separate job; dependencies are audited every week and updated every month.
Fixed
- Security: the content files refuse a symbolic link out of the content
root and the.gitfolder; a route slug is one folder name; amedia()
value stays inside the content root; a name such asconstructoris not a
collection; sign-out removes the unsaved form values that the tab kept
(@micacms/core,@micacms/runtime,@micacms/editor,@micacms/astro). - The first Publish of a new project names
git push -u origin HEAD
when the branch has no upstream (@micacms/runtime). astro addno longer writes a broken configuration: the package has no
astro-integrationkeyword (@micacms/astro).- A missing value reaches templates empty, never with its default, and
templates do not get the_keyof repeater rows (@micacms/astro).