@modern-js/plugin-express 1.2.1-rc.0 → 1.2.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 +2 -9
- package/dist/js/modern/plugin.js +1 -1
- package/dist/js/node/plugin.js +1 -1
- package/package.json +18 -13
- package/src/plugin.ts +1 -1
- package/tests/fixtures/function-mode/api/nest/user.ts +1 -1
- package/tests/fixtures/lambda-mode/api/lambda/nest/user.ts +1 -1
- package/tests/lambdaMode.test.ts +2 -2
- package/tests/tsconfig.json +1 -3
- package/tests/webServer.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
# @modern-js/plugin-express
|
|
2
2
|
|
|
3
|
-
## 1.2.1
|
|
3
|
+
## 1.2.1
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- Updated dependencies [b7fb82ec]
|
|
9
|
-
- @modern-js/server-plugin@1.1.4-rc.0
|
|
10
|
-
- @modern-js/utils@1.1.6-rc.0
|
|
11
|
-
- @modern-js/core@1.2.1-rc.0
|
|
12
|
-
- @modern-js/adapter-helpers@1.1.1
|
|
13
|
-
- @modern-js/bff-runtime@1.1.2-rc.0
|
|
14
|
-
- @modern-js/bff-utils@1.1.2-rc.0
|
|
7
|
+
- ad107726: feat: new action support apppend type define
|
|
15
8
|
|
|
16
9
|
## 1.2.0
|
|
17
10
|
|
package/dist/js/modern/plugin.js
CHANGED
package/dist/js/node/plugin.js
CHANGED
package/package.json
CHANGED
|
@@ -11,26 +11,31 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.1
|
|
14
|
+
"version": "1.2.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
18
18
|
"module": "./dist/js/treeshaking/index.js",
|
|
19
19
|
"jsnext:modern": "./dist/js/modern/index.js",
|
|
20
20
|
"exports": {
|
|
21
|
+
"./types": "./types.d.ts",
|
|
21
22
|
".": {
|
|
22
23
|
"node": {
|
|
24
|
+
"jsnext:source": "./src/index.ts",
|
|
23
25
|
"import": "./dist/js/modern/index.js",
|
|
24
26
|
"require": "./dist/js/node/index.js"
|
|
25
27
|
},
|
|
26
28
|
"default": "./dist/js/treeshaking/index.js"
|
|
27
29
|
},
|
|
28
|
-
"./cli":
|
|
30
|
+
"./cli": {
|
|
31
|
+
"jsnext:source": "./src/cli/index.ts",
|
|
32
|
+
"default": "./dist/js/node/cli/index.js"
|
|
33
|
+
}
|
|
29
34
|
},
|
|
30
35
|
"dependencies": {
|
|
31
36
|
"@babel/runtime": "^7.15.3",
|
|
32
37
|
"@modern-js/adapter-helpers": "^1.1.1",
|
|
33
|
-
"@modern-js/utils": "^1.1.
|
|
38
|
+
"@modern-js/utils": "^1.1.5",
|
|
34
39
|
"cookie-parser": "^1.4.5",
|
|
35
40
|
"finalhandler": "^1.1.2",
|
|
36
41
|
"formidable": "^1.2.2",
|
|
@@ -38,8 +43,8 @@
|
|
|
38
43
|
},
|
|
39
44
|
"devDependencies": {
|
|
40
45
|
"express": "^4.17.1",
|
|
41
|
-
"@modern-js/server-utils": "^1.1.
|
|
42
|
-
"@modern-js/bff-runtime": "^1.1.
|
|
46
|
+
"@modern-js/server-utils": "^1.1.2",
|
|
47
|
+
"@modern-js/bff-runtime": "^1.1.1",
|
|
43
48
|
"@types/cookie-parser": "^1.4.2",
|
|
44
49
|
"@types/express": "^4.17.13",
|
|
45
50
|
"@types/finalhandler": "^1.1.1",
|
|
@@ -50,11 +55,11 @@
|
|
|
50
55
|
"@types/type-is": "^1.6.3",
|
|
51
56
|
"supertest": "^6.1.6",
|
|
52
57
|
"typescript": "^4",
|
|
53
|
-
"@modern-js/bff-utils": "^1.1.
|
|
54
|
-
"@modern-js/core": "^1.2.
|
|
55
|
-
"@modern-js/server-plugin": "^1.1.
|
|
58
|
+
"@modern-js/bff-utils": "^1.1.1",
|
|
59
|
+
"@modern-js/core": "^1.2.0",
|
|
60
|
+
"@modern-js/server-plugin": "^1.1.3",
|
|
56
61
|
"@modern-js/plugin-testing": "^1.2.2",
|
|
57
|
-
"@modern-js/module-tools": "^1.1.
|
|
62
|
+
"@modern-js/module-tools": "^1.1.5"
|
|
58
63
|
},
|
|
59
64
|
"modernConfig": {
|
|
60
65
|
"output": {
|
|
@@ -62,10 +67,10 @@
|
|
|
62
67
|
}
|
|
63
68
|
},
|
|
64
69
|
"peerDependencies": {
|
|
65
|
-
"@modern-js/bff-utils": "^1.1.
|
|
66
|
-
"@modern-js/core": "^1.2.
|
|
67
|
-
"@modern-js/server-plugin": "^1.1.
|
|
68
|
-
"@modern-js/bff-runtime": "^1.1.
|
|
70
|
+
"@modern-js/bff-utils": "^1.1.1",
|
|
71
|
+
"@modern-js/core": "^1.2.0",
|
|
72
|
+
"@modern-js/server-plugin": "^1.1.3",
|
|
73
|
+
"@modern-js/bff-runtime": "^1.1.1",
|
|
69
74
|
"express": "^4.17.1"
|
|
70
75
|
},
|
|
71
76
|
"publishConfig": {
|
package/src/plugin.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
|
2
2
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
import { match } from '@modern-js/bff-runtime';
|
|
4
|
-
import { useContext } from '
|
|
4
|
+
import { useContext } from '../../../../../src/context';
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line arrow-body-style
|
|
7
7
|
export const get = ({ query }: { query: Record<string, unknown> }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
|
2
2
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
import { match } from '@modern-js/bff-runtime';
|
|
4
|
-
import { useContext } from '
|
|
4
|
+
import { useContext } from '../../../../../../src/context';
|
|
5
5
|
|
|
6
6
|
export const get = ({ query }: { query: Record<string, unknown> }) => ({
|
|
7
7
|
query,
|
package/tests/lambdaMode.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import express
|
|
2
|
+
import express from 'express';
|
|
3
3
|
import request from 'supertest';
|
|
4
4
|
import { serverManager } from '@modern-js/server-plugin';
|
|
5
5
|
import { INTROSPECTION_ROUTE_PATH } from '@modern-js/bff-utils';
|
|
@@ -333,7 +333,7 @@ describe('support as async handler', () => {
|
|
|
333
333
|
config: { middleware: [wrapMiddleware] },
|
|
334
334
|
});
|
|
335
335
|
|
|
336
|
-
const asyncHandler = async (req:
|
|
336
|
+
const asyncHandler = async (req: any, res: any) => {
|
|
337
337
|
await apiHandler(req, res);
|
|
338
338
|
order.push(3);
|
|
339
339
|
};
|
package/tests/tsconfig.json
CHANGED
package/tests/webServer.test.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Buffer } from 'buffer';
|
|
|
3
3
|
import { Request, Response } from 'express';
|
|
4
4
|
import request from 'supertest';
|
|
5
5
|
import { serverManager } from '@modern-js/server-plugin';
|
|
6
|
-
import plugin from '
|
|
6
|
+
import plugin from '../src/plugin';
|
|
7
7
|
import './common';
|
|
8
8
|
|
|
9
9
|
const pwd = path.join(__dirname, './fixtures/function-mode');
|