@series-inc/venus-sdk 3.1.2-beta.2 → 3.2.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-BV_VKgMO.d.mts → AdsApi-DFutZ7_q.d.mts} +2 -4
- package/dist/{AdsApi-BV_VKgMO.d.ts → AdsApi-DFutZ7_q.d.ts} +2 -4
- package/dist/{chunk-G5AFYBIK.mjs → chunk-AGXMORDL.mjs} +9 -32
- package/dist/chunk-AGXMORDL.mjs.map +1 -0
- package/dist/{chunk-3ZNKYBXC.mjs → chunk-UXY5CKKG.mjs} +3 -3
- package/dist/chunk-UXY5CKKG.mjs.map +1 -0
- package/dist/index.cjs +8 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +2 -2
- package/dist/venus-api/index.cjs +7 -30
- 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/dist/webview/index.cjs +1 -1
- package/dist/webview/index.cjs.map +1 -1
- package/dist/webview/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3ZNKYBXC.mjs.map +0 -1
- package/dist/chunk-G5AFYBIK.mjs.map +0 -1
|
@@ -819,8 +819,7 @@ interface LoggingApi {
|
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
interface SharedAssetsApi {
|
|
822
|
-
|
|
823
|
-
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
822
|
+
loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
|
|
824
823
|
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
825
824
|
}
|
|
826
825
|
|
|
@@ -828,8 +827,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
|
828
827
|
private readonly venusApi;
|
|
829
828
|
private readonly rpcClient;
|
|
830
829
|
constructor(rpcClient: RpcClient, venusApi: VenusAPI);
|
|
831
|
-
|
|
832
|
-
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
830
|
+
loadAssetsBundle(game: string, bundleKey: string, fileType?: string): Promise<ArrayBuffer>;
|
|
833
831
|
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
834
832
|
}
|
|
835
833
|
interface LoadEmbeddedAssetsRequest {
|
|
@@ -819,8 +819,7 @@ interface LoggingApi {
|
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
interface SharedAssetsApi {
|
|
822
|
-
|
|
823
|
-
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
822
|
+
loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
|
|
824
823
|
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
825
824
|
}
|
|
826
825
|
|
|
@@ -828,8 +827,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
|
828
827
|
private readonly venusApi;
|
|
829
828
|
private readonly rpcClient;
|
|
830
829
|
constructor(rpcClient: RpcClient, venusApi: VenusAPI);
|
|
831
|
-
|
|
832
|
-
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
830
|
+
loadAssetsBundle(game: string, bundleKey: string, fileType?: string): Promise<ArrayBuffer>;
|
|
833
831
|
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
834
832
|
}
|
|
835
833
|
interface LoadEmbeddedAssetsRequest {
|
|
@@ -3423,7 +3423,7 @@ function initializeTime(venusApi, host) {
|
|
|
3423
3423
|
}
|
|
3424
3424
|
|
|
3425
3425
|
// src/version.ts
|
|
3426
|
-
var SDK_VERSION = "3.
|
|
3426
|
+
var SDK_VERSION = "3.2.0";
|
|
3427
3427
|
|
|
3428
3428
|
// src/shared-assets/embeddedLibrariesManifest.ts
|
|
3429
3429
|
var DEFAULT_SHARED_LIB_CDN_BASE = "https://venus-static-01293ak.web.app/libs";
|
|
@@ -3594,10 +3594,6 @@ function base64ToUtf8(base64) {
|
|
|
3594
3594
|
return decodeURIComponent(escape(result));
|
|
3595
3595
|
}
|
|
3596
3596
|
|
|
3597
|
-
// src/shared-assets/consts.ts
|
|
3598
|
-
var BurgerTimeAssetsCdnPath = "burger-time/Core.stow";
|
|
3599
|
-
var CharacterAssetsCdnPath = "burger-time/Character.stow";
|
|
3600
|
-
|
|
3601
3597
|
// src/shared-assets/RpcSharedAssetsApi.ts
|
|
3602
3598
|
var RpcSharedAssetsApi = class {
|
|
3603
3599
|
constructor(rpcClient, venusApi) {
|
|
@@ -3606,33 +3602,18 @@ var RpcSharedAssetsApi = class {
|
|
|
3606
3602
|
this.rpcClient = rpcClient;
|
|
3607
3603
|
this.venusApi = venusApi;
|
|
3608
3604
|
}
|
|
3609
|
-
async
|
|
3610
|
-
try {
|
|
3611
|
-
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3612
|
-
assetKey: "burgerTimeCoreBundle"
|
|
3613
|
-
});
|
|
3614
|
-
return base64ToArrayBuffer(response.base64Data);
|
|
3615
|
-
} catch (err) {
|
|
3616
|
-
try {
|
|
3617
|
-
const blob = await this.venusApi.cdn.fetchBlob(BurgerTimeAssetsCdnPath);
|
|
3618
|
-
return await blob.arrayBuffer();
|
|
3619
|
-
} catch (e) {
|
|
3620
|
-
throw new Error("Failed to load burgerTimeAssetsBundle");
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
}
|
|
3624
|
-
async loadCharactersBundle() {
|
|
3605
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3625
3606
|
try {
|
|
3626
3607
|
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3627
|
-
assetKey:
|
|
3608
|
+
assetKey: bundleKey
|
|
3628
3609
|
});
|
|
3629
3610
|
return base64ToArrayBuffer(response.base64Data);
|
|
3630
3611
|
} catch (err) {
|
|
3631
3612
|
try {
|
|
3632
|
-
const blob = await this.venusApi.cdn.fetchBlob(
|
|
3613
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3633
3614
|
return await blob.arrayBuffer();
|
|
3634
3615
|
} catch (e) {
|
|
3635
|
-
throw new Error(
|
|
3616
|
+
throw new Error(`Failed to load ${bundleKey}`);
|
|
3636
3617
|
}
|
|
3637
3618
|
}
|
|
3638
3619
|
}
|
|
@@ -3670,12 +3651,8 @@ var MockSharedAssetsApi = class {
|
|
|
3670
3651
|
__publicField(this, "venusApi");
|
|
3671
3652
|
this.venusApi = venusApi;
|
|
3672
3653
|
}
|
|
3673
|
-
async
|
|
3674
|
-
const blob = await this.venusApi.cdn.fetchBlob(
|
|
3675
|
-
return await blob.arrayBuffer();
|
|
3676
|
-
}
|
|
3677
|
-
async loadCharactersBundle() {
|
|
3678
|
-
const blob = await this.venusApi.cdn.fetchBlob(CharacterAssetsCdnPath);
|
|
3654
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3655
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3679
3656
|
return await blob.arrayBuffer();
|
|
3680
3657
|
}
|
|
3681
3658
|
async loadLibraryCode(libraryKey) {
|
|
@@ -5169,5 +5146,5 @@ function initializeSocial(venusApi, host) {
|
|
|
5169
5146
|
}
|
|
5170
5147
|
|
|
5171
5148
|
export { DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, RemoteHost, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createHost, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };
|
|
5172
|
-
//# sourceMappingURL=chunk-
|
|
5173
|
-
//# sourceMappingURL=chunk-
|
|
5149
|
+
//# sourceMappingURL=chunk-AGXMORDL.mjs.map
|
|
5150
|
+
//# sourceMappingURL=chunk-AGXMORDL.mjs.map
|