@skrillex1224/playwright-toolkit 2.1.184 → 2.1.185

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/browser.js CHANGED
@@ -1370,6 +1370,22 @@ var normalizeAuth = (value) => {
1370
1370
  return acc;
1371
1371
  }, {});
1372
1372
  };
1373
+ var normalizeCookieSameSite = (value) => {
1374
+ const raw = String(value || "").trim().toLowerCase();
1375
+ if (!raw) return "";
1376
+ switch (raw) {
1377
+ case "strict":
1378
+ return "Strict";
1379
+ case "lax":
1380
+ return "Lax";
1381
+ case "none":
1382
+ case "no_restriction":
1383
+ return "None";
1384
+ case "unspecified":
1385
+ default:
1386
+ return "";
1387
+ }
1388
+ };
1373
1389
  var normalizeCookies = (value) => {
1374
1390
  if (!Array.isArray(value)) return [];
1375
1391
  return value.map((item) => {
@@ -1380,14 +1396,14 @@ var normalizeCookies = (value) => {
1380
1396
  if (!name || !cookieValue || cookieValue === "<nil>") return null;
1381
1397
  const domain = String(raw.domain || "").trim();
1382
1398
  const path = String(raw.path || "").trim() || "/";
1383
- const sameSiteRaw = String(raw.sameSite || "").trim();
1399
+ const sameSite = normalizeCookieSameSite(raw.sameSite);
1384
1400
  return {
1385
1401
  ...raw,
1386
1402
  name,
1387
1403
  value: cookieValue,
1388
1404
  domain,
1389
1405
  path,
1390
- ...sameSiteRaw ? { sameSite: sameSiteRaw } : {}
1406
+ ...sameSite ? { sameSite } : {}
1391
1407
  };
1392
1408
  }).filter(Boolean);
1393
1409
  };