@reactionary/medusa 0.10.24 → 0.10.25
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.
|
@@ -15,6 +15,16 @@ class MedusaCategoryFactory {
|
|
|
15
15
|
const name = data.name;
|
|
16
16
|
const slug = data.handle;
|
|
17
17
|
const text = data.description || "";
|
|
18
|
+
const images = [];
|
|
19
|
+
if (data.metadata) {
|
|
20
|
+
const metaDataImages = data.metadata["images"] || [];
|
|
21
|
+
images.push(...metaDataImages.map((img) => {
|
|
22
|
+
return {
|
|
23
|
+
sourceUrl: img.url,
|
|
24
|
+
altText: name || ""
|
|
25
|
+
};
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
18
28
|
const parentCategory = data.parent_category_id ? { key: data.parent_category?.external_id || "" } : void 0;
|
|
19
29
|
const result = {
|
|
20
30
|
identifier,
|
|
@@ -22,7 +32,7 @@ class MedusaCategoryFactory {
|
|
|
22
32
|
slug,
|
|
23
33
|
text,
|
|
24
34
|
parentCategory,
|
|
25
|
-
images
|
|
35
|
+
images
|
|
26
36
|
};
|
|
27
37
|
return this.categorySchema.parse(result);
|
|
28
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/medusa",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@medusajs/js-sdk": "^2.13.3",
|
|
13
|
-
"@reactionary/core": "0.10.
|
|
13
|
+
"@reactionary/core": "0.10.25",
|
|
14
14
|
"debug": "^4.4.3",
|
|
15
15
|
"@medusajs/types": "^2.13.3",
|
|
16
16
|
"zod": "4.1.9"
|