@shopsbuilder/auth-sdk 1.2.1 → 1.2.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.
@@ -341,10 +341,11 @@ var SaleorAuthClient = class {
341
341
  this.onAuthRefresh?.(false);
342
342
  if (refreshErrors?.length || graphqlErrors?.length || !token) {
343
343
  console.warn("[auth-sdk] Token refresh failed:", JSON.stringify({
344
- graphqlErrors: graphqlErrors?.length ?? 0,
345
- refreshErrors: refreshErrors?.map((e) => e.message),
344
+ graphqlErrors: graphqlErrors ?? [],
345
+ refreshErrors: refreshErrors ?? [],
346
346
  hasToken: Boolean(token),
347
- httpStatus: response.status
347
+ httpStatus: response.status,
348
+ rawData: res.data ?? null
348
349
  }));
349
350
  this.tokenRefreshPromise = null;
350
351
  this.refreshTokenStorage?.clearAuthStorage();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SaleorAuthClient,
3
3
  createSaleorAuthClient
4
- } from "./chunk-OGC5TPQ2.mjs";
4
+ } from "./chunk-SLTPGWX3.mjs";
5
5
  import "./chunk-BZFBMGPG.mjs";
6
6
  import "./chunk-263DHBMK.mjs";
7
7
  import "./chunk-UDLCOX6B.mjs";
@@ -104,10 +104,11 @@ var SaleorAuthClient = class {
104
104
  this.onAuthRefresh?.(false);
105
105
  if (refreshErrors?.length || graphqlErrors?.length || !token) {
106
106
  console.warn("[auth-sdk] Token refresh failed:", JSON.stringify({
107
- graphqlErrors: graphqlErrors?.length ?? 0,
108
- refreshErrors: refreshErrors?.map((e) => e.message),
107
+ graphqlErrors: graphqlErrors ?? [],
108
+ refreshErrors: refreshErrors ?? [],
109
109
  hasToken: Boolean(token),
110
- httpStatus: response.status
110
+ httpStatus: response.status,
111
+ rawData: res.data ?? null
111
112
  }));
112
113
  this.tokenRefreshPromise = null;
113
114
  this.refreshTokenStorage?.clearAuthStorage();
package/dist/index.js CHANGED
@@ -344,10 +344,11 @@ var SaleorAuthClient = class {
344
344
  this.onAuthRefresh?.(false);
345
345
  if (refreshErrors?.length || graphqlErrors?.length || !token) {
346
346
  console.warn("[auth-sdk] Token refresh failed:", JSON.stringify({
347
- graphqlErrors: graphqlErrors?.length ?? 0,
348
- refreshErrors: refreshErrors?.map((e) => e.message),
347
+ graphqlErrors: graphqlErrors ?? [],
348
+ refreshErrors: refreshErrors ?? [],
349
349
  hasToken: Boolean(token),
350
- httpStatus: response.status
350
+ httpStatus: response.status,
351
+ rawData: res.data ?? null
351
352
  }));
352
353
  this.tokenRefreshPromise = null;
353
354
  this.refreshTokenStorage?.clearAuthStorage();
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SaleorAuthClient,
3
3
  createSaleorAuthClient
4
- } from "./chunk-OGC5TPQ2.mjs";
4
+ } from "./chunk-SLTPGWX3.mjs";
5
5
  import "./chunk-BZFBMGPG.mjs";
6
6
  import "./chunk-263DHBMK.mjs";
7
7
  import {
@@ -2,7 +2,7 @@ import {
2
2
  SaleorAuthProvider
3
3
  } from "../chunk-74GMXOK4.mjs";
4
4
  import "../chunk-NAQNA6DI.mjs";
5
- import "../chunk-OGC5TPQ2.mjs";
5
+ import "../chunk-SLTPGWX3.mjs";
6
6
  import "../chunk-BZFBMGPG.mjs";
7
7
  import "../chunk-263DHBMK.mjs";
8
8
  import "../chunk-UDLCOX6B.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  createSafeContext,
4
4
  useSaleorAuthContext
5
5
  } from "../chunk-NAQNA6DI.mjs";
6
- import "../chunk-OGC5TPQ2.mjs";
6
+ import "../chunk-SLTPGWX3.mjs";
7
7
  import "../chunk-BZFBMGPG.mjs";
8
8
  import "../chunk-263DHBMK.mjs";
9
9
  import "../chunk-UDLCOX6B.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  useSaleorExternalAuth
14
14
  } from "../chunk-Q3UFWDCC.mjs";
15
- import "../chunk-OGC5TPQ2.mjs";
15
+ import "../chunk-SLTPGWX3.mjs";
16
16
  import "../chunk-BZFBMGPG.mjs";
17
17
  import "../chunk-263DHBMK.mjs";
18
18
  import "../chunk-T35JF4IS.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopsbuilder/auth-sdk",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Auth SDK for Saleor",
5
5
  "sideEffects": false,
6
6
  "files": ["dist/", "README.md"],