@modern-js/plugin-bff 1.20.1 → 1.21.0

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @modern-js/plugin-bff
2
2
 
3
+ ## 1.21.0
4
+
5
+ ### Patch Changes
6
+
7
+ - cc3cab0: fix: modify the parameters passed to the compile function of server-utils
8
+ fix: 修改传入 server-utils 的 compile 函数的参数
9
+ - Updated dependencies [8f3674a]
10
+ - @modern-js/server-utils@1.21.0
11
+ - @modern-js/utils@1.21.0
12
+ - @modern-js/bff-core@1.21.0
13
+ - @modern-js/create-request@1.21.0
14
+ - @modern-js/babel-compiler@1.21.0
15
+
3
16
  ## 1.20.1
4
17
 
5
18
  ### Patch Changes
@@ -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, modernConfig, {
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
@@ -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, modernConfig, {
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 = 13;
151
+ _context2.next = 16;
148
152
  break;
149
153
  }
150
154
 
151
- _context2.next = 13;
152
- return compile(appDirectory, modernConfig, {
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 13:
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.20.1",
14
+ "version": "1.21.0",
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.20.1",
59
- "@modern-js/bff-core": "1.20.1",
60
- "@modern-js/create-request": "1.20.1",
61
- "@modern-js/server-utils": "1.20.1",
62
- "@modern-js/utils": "1.20.1"
58
+ "@modern-js/babel-compiler": "1.21.0",
59
+ "@modern-js/bff-core": "1.21.0",
60
+ "@modern-js/create-request": "1.21.0",
61
+ "@modern-js/server-utils": "1.21.0",
62
+ "@modern-js/utils": "1.21.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@modern-js/core": "1.20.1",
66
- "@modern-js/bff-runtime": "1.20.1",
67
- "@modern-js/runtime": "1.20.1",
68
- "@modern-js/server-core": "1.20.1",
69
- "@modern-js/types": "1.20.1",
70
- "@scripts/build": "1.20.1",
71
- "@scripts/jest-config": "1.20.1",
65
+ "@modern-js/core": "1.21.0",
66
+ "@modern-js/bff-runtime": "1.21.0",
67
+ "@modern-js/runtime": "1.21.0",
68
+ "@modern-js/server-core": "1.21.0",
69
+ "@modern-js/types": "1.21.0",
70
+ "@scripts/build": "1.21.0",
71
+ "@scripts/jest-config": "1.21.0",
72
72
  "@types/babel__core": "^7.1.15",
73
73
  "@types/jest": "^27",
74
74
  "@types/node": "^14",