@lark-apaas/devtool-kits 1.2.5-alpha.2 → 1.2.5-alpha.4
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 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2162,10 +2162,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2162
2162
|
if (alreadyAdded) {
|
|
2163
2163
|
return false;
|
|
2164
2164
|
}
|
|
2165
|
-
|
|
2166
|
-
return false;
|
|
2167
|
-
}
|
|
2168
|
-
const isAutomationTrigger = builder.path === path7;
|
|
2165
|
+
const isAutomationTrigger = builder.path?.endsWith(path7);
|
|
2169
2166
|
if (!isAutomationTrigger) {
|
|
2170
2167
|
return false;
|
|
2171
2168
|
}
|
|
@@ -2188,7 +2185,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2188
2185
|
if (shouldIncludeInCompletedCalls(builder)) {
|
|
2189
2186
|
completedCalls.push(builder);
|
|
2190
2187
|
if (limit && completedCalls.length > limit) {
|
|
2191
|
-
completedCalls.
|
|
2188
|
+
completedCalls.pop();
|
|
2192
2189
|
}
|
|
2193
2190
|
}
|
|
2194
2191
|
}, "updateBuilderMetadata");
|
|
@@ -2203,7 +2200,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2203
2200
|
if (shouldIncludeInCompletedCalls(builder)) {
|
|
2204
2201
|
completedCalls.push(builder);
|
|
2205
2202
|
if (limit && completedCalls.length > limit) {
|
|
2206
|
-
completedCalls.
|
|
2203
|
+
completedCalls.pop();
|
|
2207
2204
|
}
|
|
2208
2205
|
}
|
|
2209
2206
|
}, "handleRequestCompleted");
|
|
@@ -2248,7 +2245,7 @@ async function readTriggerList(filePath, trigger, path7, limit) {
|
|
|
2248
2245
|
};
|
|
2249
2246
|
}
|
|
2250
2247
|
__name(readTriggerList, "readTriggerList");
|
|
2251
|
-
async function readTriggerDetail(filePath, instanceID) {
|
|
2248
|
+
async function readTriggerDetail(filePath, path7, instanceID) {
|
|
2252
2249
|
const exists = await fileExists(filePath);
|
|
2253
2250
|
if (!exists) {
|
|
2254
2251
|
return void 0;
|
|
@@ -2264,8 +2261,9 @@ async function readTriggerDetail(filePath, instanceID) {
|
|
|
2264
2261
|
for await (const line of rl) {
|
|
2265
2262
|
const entry = parseLogLine2(line);
|
|
2266
2263
|
if (!entry) continue;
|
|
2264
|
+
const isAutomationTrigger = entry.path?.endsWith(path7);
|
|
2267
2265
|
const hasInstanceID = entry.message?.includes(`instanceID=${instanceID}`);
|
|
2268
|
-
if (!hasInstanceID) continue;
|
|
2266
|
+
if (!isAutomationTrigger || !hasInstanceID) continue;
|
|
2269
2267
|
matches.push(entry);
|
|
2270
2268
|
}
|
|
2271
2269
|
rl.close();
|
|
@@ -2405,8 +2403,9 @@ function createGetTriggerDetailHandler(logDir) {
|
|
|
2405
2403
|
message: "instanceID is required"
|
|
2406
2404
|
});
|
|
2407
2405
|
}
|
|
2406
|
+
const path7 = typeof req.query.path === "string" ? req.query.path.trim() : "/__innerapi__/automation/invoke";
|
|
2408
2407
|
try {
|
|
2409
|
-
const result = await readTriggerDetail(traceLogPath, instanceID);
|
|
2408
|
+
const result = await readTriggerDetail(traceLogPath, path7, instanceID);
|
|
2410
2409
|
if (!result) {
|
|
2411
2410
|
return handleNotFound(res, traceLogPath);
|
|
2412
2411
|
}
|