@lark-apaas/devtool-kits 1.2.17-alpha.19 → 1.2.17-alpha.20
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 +2 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3313,7 +3313,8 @@ async function fetchRoutesFromBackend(basePath) {
|
|
|
3313
3313
|
}
|
|
3314
3314
|
const data = await response.json();
|
|
3315
3315
|
const routeConfig = data["\u8DEF\u7531\u914D\u7F6E"];
|
|
3316
|
-
if (!routeConfig || !routeConfig.routes) {
|
|
3316
|
+
if (!routeConfig || !routeConfig.routes || !Array.isArray(routeConfig.routes)) {
|
|
3317
|
+
console.warn("[api-list] Invalid routes data:", routeConfig);
|
|
3317
3318
|
return [];
|
|
3318
3319
|
}
|
|
3319
3320
|
const debugRoutes = routeConfig.routes;
|
|
@@ -3360,15 +3361,6 @@ __name(createApiListHandler, "createApiListHandler");
|
|
|
3360
3361
|
function createDevLogRouter(options = {}) {
|
|
3361
3362
|
const logDir = resolveLogDir(options.logDir);
|
|
3362
3363
|
const router = express2.Router();
|
|
3363
|
-
router.use((_req, res, next) => {
|
|
3364
|
-
res.header("Access-Control-Allow-Origin", "*");
|
|
3365
|
-
res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
|
|
3366
|
-
res.header("Access-Control-Allow-Headers", "Content-Type, Accept");
|
|
3367
|
-
next();
|
|
3368
|
-
});
|
|
3369
|
-
router.options("*", (_req, res) => {
|
|
3370
|
-
res.status(204).end();
|
|
3371
|
-
});
|
|
3372
3364
|
router.get("/app/trace/:traceId", createGetTraceEntriesHandler(logDir));
|
|
3373
3365
|
router.get("/trace/recent", createGetRecentTracesHandler(logDir));
|
|
3374
3366
|
router.get("/files/:fileName", createGetLogFileHandler(logDir));
|