fix(runtime): make observed target role optional
This commit is contained in:
@@ -96,8 +96,11 @@ export const finalizeInspectorCapture = async ({
|
||||
protocol_type: target.type,
|
||||
attached: target.attached,
|
||||
location: target.location,
|
||||
runtime_kind: input.runtime_kind,
|
||||
runtime_kind_authority: "caller-declared-unverified",
|
||||
runtime_kind: input.runtime_kind ?? "unknown",
|
||||
runtime_kind_authority:
|
||||
input.runtime_kind === undefined
|
||||
? "not-declared"
|
||||
: "caller-declared-unverified",
|
||||
},
|
||||
capture: {
|
||||
observation_ms: input.observation_ms,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user