cgserver 10.0.2 → 10.0.3
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
|
|
34
|
-
static
|
|
35
|
-
static
|
|
36
|
-
static
|
|
37
|
-
static
|
|
38
|
-
static
|
|
39
|
-
static
|
|
40
|
-
static
|
|
41
|
-
static
|
|
42
|
-
static
|
|
43
|
-
static
|
|
44
|
-
static
|
|
45
|
-
static
|
|
46
|
-
static
|
|
47
|
-
static
|
|
48
|
-
static
|
|
49
|
-
static
|
|
50
|
-
static
|
|
51
|
-
static
|
|
52
|
-
static
|
|
53
|
-
static
|
|
54
|
-
static
|
|
55
|
-
static
|
|
33
|
+
static gMongoServiceMgr1 = MongoServiceManager_1.gMongoServiceMgr;
|
|
34
|
+
static gCgServer1 = cgserver_1.gCgServer;
|
|
35
|
+
static gDbCache1 = DBCache_1.gDbCache;
|
|
36
|
+
static gTriggerMgr1 = TriggerMgr_1.gTriggerMgr;
|
|
37
|
+
static gMongoMgr1 = MongoManager_1.gMongoMgr;
|
|
38
|
+
static gMSSqlMgr1 = MSSqlManager_1.gMSSqlMgr;
|
|
39
|
+
static gMysqlMgr1 = MysqlManager_1.gMysqlMgr;
|
|
40
|
+
static gRedisMgr1 = RedisManager_1.gRedisMgr;
|
|
41
|
+
static gCacheTool1 = CacheTool_1.gCacheTool;
|
|
42
|
+
static gHttpTool1 = HttpTool_1.gHttpTool;
|
|
43
|
+
static gLog1 = Log_1.gLog;
|
|
44
|
+
static gSyncQueueTool1 = SyncQueueTool_1.gSyncQueueTool;
|
|
45
|
+
static gEventTool1 = EventTool_1.gEventTool;
|
|
46
|
+
static gByteTool1 = ByteTool_1.gByteTool;
|
|
47
|
+
static gSmsTool1 = Alisms_1.gSMSTool;
|
|
48
|
+
static gEmailTool1 = EmailTool_1.gEmailTool;
|
|
49
|
+
static gQiniuTool1 = QiniuTool_1.gQiniuTool;
|
|
50
|
+
static gQQTool1 = QQTool_1.gQQTool;
|
|
51
|
+
static gWechatTool1 = WechatTool_1.gWechatTool;
|
|
52
|
+
static gWechatOATool1 = WechatTool_1.gWechatTool;
|
|
53
|
+
static gAlipayTool1 = AlipayTool_1.gAlipayTool;
|
|
54
|
+
static gAppleTool1 = AppleTool_1.gAppleTool;
|
|
55
|
+
static gProtoFactory1 = 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
|
|
31
|
-
static
|
|
32
|
-
static
|
|
33
|
-
static
|
|
34
|
-
static
|
|
35
|
-
static
|
|
36
|
-
static
|
|
37
|
-
static
|
|
38
|
-
static
|
|
39
|
-
static
|
|
40
|
-
static
|
|
41
|
-
static
|
|
42
|
-
static
|
|
43
|
-
static
|
|
44
|
-
static
|
|
45
|
-
static
|
|
46
|
-
static
|
|
47
|
-
static
|
|
48
|
-
static
|
|
49
|
-
static
|
|
50
|
-
static
|
|
51
|
-
static
|
|
52
|
-
static
|
|
6
|
+
static gMongoServiceMgr1: import("./Database/Mongo/MongoServiceManager").MongoServiceManager;
|
|
7
|
+
static gCgServer1: import("./cgserver").CgServer;
|
|
8
|
+
static gDbCache1: import("./Database/Decorator/DBCache").DBCache;
|
|
9
|
+
static gTriggerMgr1: import("./AI/TriggerMgr").TriggerManager;
|
|
10
|
+
static gMongoMgr1: import("./Database/Mongo/MongoManager").MongoManager;
|
|
11
|
+
static gMSSqlMgr1: import("./Database/MSSqlManager").MSSqlManager;
|
|
12
|
+
static gMysqlMgr1: import("./Database/MysqlManager").MysqlManager;
|
|
13
|
+
static gRedisMgr1: import("./Database/RedisManager").RedisManager;
|
|
14
|
+
static gCacheTool1: import("./Logic/CacheTool").CacheTool;
|
|
15
|
+
static gHttpTool1: import("./Logic/HttpTool").HttpTool;
|
|
16
|
+
static gLog1: import("./Logic/Log").Log;
|
|
17
|
+
static gSyncQueueTool1: import("./Logic/SyncQueueTool").SyncQueueTool;
|
|
18
|
+
static gEventTool1: import("./Logic/EventTool").EventTool;
|
|
19
|
+
static gByteTool1: import("./Core/ByteTool").ByteTool;
|
|
20
|
+
static gSmsTool1: import("./ThirdParty/Alisms").SMSTool;
|
|
21
|
+
static gEmailTool1: import("./ThirdParty/EmailTool").EmailTool;
|
|
22
|
+
static gQiniuTool1: import("./ThirdParty/QiniuTool").QiniuTool;
|
|
23
|
+
static gQQTool1: import("./ThirdParty/QQTool").QQTool;
|
|
24
|
+
static gWechatTool1: import("./ThirdParty/WechatTool").WechatTool;
|
|
25
|
+
static gWechatOATool1: import("./ThirdParty/WechatTool").WechatTool;
|
|
26
|
+
static gAlipayTool1: import("./ThirdParty/AlipayTool").AlipayTool;
|
|
27
|
+
static gAppleTool1: import("./ThirdParty/AppleTool").AppleTool;
|
|
28
|
+
static gProtoFactory1: 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
|
* 比如格式化字符串,常用加解密,
|