@cellaware/utils 8.5.0 → 8.5.1
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/dist/chatwms/pdf.d.ts +1 -1
- package/dist/chatwms/pdf.js +2 -2
- package/package.json +1 -1
package/dist/chatwms/pdf.d.ts
CHANGED
package/dist/chatwms/pdf.js
CHANGED
|
@@ -66,7 +66,7 @@ function backoffMs(attempt) {
|
|
|
66
66
|
function shouldRetryStatus(status) {
|
|
67
67
|
return status === 429 || status === 503 || status === 502 || status === 504;
|
|
68
68
|
}
|
|
69
|
-
export async function generatePdf(html,
|
|
69
|
+
export async function generatePdf(html, options) {
|
|
70
70
|
const token = process.env.BROWSERLESS_TOKEN;
|
|
71
71
|
if (!token) {
|
|
72
72
|
throw new Error('PDF: `BROWSER_TOKEN` environment variable is not set');
|
|
@@ -86,7 +86,7 @@ export async function generatePdf(html, pdfOptions) {
|
|
|
86
86
|
},
|
|
87
87
|
body: JSON.stringify({
|
|
88
88
|
html,
|
|
89
|
-
options:
|
|
89
|
+
options: options ??
|
|
90
90
|
{
|
|
91
91
|
format: "Letter",
|
|
92
92
|
printBackground: true,
|