@modern-js/plugin-koa 1.4.8-canary.1 → 1.4.8
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 +14 -0
- package/dist/js/modern/cli/index.js +6 -8
- package/dist/js/node/cli/index.js +5 -7
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 1.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
|
8
|
+
- Updated dependencies [d32f35134]
|
|
9
|
+
- Updated dependencies [6ae4a34ae]
|
|
10
|
+
- Updated dependencies [b80229c79]
|
|
11
|
+
- Updated dependencies [948cc4436]
|
|
12
|
+
- @modern-js/adapter-helpers@1.2.4
|
|
13
|
+
- @modern-js/bff-runtime@1.2.3
|
|
14
|
+
- @modern-js/bff-utils@1.2.6
|
|
15
|
+
- @modern-js/utils@1.7.3
|
|
16
|
+
|
|
3
17
|
## 1.4.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
|
-
import { createRuntimeExportsUtils
|
|
2
|
+
import { createRuntimeExportsUtils } from '@modern-js/utils';
|
|
3
3
|
import { getRelativeRuntimePath } from '@modern-js/adapter-helpers';
|
|
4
4
|
export default (() => ({
|
|
5
5
|
name: '@modern-js/plugin-koa',
|
|
@@ -11,27 +11,25 @@ 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
|
|
14
15
|
const appContext = useAppContext();
|
|
15
16
|
const {
|
|
16
17
|
appDirectory
|
|
17
18
|
} = appContext;
|
|
18
19
|
bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, 'server');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (process.env.NODE_ENV !== TEST_ENV) {
|
|
22
|
-
serverRuntimePath = getRelativeRuntimePath(appDirectory, serverRuntimePath);
|
|
23
|
-
}
|
|
24
|
-
|
|
20
|
+
const serverRuntimePath = bffExportsUtils.getPath();
|
|
21
|
+
const relativeRuntimePath = getRelativeRuntimePath(appDirectory, serverRuntimePath);
|
|
25
22
|
return {
|
|
26
23
|
source: {
|
|
27
24
|
alias: {
|
|
28
|
-
'@modern-js/runtime/server':
|
|
25
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
29
|
},
|
|
33
30
|
|
|
34
31
|
addRuntimeExports(input) {
|
|
32
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
33
|
const {
|
|
36
34
|
appDirectory
|
|
37
35
|
} = useAppContext();
|
|
@@ -25,27 +25,25 @@ 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
|
|
28
29
|
const appContext = useAppContext();
|
|
29
30
|
const {
|
|
30
31
|
appDirectory
|
|
31
32
|
} = appContext;
|
|
32
33
|
bffExportsUtils = (0, _utils.createRuntimeExportsUtils)(appContext.internalDirectory, 'server');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (process.env.NODE_ENV !== _utils.TEST_ENV) {
|
|
36
|
-
serverRuntimePath = (0, _adapterHelpers.getRelativeRuntimePath)(appDirectory, serverRuntimePath);
|
|
37
|
-
}
|
|
38
|
-
|
|
34
|
+
const serverRuntimePath = bffExportsUtils.getPath();
|
|
35
|
+
const relativeRuntimePath = (0, _adapterHelpers.getRelativeRuntimePath)(appDirectory, serverRuntimePath);
|
|
39
36
|
return {
|
|
40
37
|
source: {
|
|
41
38
|
alias: {
|
|
42
|
-
'@modern-js/runtime/server':
|
|
39
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
42
|
};
|
|
46
43
|
},
|
|
47
44
|
|
|
48
45
|
addRuntimeExports(input) {
|
|
46
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
49
47
|
const {
|
|
50
48
|
appDirectory
|
|
51
49
|
} = useAppContext();
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.8
|
|
14
|
+
"version": "1.4.8",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "^7.15.3",
|
|
37
|
-
"@modern-js/adapter-helpers": "^1.2.
|
|
38
|
-
"@modern-js/bff-runtime": "^1.2.
|
|
39
|
-
"@modern-js/bff-utils": "^1.2.
|
|
40
|
-
"@modern-js/utils": "^1.7.
|
|
37
|
+
"@modern-js/adapter-helpers": "^1.2.4",
|
|
38
|
+
"@modern-js/bff-runtime": "^1.2.3",
|
|
39
|
+
"@modern-js/bff-utils": "^1.2.6",
|
|
40
|
+
"@modern-js/utils": "^1.7.3",
|
|
41
41
|
"koa-body": "^4.2.0",
|
|
42
42
|
"koa-router": "^10.0.0",
|
|
43
43
|
"type-is": "^1.6.18"
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@scripts/build": "0.0.0",
|
|
47
47
|
"@scripts/jest-config": "0.0.0",
|
|
48
|
-
"@types/jest": "^27
|
|
48
|
+
"@types/jest": "^27",
|
|
49
49
|
"@types/koa": "^2.13.4",
|
|
50
50
|
"@types/koa-router": "^7.4.4",
|
|
51
51
|
"@types/node": "^14",
|
|
52
52
|
"@types/supertest": "^2.0.11",
|
|
53
53
|
"@types/type-is": "^1.6.3",
|
|
54
54
|
"jest": "^27",
|
|
55
|
-
"@modern-js/server-core": "1.3.
|
|
56
|
-
"@modern-js/core": "1.10.
|
|
55
|
+
"@modern-js/server-core": "1.3.5",
|
|
56
|
+
"@modern-js/core": "1.10.2",
|
|
57
57
|
"supertest": "^6.1.6",
|
|
58
58
|
"koa": "^2.13.3",
|
|
59
59
|
"typescript": "^4"
|
|
@@ -68,8 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"registry": "https://registry.npmjs.org/",
|
|
71
|
-
"access": "public"
|
|
72
|
-
"types": "./dist/types/index.d.ts"
|
|
71
|
+
"access": "public"
|
|
73
72
|
},
|
|
74
73
|
"wireit": {
|
|
75
74
|
"build": {
|