@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.js
CHANGED
|
@@ -3415,14 +3415,20 @@ function handleError2(res, error, message = "Failed to collect logs") {
|
|
|
3415
3415
|
__name(handleError2, "handleError");
|
|
3416
3416
|
|
|
3417
3417
|
// src/middlewares/collect-logs/router.ts
|
|
3418
|
+
var DEFAULT_BODY_SIZE_LIMIT = "1mb";
|
|
3419
|
+
function getBodySizeLimit() {
|
|
3420
|
+
return process.env.BODY_SIZE_LIMIT || DEFAULT_BODY_SIZE_LIMIT;
|
|
3421
|
+
}
|
|
3422
|
+
__name(getBodySizeLimit, "getBodySizeLimit");
|
|
3418
3423
|
function createDevLogRouter2(options = {}) {
|
|
3419
3424
|
const logDir = resolveLogDir2(options.logDir);
|
|
3420
3425
|
const router = express3.Router();
|
|
3426
|
+
const bodyLimit = getBodySizeLimit();
|
|
3421
3427
|
router.post("/collect", express3.json({
|
|
3422
|
-
limit:
|
|
3428
|
+
limit: bodyLimit
|
|
3423
3429
|
}), collectLogsHandler(logDir, options.fileName || "client.log"));
|
|
3424
3430
|
router.post("/collect-batch", express3.json({
|
|
3425
|
-
limit:
|
|
3431
|
+
limit: bodyLimit
|
|
3426
3432
|
}), collectLogsBatchHandler(logDir, options.fileName || "client.log"));
|
|
3427
3433
|
return router;
|
|
3428
3434
|
}
|