@midwayjs/faas 3.12.10 → 3.13.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.
@@ -2,7 +2,7 @@ export declare const midwayLogger: {
2
2
  default: {
3
3
  enableFile: boolean;
4
4
  enableError: boolean;
5
- printFormat: (info: any) => string;
5
+ format: (info: any) => string;
6
6
  };
7
7
  };
8
8
  //# sourceMappingURL=config.default.d.ts.map
@@ -5,7 +5,7 @@ exports.midwayLogger = {
5
5
  default: {
6
6
  enableFile: false,
7
7
  enableError: false,
8
- printFormat: (info) => {
8
+ format: (info) => {
9
9
  var _a, _b, _c, _d, _e, _f;
10
10
  const requestId = (_f = (_c = (_b = (_a = info.ctx) === null || _a === void 0 ? void 0 : _a['originContext']) === null || _b === void 0 ? void 0 : _b['requestId']) !== null && _c !== void 0 ? _c : (_e = (_d = info.ctx) === null || _d === void 0 ? void 0 : _d['originContext']) === null || _e === void 0 ? void 0 : _e['request_id']) !== null && _f !== void 0 ? _f : '';
11
11
  return `${new Date().toISOString()} ${requestId} [${info.level}] ${info.message}`;
@@ -45,7 +45,7 @@ export declare class MidwayFaaSFramework extends BaseFramework<Application, Cont
45
45
  getContext(context?: any): any;
46
46
  private invokeHandler;
47
47
  protected getFunctionHandler(ctx: any, args: any, target: any, method: any): string;
48
- createLogger(name: string, option?: LoggerOptions): import("@midwayjs/core").ILogger;
48
+ createLogger(name: string, option?: LoggerOptions): import("@midwayjs/logger").ILogger;
49
49
  getFrameworkName(): string;
50
50
  getServer(): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
51
51
  beforeStop(): Promise<void>;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { MidwayRequestContainer, IMidwayApplication, IConfigurationOptions, IMidwayContext, NextFunction as BaseNextFunction, CommonMiddlewareUnion, ContextMiddlewareManager, IMidwayBootstrapOptions, ObjectIdentifier } from '@midwayjs/core';
3
- import { ILogger } from '@midwayjs/logger';
2
+ import { MidwayRequestContainer, IMidwayApplication, IConfigurationOptions, IMidwayContext, NextFunction as BaseNextFunction, CommonMiddlewareUnion, ContextMiddlewareManager, IMidwayBootstrapOptions, ObjectIdentifier, ILogger } from '@midwayjs/core';
4
3
  import { Application as ServerlessHttpApplication, HttpResponseOptions } from '@midwayjs/serverless-http-parser';
5
4
  import { Cookies } from '@midwayjs/cookies';
6
5
  import { Writable } from 'stream';
@@ -352,6 +351,10 @@ export interface FaaSHTTPContext extends ContextDelegatedRequest, ContextDelegat
352
351
  * FaaS Cookies Object
353
352
  */
354
353
  cookies: Cookies;
354
+ /**
355
+ * FaaS Context State
356
+ */
357
+ state: State;
355
358
  /**
356
359
  * Throw an error with `msg` and optional `status`
357
360
  * defaulting to 500. Note that these are user-level
@@ -460,5 +463,7 @@ export interface HttpResponseFormat<T = unknown> {
460
463
  }
461
464
  export interface wrapHttpRequestOptions extends HttpResponseOptions {
462
465
  }
466
+ export interface State {
467
+ }
463
468
  export {};
464
469
  //# sourceMappingURL=interface.d.ts.map
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@midwayjs/faas",
3
- "version": "3.12.10",
3
+ "version": "3.13.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "index.d.ts",
6
6
  "dependencies": {
7
- "@midwayjs/core": "^3.12.3",
8
- "@midwayjs/logger": "^2.15.0",
7
+ "@midwayjs/core": "^3.13.0",
9
8
  "@midwayjs/serverless-http-parser": "^3.12.5",
10
9
  "@midwayjs/simple-lock": "^1.1.4"
11
10
  },
12
11
  "devDependencies": {
13
- "@midwayjs/mock": "^3.12.10",
14
- "@midwayjs/serverless-fc-starter": "^3.12.5",
12
+ "@midwayjs/logger": "^3.0.0",
13
+ "@midwayjs/mock": "^3.13.0",
14
+ "@midwayjs/serverless-fc-starter": "^3.13.0",
15
15
  "@midwayjs/serverless-scf-starter": "^3.12.5",
16
16
  "mm": "3.3.0"
17
17
  },
@@ -44,5 +44,5 @@
44
44
  "url": "git@github.com:midwayjs/midway.git"
45
45
  },
46
46
  "license": "MIT",
47
- "gitHead": "8d92c54424843d437fd5f77f6ff93f00c055117b"
47
+ "gitHead": "9f55734afa5b08dcf46bc89493ec8edaa8c6202b"
48
48
  }