fix(runtime): make observed target role optional

This commit is contained in:
morluto
2026-09-29 08:20:18 +08:00
parent 0ae3c0837b
commit 593a8e12ce
8 changed files with 56 additions and 13 deletions
+2 -1
View File
@@ -140,7 +140,8 @@ export class V8InspectorProvider implements JavaScriptRuntimeObservationPort {
options.signal,
);
const target = await authorizedTarget(discovery.targets, input, roots);
assertRuntimeKind(target, input.runtime_kind);
if (input.runtime_kind !== undefined)
assertRuntimeKind(target, input.runtime_kind);
connection = await CdpConnection.connect(
target.webSocketUrl,
"observe_javascript_runtime",