keytops-game-framework 1.0.3 → 1.0.5
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/app/module/publisher/PublisherManagerImpl.d.ts +1 -0
- package/dist/app/module/remoteConfig/BaseOnlineConfig.d.ts +0 -1
- package/dist/app/module/remoteConfig/LevelOnlineConfig.d.ts +0 -1
- package/dist/app/module/remoteConfig/SystemOnlineConfig.d.ts +0 -2
- package/dist/index.js +4 -23
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { IPublisherManager } from "./IPublisherManager";
|
|
|
5
5
|
* 负责在通用运行时中检测平台并启用对应能力。
|
|
6
6
|
*/
|
|
7
7
|
export declare class PublisherManagerImpl extends IPublisherManager {
|
|
8
|
+
static KEY: string;
|
|
8
9
|
private _customAppInfo;
|
|
9
10
|
constructor(customAppInfo?: PublisherAppInfoStruct);
|
|
10
11
|
private _init;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { OnlineConfig, ServerParamStruct, ServerResponseStruct } from "../net/server/IServer";
|
|
2
2
|
export type RemoteConfigRequest = ServerParamStruct | undefined;
|
|
3
3
|
export declare class BaseOnlineConfig<TRequest extends RemoteConfigRequest = ServerParamStruct> implements OnlineConfig {
|
|
4
|
-
static KEY: string;
|
|
5
4
|
protected mergeConfigField(target: OnlineConfig, key: string, payload: unknown): void;
|
|
6
5
|
protected mergeObjectConfig<T extends OnlineConfig>(target: T, payloads?: Record<string, any>): T;
|
|
7
6
|
buildRequestData(request?: TRequest): ServerParamStruct | undefined;
|
|
@@ -7,7 +7,6 @@ export type RelayAnalyticsConfig = Partial<AliAnalyticsConfig> & KeytopsAnalytic
|
|
|
7
7
|
* system 端口默认配置,承载 SDK 基础运行时能力。
|
|
8
8
|
*/
|
|
9
9
|
export declare class SystemOnlineConfig extends BaseOnlineConfig {
|
|
10
|
-
static KEY: string;
|
|
11
10
|
url: {
|
|
12
11
|
domain: string;
|
|
13
12
|
configAPI: string;
|
|
@@ -31,4 +30,3 @@ export declare class SystemOnlineConfig extends BaseOnlineConfig {
|
|
|
31
30
|
toString(): string;
|
|
32
31
|
resolveSystemUrl(path?: string): string;
|
|
33
32
|
}
|
|
34
|
-
export declare function resolveSystemUrl(path?: string, config?: SystemOnlineConfig): string;
|
package/dist/index.js
CHANGED
|
@@ -2953,7 +2953,6 @@ class BaseOnlineConfig {
|
|
|
2953
2953
|
return this.mergeObjectConfig(target, payloads);
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
2956
|
-
BaseOnlineConfig.KEY = "OnlineConfig_config_default_class";
|
|
2957
2956
|
|
|
2958
2957
|
class RemoteConfigRegistry {
|
|
2959
2958
|
constructor() {
|
|
@@ -3007,7 +3006,6 @@ function remoteConfig(method, gameFlag = "default", injectorKey) {
|
|
|
3007
3006
|
remoteConfigRegistry.register(target, method, gameFlag, injectorKey);
|
|
3008
3007
|
};
|
|
3009
3008
|
}
|
|
3010
|
-
remoteConfigRegistry.register(BaseOnlineConfig, "config", "default", BaseOnlineConfig.KEY);
|
|
3011
3009
|
|
|
3012
3010
|
/**
|
|
3013
3011
|
* system 端口默认配置,承载 SDK 基础运行时能力。
|
|
@@ -3099,26 +3097,9 @@ let SystemOnlineConfig = class SystemOnlineConfig extends BaseOnlineConfig {
|
|
|
3099
3097
|
return `${normalizedDomain}${normalizedPath}`;
|
|
3100
3098
|
}
|
|
3101
3099
|
};
|
|
3102
|
-
SystemOnlineConfig.KEY = "OnlineConfig_system_default_class";
|
|
3103
3100
|
SystemOnlineConfig = __decorate([
|
|
3104
|
-
remoteConfig("system"
|
|
3101
|
+
remoteConfig("system")
|
|
3105
3102
|
], SystemOnlineConfig);
|
|
3106
|
-
function resolveSystemUrl(path = "", config = new SystemOnlineConfig()) {
|
|
3107
|
-
const urlConfig = config.url;
|
|
3108
|
-
const resolvedPath = path.replace(/\{appid\}/g, publisher.appId);
|
|
3109
|
-
if (/^https?:\/\//.test(resolvedPath)) {
|
|
3110
|
-
return resolvedPath;
|
|
3111
|
-
}
|
|
3112
|
-
if (!resolvedPath) {
|
|
3113
|
-
return urlConfig.domain || "";
|
|
3114
|
-
}
|
|
3115
|
-
if (!urlConfig.domain) {
|
|
3116
|
-
return resolvedPath.startsWith("/") ? resolvedPath : `/${resolvedPath}`;
|
|
3117
|
-
}
|
|
3118
|
-
const normalizedDomain = urlConfig.domain.replace(/\/+$/, "");
|
|
3119
|
-
const normalizedPath = resolvedPath.startsWith("/") ? resolvedPath : `/${resolvedPath}`;
|
|
3120
|
-
return `${normalizedDomain}${normalizedPath}`;
|
|
3121
|
-
}
|
|
3122
3103
|
|
|
3123
3104
|
const RESOLVE_META_STORAGE_KEY = "ONLINE_CONFIG_CONTEXTS";
|
|
3124
3105
|
class RemoteConfigStore {
|
|
@@ -3294,9 +3275,8 @@ let LevelOnlineConfig = class LevelOnlineConfig extends BaseOnlineConfig {
|
|
|
3294
3275
|
return (payloads || {});
|
|
3295
3276
|
}
|
|
3296
3277
|
};
|
|
3297
|
-
LevelOnlineConfig.KEY = "OnlineConfig_level_level_class";
|
|
3298
3278
|
LevelOnlineConfig = __decorate([
|
|
3299
|
-
remoteConfig("level"
|
|
3279
|
+
remoteConfig("level")
|
|
3300
3280
|
], LevelOnlineConfig);
|
|
3301
3281
|
|
|
3302
3282
|
var GameLeaveType;
|
|
@@ -12184,6 +12164,7 @@ class PublisherManagerImpl extends IPublisherManager {
|
|
|
12184
12164
|
return true;
|
|
12185
12165
|
}
|
|
12186
12166
|
}
|
|
12167
|
+
PublisherManagerImpl.KEY = PublisherManager.KEY;
|
|
12187
12168
|
|
|
12188
12169
|
/**
|
|
12189
12170
|
* 平台游戏更新。
|
|
@@ -15141,4 +15122,4 @@ TipsView = __decorate([
|
|
|
15141
15122
|
menu("基础视图/TipsView")
|
|
15142
15123
|
], TipsView);
|
|
15143
15124
|
|
|
15144
|
-
export { ADAnalyticsAble, ADBehaviorReporter, ADEvent, ADType, AD_METRIC_ORDER_V1, ALiAnalyticsSender, AdDimension, AnalyticsAble, App, Application, Async, AudioBusiness, BaseDimension, BaseOnlineConfig, BaseProtocolHelper, BusinessCenter, ByteView, CCPViewLoader, CCSceneLoader, CocosNativeHelper, CocosStorageUtils, CocosViewManager, Component, ConfigHelper, DEFAULT_GAME_FLAG, Dictionary, DimensionType, ECS, EffectAudioSourceProxy, EmptyAnalyticsSender, EmptyLink, EnterOptionParser, Event$2 as Event, EventDispatcher, Fsm, FsmBase, GameDimension, GameLeaveType, GeometryUtils, Handler, HttpNode, HttpRequest, IADAble, IDevice, IGameUpdateAble, ILoginAble, INTERNAL_METHODS, INativeHelper, IPayAble, IPublisher, IPublisherManager, IRecordAble, IShareAble, IViewLoader, Injector, Json, KKTServer, KSAd, KSDevice, KSLogin, KSPublisher, KSRecorder, KSShare, KeytopsAnalyticsSender, LEVEL_STATS_METRIC_ORDER_V1, LaunchAnalyticsAble, LevelAnalyticsAble, LevelBehaviorReporter, LevelOnlineConfig, LevelStatsDimension, Link, List, LogType, Logger, MYAd, MYDevice, MYLogin, MYPublisher, Mask, MathUtils, MemeryStorage, NativeAd, NativeAnalyticsSender, NativeDevice, NativeHelper, NativeLogin, NativePay, NativePublisher, NativeRecorder, NativeShare, NativeUtils, NetManager, NoRequestServer, PLAYER_ABILITY_METRIC_ORDER_V1, PlayerAbilityDimension, Pool, PromiseUtils, PropSupport, PublisherManager, PublisherManagerImpl, RemoteConfigService, RemoteConfigStore, ResourceManager, RewardVideoMaskBusiness, RuntimeApplicationImpl, Scene, Server, SessionAnalyticsAble, SessionDimension, SocialAnalyticsAble, SocialDimension, Socket, SocketLogType, SocketNode, Storage, StorageImpl, StringUtils, System, SystemOnlineConfig, TKAd, TKAnalyticsSender, TKDevice, TKLogin, TKPublisher, TTAd, TTAnalyticsSender, TTDevice, TTGameUpdater, TTLogin, TTPay, TTPublisher, TTRecorder, TTShare, Task, TaskQueue, TaskSequence, Timer, TimerImpl, TipsType, TipsView, View, ViewControl, ViewLevel, ViewManager, WXAd, WXAnalyticsSender, WXDevice, WXGameUpdater, WXLogin, WXPay, WXPublisher, WXShare, ab, analytics, audio, bidding, businessCenter, cmd, component, eventCenter, fsmManager, manager, md5, net, publisher, remoteConfig, remoteConfigService, res,
|
|
15125
|
+
export { ADAnalyticsAble, ADBehaviorReporter, ADEvent, ADType, AD_METRIC_ORDER_V1, ALiAnalyticsSender, AdDimension, AnalyticsAble, App, Application, Async, AudioBusiness, BaseDimension, BaseOnlineConfig, BaseProtocolHelper, BusinessCenter, ByteView, CCPViewLoader, CCSceneLoader, CocosNativeHelper, CocosStorageUtils, CocosViewManager, Component, ConfigHelper, DEFAULT_GAME_FLAG, Dictionary, DimensionType, ECS, EffectAudioSourceProxy, EmptyAnalyticsSender, EmptyLink, EnterOptionParser, Event$2 as Event, EventDispatcher, Fsm, FsmBase, GameDimension, GameLeaveType, GeometryUtils, Handler, HttpNode, HttpRequest, IADAble, IDevice, IGameUpdateAble, ILoginAble, INTERNAL_METHODS, INativeHelper, IPayAble, IPublisher, IPublisherManager, IRecordAble, IShareAble, IViewLoader, Injector, Json, KKTServer, KSAd, KSDevice, KSLogin, KSPublisher, KSRecorder, KSShare, KeytopsAnalyticsSender, LEVEL_STATS_METRIC_ORDER_V1, LaunchAnalyticsAble, LevelAnalyticsAble, LevelBehaviorReporter, LevelOnlineConfig, LevelStatsDimension, Link, List, LogType, Logger, MYAd, MYDevice, MYLogin, MYPublisher, Mask, MathUtils, MemeryStorage, NativeAd, NativeAnalyticsSender, NativeDevice, NativeHelper, NativeLogin, NativePay, NativePublisher, NativeRecorder, NativeShare, NativeUtils, NetManager, NoRequestServer, PLAYER_ABILITY_METRIC_ORDER_V1, PlayerAbilityDimension, Pool, PromiseUtils, PropSupport, PublisherManager, PublisherManagerImpl, RemoteConfigService, RemoteConfigStore, ResourceManager, RewardVideoMaskBusiness, RuntimeApplicationImpl, Scene, Server, SessionAnalyticsAble, SessionDimension, SocialAnalyticsAble, SocialDimension, Socket, SocketLogType, SocketNode, Storage, StorageImpl, StringUtils, System, SystemOnlineConfig, TKAd, TKAnalyticsSender, TKDevice, TKLogin, TKPublisher, TTAd, TTAnalyticsSender, TTDevice, TTGameUpdater, TTLogin, TTPay, TTPublisher, TTRecorder, TTShare, Task, TaskQueue, TaskSequence, Timer, TimerImpl, TipsType, TipsView, View, ViewControl, ViewLevel, ViewManager, WXAd, WXAnalyticsSender, WXDevice, WXGameUpdater, WXLogin, WXPay, WXPublisher, WXShare, ab, analytics, audio, bidding, businessCenter, cmd, component, eventCenter, fsmManager, manager, md5, net, publisher, remoteConfig, remoteConfigService, res, server, storage, system, timer, version, viewAnalytics, viewClass, viewManager };
|