@opexa/portal-sdk 0.59.116 → 0.59.118
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/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2628,7 +2628,8 @@ var Transformer = class {
|
|
|
2628
2628
|
return compact(o);
|
|
2629
2629
|
}
|
|
2630
2630
|
game(data) {
|
|
2631
|
-
const
|
|
2631
|
+
const fallback = `${ENDPOINTS.production.static}/images/${data.provider.toLowerCase()}/thumbnail-${ObjectId.from(data.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
2632
|
+
const images = [data.customImage, data.image, fallback].filter(Boolean).map((url) => {
|
|
2632
2633
|
invariant(url);
|
|
2633
2634
|
return url.includes("?") ? `${url}&cache_id=${IMAGE_CACHE_ID}` : `${url}?cache_id=${IMAGE_CACHE_ID}`;
|
|
2634
2635
|
});
|
|
@@ -2651,6 +2652,7 @@ var Transformer = class {
|
|
|
2651
2652
|
const name = node.displayName?.trim() || node.name;
|
|
2652
2653
|
if (!name) return null;
|
|
2653
2654
|
const fallback = `${ENDPOINTS.production.static}/images/${node.provider.toLowerCase()}/thumbnail-${node.id}.webp`;
|
|
2655
|
+
const fallback2 = `${ENDPOINTS.production.static}/images/${node.provider.toLowerCase()}/thumbnail-${ObjectId.from(node.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
2654
2656
|
return {
|
|
2655
2657
|
id: node.id,
|
|
2656
2658
|
reference: node.reference,
|
|
@@ -2658,7 +2660,9 @@ var Transformer = class {
|
|
|
2658
2660
|
type: node.type,
|
|
2659
2661
|
provider: node.provider,
|
|
2660
2662
|
images: [
|
|
2661
|
-
...new Set(
|
|
2663
|
+
...new Set(
|
|
2664
|
+
node.image?.url ? [node.image.url, fallback, fallback2] : [fallback, fallback2]
|
|
2665
|
+
)
|
|
2662
2666
|
],
|
|
2663
2667
|
tags: [],
|
|
2664
2668
|
favorite: false
|
|
@@ -3089,11 +3093,12 @@ var Transformer = class {
|
|
|
3089
3093
|
}
|
|
3090
3094
|
topWin__next(data) {
|
|
3091
3095
|
const image = `${ENDPOINTS.production.static}/images/${data.game.provider.toLowerCase()}/thumbnail-${data.game.id}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
3096
|
+
const imageFallback = `${ENDPOINTS.production.static}/images/${data.game.provider.toLowerCase()}/thumbnail-${ObjectId.from(data.game.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
3092
3097
|
return {
|
|
3093
3098
|
id: data.id,
|
|
3094
3099
|
game: {
|
|
3095
3100
|
...data.game,
|
|
3096
|
-
images: [image]
|
|
3101
|
+
images: [image, imageFallback]
|
|
3097
3102
|
},
|
|
3098
3103
|
member: data.member,
|
|
3099
3104
|
multiplier: parseDecimal(data.multiplier, 0),
|