Commit Graph

201 Commits

Author SHA1 Message Date
Ben Irvin 29de05e46d test(api): use lightweight resources for document-service query tests (#26466)
Several document-service API suites only need a minimal article schema and
fixtures but were loading the full shared resource pack, making setup and
teardown slow enough to flake on CI hook timeouts.
2026-05-29 10:50:38 +02:00
Nico André d6f693da85 feat(*): introduce MCP server (#26371) 2026-05-27 16:27:48 +02:00
Weijie Sun 40413d376a fix: deleteMany respects filters combined with relation (#25420)
* Use query builder init in deleteMany

* test(api): deleteMany respects filters combined with relation

* fix(database): pick filter params in deleteMany init

Apply _q, where, and filters through init like count instead of where-only
or full findMany params, avoiding populate/pagination surprises. Expand API
and unit tests for relation filters, count parity, and ignored param keys.

* chore(database): clarify deleteMany relation cleanup TODO

Replace the vague bulk-query TODO with a concrete note that deleteMany
still skips per-row deleteRelations unlike single delete().

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-27 09:42:06 +00:00
markkaylor d14e758ed5 fix(homepage): homepage count-documents slow on large D&P tables (#26370)
* fix(homepage): homepage count-documents slow on large D&P tables

* chore: add api test

* test(homepage): add i18n count-documents document_id semantics tests

Assert per-document_id buckets for never-published multi-locale drafts,
partial locale publish states, and mutually exclusive published vs modified.

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-27 10:25:34 +02:00
Nico André ebba42a369 feat(admin-tokens): remove adminTokens future flag (#26391) 2026-05-21 15:31:38 +02:00
Ben Irvin 05ff01de4f feat: publicationFilter param in REST and document service (#25793) 2026-05-21 11:31:18 +02:00
Ben Irvin f9c6a232e3 fix(database): respect nested sort in populate for join-table relations (#26361)
* fix(database): respect nested sort in populate for join-table relations

* test(api): cover nested populate sort edge cases

Refs: #26359
2026-05-18 11:15:35 +00:00
Jamie Howard 1a0cb07509 Merge pull request #26242 from strapi/fix/cms-941-rw-select
feat(review-workflows): save prompt for unsaved locales
2026-05-14 14:46:38 +01:00
Westley Marchment d9d5ff82dd fix(graphql): inherit publication state for i18n localizations (#22163)
* Filter for published results when requesting localizations

* fix(graphql): inherit publication state for i18n localizations

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-05-14 16:42:24 +03:00
Mark Kaylor 83fec11da9 Merge remote-tracking branch 'origin/main' into develop 2026-05-13 19:12:11 +02:00
Nico André c3d9daef94 fix(core/admin): admin and content api tokens retro-compatibility (#26313)
* fix(core/admin): api-token service treats kind.null as content-api

* fix(core/admin): services expose backward compatible 'api-token' shim

* enhancement(core/admin): api-token service uses pick instead of omit

* fix(core/admin): strategies content-api-token uses api-token-content-api service

* test: ensure api-token alias works

* test: fix useDocumentLayout for msw upgrade

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-13 14:57:11 +02:00
Garrett Heaver 50732df27a fix: FK violation publishing self-relation parent & child in one release (#26147)
* fix: content release with self-relation parent & child fails with FK violation

1. Concurrent publishes within a content type race on shared join-table state.
2. Errors from scheduled publishes were also silently swallowed leaving
   no trail in the logs.

* test: api test for self-related releases

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-12 13:37:25 +02:00
Ben Irvin bdb24ffb0d fix(database): append primary key to ORDER BY for paginated selects (#26032) 2026-05-11 15:37:50 +02:00
markkaylor c06b10cad4 chore(upload): add concurrentUploadSize config (#26053)
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-11 14:18:57 +02:00
Jamie Howard 4ec512cb11 fix: keep draft link on x-to-one relations non-dp to dp (#26179) 2026-05-06 09:23:21 +00:00
Christian Dreier 7efe492722 fix(graphql): isolate root query args per root field (#26178) 2026-05-05 16:25:56 +02:00
Ben Irvin 72535fb1c2 fix(database): run cleanOrderColumns updates sequentially (#26134)
Fix concurrent UPDATEs on the same join table that can deadlock Postgres
when renumbering order and inverse order columns.

Refs: https://github.com/strapi/strapi/issues/26131
2026-05-04 17:36:59 +02:00
Ziyi fa6299100d feat(content-manager): add Zod 4 foundation utilities (#25574) 2026-04-30 14:55:04 +02:00
Boaz Poolman ec72af97f0 Fix polymorphic relations in the document service API (#26099)
* chore: remove early exit for morph relation types

* fix: issues with creating morphToOne relations

* chore: add tests

* test: add polymorphic relations tests

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-04-30 11:58:02 +02:00
Nico André 52b8fd9e3d feat(admin): api token supports admin permissions and admin user ownership (#25657) 2026-04-29 17:57:36 +02:00
Jamie Howard 62a6230772 test: relations available status (#26051) 2026-04-24 10:39:17 +02:00
Ziyi ab7d9c38ec fix(document-service): preserve self-referential relations during publish and discard (#25890)
* fix(document-service): preserve self-referential relations during publish/discard

* test(document-service): convert self-referential API test to TypeScript

* fix(document-service): use JoinTable type and tighten Record types in self-referential-relations

* test(document-service): remove weak load() happy-path unit test

* fix(document-service): skip mappedBy attrs, deduplicate and idempotent-insert self-refs

* test(document-service): fix missing dialect and trx mocks in self-referential-relations tests

* fix(tests): use count assertions for CM API self-referential relation tests
2026-04-23 13:32:04 +02:00
Laurens Kling 104969fd8f fix(document-service): support delete selection params (#25097)
* feat: allow selectionParams in documents.delete

* fix(document-service): preserve locale-scoped delete lookup with selection params

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-04-23 10:12:13 +03:00
Bassel Kanso e66251a30c fix(i18n): preserve non-localized media when creating a locale (#26031) 2026-04-21 14:00:24 +03:00
markkaylor 7f17643db5 fix(upload): content-api does not return signed urls (#26034) 2026-04-17 10:17:51 +02:00
Adrien L f57a81a5a3 fix: bulk publish validation on required components in dz (#25687)
Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-04-15 14:06:22 +02:00
Jamie Howard 43420134cc fix(document-service): preserve relations during publish (#25909)
* fix(document-service): preserve relations during publish

* test: correct plural name for legacy model

* chore: update description

* fix: skip unstable virtual relations

* chore: invisible relation handling
2026-04-13 11:50:01 +01:00
Jamie Howard db2ec304ff fix(core): add firstPublishedAt field to draft (#25947)
* fix(core): add firstPublishedAt field to draft

* test: add unit test firstPublishedAt

---------

Co-authored-by: Ziyi <daydreamnation@live.com>
Co-authored-by: Alex Birkner <github@tyrola.dev>
2026-04-13 11:13:46 +01:00
Adrien L 1799b42980 fix: preserve relations in fill from another locale (#25703) 2026-04-10 16:30:34 +02:00
Jamie Howard a9afb42db9 RBAC "Move to stage" for review workflows (#25723)
* feat: 'toPermissions' in stage management

* test: enhance stage tests

* test: add api tests for to stage permissions

* feat: migration for backward compatible stage transfer permissions

* chore: rename permissions to fromPermissions in workflow stages

* chore: improve type definitions

* chore: rename permissions to fromPermissions
2026-04-01 12:27:54 +01:00
Ben Irvin 62f601ae76 test(api): add REST tests for relation documentId shorthand (#25870) 2026-03-31 14:05:24 +00:00
Jamie Howard 0a1886db0f fix(core): relation handling preserves order during unpublish/republish cycles (#25764)
* fix(core): relation handling preserves order during unpublish/republish cycles

* fix: preserve bidirectional order (#25792)

- Keep join rows when related side is still draft; map to published id when available
- Sync owner-side join order when publishing the owning type (inversedBy path)
- Refactor bidirectional load into shared capture + draft→published mapping helpers

Co-authored-by: Ben Irvin <ben@innerdvations.com>

* chore(core): re add order fix

* chore(core): improve structure and batch processing

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-03-31 14:08:26 +01:00
Ben Irvin 1459f88cde fix: contains filter no longer returns empty data (#25810)
* fix: contains filter no longer returns empty data

* chore: fix comments

* fix(utils): stop recursing opaque operator operands in filter traversal

* fix(utils): keep Date and other operand objects when stripping empty filters
2026-03-31 14:15:27 +02:00
guoyangzhen 8af200e5e0 fix: change return to continue in deleteRelations when using foreign keys (#25857)
* test(api): add morphToMany delete test

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-31 10:26:56 +02:00
Ben Irvin c89195bced test(api): add querylimit middleware test (#25765) 2026-03-30 09:51:30 +02:00
Ben Irvin cc6b0c661b fix: use max batch sizes per dialect (#25390) 2026-03-30 09:39:46 +02:00
Ziyi 24c887eff6 fix(document-service): re-insert cascade-deleted bidirectional relations (#25725) 2026-03-23 11:13:22 +01:00
Jamie Howard ed80b16a8e test: enhance validation tests for repeatable components and dynamic zones (#25714)
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-19 13:13:38 +00:00
Ziyi 08c3b0f003 fix: Content types with attributes named filters, sort, fields, or populate no longer cause 400 validation errors on populate queries and countDraftRelations (#21338) (#25762)
* fix(utils): make convertNestedPopulate schema-aware to prevent keyword collision
2026-03-18 15:48:54 +01:00
Ben Irvin 38049559a0 fix: use strapi.fetch for remote uploads (#25661) 2026-03-18 12:34:39 +01:00
Jamie Howard a6fd594526 Chore/cm combined performance fixes (#25678)
* fix(content-manager): reduce over-populated localizations and metadata (#25557)

* Chore: Content manager performance optimizations (#25600)

* chore(content-manager): wip reduce overhead in metadata queries, populate building, and list view

* fix(content-manager): update document metadata query to select specific fields

* chore(content-manager): document metadata consolidate field selection

* chore(content-manager): streamline locale, enhance document metadata structure

* chore(content-manager): document unpublishing, improve publish status logic

---------

Co-authored-by: markkaylor <mark.kaylor@strapi.io>
2026-03-17 16:28:37 +00:00
Varun Chawla 45ea4b1c9b fix(content-manager): skip non-draftAndPublish relations in countDraftRelations (#25453)
* fix(content-manager): skip non-draftAndPublish relations in countDraftRelations

* fix(content-manager): add safety guard for undefined targetModel

* fix(content-manager): add hasDraftAndPublish guard to sumDraftCounts and getDeepPopulateDraftCount

---------

Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-03-16 11:35:24 +01:00
Adrien L 25ea375b1b fix(content-releases): publish in right order to preserve relations (#25551) 2026-03-06 10:06:50 +01:00
Ben Irvin 484b494b02 security(upload): improve mimetype detection for uploads (#25177) 2026-03-04 10:39:09 +01:00
markkaylor c1b52ed675 chore(upload): add import from url (#25496) 2026-02-27 09:33:24 +01:00
Ben Irvin 7786d4dcde fix: feature works and rename addBodyParams to addInputParams (#25552)
* fix: add params actually works

* fix: rename addInputParams

* test: fix register timing

* chore: update getstarted

* test(api): remove ai comment

* revert: do not merge in type unneccessarily

* revert: do not add type to route
2026-02-25 17:34:56 +01:00
Ben Irvin 79a590a581 security(feat): add strictParam, addQueryParams, addBodyParams (#25528) 2026-02-24 13:51:33 +01:00
Ziyi 062cd562d0 feat(): add hasPublishedVersion parameter for Document Service (#25292)
* feat(): add hasPublishedVersion parameter for REST API

* fix(): add tests and small fixes

* fix(): fix documentID being overwritten and add tests

* fix(): add filter function so it works for both root and nested queries

* feat(): add parameter for graphQL and tests

* fix(): only add agrs to schema when draft and published is enabled

* test(api): graphql and findfirst tests

* Update packages/core/utils/src/convert-query-params.ts

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* fix(): fix graphql nested relation issues, add tests

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2026-02-18 10:03:29 +00:00
Ben Irvin 6c7927ed75 test(api): remove the expiresin warnings (again) (#25440) 2026-02-13 11:01:14 +01:00
Ben Irvin aee79cbd27 test(api): use jwt default options instead of expiresIn (#25303) 2026-02-03 11:44:38 +01:00