@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.cjs
CHANGED
|
@@ -2165,7 +2165,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2165
2165
|
if (!builder.hasCompleted) {
|
|
2166
2166
|
return false;
|
|
2167
2167
|
}
|
|
2168
|
-
const isAutomationTrigger = builder.path
|
|
2168
|
+
const isAutomationTrigger = builder.path?.endsWith(path7);
|
|
2169
2169
|
if (!isAutomationTrigger) {
|
|
2170
2170
|
return false;
|
|
2171
2171
|
}
|
|
@@ -2248,7 +2248,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2248
2248
|
};
|
|
2249
2249
|
}
|
|
2250
2250
|
__name(readTriggerList, "readTriggerList");
|
|
2251
|
-
async function readTriggerDetail(filePath, instanceID) {
|
|
2251
|
+
async function readTriggerDetail(filePath, path7, instanceID) {
|
|
2252
2252
|
const exists = await fileExists(filePath);
|
|
2253
2253
|
if (!exists) {
|
|
2254
2254
|
return void 0;
|
|
@@ -2264,8 +2264,9 @@ async function readTriggerDetail(filePath, instanceID) {
|
|
|
2264
2264
|
for await (const line of rl) {
|
|
2265
2265
|
const entry = parseLogLine2(line);
|
|
2266
2266
|
if (!entry) continue;
|
|
2267
|
+
const isAutomationTrigger = entry.path?.endsWith(path7);
|
|
2267
2268
|
const hasInstanceID = entry.message?.includes(`instanceID=${instanceID}`);
|
|
2268
|
-
if (!hasInstanceID) continue;
|
|
2269
|
+
if (!isAutomationTrigger || !hasInstanceID) continue;
|
|
2269
2270
|
matches.push(entry);
|
|
2270
2271
|
}
|
|
2271
2272
|
rl.close();
|
|
@@ -2405,8 +2406,9 @@ function createGetTriggerDetailHandler(logDir) {
|
|
|
2405
2406
|
message: "instanceID is required"
|
|
2406
2407
|
});
|
|
2407
2408
|
}
|
|
2409
|
+
const path7 = typeof req.query.path === "string" ? req.query.path.trim() : "/__innerapi__/automation/invoke";
|
|
2408
2410
|
try {
|
|
2409
|
-
const result = await readTriggerDetail(traceLogPath, instanceID);
|
|
2411
|
+
const result = await readTriggerDetail(traceLogPath, path7, instanceID);
|
|
2410
2412
|
if (!result) {
|
|
2411
2413
|
return handleNotFound(res, traceLogPath);
|
|
2412
2414
|
}
|