@modern-js/plugin-express 2.0.0-beta.7 → 2.0.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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # @modern-js/plugin-express
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/bff-core@2.0.1
8
+ - @modern-js/bff-runtime@2.0.1
9
+ - @modern-js/types@2.0.1
10
+ - @modern-js/utils@2.0.1
11
+
12
+ ## 2.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - dda38c9c3e: chore: v2
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [edd1cfb1af]
21
+ - Updated dependencies [6bda14ed71]
22
+ - Updated dependencies [dda38c9c3e]
23
+ - Updated dependencies [8b8e1bb571]
24
+ - Updated dependencies [ffb2ed4]
25
+ - Updated dependencies [bbe4c4ab64]
26
+ - @modern-js/utils@2.0.0
27
+ - @modern-js/types@2.0.0
28
+ - @modern-js/bff-core@2.0.0
29
+ - @modern-js/bff-runtime@2.0.0
30
+
3
31
  ## 2.0.0-beta.7
4
32
 
5
33
  ### Major Changes
@@ -134,7 +134,7 @@ var plugin_default = () => ({
134
134
  prepareWebServer({ config }, next) {
135
135
  var _a2;
136
136
  const userConfig = api.useConfigContext();
137
- if ((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.disableFrameworkExt) {
137
+ if (!((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.enableFrameworkExt)) {
138
138
  return next();
139
139
  }
140
140
  const app = express();
@@ -162,7 +162,7 @@ var plugin_default = () => ({
162
162
  prepareWebServer({ config }, next) {
163
163
  var _a2;
164
164
  const userConfig = api.useConfigContext();
165
- if ((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.disableFrameworkExt) {
165
+ if (!((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.enableFrameworkExt)) {
166
166
  return next();
167
167
  }
168
168
  const app = (0, import_express.default)();
@@ -340,7 +340,7 @@ var plugin_default = function() {
340
340
  var config = param.config;
341
341
  var ref;
342
342
  var userConfig = api.useConfigContext();
343
- if (userConfig === null || userConfig === void 0 ? void 0 : (ref = userConfig.server) === null || ref === void 0 ? void 0 : ref.disableFrameworkExt) {
343
+ if (!(userConfig === null || userConfig === void 0 ? void 0 : (ref = userConfig.server) === null || ref === void 0 ? void 0 : ref.enableFrameworkExt)) {
344
344
  return next();
345
345
  }
346
346
  var app = express();
@@ -1,5 +1,5 @@
1
1
  import { Request, Response } from 'express';
2
- export declare type Context = {
2
+ export type Context = {
3
3
  req: Request;
4
4
  res: Response;
5
5
  };
@@ -1,11 +1,11 @@
1
1
  import { Operator } from '@modern-js/bff-core';
2
2
  import { NextFunction } from '@modern-js/types';
3
3
  import type { Request, Response } from 'express';
4
- export declare type EndFunction = ((func: (res: Response) => void) => void) & ((data: unknown) => void);
5
- declare type MaybeAsync<T> = T | Promise<T>;
6
- declare type PipeFunction<T> = (value: T, end: EndFunction) => MaybeAsync<void> | MaybeAsync<T>;
4
+ export type EndFunction = ((func: (res: Response) => void) => void) & ((data: unknown) => void);
5
+ type MaybeAsync<T> = T | Promise<T>;
6
+ type PipeFunction<T> = (value: T, end: EndFunction) => MaybeAsync<void> | MaybeAsync<T>;
7
7
  export declare const Pipe: <T>(func: PipeFunction<T>) => Operator;
8
- export declare type Pipe = typeof Pipe;
8
+ export type Pipe = typeof Pipe;
9
9
  export declare const Middleware: (middleware: (req: Request, res: Response, next: NextFunction) => void) => Operator;
10
- export declare type Middleware = typeof Middleware;
10
+ export type Middleware = typeof Middleware;
11
11
  export {};
@@ -2,7 +2,7 @@ import 'reflect-metadata';
2
2
  import { HttpMethod } from '@modern-js/bff-core';
3
3
  import type { APIHandlerInfo } from '@modern-js/bff-core';
4
4
  import type { Request, Response, NextFunction } from 'express';
5
- declare type Handler = APIHandlerInfo['handler'];
5
+ type Handler = APIHandlerInfo['handler'];
6
6
  export declare const createRouteHandler: (handler: Handler) => (req: Request, res: Response, next: NextFunction) => Promise<void | Response<any, Record<string, any>>>;
7
7
  export declare const isNormalMethod: (httpMethod: HttpMethod) => httpMethod is HttpMethod;
8
8
  export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.7",
14
+ "version": "2.0.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/cli/index.d.ts",
17
17
  "main": "./dist/js/node/cli/index.js",
@@ -43,10 +43,10 @@
43
43
  "formidable": "^1.2.2",
44
44
  "reflect-metadata": "^0.1.13",
45
45
  "type-is": "^1.6.18",
46
- "@modern-js/bff-core": "2.0.0-beta.7",
47
- "@modern-js/bff-runtime": "2.0.0-beta.7",
48
- "@modern-js/types": "2.0.0-beta.7",
49
- "@modern-js/utils": "2.0.0-beta.7"
46
+ "@modern-js/utils": "2.0.1",
47
+ "@modern-js/types": "2.0.1",
48
+ "@modern-js/bff-runtime": "2.0.1",
49
+ "@modern-js/bff-core": "2.0.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/cookie-parser": "^1.4.2",
@@ -62,11 +62,11 @@
62
62
  "supertest": "^6.1.6",
63
63
  "typescript": "^4",
64
64
  "zod": "^3.17.3",
65
- "@modern-js/core": "2.0.0-beta.7",
66
- "@modern-js/app-tools": "2.0.0-beta.7",
67
- "@modern-js/server-core": "2.0.0-beta.7",
68
- "@scripts/build": "2.0.0-beta.7",
69
- "@scripts/jest-config": "2.0.0-beta.7"
65
+ "@modern-js/core": "2.0.1",
66
+ "@modern-js/app-tools": "2.0.1",
67
+ "@modern-js/server-core": "2.0.1",
68
+ "@scripts/jest-config": "2.0.1",
69
+ "@scripts/build": "2.0.1"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "express": "^4.17.1"