@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.cjs
CHANGED
|
@@ -9924,7 +9924,8 @@ var Transformer = class {
|
|
|
9924
9924
|
return compact(o);
|
|
9925
9925
|
}
|
|
9926
9926
|
game(data) {
|
|
9927
|
-
const
|
|
9927
|
+
const fallback = `${ENDPOINTS.production.static}/images/${data.provider.toLowerCase()}/thumbnail-${objectId.ObjectId.from(data.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
9928
|
+
const images = [data.customImage, data.image, fallback].filter(Boolean).map((url) => {
|
|
9928
9929
|
invariant(url);
|
|
9929
9930
|
return url.includes("?") ? `${url}&cache_id=${IMAGE_CACHE_ID}` : `${url}?cache_id=${IMAGE_CACHE_ID}`;
|
|
9930
9931
|
});
|
|
@@ -9947,6 +9948,7 @@ var Transformer = class {
|
|
|
9947
9948
|
const name = node.displayName?.trim() || node.name;
|
|
9948
9949
|
if (!name) return null;
|
|
9949
9950
|
const fallback = `${ENDPOINTS.production.static}/images/${node.provider.toLowerCase()}/thumbnail-${node.id}.webp`;
|
|
9951
|
+
const fallback2 = `${ENDPOINTS.production.static}/images/${node.provider.toLowerCase()}/thumbnail-${objectId.ObjectId.from(node.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
9950
9952
|
return {
|
|
9951
9953
|
id: node.id,
|
|
9952
9954
|
reference: node.reference,
|
|
@@ -9954,7 +9956,9 @@ var Transformer = class {
|
|
|
9954
9956
|
type: node.type,
|
|
9955
9957
|
provider: node.provider,
|
|
9956
9958
|
images: [
|
|
9957
|
-
...new Set(
|
|
9959
|
+
...new Set(
|
|
9960
|
+
node.image?.url ? [node.image.url, fallback, fallback2] : [fallback, fallback2]
|
|
9961
|
+
)
|
|
9958
9962
|
],
|
|
9959
9963
|
tags: [],
|
|
9960
9964
|
favorite: false
|
|
@@ -10385,11 +10389,12 @@ var Transformer = class {
|
|
|
10385
10389
|
}
|
|
10386
10390
|
topWin__next(data) {
|
|
10387
10391
|
const image = `${ENDPOINTS.production.static}/images/${data.game.provider.toLowerCase()}/thumbnail-${data.game.id}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
10392
|
+
const imageFallback = `${ENDPOINTS.production.static}/images/${data.game.provider.toLowerCase()}/thumbnail-${objectId.ObjectId.from(data.game.id).toString("hex")}.webp?cache_id=${IMAGE_CACHE_ID}`;
|
|
10388
10393
|
return {
|
|
10389
10394
|
id: data.id,
|
|
10390
10395
|
game: {
|
|
10391
10396
|
...data.game,
|
|
10392
|
-
images: [image]
|
|
10397
|
+
images: [image, imageFallback]
|
|
10393
10398
|
},
|
|
10394
10399
|
member: data.member,
|
|
10395
10400
|
multiplier: parseDecimal(data.multiplier, 0),
|