single-file-cli 2.1.2 → 2.1.3
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/build.sh +1 -1
- package/deno.json +1 -1
- package/lib/cdp-client.js +7 -1
- package/lib/single-file-bundle.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/build.sh
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
mv package.json package.json.tmp
|
|
4
4
|
mv deno.json deno.json.tmp
|
|
5
5
|
mv deno.lock deno.lock.tmp
|
|
6
|
-
deno install --vendor --quiet --minimum-dependency-age=0 "npm:single-file-core@1.5.
|
|
6
|
+
deno install --vendor --quiet --minimum-dependency-age=0 "npm:single-file-core@1.5.86"
|
|
7
7
|
mv package.json.tmp package.json
|
|
8
8
|
mv deno.json.tmp deno.json
|
|
9
9
|
mv deno.lock.tmp deno.lock
|
package/deno.json
CHANGED
package/lib/cdp-client.js
CHANGED
|
@@ -697,7 +697,7 @@ async function capturePageData({ Runtime }, contextId, { options, debugMessages
|
|
|
697
697
|
CAPTURE_SCREENSHOT_FUNCTION_NAME,
|
|
698
698
|
PRINT_TO_PDF_FUNCTION_NAME
|
|
699
699
|
])})`;
|
|
700
|
-
const { result } = await Promise.race([
|
|
700
|
+
const { result, exceptionDetails } = await Promise.race([
|
|
701
701
|
Runtime.evaluate({
|
|
702
702
|
expression: captureScript,
|
|
703
703
|
awaitPromise: true,
|
|
@@ -706,6 +706,12 @@ async function capturePageData({ Runtime }, contextId, { options, debugMessages
|
|
|
706
706
|
}),
|
|
707
707
|
waitForTimeout(captureTimeoutAbortSignal, options.browserCaptureMaxTime, CAPTURE_TIMEOUT_ERROR_MESSAGE, CAPTURE_TIMEOUT_ERROR)
|
|
708
708
|
]);
|
|
709
|
+
// `returnByValue` serializes the rejection value to an empty object, so
|
|
710
|
+
// the error is only readable in `exceptionDetails`
|
|
711
|
+
if (exceptionDetails) {
|
|
712
|
+
const { exception, text } = exceptionDetails;
|
|
713
|
+
throw new Error(exception && exception.description ? exception.description : text);
|
|
714
|
+
}
|
|
709
715
|
if (result.subtype === ERROR_SUBTYPE) {
|
|
710
716
|
throw new Error(result.description);
|
|
711
717
|
}
|