cgserver 7.10.2113 → 7.12.2113

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.
Files changed (80) hide show
  1. package/package.json +3 -3
  2. package/src/Framework/AI/AiObject.ts +0 -12
  3. package/src/Framework/AI/Astar.ts +0 -157
  4. package/src/Framework/AI/BehaviorAI.ts +0 -382
  5. package/src/Framework/AI/Entity.ts +0 -37
  6. package/src/Framework/AI/Point.ts +0 -84
  7. package/src/Framework/AI/TriggerMgr.ts +0 -280
  8. package/src/Framework/Config/Config.ts +0 -61
  9. package/src/Framework/Config/FrameworkConfig.ts +0 -286
  10. package/src/Framework/Config/IServerConfig.ts +0 -28
  11. package/src/Framework/Config/_error_.ts +0 -32
  12. package/src/Framework/Core/Core.ts +0 -810
  13. package/src/Framework/Core/Timer.ts +0 -147
  14. package/src/Framework/Database/Decorator/AutoIncrement.ts +0 -9
  15. package/src/Framework/Database/Decorator/DBCache.ts +0 -74
  16. package/src/Framework/Database/Decorator/NotNull.ts +0 -9
  17. package/src/Framework/Database/Decorator/PrimaryKey.ts +0 -9
  18. package/src/Framework/Database/Decorator/Property.ts +0 -64
  19. package/src/Framework/Database/Decorator/Table.ts +0 -13
  20. package/src/Framework/Database/Decorator/Type.ts +0 -21
  21. package/src/Framework/Database/MSSqlManager.ts +0 -52
  22. package/src/Framework/Database/MongoBaseService.ts +0 -136
  23. package/src/Framework/Database/MongoManager.ts +0 -501
  24. package/src/Framework/Database/MysqlBaseService.ts +0 -345
  25. package/src/Framework/Database/MysqlManager.ts +0 -212
  26. package/src/Framework/Database/RedisManager.ts +0 -544
  27. package/src/Framework/Logic/CacheTool.ts +0 -85
  28. package/src/Framework/Logic/EventTool.ts +0 -31
  29. package/src/Framework/Logic/HttpTool.ts +0 -82
  30. package/src/Framework/Logic/Log.ts +0 -171
  31. package/src/Framework/Logic/SyncQueueTool.ts +0 -51
  32. package/src/Framework/Service/AccountService.ts +0 -508
  33. package/src/Framework/Service/MongoAccountService.ts +0 -456
  34. package/src/Framework/Service/MongoCacheService.ts +0 -48
  35. package/src/Framework/Service/MongoUserService.ts +0 -103
  36. package/src/Framework/Service/UserService.ts +0 -168
  37. package/src/Framework/Service/ini.ts +0 -33
  38. package/src/Framework/SocketServer/IClientWebSocket.ts +0 -50
  39. package/src/Framework/SocketServer/IRpc.ts +0 -12
  40. package/src/Framework/SocketServer/IRpcClientWebSocket.ts +0 -75
  41. package/src/Framework/SocketServer/IRpcServerWebSocket.ts +0 -76
  42. package/src/Framework/SocketServer/IServerWebSocket.ts +0 -88
  43. package/src/Framework/SocketServer/ISocketServer.ts +0 -243
  44. package/src/Framework/SocketServer/IWebSocket.ts +0 -243
  45. package/src/Framework/SocketServer/ProtoFilter/GoogleProtoFilter.ts +0 -68
  46. package/src/Framework/SocketServer/ProtoFilter/IProtoFilter.ts +0 -11
  47. package/src/Framework/SocketServer/ProtoFilter/JsonProtoFilter.ts +0 -34
  48. package/src/Framework/SocketServer/ProtoFilter/ProtoFactory.ts +0 -34
  49. package/src/Framework/ThirdParty/AlipayTool.ts +0 -224
  50. package/src/Framework/ThirdParty/Alisms.ts +0 -53
  51. package/src/Framework/ThirdParty/AppleTool.ts +0 -252
  52. package/src/Framework/ThirdParty/CgMq.ts +0 -153
  53. package/src/Framework/ThirdParty/EmailTool.ts +0 -37
  54. package/src/Framework/ThirdParty/OpenSocial.ts +0 -36
  55. package/src/Framework/ThirdParty/QQTool.ts +0 -124
  56. package/src/Framework/ThirdParty/QiniuTool.ts +0 -23
  57. package/src/Framework/ThirdParty/Rpc.ts +0 -75
  58. package/src/Framework/ThirdParty/WechatOATool.ts +0 -61
  59. package/src/Framework/ThirdParty/WechatTool.ts +0 -80
  60. package/src/Framework/WebServer/Controller/BaseController.ts +0 -140
  61. package/src/Framework/WebServer/Controller/BaseUserController.ts +0 -209
  62. package/src/Framework/WebServer/Controller/MongoBaseUserController.ts +0 -209
  63. package/src/Framework/WebServer/Decorator/AdminValidate.ts +0 -19
  64. package/src/Framework/WebServer/Decorator/AuthorityValidate.ts +0 -25
  65. package/src/Framework/WebServer/Decorator/CreatorValidate.ts +0 -19
  66. package/src/Framework/WebServer/Decorator/JsonAdminValidate.ts +0 -16
  67. package/src/Framework/WebServer/Decorator/JsonAuthorityValidate.d.ts +0 -2
  68. package/src/Framework/WebServer/Decorator/JsonAuthorityValidate.ts +0 -23
  69. package/src/Framework/WebServer/Decorator/JsonCreatorValidate.ts +0 -19
  70. package/src/Framework/WebServer/Decorator/SyncCall.ts +0 -20
  71. package/src/Framework/WebServer/Decorator/SyncCallServer.ts +0 -45
  72. package/src/Framework/WebServer/Engine/ControllerManager.ts +0 -134
  73. package/src/Framework/WebServer/Engine/Engine.ts +0 -186
  74. package/src/Framework/WebServer/Engine/RazorJs.ts +0 -720
  75. package/src/Framework/WebServer/Engine/Request.ts +0 -267
  76. package/src/Framework/WebServer/Engine/Response.ts +0 -123
  77. package/src/Framework/WebServer/IWebServer.ts +0 -61
  78. package/src/Framework/cgserver.ts +0 -112
  79. package/src/Framework/index.ts +0 -92
  80. package/src/test/test.ts +0 -12
@@ -1,267 +0,0 @@
1
- import * as Express from 'express';
2
- import { URL } from 'url';
3
- import { WebServerConfig } from "../../Config/FrameworkConfig";
4
- import { core } from "../../Core/Core";
5
- import { GLog } from "../../Logic/Log";
6
-
7
- export class Request
8
- {
9
- protected _req:Express.Request=null
10
- get baseReq()
11
- {
12
- return this._req
13
- }
14
- protected _cfg:WebServerConfig=null
15
- protected _post_cb:()=>void=null
16
- set onPost(value)
17
- {
18
- this._post_cb=value
19
- }
20
- protected _module=""
21
- get module()
22
- {
23
- return this._module
24
- }
25
- protected _controller=""
26
- get controller()
27
- {
28
- return this._controller
29
- }
30
- protected _action=""
31
- get action()
32
- {
33
- return this._action
34
- }
35
- protected _suffix=""
36
- get suffix()
37
- {
38
- return this._suffix
39
- }
40
- protected _file_url=null
41
- get fileUrl()
42
- {
43
- return this._file_url
44
- }
45
- protected _params=<any>{}
46
- get params()
47
- {
48
- var body = <any>(this._req.query||{})
49
- for(let k in body)
50
- {
51
- var v = body[k]
52
- if(!core.isString(v))
53
- {
54
- continue
55
- }
56
- if(parseInt(v)==v)
57
- {
58
- body[k]=parseInt(v)
59
- }
60
- else if(parseFloat(v)==v)
61
- {
62
- body[k]==parseFloat(v)
63
- }
64
- }
65
- return body
66
- }
67
- get postData()
68
- {
69
- var body = this._req.body||{}
70
- //服务器会有一层空key的json解析
71
- for(let k in body)
72
- {
73
- var v = body[k]
74
- if(!core.isString(v))
75
- {
76
- continue
77
- }
78
- if(parseInt(v)==v)
79
- {
80
- body[k]=parseInt(v)
81
- }
82
- else if(parseFloat(v)==v)
83
- {
84
- body[k]==parseFloat(v)
85
- }
86
- }
87
- return body
88
- }
89
- get url()
90
- {
91
- return this._req.url
92
- }
93
- get root()
94
- {
95
- let root = this._req.headers.host
96
- if (root != "")
97
- {
98
- root = this._req.protocol+"://" + root
99
- }
100
- return root
101
- }
102
- get method()
103
- {
104
- return this._req.method
105
- }
106
- get headers()
107
- {
108
- return this._req.headers
109
- }
110
- get remoteHost()
111
- {
112
- let ips = this._req.headers['x-forwarded-for']
113
- let ip = ""
114
- if(core.isArray(ips))
115
- {
116
- ip = ips[0]
117
- }
118
- else
119
- {
120
- ip = <string>ips
121
- }
122
- ip = ip ||
123
- this._req.connection.remoteAddress ||
124
- this._req.socket.remoteAddress ||
125
- this._req.ip||""
126
-
127
- ip = ip.replace("::ffff:","")
128
- return ip
129
- }
130
- constructor(req:Express.Request,cfg:WebServerConfig)
131
- {
132
- this._cfg = cfg
133
- this._req = req
134
- this._init()
135
- }
136
- getCookie(key:string)
137
- {
138
- let cookie_key = this._cfg.cookie.prefix + key
139
- if(!this._req.cookies)
140
- {
141
- return null
142
- }
143
- return this._req.cookies[cookie_key]
144
- }
145
- protected _init()
146
- {
147
- let method=this._req.method.toLowerCase()
148
- if(method!="get"&&method!="post")
149
- {
150
- return
151
- }
152
- let path = this._req.url
153
- //服务器根目录路径写法,链接转换
154
- let _i = path.lastIndexOf("~")
155
- if (_i >= 0)
156
- {
157
- path = path.substr(_i + 1)
158
- }
159
- //处理参数
160
- this._parseParams(path)
161
- }
162
- protected _addListener(event: string | symbol, listener: (...args: any[]) => void)
163
- {
164
- this._req.addListener(event, listener)
165
- }
166
- protected _parseParams (path:string)
167
- {
168
- this._module =this._cfg.routs.onlyModule||this._cfg.routs.defaults.module
169
- this._controller = this._cfg.routs.defaults.controller
170
- this._action = this._cfg.routs.defaults.action
171
- this._suffix = null
172
- this._file_url = null
173
- this._params = <any>{}
174
- if (path == "/")
175
- {
176
- return
177
- }
178
- let firstQuoteIndex = path.indexOf("?")
179
- let preQuoteStr=path
180
- if(firstQuoteIndex>0)
181
- {
182
- preQuoteStr = path.substring(0,firstQuoteIndex)
183
- }
184
-
185
- let lastDotIndex = preQuoteStr.lastIndexOf(".")
186
- if (lastDotIndex > 0)
187
- {
188
- let dotStr = preQuoteStr.substring(lastDotIndex + 1)
189
- this._suffix = dotStr
190
- this._file_url = preQuoteStr
191
- return
192
- }
193
- let quote_index = path.indexOf("?")
194
- if (quote_index >= 0)
195
- {
196
- let url = new URL(path)
197
- url.searchParams.forEach((value, name, searchParams) => {
198
- this._params[name]=value
199
- })
200
- path = path.substring(0, quote_index)
201
- }
202
- let params = path.split("/")
203
- let default_module = false
204
- if(this._cfg.routs.onlyModule)
205
- {
206
- default_module = true
207
- }
208
- if (params.length > 1 && params[1].length>0)
209
- {
210
- /**
211
- * 如果是only模式,那么就不支持controller和module相同,
212
- * 如果相同则认为是模块名,这样就可以同时支持,带模块的路径模式和非带模块的路径模式了
213
- */
214
- if(default_module
215
- &&params[1].toLowerCase()==this._cfg.routs.onlyModule.toLowerCase())
216
- {
217
- default_module = false
218
- }
219
- if(default_module)
220
- {
221
- this._controller = params[1]
222
- }
223
- else
224
- {
225
- this._module = params[1]
226
- }
227
- }
228
- if (params.length > 2 && params[2].length>0)
229
- {
230
- if(default_module)
231
- {
232
- this._action = params[2]
233
- }
234
- else
235
- {
236
- this._controller = params[2]
237
- }
238
- }
239
- if (params.length > 3
240
- && params[3].length > 0
241
- && !default_module)
242
- {
243
- this._action = params[3]
244
- }
245
- this._params = this._params||{}
246
- return
247
- }
248
- debugInfo()
249
- {
250
- if(!this._cfg.debug)
251
- {
252
- return
253
- }
254
- let debuginfo =
255
- {
256
- module:this._module,
257
- controller:this._controller,
258
- action:this._action,
259
- suffix:this._suffix,
260
- file_url:this._file_url,
261
- params:this._params,
262
- post:this.postData,
263
- method:this._req.method.toLowerCase()
264
- }
265
- GLog.info(debuginfo)
266
- }
267
- }
@@ -1,123 +0,0 @@
1
- import * as Express from 'express';
2
- import * as fs from "fs";
3
- import * as mime from "mime";
4
- import { GLog } from "../../Logic/Log";
5
- import { WebServerConfig } from "../../Config/FrameworkConfig";
6
-
7
- export class Response
8
- {
9
- protected _res:Express.Response=null
10
- protected _cookie_prefix=""
11
- protected _cfg:WebServerConfig=null
12
- protected _create_time=-1
13
- constructor(res:Express.Response,cfg:WebServerConfig)
14
- {
15
- this._cfg = cfg
16
- this._res = res
17
- this._cookie_prefix = this._cfg.cookie.prefix
18
- this._init()
19
- }
20
- protected _init()
21
- {
22
- this._create_time=Date.now()
23
- }
24
- /**
25
- *
26
- * @param key
27
- * @param value
28
- * @param time 秒
29
- */
30
- setCookie(key:string, value, time?)
31
- {
32
- key = this._cookie_prefix + key
33
- if(time)
34
- {
35
- this._res.cookie(key,value,{maxAge:time*1000,httpOnly:true})
36
- }
37
- else
38
- {
39
- this._res.cookie(key,value,{httpOnly:true})
40
- }
41
- }
42
- clearCookie(key:string)
43
- {
44
- this.setCookie(key,"",-1000)
45
- }
46
- redirect(path:string)
47
- {
48
- this._res.writeHead(302, { 'Location': path });
49
- this._res.end()
50
- }
51
- renderJson(data,origin?:string | string[] | undefined)
52
- {
53
- this._res.json(data)
54
- this.debugInfo(data)
55
- }
56
- renderJson404(origin?:string | string[] | undefined)
57
- {
58
- this._res.status(404).json();
59
- }
60
- renderJson500(origin?:string | string[] | undefined)
61
- {
62
- this._res.status(500).json()
63
- this.debugInfo("500")
64
- }
65
- renderHtml(html:string)
66
- {
67
- this._res.send(html||"")
68
- }
69
- render404(html?:string)
70
- {
71
- this._res.status(404).send(html||"没找到该页面")
72
- }
73
- render500(html?:string)
74
- {
75
- this._res.status(500).send(html||"服务器内部错误500")
76
- }
77
- renderOptions(method,origin)
78
- {
79
- this._res.sendStatus(204)
80
- }
81
- renderFile(fullPath:string)
82
- {
83
- this._res.sendFile(fullPath)
84
- }
85
- downloadFile(fullPath:string)
86
- {
87
- let fileName = ""
88
- let quote_index = fullPath.indexOf("/")
89
- if(quote_index>0)
90
- {
91
- fileName = fullPath.substring(quote_index+1)
92
- }
93
-
94
- fs.stat(fullPath,(err,stats)=>
95
- {
96
- if(!stats||stats.isDirectory())
97
- {
98
- return this.render404("")
99
- }
100
- let size = stats.size
101
- var f = fs.createReadStream(fullPath)
102
- this._res.writeHead(200, {
103
- 'Content-Type': mime.getType(fullPath)||'application/octet-stream',
104
- 'Content-Disposition': 'attachment; filename=' + fileName,
105
- 'Content-Length': size
106
- });
107
- f.pipe(this._res)
108
- })
109
- }
110
- render304()
111
- {
112
- this._res.sendStatus(304)
113
- }
114
- debugInfo(data)
115
- {
116
- if(!this._cfg.debug)
117
- {
118
- return
119
- }
120
- GLog.info("dttime:"+(Date.now()-this._create_time).toLocaleString()+"ms")
121
- GLog.info(data)
122
- }
123
- }
@@ -1,61 +0,0 @@
1
- import { Engine } from './Engine/Engine';
2
- import { GLog } from '../Logic/Log';
3
- import { GRedisMgr } from '../Database/RedisManager';
4
- import { GMysqlMgr } from '../Database/MysqlManager';
5
- import { WebServerConfig } from '../Config/FrameworkConfig';
6
- import { RazorJs } from './Engine/RazorJs';
7
- import { GMongoMgr } from '../Database/MongoManager';
8
- import { GAlipayTool } from '../ThirdParty/AlipayTool';
9
- import { GServerCfg } from '../Config/IServerConfig';
10
- import { GEventTool } from '../Logic/EventTool';
11
- import { GCgServer } from '../cgserver';
12
-
13
- //实现对controller的手动注册
14
- export class IWebServer
15
- {
16
- protected _engine:Engine=null
17
- /**
18
- * 启动服务器
19
- * @param server_index 这个是服务器的配置index
20
- */
21
- async start(cfg:WebServerConfig)
22
- {
23
- GCgServer.addWebServer(this)
24
- if(!cfg)
25
- {
26
- GLog.error("webserver 配置不存在,启动服务器失败")
27
- return false
28
- }
29
- await GRedisMgr.init(GServerCfg.db?.redis)
30
- await GMysqlMgr.init()
31
- await GMongoMgr.init(GServerCfg.db?.mongo)
32
- GAlipayTool.init()
33
- //初始化web引擎
34
- this._engine = new Engine(cfg,new RazorJs())
35
- this._engine.start()
36
-
37
- this._registerController()
38
- this._registerRouter()
39
- GEventTool.emit("web_server_init_done")
40
- return true
41
- }
42
- stop()
43
- {
44
- this._engine.stop()
45
- }
46
- /**
47
- * 注册控制器
48
- * eg:GControllerMgr.registerController("Admin","System",SystemController)
49
- */
50
- protected _registerController()
51
- {
52
-
53
- }
54
- /**
55
- * 注册路由
56
- */
57
- protected _registerRouter()
58
- {
59
-
60
- }
61
- }
@@ -1,112 +0,0 @@
1
-
2
-
3
- import { GLog } from "./Logic/Log";
4
- import { GEventTool } from './Logic/EventTool';
5
- import { core } from "./Core/Core";
6
- import { Config } from "./Config/Config";
7
- import { IWebServer } from "./WebServer/IWebServer";
8
- import { ISocketServer } from "./SocketServer/ISocketServer";
9
-
10
- class CgServer
11
- {
12
- protected _webservers:IWebServer[]=[]
13
- get webServers()
14
- {
15
- return this._webservers
16
- }
17
- protected _socketservers:ISocketServer[]=[]
18
- get socketServers()
19
- {
20
- return this._socketservers
21
- }
22
- protected _events:{[name:string]:Function[]}={}
23
- protected _debug=false
24
- get debug()
25
- {
26
- return this._debug
27
- }
28
- constructor()
29
- {
30
- this.init()
31
- }
32
- init()
33
- {
34
- process.on("uncaughtException",this.onUnCaughtException.bind(this))
35
- process.env.TZ = "Asia/Shanghai"
36
-
37
- GEventTool.on("socket_server_init_done",this.onStart.bind(this))
38
- GEventTool.on("web_server_init_done",this.onStart.bind(this))
39
-
40
- let argv = process.argv||[]
41
- for(let i=0;i<argv.length;++i)
42
- {
43
- let arg = argv[i].toLowerCase()
44
- if(arg=="-d"||arg=="-debug")
45
- {
46
- Config.debug=true
47
- this._debug=true
48
- }
49
- if(arg=="-data")
50
- {
51
- if(i+1>=argv.length)
52
- {
53
- break
54
- }
55
- ++i
56
- Config.rootDataDir=argv[i].toLocaleLowerCase()
57
- if(!Config.rootDataDir.endsWith("/"))
58
- {
59
- Config.rootDataDir+="/"
60
- }
61
- }
62
- }
63
- }
64
- protected _done=0
65
- onStart()
66
- {
67
- ++this._done
68
- let total = this._webservers.length+this._socketservers.length
69
- if(this._done!=total)
70
- {
71
- return
72
- }
73
- let events=this._events["start"]||[]
74
- for(let i=0;i<events.length;++i)
75
- {
76
- core.safeCall(events[i])
77
- }
78
- }
79
- addListener(event:"start",func:()=>void)
80
- {
81
- this._events[event]=this._events[event]||[]
82
- this._events[event].push(func)
83
- }
84
- removeListener(event:"start",func:()=>void)
85
- {
86
- let events=this._events[event]
87
- if(!events)
88
- {
89
- return false
90
- }
91
- let index=events.findIndex((_func)=>_func==func)
92
- if(index<0)
93
- {
94
- return false
95
- }
96
- events.splice(index,1)
97
- return true
98
- }
99
- onUnCaughtException(e)
100
- {
101
- GLog.error(e.stack)
102
- }
103
- addWebServer(server:IWebServer)
104
- {
105
- this._webservers.push(server)
106
- }
107
- addSocketServer(server:ISocketServer)
108
- {
109
- this._socketservers.push(server)
110
- }
111
- }
112
- export let GCgServer=new CgServer()
@@ -1,92 +0,0 @@
1
- import { SqlResult, SqlReturn, SqlReturns } from './Database/MysqlManager';
2
-
3
- export { GCgServer } from './cgserver';
4
-
5
- export { GProtoFactory } from './SocketServer/ProtoFilter/ProtoFactory';
6
- export { GDBCache } from './Database/Decorator/DBCache';
7
- export { AiObject } from "./AI/AiObject";
8
- export { AStar } from "./AI/Astar";
9
- export { BehaviorAI } from "./AI/BehaviorAI";
10
- export { Entity } from "./AI/Entity";
11
- export { Point } from "./AI/Point";
12
- export { Trigger,GTriggerMgr } from "./AI/TriggerMgr";
13
- export { FrameworkErrorCode } from "./Config/_error_";
14
- export { Config } from "./Config/Config";
15
- export { FrameworkConfig } from "./Config/FrameworkConfig";
16
- export { IServerConfig,GServerCfg } from "./Config/IServerConfig";
17
-
18
- export { core } from "./Core/Core";
19
- export { Timer } from "./Core/Timer";
20
- export { AutoIncrement } from "./Database/Decorator/AutoIncrement";
21
- export { NotNull } from './Database/Decorator/NotNull';
22
- export { PrimaryKey } from './Database/Decorator/PrimaryKey';
23
- export { Property } from './Database/Decorator/Property';
24
- export { Table } from './Database/Decorator/Table';
25
- export { Type } from './Database/Decorator/Type';
26
- export { EPropertyType } from './Database/Decorator/Property';
27
- export { MongoBaseService } from './Database/MongoBaseService';
28
- export { BaseModel as MysqlBaseModel } from './Database/MysqlBaseService';
29
- export { MongoBaseModel } from './Database/MongoManager';
30
- export { GMongoMgr } from './Database/MongoManager';
31
- export { GMSSqlMgr } from './Database/MSSqlManager';
32
- export { MysqlBaseService } from './Database/MysqlBaseService';
33
- export { GMysqlMgr,SqlResult,SqlReturn,SqlReturns } from './Database/MysqlManager';
34
- export { GRedisMgr,RedisManager } from './Database/RedisManager';
35
- export { GCacheTool } from './Logic/CacheTool';
36
- export { GHttpTool } from './Logic/HttpTool';
37
- export { GLog } from './Logic/Log';
38
- export { ERoleGroup,EUserState,EAccountFrom } from './Service/ini';
39
- export { AccountService as MysqlAccountService,GAccountSer as GMysqlAccountSer } from './Service/AccountService';
40
- export { AccountService as MongoAccountService,GAccountSer as GMongoAccountSer } from './Service/MongoAccountService';
41
- export { UserService as MysqlUserService } from './Service/UserService';
42
- export { UserService as MongoUserService } from './Service/MongoUserService';
43
- export { UserModel as MysqlUserModel } from './Service/UserService';
44
- export { UserModel as MongoUserModel } from './Service/MongoUserService';
45
- export { GMongoCacheSer,MongoCacheModel } from './Service/MongoCacheService';
46
-
47
- export { GoogleProtoFilter } from './SocketServer/ProtoFilter/GoogleProtoFilter';
48
- export { IProtoFilter } from './SocketServer/ProtoFilter/IProtoFilter';
49
- export { JsonProtoFilter } from './SocketServer/ProtoFilter/JsonProtoFilter';
50
- export { IServerWebSocket } from './SocketServer/IServerWebSocket';
51
- export { IClientWebSocket } from './SocketServer/IClientWebSocket';
52
- export { ISocketServer } from './SocketServer/ISocketServer';
53
- export { IWebSocket,BaseMsg } from './SocketServer/IWebSocket';
54
- export { GAlipayTool } from './ThirdParty/AlipayTool';
55
- export { GSmsTool } from './ThirdParty/Alisms';
56
- export { GAppleTool } from './ThirdParty/AppleTool';
57
- export { GEmailTool } from './ThirdParty/EmailTool';
58
- export { GOpenSocial } from './ThirdParty/OpenSocial';
59
- export { GQiniuTool } from './ThirdParty/QiniuTool';
60
- export { GQQTool } from './ThirdParty/QQTool';
61
- export { GWechatOATool } from './ThirdParty/WechatOATool';
62
- export { GWechatTool } from './ThirdParty/WechatTool';
63
- export { IWebServer } from './WebServer/IWebServer';
64
- export { BaseController } from './WebServer/Controller/BaseController';
65
- export { BaseUserController } from './WebServer/Controller/BaseUserController';
66
- export { MongoBaseUserController } from './WebServer/Controller/MongoBaseUserController';
67
- export { AccountModel as MysqlAccountModel } from './Service/AccountService';
68
- export { AccountModel as MongoAccountModel } from './Service/MongoAccountService';
69
- export { AdminValidate } from './WebServer/Decorator/AdminValidate';
70
- export { AuthorityValidate } from './WebServer/Decorator/AuthorityValidate';
71
- export { CreatorValidate } from './WebServer/Decorator/CreatorValidate';
72
- export { JsonAdminValidate } from './WebServer/Decorator/JsonAdminValidate';
73
- export { JsonAuthorityValidate } from './WebServer/Decorator/JsonAuthorityValidate';
74
- export { JsonCreatorValidate } from './WebServer/Decorator/JsonCreatorValidate';
75
- export { GCtrMgr } from './WebServer/Engine/ControllerManager';
76
- export { Engine } from './WebServer/Engine/Engine';
77
- export { RazorJs } from './WebServer/Engine/RazorJs';
78
- export { Request } from './WebServer/Engine/Request';
79
- export { Response } from './WebServer/Engine/Response';
80
- export { WebServerConfig } from './Config/FrameworkConfig';
81
- export { GSyncQueueTool } from './Logic/SyncQueueTool';
82
- export { GEventTool } from './Logic/EventTool';
83
- export { EAccountState } from './Service/ini';
84
-
85
- export { RpcBaseMsg } from './SocketServer/IRpc';
86
- export { Rpc,RpcConfig } from './ThirdParty/Rpc';
87
- export { CgMq,CgMqConfig } from './ThirdParty/CgMq';
88
- export { IRpcServerWebSocket} from './SocketServer/IRpcServerWebSocket';
89
- export { IRpcClientWebSocket} from './SocketServer/IRpcClientWebSocket';
90
-
91
- export { SyncCall } from './WebServer/Decorator/SyncCall';
92
- export { SyncCallServer } from './WebServer/Decorator/SyncCallServer';
package/src/test/test.ts DELETED
@@ -1,12 +0,0 @@
1
- import { SyncCall, core } from "../Framework"
2
-
3
- class Test{
4
- @SyncCall
5
- public test() {
6
- console.log("test")
7
- }
8
- }
9
- let test = new Test()
10
- test.test()
11
- let str = core.format(Date.now(),"yyyy-MM-dd hh:mm:ss")
12
- console.log(str)