refactor(domain): extract source-map envelope walk and disambiguate stringValue (#828)
Move the indexed sections walk shared by the browser fetcher and the artifact reader into domain/sourceMapEnvelope with the fetchers stricter offset validation as an option; both validators keep their leaf strictness. Rename the browser CDP stringValue to cdpStringValue across its 18 files, fold the fingerprint duplicate into the static helper, and rename the version-keys shadow to nonEmptyString.
This commit is contained in:
@@ -2,7 +2,7 @@ import type { WebPageInspection } from "../domain/browserObservation.js";
|
||||
import { sanitizeBrowserUrl } from "../domain/browserObservation.js";
|
||||
import {
|
||||
numberValue,
|
||||
stringValue,
|
||||
cdpStringValue,
|
||||
type UnknownRecord,
|
||||
} from "./CdpCaptureValues.js";
|
||||
|
||||
@@ -42,7 +42,7 @@ export const safeResponseMetadata = (
|
||||
response: {
|
||||
request_id: requestId,
|
||||
url,
|
||||
mime_type: boundedHeader(stringValue(response.mimeType)),
|
||||
mime_type: boundedHeader(cdpStringValue(response.mimeType)),
|
||||
content_length: nonnegativeInteger(headers.get("content-length")),
|
||||
content_encoding: boundedHeader(headers.get("content-encoding")),
|
||||
csp,
|
||||
|
||||
Reference in New Issue
Block a user