Releases: clearcms/clear-legacy
Release list
@clearcms/index@0.2.3
Patch Changes
- Updated dependencies [
68f91de]:- @clearcms/db@0.1.2
@clearcms/db@0.1.2
Patch Changes
-
68f91deThanks @slavasolutions! - Fix@clearcms/dbto ship a compileddist/instead of raw.ts
sources. Closes #87 (Node 22+ admin requests 500 with
ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING) and #89 (the dev
scriptNODE_OPTIONSworkaround that the missing dist forced).What changed:
packages/db/tsconfig.build.json— new file, mirrors
packages/spec/tsconfig.build.json(noEmit: false,
declaration,declarationMap,sourceMap,
rewriteRelativeImportExtensions, excludes test files).packages/db/package.json:main/types→./dist/index.js/./dist/index.d.ts.exports— each entry (.,./schema,./client,
./migrate) is a{types, default}conditional pointing at
the corresponding compiled file../migrationskeeps pointing
at the bare directory (drizzle SQL files, not compiled).scripts.build—tsc -p tsconfig.build.json. Picked up by
the monorepo'spnpm -r buildautomatically.files— replacessrcwithdist. Raw.tsno longer ships
in the published tarball; consumers get only the compiled JS +
types + the migrations directory.
pnpm --filter @clearcms/db buildproduces 4 modules × 4 artifacts
(.js,.js.map,.d.ts,.d.ts.map) underdist/. Typecheck
clean.Audit of other
@clearcms/*packages confirms no other shipped-version
package is in the same state:mcpandindexalready compile to
dist/and ship correctly;designis a CSS/SVG/CJS asset bundle
(intentionally not TS-compiled);spec/storage/sdk/core
known good.
@clearcms/create@0.4.0
Minor Changes
-
505a71aThanks @slavasolutions! - Fix scaffolded projects so a freshnpx @clearcms/createactually works.Bundles four bugs surfaced by adopter testers on v0.4.0:
- #86 — admin pin out-of-range.
@clearcms/create@0.3.0substituted
__CLEAR_VERSION__to^0.3.0, but no@clearcms/admin@0.3.xwas
ever published to npm (v0.3 was skipped via the v0.4 fat train). Stock
pnpm installfailed withERR_PNPM_NO_MATCHING_VERSION. This minor
bump lifts@clearcms/createto the 0.4.x line, so the
__CLEAR_VERSION__substitution emits^0.4.0— which resolves to
@clearcms/admin@0.4.1and onward. - #90 — pnpm 10 silent build-script skip. Added
pnpm.onlyBuiltDependencies: ["esbuild", "sharp"]to the scaffold's
package.json. Without this, pnpm 10 prints
Run "pnpm approve-builds"and skips sharp's native binding —
silently degrading admin's image-transform path to JS. Pre-approving
these two specifically keeps the scaffold strict (no arbitrary
postinstall scripts) but unblocks the two builds we need. - #92 —
pnpm typecheckfailed against REST backend.
pnpm typecheckranastro checkwithoutCLEAR_BACKEND=fs, so the
loaders defaulted to REST and tried to fetch/api/v1/pageswhile
the admin wasn't running. Mirroredpnpm build'scross-envprefix. - #93 — scaffold templates failed their own typecheck. Two distinct
TS errors:src/layouts/Base.astroaccesseditem.kindanditem.hrefon a
NavNodediscriminated union without proper narrowing. Switched
to'kind' in itemfor narrowing + defensive'href' in child
for nested children.src/pages/preview.astropasseddescription={description}where
descriptioncould beundefined. Astro 6's
exactOptionalPropertyTypes: truerejects explicit-undefined for
optional props. Switched to a conditional spread:
{...(description !== undefined ? { description } : {})}.
After this lands, a stock
npx @clearcms/create my-site && cd my-site && pnpm install && pnpm dev
boots admin + site cleanly on a fresh machine, andpnpm typecheckreturns 0 errors. - #86 — admin pin out-of-range.
@clearcms/admin@0.4.2
Patch Changes
-
3821bc7Thanks @slavasolutions! - Stop publishing test files in the@clearcms/adminnpm tarball (closes #88).The
filesfield inapps/admin/package.jsonlistedsrcwhole, so
every.test.ts/.test.tsx,__tests__/, and__snapshots__/under
src/shipped to npm. The test files importvitest, which is a
devDependency — Vite's dependency scanner walks the published tree on
admin boot, fails to resolvevitest, and prints:[vite] (!) Failed to run dependency scan ... vitest ... Are they installed?Non-fatal but noisy on every cold start.
Adopter testers hit it on PreviewPanel.test.tsx and
pages/api/admin/schemas/key.test.ts on different runs — the leak isn't
file-specific, it's the wholesrc/umbrella.This change adds explicit negation patterns to
files:"!**/*.test.ts", "!**/*.test.tsx", "!**/*.spec.ts", "!**/*.spec.tsx", "!**/__tests__/**", "!**/__snapshots__/**", "!src/test/**"
Verified with
npm pack --dry-run— the tarball no longer contains any
.test.*,.spec.*,__tests__/, or__snapshots__/entries. -
Updated dependencies [
68f91de]:- @clearcms/db@0.1.2
- @clearcms/index@0.2.3
@clearcms/admin@0.4.1
Patch Changes
-
#84
2d6eb06Thanks @slavasolutions! - Add update-available reminders toclear-admin.Adopters now learn about new versions of
@clearcms/adminvia two
complementary surfaces:Passive notifier — every
clear-admin <command>invocation kicks off
an async, non-blocking check against the npm registry. The result caches
at~/.cache/clear-admin/update-check.json(24h TTL). On the next
invocation, if a newer version is published, a one-line banner prints to
stderr at process exit:Update available 0.4.1 → 0.5.0 Run `npm i -g @clearcms/admin` to upgrade. Set NO_UPDATE_NOTIFIER=1 to silence.The check never blocks, never errors, never delays output. Failures
(offline, registry 5xx, timeout) are silent. Skipped when
NO_UPDATE_NOTIFIER=1orCIenv vars are set.Doctor check —
clear-admin doctornow includes anadmin-update
check that reports current vs latest @clearcms/admin. Reads the cache
file when fresh (24h); otherwise does a synchronous registry fetch with
a 1.5s timeout. WARN tier when behind, INFO when current or registry
unreachable. Skipped in CI / test environments / with NO_UPDATE_NOTIFIER.No new dependencies. Hand-rolled — built-in
fetch+ Node fs only. -
#82
6de9035Thanks @slavasolutions! - Fix Windowsclear-admin startspawning astro with ENOENT (#81).apps/admin/bin/clear-admin.js's dev-mode path resolved
node_modules/.bin/astroand calledspawn()withoutshell: true. On
Windows, pnpm/npm put shell wrappers at.bin/astro.cmdand.bin/astro.ps1,
not a bare.bin/astro— Node'schild_process.spawncannot resolve the
.cmdextension implicitly and threwENOENT. POSIX silently handled it
because the bare wrapper was directly executable.Now picks
astro.cmdonprocess.platform === 'win32'and bareastro
elsewhere. No shell, no quoting concerns. Adopters runningpnpm dev
on a Windows fresh clone of a@clearcms/createscaffold can boot the
admin alongside the site. -
#83
cbdc2ceThanks @slavasolutions! - Fix Windows SQLite teardown EBUSY in admin tests (#56).Test suites that exercised real libSQL (
pages-reindex, schemas[key]API,
preview[token]API) and the backup/restore CLI tests failed on Windows
fresh clones withEBUSY: resource busy or locked, unlink ...\clear.db. Two
compounding causes:- The cached libSQL singleton in
apps/admin/src/lib/db.tsis opened lazily
when a route is imported. Tests closed their own setup-time client but
never the route-side cached client, so the file handle persisted past
afterAll. - POSIX silently allows unlink-while-open. Windows doesn't, and the OS
sometimes needs a brief retry window even afterclose()returns.
This change adds:
- A new
closeDb()export fromapps/admin/src/lib/db.tsthat closes the
cached client and clears the singleton. Tests call it inafterAllbefore
removing tempdirs. - A new
safeRm(path)test helper inapps/admin/src/test/teardown.tsthat
retriesrmwith backoff on EBUSY (5 retries, linear 50ms backoff).
Wired into the affected suites:
pages-reindex.test.ts,schemas/[key].test.ts,
preview/[token].test.ts,backup.test.ts,restore.test.ts.Linux/macOS unaffected —
safeRmfalls through to a singlermcall when
no EBUSY occurs. - The cached libSQL singleton in
@clearcms/storage@0.2.2
Patch Changes
-
c7b4590Thanks @slavasolutions! - Late-2026-05-04 release batch:- admin — pages preview wiring (
PreviewPanelinPagePageEditor,type='page'branch in/api/v1/preview); page-scoped data editor (Data tab +pageData.saveaction + REST extension);schemaEditorsubsystem default-on; security: drop Astro's strict same-origin POST guard for single-operator network access. - spec — page-data meta-schema +
clear:widget+clear:widthextension keywords;widthFor()/widthSpan()resolvers. - storage — page-scoped
data.jsonread/write/delete helpers + layout-schema loader. - sdk —
cms.page(slug).datareturns parsed page-scoped data across all 4 backends (fs/REST/R2/S3). - create — scaffolder ships
/preview.astroroute and example layout schema intheme-examples/home.schema.json.
Note: this batch was published manually before Changesets was wired up. The next release runs through the standard CI flow.
- admin — pages preview wiring (
-
590abd8Thanks @slavasolutions! - Schema-first editor (Task 16, ADR-0020). Inverts the editor model so a schema-driven form is the canvas. TipTap moves from "always-on body" to awidget: "richtext"field type only present when the schema declares it. Two modes —form(default, 12-col grid) andarticle(full-canvas TipTap, opt-in for long-form prose like blog posts).- admin —
SchemaForm+ 10 widgets (text, textarea, richtext, number, url, date, image, select, array, object). PageItemEditor and PagePageEditor refactored to renderSchemaForminstead of a hardcoded Body tab. Empty-state CTA when a page has no layout schema. Bucket migration 0004 lifts existing page bodies intodata.json(with backup) and synthesizes default schemas for posts (article mode) + pages (default layout). Schema-editor UI gets editor-mode toggle + article-mode invariant validation. - spec —
editor: "form" | "article"keyword on collection + layout schemas.widgetlifted to first-class top-level (alongside legacyclear:widget). Newwidth: "full" | "half" | "third"keyword for grid layout (defaults: text/number/url/date/select → half; textarea/richtext/array/object/image → full). Helpers:validateArticleSchema,editorModeFor,titleFor,widthFor,widthSpan. - sdk —
cms.collection(<type>).get(<slug>).data.<field>andcms.pages.get(<slug>).data.<field>shape locked across all 4 backends. Schema-shape regression tests. - storage — page-data fs helpers stable.
- create — scaffolder ships an example article-mode
posts.jsonand a form-modehome.schema.json. README +docs/integrations/astro.mddocument the schema-first model.
- admin —
@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 —
@clearcms/sdk@0.3.1
@clearcms/mcp@0.1.2
Patch Changes
- Updated dependencies []:
- @clearcms/sdk@0.3.1