mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 18:35:53 +00:00
fix(inspector): retain observations after capture failures
This commit is contained in:
1 parent
c267e99227
commit
dea3498b2b
9 files changed
+532
-45
No files matched your search
@@ -144,9 +144,14 @@ const scriptEntities = (
|
||||
): RuntimeReconciliationEntity[] =>
|
||||
capture.inspection.scripts.items.map((script) => {
|
||||
const location =
|
||||
"url" in script
|
||||
? ({ kind: "url", value: script.url } as const)
|
||||
: ({ kind: "file", value: script.file_path } as const);
|
||||
"unresolved_location" in script
|
||||
? ({
|
||||
kind: "unresolved",
|
||||
value: script.unresolved_location.reported_url,
|
||||
} as const)
|
||||
: "url" in script
|
||||
? ({ kind: "url", value: script.url } as const)
|
||||
: ({ kind: "file", value: script.file_path } as const);
|
||||
return runtimeEntity(capture, {
|
||||
kind: "script",
|
||||
nodeKind: "runtime-script-instance",
|
||||
@@ -161,7 +166,13 @@ const scriptEntities = (
|
||||
: null,
|
||||
label: location.value,
|
||||
properties: {
|
||||
location: location.value,
|
||||
...("unresolved_location" in script
|
||||
? {
|
||||
location_kind: "unresolved",
|
||||
reported_url: script.unresolved_location.reported_url,
|
||||
location_reason: script.unresolved_location.reason,
|
||||
}
|
||||
: { location: location.value }),
|
||||
cdp_hash: script.cdp_hash,
|
||||
length: script.length,
|
||||
is_module: script.is_module,
|
||||
|
||||
Reference in new issue
Block a user