@xeno-js/core 1.2.4 → 1.2.5
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/index.cjs +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1588,7 +1588,7 @@ var init_cookies_service = __esm({
|
|
|
1588
1588
|
contextAccessor;
|
|
1589
1589
|
_config;
|
|
1590
1590
|
_cookieOpts;
|
|
1591
|
-
getAll
|
|
1591
|
+
getAll() {
|
|
1592
1592
|
const network = this.contextAccessor.getNetworkContext();
|
|
1593
1593
|
const req = network?.transport?.req;
|
|
1594
1594
|
if (!Guards19.isDefined(req) || Guards19.isNullOrEmpty(req.headers.get("cookie"))) return [];
|
|
@@ -1596,8 +1596,8 @@ var init_cookies_service = __esm({
|
|
|
1596
1596
|
const [name, ...rest] = cookie.split("=");
|
|
1597
1597
|
return { name: name.trim(), value: rest.join("=") };
|
|
1598
1598
|
}) ?? [];
|
|
1599
|
-
}
|
|
1600
|
-
setAll
|
|
1599
|
+
}
|
|
1600
|
+
setAll(cookies) {
|
|
1601
1601
|
const network = this.contextAccessor.getNetworkContext();
|
|
1602
1602
|
const res = network?.transport?.res;
|
|
1603
1603
|
if (!Guards19.isDefined(res)) return;
|
|
@@ -1607,7 +1607,7 @@ var init_cookies_service = __esm({
|
|
|
1607
1607
|
for (const cookie of [...existingSetCookie, ...serializedCookies]) {
|
|
1608
1608
|
res.headers.append("Set-Cookie", cookie);
|
|
1609
1609
|
}
|
|
1610
|
-
}
|
|
1610
|
+
}
|
|
1611
1611
|
serialize(cookie) {
|
|
1612
1612
|
const safeName = encodeURIComponent(cookie.name);
|
|
1613
1613
|
const safeValue = encodeURIComponent(cookie.value);
|
|
@@ -2593,7 +2593,14 @@ var init_supabase_factory = __esm({
|
|
|
2593
2593
|
const cookieService = this._getCookieSsr(config.ssrOpts, container, config.cookieOpts);
|
|
2594
2594
|
const client = createServerClient(config.url, config.key, {
|
|
2595
2595
|
...config.opts,
|
|
2596
|
-
cookies:
|
|
2596
|
+
cookies: {
|
|
2597
|
+
getAll() {
|
|
2598
|
+
return cookieService.getAll();
|
|
2599
|
+
},
|
|
2600
|
+
setAll(cookiesToSet) {
|
|
2601
|
+
cookieService.setAll(cookiesToSet);
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2597
2604
|
});
|
|
2598
2605
|
const mapper = new SupabaseClaimsMapper();
|
|
2599
2606
|
const sessionMapper = new SupabaseSessionMapper(mapper);
|