@ai-matrx/data 0.22.0 → 0.22.2
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/CHANGELOG.md +12 -0
- package/dist/{auth-cookie-BpgVyFw9.d.cts → auth-cookie-D4QjVz7W.d.cts} +2 -0
- package/dist/{auth-cookie-BpgVyFw9.d.ts → auth-cookie-D4QjVz7W.d.ts} +2 -0
- package/dist/db.cjs +5 -2
- package/dist/db.cjs.map +1 -1
- package/dist/db.d.cts +1 -1
- package/dist/db.d.ts +1 -1
- package/dist/db.js +5 -2
- package/dist/db.js.map +1 -1
- package/dist/next.cjs +6 -3
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +2 -2
- package/dist/next.d.ts +2 -2
- package/dist/next.js +6 -3
- package/dist/next.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +59 -0
- package/dist/types.d.ts +59 -0
- package/package.json +3 -3
package/dist/db.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MaybeSingleResponse } from './index.cjs';
|
|
2
|
-
export { a as AuthCookie, b as AuthCookieOptions, A as AuthCookieValue, C as CreateAuthCookieArgs, D as DEFAULT_AUTH_COOKIE_NAME, R as ReconciledAuthCookies, c as createAuthCookie, p as parseCookieHeader } from './auth-cookie-
|
|
2
|
+
export { a as AuthCookie, b as AuthCookieOptions, A as AuthCookieValue, C as CreateAuthCookieArgs, D as DEFAULT_AUTH_COOKIE_NAME, R as ReconciledAuthCookies, c as createAuthCookie, p as parseCookieHeader } from './auth-cookie-D4QjVz7W.cjs';
|
|
3
3
|
export { uniqueChannelTopic } from '@ai-matrx/realtime';
|
|
4
4
|
import { PostgrestError } from '@supabase/supabase-js';
|
|
5
5
|
import './credentials-B-rePKU7.cjs';
|
package/dist/db.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MaybeSingleResponse } from './index.js';
|
|
2
|
-
export { a as AuthCookie, b as AuthCookieOptions, A as AuthCookieValue, C as CreateAuthCookieArgs, D as DEFAULT_AUTH_COOKIE_NAME, R as ReconciledAuthCookies, c as createAuthCookie, p as parseCookieHeader } from './auth-cookie-
|
|
2
|
+
export { a as AuthCookie, b as AuthCookieOptions, A as AuthCookieValue, C as CreateAuthCookieArgs, D as DEFAULT_AUTH_COOKIE_NAME, R as ReconciledAuthCookies, c as createAuthCookie, p as parseCookieHeader } from './auth-cookie-D4QjVz7W.js';
|
|
3
3
|
export { uniqueChannelTopic } from '@ai-matrx/realtime';
|
|
4
4
|
import { PostgrestError } from '@supabase/supabase-js';
|
|
5
5
|
import './credentials-B-rePKU7.js';
|
package/dist/db.js
CHANGED
|
@@ -312,9 +312,12 @@ function createAuthCookie(args) {
|
|
|
312
312
|
const legacyCookieName = args.legacyCookieName;
|
|
313
313
|
const apex = args.apexDomain.toLowerCase();
|
|
314
314
|
const optionsForHost = (host) => {
|
|
315
|
-
const
|
|
315
|
+
const normalized = (host ?? "").toLowerCase();
|
|
316
|
+
const hostname = normalized.startsWith("[") ? normalized.slice(1, normalized.indexOf("]")) : normalized === "::1" ? normalized : normalized.split(":")[0] ?? "";
|
|
317
|
+
const loopback = hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "::1" || /^127(?:\.(?:0|[1-9]\d{0,2})){3}$/.test(hostname) && hostname.split(".").every((part) => Number(part) <= 255);
|
|
318
|
+
const secure = !loopback;
|
|
316
319
|
const onApex = hostname === apex || hostname.endsWith(`.${apex}`);
|
|
317
|
-
return onApex ? { name: cookieName, domain: `.${apex}
|
|
320
|
+
return onApex ? { name: cookieName, domain: `.${apex}`, secure } : { name: cookieName, secure };
|
|
318
321
|
};
|
|
319
322
|
const isCurrentCookie = (name) => belongsToStorageKey(name, cookieName);
|
|
320
323
|
const isAuthCookie = (name) => isCurrentCookie(name) || legacyCookieName !== void 0 && (name === legacyCookieName || name.startsWith(`${legacyCookieName}.`));
|