@midwayjs/faas 3.0.0-beta.8 → 3.0.0-beta.9

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,17 @@
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
+ # [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * faas missing config in framework ([#1413](https://github.com/midwayjs/midway/issues/1413)) ([7ab16a2](https://github.com/midwayjs/midway/commit/7ab16a24b29d5254a762bfffcdf18385effdf639))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
7
18
 
8
19
  **Note:** Version bump only for package @midwayjs/faas
@@ -32,7 +32,9 @@ let FaaSConfiguration = class FaaSConfiguration {
32
32
  }
33
33
  async onReady(container) { }
34
34
  async onServerReady() {
35
- await this.framework.run();
35
+ if (!this.framework.isEnable()) {
36
+ await this.framework.run();
37
+ }
36
38
  }
37
39
  };
38
40
  __decorate([
@@ -8,9 +8,10 @@ export declare class MidwayFaaSFramework extends BaseFramework<IMidwayFaaSApplic
8
8
  private lock;
9
9
  app: IMidwayFaaSApplication;
10
10
  private isReplaceLogger;
11
+ private developmentRun;
11
12
  environmentService: MidwayEnvironmentService;
12
13
  middlewareService: MidwayMiddlewareService<FaaSContext, any>;
13
- configure(options: IFaaSConfigurationOptions): void;
14
+ configure(options: IFaaSConfigurationOptions): any;
14
15
  isEnable(): boolean;
15
16
  applicationInitialize(options: IMidwayBootstrapOptions): Promise<void>;
16
17
  run(): Promise<void>;
package/dist/framework.js CHANGED
@@ -22,18 +22,19 @@ let MidwayFaaSFramework = class MidwayFaaSFramework extends core_1.BaseFramework
22
22
  this.funMappingStore = new Map();
23
23
  this.lock = new simple_lock_1.default();
24
24
  this.isReplaceLogger = process.env['MIDWAY_SERVERLESS_REPLACE_LOGGER'] === 'true';
25
+ this.developmentRun = false;
25
26
  }
26
27
  configure(options) {
27
- const faasConfig = this.configService.getConfiguration('faas');
28
- if (faasConfig) {
29
- this.configurationOptions = faasConfig;
28
+ if (options) {
29
+ this.developmentRun = true;
30
+ this.configurationOptions = options;
30
31
  }
31
32
  else {
32
- this.configurationOptions = options;
33
+ return this.configService.getConfiguration('faas');
33
34
  }
34
35
  }
35
36
  isEnable() {
36
- return false;
37
+ return !this.developmentRun;
37
38
  }
38
39
  async applicationInitialize(options) {
39
40
  var _a;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@midwayjs/faas",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0-beta.9",
4
4
  "main": "dist/index",
5
5
  "typings": "index.d.ts",
6
6
  "dependencies": {
7
- "@midwayjs/core": "^3.0.0-beta.8",
8
- "@midwayjs/faas-typings": "^3.0.0-beta.8",
9
- "@midwayjs/logger": "^3.0.0-beta.8",
7
+ "@midwayjs/core": "^3.0.0-beta.9",
8
+ "@midwayjs/faas-typings": "^3.0.0-beta.9",
9
+ "@midwayjs/logger": "^3.0.0-beta.9",
10
10
  "@midwayjs/simple-lock": "^1.1.4"
11
11
  },
12
12
  "devDependencies": {
13
- "@midwayjs/decorator": "^3.0.0-beta.8",
14
- "@midwayjs/mock": "^3.0.0-beta.8",
15
- "@midwayjs/serverless-fc-starter": "^3.0.0-beta.8",
16
- "@midwayjs/serverless-scf-starter": "^3.0.0-beta.8",
13
+ "@midwayjs/decorator": "^3.0.0-beta.9",
14
+ "@midwayjs/mock": "^3.0.0-beta.9",
15
+ "@midwayjs/serverless-fc-starter": "^3.0.0-beta.9",
16
+ "@midwayjs/serverless-scf-starter": "^3.0.0-beta.9",
17
17
  "mm": "3"
18
18
  },
19
19
  "engines": {
@@ -45,5 +45,5 @@
45
45
  "url": "git@github.com:midwayjs/midway.git"
46
46
  },
47
47
  "license": "MIT",
48
- "gitHead": "bfafbdf8798f48d4daac5dd88ad53c6b2f33c110"
48
+ "gitHead": "d23e4a4fee58097b98461625c428a37d55535cec"
49
49
  }