@midwayjs/mongoose 3.3.5 → 3.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +803 -0
- package/dist/configuration.d.ts +2 -0
- package/dist/configuration.js +2 -3
- package/dist/manager.d.ts +19 -5
- package/dist/manager.js +61 -16
- package/index.d.ts +1 -1
- package/package.json +5 -6
- package/LICENSE +0 -21
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [3.3.5](https://github.com/midwayjs/midway/compare/v3.3.4...v3.3.5) (2022-04-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.3.4](https://github.com/midwayjs/midway/compare/v3.3.3...v3.3.4) (2022-04-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [3.3.2](https://github.com/midwayjs/midway/compare/v3.3.1...v3.3.2) (2022-04-13)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [3.3.1](https://github.com/midwayjs/midway/compare/v3.3.0...v3.3.1) (2022-04-11)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [3.3.0](https://github.com/midwayjs/midway/compare/v3.2.2...v3.3.0) (2022-04-07)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [3.2.2](https://github.com/midwayjs/midway/compare/v3.2.1...v3.2.2) (2022-03-30)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [3.2.1](https://github.com/midwayjs/midway/compare/v3.2.0...v3.2.1) (2022-03-27)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* swagger ui replace json path ([#1860](https://github.com/midwayjs/midway/issues/1860)) ([0f3728d](https://github.com/midwayjs/midway/commit/0f3728daccba12923f23f5b498c7dda13ced36d7))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# [3.2.0](https://github.com/midwayjs/midway/compare/v3.1.6...v3.2.0) (2022-03-25)
|
|
66
|
+
|
|
67
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [3.1.6](https://github.com/midwayjs/midway/compare/v3.1.5...v3.1.6) (2022-03-21)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## [3.1.5](https://github.com/midwayjs/midway/compare/v3.1.4...v3.1.5) (2022-03-18)
|
|
82
|
+
|
|
83
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [3.1.2](https://github.com/midwayjs/midway/compare/v3.1.1...v3.1.2) (2022-03-15)
|
|
90
|
+
|
|
91
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## [3.1.1](https://github.com/midwayjs/midway/compare/v3.1.0...v3.1.1) (2022-03-09)
|
|
98
|
+
|
|
99
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# [3.1.0](https://github.com/midwayjs/midway/compare/v3.0.13...v3.1.0) (2022-03-07)
|
|
106
|
+
|
|
107
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## [3.0.13](https://github.com/midwayjs/midway/compare/v3.0.12...v3.0.13) (2022-03-01)
|
|
114
|
+
|
|
115
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [3.0.11](https://github.com/midwayjs/midway/compare/v3.0.10...v3.0.11) (2022-02-25)
|
|
122
|
+
|
|
123
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [3.0.10](https://github.com/midwayjs/midway/compare/v3.0.9...v3.0.10) (2022-02-24)
|
|
130
|
+
|
|
131
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## [3.0.9](https://github.com/midwayjs/midway/compare/v3.0.8...v3.0.9) (2022-02-21)
|
|
138
|
+
|
|
139
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## [3.0.7](https://github.com/midwayjs/midway/compare/v3.0.6...v3.0.7) (2022-02-17)
|
|
146
|
+
|
|
147
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## [3.0.6](https://github.com/midwayjs/midway/compare/v3.0.5...v3.0.6) (2022-02-13)
|
|
154
|
+
|
|
155
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## [3.0.5](https://github.com/midwayjs/midway/compare/v3.0.4...v3.0.5) (2022-02-10)
|
|
162
|
+
|
|
163
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## [3.0.4](https://github.com/midwayjs/midway/compare/v3.0.3...v3.0.4) (2022-02-09)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Bug Fixes
|
|
173
|
+
|
|
174
|
+
* supertest typings and createFunctionApp ([#1642](https://github.com/midwayjs/midway/issues/1642)) ([484f4f4](https://github.com/midwayjs/midway/commit/484f4f41b3b9e889d4d285f4871a0b37fa51e73f))
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## [3.0.3](https://github.com/midwayjs/midway/compare/v3.0.2...v3.0.3) (2022-01-28)
|
|
181
|
+
|
|
182
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## [3.0.2](https://github.com/midwayjs/midway/compare/v3.0.1...v3.0.2) (2022-01-24)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* singleton invoke request scope not valid ([#1622](https://github.com/midwayjs/midway/issues/1622)) ([f97c063](https://github.com/midwayjs/midway/commit/f97c0632107b47cf357d17774a4e4bb5233bba57))
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## [3.0.1](https://github.com/midwayjs/midway/compare/v3.0.0...v3.0.1) (2022-01-24)
|
|
200
|
+
|
|
201
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# [3.0.0](https://github.com/midwayjs/midway/compare/v3.0.0-beta.17...v3.0.0) (2022-01-20)
|
|
208
|
+
|
|
209
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
# [3.0.0-beta.17](https://github.com/midwayjs/midway/compare/v3.0.0-beta.16...v3.0.0-beta.17) (2022-01-18)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
### Bug Fixes
|
|
219
|
+
|
|
220
|
+
* move koa-session and definition ([#1572](https://github.com/midwayjs/midway/issues/1572)) ([95743c1](https://github.com/midwayjs/midway/commit/95743c11917507ccf4c218f5353e1b88917237a5))
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
# [3.0.0-beta.16](https://github.com/midwayjs/midway/compare/v3.0.0-beta.15...v3.0.0-beta.16) (2022-01-11)
|
|
227
|
+
|
|
228
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
# [3.0.0-beta.15](https://github.com/midwayjs/midway/compare/v3.0.0-beta.14...v3.0.0-beta.15) (2022-01-07)
|
|
235
|
+
|
|
236
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
# [3.0.0-beta.14](https://github.com/midwayjs/midway/compare/v3.0.0-beta.13...v3.0.0-beta.14) (2022-01-04)
|
|
243
|
+
|
|
244
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
# [3.0.0-beta.13](https://github.com/midwayjs/midway/compare/v3.0.0-beta.12...v3.0.0-beta.13) (2021-12-30)
|
|
251
|
+
|
|
252
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
# [3.0.0-beta.12](https://github.com/midwayjs/midway/compare/v3.0.0-beta.11...v3.0.0-beta.12) (2021-12-28)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Features
|
|
262
|
+
|
|
263
|
+
* custom error code & add @Files/@Fields ([#1438](https://github.com/midwayjs/midway/issues/1438)) ([b0032af](https://github.com/midwayjs/midway/commit/b0032afd2fa9ea0416fe69f4bd0c1a58bea5314e))
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# [3.0.0-beta.11](https://github.com/midwayjs/midway/compare/v3.0.0-beta.10...v3.0.0-beta.11) (2021-12-21)
|
|
270
|
+
|
|
271
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# [3.0.0-beta.10](https://github.com/midwayjs/midway/compare/v3.0.0-beta.9...v3.0.0-beta.10) (2021-12-20)
|
|
278
|
+
|
|
279
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
|
|
286
|
+
|
|
287
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
### Bug Fixes
|
|
297
|
+
|
|
298
|
+
* express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([b9272e0](https://github.com/midwayjs/midway/commit/b9272e0971003443304b0c53815be31a0061b4bd))
|
|
299
|
+
* mongoose remote config bug ([#1399](https://github.com/midwayjs/midway/issues/1399)) ([e37602d](https://github.com/midwayjs/midway/commit/e37602d54ae503aeee48afa320709aae3d18b329))
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
|
|
306
|
+
|
|
307
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
314
|
+
|
|
315
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
322
|
+
|
|
323
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
330
|
+
|
|
331
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
# [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
### Features
|
|
341
|
+
|
|
342
|
+
* add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
# [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
|
|
349
|
+
|
|
350
|
+
**Note:** Version bump only for package @midwayjs/mongoose
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
# [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
### Features
|
|
360
|
+
|
|
361
|
+
* add mongoose component and support multi-instance for typegoose ([#1334](https://github.com/midwayjs/midway/issues/1334)) ([ca0b73f](https://github.com/midwayjs/midway/commit/ca0b73fec77e8871e4001b4c9d3e45397ce32450))
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
## [2.13.3](https://github.com/midwayjs/midway/compare/v2.13.2...v2.13.3) (2021-09-28)
|
|
368
|
+
|
|
369
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
## [2.13.2](https://github.com/midwayjs/midway/compare/v2.13.1...v2.13.2) (2021-09-09)
|
|
376
|
+
|
|
377
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
## [2.13.1](https://github.com/midwayjs/midway/compare/v2.13.0...v2.13.1) (2021-09-08)
|
|
384
|
+
|
|
385
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
# [2.13.0](https://github.com/midwayjs/midway/compare/v2.12.9...v2.13.0) (2021-09-07)
|
|
392
|
+
|
|
393
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
## [2.12.9](https://github.com/midwayjs/midway/compare/v2.12.8...v2.12.9) (2021-09-01)
|
|
400
|
+
|
|
401
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
## [2.12.7](https://github.com/midwayjs/midway/compare/v2.12.6...v2.12.7) (2021-08-22)
|
|
408
|
+
|
|
409
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
## [2.12.5](https://github.com/midwayjs/midway/compare/v2.12.4...v2.12.5) (2021-08-18)
|
|
416
|
+
|
|
417
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## [2.12.3](https://github.com/midwayjs/midway/compare/v2.12.2...v2.12.3) (2021-08-09)
|
|
424
|
+
|
|
425
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
## [2.12.1](https://github.com/midwayjs/midway/compare/v2.12.0...v2.12.1) (2021-08-01)
|
|
432
|
+
|
|
433
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
# [2.12.0](https://github.com/midwayjs/midway/compare/v2.11.7...v2.12.0) (2021-07-30)
|
|
440
|
+
|
|
441
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
## [2.11.6](https://github.com/midwayjs/midway/compare/v2.11.5...v2.11.6) (2021-07-16)
|
|
448
|
+
|
|
449
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
## [2.11.5](https://github.com/midwayjs/midway/compare/v2.11.4...v2.11.5) (2021-07-15)
|
|
456
|
+
|
|
457
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
## [2.11.4](https://github.com/midwayjs/midway/compare/v2.11.3...v2.11.4) (2021-07-06)
|
|
464
|
+
|
|
465
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
## [2.11.3](https://github.com/midwayjs/midway/compare/v2.11.2...v2.11.3) (2021-07-02)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
### Bug Fixes
|
|
475
|
+
|
|
476
|
+
* hide real error when user code throw error ([#1128](https://github.com/midwayjs/midway/issues/1128)) ([e728b0b](https://github.com/midwayjs/midway/commit/e728b0b80956c09cfb856ffe082f44fa29cfeb82))
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
## [2.11.2](https://github.com/midwayjs/midway/compare/v2.11.1...v2.11.2) (2021-06-28)
|
|
483
|
+
|
|
484
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
## [2.11.1](https://github.com/midwayjs/midway/compare/v2.11.0...v2.11.1) (2021-06-19)
|
|
491
|
+
|
|
492
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
# [2.11.0](https://github.com/midwayjs/midway/compare/v2.10.19...v2.11.0) (2021-06-10)
|
|
499
|
+
|
|
500
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
## [2.10.18](https://github.com/midwayjs/midway/compare/v2.10.17...v2.10.18) (2021-05-26)
|
|
507
|
+
|
|
508
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
## [2.10.14](https://github.com/midwayjs/midway/compare/v2.10.13...v2.10.14) (2021-05-11)
|
|
515
|
+
|
|
516
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
## [2.10.13](https://github.com/midwayjs/midway/compare/v2.10.12...v2.10.13) (2021-05-08)
|
|
523
|
+
|
|
524
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
## [2.10.12](https://github.com/midwayjs/midway/compare/v2.10.11...v2.10.12) (2021-05-07)
|
|
531
|
+
|
|
532
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
## [2.10.11](https://github.com/midwayjs/midway/compare/v2.10.10...v2.10.11) (2021-04-29)
|
|
539
|
+
|
|
540
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
## [2.10.10](https://github.com/midwayjs/midway/compare/v2.10.9...v2.10.10) (2021-04-24)
|
|
547
|
+
|
|
548
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
## [2.10.9](https://github.com/midwayjs/midway/compare/v2.10.8...v2.10.9) (2021-04-21)
|
|
555
|
+
|
|
556
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
## [2.10.8](https://github.com/midwayjs/midway/compare/v2.10.7...v2.10.8) (2021-04-21)
|
|
563
|
+
|
|
564
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
## [2.10.7](https://github.com/midwayjs/midway/compare/v2.10.6...v2.10.7) (2021-04-17)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
### Bug Fixes
|
|
574
|
+
|
|
575
|
+
* add event name args ([#986](https://github.com/midwayjs/midway/issues/986)) ([bfd8232](https://github.com/midwayjs/midway/commit/bfd82320aee8600d8fa30bd2821a0e68c80fd755))
|
|
576
|
+
* format ([#997](https://github.com/midwayjs/midway/issues/997)) ([456cc14](https://github.com/midwayjs/midway/commit/456cc14513bdb000d1aa3130e9719caf7a8a803f))
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
### Features
|
|
580
|
+
|
|
581
|
+
* add midway task component ([#995](https://github.com/midwayjs/midway/issues/995)) ([befb81d](https://github.com/midwayjs/midway/commit/befb81dee90f01a20bba2c1835e8685cf85a76e7))
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
## [2.10.6](https://github.com/midwayjs/midway/compare/v2.10.5...v2.10.6) (2021-04-14)
|
|
588
|
+
|
|
589
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
## [2.10.5](https://github.com/midwayjs/midway/compare/v2.10.4...v2.10.5) (2021-04-13)
|
|
596
|
+
|
|
597
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
## [2.10.4](https://github.com/midwayjs/midway/compare/v2.10.3...v2.10.4) (2021-04-10)
|
|
604
|
+
|
|
605
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
## [2.10.3](https://github.com/midwayjs/midway/compare/v2.10.2...v2.10.3) (2021-04-07)
|
|
612
|
+
|
|
613
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
## [2.10.2](https://github.com/midwayjs/midway/compare/v2.10.1...v2.10.2) (2021-04-05)
|
|
620
|
+
|
|
621
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
# [2.10.0](https://github.com/midwayjs/midway/compare/v2.9.3...v2.10.0) (2021-04-02)
|
|
628
|
+
|
|
629
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
## [2.9.3](https://github.com/midwayjs/midway/compare/v2.9.2...v2.9.3) (2021-03-30)
|
|
636
|
+
|
|
637
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
## [2.9.2](https://github.com/midwayjs/midway/compare/v2.9.1...v2.9.2) (2021-03-27)
|
|
644
|
+
|
|
645
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
## [2.9.1](https://github.com/midwayjs/midway/compare/v2.9.0...v2.9.1) (2021-03-24)
|
|
652
|
+
|
|
653
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
# [2.9.0](https://github.com/midwayjs/midway/compare/v2.8.13...v2.9.0) (2021-03-22)
|
|
660
|
+
|
|
661
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
## [2.8.13](https://github.com/midwayjs/midway/compare/v2.8.12...v2.8.13) (2021-03-17)
|
|
668
|
+
|
|
669
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
## [2.8.11](https://github.com/midwayjs/midway/compare/v2.8.10...v2.8.11) (2021-03-12)
|
|
676
|
+
|
|
677
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
## [2.8.9](https://github.com/midwayjs/midway/compare/v2.8.8...v2.8.9) (2021-03-08)
|
|
684
|
+
|
|
685
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
## [2.8.8](https://github.com/midwayjs/midway/compare/v2.8.7...v2.8.8) (2021-03-06)
|
|
692
|
+
|
|
693
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
## [2.8.7](https://github.com/midwayjs/midway/compare/v2.8.6...v2.8.7) (2021-03-04)
|
|
700
|
+
|
|
701
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
## [2.8.6](https://github.com/midwayjs/midway/compare/v2.8.5...v2.8.6) (2021-03-03)
|
|
708
|
+
|
|
709
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
## [2.8.5](https://github.com/midwayjs/midway/compare/v2.8.4...v2.8.5) (2021-03-03)
|
|
716
|
+
|
|
717
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
## [2.8.4](https://github.com/midwayjs/midway/compare/v2.8.3...v2.8.4) (2021-03-03)
|
|
724
|
+
|
|
725
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
## [2.8.3](https://github.com/midwayjs/midway/compare/v2.8.2...v2.8.3) (2021-03-01)
|
|
732
|
+
|
|
733
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
## [2.8.2](https://github.com/midwayjs/midway/compare/v2.8.0...v2.8.2) (2021-02-27)
|
|
740
|
+
|
|
741
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
# [2.8.0](https://github.com/midwayjs/midway/compare/v2.7.7...v2.8.0) (2021-02-24)
|
|
748
|
+
|
|
749
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
## [2.7.7](https://github.com/midwayjs/midway/compare/v2.7.6...v2.7.7) (2021-02-20)
|
|
756
|
+
|
|
757
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
## [2.7.5](https://github.com/midwayjs/midway/compare/v2.7.4...v2.7.5) (2021-02-08)
|
|
764
|
+
|
|
765
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
## [2.7.3](https://github.com/midwayjs/midway/compare/v2.7.2...v2.7.3) (2021-02-02)
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
### Bug Fixes
|
|
775
|
+
|
|
776
|
+
* egg socket io missing session middleware ([#835](https://github.com/midwayjs/midway/issues/835)) ([6e605a1](https://github.com/midwayjs/midway/commit/6e605a15b64bf51182b393b68d66d0867c571b94))
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
## [2.7.2](https://github.com/midwayjs/midway/compare/v2.7.1...v2.7.2) (2021-01-28)
|
|
783
|
+
|
|
784
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
## [2.7.1](https://github.com/midwayjs/midway/compare/v2.7.0...v2.7.1) (2021-01-28)
|
|
791
|
+
|
|
792
|
+
**Note:** Version bump only for package @midwayjs/typegoose
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
# [2.7.0](https://github.com/midwayjs/midway/compare/v2.6.13...v2.7.0) (2021-01-27)
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
### Features
|
|
802
|
+
|
|
803
|
+
* support entry file in bootstrap ([#819](https://github.com/midwayjs/midway/issues/819)) ([49a5ff6](https://github.com/midwayjs/midway/commit/49a5ff662134bdd42dc3a80738b44a05138f8f7c))
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ILifeCycle, IMidwayContainer } from '@midwayjs/core';
|
|
2
|
+
import { MongooseDataSourceManager } from './manager';
|
|
2
3
|
export declare class MongooseConfiguration implements ILifeCycle {
|
|
4
|
+
mongooseDataSourceManager: MongooseDataSourceManager;
|
|
3
5
|
onReady(container: IMidwayContainer): Promise<void>;
|
|
4
6
|
onStop(container: IMidwayContainer): Promise<void>;
|
|
5
7
|
}
|
package/dist/configuration.js
CHANGED
|
@@ -11,11 +11,10 @@ const decorator_1 = require("@midwayjs/decorator");
|
|
|
11
11
|
const manager_1 = require("./manager");
|
|
12
12
|
let MongooseConfiguration = class MongooseConfiguration {
|
|
13
13
|
async onReady(container) {
|
|
14
|
-
await container.getAsync(manager_1.
|
|
14
|
+
this.mongooseDataSourceManager = await container.getAsync(manager_1.MongooseDataSourceManager);
|
|
15
15
|
}
|
|
16
16
|
async onStop(container) {
|
|
17
|
-
|
|
18
|
-
await factory.stop();
|
|
17
|
+
await this.mongooseDataSourceManager.stop();
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
20
|
MongooseConfiguration = __decorate([
|
package/dist/manager.d.ts
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataSourceManager } from '@midwayjs/core';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class MongooseDataSourceManager extends DataSourceManager<mongoose.Connection> {
|
|
4
4
|
config: any;
|
|
5
5
|
logger: any;
|
|
6
6
|
init(): Promise<void>;
|
|
7
|
-
protected
|
|
7
|
+
protected createDataSource(config: any, name: string): Promise<mongoose.Connection>;
|
|
8
8
|
getName(): string;
|
|
9
|
-
|
|
9
|
+
destroyDataSource(dataSource: mongoose.Connection): Promise<void>;
|
|
10
|
+
protected checkConnected(dataSource: mongoose.Connection): Promise<boolean>;
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare class MongooseConnectionServiceFactory {
|
|
16
|
+
mongooseDataSourceManager: MongooseDataSourceManager;
|
|
17
|
+
createInstance(config: any, clientName: any): Promise<void | mongoose.Connection>;
|
|
18
|
+
get(id: string): mongoose.Connection;
|
|
19
|
+
getName(): string;
|
|
20
|
+
has(id: string): boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
11
25
|
export declare class MongooseConnectionService implements mongoose.Connection {
|
|
12
|
-
private
|
|
26
|
+
private mongooseDataSourceManager;
|
|
13
27
|
private instance;
|
|
14
28
|
init(): Promise<void>;
|
|
15
29
|
}
|
package/dist/manager.js
CHANGED
|
@@ -9,68 +9,113 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongooseConnectionService = exports.MongooseConnectionServiceFactory = void 0;
|
|
12
|
+
exports.MongooseConnectionService = exports.MongooseConnectionServiceFactory = exports.MongooseDataSourceManager = void 0;
|
|
13
13
|
const core_1 = require("@midwayjs/core");
|
|
14
14
|
const decorator_1 = require("@midwayjs/decorator");
|
|
15
15
|
const mongoose = require("mongoose");
|
|
16
|
-
let
|
|
16
|
+
let MongooseDataSourceManager = class MongooseDataSourceManager extends core_1.DataSourceManager {
|
|
17
17
|
async init() {
|
|
18
|
-
|
|
18
|
+
if (this.config.client) {
|
|
19
|
+
this.logger.warn('[midway:mongoose] mongoose.client is deprecated, please use new config format.');
|
|
20
|
+
this.config.dataSource = {
|
|
21
|
+
default: this.config.client,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (this.config.clients) {
|
|
25
|
+
this.logger.warn('[midway:mongoose] mongoose.clients is deprecated, please use new config format.');
|
|
26
|
+
this.config.dataSource = this.config.clients;
|
|
27
|
+
}
|
|
28
|
+
await this.initDataSource(this.config);
|
|
19
29
|
}
|
|
20
|
-
async
|
|
30
|
+
async createDataSource(config, name) {
|
|
21
31
|
const connection = await mongoose.createConnection(config.uri, config.options);
|
|
22
32
|
connection.on('error', err => {
|
|
23
|
-
err.message = `[mongoose]${err.message}`;
|
|
33
|
+
err.message = `[midway:mongoose] ${err.message}`;
|
|
24
34
|
this.logger.error(err);
|
|
25
35
|
});
|
|
26
36
|
/* istanbul ignore next */
|
|
27
37
|
connection.on('disconnected', () => {
|
|
28
|
-
this.logger.info(`[mongoose] ${name} disconnected`);
|
|
38
|
+
this.logger.info(`[midway:mongoose] ${name} disconnected`);
|
|
29
39
|
});
|
|
30
40
|
connection.on('connected', () => {
|
|
31
|
-
this.logger.info(`[mongoose] ${name} connected successfully`);
|
|
41
|
+
this.logger.info(`[midway:mongoose] ${name} connected successfully`);
|
|
32
42
|
});
|
|
33
43
|
/* istanbul ignore next */
|
|
34
44
|
connection.on('reconnected', () => {
|
|
35
|
-
this.logger.info(`[mongoose] ${name} reconnected successfully`);
|
|
45
|
+
this.logger.info(`[midway:mongoose] ${name} reconnected successfully`);
|
|
36
46
|
});
|
|
47
|
+
if (config.entities) {
|
|
48
|
+
connection.entities = config.entities;
|
|
49
|
+
}
|
|
37
50
|
return connection;
|
|
38
51
|
}
|
|
39
52
|
getName() {
|
|
40
53
|
return 'mongoose';
|
|
41
54
|
}
|
|
42
|
-
async
|
|
43
|
-
await
|
|
55
|
+
async destroyDataSource(dataSource) {
|
|
56
|
+
await dataSource.close();
|
|
57
|
+
}
|
|
58
|
+
async checkConnected(dataSource) {
|
|
59
|
+
return dataSource.readyState === mongoose.ConnectionStates.connected;
|
|
44
60
|
}
|
|
45
61
|
};
|
|
46
62
|
__decorate([
|
|
47
63
|
(0, decorator_1.Config)('mongoose'),
|
|
48
64
|
__metadata("design:type", Object)
|
|
49
|
-
],
|
|
65
|
+
], MongooseDataSourceManager.prototype, "config", void 0);
|
|
50
66
|
__decorate([
|
|
51
67
|
(0, decorator_1.Logger)('coreLogger'),
|
|
52
68
|
__metadata("design:type", Object)
|
|
53
|
-
],
|
|
69
|
+
], MongooseDataSourceManager.prototype, "logger", void 0);
|
|
54
70
|
__decorate([
|
|
55
71
|
(0, decorator_1.Init)(),
|
|
56
72
|
__metadata("design:type", Function),
|
|
57
73
|
__metadata("design:paramtypes", []),
|
|
58
74
|
__metadata("design:returntype", Promise)
|
|
59
|
-
],
|
|
75
|
+
], MongooseDataSourceManager.prototype, "init", null);
|
|
76
|
+
MongooseDataSourceManager = __decorate([
|
|
77
|
+
(0, decorator_1.Provide)(),
|
|
78
|
+
(0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
|
|
79
|
+
], MongooseDataSourceManager);
|
|
80
|
+
exports.MongooseDataSourceManager = MongooseDataSourceManager;
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated
|
|
83
|
+
*/
|
|
84
|
+
let MongooseConnectionServiceFactory = class MongooseConnectionServiceFactory {
|
|
85
|
+
createInstance(config, clientName) {
|
|
86
|
+
return this.mongooseDataSourceManager.createInstance(config, clientName);
|
|
87
|
+
}
|
|
88
|
+
get(id) {
|
|
89
|
+
return this.mongooseDataSourceManager.getDataSource(id);
|
|
90
|
+
}
|
|
91
|
+
getName() {
|
|
92
|
+
return 'mongoose';
|
|
93
|
+
}
|
|
94
|
+
has(id) {
|
|
95
|
+
return this.mongooseDataSourceManager.hasDataSource(id);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, decorator_1.Inject)(),
|
|
100
|
+
__metadata("design:type", MongooseDataSourceManager)
|
|
101
|
+
], MongooseConnectionServiceFactory.prototype, "mongooseDataSourceManager", void 0);
|
|
60
102
|
MongooseConnectionServiceFactory = __decorate([
|
|
61
103
|
(0, decorator_1.Provide)(),
|
|
62
104
|
(0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
|
|
63
105
|
], MongooseConnectionServiceFactory);
|
|
64
106
|
exports.MongooseConnectionServiceFactory = MongooseConnectionServiceFactory;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated
|
|
109
|
+
*/
|
|
65
110
|
let MongooseConnectionService = class MongooseConnectionService {
|
|
66
111
|
async init() {
|
|
67
|
-
this.instance = this.
|
|
112
|
+
this.instance = this.mongooseDataSourceManager.getDataSource('default');
|
|
68
113
|
}
|
|
69
114
|
};
|
|
70
115
|
__decorate([
|
|
71
116
|
(0, decorator_1.Inject)(),
|
|
72
|
-
__metadata("design:type",
|
|
73
|
-
], MongooseConnectionService.prototype, "
|
|
117
|
+
__metadata("design:type", MongooseDataSourceManager)
|
|
118
|
+
], MongooseConnectionService.prototype, "mongooseDataSourceManager", void 0);
|
|
74
119
|
__decorate([
|
|
75
120
|
(0, decorator_1.Init)(),
|
|
76
121
|
__metadata("design:type", Function),
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/mongoose",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-beta.1",
|
|
4
4
|
"description": "Midway Component for mongoose",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@midwayjs/core": "^3.
|
|
26
|
-
"@midwayjs/decorator": "^3.
|
|
27
|
-
"@midwayjs/mock": "^3.
|
|
25
|
+
"@midwayjs/core": "^3.4.0-beta.1",
|
|
26
|
+
"@midwayjs/decorator": "^3.4.0-beta.1",
|
|
27
|
+
"@midwayjs/mock": "^3.4.0-beta.1",
|
|
28
28
|
"mongoose": "6.2.10"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"mongoose": "*"
|
|
32
|
-
}
|
|
33
|
-
"gitHead": "5a835008aaa26e1b3c7d99c525f4a9fdaa3e41d1"
|
|
32
|
+
}
|
|
34
33
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2013 - Now midwayjs
|
|
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.
|