@lark-apaas/devtool-kits 1.2.5-alpha.2 → 1.2.5-alpha.3
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2124,7 +2124,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2124
2124
|
if (!builder.hasCompleted) {
|
|
2125
2125
|
return false;
|
|
2126
2126
|
}
|
|
2127
|
-
const isAutomationTrigger = builder.path
|
|
2127
|
+
const isAutomationTrigger = builder.path?.endsWith(path7);
|
|
2128
2128
|
if (!isAutomationTrigger) {
|
|
2129
2129
|
return false;
|
|
2130
2130
|
}
|
|
@@ -2207,7 +2207,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2207
2207
|
};
|
|
2208
2208
|
}
|
|
2209
2209
|
__name(readTriggerList, "readTriggerList");
|
|
2210
|
-
async function readTriggerDetail(filePath, instanceID) {
|
|
2210
|
+
async function readTriggerDetail(filePath, path7, instanceID) {
|
|
2211
2211
|
const exists = await fileExists(filePath);
|
|
2212
2212
|
if (!exists) {
|
|
2213
2213
|
return void 0;
|
|
@@ -2223,8 +2223,9 @@ async function readTriggerDetail(filePath, instanceID) {
|
|
|
2223
2223
|
for await (const line of rl) {
|
|
2224
2224
|
const entry = parseLogLine2(line);
|
|
2225
2225
|
if (!entry) continue;
|
|
2226
|
+
const isAutomationTrigger = entry.path?.endsWith(path7);
|
|
2226
2227
|
const hasInstanceID = entry.message?.includes(`instanceID=${instanceID}`);
|
|
2227
|
-
if (!hasInstanceID) continue;
|
|
2228
|
+
if (!isAutomationTrigger || !hasInstanceID) continue;
|
|
2228
2229
|
matches.push(entry);
|
|
2229
2230
|
}
|
|
2230
2231
|
rl.close();
|
|
@@ -2364,8 +2365,9 @@ function createGetTriggerDetailHandler(logDir) {
|
|
|
2364
2365
|
message: "instanceID is required"
|
|
2365
2366
|
});
|
|
2366
2367
|
}
|
|
2368
|
+
const path7 = typeof req.query.path === "string" ? req.query.path.trim() : "/__innerapi__/automation/invoke";
|
|
2367
2369
|
try {
|
|
2368
|
-
const result = await readTriggerDetail(traceLogPath, instanceID);
|
|
2370
|
+
const result = await readTriggerDetail(traceLogPath, path7, instanceID);
|
|
2369
2371
|
if (!result) {
|
|
2370
2372
|
return handleNotFound(res, traceLogPath);
|
|
2371
2373
|
}
|