@modern-js/plugin-express 1.1.2 → 1.1.3
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 +18 -0
- package/dist/js/modern/cli/index.js +7 -1
- package/dist/js/node/cli/index.js +7 -1
- package/dist/types/cli/index.d.ts +3 -0
- package/package.json +9 -9
- package/src/cli/index.ts +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @modern-js/plugin-express
|
|
2
2
|
|
|
3
|
+
## 1.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 39e8137d: fix: support prefix array & webpack loader should read requestCreator & adjust runtime path to relative
|
|
8
|
+
- Updated dependencies [085a6a58]
|
|
9
|
+
- Updated dependencies [085a6a58]
|
|
10
|
+
- Updated dependencies [085a6a58]
|
|
11
|
+
- Updated dependencies [d280ea33]
|
|
12
|
+
- Updated dependencies [d4fcc73a]
|
|
13
|
+
- Updated dependencies [085a6a58]
|
|
14
|
+
- Updated dependencies [ed1f6b12]
|
|
15
|
+
- Updated dependencies [a5ebbb00]
|
|
16
|
+
- Updated dependencies [085a6a58]
|
|
17
|
+
- @modern-js/core@1.1.3
|
|
18
|
+
- @modern-js/server-plugin@1.1.2
|
|
19
|
+
- @modern-js/utils@1.1.3
|
|
20
|
+
|
|
3
21
|
## 1.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,11 +8,17 @@ export default createPlugin(() => {
|
|
|
8
8
|
config() {
|
|
9
9
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
10
10
|
const appContext = useAppContext();
|
|
11
|
+
const {
|
|
12
|
+
appDirectory
|
|
13
|
+
} = appContext;
|
|
11
14
|
bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, 'server');
|
|
15
|
+
const serverRuntimePath = bffExportsUtils.getPath(); // Look up one level, because the artifacts after build have dist directories
|
|
16
|
+
|
|
17
|
+
const relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
12
18
|
return {
|
|
13
19
|
source: {
|
|
14
20
|
alias: {
|
|
15
|
-
'@modern-js/runtime/server':
|
|
21
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
16
22
|
}
|
|
17
23
|
}
|
|
18
24
|
};
|
|
@@ -22,11 +22,17 @@ var _default = (0, _core.createPlugin)(() => {
|
|
|
22
22
|
config() {
|
|
23
23
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
24
24
|
const appContext = (0, _core.useAppContext)();
|
|
25
|
+
const {
|
|
26
|
+
appDirectory
|
|
27
|
+
} = appContext;
|
|
25
28
|
bffExportsUtils = (0, _utils.createRuntimeExportsUtils)(appContext.internalDirectory, 'server');
|
|
29
|
+
const serverRuntimePath = bffExportsUtils.getPath(); // Look up one level, because the artifacts after build have dist directories
|
|
30
|
+
|
|
31
|
+
const relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
26
32
|
return {
|
|
27
33
|
source: {
|
|
28
34
|
alias: {
|
|
29
|
-
'@modern-js/runtime/server':
|
|
35
|
+
'@modern-js/runtime/server': relativeRuntimePath
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare const _default: import("@modern-js/core").AsyncPlugin<Partial<import("@modern-js/core").Progresses2Threads<{
|
|
2
2
|
config: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
|
3
|
+
resolvedConfig: import("@modern-js/core").AsyncWaterfall<{
|
|
4
|
+
resolved: import("@modern-js/core").NormalizedConfig;
|
|
5
|
+
}>;
|
|
3
6
|
validateSchema: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
|
4
7
|
prepare: import("@modern-js/core").AsyncWorkflow<void, void>;
|
|
5
8
|
commands: import("@modern-js/core").AsyncWorkflow<{
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.1.
|
|
14
|
+
"version": "1.1.3",
|
|
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.3",
|
|
34
34
|
"cookie-parser": "^1.4.5",
|
|
35
35
|
"finalhandler": "^1.1.2",
|
|
36
36
|
"formidable": "^1.2.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"express": "^4.17.1",
|
|
41
|
-
"@modern-js/server-utils": "^1.1.
|
|
41
|
+
"@modern-js/server-utils": "^1.1.2",
|
|
42
42
|
"@modern-js/bff-runtime": "^1.1.1",
|
|
43
43
|
"@types/cookie-parser": "^1.4.2",
|
|
44
44
|
"@types/express": "^4.17.13",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"supertest": "^6.1.6",
|
|
52
52
|
"typescript": "^4",
|
|
53
53
|
"@modern-js/bff-utils": "^1.1.1",
|
|
54
|
-
"@modern-js/core": "^1.1.
|
|
55
|
-
"@modern-js/server-plugin": "^1.1.
|
|
56
|
-
"@modern-js/plugin-testing": "^1.1.
|
|
57
|
-
"@modern-js/module-tools": "^1.1.
|
|
54
|
+
"@modern-js/core": "^1.1.3",
|
|
55
|
+
"@modern-js/server-plugin": "^1.1.2",
|
|
56
|
+
"@modern-js/plugin-testing": "^1.1.1",
|
|
57
|
+
"@modern-js/module-tools": "^1.1.1"
|
|
58
58
|
},
|
|
59
59
|
"modernConfig": {
|
|
60
60
|
"output": {
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@modern-js/bff-utils": "^1.1.1",
|
|
66
|
-
"@modern-js/core": "^1.1.
|
|
67
|
-
"@modern-js/server-plugin": "^1.1.
|
|
66
|
+
"@modern-js/core": "^1.1.3",
|
|
67
|
+
"@modern-js/server-plugin": "^1.1.2",
|
|
68
68
|
"@modern-js/bff-runtime": "^1.1.1",
|
|
69
69
|
"express": "^4.17.1"
|
|
70
70
|
},
|
package/src/cli/index.ts
CHANGED
|
@@ -11,14 +11,25 @@ export default createPlugin(
|
|
|
11
11
|
config() {
|
|
12
12
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
13
13
|
const appContext = useAppContext();
|
|
14
|
+
const { appDirectory } = appContext;
|
|
14
15
|
bffExportsUtils = createRuntimeExportsUtils(
|
|
15
16
|
appContext.internalDirectory,
|
|
16
17
|
'server',
|
|
17
18
|
);
|
|
18
19
|
|
|
20
|
+
const serverRuntimePath = bffExportsUtils.getPath();
|
|
21
|
+
|
|
22
|
+
// Look up one level, because the artifacts after build have dist directories
|
|
23
|
+
const relativeRuntimePath = path.join(
|
|
24
|
+
'../',
|
|
25
|
+
path.relative(appDirectory, serverRuntimePath),
|
|
26
|
+
);
|
|
27
|
+
|
|
19
28
|
return {
|
|
20
29
|
source: {
|
|
21
|
-
alias: {
|
|
30
|
+
alias: {
|
|
31
|
+
'@modern-js/runtime/server': relativeRuntimePath,
|
|
32
|
+
},
|
|
22
33
|
},
|
|
23
34
|
};
|
|
24
35
|
},
|