@porulle/plugin-channel-connector 0.57.0 → 0.57.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/service.js +7 -1
- package/package.json +4 -4
- package/src/service.ts +7 -1
package/dist/service.js
CHANGED
|
@@ -1467,7 +1467,13 @@ export class ChannelConnectorService {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
async applyMedia(orgId, entityId, item, variantIds, actor, warnings, owners) {
|
|
1469
1469
|
// Uploads what is missing and PLANS the entity's media links; `commitEntityLinks` writes them.
|
|
1470
|
-
|
|
1470
|
+
//
|
|
1471
|
+
// Only the images the import ruling allows — the SAME `selectImportImages` the page fast path
|
|
1472
|
+
// uses: the hero plus the first photo of each other variant. This path attached EVERY image
|
|
1473
|
+
// the item listed, so the first converge of a product whose price changed pulled in the whole
|
|
1474
|
+
// gallery the fast path had deliberately left out: an upload, an embed and a bump per photo.
|
|
1475
|
+
const selection = selectImportImages(item);
|
|
1476
|
+
const images = selection.hero === null ? [] : [selection.hero, ...selection.perVariant];
|
|
1471
1477
|
const externalIds = [...new Set(images.map((image) => image.externalId).filter((id) => id != null))];
|
|
1472
1478
|
const urlHashes = [...new Set(images.map((image) => hash(image.url)))];
|
|
1473
1479
|
const keyPredicates = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porulle/plugin-channel-connector",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@hono/zod-openapi": "^1.2.2",
|
|
21
21
|
"hono": "^4.12.5",
|
|
22
|
-
"@porulle/core": "0.57.
|
|
22
|
+
"@porulle/core": "0.57.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^24.5.2",
|
|
26
26
|
"eslint": "^9.39.1",
|
|
27
27
|
"typescript": "5.9.2",
|
|
28
28
|
"vitest": "^3.2.4",
|
|
29
|
-
"@porulle/
|
|
30
|
-
"@porulle/
|
|
29
|
+
"@porulle/typescript-config": "0.1.0",
|
|
30
|
+
"@porulle/eslint-config": "0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
package/src/service.ts
CHANGED
|
@@ -2228,7 +2228,13 @@ export class ChannelConnectorService {
|
|
|
2228
2228
|
previousRoles: Map<string, string>;
|
|
2229
2229
|
}>> {
|
|
2230
2230
|
// Uploads what is missing and PLANS the entity's media links; `commitEntityLinks` writes them.
|
|
2231
|
-
|
|
2231
|
+
//
|
|
2232
|
+
// Only the images the import ruling allows — the SAME `selectImportImages` the page fast path
|
|
2233
|
+
// uses: the hero plus the first photo of each other variant. This path attached EVERY image
|
|
2234
|
+
// the item listed, so the first converge of a product whose price changed pulled in the whole
|
|
2235
|
+
// gallery the fast path had deliberately left out: an upload, an embed and a bump per photo.
|
|
2236
|
+
const selection = selectImportImages(item);
|
|
2237
|
+
const images = selection.hero === null ? [] : [selection.hero, ...selection.perVariant];
|
|
2232
2238
|
const externalIds = [...new Set(images.map((image) => image.externalId).filter((id): id is string => id != null))];
|
|
2233
2239
|
const urlHashes = [...new Set(images.map((image) => hash(image.url)))];
|
|
2234
2240
|
const keyPredicates = [];
|