strapi-plugin-populate-all 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server/index.js
CHANGED
|
@@ -86,7 +86,7 @@ const bootstrap = ({ strapi: strapi2 }) => {
|
|
|
86
86
|
strapi2.db.lifecycles.subscribe((event) => {
|
|
87
87
|
try {
|
|
88
88
|
if (event.action === "beforeFindMany" || event.action === "beforeFindOne") {
|
|
89
|
-
if (
|
|
89
|
+
if (strapi2.requestContext.get()?.query?.populateAll) {
|
|
90
90
|
strapi2.log.debug(
|
|
91
91
|
`[populate-all] recursively populate ${event.model.uid}`
|
|
92
92
|
);
|
package/dist/server/index.mjs
CHANGED
|
@@ -85,7 +85,7 @@ const bootstrap = ({ strapi: strapi2 }) => {
|
|
|
85
85
|
strapi2.db.lifecycles.subscribe((event) => {
|
|
86
86
|
try {
|
|
87
87
|
if (event.action === "beforeFindMany" || event.action === "beforeFindOne") {
|
|
88
|
-
if (
|
|
88
|
+
if (strapi2.requestContext.get()?.query?.populateAll) {
|
|
89
89
|
strapi2.log.debug(
|
|
90
90
|
`[populate-all] recursively populate ${event.model.uid}`
|
|
91
91
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Context, Next } from "koa";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
/**
|
|
3
4
|
* This is a global middleware to add support for the custom query param `?populate=all`.
|
|
@@ -5,6 +6,6 @@ declare const _default: {
|
|
|
5
6
|
* If `?populate=all` is detected, we omit the value and set `?populateAll=true` instead.
|
|
6
7
|
* The bootstrap script later picks up `?populateAll=true` to apply the desired populate logic.
|
|
7
8
|
*/
|
|
8
|
-
populateAll: (ctx:
|
|
9
|
+
populateAll: (ctx: Context, next: Next) => Promise<void>;
|
|
9
10
|
};
|
|
10
11
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.
|
|
2
|
+
"version": "1.4.1",
|
|
3
3
|
"name": "strapi-plugin-populate-all",
|
|
4
4
|
"description": "A lightweight plugin to recursively populate nested data in RESTful API requests",
|
|
5
5
|
"keywords": [],
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"release": "semantic-release"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@biomejs/biome": "2.
|
|
49
|
+
"@biomejs/biome": "2.4.4",
|
|
50
50
|
"@strapi/sdk-plugin": "^5",
|
|
51
51
|
"@strapi/strapi": "^5",
|
|
52
52
|
"@strapi/typescript-utils": "^5",
|
|
53
|
-
"@vitest/coverage-v8": "^4.0.
|
|
54
|
-
"semantic-release": "^25.0.
|
|
53
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
54
|
+
"semantic-release": "^25.0.3",
|
|
55
55
|
"typescript": "^5.9.3",
|
|
56
|
-
"vitest": "^4.0.
|
|
56
|
+
"vitest": "^4.0.18"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@strapi/sdk-plugin": "^5",
|