@modern-js/plugin-koa 1.0.0-rc.14 → 1.0.0-rc.19
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 +91 -0
- package/dist/js/modern/cli/index.js +3 -5
- package/dist/js/node/cli/index.js +2 -2
- package/package.json +13 -12
- package/src/cli/index.ts +3 -3
- package/tests/helpers.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 224f7fe: fix server route match
|
|
8
|
+
- 30ac27c: feat: add generator package description
|
|
9
|
+
- 204c626: feat: initial
|
|
10
|
+
- 63be0a5: fix: #118 #104
|
|
11
|
+
- Updated dependencies [224f7fe]
|
|
12
|
+
- Updated dependencies [30ac27c]
|
|
13
|
+
- Updated dependencies [204c626]
|
|
14
|
+
- Updated dependencies [63be0a5]
|
|
15
|
+
- @modern-js/core@1.0.0-rc.19
|
|
16
|
+
- @modern-js/adapter-helpers@1.0.0-rc.19
|
|
17
|
+
- @modern-js/bff-runtime@1.0.0-rc.19
|
|
18
|
+
- @modern-js/bff-utils@1.0.0-rc.19
|
|
19
|
+
- @modern-js/server-plugin@1.0.0-rc.19
|
|
20
|
+
- @modern-js/utils@1.0.0-rc.19
|
|
21
|
+
|
|
22
|
+
## 1.0.0-rc.18
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 224f7fe: fix server route match
|
|
27
|
+
- 30ac27c: feat: add generator package description
|
|
28
|
+
- 204c626: feat: initial
|
|
29
|
+
- 63be0a5: fix: #118 #104
|
|
30
|
+
- Updated dependencies [224f7fe]
|
|
31
|
+
- Updated dependencies [30ac27c]
|
|
32
|
+
- Updated dependencies [204c626]
|
|
33
|
+
- Updated dependencies [63be0a5]
|
|
34
|
+
- @modern-js/core@1.0.0-rc.18
|
|
35
|
+
- @modern-js/adapter-helpers@1.0.0-rc.18
|
|
36
|
+
- @modern-js/bff-runtime@1.0.0-rc.18
|
|
37
|
+
- @modern-js/bff-utils@1.0.0-rc.18
|
|
38
|
+
- @modern-js/server-plugin@1.0.0-rc.18
|
|
39
|
+
- @modern-js/utils@1.0.0-rc.18
|
|
40
|
+
|
|
41
|
+
## 1.0.0-rc.17
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 224f7fe: fix server route match
|
|
46
|
+
- 30ac27c: feat: add generator package description
|
|
47
|
+
- 204c626: feat: initial
|
|
48
|
+
- fix: #118 #104
|
|
49
|
+
- Updated dependencies [224f7fe]
|
|
50
|
+
- Updated dependencies [30ac27c]
|
|
51
|
+
- Updated dependencies [204c626]
|
|
52
|
+
- Updated dependencies [undefined]
|
|
53
|
+
- @modern-js/core@1.0.0-rc.17
|
|
54
|
+
- @modern-js/adapter-helpers@1.0.0-rc.17
|
|
55
|
+
- @modern-js/bff-runtime@1.0.0-rc.17
|
|
56
|
+
- @modern-js/bff-utils@1.0.0-rc.17
|
|
57
|
+
- @modern-js/server-plugin@1.0.0-rc.17
|
|
58
|
+
- @modern-js/utils@1.0.0-rc.17
|
|
59
|
+
|
|
60
|
+
## 1.0.0-rc.16
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 224f7fe: fix server route match
|
|
65
|
+
- 30ac27c: feat: add generator package description
|
|
66
|
+
- 204c626: feat: initial
|
|
67
|
+
- Updated dependencies [224f7fe]
|
|
68
|
+
- Updated dependencies [30ac27c]
|
|
69
|
+
- Updated dependencies [204c626]
|
|
70
|
+
- @modern-js/core@1.0.0-rc.16
|
|
71
|
+
- @modern-js/adapter-helpers@1.0.0-rc.16
|
|
72
|
+
- @modern-js/bff-runtime@1.0.0-rc.16
|
|
73
|
+
- @modern-js/bff-utils@1.0.0-rc.16
|
|
74
|
+
- @modern-js/server-plugin@1.0.0-rc.16
|
|
75
|
+
- @modern-js/utils@1.0.0-rc.16
|
|
76
|
+
|
|
77
|
+
## 1.0.0-rc.15
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- 224f7fe: fix server route match
|
|
82
|
+
- 30ac27c: feat: add generator package description
|
|
83
|
+
- 204c626: feat: initial
|
|
84
|
+
- Updated dependencies [224f7fe]
|
|
85
|
+
- Updated dependencies [30ac27c]
|
|
86
|
+
- Updated dependencies [204c626]
|
|
87
|
+
- @modern-js/core@1.0.0-rc.15
|
|
88
|
+
- @modern-js/adapter-helpers@1.0.0-rc.15
|
|
89
|
+
- @modern-js/bff-runtime@1.0.0-rc.15
|
|
90
|
+
- @modern-js/bff-utils@1.0.0-rc.15
|
|
91
|
+
- @modern-js/server-plugin@1.0.0-rc.15
|
|
92
|
+
- @modern-js/utils@1.0.0-rc.15
|
|
93
|
+
|
|
3
94
|
## 1.0.0-rc.14
|
|
4
95
|
|
|
5
96
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
2
|
import { useAppContext, createPlugin } from '@modern-js/core';
|
|
3
|
-
import { createRuntimeExportsUtils } from '@modern-js/utils';
|
|
3
|
+
import { createRuntimeExportsUtils, upath } from '@modern-js/utils';
|
|
4
4
|
export default createPlugin(() => {
|
|
5
5
|
let bffExportsUtils;
|
|
6
6
|
const runtimeModulePath = path.resolve(__dirname, '../runtime');
|
|
@@ -23,11 +23,9 @@ export default createPlugin(() => {
|
|
|
23
23
|
const {
|
|
24
24
|
appDirectory
|
|
25
25
|
} = useAppContext();
|
|
26
|
-
|
|
27
|
-
const runtimePath = require.resolve(`@modern-js/runtime`, {
|
|
26
|
+
const runtimePath = upath.normalizeSafe(require.resolve(`@modern-js/runtime`, {
|
|
28
27
|
paths: [appDirectory]
|
|
29
|
-
});
|
|
30
|
-
|
|
28
|
+
}));
|
|
31
29
|
const currentFile = bffExportsUtils.getPath();
|
|
32
30
|
const runtimeDir = path.dirname(runtimePath);
|
|
33
31
|
const relativeBffPath = path.relative(path.dirname(currentFile), path.join(runtimeDir, './exports/server'));
|
|
@@ -38,9 +38,9 @@ var _default = (0, _core.createPlugin)(() => {
|
|
|
38
38
|
appDirectory
|
|
39
39
|
} = (0, _core.useAppContext)();
|
|
40
40
|
|
|
41
|
-
const runtimePath = require.resolve(`@modern-js/runtime`, {
|
|
41
|
+
const runtimePath = _utils.upath.normalizeSafe(require.resolve(`@modern-js/runtime`, {
|
|
42
42
|
paths: [appDirectory]
|
|
43
|
-
});
|
|
43
|
+
}));
|
|
44
44
|
|
|
45
45
|
const currentFile = bffExportsUtils.getPath();
|
|
46
46
|
const runtimeDir = path.dirname(runtimePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-koa",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.19",
|
|
4
4
|
"jsnext:source": "./src/index.ts",
|
|
5
5
|
"types": "./dist/types/index.d.ts",
|
|
6
6
|
"main": "./dist/js/node/index.js",
|
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.15.3",
|
|
21
|
-
"@modern-js/adapter-helpers": "^1.0.0-rc.
|
|
22
|
-
"@modern-js/bff-runtime": "^1.0.0-rc.
|
|
23
|
-
"@modern-js/
|
|
24
|
-
"@modern-js/utils": "^1.0.0-rc.14",
|
|
21
|
+
"@modern-js/adapter-helpers": "^1.0.0-rc.19",
|
|
22
|
+
"@modern-js/bff-runtime": "^1.0.0-rc.19",
|
|
23
|
+
"@modern-js/utils": "^1.0.0-rc.19",
|
|
25
24
|
"formidable": "^1.2.2",
|
|
26
25
|
"koa-body": "^4.2.0",
|
|
27
26
|
"koa-router": "^10.0.0",
|
|
@@ -38,10 +37,11 @@
|
|
|
38
37
|
"@types/type-is": "^1.6.3",
|
|
39
38
|
"supertest": "^6.1.6",
|
|
40
39
|
"typescript": "^4",
|
|
41
|
-
"@modern-js/
|
|
42
|
-
"@modern-js/
|
|
43
|
-
"@modern-js/plugin
|
|
44
|
-
"@modern-js/
|
|
40
|
+
"@modern-js/bff-utils": "^1.0.0-rc.19",
|
|
41
|
+
"@modern-js/core": "^1.0.0-rc.19",
|
|
42
|
+
"@modern-js/server-plugin": "^1.0.0-rc.19",
|
|
43
|
+
"@modern-js/plugin-testing": "^1.0.0-rc.19",
|
|
44
|
+
"@modern-js/module-tools": "^1.0.0-rc.19"
|
|
45
45
|
},
|
|
46
46
|
"modernConfig": {
|
|
47
47
|
"output": {
|
|
@@ -49,9 +49,10 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@modern-js/
|
|
53
|
-
"@modern-js/
|
|
54
|
-
"@modern-js/
|
|
52
|
+
"@modern-js/bff-utils": "^1.0.0-rc.19",
|
|
53
|
+
"@modern-js/core": "^1.0.0-rc.19",
|
|
54
|
+
"@modern-js/server-plugin": "^1.0.0-rc.19",
|
|
55
|
+
"@modern-js/bff-runtime": "^1.0.0-rc.19",
|
|
55
56
|
"koa": "^2.13.3"
|
|
56
57
|
},
|
|
57
58
|
"publishConfig": {
|
package/src/cli/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
2
|
import { useAppContext, createPlugin } from '@modern-js/core';
|
|
3
|
-
import { createRuntimeExportsUtils } from '@modern-js/utils';
|
|
3
|
+
import { createRuntimeExportsUtils, upath } from '@modern-js/utils';
|
|
4
4
|
|
|
5
5
|
export default createPlugin(
|
|
6
6
|
() => {
|
|
@@ -25,9 +25,9 @@ export default createPlugin(
|
|
|
25
25
|
modifyEntryImports() {
|
|
26
26
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27
27
|
const { appDirectory } = useAppContext();
|
|
28
|
-
const runtimePath = require.resolve(`@modern-js/runtime`, {
|
|
28
|
+
const runtimePath = upath.normalizeSafe(require.resolve(`@modern-js/runtime`, {
|
|
29
29
|
paths: [appDirectory],
|
|
30
|
-
});
|
|
30
|
+
}));
|
|
31
31
|
|
|
32
32
|
const currentFile = bffExportsUtils.getPath();
|
|
33
33
|
|
package/tests/helpers.ts
CHANGED