Skip to content

feat(api-headless-cms): model field compression#5145

Merged
brunozoric merged 10 commits intonextfrom
bruno/feat/api-headless-cms/model-field-compression
Apr 30, 2026
Merged

feat(api-headless-cms): model field compression#5145
brunozoric merged 10 commits intonextfrom
bruno/feat/api-headless-cms/model-field-compression

Conversation

@brunozoric
Copy link
Copy Markdown
Contributor

@brunozoric brunozoric commented Apr 30, 2026

Changes

Enable Cms Model Field compression due to some really large models.
Used for testing purposes mostly, but users can enable it in their projects.

How Has This Been Tested?

Jest and manually.

Usage

To enable compression, in webiny.config.ts add:

<Api.Cms.ModelFieldCompression enabled={true} />

@brunozoric brunozoric self-assigned this Apr 30, 2026
@brunozoric brunozoric added this to the 6.3.0 milestone Apr 30, 2026
brunozoric and others added 10 commits April 30, 2026 13:09
Adds compress/decompress of CmsModelField[] via CompressionHandler abstraction.
Wires ModelFieldCompression into CreateModelRepository and ContentModelFeature.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… read

Adds StorageCmsModel type with compressed fields shape, wires ModelFieldCompression
into CreateModelFrom/UpdateModel repositories and ModelsFetcher, and updates
storage operation types in ddb/ddb-es to use StorageCmsModel.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Uses BuildParams key "ContentModelFieldCompression" to enable/disable compression.
When disabled, compress() returns CmsModelField[] as-is; decompress() already
handles the array passthrough. Updates IModelFieldCompression interface and
StorageCmsModel.fields type to accommodate both compressed and raw field storage.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… by default)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Adds a typed defineExtension component for toggling Headless CMS model field
compression via build params, following the same pattern as Api.Mailer.Smtp.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@brunozoric brunozoric force-pushed the bruno/feat/api-headless-cms/model-field-compression branch from eb0825f to 908272e Compare April 30, 2026 11:11
@brunozoric brunozoric marked this pull request as ready for review April 30, 2026 11:33
@brunozoric brunozoric merged commit 1a6484b into next Apr 30, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant