@modern-js/plugin-koa 1.1.4 → 1.2.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.
- package/CHANGELOG.md +19 -0
- package/dist/js/modern/cli/index.js +1 -1
- package/dist/js/node/cli/index.js +1 -1
- package/package.json +7 -7
- package/src/cli/index.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5a4c557e: feat: support bff test
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- a70a62f5: fix: runtime path is broken in development environment
|
|
12
|
+
- Updated dependencies [90eeb72c]
|
|
13
|
+
- Updated dependencies [e04914ce]
|
|
14
|
+
- Updated dependencies [5a4c557e]
|
|
15
|
+
- Updated dependencies [e04914ce]
|
|
16
|
+
- Updated dependencies [ca7dcb32]
|
|
17
|
+
- Updated dependencies [ecb344dc]
|
|
18
|
+
- @modern-js/core@1.2.0
|
|
19
|
+
- @modern-js/server-plugin@1.1.3
|
|
20
|
+
- @modern-js/utils@1.1.5
|
|
21
|
+
|
|
3
22
|
## 1.1.4
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ export default createPlugin(() => {
|
|
|
16
16
|
|
|
17
17
|
let relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
18
18
|
|
|
19
|
-
if (process.env.NODE_ENV === 'development') {
|
|
19
|
+
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {
|
|
20
20
|
relativeRuntimePath = `./${path.relative(appDirectory, serverRuntimePath)}`;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -30,7 +30,7 @@ var _default = (0, _core.createPlugin)(() => {
|
|
|
30
30
|
|
|
31
31
|
let relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
32
32
|
|
|
33
|
-
if (process.env.NODE_ENV === 'development') {
|
|
33
|
+
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {
|
|
34
34
|
relativeRuntimePath = `./${path.relative(appDirectory, serverRuntimePath)}`;
|
|
35
35
|
}
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.2.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.15.3",
|
|
32
32
|
"@modern-js/adapter-helpers": "^1.1.1",
|
|
33
|
-
"@modern-js/utils": "^1.1.
|
|
33
|
+
"@modern-js/utils": "^1.1.5",
|
|
34
34
|
"formidable": "^1.2.2",
|
|
35
35
|
"koa-body": "^4.2.0",
|
|
36
36
|
"koa-router": "^10.0.0",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"typescript": "^4",
|
|
50
50
|
"@modern-js/bff-runtime": "^1.1.1",
|
|
51
51
|
"@modern-js/bff-utils": "^1.1.1",
|
|
52
|
-
"@modern-js/core": "^1.
|
|
53
|
-
"@modern-js/server-plugin": "^1.1.
|
|
52
|
+
"@modern-js/core": "^1.2.0",
|
|
53
|
+
"@modern-js/server-plugin": "^1.1.3",
|
|
54
54
|
"@modern-js/plugin-testing": "^1.1.1",
|
|
55
|
-
"@modern-js/module-tools": "^1.1.
|
|
55
|
+
"@modern-js/module-tools": "^1.1.2"
|
|
56
56
|
},
|
|
57
57
|
"modernConfig": {
|
|
58
58
|
"output": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@modern-js/bff-utils": "^1.1.1",
|
|
64
|
-
"@modern-js/core": "^1.
|
|
65
|
-
"@modern-js/server-plugin": "^1.1.
|
|
64
|
+
"@modern-js/core": "^1.2.0",
|
|
65
|
+
"@modern-js/server-plugin": "^1.1.3",
|
|
66
66
|
"@modern-js/bff-runtime": "^1.1.1",
|
|
67
67
|
"koa": "^2.13.3"
|
|
68
68
|
},
|
package/src/cli/index.ts
CHANGED
|
@@ -25,7 +25,10 @@ export default createPlugin(
|
|
|
25
25
|
path.relative(appDirectory, serverRuntimePath),
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
if (
|
|
28
|
+
if (
|
|
29
|
+
process.env.NODE_ENV === 'development' ||
|
|
30
|
+
process.env.NODE_ENV === 'test'
|
|
31
|
+
) {
|
|
29
32
|
relativeRuntimePath = `./${path.relative(
|
|
30
33
|
appDirectory,
|
|
31
34
|
serverRuntimePath,
|