@midwayjs/faas 3.11.0 → 3.11.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/dist/starter.d.ts CHANGED
@@ -6,14 +6,15 @@ export declare abstract class AbstractBootstrapStarter {
6
6
  protected applicationContext: any;
7
7
  protected framework: MidwayFaaSFramework;
8
8
  constructor(options?: ServerlessStarterOptions);
9
+ private startedExports;
9
10
  getApplicationContext(): any;
10
11
  close(): Promise<void>;
11
- start(options?: ServerlessStarterOptions): any;
12
+ start(options?: ServerlessStarterOptions): Record<string, any>;
12
13
  initFramework(bootstrapOptions?: IMidwayBootstrapOptions): Promise<void>;
13
14
  protected createDefaultMockHttpEvent(): void;
14
15
  protected createDefaultMockEvent(): void;
15
16
  protected createDefaultMockContext(): void;
16
- abstract onStart(): any;
17
+ abstract onStart(): unknown;
17
18
  abstract onInit(...args: unknown[]): any;
18
19
  abstract onRequest(...args: unknown[]): any;
19
20
  abstract onClose(): any;
package/dist/starter.js CHANGED
@@ -13,8 +13,11 @@ class AbstractBootstrapStarter {
13
13
  await this.onClose();
14
14
  }
15
15
  start(options) {
16
- this.options = Object.assign(this.options, options);
17
- return this.onStart();
16
+ if (!this.startedExports) {
17
+ this.options = Object.assign(this.options, options);
18
+ this.startedExports = this.onStart();
19
+ }
20
+ return this.startedExports;
18
21
  }
19
22
  async initFramework(bootstrapOptions = {}) {
20
23
  // init midway
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@midwayjs/faas",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
4
4
  "main": "dist/index",
5
5
  "typings": "index.d.ts",
6
6
  "dependencies": {
7
- "@midwayjs/core": "^3.11.0",
7
+ "@midwayjs/core": "^3.11.1",
8
8
  "@midwayjs/faas-typings": "^3.10.13",
9
9
  "@midwayjs/logger": "^2.15.0",
10
10
  "@midwayjs/serverless-http-parser": "^3.10.14",
11
11
  "@midwayjs/simple-lock": "^1.1.4"
12
12
  },
13
13
  "devDependencies": {
14
- "@midwayjs/mock": "^3.11.0",
15
- "@midwayjs/serverless-fc-starter": "^3.11.0",
14
+ "@midwayjs/mock": "^3.11.1",
15
+ "@midwayjs/serverless-fc-starter": "^3.11.1",
16
16
  "@midwayjs/serverless-scf-starter": "^3.10.14",
17
17
  "mm": "3.2.1"
18
18
  },
@@ -45,5 +45,5 @@
45
45
  "url": "git@github.com:midwayjs/midway.git"
46
46
  },
47
47
  "license": "MIT",
48
- "gitHead": "eadb977e7fddcd4287c099fc32b601cd51702514"
48
+ "gitHead": "bd9375874eb8cfaa49fbcfaa0497021cea06a394"
49
49
  }