@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.8.476",
3
+ "version": "1.8.478",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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), {