@replicated/portal-components 0.0.22 → 0.0.23

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.0.22",
3
- "generatedAt": "2026-02-05T21:44:53.756Z",
2
+ "version": "0.0.23",
3
+ "generatedAt": "2026-02-06T16:22:54.220Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Button",
@@ -1,7 +1,7 @@
1
1
  # Component Registry
2
2
 
3
- - Version: 0.0.22
4
- - Generated: 2026-02-05T21:44:53.756Z
3
+ - Version: 0.0.23
4
+ - Generated: 2026-02-06T16:22:54.220Z
5
5
 
6
6
  ## Button
7
7
 
package/dist/esm/index.js CHANGED
@@ -121,7 +121,7 @@ var init_tracer = __esm({
121
121
 
122
122
  // package.json
123
123
  var package_default = {
124
- version: "0.0.22"};
124
+ version: "0.0.23"};
125
125
 
126
126
  // src/tokens/index.ts
127
127
  var baseTokens = {
@@ -532,24 +532,22 @@ async function validateSession(token) {
532
532
  if (!token || typeof token !== "string" || !token.trim()) {
533
533
  return false;
534
534
  }
535
- try {
536
- const endpoint = `${getApiOrigin()}/enterprise-portal/user`;
537
- const response = await fetch(endpoint, {
538
- method: "GET",
539
- headers: {
540
- authorization: `Bearer ${token}`
541
- },
542
- // Short timeout for validation
543
- signal: AbortSignal.timeout(5e3)
544
- });
545
- if (response.status === 401) {
546
- return false;
547
- }
548
- return response.ok;
549
- } catch (error) {
550
- console.warn("[portal-components] session validation error:", error);
551
- return true;
535
+ const endpoint = `${getApiOrigin()}/enterprise-portal/user`;
536
+ const response = await fetch(endpoint, {
537
+ method: "GET",
538
+ headers: {
539
+ authorization: `Bearer ${token}`
540
+ },
541
+ // Short timeout for validation
542
+ signal: AbortSignal.timeout(5e3)
543
+ });
544
+ if (response.status === 401) {
545
+ return false;
546
+ }
547
+ if (!response.ok) {
548
+ throw new Error(`Session validation failed with status ${response.status}`);
552
549
  }
550
+ return true;
553
551
  }
554
552
  async function deleteSessionCookie() {
555
553
  const { cookies: cookies2 } = await import('next/headers');