@modern-js/plugin-bff 1.20.1 → 1.21.1
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 +23 -0
- package/dist/js/modern/cli.js +19 -1
- package/dist/js/node/cli.js +19 -1
- package/dist/js/treeshaking/cli.js +15 -5
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @modern-js/plugin-bff
|
|
2
2
|
|
|
3
|
+
## 1.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @modern-js/bff-core@1.21.1
|
|
8
|
+
- @modern-js/create-request@1.21.1
|
|
9
|
+
- @modern-js/server-utils@1.21.1
|
|
10
|
+
- @modern-js/babel-compiler@1.21.1
|
|
11
|
+
- @modern-js/utils@1.21.1
|
|
12
|
+
|
|
13
|
+
## 1.21.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- cc3cab0: fix: modify the parameters passed to the compile function of server-utils
|
|
18
|
+
fix: 修改传入 server-utils 的 compile 函数的参数
|
|
19
|
+
- Updated dependencies [8f3674a]
|
|
20
|
+
- @modern-js/server-utils@1.21.0
|
|
21
|
+
- @modern-js/utils@1.21.0
|
|
22
|
+
- @modern-js/bff-core@1.21.0
|
|
23
|
+
- @modern-js/create-request@1.21.0
|
|
24
|
+
- @modern-js/babel-compiler@1.21.0
|
|
25
|
+
|
|
3
26
|
## 1.20.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/js/modern/cli.js
CHANGED
|
@@ -123,8 +123,26 @@ export default (() => ({
|
|
|
123
123
|
sourceDirs.push(sharedDir);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
const {
|
|
127
|
+
server
|
|
128
|
+
} = modernConfig;
|
|
129
|
+
const {
|
|
130
|
+
alias,
|
|
131
|
+
envVars,
|
|
132
|
+
globalVars
|
|
133
|
+
} = modernConfig.source;
|
|
134
|
+
const {
|
|
135
|
+
babel
|
|
136
|
+
} = modernConfig.tools;
|
|
137
|
+
|
|
126
138
|
if (sourceDirs.length > 0) {
|
|
127
|
-
await compile(appDirectory,
|
|
139
|
+
await compile(appDirectory, {
|
|
140
|
+
server,
|
|
141
|
+
alias,
|
|
142
|
+
envVars,
|
|
143
|
+
globalVars,
|
|
144
|
+
babelConfig: babel
|
|
145
|
+
}, {
|
|
128
146
|
sourceDirs,
|
|
129
147
|
distDir,
|
|
130
148
|
tsconfigPath
|
package/dist/js/node/cli.js
CHANGED
|
@@ -145,8 +145,26 @@ var _default = () => ({
|
|
|
145
145
|
sourceDirs.push(sharedDir);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
const {
|
|
149
|
+
server
|
|
150
|
+
} = modernConfig;
|
|
151
|
+
const {
|
|
152
|
+
alias,
|
|
153
|
+
envVars,
|
|
154
|
+
globalVars
|
|
155
|
+
} = modernConfig.source;
|
|
156
|
+
const {
|
|
157
|
+
babel
|
|
158
|
+
} = modernConfig.tools;
|
|
159
|
+
|
|
148
160
|
if (sourceDirs.length > 0) {
|
|
149
|
-
await (0, _serverUtils.compile)(appDirectory,
|
|
161
|
+
await (0, _serverUtils.compile)(appDirectory, {
|
|
162
|
+
server,
|
|
163
|
+
alias,
|
|
164
|
+
envVars,
|
|
165
|
+
globalVars,
|
|
166
|
+
babelConfig: babel
|
|
167
|
+
}, {
|
|
150
168
|
sourceDirs,
|
|
151
169
|
distDir,
|
|
152
170
|
tsconfigPath
|
|
@@ -117,7 +117,7 @@ export default (function () {
|
|
|
117
117
|
},
|
|
118
118
|
afterBuild: function afterBuild() {
|
|
119
119
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
120
|
-
var _api$useAppContext3, appDirectory, distDirectory, modernConfig, distDir, apiDir, sharedDir, tsconfigPath, sourceDirs;
|
|
120
|
+
var _api$useAppContext3, appDirectory, distDirectory, modernConfig, distDir, apiDir, sharedDir, tsconfigPath, sourceDirs, server, _modernConfig$source, alias, envVars, globalVars, babel;
|
|
121
121
|
|
|
122
122
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
123
123
|
while (1) {
|
|
@@ -143,19 +143,29 @@ export default (function () {
|
|
|
143
143
|
sourceDirs.push(sharedDir);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
server = modernConfig.server;
|
|
147
|
+
_modernConfig$source = modernConfig.source, alias = _modernConfig$source.alias, envVars = _modernConfig$source.envVars, globalVars = _modernConfig$source.globalVars;
|
|
148
|
+
babel = modernConfig.tools.babel;
|
|
149
|
+
|
|
146
150
|
if (!(sourceDirs.length > 0)) {
|
|
147
|
-
_context2.next =
|
|
151
|
+
_context2.next = 16;
|
|
148
152
|
break;
|
|
149
153
|
}
|
|
150
154
|
|
|
151
|
-
_context2.next =
|
|
152
|
-
return compile(appDirectory,
|
|
155
|
+
_context2.next = 16;
|
|
156
|
+
return compile(appDirectory, {
|
|
157
|
+
server: server,
|
|
158
|
+
alias: alias,
|
|
159
|
+
envVars: envVars,
|
|
160
|
+
globalVars: globalVars,
|
|
161
|
+
babelConfig: babel
|
|
162
|
+
}, {
|
|
153
163
|
sourceDirs: sourceDirs,
|
|
154
164
|
distDir: distDir,
|
|
155
165
|
tsconfigPath: tsconfigPath
|
|
156
166
|
});
|
|
157
167
|
|
|
158
|
-
case
|
|
168
|
+
case 16:
|
|
159
169
|
case "end":
|
|
160
170
|
return _context2.stop();
|
|
161
171
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.21.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -55,20 +55,20 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@babel/core": "^7.18.0",
|
|
57
57
|
"@babel/runtime": "^7.18.0",
|
|
58
|
-
"@modern-js/babel-compiler": "1.
|
|
59
|
-
"@modern-js/bff-core": "1.
|
|
60
|
-
"@modern-js/create-request": "1.
|
|
61
|
-
"@modern-js/server-utils": "1.
|
|
62
|
-
"@modern-js/utils": "1.
|
|
58
|
+
"@modern-js/babel-compiler": "1.21.1",
|
|
59
|
+
"@modern-js/bff-core": "1.21.1",
|
|
60
|
+
"@modern-js/create-request": "1.21.1",
|
|
61
|
+
"@modern-js/server-utils": "1.21.1",
|
|
62
|
+
"@modern-js/utils": "1.21.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@modern-js/core": "1.
|
|
66
|
-
"@modern-js/bff-runtime": "1.
|
|
67
|
-
"@modern-js/runtime": "1.
|
|
68
|
-
"@modern-js/server-core": "1.
|
|
69
|
-
"@modern-js/types": "1.
|
|
70
|
-
"@scripts/build": "1.
|
|
71
|
-
"@scripts/jest-config": "1.
|
|
65
|
+
"@modern-js/core": "1.21.1",
|
|
66
|
+
"@modern-js/bff-runtime": "1.21.1",
|
|
67
|
+
"@modern-js/runtime": "1.21.1",
|
|
68
|
+
"@modern-js/server-core": "1.21.1",
|
|
69
|
+
"@modern-js/types": "1.21.1",
|
|
70
|
+
"@scripts/build": "1.21.1",
|
|
71
|
+
"@scripts/jest-config": "1.21.1",
|
|
72
72
|
"@types/babel__core": "^7.1.15",
|
|
73
73
|
"@types/jest": "^27",
|
|
74
74
|
"@types/node": "^14",
|