cgserver 10.0.2 → 10.0.4
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/lib/Framework/Core/ByteTool.js +2 -1
- package/dist/lib/Framework/Database/Mongo/MongoServiceManager.js +2 -1
- package/dist/lib/Framework/ThirdParty/AlipayTool.js +2 -1
- package/dist/lib/Framework/ThirdParty/Alisms.js +2 -1
- package/dist/lib/Framework/ThirdParty/AppleTool.js +2 -1
- package/dist/lib/Framework/ThirdParty/EmailTool.js +2 -1
- package/dist/lib/Framework/ThirdParty/QiniuTool.js +2 -1
- package/dist/lib/Framework/global.js +25 -25
- package/dist/types/Framework/Core/ByteTool.d.ts +1 -0
- package/dist/types/Framework/Database/Mongo/MongoServiceManager.d.ts +1 -0
- package/dist/types/Framework/ThirdParty/AlipayTool.d.ts +1 -0
- package/dist/types/Framework/ThirdParty/Alisms.d.ts +1 -0
- package/dist/types/Framework/ThirdParty/AppleTool.d.ts +1 -0
- package/dist/types/Framework/ThirdParty/EmailTool.d.ts +1 -0
- package/dist/types/Framework/ThirdParty/QiniuTool.d.ts +1 -0
- package/dist/types/Framework/global.d.ts +26 -50
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ByteTool = void 0;
|
|
3
|
+
exports.gByteTool = exports.ByteTool = void 0;
|
|
4
4
|
class ByteTool {
|
|
5
5
|
//构建一个视图,把字节数组写到缓存中,索引从0开始
|
|
6
6
|
getView(bytes) {
|
|
@@ -82,3 +82,4 @@ class ByteTool {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
exports.ByteTool = ByteTool;
|
|
85
|
+
exports.gByteTool = new ByteTool();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MongoServiceManager = void 0;
|
|
3
|
+
exports.gMongoServiceMgr = exports.MongoServiceManager = void 0;
|
|
4
4
|
const MongoBaseService_1 = require("./MongoBaseService");
|
|
5
5
|
class MongoServiceManager {
|
|
6
6
|
_services = {};
|
|
@@ -24,3 +24,4 @@ class MongoServiceManager {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.MongoServiceManager = MongoServiceManager;
|
|
27
|
+
exports.gMongoServiceMgr = new MongoServiceManager();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlipayTool = exports.AlipayCallBack = exports.AlipayResult = void 0;
|
|
3
|
+
exports.gAlipayTool = exports.AlipayTool = exports.AlipayCallBack = exports.AlipayResult = void 0;
|
|
4
4
|
const alipay_sdk_1 = require("alipay-sdk");
|
|
5
5
|
const aliUtil = require("alipay-sdk/lib/util");
|
|
6
6
|
const AliPayUtil_1 = require("alipay_sdk2/AliPayUtil");
|
|
@@ -202,3 +202,4 @@ class AlipayTool {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
exports.AlipayTool = AlipayTool;
|
|
205
|
+
exports.gAlipayTool = new AlipayTool();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SMSTool = void 0;
|
|
3
|
+
exports.gSMSTool = exports.SMSTool = void 0;
|
|
4
4
|
const IServerConfig_1 = require("../Config/IServerConfig");
|
|
5
5
|
const Log_1 = require("../Logic/Log");
|
|
6
6
|
let SMSClient = require("@alicloud/sms-sdk");
|
|
@@ -47,3 +47,4 @@ class SMSTool {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.SMSTool = SMSTool;
|
|
50
|
+
exports.gSMSTool = new SMSTool();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppleTool = exports.NotificationBody = exports.NotificationType = exports.ResponseBody = void 0;
|
|
3
|
+
exports.gAppleTool = exports.AppleTool = exports.NotificationBody = exports.NotificationType = exports.ResponseBody = void 0;
|
|
4
4
|
const ec_key_1 = require("ec-key");
|
|
5
5
|
const uuid_1 = require("uuid");
|
|
6
6
|
const fs = require("fs");
|
|
@@ -232,3 +232,4 @@ class AppleTool {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
exports.AppleTool = AppleTool;
|
|
235
|
+
exports.gAppleTool = new AppleTool();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmailTool = void 0;
|
|
3
|
+
exports.gEmailTool = exports.EmailTool = void 0;
|
|
4
4
|
const nodeMailer = require("nodemailer");
|
|
5
5
|
const IServerConfig_1 = require("../Config/IServerConfig");
|
|
6
6
|
const Log_1 = require("../Logic/Log");
|
|
@@ -35,3 +35,4 @@ class EmailTool {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
exports.EmailTool = EmailTool;
|
|
38
|
+
exports.gEmailTool = new EmailTool();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QiniuTool = void 0;
|
|
3
|
+
exports.gQiniuTool = exports.QiniuTool = void 0;
|
|
4
4
|
const qiniu = require("qiniu");
|
|
5
5
|
const IServerConfig_1 = require("../Config/IServerConfig");
|
|
6
6
|
const Log_1 = require("../Logic/Log");
|
|
@@ -26,3 +26,4 @@ class QiniuTool {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.QiniuTool = QiniuTool;
|
|
29
|
+
exports.gQiniuTool = new QiniuTool();
|
|
@@ -30,38 +30,38 @@ const Core_1 = require("./Core/Core");
|
|
|
30
30
|
* cg引擎的,全局对象
|
|
31
31
|
*/
|
|
32
32
|
class global {
|
|
33
|
-
static gMongoServiceMgr =
|
|
34
|
-
static gCgServer =
|
|
35
|
-
static gDbCache =
|
|
36
|
-
static gTriggerMgr =
|
|
37
|
-
static gMongoMgr =
|
|
38
|
-
static gMSSqlMgr =
|
|
39
|
-
static gMysqlMgr =
|
|
40
|
-
static gRedisMgr =
|
|
41
|
-
static gCacheTool =
|
|
42
|
-
static gHttpTool =
|
|
43
|
-
static gLog =
|
|
44
|
-
static gSyncQueueTool =
|
|
45
|
-
static gEventTool =
|
|
46
|
-
static gByteTool =
|
|
47
|
-
static gSmsTool =
|
|
48
|
-
static gEmailTool =
|
|
49
|
-
static gQiniuTool =
|
|
50
|
-
static gQQTool =
|
|
51
|
-
static gWechatTool =
|
|
52
|
-
static gWechatOATool =
|
|
53
|
-
static gAlipayTool =
|
|
54
|
-
static gAppleTool =
|
|
55
|
-
static gProtoFactory =
|
|
33
|
+
static gMongoServiceMgr = MongoServiceManager_1.gMongoServiceMgr;
|
|
34
|
+
static gCgServer = cgserver_1.gCgServer;
|
|
35
|
+
static gDbCache = DBCache_1.gDbCache;
|
|
36
|
+
static gTriggerMgr = TriggerMgr_1.gTriggerMgr;
|
|
37
|
+
static gMongoMgr = MongoManager_1.gMongoMgr;
|
|
38
|
+
static gMSSqlMgr = MSSqlManager_1.gMSSqlMgr;
|
|
39
|
+
static gMysqlMgr = MysqlManager_1.gMysqlMgr;
|
|
40
|
+
static gRedisMgr = RedisManager_1.gRedisMgr;
|
|
41
|
+
static gCacheTool = CacheTool_1.gCacheTool;
|
|
42
|
+
static gHttpTool = HttpTool_1.gHttpTool;
|
|
43
|
+
static gLog = Log_1.gLog;
|
|
44
|
+
static gSyncQueueTool = SyncQueueTool_1.gSyncQueueTool;
|
|
45
|
+
static gEventTool = EventTool_1.gEventTool;
|
|
46
|
+
static gByteTool = ByteTool_1.gByteTool;
|
|
47
|
+
static gSmsTool = Alisms_1.gSMSTool;
|
|
48
|
+
static gEmailTool = EmailTool_1.gEmailTool;
|
|
49
|
+
static gQiniuTool = QiniuTool_1.gQiniuTool;
|
|
50
|
+
static gQQTool = QQTool_1.gQQTool;
|
|
51
|
+
static gWechatTool = WechatTool_1.gWechatTool;
|
|
52
|
+
static gWechatOATool = WechatTool_1.gWechatTool;
|
|
53
|
+
static gAlipayTool = AlipayTool_1.gAlipayTool;
|
|
54
|
+
static gAppleTool = AppleTool_1.gAppleTool;
|
|
55
|
+
static gProtoFactory = ProtoFactory_1.gProtoFactory;
|
|
56
56
|
/**
|
|
57
57
|
* web服务中mvc的控制器管理器
|
|
58
58
|
*/
|
|
59
|
-
static gCtrMgr =
|
|
59
|
+
static gCtrMgr = ControllerManager_1.gCtrMgr;
|
|
60
60
|
/**
|
|
61
61
|
* mongo版本的缓存服务
|
|
62
62
|
* 可以用来缓存kv数据
|
|
63
63
|
*/
|
|
64
|
-
static gMongoCacheSer =
|
|
64
|
+
static gMongoCacheSer = MongoCacheService_1.gMongoCacheSer;
|
|
65
65
|
/**
|
|
66
66
|
* 一些通用的常用函数,
|
|
67
67
|
* 比如格式化字符串,常用加解密,
|
|
@@ -105,3 +105,4 @@ export declare class AlipayTool {
|
|
|
105
105
|
*/
|
|
106
106
|
getAlipayPage(method: "get" | "post", notifyUrl: string, returnUrl: string, outTradeNo: string, money: number, subject: string, body: string): Promise<string | import("alipay-sdk").AlipaySdkCommonResult>;
|
|
107
107
|
}
|
|
108
|
+
export declare let gAlipayTool: AlipayTool;
|
|
@@ -1,64 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ByteTool } from './Core/ByteTool';
|
|
3
|
-
import { DBCache } from './Database/Decorator/DBCache';
|
|
4
|
-
import { MSSqlManager } from './Database/MSSqlManager';
|
|
5
|
-
import { MongoManager } from './Database/Mongo/MongoManager';
|
|
6
|
-
import { MongoServiceManager } from './Database/Mongo/MongoServiceManager';
|
|
7
|
-
import { MysqlManager } from './Database/MysqlManager';
|
|
8
|
-
import { RedisManager } from './Database/RedisManager';
|
|
9
|
-
import { CacheTool } from './Logic/CacheTool';
|
|
10
|
-
import { EventTool } from './Logic/EventTool';
|
|
11
|
-
import { HttpTool } from './Logic/HttpTool';
|
|
12
|
-
import { Log } from './Logic/Log';
|
|
13
|
-
import { SyncQueueTool } from './Logic/SyncQueueTool';
|
|
14
|
-
import { MongoCacheService } from './Service/MongoCacheService';
|
|
15
|
-
import { ProtoFactory } from './SocketServer/ProtoFilter/ProtoFactory';
|
|
16
|
-
import { AlipayTool } from './ThirdParty/AlipayTool';
|
|
17
|
-
import { SMSTool } from './ThirdParty/Alisms';
|
|
18
|
-
import { AppleTool } from './ThirdParty/AppleTool';
|
|
19
|
-
import { EmailTool } from './ThirdParty/EmailTool';
|
|
20
|
-
import { QQTool } from './ThirdParty/QQTool';
|
|
21
|
-
import { QiniuTool } from './ThirdParty/QiniuTool';
|
|
22
|
-
import { WechatTool } from './ThirdParty/WechatTool';
|
|
23
|
-
import { ControllerManager } from './WebServer/Engine/ControllerManager';
|
|
24
|
-
import { CgServer } from './cgserver';
|
|
25
|
-
import { core } from './Core/Core';
|
|
1
|
+
import { core } from "./Core/Core";
|
|
26
2
|
/**
|
|
27
3
|
* cg引擎的,全局对象
|
|
28
4
|
*/
|
|
29
5
|
export declare class global {
|
|
30
|
-
static gMongoServiceMgr: MongoServiceManager;
|
|
31
|
-
static gCgServer: CgServer;
|
|
32
|
-
static gDbCache: DBCache;
|
|
33
|
-
static gTriggerMgr: TriggerManager;
|
|
34
|
-
static gMongoMgr: MongoManager;
|
|
35
|
-
static gMSSqlMgr: MSSqlManager;
|
|
36
|
-
static gMysqlMgr: MysqlManager;
|
|
37
|
-
static gRedisMgr: RedisManager;
|
|
38
|
-
static gCacheTool: CacheTool;
|
|
39
|
-
static gHttpTool: HttpTool;
|
|
40
|
-
static gLog: Log;
|
|
41
|
-
static gSyncQueueTool: SyncQueueTool;
|
|
42
|
-
static gEventTool: EventTool;
|
|
43
|
-
static gByteTool: ByteTool;
|
|
44
|
-
static gSmsTool: SMSTool;
|
|
45
|
-
static gEmailTool: EmailTool;
|
|
46
|
-
static gQiniuTool: QiniuTool;
|
|
47
|
-
static gQQTool: QQTool;
|
|
48
|
-
static gWechatTool: WechatTool;
|
|
49
|
-
static gWechatOATool: WechatTool;
|
|
50
|
-
static gAlipayTool: AlipayTool;
|
|
51
|
-
static gAppleTool: AppleTool;
|
|
52
|
-
static gProtoFactory: ProtoFactory;
|
|
6
|
+
static gMongoServiceMgr: import("./Database/Mongo/MongoServiceManager").MongoServiceManager;
|
|
7
|
+
static gCgServer: import("./cgserver").CgServer;
|
|
8
|
+
static gDbCache: import("./Database/Decorator/DBCache").DBCache;
|
|
9
|
+
static gTriggerMgr: import("./AI/TriggerMgr").TriggerManager;
|
|
10
|
+
static gMongoMgr: import("./Database/Mongo/MongoManager").MongoManager;
|
|
11
|
+
static gMSSqlMgr: import("./Database/MSSqlManager").MSSqlManager;
|
|
12
|
+
static gMysqlMgr: import("./Database/MysqlManager").MysqlManager;
|
|
13
|
+
static gRedisMgr: import("./Database/RedisManager").RedisManager;
|
|
14
|
+
static gCacheTool: import("./Logic/CacheTool").CacheTool;
|
|
15
|
+
static gHttpTool: import("./Logic/HttpTool").HttpTool;
|
|
16
|
+
static gLog: import("./Logic/Log").Log;
|
|
17
|
+
static gSyncQueueTool: import("./Logic/SyncQueueTool").SyncQueueTool;
|
|
18
|
+
static gEventTool: import("./Logic/EventTool").EventTool;
|
|
19
|
+
static gByteTool: import("./Core/ByteTool").ByteTool;
|
|
20
|
+
static gSmsTool: import("./ThirdParty/Alisms").SMSTool;
|
|
21
|
+
static gEmailTool: import("./ThirdParty/EmailTool").EmailTool;
|
|
22
|
+
static gQiniuTool: import("./ThirdParty/QiniuTool").QiniuTool;
|
|
23
|
+
static gQQTool: import("./ThirdParty/QQTool").QQTool;
|
|
24
|
+
static gWechatTool: import("./ThirdParty/WechatTool").WechatTool;
|
|
25
|
+
static gWechatOATool: import("./ThirdParty/WechatTool").WechatTool;
|
|
26
|
+
static gAlipayTool: import("./ThirdParty/AlipayTool").AlipayTool;
|
|
27
|
+
static gAppleTool: import("./ThirdParty/AppleTool").AppleTool;
|
|
28
|
+
static gProtoFactory: import("./SocketServer/ProtoFilter/ProtoFactory").ProtoFactory;
|
|
53
29
|
/**
|
|
54
30
|
* web服务中mvc的控制器管理器
|
|
55
31
|
*/
|
|
56
|
-
static gCtrMgr: ControllerManager;
|
|
32
|
+
static gCtrMgr: import("./WebServer/Engine/ControllerManager").ControllerManager;
|
|
57
33
|
/**
|
|
58
34
|
* mongo版本的缓存服务
|
|
59
35
|
* 可以用来缓存kv数据
|
|
60
36
|
*/
|
|
61
|
-
static gMongoCacheSer: MongoCacheService;
|
|
37
|
+
static gMongoCacheSer: import("./Service/MongoCacheService").MongoCacheService;
|
|
62
38
|
/**
|
|
63
39
|
* 一些通用的常用函数,
|
|
64
40
|
* 比如格式化字符串,常用加解密,
|