@medusajs/framework 3.0.0-snapshot-20250408170244 → 3.0.0-snapshot-20250409125618
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.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"maybe-apply-link-filter.d.ts","sourceRoot":"","sources":["../../../src/http/utils/maybe-apply-link-filter.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"maybe-apply-link-filter.d.ts","sourceRoot":"","sources":["../../../src/http/utils/maybe-apply-link-filter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAA;AAEjB,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAoB,GACrB;;;;;CAAA,SAEQ,aAAa,KACf,cAAc,QACX,kBAAkB,mBA2C3B"}
|
@@ -13,23 +13,20 @@ function maybeApplyLinkFilter({ entryPoint, resourceId, filterableField, filterB
|
|
13
13
|
? filterFields
|
14
14
|
: [filterFields];
|
15
15
|
delete filterableFields[filterableField];
|
16
|
-
const remoteQuery = req.scope.resolve(utils_1.ContainerRegistrationKeys.REMOTE_QUERY);
|
17
|
-
const queryObject = (0, utils_1.remoteQueryObjectFromString)({
|
18
|
-
entryPoint,
|
19
|
-
fields: [resourceId],
|
20
|
-
variables: { filters: { [filterableField]: idsToFilterBy } },
|
21
|
-
});
|
22
|
-
const resources = await remoteQuery(queryObject);
|
23
16
|
let existingFilters = filterableFields[filterByField];
|
17
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
18
|
+
const filters = {
|
19
|
+
[filterableField]: idsToFilterBy,
|
20
|
+
};
|
24
21
|
if (existingFilters) {
|
25
|
-
|
26
|
-
existingFilters = [existingFilters];
|
27
|
-
}
|
28
|
-
filterableFields[filterByField] = (0, utils_1.arrayIntersection)(existingFilters, resources.map((p) => p[resourceId]));
|
29
|
-
}
|
30
|
-
else {
|
31
|
-
filterableFields[filterByField] = resources.map((p) => p[resourceId]);
|
22
|
+
filters[resourceId] = existingFilters;
|
32
23
|
}
|
24
|
+
const { data: resources } = await query.graph({
|
25
|
+
entity: entryPoint,
|
26
|
+
fields: [resourceId],
|
27
|
+
filters,
|
28
|
+
});
|
29
|
+
filterableFields[filterByField] = resources.map((p) => p[resourceId]);
|
33
30
|
req.filterableFields = transformFilterableFields(filterableFields);
|
34
31
|
return next();
|
35
32
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"maybe-apply-link-filter.js","sourceRoot":"","sources":["../../../src/http/utils/maybe-apply-link-filter.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"maybe-apply-link-filter.js","sourceRoot":"","sources":["../../../src/http/utils/maybe-apply-link-filter.ts"],"names":[],"mappings":";;AAOA,oDAoDC;AA3DD,2CAA2D;AAO3D,SAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,GAAG,IAAI,GACrB;IACC,OAAO,KAAK,UAAU,UAAU,CAC9B,GAAkB,EAClB,CAAiB,EACjB,IAAwB;QAExB,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAA;QAE7C,IAAI,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;YACzC,OAAO,IAAI,EAAE,CAAA;QACf,CAAC;QAED,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAA;QAEtD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;YAC/C,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;QAElB,OAAO,gBAAgB,CAAC,eAAe,CAAC,CAAA;QAExC,IAAI,eAAe,GAAG,gBAAgB,CAAC,aAAa,CAGvC,CAAA;QAEb,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iCAA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CAAC;gBAC1B,wCAAwC;gBACxC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;gBACrB,MAAK;YACP,CAAC;YAED,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QACzB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/framework",
|
3
|
-
"version": "3.0.0-snapshot-
|
3
|
+
"version": "3.0.0-snapshot-20250409125618",
|
4
4
|
"description": "Framework",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"test": "jest --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
|
-
"@medusajs/cli": "3.0.0-snapshot-
|
57
|
+
"@medusajs/cli": "3.0.0-snapshot-20250409125618",
|
58
58
|
"@mikro-orm/core": "6.4.3",
|
59
59
|
"@mikro-orm/knex": "6.4.3",
|
60
60
|
"@mikro-orm/migrations": "6.4.3",
|
@@ -74,12 +74,12 @@
|
|
74
74
|
},
|
75
75
|
"dependencies": {
|
76
76
|
"@jercle/yargonaut": "^1.1.5",
|
77
|
-
"@medusajs/modules-sdk": "3.0.0-snapshot-
|
78
|
-
"@medusajs/orchestration": "3.0.0-snapshot-
|
79
|
-
"@medusajs/telemetry": "3.0.0-snapshot-
|
80
|
-
"@medusajs/types": "3.0.0-snapshot-
|
81
|
-
"@medusajs/utils": "3.0.0-snapshot-
|
82
|
-
"@medusajs/workflows-sdk": "3.0.0-snapshot-
|
77
|
+
"@medusajs/modules-sdk": "3.0.0-snapshot-20250409125618",
|
78
|
+
"@medusajs/orchestration": "3.0.0-snapshot-20250409125618",
|
79
|
+
"@medusajs/telemetry": "3.0.0-snapshot-20250409125618",
|
80
|
+
"@medusajs/types": "3.0.0-snapshot-20250409125618",
|
81
|
+
"@medusajs/utils": "3.0.0-snapshot-20250409125618",
|
82
|
+
"@medusajs/workflows-sdk": "3.0.0-snapshot-20250409125618",
|
83
83
|
"@opentelemetry/api": "^1.9.0",
|
84
84
|
"@types/express": "^4.17.17",
|
85
85
|
"chokidar": "^3.4.2",
|
@@ -98,7 +98,7 @@
|
|
98
98
|
"zod": "3.22.4"
|
99
99
|
},
|
100
100
|
"peerDependencies": {
|
101
|
-
"@medusajs/cli": "3.0.0-snapshot-
|
101
|
+
"@medusajs/cli": "3.0.0-snapshot-20250409125618",
|
102
102
|
"@mikro-orm/cli": "6.4.3",
|
103
103
|
"@mikro-orm/core": "6.4.3",
|
104
104
|
"@mikro-orm/knex": "6.4.3",
|