@ives_xxz/framework 2.0.10 → 2.0.12
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/FrameworkInitialize.ts +2 -0
- package/package.json +1 -1
- package/service/FWService.ts +2 -2
- package/service/http/FWHttp.ts +1 -2
- package/types/FW.d.ts +29 -0
package/FrameworkInitialize.ts
CHANGED
|
@@ -41,6 +41,8 @@ export function initializeFramework() {
|
|
|
41
41
|
FW.SystemDefine.FWPromiseStatus = new SD.FWPromiseStatus();
|
|
42
42
|
FW.SystemDefine.FWLayerState = new SD.FWLayerState();
|
|
43
43
|
FW.SystemDefine.FWAudioType = new SD.FWAudioType();
|
|
44
|
+
FW.Service = require('./service/FWService').FWService;
|
|
45
|
+
FW.Http = require('./service/http/FWHttp').FWHttp;
|
|
44
46
|
FW.Registry = require('./registry/FWRegistry').FWRegistry;
|
|
45
47
|
FW.Framework = new (require('./Framework').Framework)();
|
|
46
48
|
FW.FrameworkBase = require('./FrameworkBase').FrameworkBase;
|
package/package.json
CHANGED
package/service/FWService.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FrameworkBase } from
|
|
1
|
+
import { FrameworkBase } from '../FrameworkBase';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export abstract class FWService extends FrameworkBase {
|
|
4
4
|
public abstract initialize();
|
|
5
5
|
public abstract onDestroy(): void;
|
|
6
6
|
|
package/service/http/FWHttp.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FWSystemConfig } from '../../config/FWSystemConfig';
|
|
2
|
-
import FWService from '../FWService';
|
|
3
2
|
|
|
4
|
-
export
|
|
3
|
+
export class FWHttp extends FW.Service {
|
|
5
4
|
public initialize() {}
|
|
6
5
|
public onDestroy(): void {}
|
|
7
6
|
protected onRestart(): void {}
|
package/types/FW.d.ts
CHANGED
|
@@ -978,6 +978,7 @@ declare namespace FW {
|
|
|
978
978
|
debug: boolean;
|
|
979
979
|
getMemory(): void;
|
|
980
980
|
restart(): void;
|
|
981
|
+
launchScene: string;
|
|
981
982
|
};
|
|
982
983
|
|
|
983
984
|
type CCEvent = {
|
|
@@ -2310,3 +2311,31 @@ declare namespace FW {
|
|
|
2310
2311
|
abstract onBeforeReceivingMessage?(msg: any): Promise<FW.SocketMessage>;
|
|
2311
2312
|
}
|
|
2312
2313
|
}
|
|
2314
|
+
|
|
2315
|
+
declare namespace FW {
|
|
2316
|
+
export abstract class Service extends FrameworkBase {
|
|
2317
|
+
public abstract initialize(): void;
|
|
2318
|
+
public abstract onDestroy(): void;
|
|
2319
|
+
}
|
|
2320
|
+
export class Http extends FWService {
|
|
2321
|
+
public initialize() {}
|
|
2322
|
+
public onDestroy(): void {}
|
|
2323
|
+
|
|
2324
|
+
async getMessage(
|
|
2325
|
+
url: string,
|
|
2326
|
+
params?: string,
|
|
2327
|
+
cb?: (response: string) => void,
|
|
2328
|
+
tag?: string,
|
|
2329
|
+
): Promise<string>;
|
|
2330
|
+
|
|
2331
|
+
async postMessage(
|
|
2332
|
+
url: string,
|
|
2333
|
+
params?: string,
|
|
2334
|
+
cb?: (response: string) => void,
|
|
2335
|
+
tag?: string,
|
|
2336
|
+
): Promise<string>;
|
|
2337
|
+
|
|
2338
|
+
onError?(err: any);
|
|
2339
|
+
onTimeout?();
|
|
2340
|
+
}
|
|
2341
|
+
}
|