@series-inc/venus-sdk 3.2.0 → 3.2.1-beta.0
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/{AdsApi-DFutZ7_q.d.mts → AdsApi-or6zfdzM.d.mts} +0 -2
- package/dist/{AdsApi-DFutZ7_q.d.ts → AdsApi-or6zfdzM.d.ts} +0 -2
- package/dist/{chunk-AGXMORDL.mjs → chunk-YOBDYPKZ.mjs} +221 -126
- package/dist/chunk-YOBDYPKZ.mjs.map +1 -0
- package/dist/index.cjs +219 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.mjs +1 -1
- package/dist/venus-api/index.cjs +203 -135
- package/dist/venus-api/index.cjs.map +1 -1
- package/dist/venus-api/index.d.mts +2 -2
- package/dist/venus-api/index.d.ts +2 -2
- package/dist/venus-api/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-AGXMORDL.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2647,21 +2647,23 @@ function initializeRoomsApi(venusApi, host) {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
|
|
2649
2649
|
// src/storage/MockStorageApi.ts
|
|
2650
|
+
var STORAGE_PREFIXES = {
|
|
2651
|
+
globalStorage: "venus:global",
|
|
2652
|
+
deviceCache: "venus:deviceCache",
|
|
2653
|
+
appStorage: "venus:appStorage"
|
|
2654
|
+
};
|
|
2650
2655
|
function createMockStorageApi(storageType, appUrl) {
|
|
2651
2656
|
const appIdentifier = appUrl ? generateAppIdentifier(appUrl) : null;
|
|
2652
|
-
let prefix;
|
|
2657
|
+
let prefix = STORAGE_PREFIXES[storageType];
|
|
2653
2658
|
let syncDelay = 0;
|
|
2654
2659
|
switch (storageType) {
|
|
2655
2660
|
case "deviceCache":
|
|
2656
|
-
prefix = "venus:app";
|
|
2657
2661
|
syncDelay = 0;
|
|
2658
2662
|
break;
|
|
2659
2663
|
case "appStorage":
|
|
2660
|
-
prefix = "venus:app";
|
|
2661
2664
|
syncDelay = 100;
|
|
2662
2665
|
break;
|
|
2663
2666
|
case "globalStorage":
|
|
2664
|
-
prefix = "venus:global";
|
|
2665
2667
|
syncDelay = 100;
|
|
2666
2668
|
break;
|
|
2667
2669
|
default:
|
|
@@ -2674,29 +2676,38 @@ var MockStorageApi = class {
|
|
|
2674
2676
|
constructor(prefix, syncDelay) {
|
|
2675
2677
|
__publicField(this, "prefix");
|
|
2676
2678
|
__publicField(this, "syncDelay");
|
|
2679
|
+
__publicField(this, "orderStorageKey");
|
|
2677
2680
|
this.prefix = prefix;
|
|
2678
2681
|
this.syncDelay = syncDelay;
|
|
2682
|
+
this.orderStorageKey = `${prefix}__order__`;
|
|
2679
2683
|
}
|
|
2680
2684
|
async clear() {
|
|
2685
|
+
const keysToRemove = [];
|
|
2681
2686
|
const fullLength = localStorage.length;
|
|
2682
2687
|
for (let i = 0; i < fullLength; i++) {
|
|
2683
2688
|
const fullKey = localStorage.key(i);
|
|
2684
|
-
if (fullKey
|
|
2685
|
-
|
|
2689
|
+
if (!fullKey || fullKey === this.orderStorageKey) {
|
|
2690
|
+
continue;
|
|
2686
2691
|
}
|
|
2692
|
+
if (fullKey.startsWith(this.prefix)) {
|
|
2693
|
+
keysToRemove.push(fullKey);
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
for (const key of keysToRemove) {
|
|
2697
|
+
localStorage.removeItem(key);
|
|
2687
2698
|
}
|
|
2699
|
+
this.clearOrder();
|
|
2688
2700
|
await this.simulateSyncDelay();
|
|
2689
2701
|
}
|
|
2690
2702
|
async getAllItems() {
|
|
2691
2703
|
const items = new Array();
|
|
2692
|
-
const
|
|
2693
|
-
for (
|
|
2694
|
-
const
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
}
|
|
2704
|
+
const orderedKeys = this.keys();
|
|
2705
|
+
for (const key of orderedKeys) {
|
|
2706
|
+
const value = localStorage.getItem(this.buildKey(key));
|
|
2707
|
+
if (value !== null) {
|
|
2708
|
+
items.push(value);
|
|
2709
|
+
} else {
|
|
2710
|
+
this.removeFromOrder(key);
|
|
2700
2711
|
}
|
|
2701
2712
|
}
|
|
2702
2713
|
return items;
|
|
@@ -2721,11 +2732,13 @@ var MockStorageApi = class {
|
|
|
2721
2732
|
const fullKey = this.buildKey(key);
|
|
2722
2733
|
await this.simulateSyncDelay();
|
|
2723
2734
|
localStorage.removeItem(fullKey);
|
|
2735
|
+
this.removeFromOrder(key);
|
|
2724
2736
|
}
|
|
2725
2737
|
async setItem(key, item) {
|
|
2726
2738
|
const fullKey = this.buildKey(key);
|
|
2727
2739
|
await this.simulateSyncDelay();
|
|
2728
2740
|
localStorage.setItem(fullKey, item);
|
|
2741
|
+
this.upsertOrder(key);
|
|
2729
2742
|
}
|
|
2730
2743
|
async setMultipleItems(entries) {
|
|
2731
2744
|
for (const entry of entries) {
|
|
@@ -2733,6 +2746,7 @@ var MockStorageApi = class {
|
|
|
2733
2746
|
localStorage.setItem(fullKey, entry.value);
|
|
2734
2747
|
}
|
|
2735
2748
|
await this.simulateSyncDelay();
|
|
2749
|
+
this.bulkUpsertOrder(entries.map((entry) => entry.key));
|
|
2736
2750
|
}
|
|
2737
2751
|
async removeMultipleItems(keys) {
|
|
2738
2752
|
for (const key of keys) {
|
|
@@ -2740,6 +2754,7 @@ var MockStorageApi = class {
|
|
|
2740
2754
|
localStorage.removeItem(fullKey);
|
|
2741
2755
|
}
|
|
2742
2756
|
await this.simulateSyncDelay();
|
|
2757
|
+
this.bulkRemoveFromOrder(keys);
|
|
2743
2758
|
}
|
|
2744
2759
|
buildKey(key) {
|
|
2745
2760
|
const prefix = this.prefix;
|
|
@@ -2750,17 +2765,8 @@ var MockStorageApi = class {
|
|
|
2750
2765
|
return fullKey.substring(prefix.length);
|
|
2751
2766
|
}
|
|
2752
2767
|
keys() {
|
|
2753
|
-
const
|
|
2754
|
-
|
|
2755
|
-
for (let i = 0; i < length; i++) {
|
|
2756
|
-
const fullKey = localStorage.key(i);
|
|
2757
|
-
if (fullKey && fullKey.startsWith(this.prefix)) {
|
|
2758
|
-
length++;
|
|
2759
|
-
const key = this.extractKey(fullKey);
|
|
2760
|
-
keys.push(key);
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
return keys;
|
|
2768
|
+
const order = this.readOrder();
|
|
2769
|
+
return [...order];
|
|
2764
2770
|
}
|
|
2765
2771
|
async simulateSyncDelay() {
|
|
2766
2772
|
const syncDelay = this.syncDelay;
|
|
@@ -2768,6 +2774,127 @@ var MockStorageApi = class {
|
|
|
2768
2774
|
await new Promise((resolve) => setTimeout(resolve, syncDelay));
|
|
2769
2775
|
}
|
|
2770
2776
|
}
|
|
2777
|
+
readOrder() {
|
|
2778
|
+
const raw = localStorage.getItem(this.orderStorageKey);
|
|
2779
|
+
if (!raw) {
|
|
2780
|
+
return this.rebuildOrderFromStorage();
|
|
2781
|
+
}
|
|
2782
|
+
try {
|
|
2783
|
+
const parsed = JSON.parse(raw);
|
|
2784
|
+
if (Array.isArray(parsed)) {
|
|
2785
|
+
return this.normalizeOrder(parsed);
|
|
2786
|
+
}
|
|
2787
|
+
} catch {
|
|
2788
|
+
}
|
|
2789
|
+
return this.rebuildOrderFromStorage();
|
|
2790
|
+
}
|
|
2791
|
+
normalizeOrder(order) {
|
|
2792
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2793
|
+
const normalized = [];
|
|
2794
|
+
let changed = false;
|
|
2795
|
+
for (const entry of order) {
|
|
2796
|
+
if (typeof entry !== "string") {
|
|
2797
|
+
changed = true;
|
|
2798
|
+
continue;
|
|
2799
|
+
}
|
|
2800
|
+
if (seen.has(entry)) {
|
|
2801
|
+
changed = true;
|
|
2802
|
+
continue;
|
|
2803
|
+
}
|
|
2804
|
+
const fullKey = this.buildKey(entry);
|
|
2805
|
+
if (localStorage.getItem(fullKey) === null) {
|
|
2806
|
+
changed = true;
|
|
2807
|
+
continue;
|
|
2808
|
+
}
|
|
2809
|
+
seen.add(entry);
|
|
2810
|
+
normalized.push(entry);
|
|
2811
|
+
}
|
|
2812
|
+
if (changed) {
|
|
2813
|
+
this.writeOrder(normalized);
|
|
2814
|
+
}
|
|
2815
|
+
return normalized;
|
|
2816
|
+
}
|
|
2817
|
+
rebuildOrderFromStorage() {
|
|
2818
|
+
const keys = [];
|
|
2819
|
+
const total = localStorage.length;
|
|
2820
|
+
for (let i = 0; i < total; i++) {
|
|
2821
|
+
const fullKey = localStorage.key(i);
|
|
2822
|
+
if (!fullKey) continue;
|
|
2823
|
+
if (fullKey === this.orderStorageKey) continue;
|
|
2824
|
+
if (fullKey.startsWith(this.prefix)) {
|
|
2825
|
+
keys.push(this.extractKey(fullKey));
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
this.writeOrder(keys);
|
|
2829
|
+
return keys;
|
|
2830
|
+
}
|
|
2831
|
+
upsertOrder(key) {
|
|
2832
|
+
const order = this.readOrder();
|
|
2833
|
+
const index = order.indexOf(key);
|
|
2834
|
+
if (index !== -1) {
|
|
2835
|
+
order.splice(index, 1);
|
|
2836
|
+
}
|
|
2837
|
+
order.push(key);
|
|
2838
|
+
this.writeOrder(order);
|
|
2839
|
+
}
|
|
2840
|
+
bulkUpsertOrder(keys) {
|
|
2841
|
+
const dedupedKeys = this.dedupeKeys(keys);
|
|
2842
|
+
if (dedupedKeys.length === 0) {
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2845
|
+
const order = this.readOrder();
|
|
2846
|
+
const keysSet = new Set(dedupedKeys);
|
|
2847
|
+
const filtered = order.filter((entry) => !keysSet.has(entry));
|
|
2848
|
+
for (const key of dedupedKeys) {
|
|
2849
|
+
filtered.push(key);
|
|
2850
|
+
}
|
|
2851
|
+
this.writeOrder(filtered);
|
|
2852
|
+
}
|
|
2853
|
+
removeFromOrder(key) {
|
|
2854
|
+
const order = this.readOrder();
|
|
2855
|
+
const index = order.indexOf(key);
|
|
2856
|
+
if (index !== -1) {
|
|
2857
|
+
order.splice(index, 1);
|
|
2858
|
+
this.writeOrder(order);
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
bulkRemoveFromOrder(keys) {
|
|
2862
|
+
const dedupedKeys = this.dedupeKeys(keys);
|
|
2863
|
+
if (dedupedKeys.length === 0) {
|
|
2864
|
+
return;
|
|
2865
|
+
}
|
|
2866
|
+
const order = this.readOrder();
|
|
2867
|
+
const keysSet = new Set(dedupedKeys);
|
|
2868
|
+
const filtered = order.filter((entry) => !keysSet.has(entry));
|
|
2869
|
+
if (filtered.length !== order.length) {
|
|
2870
|
+
this.writeOrder(filtered);
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
writeOrder(order) {
|
|
2874
|
+
if (order.length === 0) {
|
|
2875
|
+
localStorage.removeItem(this.orderStorageKey);
|
|
2876
|
+
return;
|
|
2877
|
+
}
|
|
2878
|
+
localStorage.setItem(this.orderStorageKey, JSON.stringify(order));
|
|
2879
|
+
}
|
|
2880
|
+
clearOrder() {
|
|
2881
|
+
localStorage.removeItem(this.orderStorageKey);
|
|
2882
|
+
}
|
|
2883
|
+
dedupeKeys(keys) {
|
|
2884
|
+
const result = [];
|
|
2885
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2886
|
+
for (const key of keys) {
|
|
2887
|
+
if (typeof key !== "string") {
|
|
2888
|
+
continue;
|
|
2889
|
+
}
|
|
2890
|
+
if (seen.has(key)) {
|
|
2891
|
+
continue;
|
|
2892
|
+
}
|
|
2893
|
+
seen.add(key);
|
|
2894
|
+
result.push(key);
|
|
2895
|
+
}
|
|
2896
|
+
return result;
|
|
2897
|
+
}
|
|
2771
2898
|
};
|
|
2772
2899
|
function generateAppIdentifier(appUrl) {
|
|
2773
2900
|
if (!appUrl) appUrl = "";
|
|
@@ -3438,7 +3565,72 @@ function initializeTime(venusApi, host) {
|
|
|
3438
3565
|
}
|
|
3439
3566
|
|
|
3440
3567
|
// src/version.ts
|
|
3441
|
-
var SDK_VERSION = "3.2.0";
|
|
3568
|
+
var SDK_VERSION = "3.2.1-beta.0";
|
|
3569
|
+
|
|
3570
|
+
// src/shared-assets/base64Utils.ts
|
|
3571
|
+
function base64ToArrayBuffer(base64) {
|
|
3572
|
+
const binaryString = atob(base64);
|
|
3573
|
+
const len = binaryString.length;
|
|
3574
|
+
const bytes = new Uint8Array(len);
|
|
3575
|
+
for (let i = 0; i < len; i++) {
|
|
3576
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
3577
|
+
}
|
|
3578
|
+
return bytes.buffer;
|
|
3579
|
+
}
|
|
3580
|
+
function base64ToUtf8(base64) {
|
|
3581
|
+
if (typeof TextDecoder !== "undefined") {
|
|
3582
|
+
const decoder = new TextDecoder("utf-8");
|
|
3583
|
+
const buffer = base64ToArrayBuffer(base64);
|
|
3584
|
+
return decoder.decode(new Uint8Array(buffer));
|
|
3585
|
+
}
|
|
3586
|
+
if (typeof globalThis !== "undefined" && typeof globalThis.Buffer !== "undefined") {
|
|
3587
|
+
const BufferCtor = globalThis.Buffer;
|
|
3588
|
+
return BufferCtor.from(base64, "base64").toString("utf-8");
|
|
3589
|
+
}
|
|
3590
|
+
const binaryString = atob(base64);
|
|
3591
|
+
let result = "";
|
|
3592
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
3593
|
+
result += String.fromCharCode(binaryString.charCodeAt(i));
|
|
3594
|
+
}
|
|
3595
|
+
return decodeURIComponent(escape(result));
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
// src/shared-assets/RpcSharedAssetsApi.ts
|
|
3599
|
+
var RpcSharedAssetsApi = class {
|
|
3600
|
+
constructor(rpcClient, venusApi) {
|
|
3601
|
+
__publicField(this, "venusApi");
|
|
3602
|
+
__publicField(this, "rpcClient");
|
|
3603
|
+
this.rpcClient = rpcClient;
|
|
3604
|
+
this.venusApi = venusApi;
|
|
3605
|
+
}
|
|
3606
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3607
|
+
try {
|
|
3608
|
+
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3609
|
+
assetKey: bundleKey
|
|
3610
|
+
});
|
|
3611
|
+
return base64ToArrayBuffer(response.base64Data);
|
|
3612
|
+
} catch (err) {
|
|
3613
|
+
try {
|
|
3614
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3615
|
+
return await blob.arrayBuffer();
|
|
3616
|
+
} catch (e) {
|
|
3617
|
+
throw new Error(`Failed to load ${bundleKey}`);
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
};
|
|
3622
|
+
|
|
3623
|
+
// src/shared-assets/MockSharedAssetsApi.ts
|
|
3624
|
+
var MockSharedAssetsApi = class {
|
|
3625
|
+
constructor(venusApi) {
|
|
3626
|
+
__publicField(this, "venusApi");
|
|
3627
|
+
this.venusApi = venusApi;
|
|
3628
|
+
}
|
|
3629
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3630
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3631
|
+
return await blob.arrayBuffer();
|
|
3632
|
+
}
|
|
3633
|
+
};
|
|
3442
3634
|
|
|
3443
3635
|
// src/shared-assets/embeddedLibrariesManifest.ts
|
|
3444
3636
|
var DEFAULT_SHARED_LIB_CDN_BASE = "https://venus-static-01293ak.web.app/libs";
|
|
@@ -3581,103 +3773,6 @@ function getLibraryDefinition(libraryKey) {
|
|
|
3581
3773
|
return definition;
|
|
3582
3774
|
}
|
|
3583
3775
|
|
|
3584
|
-
// src/shared-assets/base64Utils.ts
|
|
3585
|
-
function base64ToArrayBuffer(base64) {
|
|
3586
|
-
const binaryString = atob(base64);
|
|
3587
|
-
const len = binaryString.length;
|
|
3588
|
-
const bytes = new Uint8Array(len);
|
|
3589
|
-
for (let i = 0; i < len; i++) {
|
|
3590
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
3591
|
-
}
|
|
3592
|
-
return bytes.buffer;
|
|
3593
|
-
}
|
|
3594
|
-
function base64ToUtf8(base64) {
|
|
3595
|
-
if (typeof TextDecoder !== "undefined") {
|
|
3596
|
-
const decoder = new TextDecoder("utf-8");
|
|
3597
|
-
const buffer = base64ToArrayBuffer(base64);
|
|
3598
|
-
return decoder.decode(new Uint8Array(buffer));
|
|
3599
|
-
}
|
|
3600
|
-
if (typeof globalThis !== "undefined" && typeof globalThis.Buffer !== "undefined") {
|
|
3601
|
-
const BufferCtor = globalThis.Buffer;
|
|
3602
|
-
return BufferCtor.from(base64, "base64").toString("utf-8");
|
|
3603
|
-
}
|
|
3604
|
-
const binaryString = atob(base64);
|
|
3605
|
-
let result = "";
|
|
3606
|
-
for (let i = 0; i < binaryString.length; i++) {
|
|
3607
|
-
result += String.fromCharCode(binaryString.charCodeAt(i));
|
|
3608
|
-
}
|
|
3609
|
-
return decodeURIComponent(escape(result));
|
|
3610
|
-
}
|
|
3611
|
-
|
|
3612
|
-
// src/shared-assets/RpcSharedAssetsApi.ts
|
|
3613
|
-
var RpcSharedAssetsApi = class {
|
|
3614
|
-
constructor(rpcClient, venusApi) {
|
|
3615
|
-
__publicField(this, "venusApi");
|
|
3616
|
-
__publicField(this, "rpcClient");
|
|
3617
|
-
this.rpcClient = rpcClient;
|
|
3618
|
-
this.venusApi = venusApi;
|
|
3619
|
-
}
|
|
3620
|
-
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3621
|
-
try {
|
|
3622
|
-
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3623
|
-
assetKey: bundleKey
|
|
3624
|
-
});
|
|
3625
|
-
return base64ToArrayBuffer(response.base64Data);
|
|
3626
|
-
} catch (err) {
|
|
3627
|
-
try {
|
|
3628
|
-
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3629
|
-
return await blob.arrayBuffer();
|
|
3630
|
-
} catch (e) {
|
|
3631
|
-
throw new Error(`Failed to load ${bundleKey}`);
|
|
3632
|
-
}
|
|
3633
|
-
}
|
|
3634
|
-
}
|
|
3635
|
-
async loadLibraryCode(libraryKey) {
|
|
3636
|
-
const definition = getLibraryDefinition(libraryKey);
|
|
3637
|
-
try {
|
|
3638
|
-
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3639
|
-
assetKey: definition.assetKey
|
|
3640
|
-
});
|
|
3641
|
-
return base64ToUtf8(response.base64Data);
|
|
3642
|
-
} catch (err) {
|
|
3643
|
-
console.error(
|
|
3644
|
-
`[Venus Libraries] Failed to load ${libraryKey} from host via RPC:`,
|
|
3645
|
-
err
|
|
3646
|
-
);
|
|
3647
|
-
console.warn(
|
|
3648
|
-
`[Venus Libraries] Falling back to CDN for ${libraryKey}. This may indicate an asset packaging issue.`
|
|
3649
|
-
);
|
|
3650
|
-
try {
|
|
3651
|
-
const cdnUrl = this.venusApi.cdn.resolveSharedLibUrl(definition.cdnPath);
|
|
3652
|
-
const response = await this.venusApi.cdn.fetchFromCdn(cdnUrl);
|
|
3653
|
-
return await response.text();
|
|
3654
|
-
} catch (cdnError) {
|
|
3655
|
-
throw new Error(
|
|
3656
|
-
`Failed to load embedded library ${libraryKey}: RPC failed, CDN fallback failed: ${cdnError.message}`
|
|
3657
|
-
);
|
|
3658
|
-
}
|
|
3659
|
-
}
|
|
3660
|
-
}
|
|
3661
|
-
};
|
|
3662
|
-
|
|
3663
|
-
// src/shared-assets/MockSharedAssetsApi.ts
|
|
3664
|
-
var MockSharedAssetsApi = class {
|
|
3665
|
-
constructor(venusApi) {
|
|
3666
|
-
__publicField(this, "venusApi");
|
|
3667
|
-
this.venusApi = venusApi;
|
|
3668
|
-
}
|
|
3669
|
-
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3670
|
-
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3671
|
-
return await blob.arrayBuffer();
|
|
3672
|
-
}
|
|
3673
|
-
async loadLibraryCode(libraryKey) {
|
|
3674
|
-
const definition = getLibraryDefinition(libraryKey);
|
|
3675
|
-
const url = this.venusApi.cdn.resolveSharedLibUrl(definition.cdnPath);
|
|
3676
|
-
const response = await this.venusApi.cdn.fetchFromCdn(url);
|
|
3677
|
-
return await response.text();
|
|
3678
|
-
}
|
|
3679
|
-
};
|
|
3680
|
-
|
|
3681
3776
|
// src/leaderboard/utils.ts
|
|
3682
3777
|
var HASH_ALGORITHM_WEB_CRYPTO = "SHA-256";
|
|
3683
3778
|
var HASH_ALGORITHM_NODE = "sha256";
|
|
@@ -5113,7 +5208,7 @@ var RemoteHost = class {
|
|
|
5113
5208
|
5e3
|
|
5114
5209
|
);
|
|
5115
5210
|
transport.instanceId = response.instanceId;
|
|
5116
|
-
this.log(`Remote Host Initialized with id: ${transport.instanceId}`);
|
|
5211
|
+
this.log(`Remote Host Initialized with id: ${transport.instanceId}, response: ${JSON.stringify(response)}`);
|
|
5117
5212
|
const profile = response.profile;
|
|
5118
5213
|
const sanitizedProfile = {
|
|
5119
5214
|
id: profile.id,
|