@adhdev/daemon-standalone 0.9.76-rc.20 → 0.9.76-rc.21
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/package.json
CHANGED
|
@@ -56385,11 +56385,16 @@ function unwrapCommandPayload(value) {
|
|
|
56385
56385
|
return value?.result?.result ?? value?.result ?? value;
|
|
56386
56386
|
}
|
|
56387
56387
|
function findNestedPayload(value, predicate) {
|
|
56388
|
-
|
|
56389
|
-
|
|
56390
|
-
|
|
56391
|
-
|
|
56392
|
-
|
|
56388
|
+
const seen = /* @__PURE__ */ new Set();
|
|
56389
|
+
const stack = [{ payload: value, depth: 0 }];
|
|
56390
|
+
while (stack.length) {
|
|
56391
|
+
const { payload, depth } = stack.pop();
|
|
56392
|
+
if (predicate(payload)) return payload;
|
|
56393
|
+
if (!payload || typeof payload !== "object" || seen.has(payload) || depth >= 8) continue;
|
|
56394
|
+
seen.add(payload);
|
|
56395
|
+
for (const key of ["payload", "result"]) {
|
|
56396
|
+
if (key in payload) stack.push({ payload: payload[key], depth: depth + 1 });
|
|
56397
|
+
}
|
|
56393
56398
|
}
|
|
56394
56399
|
return value;
|
|
56395
56400
|
}
|