@modern-js/plugin-koa 1.4.8 → 1.4.9
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 +12 -0
- package/dist/js/modern/cli/index.js +17 -8
- package/dist/js/node/cli/index.js +17 -8
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 1.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bfccb4c8: fix: bff runtime path not found in development
|
|
8
|
+
- Updated dependencies [d57e7622]
|
|
9
|
+
- Updated dependencies [6451a098]
|
|
10
|
+
- Updated dependencies [d5a2cfd8]
|
|
11
|
+
- Updated dependencies [437367c6]
|
|
12
|
+
- @modern-js/bff-utils@1.2.8
|
|
13
|
+
- @modern-js/utils@1.7.6
|
|
14
|
+
|
|
3
15
|
## 1.4.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ export default (() => ({
|
|
|
11
11
|
const runtimeModulePath = path.resolve(__dirname, '../runtime');
|
|
12
12
|
return {
|
|
13
13
|
config() {
|
|
14
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
15
14
|
const appContext = useAppContext();
|
|
16
15
|
const {
|
|
17
16
|
appDirectory
|
|
@@ -19,17 +18,27 @@ export default (() => ({
|
|
|
19
18
|
bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, 'server');
|
|
20
19
|
const serverRuntimePath = bffExportsUtils.getPath();
|
|
21
20
|
const relativeRuntimePath = getRelativeRuntimePath(appDirectory, serverRuntimePath);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
if (process.env.NODE_ENV === 'production') {
|
|
23
|
+
return {
|
|
24
|
+
source: {
|
|
25
|
+
alias: {
|
|
26
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
} else {
|
|
31
|
+
return {
|
|
32
|
+
source: {
|
|
33
|
+
alias: {
|
|
34
|
+
'@modern-js/runtime/server': serverRuntimePath
|
|
35
|
+
}
|
|
26
36
|
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
29
39
|
},
|
|
30
40
|
|
|
31
41
|
addRuntimeExports(input) {
|
|
32
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
33
42
|
const {
|
|
34
43
|
appDirectory
|
|
35
44
|
} = useAppContext();
|
|
@@ -25,7 +25,6 @@ var _default = () => ({
|
|
|
25
25
|
const runtimeModulePath = path.resolve(__dirname, '../runtime');
|
|
26
26
|
return {
|
|
27
27
|
config() {
|
|
28
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
29
28
|
const appContext = useAppContext();
|
|
30
29
|
const {
|
|
31
30
|
appDirectory
|
|
@@ -33,17 +32,27 @@ var _default = () => ({
|
|
|
33
32
|
bffExportsUtils = (0, _utils.createRuntimeExportsUtils)(appContext.internalDirectory, 'server');
|
|
34
33
|
const serverRuntimePath = bffExportsUtils.getPath();
|
|
35
34
|
const relativeRuntimePath = (0, _adapterHelpers.getRelativeRuntimePath)(appDirectory, serverRuntimePath);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
|
|
36
|
+
if (process.env.NODE_ENV === 'production') {
|
|
37
|
+
return {
|
|
38
|
+
source: {
|
|
39
|
+
alias: {
|
|
40
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
} else {
|
|
45
|
+
return {
|
|
46
|
+
source: {
|
|
47
|
+
alias: {
|
|
48
|
+
'@modern-js/runtime/server': serverRuntimePath
|
|
49
|
+
}
|
|
40
50
|
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
43
53
|
},
|
|
44
54
|
|
|
45
55
|
addRuntimeExports(input) {
|
|
46
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
47
56
|
const {
|
|
48
57
|
appDirectory
|
|
49
58
|
} = useAppContext();
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.
|
|
14
|
+
"version": "1.4.9",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@babel/runtime": "^7.15.3",
|
|
37
37
|
"@modern-js/adapter-helpers": "^1.2.4",
|
|
38
38
|
"@modern-js/bff-runtime": "^1.2.3",
|
|
39
|
-
"@modern-js/bff-utils": "^1.2.
|
|
40
|
-
"@modern-js/utils": "^1.7.
|
|
39
|
+
"@modern-js/bff-utils": "^1.2.8",
|
|
40
|
+
"@modern-js/utils": "^1.7.6",
|
|
41
41
|
"koa-body": "^4.2.0",
|
|
42
42
|
"koa-router": "^10.0.0",
|
|
43
43
|
"type-is": "^1.6.18"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/type-is": "^1.6.3",
|
|
54
54
|
"jest": "^27",
|
|
55
55
|
"@modern-js/server-core": "1.3.5",
|
|
56
|
-
"@modern-js/core": "1.
|
|
56
|
+
"@modern-js/core": "1.11.1",
|
|
57
57
|
"supertest": "^6.1.6",
|
|
58
58
|
"koa": "^2.13.3",
|
|
59
59
|
"typescript": "^4"
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
"files": [
|
|
88
88
|
"src/**/*",
|
|
89
89
|
"tsconfig.json",
|
|
90
|
-
"package.json"
|
|
90
|
+
"package.json",
|
|
91
|
+
"tests/**/*"
|
|
91
92
|
],
|
|
92
93
|
"output": []
|
|
93
94
|
}
|