vona 1.0.0 → 5.0.7

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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -0
  4. package/dist/app/extend/context.d.ts +4 -0
  5. package/dist/app/extend/context.js +152 -0
  6. package/dist/index.d.ts +11 -0
  7. package/dist/index.js +35 -0
  8. package/dist/lib/base/dbTransaction.d.ts +12 -0
  9. package/dist/lib/base/dbTransaction.js +55 -0
  10. package/dist/lib/base/error.d.ts +18 -0
  11. package/dist/lib/base/error.js +70 -0
  12. package/dist/lib/base/model.d.ts +22 -0
  13. package/dist/lib/base/model.js +253 -0
  14. package/dist/lib/bean/_beanLocal_.d.ts +6 -0
  15. package/dist/lib/bean/_beanLocal_.js +16 -0
  16. package/dist/lib/bean/beanBase.d.ts +11 -0
  17. package/dist/lib/bean/beanBase.js +34 -0
  18. package/dist/lib/bean/beanBaseSimple.d.ts +8 -0
  19. package/dist/lib/bean/beanBaseSimple.js +31 -0
  20. package/dist/lib/bean/beanContainer.d.ts +39 -0
  21. package/dist/lib/bean/beanContainer.js +516 -0
  22. package/dist/lib/bean/beanLocal.d.ts +6 -0
  23. package/dist/lib/bean/beanLocal.js +16 -0
  24. package/dist/lib/bean/beanModuleScopeBase.d.ts +10 -0
  25. package/dist/lib/bean/beanModuleScopeBase.js +28 -0
  26. package/dist/lib/bean/beanScopeBase.d.ts +6 -0
  27. package/dist/lib/bean/beanScopeBase.js +19 -0
  28. package/dist/lib/bean/beanScopeScene.d.ts +12 -0
  29. package/dist/lib/bean/beanScopeScene.js +23 -0
  30. package/dist/lib/bean/beanSimple.d.ts +7 -0
  31. package/dist/lib/bean/beanSimple.js +24 -0
  32. package/dist/lib/bean/index.d.ts +8 -0
  33. package/dist/lib/bean/index.js +24 -0
  34. package/dist/lib/bean/resource/config/broadcast.d.ts +7 -0
  35. package/dist/lib/bean/resource/config/broadcast.js +3 -0
  36. package/dist/lib/bean/resource/config/index.d.ts +2 -0
  37. package/dist/lib/bean/resource/config/index.js +18 -0
  38. package/dist/lib/bean/resource/config/middleware.d.ts +9 -0
  39. package/dist/lib/bean/resource/config/middleware.js +3 -0
  40. package/dist/lib/bean/resource/config/startup.d.ts +9 -0
  41. package/dist/lib/bean/resource/config/startup.js +3 -0
  42. package/dist/lib/bean/resource/config/type.d.ts +43 -0
  43. package/dist/lib/bean/resource/config/type.js +3 -0
  44. package/dist/lib/bean/resource/constant/index.d.ts +2 -0
  45. package/dist/lib/bean/resource/constant/index.js +18 -0
  46. package/dist/lib/bean/resource/constant/type.d.ts +2 -0
  47. package/dist/lib/bean/resource/constant/type.js +3 -0
  48. package/dist/lib/bean/resource/entity/entityBase.d.ts +18 -0
  49. package/dist/lib/bean/resource/entity/entityBase.js +20 -0
  50. package/dist/lib/bean/resource/entity/index.d.ts +2 -0
  51. package/dist/lib/bean/resource/entity/index.js +18 -0
  52. package/dist/lib/bean/resource/entity/type.d.ts +4 -0
  53. package/dist/lib/bean/resource/entity/type.js +3 -0
  54. package/dist/lib/bean/resource/error/beanScopeError.d.ts +11 -0
  55. package/dist/lib/bean/resource/error/beanScopeError.js +34 -0
  56. package/dist/lib/bean/resource/error/beanScopeErrorImpl.d.ts +14 -0
  57. package/dist/lib/bean/resource/error/beanScopeErrorImpl.js +35 -0
  58. package/dist/lib/bean/resource/error/errorClass.d.ts +18 -0
  59. package/dist/lib/bean/resource/error/errorClass.js +78 -0
  60. package/dist/lib/bean/resource/error/errorContext.d.ts +38 -0
  61. package/dist/lib/bean/resource/error/errorContext.js +3 -0
  62. package/dist/lib/bean/resource/error/errorGlobal.d.ts +8 -0
  63. package/dist/lib/bean/resource/error/errorGlobal.js +3 -0
  64. package/dist/lib/bean/resource/error/errorInternal.d.ts +67 -0
  65. package/dist/lib/bean/resource/error/errorInternal.js +70 -0
  66. package/dist/lib/bean/resource/error/errorObject.d.ts +5 -0
  67. package/dist/lib/bean/resource/error/errorObject.js +3 -0
  68. package/dist/lib/bean/resource/error/index.d.ts +9 -0
  69. package/dist/lib/bean/resource/error/index.js +25 -0
  70. package/dist/lib/bean/resource/error/type.d.ts +9 -0
  71. package/dist/lib/bean/resource/error/type.js +3 -0
  72. package/dist/lib/bean/resource/index.d.ts +8 -0
  73. package/dist/lib/bean/resource/index.js +24 -0
  74. package/dist/lib/bean/resource/locale/beanScopeLocale.d.ts +11 -0
  75. package/dist/lib/bean/resource/locale/beanScopeLocale.js +33 -0
  76. package/dist/lib/bean/resource/locale/beanScopeLocaleImpl.d.ts +3 -0
  77. package/dist/lib/bean/resource/locale/beanScopeLocaleImpl.js +14 -0
  78. package/dist/lib/bean/resource/locale/index.d.ts +4 -0
  79. package/dist/lib/bean/resource/locale/index.js +20 -0
  80. package/dist/lib/bean/resource/locale/localeCtx.d.ts +8 -0
  81. package/dist/lib/bean/resource/locale/localeCtx.js +63 -0
  82. package/dist/lib/bean/resource/locale/type.d.ts +19 -0
  83. package/dist/lib/bean/resource/locale/type.js +3 -0
  84. package/dist/lib/bean/resource/model/beanModelBase.d.ts +24 -0
  85. package/dist/lib/bean/resource/model/beanModelBase.js +165 -0
  86. package/dist/lib/bean/resource/model/beanModelBaseInner.d.ts +29 -0
  87. package/dist/lib/bean/resource/model/beanModelBaseInner.js +86 -0
  88. package/dist/lib/bean/resource/model/index.d.ts +2 -0
  89. package/dist/lib/bean/resource/model/index.js +18 -0
  90. package/dist/lib/bean/resource/model/type.d.ts +14 -0
  91. package/dist/lib/bean/resource/model/type.js +3 -0
  92. package/dist/lib/bean/resource/route/index.d.ts +2 -0
  93. package/dist/lib/bean/resource/route/index.js +18 -0
  94. package/dist/lib/bean/resource/route/type.d.ts +60 -0
  95. package/dist/lib/bean/resource/route/type.js +3 -0
  96. package/dist/lib/bean/scope/beanScopeBase.d.ts +19 -0
  97. package/dist/lib/bean/scope/beanScopeBase.js +104 -0
  98. package/dist/lib/bean/scope/beanScopeBean.d.ts +10 -0
  99. package/dist/lib/bean/scope/beanScopeBean.js +34 -0
  100. package/dist/lib/bean/scope/beanScopeError.d.ts +11 -0
  101. package/dist/lib/bean/scope/beanScopeError.js +21 -0
  102. package/dist/lib/bean/scope/beanScopeErrorImpl.d.ts +14 -0
  103. package/dist/lib/bean/scope/beanScopeErrorImpl.js +21 -0
  104. package/dist/lib/bean/scope/beanScopeScene.d.ts +12 -0
  105. package/dist/lib/bean/scope/beanScopeScene.js +42 -0
  106. package/dist/lib/bean/scope/index.d.ts +5 -0
  107. package/dist/lib/bean/scope/index.js +21 -0
  108. package/dist/lib/bean/scope/type.d.ts +21 -0
  109. package/dist/lib/bean/scope/type.js +3 -0
  110. package/dist/lib/bean/type.d.ts +17 -0
  111. package/dist/lib/bean/type.js +4 -0
  112. package/dist/lib/core/index.d.ts +5 -0
  113. package/dist/lib/core/index.js +21 -0
  114. package/dist/lib/core/meta.d.ts +68 -0
  115. package/dist/lib/core/meta.js +345 -0
  116. package/dist/lib/core/metaCtx.d.ts +16 -0
  117. package/dist/lib/core/metaCtx.js +71 -0
  118. package/dist/lib/core/metadata.d.ts +12 -0
  119. package/dist/lib/core/metadata.js +52 -0
  120. package/dist/lib/core/resource.d.ts +29 -0
  121. package/dist/lib/core/resource.js +173 -0
  122. package/dist/lib/decorator/class/aop.d.ts +3 -0
  123. package/dist/lib/decorator/class/aop.js +22 -0
  124. package/dist/lib/decorator/class/atom.d.ts +2 -0
  125. package/dist/lib/decorator/class/atom.js +20 -0
  126. package/dist/lib/decorator/class/bean.d.ts +3 -0
  127. package/dist/lib/decorator/class/bean.js +23 -0
  128. package/dist/lib/decorator/class/controller.d.ts +2 -0
  129. package/dist/lib/decorator/class/controller.js +20 -0
  130. package/dist/lib/decorator/class/entity.d.ts +4 -0
  131. package/dist/lib/decorator/class/entity.js +33 -0
  132. package/dist/lib/decorator/class/index.d.ts +11 -0
  133. package/dist/lib/decorator/class/index.js +27 -0
  134. package/dist/lib/decorator/class/local.d.ts +3 -0
  135. package/dist/lib/decorator/class/local.js +23 -0
  136. package/dist/lib/decorator/class/model.d.ts +3 -0
  137. package/dist/lib/decorator/class/model.js +21 -0
  138. package/dist/lib/decorator/class/scope.d.ts +2 -0
  139. package/dist/lib/decorator/class/scope.js +20 -0
  140. package/dist/lib/decorator/class/service.d.ts +2 -0
  141. package/dist/lib/decorator/class/service.js +20 -0
  142. package/dist/lib/decorator/class/use.d.ts +5 -0
  143. package/dist/lib/decorator/class/use.js +43 -0
  144. package/dist/lib/decorator/class/util.d.ts +3 -0
  145. package/dist/lib/decorator/class/util.js +10 -0
  146. package/dist/lib/decorator/class/virtual.d.ts +3 -0
  147. package/dist/lib/decorator/class/virtual.js +24 -0
  148. package/dist/lib/decorator/index.d.ts +7 -0
  149. package/dist/lib/decorator/index.js +23 -0
  150. package/dist/lib/decorator/interface/beanOptions.d.ts +44 -0
  151. package/dist/lib/decorator/interface/beanOptions.js +8 -0
  152. package/dist/lib/decorator/interface/useOptions.d.ts +14 -0
  153. package/dist/lib/decorator/interface/useOptions.js +3 -0
  154. package/dist/lib/decorator/type/constructable.d.ts +2 -0
  155. package/dist/lib/decorator/type/constructable.js +3 -0
  156. package/dist/lib/decorator/type/containerScope.d.ts +2 -0
  157. package/dist/lib/decorator/type/containerScope.js +3 -0
  158. package/dist/lib/decorator/type/injectionScope.d.ts +2 -0
  159. package/dist/lib/decorator/type/injectionScope.js +3 -0
  160. package/dist/lib/error/error.d.ts +18 -0
  161. package/dist/lib/error/error.js +71 -0
  162. package/dist/lib/error/errorClass.d.ts +18 -0
  163. package/dist/lib/error/errorClass.js +72 -0
  164. package/dist/lib/error/errorContext.d.ts +38 -0
  165. package/dist/lib/error/errorContext.js +3 -0
  166. package/dist/lib/error/errorGlobal.d.ts +8 -0
  167. package/dist/lib/error/errorGlobal.js +3 -0
  168. package/dist/lib/error/errorInternal.d.ts +67 -0
  169. package/dist/lib/error/errorInternal.js +70 -0
  170. package/dist/lib/error/errorObject.d.ts +5 -0
  171. package/dist/lib/error/errorObject.js +3 -0
  172. package/dist/lib/error/index.d.ts +5 -0
  173. package/dist/lib/error/index.js +21 -0
  174. package/dist/lib/framework/bootstrap.d.ts +9 -0
  175. package/dist/lib/framework/bootstrap.js +35 -0
  176. package/dist/lib/framework/framework.d.ts +11 -0
  177. package/dist/lib/framework/framework.js +28 -0
  178. package/dist/lib/framework/loader.d.ts +24 -0
  179. package/dist/lib/framework/loader.js +69 -0
  180. package/dist/lib/framework/meta.d.ts +2 -0
  181. package/dist/lib/framework/meta.js +23 -0
  182. package/dist/lib/framework/metaClass.d.ts +2 -0
  183. package/dist/lib/framework/metaClass.js +26 -0
  184. package/dist/lib/framework/moduleInfo.d.ts +3 -0
  185. package/dist/lib/framework/moduleInfo.js +67 -0
  186. package/dist/lib/framework/util.d.ts +4 -0
  187. package/dist/lib/framework/util.js +15 -0
  188. package/dist/lib/module/asset/errors.d.ts +68 -0
  189. package/dist/lib/module/asset/errors.js +69 -0
  190. package/dist/lib/module/bean/index.d.ts +4 -0
  191. package/dist/lib/module/bean/index.js +24 -0
  192. package/dist/lib/module/broadcast/broadcast.d.ts +3 -0
  193. package/dist/lib/module/broadcast/broadcast.js +49 -0
  194. package/dist/lib/module/broadcast/broadcastClient.d.ts +24 -0
  195. package/dist/lib/module/broadcast/broadcastClient.js +91 -0
  196. package/dist/lib/module/cluster/agent.d.ts +3 -0
  197. package/dist/lib/module/cluster/agent.js +22 -0
  198. package/dist/lib/module/cluster/app.d.ts +3 -0
  199. package/dist/lib/module/cluster/app.js +26 -0
  200. package/dist/lib/module/config.d.ts +3 -0
  201. package/dist/lib/module/config.js +67 -0
  202. package/dist/lib/module/constant.d.ts +3 -0
  203. package/dist/lib/module/constant.js +46 -0
  204. package/dist/lib/module/contextPatch.d.ts +3 -0
  205. package/dist/lib/module/contextPatch.js +16 -0
  206. package/dist/lib/module/errors.d.ts +3 -0
  207. package/dist/lib/module/errors.js +49 -0
  208. package/dist/lib/module/index.d.ts +2 -0
  209. package/dist/lib/module/index.js +3 -0
  210. package/dist/lib/module/loader.d.ts +5 -0
  211. package/dist/lib/module/loader.js +73 -0
  212. package/dist/lib/module/locales.d.ts +3 -0
  213. package/dist/lib/module/locales.js +132 -0
  214. package/dist/lib/module/messenger.d.ts +25 -0
  215. package/dist/lib/module/messenger.js +128 -0
  216. package/dist/lib/module/middleware.d.ts +3 -0
  217. package/dist/lib/module/middleware.js +113 -0
  218. package/dist/lib/module/model.d.ts +3 -0
  219. package/dist/lib/module/model.js +47 -0
  220. package/dist/lib/module/module.d.ts +12 -0
  221. package/dist/lib/module/module.js +135 -0
  222. package/dist/lib/module/moduleMeta.d.ts +3 -0
  223. package/dist/lib/module/moduleMeta.js +23 -0
  224. package/dist/lib/module/queue/queue.d.ts +3 -0
  225. package/dist/lib/module/queue/queue.js +59 -0
  226. package/dist/lib/module/queue/queueClient.d.ts +26 -0
  227. package/dist/lib/module/queue/queueClient.js +262 -0
  228. package/dist/lib/module/redis.d.ts +11 -0
  229. package/dist/lib/module/redis.js +46 -0
  230. package/dist/lib/module/reload/development.d.ts +3 -0
  231. package/dist/lib/module/reload/development.js +98 -0
  232. package/dist/lib/module/reload/reload.d.ts +16 -0
  233. package/dist/lib/module/reload/reload.js +113 -0
  234. package/dist/lib/module/reload.d.ts +7 -0
  235. package/dist/lib/module/reload.js +17 -0
  236. package/dist/lib/module/route.d.ts +10 -0
  237. package/dist/lib/module/route.js +239 -0
  238. package/dist/lib/module/schedule.d.ts +3 -0
  239. package/dist/lib/module/schedule.js +129 -0
  240. package/dist/lib/module/service.d.ts +3 -0
  241. package/dist/lib/module/service.js +35 -0
  242. package/dist/lib/module/socketio.d.ts +5 -0
  243. package/dist/lib/module/socketio.js +47 -0
  244. package/dist/lib/module/startup.d.ts +2 -0
  245. package/dist/lib/module/startup.js +134 -0
  246. package/dist/lib/module/version/clear.d.ts +2 -0
  247. package/dist/lib/module/version/clear.js +42 -0
  248. package/dist/lib/module/version/ready.d.ts +6 -0
  249. package/dist/lib/module/version/ready.js +106 -0
  250. package/dist/lib/resource/error/errorClass.d.ts +18 -0
  251. package/dist/lib/resource/error/errorClass.js +72 -0
  252. package/dist/lib/resource/error/errorContext.d.ts +38 -0
  253. package/dist/lib/resource/error/errorContext.js +3 -0
  254. package/dist/lib/resource/error/errorGlobal.d.ts +8 -0
  255. package/dist/lib/resource/error/errorGlobal.js +3 -0
  256. package/dist/lib/resource/error/errorInternal.d.ts +67 -0
  257. package/dist/lib/resource/error/errorInternal.js +70 -0
  258. package/dist/lib/resource/error/errorObject.d.ts +5 -0
  259. package/dist/lib/resource/error/errorObject.js +3 -0
  260. package/dist/lib/resource/error/index.d.ts +5 -0
  261. package/dist/lib/resource/error/index.js +21 -0
  262. package/dist/lib/utils/index.d.ts +2 -0
  263. package/dist/lib/utils/index.js +18 -0
  264. package/dist/lib/utils/isClass.d.ts +2 -0
  265. package/dist/lib/utils/isClass.js +20 -0
  266. package/dist/lib/utils/mockUtil.d.ts +11 -0
  267. package/dist/lib/utils/mockUtil.js +34 -0
  268. package/dist/lib/utils/mockUtilCtx.d.ts +10 -0
  269. package/dist/lib/utils/mockUtilCtx.js +35 -0
  270. package/dist/lib/utils/performAction.d.ts +19 -0
  271. package/dist/lib/utils/performAction.js +137 -0
  272. package/dist/lib/utils/util.d.ts +63 -0
  273. package/dist/lib/utils/util.js +445 -0
  274. package/dist/lib/utils/utilCtx.d.ts +34 -0
  275. package/dist/lib/utils/utilCtx.js +137 -0
  276. package/dist/types/application/app.d.ts +21 -0
  277. package/dist/types/application/app.js +28 -0
  278. package/dist/types/application/index.d.ts +2 -0
  279. package/dist/types/application/index.js +18 -0
  280. package/dist/types/config/appInfo.d.ts +4 -0
  281. package/dist/types/config/appInfo.js +3 -0
  282. package/dist/types/config/config.d.ts +10 -0
  283. package/dist/types/config/config.js +3 -0
  284. package/dist/types/config/development.d.ts +4 -0
  285. package/dist/types/config/development.js +3 -0
  286. package/dist/types/config/index.d.ts +4 -0
  287. package/dist/types/config/index.js +20 -0
  288. package/dist/types/config/locale.d.ts +10 -0
  289. package/dist/types/config/locale.js +7 -0
  290. package/dist/types/context/contextBase.d.ts +21 -0
  291. package/dist/types/context/contextBase.js +3 -0
  292. package/dist/types/context/contextConfig.d.ts +4 -0
  293. package/dist/types/context/contextConfig.js +3 -0
  294. package/dist/types/context/contextError.d.ts +25 -0
  295. package/dist/types/context/contextError.js +3 -0
  296. package/dist/types/context/contextLocale.d.ts +9 -0
  297. package/dist/types/context/contextLocale.js +3 -0
  298. package/dist/types/context/contextOthers.d.ts +4 -0
  299. package/dist/types/context/contextOthers.js +3 -0
  300. package/dist/types/context/contextState.d.ts +8 -0
  301. package/dist/types/context/contextState.js +3 -0
  302. package/dist/types/context/index.d.ts +18 -0
  303. package/dist/types/context/index.js +18 -0
  304. package/dist/types/enum/appEvent.d.ts +5 -0
  305. package/dist/types/enum/appEvent.js +9 -0
  306. package/dist/types/enum/index.d.ts +2 -0
  307. package/dist/types/enum/index.js +18 -0
  308. package/dist/types/index.d.ts +7 -0
  309. package/dist/types/index.js +23 -0
  310. package/dist/types/interface/broadcast.d.ts +5 -0
  311. package/dist/types/interface/broadcast.js +3 -0
  312. package/dist/types/interface/error.d.ts +8 -0
  313. package/dist/types/interface/error.js +3 -0
  314. package/dist/types/interface/index.d.ts +6 -0
  315. package/dist/types/interface/index.js +22 -0
  316. package/dist/types/interface/module.d.ts +32 -0
  317. package/dist/types/interface/module.js +18 -0
  318. package/dist/types/interface/monkey.d.ts +22 -0
  319. package/dist/types/interface/monkey.js +3 -0
  320. package/dist/types/interface/queue.d.ts +29 -0
  321. package/dist/types/interface/queue.js +3 -0
  322. package/dist/types/interface/schedule.d.ts +11 -0
  323. package/dist/types/interface/schedule.js +3 -0
  324. package/dist/types/utils/cast.d.ts +6 -0
  325. package/dist/types/utils/cast.js +8 -0
  326. package/dist/types/utils/index.d.ts +4 -0
  327. package/dist/types/utils/index.js +20 -0
  328. package/dist/types/utils/powerPartial.d.ts +4 -0
  329. package/dist/types/utils/powerPartial.js +3 -0
  330. package/dist/types/utils/type.d.ts +4 -0
  331. package/dist/types/utils/type.js +3 -0
  332. package/package.json +62 -14
@@ -0,0 +1,445 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AppUtil = void 0;
30
+ const ModuleInfo = __importStar(require("@cabloy/module-info"));
31
+ const fs_extra_1 = __importDefault(require("fs-extra"));
32
+ const path_1 = __importDefault(require("path"));
33
+ const url_1 = require("url");
34
+ const is_type_of_1 = __importDefault(require("is-type-of"));
35
+ const security = __importStar(require("egg-security"));
36
+ const index_js_1 = require("../../types/index.js");
37
+ const beanSimple_js_1 = require("../bean/beanSimple.js");
38
+ const resource_js_1 = require("../core/resource.js");
39
+ const compose_1 = require("@cabloy/compose");
40
+ const __EnvTests = ['unittest', 'test'];
41
+ class AppUtil extends beanSimple_js_1.BeanSimple {
42
+ instanceStarted(subdomain) {
43
+ return this.app.meta.appReadyInstances && this.app.meta.appReadyInstances[subdomain];
44
+ }
45
+ combineFetchPath(moduleName, arg) {
46
+ if (arg.substr(0, 2) === '//')
47
+ return arg.substr(1);
48
+ if (arg.charAt(0) === '/')
49
+ return `/api${arg}`;
50
+ const moduleInfo = typeof moduleName === 'string' ? ModuleInfo.parseInfo(moduleName) : moduleName;
51
+ if (!moduleInfo)
52
+ throw new Error('invalid url');
53
+ return `/api/${moduleInfo.url}/${arg}`;
54
+ }
55
+ combineApiPath(moduleName, arg) {
56
+ if (arg.charAt(0) === '/')
57
+ return arg;
58
+ const moduleInfo = typeof moduleName === 'string' ? ModuleInfo.parseInfo(moduleName) : moduleName;
59
+ if (!moduleInfo)
60
+ throw new Error('invalid url');
61
+ return `/${moduleInfo.url}/${arg}`;
62
+ }
63
+ combineQueries(url, queries) {
64
+ //
65
+ if (!queries)
66
+ return url;
67
+ //
68
+ let str = '';
69
+ for (const key of Object.keys(queries)) {
70
+ str += `${key}=${encodeURIComponent(queries[key])}&`;
71
+ }
72
+ if (str) {
73
+ str = str.substr(0, str.length - 1);
74
+ }
75
+ if (!str)
76
+ return url;
77
+ //
78
+ if (!url)
79
+ return '?' + str;
80
+ //
81
+ const pos = url.indexOf('?');
82
+ if (pos === -1)
83
+ return `${url}?${str}`;
84
+ if (pos === url.length - 1)
85
+ return `${url}${str}`;
86
+ return `${url}&${str}`;
87
+ }
88
+ createError(data, returnObject) {
89
+ const error = returnObject ? {} : new Error();
90
+ error.code = data.code !== undefined ? data.code : 500;
91
+ if (data.message && typeof data.message === 'object') {
92
+ error.message = JSON.stringify(data.message, null, 2);
93
+ }
94
+ else {
95
+ error.message = data.message;
96
+ }
97
+ if (data.stack)
98
+ error.stack = data.stack;
99
+ if (data.name)
100
+ error.name = data.name;
101
+ if (data.errno)
102
+ error.errno = data.errno;
103
+ if (data.sqlMessage)
104
+ error.sqlMessage = data.sqlMessage;
105
+ if (data.sqlState)
106
+ error.sqlState = data.sqlState;
107
+ if (data.index)
108
+ error.index = data.index;
109
+ if (data.sql)
110
+ error.sql = data.sql;
111
+ return error;
112
+ }
113
+ async monkeyModule(ebAppMonkey, ebModulesMonkey, monkeyName, moduleTarget, ...monkeyData) {
114
+ // self: main
115
+ if (moduleTarget && moduleTarget.mainInstance && moduleTarget.mainInstance[monkeyName]) {
116
+ await moduleTarget.mainInstance[monkeyName](...monkeyData);
117
+ }
118
+ // module monkey
119
+ for (const key in ebModulesMonkey) {
120
+ const moduleMonkey = ebModulesMonkey[key];
121
+ if (moduleMonkey.monkeyInstance && moduleMonkey.monkeyInstance[monkeyName]) {
122
+ if (moduleTarget === undefined) {
123
+ // @ts-ignore ignore
124
+ await moduleMonkey.monkeyInstance[monkeyName](...monkeyData);
125
+ }
126
+ else {
127
+ // @ts-ignore ignore
128
+ await moduleMonkey.monkeyInstance[monkeyName](moduleTarget, ...monkeyData);
129
+ }
130
+ }
131
+ }
132
+ // app monkey
133
+ if (ebAppMonkey && ebAppMonkey[monkeyName]) {
134
+ if (moduleTarget === undefined) {
135
+ await ebAppMonkey[monkeyName](...monkeyData);
136
+ }
137
+ else {
138
+ await ebAppMonkey[monkeyName](moduleTarget, ...monkeyData);
139
+ }
140
+ }
141
+ }
142
+ getWhiteListCors(ctx) {
143
+ let whiteListCors;
144
+ const _config = ctx.config.module('a-base');
145
+ const _whiteList = (_config && _config.cors && _config.cors.whiteList) || [];
146
+ if (!Array.isArray(_whiteList)) {
147
+ whiteListCors = _whiteList.split(',');
148
+ }
149
+ else {
150
+ whiteListCors = _whiteList.concat();
151
+ }
152
+ // inherits from jsonp
153
+ let _whiteListJsonp = _config && _config.jsonp && _config.jsonp.whiteList;
154
+ if (_whiteListJsonp) {
155
+ if (!Array.isArray(_whiteListJsonp)) {
156
+ _whiteListJsonp = _whiteListJsonp.split(',');
157
+ }
158
+ whiteListCors = whiteListCors.concat(_whiteListJsonp);
159
+ }
160
+ // hostSelf
161
+ const hostSelf = ctx.bean.base.getAbsoluteUrl();
162
+ if (hostSelf) {
163
+ whiteListCors.push(hostSelf);
164
+ }
165
+ // ok
166
+ return whiteListCors;
167
+ }
168
+ isSafeDomain(ctx, origin) {
169
+ // origin is {protocol}{hostname}{port}...
170
+ if (!origin || origin === 'null' || origin === null)
171
+ return true;
172
+ let parsedUrl;
173
+ try {
174
+ parsedUrl = new url_1.URL(origin);
175
+ }
176
+ catch (_) {
177
+ return false;
178
+ }
179
+ // whiteList
180
+ const whiteListCors = this.getWhiteListCors(ctx);
181
+ if (security.utils.isSafeDomain(parsedUrl.hostname, whiteListCors) ||
182
+ security.utils.isSafeDomain(origin, whiteListCors)) {
183
+ return true;
184
+ }
185
+ return false;
186
+ }
187
+ isNullOrEmptyString(str) {
188
+ return str === undefined || str === null || str === '';
189
+ }
190
+ compose(chains, adapter) {
191
+ return (0, compose_1.compose)(chains, adapter);
192
+ }
193
+ composeAsync(chains, adapter) {
194
+ return (0, compose_1.composeAsync)(chains, adapter);
195
+ }
196
+ async createAnonymousContext({ locale, subdomain, module, instance }) {
197
+ // url
198
+ const url = module ? this.combineFetchPath(module, '') : '/api/a/base/';
199
+ // ctx
200
+ const ctx = this.app.createAnonymousContext({
201
+ method: 'post',
202
+ url,
203
+ });
204
+ ctx.req.ctx = ctx;
205
+ // locale
206
+ Object.defineProperty(ctx, 'locale', {
207
+ get() {
208
+ return locale || this.app.config.i18n.defaultLocale;
209
+ },
210
+ });
211
+ // subdomain
212
+ Object.defineProperty(ctx, 'subdomain', {
213
+ get() {
214
+ return subdomain;
215
+ },
216
+ });
217
+ // instance
218
+ if (subdomain !== undefined && subdomain !== null) {
219
+ ctx.instance = await ctx.bean.instance.get({ subdomain });
220
+ // start instance
221
+ if (instance) {
222
+ await ctx.bean.instance.checkAppReadyInstance();
223
+ }
224
+ }
225
+ // ok
226
+ return ctx;
227
+ }
228
+ async executeBean({ locale, subdomain, beanModule, beanFullName, context, fn, transaction, ctxCaller, ctxParent, instance, }) {
229
+ // ctxModule
230
+ let ctxModule = beanModule;
231
+ if (!ctxModule && beanFullName) {
232
+ const beanOptions = resource_js_1.appResource.getBean(beanFullName);
233
+ ctxModule = beanOptions?.module;
234
+ }
235
+ if (!ctxModule) {
236
+ ctxModule = ctxCaller?.module?.info?.relativeName || ctxParent?.module?.info?.relativeName;
237
+ }
238
+ // ctx
239
+ const ctx = await this.createAnonymousContext({ locale, subdomain, module: ctxModule, instance });
240
+ // innerAccess
241
+ ctx.innerAccess = true;
242
+ // ctxCaller
243
+ if (ctxCaller) {
244
+ // multipart
245
+ ctx.multipart = function (options) {
246
+ return ctxCaller.multipart(options);
247
+ };
248
+ // delegateProperties
249
+ delegateProperties(ctx, ctxCaller);
250
+ // ctxCaller
251
+ ctx.ctxCaller = ctxCaller;
252
+ }
253
+ // ctxParent
254
+ if (ctxParent) {
255
+ // delegateProperties
256
+ delegateProperties(ctx, ctxParent);
257
+ // dbLevel
258
+ ctx.dbLevel = (ctxParent.dbLevel || 0) + 1;
259
+ }
260
+ // dbLevel
261
+ if (!ctxCaller && !ctxParent) {
262
+ ctx.dbLevel = 1;
263
+ }
264
+ // bean
265
+ const bean = beanFullName ? ctx.bean._getBean(beanFullName) : null;
266
+ if (!bean && beanFullName && !is_type_of_1.default.function(fn)) {
267
+ throw new Error(`bean not found: ${beanFullName}`);
268
+ }
269
+ // execute
270
+ let res;
271
+ if (transaction) {
272
+ res = await (0, index_js_1.Cast)(ctx).transaction.begin(async () => {
273
+ return await this._executeBeanFn({ fn, ctx, bean, context });
274
+ });
275
+ }
276
+ else {
277
+ res = await this._executeBeanFn({ fn, ctx, bean, context });
278
+ }
279
+ // tail done
280
+ await ctx.tailDone();
281
+ // ok
282
+ return res;
283
+ }
284
+ async _executeBeanFn({ fn, ctx, bean, context }) {
285
+ let res;
286
+ if (is_type_of_1.default.function(fn)) {
287
+ res = await fn({ ctx, bean, context });
288
+ }
289
+ else {
290
+ fn = fn || 'execute';
291
+ if (!bean[fn]) {
292
+ throw new Error(`bean method not found: ${bean.__beanFullName__}:${fn}`);
293
+ }
294
+ res = await bean[fn](context);
295
+ }
296
+ return res;
297
+ }
298
+ async lock({ subdomain, resource, fn, options, redlock, }) {
299
+ // resource
300
+ const _lockResource = `redlock_${this.app.name}:${this.subdomainDesp(subdomain)}:${resource}`;
301
+ // options
302
+ const _lockOptions = Object.assign({}, this.app.config.queue.redlock.options, options);
303
+ // redlock
304
+ if (!redlock) {
305
+ redlock = this.app.meta.redlock.create(_lockOptions);
306
+ }
307
+ let _lock = await redlock.lock(_lockResource, _lockOptions.lockTTL);
308
+ // timer
309
+ let _lockTimer = null;
310
+ const _lockDone = () => {
311
+ if (_lockTimer) {
312
+ clearInterval(_lockTimer);
313
+ _lockTimer = null;
314
+ }
315
+ };
316
+ _lockTimer = setInterval(() => {
317
+ _lock
318
+ .extend(_lockOptions.lockTTL)
319
+ .then(lock => {
320
+ _lock = lock;
321
+ })
322
+ .catch(err => {
323
+ this.app.logger.error(err);
324
+ _lockDone();
325
+ });
326
+ }, _lockOptions.lockTTL / 2);
327
+ try {
328
+ const res = await fn();
329
+ _lockDone();
330
+ await _lock.unlock();
331
+ return res;
332
+ }
333
+ catch (err) {
334
+ _lockDone();
335
+ await _lock.unlock();
336
+ throw err;
337
+ }
338
+ }
339
+ subdomainDesp(subdomain) {
340
+ if (subdomain === undefined || subdomain === null)
341
+ return '~';
342
+ return subdomain || '-';
343
+ }
344
+ deprecated(oldUsage, newUsage) {
345
+ const message = '`'
346
+ .concat(oldUsage, '` is deprecated and will be removed in a later version. Use `')
347
+ .concat(newUsage, '` instead');
348
+ return console.warn(message);
349
+ }
350
+ checkGate(gate) {
351
+ // check none
352
+ if (!gate)
353
+ return true;
354
+ // check env
355
+ if (!this._checkGateEnv(gate.env))
356
+ return false;
357
+ // default
358
+ return true;
359
+ }
360
+ _checkGateEnv(env) {
361
+ // check none
362
+ if (!env)
363
+ return true;
364
+ if (!Array.isArray(env))
365
+ env = env.split(',');
366
+ const bingo = env.some(item => {
367
+ if (this.app.config.env === item)
368
+ return true;
369
+ if (__EnvTests.includes(this.app.config.env) && __EnvTests.includes(item))
370
+ return true;
371
+ return false;
372
+ });
373
+ if (!bingo)
374
+ return false;
375
+ return true;
376
+ }
377
+ requireDynamic(file) {
378
+ if (!file)
379
+ throw new Error('file should not empty');
380
+ let instance = require(file);
381
+ const mtime = this._requireDynamic_getFileTime(file);
382
+ if (instance.__requireDynamic_mtime === undefined) {
383
+ instance.__requireDynamic_mtime = mtime;
384
+ }
385
+ else if (instance.__requireDynamic_mtime !== mtime) {
386
+ delete require.cache[require.resolve(file)];
387
+ instance = require(file);
388
+ instance.__requireDynamic_mtime = mtime;
389
+ }
390
+ return instance;
391
+ }
392
+ _requireDynamic_getFileTime(file) {
393
+ if (!path_1.default.isAbsolute(file))
394
+ return null;
395
+ const exists = fs_extra_1.default.pathExistsSync(file);
396
+ if (!exists)
397
+ return null;
398
+ // stat
399
+ const stat = fs_extra_1.default.statSync(file);
400
+ return stat.mtime.valueOf();
401
+ }
402
+ }
403
+ exports.AppUtil = AppUtil;
404
+ function delegateProperties(ctx, ctxCaller) {
405
+ const req = ctx.req;
406
+ for (const property of ['cookies', 'session', 'user', 'state']) {
407
+ delegateProperty(ctx, ctxCaller, property);
408
+ }
409
+ for (const property of ['query', 'params', 'headers', 'body']) {
410
+ delegateProperty(ctx.request, ctxCaller.request, property);
411
+ if (ctx.request[property])
412
+ req[property] = ctx.request[property];
413
+ }
414
+ if (ctx.session)
415
+ req.session = ctx.session;
416
+ // if (ctx.query) req.query = ctx.query;
417
+ // if (ctx.request.body) req.body = ctx.request.body;
418
+ }
419
+ function delegateProperty(ctx, ctxCaller, property) {
420
+ const keyMock = `__executeBean__mock__${property}__`;
421
+ const keyOriginal = `__executeBean__mock__${property}__original__`;
422
+ if (['cookies', 'session', 'headers'].includes(property)) {
423
+ ctx[keyOriginal] = ctx[property];
424
+ }
425
+ Object.defineProperty(ctx, property, {
426
+ get() {
427
+ const value = ctxCaller && ctxCaller[property];
428
+ if (value)
429
+ return value;
430
+ //
431
+ if (['user', 'body'].includes(property))
432
+ return value;
433
+ //
434
+ if (['cookies', 'session', 'headers'].includes(property)) {
435
+ return ctx[keyOriginal];
436
+ }
437
+ //
438
+ if (!ctx[keyMock]) {
439
+ ctx[keyMock] = {};
440
+ }
441
+ return ctx[keyMock];
442
+ },
443
+ });
444
+ }
445
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1,34 @@
1
+ import { BeanSimple } from '../bean/beanSimple.js';
2
+ import { VonaContext, PowerPartial } from '../../types/index.js';
3
+ import { IExecuteBeanCallback } from './util.js';
4
+ export declare class CtxUtil extends BeanSimple {
5
+ runInBackground(scope: any): void;
6
+ lock({ subdomain, resource, fn, options, redlock }: any): Promise<any>;
7
+ broadcastEmit({ locale, subdomain, module, broadcastName, data }: any): void;
8
+ queuePush(info: any): void;
9
+ queuePushAsync(info: any): Promise<unknown>;
10
+ _queuePushInfoPrepare(info: any): any;
11
+ executeBean({ locale, subdomain, beanModule, beanFullName, context, fn, transaction, instance, }: {
12
+ locale?: string;
13
+ subdomain?: string;
14
+ beanModule?: string;
15
+ beanFullName?: string;
16
+ context?: any;
17
+ fn?: IExecuteBeanCallback | string;
18
+ transaction?: boolean;
19
+ instance?: boolean;
20
+ }): Promise<any>;
21
+ executeBeanIsolate({ locale, subdomain, beanModule, beanFullName, context, fn, transaction, ctxParent, instance, }: {
22
+ locale?: string;
23
+ subdomain?: string | null;
24
+ beanModule?: string;
25
+ beanFullName?: string;
26
+ context?: any;
27
+ fn?: IExecuteBeanCallback | string;
28
+ transaction?: boolean;
29
+ ctxParent?: PowerPartial<VonaContext>;
30
+ instance?: boolean;
31
+ }): Promise<any>;
32
+ performAction({ innerAccess, method, url, query, params, headers, body }: any): Promise<any>;
33
+ }
34
+ //# sourceMappingURL=utilCtx.d.ts.map
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CtxUtil = void 0;
7
+ const performAction_js_1 = __importDefault(require("./performAction.js"));
8
+ const beanSimple_js_1 = require("../bean/beanSimple.js");
9
+ class CtxUtil extends beanSimple_js_1.BeanSimple {
10
+ runInBackground(scope) {
11
+ const ctx = this.ctx;
12
+ ctx.runInBackground(async () => {
13
+ await ctx.meta.util.executeBeanIsolate({
14
+ fn: async ({ ctx }) => {
15
+ await scope({ ctx });
16
+ },
17
+ });
18
+ });
19
+ }
20
+ async lock({ subdomain, resource, fn, options, redlock }) {
21
+ const ctx = this.ctx;
22
+ if (subdomain === undefined)
23
+ subdomain = ctx.subdomain;
24
+ return await ctx.app.meta.util.lock({ subdomain, resource, fn, options, redlock });
25
+ }
26
+ broadcastEmit({ locale, subdomain, module, broadcastName, data }) {
27
+ const ctx = this.ctx;
28
+ ctx.app.meta.broadcast.emit({
29
+ locale: locale === undefined ? ctx.locale : locale,
30
+ subdomain: subdomain === undefined ? ctx.subdomain : subdomain,
31
+ module,
32
+ broadcastName,
33
+ data,
34
+ });
35
+ }
36
+ queuePush(info) {
37
+ const ctx = this.ctx;
38
+ ctx.app.meta.queue.push(this._queuePushInfoPrepare(info));
39
+ }
40
+ async queuePushAsync(info) {
41
+ const ctx = this.ctx;
42
+ return await ctx.app.meta.queue.pushAsync(this._queuePushInfoPrepare(info));
43
+ }
44
+ _queuePushInfoPrepare(info) {
45
+ const ctx = this.ctx;
46
+ const dbLevel = !info.dbLevel ? ctx.dbLevel + 1 : info.dbLevel;
47
+ const locale = info.locale === undefined ? ctx.locale : info.locale;
48
+ const subdomain = info.subdomain === undefined ? ctx.subdomain : info.subdomain;
49
+ // new info
50
+ info = {
51
+ ...info,
52
+ dbLevel,
53
+ locale,
54
+ subdomain,
55
+ };
56
+ if (!info.ctxParent)
57
+ info.ctxParent = {};
58
+ if (!info.ctxParent.request)
59
+ info.ctxParent.request = {};
60
+ if (!info.ctxParent.request.headers)
61
+ info.ctxParent.request.headers = {};
62
+ // headers
63
+ const headers = info.ctxParent.request.headers;
64
+ for (const key of ['x-clientid', 'x-scene']) {
65
+ if (!headers[key]) {
66
+ const value = key === 'x-clientid' ? ctx.bean.util.getFrontClientId() : ctx.bean.util.getFrontScene();
67
+ if (value) {
68
+ headers[key] = value;
69
+ }
70
+ }
71
+ }
72
+ for (const key of ['host', 'origin', 'referer', 'user-agent']) {
73
+ if (!headers[key]) {
74
+ const value = ctx.request.headers[key];
75
+ if (value) {
76
+ headers[key] = value;
77
+ }
78
+ }
79
+ }
80
+ // ok
81
+ return info;
82
+ }
83
+ async executeBean({ locale, subdomain, beanModule, beanFullName, context, fn, transaction, instance, }) {
84
+ const ctx = this.ctx;
85
+ return await ctx.app.meta.util.executeBean({
86
+ locale: locale === undefined ? ctx.locale : locale,
87
+ subdomain: subdomain === undefined ? ctx.subdomain : subdomain,
88
+ context,
89
+ beanModule,
90
+ beanFullName,
91
+ transaction,
92
+ fn,
93
+ ctxCaller: ctx,
94
+ instance,
95
+ });
96
+ }
97
+ async executeBeanIsolate({ locale, subdomain, beanModule, beanFullName, context, fn, transaction, ctxParent, instance, }) {
98
+ const ctx = this.ctx;
99
+ if (ctxParent) {
100
+ if (ctxParent.dbLevel === undefined) {
101
+ ctxParent = {
102
+ ...ctxParent,
103
+ dbLevel: ctx.dbLevel,
104
+ };
105
+ }
106
+ }
107
+ else {
108
+ ctxParent = ctx;
109
+ }
110
+ return await ctx.app.meta.util.executeBean({
111
+ locale: locale === undefined ? ctx.locale : locale,
112
+ subdomain: subdomain === undefined ? ctx.subdomain : subdomain,
113
+ context,
114
+ beanModule,
115
+ beanFullName,
116
+ transaction,
117
+ fn,
118
+ ctxParent,
119
+ instance,
120
+ });
121
+ }
122
+ async performAction({ innerAccess, method, url, query, params, headers, body }) {
123
+ const ctx = this.ctx;
124
+ return await (0, performAction_js_1.default)({
125
+ ctxCaller: ctx,
126
+ innerAccess,
127
+ method,
128
+ url,
129
+ query,
130
+ params,
131
+ headers,
132
+ body,
133
+ });
134
+ }
135
+ }
136
+ exports.CtxUtil = CtxUtil;
137
+ //# sourceMappingURL=utilCtx.js.map
@@ -0,0 +1,21 @@
1
+ import { Application as EggApplication, EggLoaderOptions, Singleton } from 'egg';
2
+ import { EggPassport } from '@zhennann/egg-passport';
3
+ import { BeanContainer } from '../../lib/bean/beanContainer.js';
4
+ import { AppMeta } from '../../lib/core/meta.js';
5
+ import { Server as SocketServer } from 'socket.io';
6
+ import { Redis } from 'ioredis';
7
+ import { VonaConfig } from '../config/config.js';
8
+ export * as IORedis from 'ioredis';
9
+ export interface VonaApplication extends EggApplication {
10
+ options: EggLoaderOptions & {
11
+ flavor: any;
12
+ };
13
+ meta: AppMeta;
14
+ bean: BeanContainer;
15
+ redis: Singleton<Redis>;
16
+ io: SocketServer;
17
+ mysql: any;
18
+ passport: EggPassport;
19
+ config: VonaConfig;
20
+ }
21
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.IORedis = void 0;
27
+ exports.IORedis = __importStar(require("ioredis"));
28
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1,2 @@
1
+ export * from './app.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import { EggAppInfo } from 'egg';
2
+ export interface VonaAppInfo extends EggAppInfo {
3
+ }
4
+ //# sourceMappingURL=appInfo.d.ts.map