typespeed 2.3.6 → 2.4.2

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 (258) hide show
  1. package/app/src/config-development.json +3 -2
  2. package/app/src/test-socket.class.ts +56 -0
  3. package/app/src/views/socket.html +23 -0
  4. package/dist/introduction/decorator/example-import.class.js +17 -0
  5. package/dist/introduction/decorator/main-app.js +14 -0
  6. package/dist/introduction/decorator/main-decorator.js +127 -0
  7. package/dist/introduction/decorator/main-import.js +1 -0
  8. package/dist/introduction/decorator/main-reflect.js +38 -0
  9. package/dist/introduction/web-services/db-init.js +33 -0
  10. package/dist/introduction/web-services/db-singleton.js +49 -0
  11. package/dist/introduction/web-services/http-if.js +12 -0
  12. package/dist/introduction/web-services/http-init.js +7 -0
  13. package/dist/introduction/web-services/http-router.js +23 -0
  14. package/dist/{database.decorator.js → src/database.decorator.js} +2 -4
  15. package/dist/{default → src/default}/express-server.class.js +20 -5
  16. package/dist/{default → src/default}/rabbitmq.class.js +3 -3
  17. package/dist/{default → src/default}/redis.class.js +1 -1
  18. package/dist/src/default/socket-io.class.js +64 -0
  19. package/dist/{typespeed.js → src/typespeed.js} +6 -3
  20. package/dist/typespeed.d.ts +19 -1
  21. package/package.json +8 -8
  22. package/src/database.decorator.ts +2 -4
  23. package/src/default/express-server.class.ts +18 -7
  24. package/src/default/rabbitmq.class.ts +3 -3
  25. package/src/default/redis.class.ts +1 -1
  26. package/src/default/socket-io.class.ts +68 -0
  27. package/src/factory/server-factory.class.ts +1 -1
  28. package/src/typespeed.d.ts +19 -1
  29. package/src/typespeed.ts +7 -4
  30. package/test/socket.test.ts +60 -0
  31. package/tsconfig.json +2 -1
  32. package/app/node_modules/.package-lock.json +0 -134
  33. package/app/node_modules/@types/body-parser/LICENSE +0 -21
  34. package/app/node_modules/@types/body-parser/README.md +0 -16
  35. package/app/node_modules/@types/body-parser/index.d.ts +0 -107
  36. package/app/node_modules/@types/body-parser/package.json +0 -58
  37. package/app/node_modules/@types/connect/LICENSE +0 -21
  38. package/app/node_modules/@types/connect/README.md +0 -16
  39. package/app/node_modules/@types/connect/index.d.ts +0 -93
  40. package/app/node_modules/@types/connect/package.json +0 -32
  41. package/app/node_modules/@types/express/LICENSE +0 -21
  42. package/app/node_modules/@types/express/README.md +0 -16
  43. package/app/node_modules/@types/express/index.d.ts +0 -136
  44. package/app/node_modules/@types/express/package.json +0 -45
  45. package/app/node_modules/@types/express-serve-static-core/LICENSE +0 -21
  46. package/app/node_modules/@types/express-serve-static-core/README.md +0 -16
  47. package/app/node_modules/@types/express-serve-static-core/index.d.ts +0 -1281
  48. package/app/node_modules/@types/express-serve-static-core/package.json +0 -55
  49. package/app/node_modules/@types/mime/LICENSE +0 -21
  50. package/app/node_modules/@types/mime/Mime.d.ts +0 -10
  51. package/app/node_modules/@types/mime/README.md +0 -16
  52. package/app/node_modules/@types/mime/index.d.ts +0 -35
  53. package/app/node_modules/@types/mime/lite.d.ts +0 -7
  54. package/app/node_modules/@types/mime/package.json +0 -29
  55. package/app/node_modules/@types/node/LICENSE +0 -21
  56. package/app/node_modules/@types/node/README.md +0 -16
  57. package/app/node_modules/@types/node/assert/strict.d.ts +0 -8
  58. package/app/node_modules/@types/node/assert.d.ts +0 -961
  59. package/app/node_modules/@types/node/async_hooks.d.ts +0 -518
  60. package/app/node_modules/@types/node/buffer.d.ts +0 -2323
  61. package/app/node_modules/@types/node/child_process.d.ts +0 -1399
  62. package/app/node_modules/@types/node/cluster.d.ts +0 -410
  63. package/app/node_modules/@types/node/console.d.ts +0 -412
  64. package/app/node_modules/@types/node/constants.d.ts +0 -18
  65. package/app/node_modules/@types/node/crypto.d.ts +0 -3973
  66. package/app/node_modules/@types/node/dgram.d.ts +0 -545
  67. package/app/node_modules/@types/node/diagnostics_channel.d.ts +0 -192
  68. package/app/node_modules/@types/node/dns/promises.d.ts +0 -370
  69. package/app/node_modules/@types/node/dns.d.ts +0 -660
  70. package/app/node_modules/@types/node/dom-events.d.ts +0 -126
  71. package/app/node_modules/@types/node/domain.d.ts +0 -170
  72. package/app/node_modules/@types/node/events.d.ts +0 -682
  73. package/app/node_modules/@types/node/fs/promises.d.ts +0 -1159
  74. package/app/node_modules/@types/node/fs.d.ts +0 -3976
  75. package/app/node_modules/@types/node/globals.d.ts +0 -303
  76. package/app/node_modules/@types/node/globals.global.d.ts +0 -1
  77. package/app/node_modules/@types/node/http.d.ts +0 -1714
  78. package/app/node_modules/@types/node/http2.d.ts +0 -2133
  79. package/app/node_modules/@types/node/https.d.ts +0 -542
  80. package/app/node_modules/@types/node/index.d.ts +0 -134
  81. package/app/node_modules/@types/node/inspector.d.ts +0 -2741
  82. package/app/node_modules/@types/node/module.d.ts +0 -115
  83. package/app/node_modules/@types/node/net.d.ts +0 -883
  84. package/app/node_modules/@types/node/os.d.ts +0 -473
  85. package/app/node_modules/@types/node/package.json +0 -237
  86. package/app/node_modules/@types/node/path.d.ts +0 -191
  87. package/app/node_modules/@types/node/perf_hooks.d.ts +0 -625
  88. package/app/node_modules/@types/node/process.d.ts +0 -1488
  89. package/app/node_modules/@types/node/punycode.d.ts +0 -117
  90. package/app/node_modules/@types/node/querystring.d.ts +0 -131
  91. package/app/node_modules/@types/node/readline/promises.d.ts +0 -143
  92. package/app/node_modules/@types/node/readline.d.ts +0 -653
  93. package/app/node_modules/@types/node/repl.d.ts +0 -424
  94. package/app/node_modules/@types/node/stream/consumers.d.ts +0 -12
  95. package/app/node_modules/@types/node/stream/promises.d.ts +0 -42
  96. package/app/node_modules/@types/node/stream/web.d.ts +0 -330
  97. package/app/node_modules/@types/node/stream.d.ts +0 -1440
  98. package/app/node_modules/@types/node/string_decoder.d.ts +0 -67
  99. package/app/node_modules/@types/node/test.d.ts +0 -783
  100. package/app/node_modules/@types/node/timers/promises.d.ts +0 -93
  101. package/app/node_modules/@types/node/timers.d.ts +0 -101
  102. package/app/node_modules/@types/node/tls.d.ts +0 -1111
  103. package/app/node_modules/@types/node/trace_events.d.ts +0 -171
  104. package/app/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  105. package/app/node_modules/@types/node/ts4.8/assert.d.ts +0 -961
  106. package/app/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -518
  107. package/app/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2323
  108. package/app/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1399
  109. package/app/node_modules/@types/node/ts4.8/cluster.d.ts +0 -410
  110. package/app/node_modules/@types/node/ts4.8/console.d.ts +0 -412
  111. package/app/node_modules/@types/node/ts4.8/constants.d.ts +0 -18
  112. package/app/node_modules/@types/node/ts4.8/crypto.d.ts +0 -3972
  113. package/app/node_modules/@types/node/ts4.8/dgram.d.ts +0 -545
  114. package/app/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -192
  115. package/app/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -370
  116. package/app/node_modules/@types/node/ts4.8/dns.d.ts +0 -660
  117. package/app/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -126
  118. package/app/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  119. package/app/node_modules/@types/node/ts4.8/events.d.ts +0 -682
  120. package/app/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1138
  121. package/app/node_modules/@types/node/ts4.8/fs.d.ts +0 -3875
  122. package/app/node_modules/@types/node/ts4.8/globals.d.ts +0 -302
  123. package/app/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  124. package/app/node_modules/@types/node/ts4.8/http.d.ts +0 -1651
  125. package/app/node_modules/@types/node/ts4.8/http2.d.ts +0 -2133
  126. package/app/node_modules/@types/node/ts4.8/https.d.ts +0 -542
  127. package/app/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  128. package/app/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2741
  129. package/app/node_modules/@types/node/ts4.8/module.d.ts +0 -115
  130. package/app/node_modules/@types/node/ts4.8/net.d.ts +0 -883
  131. package/app/node_modules/@types/node/ts4.8/os.d.ts +0 -473
  132. package/app/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  133. package/app/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -625
  134. package/app/node_modules/@types/node/ts4.8/process.d.ts +0 -1488
  135. package/app/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  136. package/app/node_modules/@types/node/ts4.8/querystring.d.ts +0 -131
  137. package/app/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -143
  138. package/app/node_modules/@types/node/ts4.8/readline.d.ts +0 -653
  139. package/app/node_modules/@types/node/ts4.8/repl.d.ts +0 -424
  140. package/app/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  141. package/app/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -42
  142. package/app/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -330
  143. package/app/node_modules/@types/node/ts4.8/stream.d.ts +0 -1440
  144. package/app/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  145. package/app/node_modules/@types/node/ts4.8/test.d.ts +0 -784
  146. package/app/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  147. package/app/node_modules/@types/node/ts4.8/timers.d.ts +0 -94
  148. package/app/node_modules/@types/node/ts4.8/tls.d.ts +0 -1111
  149. package/app/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -171
  150. package/app/node_modules/@types/node/ts4.8/tty.d.ts +0 -206
  151. package/app/node_modules/@types/node/ts4.8/url.d.ts +0 -902
  152. package/app/node_modules/@types/node/ts4.8/util.d.ts +0 -2017
  153. package/app/node_modules/@types/node/ts4.8/v8.d.ts +0 -541
  154. package/app/node_modules/@types/node/ts4.8/vm.d.ts +0 -644
  155. package/app/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  156. package/app/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -695
  157. package/app/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  158. package/app/node_modules/@types/node/tty.d.ts +0 -206
  159. package/app/node_modules/@types/node/url.d.ts +0 -902
  160. package/app/node_modules/@types/node/util.d.ts +0 -2017
  161. package/app/node_modules/@types/node/v8.d.ts +0 -541
  162. package/app/node_modules/@types/node/vm.d.ts +0 -644
  163. package/app/node_modules/@types/node/wasi.d.ts +0 -158
  164. package/app/node_modules/@types/node/worker_threads.d.ts +0 -695
  165. package/app/node_modules/@types/node/zlib.d.ts +0 -517
  166. package/app/node_modules/@types/qs/LICENSE +0 -21
  167. package/app/node_modules/@types/qs/README.md +0 -16
  168. package/app/node_modules/@types/qs/index.d.ts +0 -62
  169. package/app/node_modules/@types/qs/package.json +0 -65
  170. package/app/node_modules/@types/range-parser/LICENSE +0 -21
  171. package/app/node_modules/@types/range-parser/README.md +0 -55
  172. package/app/node_modules/@types/range-parser/index.d.ts +0 -35
  173. package/app/node_modules/@types/range-parser/package.json +0 -25
  174. package/app/node_modules/@types/send/LICENSE +0 -21
  175. package/app/node_modules/@types/send/README.md +0 -16
  176. package/app/node_modules/@types/send/index.d.ts +0 -231
  177. package/app/node_modules/@types/send/package.json +0 -33
  178. package/app/node_modules/@types/serve-static/LICENSE +0 -21
  179. package/app/node_modules/@types/serve-static/README.md +0 -16
  180. package/app/node_modules/@types/serve-static/index.d.ts +0 -113
  181. package/app/node_modules/@types/serve-static/package.json +0 -38
  182. package/app/node_modules/colors/LICENSE +0 -25
  183. package/app/node_modules/colors/README.md +0 -221
  184. package/app/node_modules/colors/examples/normal-usage.js +0 -82
  185. package/app/node_modules/colors/examples/safe-string.js +0 -79
  186. package/app/node_modules/colors/index.d.ts +0 -136
  187. package/app/node_modules/colors/lib/colors.js +0 -211
  188. package/app/node_modules/colors/lib/custom/trap.js +0 -46
  189. package/app/node_modules/colors/lib/custom/zalgo.js +0 -110
  190. package/app/node_modules/colors/lib/extendStringPrototype.js +0 -110
  191. package/app/node_modules/colors/lib/index.js +0 -13
  192. package/app/node_modules/colors/lib/maps/america.js +0 -10
  193. package/app/node_modules/colors/lib/maps/rainbow.js +0 -12
  194. package/app/node_modules/colors/lib/maps/random.js +0 -11
  195. package/app/node_modules/colors/lib/maps/zebra.js +0 -5
  196. package/app/node_modules/colors/lib/styles.js +0 -95
  197. package/app/node_modules/colors/lib/system/has-flag.js +0 -35
  198. package/app/node_modules/colors/lib/system/supports-colors.js +0 -151
  199. package/app/node_modules/colors/package.json +0 -45
  200. package/app/node_modules/colors/safe.d.ts +0 -48
  201. package/app/node_modules/colors/safe.js +0 -10
  202. package/app/node_modules/colors/themes/generic-logging.js +0 -12
  203. package/app/node_modules/dateformat/LICENSE +0 -20
  204. package/app/node_modules/dateformat/Readme.md +0 -204
  205. package/app/node_modules/dateformat/lib/dateformat.js +0 -1
  206. package/app/node_modules/dateformat/package.json +0 -38
  207. package/app/node_modules/mkdirp/CHANGELOG.md +0 -15
  208. package/app/node_modules/mkdirp/LICENSE +0 -21
  209. package/app/node_modules/mkdirp/bin/cmd.js +0 -68
  210. package/app/node_modules/mkdirp/index.js +0 -31
  211. package/app/node_modules/mkdirp/lib/find-made.js +0 -29
  212. package/app/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  213. package/app/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  214. package/app/node_modules/mkdirp/lib/opts-arg.js +0 -23
  215. package/app/node_modules/mkdirp/lib/path-arg.js +0 -29
  216. package/app/node_modules/mkdirp/lib/use-native.js +0 -10
  217. package/app/node_modules/mkdirp/package.json +0 -44
  218. package/app/node_modules/mkdirp/readme.markdown +0 -266
  219. package/app/node_modules/tinytim/.travis.yml +0 -5
  220. package/app/node_modules/tinytim/README.md +0 -212
  221. package/app/node_modules/tinytim/index.js +0 -1
  222. package/app/node_modules/tinytim/lib/index.js +0 -55
  223. package/app/node_modules/tinytim/lib/tinytim.js +0 -50
  224. package/app/node_modules/tinytim/package.json +0 -24
  225. package/app/node_modules/tinytim/test/files/html.tim +0 -1
  226. package/app/node_modules/tinytim/test/files/string.tim +0 -1
  227. package/app/node_modules/tinytim/test/files/string2.tim +0 -1
  228. package/app/node_modules/tinytim/test/render-file-replace.js +0 -39
  229. package/app/node_modules/tinytim/test/render-replace.js +0 -94
  230. package/app/node_modules/tinytim/test/tim-replace.js +0 -95
  231. package/app/node_modules/tracer/README.md +0 -747
  232. package/app/node_modules/tracer/lib/color_console.js +0 -15
  233. package/app/node_modules/tracer/lib/console.js +0 -165
  234. package/app/node_modules/tracer/lib/dailyfile.js +0 -92
  235. package/app/node_modules/tracer/lib/index.js +0 -10
  236. package/app/node_modules/tracer/lib/settings.js +0 -25
  237. package/app/node_modules/tracer/lib/utils.js +0 -58
  238. package/app/node_modules/tracer/package.json +0 -53
  239. package/app/node_modules/tracer/types/index.d.ts +0 -189
  240. package/dist/scaffold/templates/front-page.class.ts.tpl +0 -12
  241. package/dist/scaffold/templates/main.ts.tpl +0 -13
  242. package/dist/scaffold/templates/nodemon.json.tpl +0 -7
  243. package/dist/scaffold/templates/package.json.tpl +0 -16
  244. package/dist/scaffold/templates/tsconfig.json.tpl +0 -20
  245. /package/dist/{core.decorator.js → src/core.decorator.js} +0 -0
  246. /package/dist/{default → src/default}/default-authentication.class.js +0 -0
  247. /package/dist/{default → src/default}/log-default.class.js +0 -0
  248. /package/dist/{default → src/default}/node-cache.class.js +0 -0
  249. /package/dist/{default → src/default}/pages/404.html +0 -0
  250. /package/dist/{default → src/default}/pages/500.html +0 -0
  251. /package/dist/{default → src/default}/read-write-db.class.js +0 -0
  252. /package/dist/{factory → src/factory}/authentication-factory.class.js +0 -0
  253. /package/dist/{factory → src/factory}/cache-factory.class.js +0 -0
  254. /package/dist/{factory → src/factory}/data-source-factory.class.js +0 -0
  255. /package/dist/{factory → src/factory}/log-factory.class.js +0 -0
  256. /package/dist/{factory → src/factory}/server-factory.class.js +0 -0
  257. /package/dist/{route.decorator.js → src/route.decorator.js} +0 -0
  258. /package/dist/{scaffold → src/scaffold}/command.js +0 -0
@@ -1,5 +1,6 @@
1
1
  import * as express from "express";
2
2
  import { Redis as IoRedis, RedisKey } from "ioredis";
3
+ import { Server as IoServer } from "socket.io";
3
4
  import "reflect-metadata";
4
5
 
5
6
  /**设置路由中间件 */
@@ -375,5 +376,22 @@ declare class ExpressServer extends ServerFactory {
375
376
  start(port: number): void;
376
377
  private setDefaultMiddleware;
377
378
  }
379
+ /**Socket IO 装饰器类 */
380
+ declare class SocketIo {
381
+ public static setIoServer(app, ioSocketConfig);
382
+ /**
383
+ * Socket IO 事件装饰器
384
+ * @param event 事件名称
385
+ */
386
+ public static onEvent(event: string): (target: any, propertyKey: string) => void;
387
+ /**Socket IO 错误捕获装饰器 */
388
+ public static onError(target: any, propertyKey: string): void;
389
+ /**Socket IO 客户端断开连接事件装饰器 */
390
+ public static onDisconnect(target: any, propertyKey: string): void;
391
+ /**Socket IO 客户端连接成功事件装饰器 */
392
+ public static onConnected(target: any, propertyKey: string): void;
393
+ }
394
+ /**Socket IO 服务实现类 */
395
+ declare const io: IoServer;
378
396
 
379
- export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, redisSubscriber, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model };
397
+ export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, redisSubscriber, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model, SocketIo, io };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typespeed",
3
- "version": "2.3.6",
3
+ "version": "2.4.2",
4
4
  "description": "A new Framework for TypeScript.",
5
5
  "author": "speedphp",
6
6
  "license": "MIT License",
@@ -10,9 +10,7 @@
10
10
  "start": "ts-node --transpile-only app/src/main.ts",
11
11
  "build": "tsc -p .",
12
12
  "postbuild": "cp src/typespeed.d.ts dist/typespeed.d.ts && cp -r src/default/pages dist/default/pages && cp -r src/scaffold/templates dist/scaffold/templates",
13
- "prebuild": "rm -rf dist",
14
- "prepublishOnly": "npm version patch && npm run build",
15
- "upgrade": "npm version minor"
13
+ "prebuild": "rm -rf dist"
16
14
  },
17
15
  "main": "dist/typespeed.js",
18
16
  "bin": {
@@ -33,6 +31,7 @@
33
31
  "middleware"
34
32
  ],
35
33
  "dependencies": {
34
+ "amqplib": "0.10.3",
36
35
  "commander": "^9.4.0",
37
36
  "compression": "^1.7.4",
38
37
  "connect-redis": "^6.1.3",
@@ -51,19 +50,20 @@
51
50
  "node-cache": "^5.1.2",
52
51
  "reflect-metadata": "^0.1.13",
53
52
  "serve-favicon": "^2.5.0",
53
+ "socket.io": "4.7.1",
54
54
  "tracer": "^1.1.6",
55
- "walk-sync": "^3.0.0",
56
- "amqplib": "0.10.3"
55
+ "walk-sync": "^3.0.0"
57
56
  },
58
57
  "devDependencies": {
59
- "@types/node": "^18.0.6",
60
58
  "@types/express": "^4.17.13",
61
59
  "@types/mocha": "^10.0.1",
60
+ "@types/node": "^18.0.6",
62
61
  "chai": "4.3.7",
63
62
  "chai-http": "^4.4.0",
64
63
  "mocha": "10.2.0",
65
64
  "nyc": "^15.1.0",
66
65
  "ts-node": "^10.9.1",
67
- "typescript": "^4.9.5"
66
+ "typescript": "^4.9.5",
67
+ "socket.io-client": "4.7.1"
68
68
  }
69
69
  }
@@ -313,13 +313,11 @@ class Model {
313
313
  result["sql"] += `(${orSql})`;
314
314
  } else {
315
315
  const operatorTemplate = { $lt: "<", $lte: "<=", $gt: ">", $gte: ">=", $ne: "!=", $like: "LIKE" };
316
- let firstCondition: boolean = Object.keys(conditions[field]).length > 1;
317
- Object.keys(conditions[field]).map((operator) => {
316
+ Object.keys(conditions[field]).map((operator, index) => {
318
317
  if (operatorTemplate[operator]) {
319
318
  const operatorValue = operatorTemplate[operator];
320
- result["sql"] += ` ${field} ${operatorValue} ? ` + (firstCondition ? " AND " : "");
319
+ result["sql"] += (index ? " AND " : "") + ` ${field} ${operatorValue} ? `;
321
320
  result["values"].push(conditions[field][operator]);
322
- firstCondition = false;
323
321
  }
324
322
  });
325
323
  }
@@ -8,8 +8,9 @@ import * as expressSession from "express-session";
8
8
  import * as connectRedis from "connect-redis";
9
9
  import ServerFactory from "../factory/server-factory.class";
10
10
  import { setRouter } from "../route.decorator";
11
+ import { SocketIo } from "../default/socket-io.class";
11
12
  import { value } from "../typespeed";
12
- import { bean, log, error, autoware } from "../core.decorator";
13
+ import { bean, error, autoware, resource } from "../core.decorator";
13
14
  import { Redis } from "./redis.class";
14
15
  import AuthenticationFactory from "../factory/authentication-factory.class";
15
16
 
@@ -36,6 +37,12 @@ export default class ExpressServer extends ServerFactory {
36
37
  @value("redis")
37
38
  private redisConfig: object;
38
39
 
40
+ @value("socket")
41
+ private socketIoConfig: object;
42
+
43
+ @value("MAIN_PATH")
44
+ private mainPath: string;
45
+
39
46
  @autoware
40
47
  private redisClient: Redis;
41
48
 
@@ -53,14 +60,18 @@ export default class ExpressServer extends ServerFactory {
53
60
  this.middlewareList.push(middleware);
54
61
  }
55
62
 
56
- public start(port: number, callback?: Function): any {
63
+ public start(port: number): any {
57
64
  this.middlewareList.forEach(middleware => {
58
65
  this.app.use(middleware);
59
66
  });
60
67
 
61
68
  this.setDefaultMiddleware();
62
-
63
- return this.app.listen(port, callback);
69
+ if(this.socketIoConfig) {
70
+ const newSocketApp = SocketIo.setIoServer(this.app, this.socketIoConfig);
71
+ return newSocketApp.listen(port);
72
+ }else{
73
+ return this.app.listen(port);
74
+ }
64
75
  }
65
76
 
66
77
  private setDefaultMiddleware() {
@@ -70,7 +81,7 @@ export default class ExpressServer extends ServerFactory {
70
81
  const viewConfig = this.view;
71
82
  this.app.engine(viewConfig["suffix"], consolidate[viewConfig["engine"]]);
72
83
  this.app.set('view engine', viewConfig["suffix"]);
73
- this.app.set('views', process.cwd() + viewConfig["path"]);
84
+ this.app.set('views', this.mainPath + viewConfig["path"]);
74
85
  }
75
86
 
76
87
  if (this.session) {
@@ -87,7 +98,7 @@ export default class ExpressServer extends ServerFactory {
87
98
  }
88
99
 
89
100
  if (this.favicon) {
90
- const faviconPath = process.cwd() + this.favicon;
101
+ const faviconPath = this.mainPath + this.favicon;
91
102
  this.app.use(serveFavicon(faviconPath));
92
103
  }
93
104
 
@@ -102,7 +113,7 @@ export default class ExpressServer extends ServerFactory {
102
113
  this.app.use(this.authentication.preHandle);
103
114
 
104
115
  if (this.static) {
105
- const staticPath = process.cwd() + this.static;
116
+ const staticPath = this.mainPath + this.static;
106
117
  this.app.use(express.static(staticPath))
107
118
  }
108
119
  setRouter(this.app);
@@ -15,14 +15,14 @@ class RabbitMQ {
15
15
 
16
16
  public async publishMessageToExchange(exchange: string, routingKey: string, message: string): Promise<void> {
17
17
  const channel = await getChannel();
18
- await channel.checkExchange(exchange);
18
+ await channel.assertExchange(exchange);
19
19
  channel.publish(exchange, routingKey, Buffer.from(message));
20
20
  await channel.close();
21
21
  }
22
22
 
23
23
  public async sendMessageToQueue(queue: string, message: string): Promise<void> {
24
24
  const channel = await getChannel();
25
- await channel.checkQueue(queue);
25
+ await channel.accertQueue(queue);
26
26
  channel.sendToQueue(queue, Buffer.from(message));
27
27
  await channel.close();
28
28
  }
@@ -51,7 +51,7 @@ function rabbitListener(queue: string) {
51
51
  return (target: any, propertyKey: string) => {
52
52
  (async function () {
53
53
  const channel = await getChannel();
54
- await channel.checkQueue(queue);
54
+ await channel.assertQueue(queue);
55
55
  await channel.consume(queue, target[propertyKey], { noAck: true });
56
56
  }());
57
57
  }
@@ -1,5 +1,5 @@
1
1
  import { bean } from "../core.decorator";
2
- import { Redis as IoRedis, RedisKey} from "ioredis";
2
+ import { default as IoRedis, RedisKey} from "ioredis";
3
3
  import { config } from "../typespeed";
4
4
  const redisSubscribers = {};
5
5
 
@@ -0,0 +1,68 @@
1
+ import { Server as IoServer } from "socket.io";
2
+ import { createServer } from "http";
3
+
4
+ let io: IoServer = null;
5
+ const listeners = { "event": [], "disconnect": null, "error": null, "connected": null };
6
+
7
+ class SocketIo {
8
+
9
+ public static setIoServer(app, ioSocketConfig) {
10
+ const httpServer = createServer(app);
11
+ io = new IoServer(httpServer, ioSocketConfig);
12
+ io.use((socket, next) => {
13
+ if (listeners["connected"] !== null) {
14
+ listeners["connected"](socket, async (err) => {
15
+ if (listeners["error"] !== null && err) {
16
+ await listeners["error"](socket, err);
17
+ }
18
+ });
19
+ }
20
+ next();
21
+ });
22
+ io.on("connection", (socket) => {
23
+ if (listeners["disconnect"] !== null) {
24
+ socket.on("disconnect", async (reason) => {
25
+ await listeners["disconnect"](socket, reason);
26
+ });
27
+ }
28
+ socket.use(async ([event, ...args], next) => {
29
+ try {
30
+ for (let listener of listeners["event"]) {
31
+ if (listener[1] === event) {
32
+ await listener[0](socket, ...args);
33
+ }
34
+ }
35
+ } catch (err) {
36
+ next(err);
37
+ }
38
+ });
39
+
40
+ if (listeners["error"] !== null) {
41
+ socket.on("error", async (err) => {
42
+ await listeners["error"](socket, err);
43
+ });
44
+ }
45
+ });
46
+ return httpServer;
47
+ }
48
+
49
+ public static onEvent(event: string) {
50
+ return (target: any, propertyKey: string) => {
51
+ listeners["event"].push([target[propertyKey], event]);
52
+ }
53
+ }
54
+
55
+ public static onError(target: any, propertyKey: string) {
56
+ listeners["error"] = target[propertyKey];
57
+ }
58
+
59
+ public static onDisconnect(target: any, propertyKey: string) {
60
+ listeners["disconnect"] = target[propertyKey];
61
+ }
62
+
63
+ public static onConnected(target: any, propertyKey: string) {
64
+ listeners["connected"] = target[propertyKey];
65
+ }
66
+ }
67
+
68
+ export { SocketIo, io }
@@ -2,5 +2,5 @@ export default abstract class ServerFactory {
2
2
  public app;
3
3
  protected middlewareList: Array<any> = [];
4
4
  public abstract setMiddleware(middleware: any);
5
- public abstract start(port: number, callback?: Function): any;
5
+ public abstract start(port: number): any;
6
6
  }
@@ -1,5 +1,6 @@
1
1
  import * as express from "express";
2
2
  import { Redis as IoRedis, RedisKey } from "ioredis";
3
+ import { Server as IoServer } from "socket.io";
3
4
  import "reflect-metadata";
4
5
 
5
6
  /**设置路由中间件 */
@@ -375,5 +376,22 @@ declare class ExpressServer extends ServerFactory {
375
376
  start(port: number): void;
376
377
  private setDefaultMiddleware;
377
378
  }
379
+ /**Socket IO 装饰器类 */
380
+ declare class SocketIo {
381
+ public static setIoServer(app, ioSocketConfig);
382
+ /**
383
+ * Socket IO 事件装饰器
384
+ * @param event 事件名称
385
+ */
386
+ public static onEvent(event: string): (target: any, propertyKey: string) => void;
387
+ /**Socket IO 错误捕获装饰器 */
388
+ public static onError(target: any, propertyKey: string): void;
389
+ /**Socket IO 客户端断开连接事件装饰器 */
390
+ public static onDisconnect(target: any, propertyKey: string): void;
391
+ /**Socket IO 客户端连接成功事件装饰器 */
392
+ public static onConnected(target: any, propertyKey: string): void;
393
+ }
394
+ /**Socket IO 服务实现类 */
395
+ declare const io: IoServer;
378
396
 
379
- export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, redisSubscriber, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model };
397
+ export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, redisSubscriber, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model, SocketIo, io };
package/src/typespeed.ts CHANGED
@@ -4,7 +4,7 @@ import * as path from "path";
4
4
  import * as walkSync from "walk-sync";
5
5
 
6
6
  let globalConfig = {};
7
- const coreDir = __dirname;
7
+ const corePath = __dirname;
8
8
  const mainPath = path.dirname(getRootPath(new Error().stack.split("\n")) || process.argv[1]);
9
9
  const configFile = mainPath + "/config.json";
10
10
  if (fs.existsSync(configFile)) {
@@ -15,16 +15,18 @@ if (fs.existsSync(configFile)) {
15
15
  globalConfig = Object.assign(globalConfig, JSON.parse(fs.readFileSync(envConfigFile, "utf-8")));
16
16
  }
17
17
  }
18
+ globalConfig["MAIN_PATH"] = mainPath;
19
+ globalConfig["CORE_PATH"] = corePath;
18
20
 
19
21
  function app<T extends { new(...args: any[]): {} }>(constructor: T) {
20
- const coreFiles = walkSync(coreDir, { globs: ['**/*.ts'], ignore: ['**/*.d.ts', 'scaffold/**'] });
22
+ const coreFiles = walkSync(corePath, { globs: ['**/*.ts'], ignore: ['**/*.d.ts', 'scaffold/**'] });
21
23
  const mainFiles = walkSync(mainPath, { globs: ['**/*.ts'] });
22
24
 
23
25
  (async function () {
24
26
  try {
25
27
  for (let p of coreFiles) {
26
28
  let moduleName = p.replace(".d.ts", "").replace(".ts", "");
27
- await import(coreDir + "/" + moduleName);
29
+ await import(corePath + "/" + moduleName);
28
30
  }
29
31
 
30
32
  for (let p of mainFiles) {
@@ -99,4 +101,5 @@ export { default as LogDefault} from "./default/log-default.class";
99
101
  export { default as NodeCache} from "./default/node-cache.class";
100
102
  export { Redis, redisSubscriber } from "./default/redis.class";
101
103
  export { default as ReadWriteDb} from "./default/read-write-db.class";
102
- export * from "./default/rabbitmq.class";
104
+ export * from "./default/rabbitmq.class";
105
+ export * from "./default/socket-io.class";
@@ -0,0 +1,60 @@
1
+ const chaiObj = require('chai');
2
+ chaiObj.use(require("chai-http"));
3
+ import { io as Client } from "socket.io-client";
4
+ const expect = chaiObj.expect;
5
+
6
+ describe("Test Socket IO", () => {
7
+ const testAddr = `http://${process.env.LOCAL_HOST || "localhost"}:8081`;
8
+ let clientHanMeiMei, clientLiLei;
9
+ before((done) => {
10
+ clientHanMeiMei = Client(testAddr);
11
+ clientLiLei = Client(testAddr);
12
+ clientHanMeiMei.on("connect", done);
13
+ });
14
+ after(() => {
15
+ clientHanMeiMei.close();
16
+ clientLiLei.close();
17
+ });
18
+ it("send and receive message", (done) => {
19
+ clientHanMeiMei.on("all", (arg) => {
20
+ expect(arg).to.be.include("LiLei");
21
+ clientHanMeiMei.removeAllListeners("all");
22
+ done();
23
+ });
24
+ clientLiLei.emit("say", "test-from-client-1");
25
+ });
26
+ it("test join room", (done) => {
27
+ clientHanMeiMei.emit("join", "");
28
+ clientHanMeiMei.on("all", (arg) => {
29
+ expect(arg).to.be.include("joined private-room");
30
+ clientHanMeiMei.removeAllListeners("all");
31
+ done();
32
+ });
33
+ });
34
+ it("test say in room", (done) => {
35
+ const message = "I said in Room";
36
+ clientHanMeiMei.on("all", (arg) => {
37
+ expect(arg).to.be.include(message);
38
+ clientHanMeiMei.removeAllListeners("all");
39
+ done();
40
+ });
41
+ clientHanMeiMei.emit("say-inroom", message);
42
+ });
43
+ it("test error catching", (done) => {
44
+ clientHanMeiMei.on("all", (arg) => {
45
+ expect(arg).to.be.include("We have a problem!");
46
+ clientHanMeiMei.removeAllListeners("all");
47
+ done();
48
+ });
49
+ clientHanMeiMei.emit("test-error", "");
50
+ });
51
+ it("test disconnecting", (done) => {
52
+ clientLiLei.on("all", (arg) => {
53
+ expect(arg).to.be.include("lost a member");
54
+ clientLiLei.removeAllListeners("all");
55
+ done();
56
+ });
57
+ clientHanMeiMei.disconnect();
58
+ });
59
+ });
60
+
package/tsconfig.json CHANGED
@@ -14,7 +14,8 @@
14
14
  },
15
15
  "include": [
16
16
  "./src/**/*.ts",
17
- "./src/typespeed.d.ts"
17
+ "./src/typespeed.d.ts",
18
+ "./introduction/**/*.ts",
18
19
  ],
19
20
  "exclude": [
20
21
  "node_modules",
@@ -1,134 +0,0 @@
1
- {
2
- "name": "test-typespeed",
3
- "version": "1.0.0",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "node_modules/@types/body-parser": {
8
- "version": "1.19.2",
9
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
10
- "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
11
- "dependencies": {
12
- "@types/connect": "*",
13
- "@types/node": "*"
14
- }
15
- },
16
- "node_modules/@types/connect": {
17
- "version": "3.4.35",
18
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
19
- "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
20
- "dependencies": {
21
- "@types/node": "*"
22
- }
23
- },
24
- "node_modules/@types/express": {
25
- "version": "4.17.17",
26
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
27
- "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==",
28
- "dependencies": {
29
- "@types/body-parser": "*",
30
- "@types/express-serve-static-core": "^4.17.33",
31
- "@types/qs": "*",
32
- "@types/serve-static": "*"
33
- }
34
- },
35
- "node_modules/@types/express-serve-static-core": {
36
- "version": "4.17.35",
37
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz",
38
- "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==",
39
- "dependencies": {
40
- "@types/node": "*",
41
- "@types/qs": "*",
42
- "@types/range-parser": "*",
43
- "@types/send": "*"
44
- }
45
- },
46
- "node_modules/@types/mime": {
47
- "version": "1.3.2",
48
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
49
- "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
50
- },
51
- "node_modules/@types/node": {
52
- "version": "18.16.14",
53
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.14.tgz",
54
- "integrity": "sha512-+ImzUB3mw2c5ISJUq0punjDilUQ5GnUim0ZRvchHIWJmOC0G+p0kzhXBqj6cDjK0QdPFwzrHWgrJp3RPvCG5qg=="
55
- },
56
- "node_modules/@types/qs": {
57
- "version": "6.9.7",
58
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
59
- "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
60
- },
61
- "node_modules/@types/range-parser": {
62
- "version": "1.2.4",
63
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
64
- "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
65
- },
66
- "node_modules/@types/send": {
67
- "version": "0.17.1",
68
- "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz",
69
- "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==",
70
- "dependencies": {
71
- "@types/mime": "^1",
72
- "@types/node": "*"
73
- }
74
- },
75
- "node_modules/@types/serve-static": {
76
- "version": "1.15.1",
77
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz",
78
- "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==",
79
- "dependencies": {
80
- "@types/mime": "*",
81
- "@types/node": "*"
82
- }
83
- },
84
- "node_modules/colors": {
85
- "version": "1.4.0",
86
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
87
- "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
88
- "engines": {
89
- "node": ">=0.1.90"
90
- }
91
- },
92
- "node_modules/dateformat": {
93
- "version": "4.5.1",
94
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.5.1.tgz",
95
- "integrity": "sha512-OD0TZ+B7yP7ZgpJf5K2DIbj3FZvFvxgFUuaqA/V5zTjAtAAXZ1E8bktHxmAGs4x5b7PflqA9LeQ84Og7wYtF7Q==",
96
- "engines": {
97
- "node": "*"
98
- }
99
- },
100
- "node_modules/mkdirp": {
101
- "version": "1.0.4",
102
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
103
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
104
- "bin": {
105
- "mkdirp": "bin/cmd.js"
106
- },
107
- "engines": {
108
- "node": ">=10"
109
- }
110
- },
111
- "node_modules/tinytim": {
112
- "version": "0.1.1",
113
- "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz",
114
- "integrity": "sha512-NIpsp9lBIxPNzB++HnMmUd4byzJSVbbO4F+As1Gb1IG/YQT5QvmBDjpx8SpDS8fhGC+t+Qw8ldQgbcAIaU+2cA==",
115
- "engines": {
116
- "node": ">= 0.2.0"
117
- }
118
- },
119
- "node_modules/tracer": {
120
- "version": "1.1.6",
121
- "resolved": "https://registry.npmjs.org/tracer/-/tracer-1.1.6.tgz",
122
- "integrity": "sha512-VKEIQRNgzSgti18whs+8l7e2y/gWcklw+C/xZtFH/AGvaN6GDlvhkQTFEsy448Gxb5MtbNbzJiG0L1TJEQnqcA==",
123
- "dependencies": {
124
- "colors": "1.4.0",
125
- "dateformat": "4.5.1",
126
- "mkdirp": "^1.0.4",
127
- "tinytim": "0.1.1"
128
- },
129
- "engines": {
130
- "node": ">= 0.10.0"
131
- }
132
- }
133
- }
134
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/body-parser`
3
-
4
- # Summary
5
- This package contains type definitions for body-parser (https://github.com/expressjs/body-parser).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser.
9
-
10
- ### Additional Details
11
- * Last updated: Tue, 16 Nov 2021 18:31:30 GMT
12
- * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node)
13
- * Global values: none
14
-
15
- # Credits
16
- These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).