@kalamba/sdk 0.49.0 → 0.49.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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/wrapper.cjs +13 -2
- package/dist/wrapper.d.cts +1 -0
- package/dist/wrapper.d.ts +1 -0
- package/dist/wrapper.js +13 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/wrapper.cjs
CHANGED
|
@@ -365,9 +365,20 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
|
|
|
365
365
|
skipSplash: config.badge.loaderAutoContinue
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
getOperatorConfigRootUrl() {
|
|
369
369
|
const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
|
|
370
|
-
|
|
370
|
+
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") return "https://awscdn.kalamba.net/games/games/";
|
|
371
|
+
const hasMultipleDistributors = [
|
|
372
|
+
".submissions.",
|
|
373
|
+
".dev.",
|
|
374
|
+
".ci."
|
|
375
|
+
].some((env) => hostname.includes(env));
|
|
376
|
+
const url = new URL(window.location.href);
|
|
377
|
+
url.hostname = url.hostname.replace(/^v\./, "").replace(/^play\./, "games.").replace(".ci.", ".dev.");
|
|
378
|
+
return `${url.origin}/games/${hasMultipleDistributors ? "kalamba/" : ""}`;
|
|
379
|
+
}
|
|
380
|
+
async fetchOperatorConfig() {
|
|
381
|
+
const rootUrl = this.getOperatorConfigRootUrl();
|
|
371
382
|
const integration = this.mappedIntegration;
|
|
372
383
|
const brand = this.mappedBrand;
|
|
373
384
|
let config = {};
|
package/dist/wrapper.d.cts
CHANGED
|
@@ -18,6 +18,7 @@ declare class KalambaSdkConfigManager extends SdkConfigManager {
|
|
|
18
18
|
get mappedIntegration(): string;
|
|
19
19
|
get mappedBrand(): string;
|
|
20
20
|
mapUiConfig(config: any): DeepPartial<SdkConfig['ui']>;
|
|
21
|
+
getOperatorConfigRootUrl(): string;
|
|
21
22
|
fetchOperatorConfig(): Promise<DeepPartial<SdkConfig['ui']>>;
|
|
22
23
|
}
|
|
23
24
|
//#endregion
|
package/dist/wrapper.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare class KalambaSdkConfigManager extends SdkConfigManager {
|
|
|
18
18
|
get mappedIntegration(): string;
|
|
19
19
|
get mappedBrand(): string;
|
|
20
20
|
mapUiConfig(config: any): DeepPartial<SdkConfig['ui']>;
|
|
21
|
+
getOperatorConfigRootUrl(): string;
|
|
21
22
|
fetchOperatorConfig(): Promise<DeepPartial<SdkConfig['ui']>>;
|
|
22
23
|
}
|
|
23
24
|
//#endregion
|
package/dist/wrapper.js
CHANGED
|
@@ -364,9 +364,20 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
|
|
|
364
364
|
skipSplash: config.badge.loaderAutoContinue
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
getOperatorConfigRootUrl() {
|
|
368
368
|
const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
|
|
369
|
-
|
|
369
|
+
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") return "https://awscdn.kalamba.net/games/games/";
|
|
370
|
+
const hasMultipleDistributors = [
|
|
371
|
+
".submissions.",
|
|
372
|
+
".dev.",
|
|
373
|
+
".ci."
|
|
374
|
+
].some((env) => hostname.includes(env));
|
|
375
|
+
const url = new URL(window.location.href);
|
|
376
|
+
url.hostname = url.hostname.replace(/^v\./, "").replace(/^play\./, "games.").replace(".ci.", ".dev.");
|
|
377
|
+
return `${url.origin}/games/${hasMultipleDistributors ? "kalamba/" : ""}`;
|
|
378
|
+
}
|
|
379
|
+
async fetchOperatorConfig() {
|
|
380
|
+
const rootUrl = this.getOperatorConfigRootUrl();
|
|
370
381
|
const integration = this.mappedIntegration;
|
|
371
382
|
const brand = this.mappedBrand;
|
|
372
383
|
let config = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalamba/sdk",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"zustand": "5.0.11"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@kalamba/common": "workspace:*",
|
|
44
45
|
"@types/lodash-es": "4.17.12",
|
|
45
46
|
"@types/react": "19.1.6",
|
|
46
47
|
"@types/react-dom": "19.1.6",
|
|
47
48
|
"react": "19.1.0",
|
|
48
49
|
"react-dom": "19.1.0",
|
|
49
50
|
"tsdown": "0.22.3",
|
|
50
|
-
"vitest": "4.1.9"
|
|
51
|
-
"@kalamba/common": "0.1.0"
|
|
51
|
+
"vitest": "4.1.9"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsdown",
|
|
@@ -58,4 +58,4 @@
|
|
|
58
58
|
"test:related": "vitest related --run --passWithNoTests",
|
|
59
59
|
"release": "semantic-release-monorepo"
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|