@modern-js/plugin-express 1.1.3 → 1.1.4
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 +0 -18
- package/dist/js/modern/cli/index.js +6 -1
- package/dist/js/node/cli/index.js +6 -1
- package/package.json +20 -18
- package/src/cli/index.ts +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
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
|
-
|
|
21
3
|
## 1.1.2
|
|
22
4
|
|
|
23
5
|
### Patch Changes
|
|
@@ -14,7 +14,12 @@ export default createPlugin(() => {
|
|
|
14
14
|
bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, 'server');
|
|
15
15
|
const serverRuntimePath = bffExportsUtils.getPath(); // Look up one level, because the artifacts after build have dist directories
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
let relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
18
|
+
|
|
19
|
+
if (process.env.NODE_ENV === 'development') {
|
|
20
|
+
relativeRuntimePath = `./${path.relative(appDirectory, serverRuntimePath)}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
18
23
|
return {
|
|
19
24
|
source: {
|
|
20
25
|
alias: {
|
|
@@ -28,7 +28,12 @@ var _default = (0, _core.createPlugin)(() => {
|
|
|
28
28
|
bffExportsUtils = (0, _utils.createRuntimeExportsUtils)(appContext.internalDirectory, 'server');
|
|
29
29
|
const serverRuntimePath = bffExportsUtils.getPath(); // Look up one level, because the artifacts after build have dist directories
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
let relativeRuntimePath = path.join('../', path.relative(appDirectory, serverRuntimePath));
|
|
32
|
+
|
|
33
|
+
if (process.env.NODE_ENV === 'development') {
|
|
34
|
+
relativeRuntimePath = `./${path.relative(appDirectory, serverRuntimePath)}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
return {
|
|
33
38
|
source: {
|
|
34
39
|
alias: {
|
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.4",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -27,10 +27,17 @@
|
|
|
27
27
|
},
|
|
28
28
|
"./cli": "./dist/js/node/cli/index.js"
|
|
29
29
|
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"prepare": "pnpm build",
|
|
32
|
+
"prepublishOnly": "pnpm build -- --platform",
|
|
33
|
+
"new": "modern new",
|
|
34
|
+
"build": "modern build",
|
|
35
|
+
"test": "modern test"
|
|
36
|
+
},
|
|
30
37
|
"dependencies": {
|
|
31
38
|
"@babel/runtime": "^7.15.3",
|
|
32
|
-
"@modern-js/adapter-helpers": "
|
|
33
|
-
"@modern-js/utils": "
|
|
39
|
+
"@modern-js/adapter-helpers": "workspace:^1.1.1",
|
|
40
|
+
"@modern-js/utils": "workspace:^1.1.2",
|
|
34
41
|
"cookie-parser": "^1.4.5",
|
|
35
42
|
"finalhandler": "^1.1.2",
|
|
36
43
|
"formidable": "^1.2.2",
|
|
@@ -38,8 +45,8 @@
|
|
|
38
45
|
},
|
|
39
46
|
"devDependencies": {
|
|
40
47
|
"express": "^4.17.1",
|
|
41
|
-
"@modern-js/server-utils": "
|
|
42
|
-
"@modern-js/bff-runtime": "
|
|
48
|
+
"@modern-js/server-utils": "workspace:^1.1.1",
|
|
49
|
+
"@modern-js/bff-runtime": "workspace:^1.1.1",
|
|
43
50
|
"@types/cookie-parser": "^1.4.2",
|
|
44
51
|
"@types/express": "^4.17.13",
|
|
45
52
|
"@types/finalhandler": "^1.1.1",
|
|
@@ -50,9 +57,9 @@
|
|
|
50
57
|
"@types/type-is": "^1.6.3",
|
|
51
58
|
"supertest": "^6.1.6",
|
|
52
59
|
"typescript": "^4",
|
|
53
|
-
"@modern-js/bff-utils": "
|
|
54
|
-
"@modern-js/core": "
|
|
55
|
-
"@modern-js/server-plugin": "
|
|
60
|
+
"@modern-js/bff-utils": "workspace:^1.1.1",
|
|
61
|
+
"@modern-js/core": "workspace:^1.1.2",
|
|
62
|
+
"@modern-js/server-plugin": "workspace:^1.1.1",
|
|
56
63
|
"@modern-js/plugin-testing": "^1.1.1",
|
|
57
64
|
"@modern-js/module-tools": "^1.1.1"
|
|
58
65
|
},
|
|
@@ -62,19 +69,14 @@
|
|
|
62
69
|
}
|
|
63
70
|
},
|
|
64
71
|
"peerDependencies": {
|
|
65
|
-
"@modern-js/bff-utils": "
|
|
66
|
-
"@modern-js/core": "
|
|
67
|
-
"@modern-js/server-plugin": "
|
|
68
|
-
"@modern-js/bff-runtime": "
|
|
72
|
+
"@modern-js/bff-utils": "workspace:^1.1.1",
|
|
73
|
+
"@modern-js/core": "workspace:^1.1.2",
|
|
74
|
+
"@modern-js/server-plugin": "workspace:^1.1.1",
|
|
75
|
+
"@modern-js/bff-runtime": "workspace:^1.1.1",
|
|
69
76
|
"express": "^4.17.1"
|
|
70
77
|
},
|
|
71
78
|
"publishConfig": {
|
|
72
79
|
"registry": "https://registry.npmjs.org/",
|
|
73
80
|
"access": "public"
|
|
74
|
-
},
|
|
75
|
-
"scripts": {
|
|
76
|
-
"new": "modern new",
|
|
77
|
-
"build": "modern build",
|
|
78
|
-
"test": "modern test"
|
|
79
81
|
}
|
|
80
|
-
}
|
|
82
|
+
}
|
package/src/cli/index.ts
CHANGED
|
@@ -20,11 +20,18 @@ export default createPlugin(
|
|
|
20
20
|
const serverRuntimePath = bffExportsUtils.getPath();
|
|
21
21
|
|
|
22
22
|
// Look up one level, because the artifacts after build have dist directories
|
|
23
|
-
|
|
23
|
+
let relativeRuntimePath = path.join(
|
|
24
24
|
'../',
|
|
25
25
|
path.relative(appDirectory, serverRuntimePath),
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
+
if (process.env.NODE_ENV === 'development') {
|
|
29
|
+
relativeRuntimePath = `./${path.relative(
|
|
30
|
+
appDirectory,
|
|
31
|
+
serverRuntimePath,
|
|
32
|
+
)}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
return {
|
|
29
36
|
source: {
|
|
30
37
|
alias: {
|