@social-mail/social-mail-web-server 1.8.476 → 1.8.478
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/server/services/puppeteer/PuppeteerService.d.ts.map +1 -1
- package/dist/server/services/puppeteer/PuppeteerService.js +4 -2
- package/dist/server/services/puppeteer/PuppeteerService.js.map +1 -1
- package/dist/server/services/push-notifications/web-push/WebPushService.js +1 -1
- package/dist/server/services/push-notifications/web-push/WebPushService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/puppeteer/PuppeteerService.ts +5 -2
- package/src/server/services/push-notifications/web-push/WebPushService.ts +1 -1
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ export default class PuppeteerService {
|
|
|
37
37
|
}) {
|
|
38
38
|
|
|
39
39
|
const pageCookies = page?.request?.cookies;
|
|
40
|
-
let cookies = void 0;
|
|
40
|
+
let cookies = "void 0";
|
|
41
41
|
if (pageCookies) {
|
|
42
42
|
const domain = page.request.URL.hostname;
|
|
43
43
|
cookies = JSON.stringify(Object.entries(pageCookies).map(([name, value]) => ({ name, value, domain, httpOnly: true, secure: true })));
|
|
@@ -58,10 +58,13 @@ export default class PuppeteerService {
|
|
|
58
58
|
test,
|
|
59
59
|
testDelay: testDelay as any,
|
|
60
60
|
timeout: timeout as any,
|
|
61
|
-
cookies,
|
|
62
61
|
output
|
|
63
62
|
});
|
|
64
63
|
|
|
64
|
+
if (cookies) {
|
|
65
|
+
query.append("cookies", cookies);
|
|
66
|
+
}
|
|
67
|
+
|
|
65
68
|
console.log(`Fetching: ${url}`);
|
|
66
69
|
|
|
67
70
|
const fetchUrl = `http://${globalEnv.puppeteer.host}:${port}/screen-shot?${query.toString()}`;
|
|
@@ -45,7 +45,7 @@ export default class WebPushService extends BasePushService {
|
|
|
45
45
|
|
|
46
46
|
const c = this.pushConfig;
|
|
47
47
|
|
|
48
|
-
const pushService = JSON.parse(deviceToken);
|
|
48
|
+
const pushService = typeof deviceToken === "string" ? JSON.parse(deviceToken) : deviceToken;
|
|
49
49
|
await WebPush.sendNotification(
|
|
50
50
|
pushService,
|
|
51
51
|
JSON.stringify(payload), {
|