@modern-js/plugin-bff 2.17.1 → 2.18.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 +9 -0
- package/dist/esm/cli.js +14 -14
- package/dist/esm/helper.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/server.js +6 -6
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
package/dist/esm/cli.js
CHANGED
|
@@ -41,7 +41,7 @@ function _async_to_generator(fn) {
|
|
|
41
41
|
function _define_property(obj, key, value) {
|
|
42
42
|
if (key in obj) {
|
|
43
43
|
Object.defineProperty(obj, key, {
|
|
44
|
-
value,
|
|
44
|
+
value: value,
|
|
45
45
|
enumerable: true,
|
|
46
46
|
configurable: true,
|
|
47
47
|
writable: true
|
|
@@ -245,8 +245,8 @@ export default function() {
|
|
|
245
245
|
var apiRouter = new ApiRouter({
|
|
246
246
|
apiDir: apiDirectory,
|
|
247
247
|
lambdaDir: lambdaDirectory,
|
|
248
|
-
prefix,
|
|
249
|
-
httpMethodDecider
|
|
248
|
+
prefix: prefix,
|
|
249
|
+
httpMethodDecider: httpMethodDecider
|
|
250
250
|
});
|
|
251
251
|
var lambdaDir = apiRouter.getLambdaDir();
|
|
252
252
|
var existLambda = apiRouter.isExistLambda();
|
|
@@ -254,13 +254,13 @@ export default function() {
|
|
|
254
254
|
var name = isServer ? "server" : "client";
|
|
255
255
|
chain.module.rule(CHAIN_ID.RULE.JS).exclude.add(apiRegexp);
|
|
256
256
|
chain.module.rule(CHAIN_ID.RULE.JS_BFF_API).test(apiRegexp).use("custom-loader").loader(require.resolve("./loader").replace(/\\/g, "/")).options({
|
|
257
|
-
prefix,
|
|
257
|
+
prefix: prefix,
|
|
258
258
|
apiDir: apiDirectory,
|
|
259
|
-
lambdaDir,
|
|
260
|
-
existLambda,
|
|
261
|
-
port,
|
|
259
|
+
lambdaDir: lambdaDir,
|
|
260
|
+
existLambda: existLambda,
|
|
261
|
+
port: port,
|
|
262
262
|
target: name,
|
|
263
|
-
httpMethodDecider
|
|
263
|
+
httpMethodDecider: httpMethodDecider
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
},
|
|
@@ -312,7 +312,7 @@ export default function() {
|
|
|
312
312
|
"@modern-js/plugin-bff": "@modern-js/plugin-bff/server"
|
|
313
313
|
});
|
|
314
314
|
return {
|
|
315
|
-
plugins
|
|
315
|
+
plugins: plugins
|
|
316
316
|
};
|
|
317
317
|
},
|
|
318
318
|
beforeBuild: function beforeBuild() {
|
|
@@ -362,13 +362,13 @@ export default function() {
|
|
|
362
362
|
return [
|
|
363
363
|
4,
|
|
364
364
|
compile(appDirectory, {
|
|
365
|
-
server,
|
|
366
|
-
alias,
|
|
365
|
+
server: server,
|
|
366
|
+
alias: alias,
|
|
367
367
|
babelConfig: babel
|
|
368
368
|
}, {
|
|
369
|
-
sourceDirs,
|
|
370
|
-
distDir,
|
|
371
|
-
tsconfigPath
|
|
369
|
+
sourceDirs: sourceDirs,
|
|
370
|
+
distDir: distDir,
|
|
371
|
+
tsconfigPath: tsconfigPath
|
|
372
372
|
})
|
|
373
373
|
];
|
|
374
374
|
case 1:
|
package/dist/esm/helper.js
CHANGED
package/dist/esm/loader.js
CHANGED
|
@@ -159,8 +159,8 @@ function _loader() {
|
|
|
159
159
|
lambdaDir: draftOptions.lambdaDir,
|
|
160
160
|
target: draftOptions.target,
|
|
161
161
|
port: Number(draftOptions.port),
|
|
162
|
-
source,
|
|
163
|
-
resourcePath,
|
|
162
|
+
source: source,
|
|
163
|
+
resourcePath: resourcePath,
|
|
164
164
|
httpMethodDecider: draftOptions.httpMethodDecider
|
|
165
165
|
};
|
|
166
166
|
lambdaDir = draftOptions.lambdaDir;
|
package/dist/esm/server.js
CHANGED
|
@@ -23,7 +23,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
23
23
|
function _define_property(obj, key, value) {
|
|
24
24
|
if (key in obj) {
|
|
25
25
|
Object.defineProperty(obj, key, {
|
|
26
|
-
value,
|
|
26
|
+
value: value,
|
|
27
27
|
enumerable: true,
|
|
28
28
|
configurable: true,
|
|
29
29
|
writable: true
|
|
@@ -138,15 +138,15 @@ export default function() {
|
|
|
138
138
|
var apiRouter = new ApiRouter({
|
|
139
139
|
apiDir: apiDirectory || apiDir,
|
|
140
140
|
lambdaDir: lambdaDirectory,
|
|
141
|
-
prefix,
|
|
142
|
-
httpMethodDecider
|
|
141
|
+
prefix: prefix,
|
|
142
|
+
httpMethodDecider: httpMethodDecider
|
|
143
143
|
});
|
|
144
144
|
var apiMode = apiRouter.getApiMode();
|
|
145
145
|
var apiHandlerInfos = apiRouter.getApiHandlers();
|
|
146
146
|
api.setAppContext(_object_spread_props(_object_spread({}, appContext), {
|
|
147
|
-
apiRouter,
|
|
148
|
-
apiHandlerInfos,
|
|
149
|
-
apiMode
|
|
147
|
+
apiRouter: apiRouter,
|
|
148
|
+
apiHandlerInfos: apiHandlerInfos,
|
|
149
|
+
apiMode: apiMode
|
|
150
150
|
}));
|
|
151
151
|
return next(props);
|
|
152
152
|
}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.18.0",
|
|
19
19
|
"jsnext:source": "./src/cli.ts",
|
|
20
20
|
"types": "./dist/types/cli.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli.js",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@babel/core": "^7.18.0",
|
|
59
59
|
"@babel/runtime": "^7.18.0",
|
|
60
|
-
"@modern-js/bff-core": "2.
|
|
61
|
-
"@modern-js/
|
|
62
|
-
"@modern-js/
|
|
63
|
-
"@modern-js/utils": "2.
|
|
60
|
+
"@modern-js/bff-core": "2.18.0",
|
|
61
|
+
"@modern-js/server-utils": "2.18.0",
|
|
62
|
+
"@modern-js/create-request": "2.18.0",
|
|
63
|
+
"@modern-js/utils": "2.18.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/babel__core": "^7.1.15",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"typescript": "^4",
|
|
73
73
|
"webpack": "^5.76.2",
|
|
74
74
|
"webpack-chain": "^6.5.1",
|
|
75
|
-
"@modern-js/runtime": "2.
|
|
76
|
-
"@modern-js/
|
|
77
|
-
"@modern-js/
|
|
78
|
-
"@modern-js/
|
|
79
|
-
"@modern-js/
|
|
80
|
-
"@modern-js/app-tools": "2.
|
|
81
|
-
"@scripts/build": "2.
|
|
82
|
-
"@scripts/jest-config": "2.
|
|
75
|
+
"@modern-js/runtime": "2.18.0",
|
|
76
|
+
"@modern-js/bff-runtime": "2.18.0",
|
|
77
|
+
"@modern-js/types": "2.18.0",
|
|
78
|
+
"@modern-js/core": "2.18.0",
|
|
79
|
+
"@modern-js/server-core": "2.18.0",
|
|
80
|
+
"@modern-js/app-tools": "2.18.0",
|
|
81
|
+
"@scripts/build": "2.18.0",
|
|
82
|
+
"@scripts/jest-config": "2.18.0"
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
85
|
"publishConfig": {
|