@lark-apaas/devtool-kits 1.2.17-alpha.25 → 1.2.17-alpha.27
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/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3461,14 +3461,20 @@ function handleError2(res, error, message = "Failed to collect logs") {
|
|
|
3461
3461
|
__name(handleError2, "handleError");
|
|
3462
3462
|
|
|
3463
3463
|
// src/middlewares/collect-logs/router.ts
|
|
3464
|
+
var DEFAULT_BODY_SIZE_LIMIT = "1mb";
|
|
3465
|
+
function getBodySizeLimit() {
|
|
3466
|
+
return process.env.BODY_SIZE_LIMIT || DEFAULT_BODY_SIZE_LIMIT;
|
|
3467
|
+
}
|
|
3468
|
+
__name(getBodySizeLimit, "getBodySizeLimit");
|
|
3464
3469
|
function createDevLogRouter2(options = {}) {
|
|
3465
3470
|
const logDir = resolveLogDir2(options.logDir);
|
|
3466
3471
|
const router = import_express3.default.Router();
|
|
3472
|
+
const bodyLimit = getBodySizeLimit();
|
|
3467
3473
|
router.post("/collect", import_express3.default.json({
|
|
3468
|
-
limit:
|
|
3474
|
+
limit: bodyLimit
|
|
3469
3475
|
}), collectLogsHandler(logDir, options.fileName || "client.log"));
|
|
3470
3476
|
router.post("/collect-batch", import_express3.default.json({
|
|
3471
|
-
limit:
|
|
3477
|
+
limit: bodyLimit
|
|
3472
3478
|
}), collectLogsBatchHandler(logDir, options.fileName || "client.log"));
|
|
3473
3479
|
return router;
|
|
3474
3480
|
}
|