@lark-apaas/devtool-kits 1.2.8-alpha.0 → 1.2.8-alpha.1

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 CHANGED
@@ -2359,7 +2359,7 @@ function generateUUID() {
2359
2359
  });
2360
2360
  }
2361
2361
  __name(generateUUID, "generateUUID");
2362
- async function readTriggerList(filePath, trigger, path7, limit) {
2362
+ async function readTriggerList(filePath, trigger, path7, limit, triggerID) {
2363
2363
  if (!await fileExists(filePath)) {
2364
2364
  return void 0;
2365
2365
  }
@@ -2392,7 +2392,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
2392
2392
  if (trigger && builder.entries.length > 0) {
2393
2393
  const requestEntry = builder.entries.find((e) => e.request_body?.trigger);
2394
2394
  if (requestEntry?.request_body?.trigger) {
2395
- return String(requestEntry.request_body.trigger) === trigger;
2395
+ return String(requestEntry.request_body.trigger) === trigger && (triggerID ? requestEntry?.request_body?.triggerID === triggerID : true);
2396
2396
  }
2397
2397
  return false;
2398
2398
  }
@@ -2625,10 +2625,11 @@ function createGetTriggerListHandler(logDir) {
2625
2625
  message: "trigger is required"
2626
2626
  });
2627
2627
  }
2628
+ const triggerID = typeof req.query.triggerID === "string" ? req.query.triggerID.trim() : void 0;
2628
2629
  const path7 = typeof req.query.path === "string" ? req.query.path.trim() : "/__innerapi__/automation/invoke";
2629
2630
  const limit = parseLimit(req.query.limit, 10, 200);
2630
2631
  try {
2631
- const result = await readTriggerList(traceLogPath, trigger, path7, limit);
2632
+ const result = await readTriggerList(traceLogPath, trigger, path7, limit, triggerID);
2632
2633
  if (!result) {
2633
2634
  return handleNotFound(res, traceLogPath);
2634
2635
  }