@midwayjs/mongoose 2.13.4 → 2.14.0

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 CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.14.0](https://github.com/midwayjs/midway/compare/v2.13.5...v2.14.0) (2021-12-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([5d5f299](https://github.com/midwayjs/midway/commit/5d5f2992be116ca71b21f01fd782e3a2ac072496))
12
+ * mongoose init before config load ([#1401](https://github.com/midwayjs/midway/issues/1401)) ([34d2ab8](https://github.com/midwayjs/midway/commit/34d2ab8b5bcfc9bddf52b9a93d6f3b44960ef537))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [2.13.4](https://github.com/midwayjs/midway/compare/v2.13.3...v2.13.4) (2021-10-21)
7
19
 
8
20
 
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  this is a sub package for midway.
7
7
 
8
- Document: [https://midwayjs.org/midway](https://midwayjs.org/midway)
8
+ Document: [https://midwayjs.org](https://midwayjs.org)
9
9
 
10
10
  ## License
11
11
 
@@ -1,8 +1,6 @@
1
1
  import { ILifeCycle, IMidwayContainer } from '@midwayjs/core';
2
- import { MongooseConnectionServiceFactory } from './manager';
3
2
  export declare class MongooseConfiguration implements ILifeCycle {
4
- factoryService: MongooseConnectionServiceFactory;
5
3
  onReady(container: IMidwayContainer): Promise<void>;
6
- onStop(): Promise<void>;
4
+ onStop(container: IMidwayContainer): Promise<void>;
7
5
  }
8
6
  //# sourceMappingURL=configuration.d.ts.map
@@ -5,24 +5,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
12
9
  exports.MongooseConfiguration = void 0;
13
10
  const decorator_1 = require("@midwayjs/decorator");
14
11
  const DefaultConfig = require("./config.default");
15
12
  const manager_1 = require("./manager");
16
13
  let MongooseConfiguration = class MongooseConfiguration {
17
- async onReady(container) { }
18
- async onStop() {
19
- await this.factoryService.stop();
14
+ async onReady(container) {
15
+ await container.getAsync(manager_1.MongooseConnectionServiceFactory);
16
+ }
17
+ async onStop(container) {
18
+ const factoryService = await container.getAsync(manager_1.MongooseConnectionServiceFactory);
19
+ await factoryService.stop();
20
20
  }
21
21
  };
22
- __decorate([
23
- (0, decorator_1.Inject)(),
24
- __metadata("design:type", manager_1.MongooseConnectionServiceFactory)
25
- ], MongooseConfiguration.prototype, "factoryService", void 0);
26
22
  MongooseConfiguration = __decorate([
27
23
  (0, decorator_1.Configuration)({
28
24
  namespace: 'mongoose',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/mongoose",
3
- "version": "2.13.4",
3
+ "version": "2.14.0",
4
4
  "description": "Midway Component for mongoose",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "devDependencies": {
24
- "@midwayjs/core": "^2.13.4",
25
- "@midwayjs/decorator": "^2.13.2",
26
- "@midwayjs/mock": "^2.13.4",
24
+ "@midwayjs/core": "^2.14.0",
25
+ "@midwayjs/decorator": "^2.14.0",
26
+ "@midwayjs/mock": "^2.14.0",
27
27
  "mongoose": "~6.0.11"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "mongoose": "*"
31
31
  },
32
- "gitHead": "9e61ff6e854b5641201e7d3df8aa19a7d6287f3d"
32
+ "gitHead": "5fd716b0e731162d8e9f0931790fde7402fb83de"
33
33
  }