@series-inc/rundot-game-sdk 5.14.2 → 5.14.3-beta.migration-test
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-SXR3OJBu.d.ts → AdsApi-CaRKU_iI.d.ts} +19 -7
- package/dist/{chunk-V2WWIX4C.js → chunk-BQPNVJYG.js} +107 -60
- package/dist/chunk-BQPNVJYG.js.map +1 -0
- package/dist/{chunk-KJQHROY6.js → chunk-BWJ34LKD.js} +4 -4
- package/dist/chunk-BWJ34LKD.js.map +1 -0
- package/dist/{chunk-QEIRJ4K6.js → chunk-XS3XSIG7.js} +235 -103
- package/dist/chunk-XS3XSIG7.js.map +1 -0
- package/dist/index.d.ts +64 -3
- package/dist/index.js +3 -3
- package/dist/rundot-game-api/index.d.ts +2 -2
- package/dist/rundot-game-api/index.js +13 -13
- package/dist/rundot-game-api/index.js.map +1 -1
- package/dist/sandbox/index.js +103 -63
- package/dist/sandbox/index.js.map +1 -1
- package/dist/vite/{dev-server-VY6THR4O.js → dev-server-SV76ANVO.js} +3 -3
- package/dist/vite/{dev-server-VY6THR4O.js.map → dev-server-SV76ANVO.js.map} +1 -1
- package/dist/vite/index.css +1 -1
- package/dist/vite/index.css.map +1 -1
- package/dist/vite/index.js +56 -50
- package/dist/vite/index.js.map +1 -1
- package/dist/webview/index.js +1 -1
- package/package.json +1 -3
- package/dist/chunk-KJQHROY6.js.map +0 -1
- package/dist/chunk-QEIRJ4K6.js.map +0 -1
- package/dist/chunk-V2WWIX4C.js.map +0 -1
|
@@ -138,8 +138,12 @@ interface InboundMethodIds {
|
|
|
138
138
|
declare class RpcInboundStorageApi implements InboundStorageApi {
|
|
139
139
|
private readonly rpcClient;
|
|
140
140
|
private readonly methodIds;
|
|
141
|
-
private readonly
|
|
142
|
-
constructor(rpcClient: RpcClient, methodIds: InboundMethodIds,
|
|
141
|
+
private readonly scope;
|
|
142
|
+
constructor(rpcClient: RpcClient, methodIds: InboundMethodIds, scope: {
|
|
143
|
+
targetAppId?: string;
|
|
144
|
+
namespace: string;
|
|
145
|
+
});
|
|
146
|
+
private body;
|
|
143
147
|
listSources(): Promise<string[]>;
|
|
144
148
|
getAllFromSource(sourceAppId: string): Promise<Record<string, string>>;
|
|
145
149
|
get(sourceAppId: string, key: string): Promise<string | null>;
|
|
@@ -1365,6 +1369,14 @@ interface UgcEntry {
|
|
|
1365
1369
|
tags?: string[];
|
|
1366
1370
|
useCount?: number;
|
|
1367
1371
|
likeCount?: number;
|
|
1372
|
+
status?: 'active' | 'removed' | 'quarantined';
|
|
1373
|
+
quarantine?: {
|
|
1374
|
+
source: 'auto_moderation' | 'user_reports';
|
|
1375
|
+
reason: string;
|
|
1376
|
+
category?: string;
|
|
1377
|
+
at: number;
|
|
1378
|
+
};
|
|
1379
|
+
reportCount?: number;
|
|
1368
1380
|
}
|
|
1369
1381
|
interface UgcCreateParams {
|
|
1370
1382
|
contentType: string;
|
|
@@ -2121,11 +2133,11 @@ interface AttributionApi {
|
|
|
2121
2133
|
*/
|
|
2122
2134
|
interface SharedStorageHostApi {
|
|
2123
2135
|
open(input: {
|
|
2124
|
-
appId
|
|
2136
|
+
appId?: string;
|
|
2125
2137
|
namespace: string;
|
|
2126
2138
|
}): StorageApi;
|
|
2127
2139
|
read(input: {
|
|
2128
|
-
appId
|
|
2140
|
+
appId?: string;
|
|
2129
2141
|
namespace: string;
|
|
2130
2142
|
}): InboundStorageApi;
|
|
2131
2143
|
}
|
|
@@ -2593,11 +2605,11 @@ interface RundotGameAPI {
|
|
|
2593
2605
|
*/
|
|
2594
2606
|
sharedStorage: {
|
|
2595
2607
|
open(input: {
|
|
2596
|
-
appId
|
|
2608
|
+
appId?: string;
|
|
2597
2609
|
namespace: string;
|
|
2598
2610
|
}): StorageApi;
|
|
2599
2611
|
read(input: {
|
|
2600
|
-
appId
|
|
2612
|
+
appId?: string;
|
|
2601
2613
|
namespace: string;
|
|
2602
2614
|
}): InboundStorageApi;
|
|
2603
2615
|
};
|
|
@@ -2710,4 +2722,4 @@ interface AdsApi {
|
|
|
2710
2722
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
2711
2723
|
}
|
|
2712
2724
|
|
|
2713
|
-
export { type GetFutureTimeOptions as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type PopupsApi as F, type ShowToastOptions as G, type Host as H, type ShowInterstitialAdOptions as I, type ShowRewardedAdOptions as J, type ProfileApi as K, type DeviceApi as L, type DeviceInfo as M, type NavigationApi as N, type EnvironmentApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type
|
|
2725
|
+
export { type GetFutureTimeOptions as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type PopupsApi as F, type ShowToastOptions as G, type Host as H, type ShowInterstitialAdOptions as I, type ShowRewardedAdOptions as J, type ProfileApi as K, type DeviceApi as L, type DeviceInfo as M, type NavigationApi as N, type EnvironmentApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type EnvironmentInfo as T, type SystemApi as U, type SafeArea as V, type CdnApi as W, type FetchFromCdnOptions as X, type AssetUrlResult as Y, type TimeApi as Z, type ServerTimeData as _, type RecipeRequirementQuery as a, type OpenStoreResult as a$, type AiApi as a0, type AiChatCompletionRequest as a1, type AiChatCompletionData as a2, type HapticsApi as a3, HapticFeedbackStyle as a4, type FeaturesApi as a5, type Experiment as a6, type LifecycleApi as a7, type SleepCallback as a8, type Subscription as a9, type GetBatchRecipeRequirements as aA, type TriggerRecipeChainOptions as aB, type RoomDataUpdate as aC, type RoomMessageEvent as aD, type ProposedMoveEvent as aE, RundotGameTransport as aF, type RoomsApi as aG, type CreateRoomOptions as aH, type JoinOrCreateRoomOptions as aI, type JoinOrCreateResult as aJ, type ListRoomsOptions as aK, type UpdateRoomDataOptions as aL, type RoomMessageRequest as aM, type StartRoomGameOptions as aN, type ProposeMoveRequest as aO, type ProposeMoveResult as aP, type ValidateMoveVerdict as aQ, type ValidateMoveResult as aR, type RoomSubscriptionOptions as aS, type LoggingApi as aT, type IapApi as aU, type SpendCurrencyOptions as aV, type SpendCurrencyResult as aW, type SubscriptionTier as aX, type RunSubscriptionsResponse as aY, type SubscriptionInterval as aZ, type PurchaseSubscriptionResponse as a_, type AwakeCallback as aa, type PauseCallback as ab, type ResumeCallback as ac, type QuitCallback as ad, type BackButtonCallback as ae, type SimulationApi as af, type SimulationSlotValidationResult as ag, type SimulationBatchOperation as ah, type SimulationBatchOperationsResult as ai, type SimulationAvailableItem as aj, type SimulationPowerPreview as ak, type SimulationSlotMutationResult as al, type SimulationSlotContainer as am, type SimulationAssignment as an, type SimulationState as ao, type ExecuteRecipeOptions as ap, type ExecuteRecipeResponse as aq, type CollectRecipeResult as ar, type ResetStateOptions as as, type ResetStateResult as at, type GetActiveRunsOptions as au, type ExecuteScopedRecipeOptions as av, type ExecuteScopedRecipeResult as aw, type GetAvailableRecipesOptions as ax, type GetAvailableRecipesResult as ay, type Recipe as az, type RecipeRequirementResult as b, type Asset as b$, type LoadEmbeddedAssetsResponse as b0, type SharedAssetsApi as b1, type LeaderboardApi as b2, type ScoreToken as b3, type SubmitScoreParams as b4, type SubmitScoreResult as b5, type GetPagedScoresOptions as b6, type PagedScoresResponse as b7, type PlayerRankOptions as b8, type PlayerRankResult as b9, type AppRole as bA, type AdminUgcBrowseParams as bB, type AdminUgcBrowseResponse as bC, type AdminUgcListReportsParams as bD, type AdminUgcListReportsResponse as bE, type AdminUgcResolveAction as bF, type AdminImageGenBrowseParams as bG, type AdminImageGenBrowseResponse as bH, type AdminImageGenListReportsParams as bI, type AdminImageGenListReportsResponse as bJ, type AdminImageGenResolveAction as bK, type Avatar3dApi as bL, type AssetManifest as bM, type Avatar3dConfig as bN, type ShowEditorOptions as bO, type Avatar3dEdits as bP, type AdsApi as bQ, type ImageGenParams as bR, type ImageGenResult as bS, type SharedStorageHostApi as bT, type MultiplayerApi as bU, type AttributionApi as bV, type InitializationContext as bW, type InitializationOptions as bX, AccessDeniedError as bY, type AdminUgcEntry as bZ, type AiMessage as b_, type GetPodiumScoresOptions as ba, type PodiumScoresResponse as bb, type PreloaderApi as bc, type SocialApi as bd, type ShareMetadata as be, type ShareLinkResult as bf, type SocialQRCodeOptions as bg, type QRCodeResult as bh, type ShareClickData as bi, type EntitlementApi as bj, type Entitlement as bk, type LedgerEntry as bl, type ShopApi as bm, type StorefrontResponse as bn, type StorefrontItem as bo, type ShopPurchaseResponse as bp, type ShopOrderHistoryResponse as bq, type PromptLoginResult as br, type AccessTier as bs, type AccessGateApi as bt, type ImageGenApi as bu, type UgcApi as bv, type VideoApi as bw, type AppApi as bx, type AdminUgcApi as by, type AdminImageGenApi as bz, type RundotGameAvailableRecipe as c, type Category as c0, type ConnectionState as c1, type GetSubscriptionsForTierRequest as c2, type HudInsets as c3, type ImageGenEntry as c4, type ImageGenModel as c5, type ImageGenReport as c6, type InboundForKeyEntry as c7, type InboundMethodIds as c8, type InboundStorageApi as c9, type RoomMessagePayload as cA, type RoomsEnvelopeResponse as cB, RpcInboundStorageApi as cC, RpcSharedAssetsApi as cD, type RpcTransport as cE, type RunSubscription as cF, type RundotGameRoomCustomMetadata as cG, type RundotGameRoomPayload as cH, type RundotGameRoomRules as cI, type RundotGameRoomRulesGameState as cJ, type ServerPlayer as cK, type ServerRoom as cL, type ShopOrder as cM, type SimulationBatchOperationAssign as cN, type SimulationBatchOperationRemove as cO, type SimulationBatchOperationResult as cP, type SimulationPersonalState as cQ, type SimulationRoomActiveRecipe as cR, type SimulationRoomState as cS, type StorefrontCollection as cT, type StorefrontCollectionItem as cU, type SubPath as cV, type TimeIntervalTriggerInput as cW, type UgcReport as cX, createHost as cY, resolveCollectionItemPrice as cZ, type IsPlayerSubscribedRequest as ca, type JoinOrCreateRoomEnvelopeResponse as cb, type JoinRoomMatchCriteria as cc, type LeaderboardAntiCheatConfig as cd, type LeaderboardConfig as ce, type LeaderboardDisplaySettings as cf, type LeaderboardEntry as cg, type LeaderboardModeConfig as ch, type LeaderboardPeriodConfig as ci, type LeaderboardPeriodType as cj, type LoadEmbeddedAssetsRequest as ck, MockAvatarApi as cl, type NotificationTriggerInput as cm, type OnNotificationCallback as cn, type OnRequestCallback as co, type OnResponseCallback as cp, type PodiumScoresContext as cq, type ProposedMovePayload as cr, type Protocol as cs, type PurchaseSubscriptionRequest as ct, ROOM_GAME_PHASES as cu, type RecipeInfo as cv, type RoomEnvelopeResponse as cw, type RoomEvents as cx, type RoomGamePhase as cy, type RoomMessageEventType as cz, type RundotGameCollectRecipeResult as d, type RundotGameExecuteRecipeOptions as e, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateId, MockAdminUgcApi, MockAdminImageGenApi, RpcAdsApi, RpcAnalyticsApi, RpcStorageApi, RpcInboundStorageApi, RpcAvatarApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, HostProfileApi, HostDeviceApi, HostEnvironmentApi, HostSystemApi, HostCdnApi, HostTimeApi, RpcHapticsApi, RpcFeaturesApi, RpcLifecycleApi, RpcRoomsApi, RpcLoggingApi, RpcIapApi, RpcPreloaderApi, RpcEntitlementApi, RpcShopApi, RpcVideoApi, RpcSharedAssetsApi, initializeRoomsApi, RpcAccessGateApi, applyAccessGates, WsMultiplayerApi, MockAdsApi, MockLifecycleApi, MockAnalyticsApi, createMockStorageApi, MockAvatarApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockProfileApi, MockDeviceApi, MockEnvironmentApi, MockSystemApi, MockCdnApi, MockTimeApi, MockHapticsApi, MockFeaturesApi, MockLoggingApi, MockIapApi, MockEntitlementApi, MockShopApi, MockVideoApi, MockPreloaderApi, MockSharedAssetsApi, MockAccessGateApi, MockMultiplayerApi } from './chunk-
|
|
1
|
+
import { generateId, MockAdminUgcApi, MockAdminImageGenApi, RpcAdsApi, RpcAnalyticsApi, RpcStorageApi, RpcInboundStorageApi, DualEmitStorageApi, RpcAvatarApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, HostProfileApi, HostDeviceApi, HostEnvironmentApi, HostSystemApi, HostCdnApi, HostTimeApi, RpcHapticsApi, RpcFeaturesApi, RpcLifecycleApi, RpcRoomsApi, RpcLoggingApi, RpcIapApi, RpcPreloaderApi, RpcEntitlementApi, RpcShopApi, RpcVideoApi, RpcSharedAssetsApi, initializeRoomsApi, RpcAccessGateApi, applyAccessGates, WsMultiplayerApi, MockAdsApi, MockLifecycleApi, MockAnalyticsApi, createMockStorageApi, MockAvatarApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockProfileApi, MockDeviceApi, MockEnvironmentApi, MockSystemApi, MockCdnApi, MockTimeApi, MockHapticsApi, MockFeaturesApi, MockLoggingApi, MockIapApi, MockEntitlementApi, MockShopApi, MockVideoApi, MockPreloaderApi, MockSharedAssetsApi, MockAccessGateApi, MockMultiplayerApi } from './chunk-XS3XSIG7.js';
|
|
2
2
|
|
|
3
3
|
// src/ai/RpcAiApi.ts
|
|
4
4
|
var RpcAiApi = class {
|
|
@@ -32,11 +32,11 @@ var RpcAiApi = class {
|
|
|
32
32
|
// src/ai/MockAiApi.ts
|
|
33
33
|
var MockAiApi = class {
|
|
34
34
|
async requestChatCompletionAsync(_request) {
|
|
35
|
-
console.warn("[RUN
|
|
35
|
+
console.warn("[RUN] AI completion API not available in mock mode");
|
|
36
36
|
throw new Error("AI completion API requires backend connection");
|
|
37
37
|
}
|
|
38
38
|
async getAvailableCompletionModels() {
|
|
39
|
-
console.warn("[RUN
|
|
39
|
+
console.warn("[RUN] AI models API not available in mock mode");
|
|
40
40
|
throw new Error("AI models API requires backend connection");
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -212,6 +212,7 @@ var RpcImageGenApi = class {
|
|
|
212
212
|
constructor(rpcClient) {
|
|
213
213
|
this.rpcClient = rpcClient;
|
|
214
214
|
}
|
|
215
|
+
rpcClient;
|
|
215
216
|
async generate(params) {
|
|
216
217
|
return this.rpcClient.call(
|
|
217
218
|
"H5_IMAGE_GEN_GENERATE" /* H5_IMAGE_GEN_GENERATE */,
|
|
@@ -225,7 +226,7 @@ var RpcImageGenApi = class {
|
|
|
225
226
|
// src/imageGen/MockImageGenApi.ts
|
|
226
227
|
var MockImageGenApi = class {
|
|
227
228
|
async generate(_params) {
|
|
228
|
-
console.warn("[RUN
|
|
229
|
+
console.warn("[RUN] Image generation API not available in mock mode");
|
|
229
230
|
throw new Error("Image generation API requires backend connection");
|
|
230
231
|
}
|
|
231
232
|
};
|
|
@@ -486,13 +487,13 @@ var RpcSimulationApi = class {
|
|
|
486
487
|
}
|
|
487
488
|
handleSimulationUpdate(notification) {
|
|
488
489
|
if (!notification || !notification.subscriptionId) {
|
|
489
|
-
console.warn("[RUN
|
|
490
|
+
console.warn("[RUN] Received malformed simulation update");
|
|
490
491
|
return;
|
|
491
492
|
}
|
|
492
493
|
const callback = this.subscriptionCallbacks.get(notification.subscriptionId);
|
|
493
494
|
if (!callback) {
|
|
494
495
|
console.warn(
|
|
495
|
-
"[RUN
|
|
496
|
+
"[RUN] Received update for unknown subscription:",
|
|
496
497
|
notification.subscriptionId
|
|
497
498
|
);
|
|
498
499
|
return;
|
|
@@ -500,7 +501,7 @@ var RpcSimulationApi = class {
|
|
|
500
501
|
try {
|
|
501
502
|
callback(notification.updates);
|
|
502
503
|
} catch (error) {
|
|
503
|
-
console.error("[RUN
|
|
504
|
+
console.error("[RUN] Error in simulation subscription callback", error);
|
|
504
505
|
}
|
|
505
506
|
}
|
|
506
507
|
ensureValidSubscribeOptions(options) {
|
|
@@ -602,7 +603,7 @@ function initializeSimulation(rundotGameApi, host) {
|
|
|
602
603
|
}
|
|
603
604
|
|
|
604
605
|
// src/version.ts
|
|
605
|
-
var SDK_VERSION = "5.14.
|
|
606
|
+
var SDK_VERSION = "5.14.3-beta.migration-test";
|
|
606
607
|
|
|
607
608
|
// src/leaderboard/utils.ts
|
|
608
609
|
var HASH_ALGORITHM_WEB_CRYPTO = "SHA-256";
|
|
@@ -1093,15 +1094,15 @@ var RpcUgcApi = class {
|
|
|
1093
1094
|
// src/ugc/MockUgcApi.ts
|
|
1094
1095
|
var MockUgcApi = class {
|
|
1095
1096
|
async create(_params) {
|
|
1096
|
-
console.warn("[
|
|
1097
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1097
1098
|
throw new Error("UGC API requires backend connection");
|
|
1098
1099
|
}
|
|
1099
1100
|
async update(_params) {
|
|
1100
|
-
console.warn("[
|
|
1101
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1101
1102
|
throw new Error("UGC API requires backend connection");
|
|
1102
1103
|
}
|
|
1103
1104
|
async delete(_id) {
|
|
1104
|
-
console.warn("[
|
|
1105
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1105
1106
|
throw new Error("UGC API requires backend connection");
|
|
1106
1107
|
}
|
|
1107
1108
|
async get(_id) {
|
|
@@ -1118,19 +1119,19 @@ var MockUgcApi = class {
|
|
|
1118
1119
|
}
|
|
1119
1120
|
// Phase 2: Engagement methods
|
|
1120
1121
|
async like(_id) {
|
|
1121
|
-
console.warn("[
|
|
1122
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1122
1123
|
throw new Error("UGC API requires backend connection");
|
|
1123
1124
|
}
|
|
1124
1125
|
async unlike(_id) {
|
|
1125
|
-
console.warn("[
|
|
1126
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1126
1127
|
throw new Error("UGC API requires backend connection");
|
|
1127
1128
|
}
|
|
1128
1129
|
async recordUse(_id) {
|
|
1129
|
-
console.warn("[
|
|
1130
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1130
1131
|
throw new Error("UGC API requires backend connection");
|
|
1131
1132
|
}
|
|
1132
1133
|
async report(_params) {
|
|
1133
|
-
console.warn("[
|
|
1134
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1134
1135
|
throw new Error("UGC API requires backend connection");
|
|
1135
1136
|
}
|
|
1136
1137
|
async count(_params) {
|
|
@@ -1138,11 +1139,11 @@ var MockUgcApi = class {
|
|
|
1138
1139
|
}
|
|
1139
1140
|
// Creator following
|
|
1140
1141
|
async follow(_targetProfileId) {
|
|
1141
|
-
console.warn("[
|
|
1142
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1142
1143
|
throw new Error("UGC API requires backend connection");
|
|
1143
1144
|
}
|
|
1144
1145
|
async unfollow(_targetProfileId) {
|
|
1145
|
-
console.warn("[
|
|
1146
|
+
console.warn("[RUN] UGC API not available in mock mode");
|
|
1146
1147
|
throw new Error("UGC API requires backend connection");
|
|
1147
1148
|
}
|
|
1148
1149
|
async isFollowing(_targetProfileId) {
|
|
@@ -1169,7 +1170,7 @@ var MockSocialApi = class {
|
|
|
1169
1170
|
await navigator.clipboard.writeText(shareUrl);
|
|
1170
1171
|
} catch (error) {
|
|
1171
1172
|
console.warn(
|
|
1172
|
-
"[RUN
|
|
1173
|
+
"[RUN:mock] Failed to copy share URL to clipboard",
|
|
1173
1174
|
error
|
|
1174
1175
|
);
|
|
1175
1176
|
}
|
|
@@ -1193,8 +1194,8 @@ var MockSocialApi = class {
|
|
|
1193
1194
|
return null;
|
|
1194
1195
|
}
|
|
1195
1196
|
createMockUrl(_shareParams) {
|
|
1196
|
-
console.warn("
|
|
1197
|
-
console.warn("
|
|
1197
|
+
console.warn("[RUN:mock] Share params are stored online \u2014 mock URL is just a template");
|
|
1198
|
+
console.warn("[RUN:mock] Actual share URL looks like: https://mock-share-url.com/97dt/mock-share-id");
|
|
1198
1199
|
return `https://mock-share-url.com/97dt/mock-share-id`;
|
|
1199
1200
|
}
|
|
1200
1201
|
};
|
|
@@ -1289,18 +1290,19 @@ var MockAppApi = class {
|
|
|
1289
1290
|
this.adminUgc = new MockAdminUgcApi();
|
|
1290
1291
|
this.adminImageGen = new MockAdminImageGenApi();
|
|
1291
1292
|
}
|
|
1293
|
+
rundotGameApi;
|
|
1292
1294
|
adminUgc;
|
|
1293
1295
|
adminImageGen;
|
|
1294
1296
|
async getMyRole() {
|
|
1295
1297
|
const mockRole = this.rundotGameApi._mock?.app?.role;
|
|
1296
1298
|
if (mockRole === "owner" || mockRole === "editor" || mockRole === "none") {
|
|
1297
1299
|
console.warn(
|
|
1298
|
-
`[RUN
|
|
1300
|
+
`[RUN:mock] app.getMyRole() returning mock role: '${mockRole}'`
|
|
1299
1301
|
);
|
|
1300
1302
|
return mockRole;
|
|
1301
1303
|
}
|
|
1302
1304
|
console.warn(
|
|
1303
|
-
"[RUN
|
|
1305
|
+
"[RUN:mock] app.getMyRole() returning 'none'. Set _mock.app.role to 'owner', 'editor', or 'none' to control."
|
|
1304
1306
|
);
|
|
1305
1307
|
return "none";
|
|
1306
1308
|
}
|
|
@@ -1316,6 +1318,7 @@ var RpcAttributionApi = class {
|
|
|
1316
1318
|
constructor(rpcClient) {
|
|
1317
1319
|
this.rpcClient = rpcClient;
|
|
1318
1320
|
}
|
|
1321
|
+
rpcClient;
|
|
1319
1322
|
async getAttributionParams() {
|
|
1320
1323
|
return this.rpcClient.call(
|
|
1321
1324
|
"H5_GET_ATTRIBUTION_PARAMS" /* H5_GET_ATTRIBUTION_PARAMS */,
|
|
@@ -1349,6 +1352,7 @@ var RpcSocialApi = class {
|
|
|
1349
1352
|
constructor(rpcClient) {
|
|
1350
1353
|
this.rpcClient = rpcClient;
|
|
1351
1354
|
}
|
|
1355
|
+
rpcClient;
|
|
1352
1356
|
async shareLinkAsync(options) {
|
|
1353
1357
|
const result = await this.rpcClient.call("H5_SHARE_LINK" /* SHARE_LINK */, {
|
|
1354
1358
|
shareParams: options.shareParams,
|
|
@@ -1603,7 +1607,7 @@ var RundotGameTransport = class {
|
|
|
1603
1607
|
logInfo(message, ...params) {
|
|
1604
1608
|
}
|
|
1605
1609
|
logWarn(message, ...params) {
|
|
1606
|
-
console.warn(`[RUN
|
|
1610
|
+
console.warn(`[RUN:transport] ${message}`, ...params);
|
|
1607
1611
|
}
|
|
1608
1612
|
onRundotGameMessage(callback) {
|
|
1609
1613
|
this.onRundotGameMessageCallbacks.push(callback);
|
|
@@ -1707,32 +1711,57 @@ var RemoteHost = class {
|
|
|
1707
1711
|
removeMultipleItems: "H5_OWNER_STORAGE_REMOVE_MULTIPLE_ITEMS" /* OWNER_STORAGE_REMOVE_MULTIPLE_ITEMS */
|
|
1708
1712
|
});
|
|
1709
1713
|
this.sharedStorage = {
|
|
1710
|
-
open: ({ appId, namespace }) =>
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1714
|
+
open: ({ appId, namespace }) => {
|
|
1715
|
+
if (appId === "") {
|
|
1716
|
+
throw new Error(
|
|
1717
|
+
"sharedStorage.open: appId must be a non-empty string or omitted"
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
return new DualEmitStorageApi(
|
|
1721
|
+
rpcClient,
|
|
1722
|
+
{
|
|
1723
|
+
clear: "H5_SHARED_STORAGE_CLEAR" /* SHARED_STORAGE_CLEAR */,
|
|
1724
|
+
getItem: "H5_SHARED_STORAGE_GET_ITEM" /* SHARED_STORAGE_GET_ITEM */,
|
|
1725
|
+
getKey: "H5_SHARED_STORAGE_KEY" /* SHARED_STORAGE_KEY */,
|
|
1726
|
+
length: "H5_SHARED_STORAGE_LENGTH" /* SHARED_STORAGE_LENGTH */,
|
|
1727
|
+
removeItem: "H5_SHARED_STORAGE_REMOVE_ITEM" /* SHARED_STORAGE_REMOVE_ITEM */,
|
|
1728
|
+
setItem: "H5_SHARED_STORAGE_SET_ITEM" /* SHARED_STORAGE_SET_ITEM */,
|
|
1729
|
+
getAllItems: "H5_SHARED_STORAGE_GET_ALL_ITEMS" /* SHARED_STORAGE_GET_ALL_ITEMS */,
|
|
1730
|
+
getAllData: "H5_SHARED_STORAGE_GET_ALL_DATA" /* SHARED_STORAGE_GET_ALL_DATA */,
|
|
1731
|
+
setMultipleItems: "H5_SHARED_STORAGE_SET_MULTIPLE_ITEMS" /* SHARED_STORAGE_SET_MULTIPLE_ITEMS */,
|
|
1732
|
+
removeMultipleItems: "H5_SHARED_STORAGE_REMOVE_MULTIPLE_ITEMS" /* SHARED_STORAGE_REMOVE_MULTIPLE_ITEMS */
|
|
1733
|
+
},
|
|
1734
|
+
{ targetAppId: appId, namespace },
|
|
1735
|
+
{
|
|
1736
|
+
clear: "H5_GLOBAL_STORAGE_CLEAR" /* GLOBAL_STORAGE_CLEAR */,
|
|
1737
|
+
getItem: "H5_GLOBAL_STORAGE_GET_ITEM" /* GLOBAL_STORAGE_GET_ITEM */,
|
|
1738
|
+
getKey: "H5_GLOBAL_STORAGE_KEY" /* GLOBAL_STORAGE_KEY */,
|
|
1739
|
+
length: "H5_GLOBAL_STORAGE_LENGTH" /* GLOBAL_STORAGE_LENGTH */,
|
|
1740
|
+
removeItem: "H5_GLOBAL_STORAGE_REMOVE_ITEM" /* GLOBAL_STORAGE_REMOVE_ITEM */,
|
|
1741
|
+
setItem: "H5_GLOBAL_STORAGE_SET_ITEM" /* GLOBAL_STORAGE_SET_ITEM */,
|
|
1742
|
+
getAllItems: "H5_GLOBAL_STORAGE_GET_ALL_ITEMS" /* GLOBAL_STORAGE_GET_ALL_ITEMS */,
|
|
1743
|
+
setMultipleItems: "H5_GLOBAL_STORAGE_SET_MULTIPLE_ITEMS" /* GLOBAL_STORAGE_SET_MULTIPLE_ITEMS */,
|
|
1744
|
+
removeMultipleItems: "H5_GLOBAL_STORAGE_REMOVE_MULTIPLE_ITEMS" /* GLOBAL_STORAGE_REMOVE_MULTIPLE_ITEMS */
|
|
1745
|
+
}
|
|
1746
|
+
);
|
|
1747
|
+
},
|
|
1748
|
+
read: ({ appId, namespace }) => {
|
|
1749
|
+
if (appId === "") {
|
|
1750
|
+
throw new Error(
|
|
1751
|
+
"sharedStorage.read: appId must be a non-empty string or omitted"
|
|
1752
|
+
);
|
|
1753
|
+
}
|
|
1754
|
+
return new RpcInboundStorageApi(
|
|
1755
|
+
rpcClient,
|
|
1756
|
+
{
|
|
1757
|
+
listSources: "H5_SHARED_STORAGE_INBOUND_LIST_SOURCES" /* SHARED_STORAGE_INBOUND_LIST_SOURCES */,
|
|
1758
|
+
get: "H5_SHARED_STORAGE_INBOUND_GET" /* SHARED_STORAGE_INBOUND_GET */,
|
|
1759
|
+
getAllFromSource: "H5_SHARED_STORAGE_INBOUND_GET_ALL_FROM_SOURCE" /* SHARED_STORAGE_INBOUND_GET_ALL_FROM_SOURCE */,
|
|
1760
|
+
getAllForKey: "H5_SHARED_STORAGE_INBOUND_GET_ALL_FOR_KEY" /* SHARED_STORAGE_INBOUND_GET_ALL_FOR_KEY */
|
|
1761
|
+
},
|
|
1762
|
+
{ targetAppId: appId, namespace }
|
|
1763
|
+
);
|
|
1764
|
+
}
|
|
1736
1765
|
};
|
|
1737
1766
|
this.avatar3d = new RpcAvatarApi(rpcClient, rundotGameApi);
|
|
1738
1767
|
this.navigation = new RpcNavigationApi(rpcClient, rundotGameApi);
|
|
@@ -1826,7 +1855,7 @@ var RemoteHost = class {
|
|
|
1826
1855
|
};
|
|
1827
1856
|
|
|
1828
1857
|
// src/MockHost.ts
|
|
1829
|
-
var ROOMS_UNAVAILABLE_MESSAGE = "[RUN
|
|
1858
|
+
var ROOMS_UNAVAILABLE_MESSAGE = "[RUN] Rooms API is only available when running inside the RUN.game host environment.";
|
|
1830
1859
|
function createUnavailableRoomsApi() {
|
|
1831
1860
|
const roomsUnavailableError = () => new Error(ROOMS_UNAVAILABLE_MESSAGE);
|
|
1832
1861
|
return {
|
|
@@ -1871,7 +1900,7 @@ function createUnavailableRoomsApi() {
|
|
|
1871
1900
|
}
|
|
1872
1901
|
};
|
|
1873
1902
|
}
|
|
1874
|
-
var SIMULATION_UNAVAILABLE_MESSAGE = "[RUN
|
|
1903
|
+
var SIMULATION_UNAVAILABLE_MESSAGE = "[RUN] Simulation API is only available when running inside the RUN.game host environment.";
|
|
1875
1904
|
function createUnavailableSimulationApi() {
|
|
1876
1905
|
const simulationUnavailableError = () => new Error(SIMULATION_UNAVAILABLE_MESSAGE);
|
|
1877
1906
|
return {
|
|
@@ -2004,13 +2033,31 @@ var MockHost = class {
|
|
|
2004
2033
|
this.appStorage = createMockStorageApi("appStorage", appUrl);
|
|
2005
2034
|
this.ownerStorage = createMockStorageApi("ownerStorage", appUrl);
|
|
2006
2035
|
this.sharedStorage = {
|
|
2007
|
-
open: ({ appId, namespace }) =>
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2036
|
+
open: ({ appId, namespace }) => {
|
|
2037
|
+
if (appId === "") {
|
|
2038
|
+
throw new Error(
|
|
2039
|
+
"sharedStorage.open: appId must be a non-empty string or omitted"
|
|
2040
|
+
);
|
|
2041
|
+
}
|
|
2042
|
+
const resolved = appId ?? "mock-app";
|
|
2043
|
+
return createMockStorageApi(
|
|
2044
|
+
"appStorage",
|
|
2045
|
+
`mock#shared/${resolved}/${namespace}`
|
|
2046
|
+
);
|
|
2047
|
+
},
|
|
2048
|
+
read: ({ appId }) => {
|
|
2049
|
+
if (appId === "") {
|
|
2050
|
+
throw new Error(
|
|
2051
|
+
"sharedStorage.read: appId must be a non-empty string or omitted"
|
|
2052
|
+
);
|
|
2053
|
+
}
|
|
2054
|
+
return {
|
|
2055
|
+
listSources: async () => [],
|
|
2056
|
+
getAllFromSource: async () => ({}),
|
|
2057
|
+
get: async () => null,
|
|
2058
|
+
getAllForKey: async () => []
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2014
2061
|
};
|
|
2015
2062
|
this.simulation = createUnavailableSimulationApi();
|
|
2016
2063
|
this.rooms = createUnavailableRoomsApi();
|
|
@@ -2440,5 +2487,5 @@ function initializeSocial(rundotGameApi, host) {
|
|
|
2440
2487
|
}
|
|
2441
2488
|
|
|
2442
2489
|
export { HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, MockAiApi, MockAppApi, MockImageGenApi, MockLeaderboardApi, MockSocialApi, RemoteHost, RpcAdminImageGenApi, RpcAdminUgcApi, RpcAiApi, RpcAppApi, RpcClient, RpcImageGenApi, RpcLeaderboardApi, RpcSimulationApi, RpcSocialApi, SDK_VERSION, computeScoreHash, createHost, initializeAi, initializeApp, initializeAttribution, initializeImageGen, initializeLeaderboard, initializeSimulation, initializeSocial, initializeUgc };
|
|
2443
|
-
//# sourceMappingURL=chunk-
|
|
2444
|
-
//# sourceMappingURL=chunk-
|
|
2490
|
+
//# sourceMappingURL=chunk-BQPNVJYG.js.map
|
|
2491
|
+
//# sourceMappingURL=chunk-BQPNVJYG.js.map
|