Skip to content

v3.19.0

Choose a tag to compare

@58bits 58bits released this 09 Jul 20:36

Highlights

  • @byline/core — the field-upload pipeline now hands server-side upload hooks full control over storage-key naming. A beforeStore hook may return { storagePath }, which is threaded into storage.upload as targetStoragePath and written verbatim — no UUID prefix — so a hook can produce a deterministic key (for example a publication file name derived from a document's serial number). ctx.storagePath folds through hook chains, and the stored filename defaults to the key's basename. Hook contexts now also carry the resolved storage provider, so a hook can feature-detect and call exists() / move() directly.

  • @byline/admin / @byline/core — new UploadConfig.context: a set of form-value paths (sibling or root-absolute, filesystem-style) that the upload executor resolves at submit time and posts alongside the file. documentId (in edit mode) and fieldPath are always posted, and every resolved value lands in the hooks' ctx.fields bag — giving beforeStore hooks the surrounding document values they need to compute a storage key.

  • @byline/admin / @byline/core — new UploadConfig.requireSavedDocument: upload widgets render a localized "save this document first" notice until the document is persisted, closing the gap where an upload hook needs a documentId that does not yet exist on a brand-new document. FormContext now exposes documentId to support this.

  • @byline/storage-local / @byline/storage-s3 — new optional IStorageProvider.move() and exists() capabilities. storage-local implements move as a rename with an EXDEV copy fallback; storage-s3 implements them via CopyObject + DeleteObject and HeadObject. Both are additive — providers that don't implement them continue to work, and hooks feature-detect before calling.

  • @byline/db-postgres / @byline/core — new ICounterCommands.nextScopedCounterValue for runtime self-registering counter groups. This backs per-document sub-sequences (monotonic, never-reused values, one Postgres sequence per scope) — for example numbering attachments within a single document.

Chores

  • monorepo — added role="presentation" to SVG assets to satisfy Biome 2.5's SVG linting.

All other @byline/* packages bumped to 3.19.0 in lockstep with no behavioural changes this cycle.