@dotbots-boutique/auth-sdk 1.0.7 → 1.0.8

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/cjs/index.js CHANGED
@@ -303,8 +303,14 @@ class DotBotsAuth {
303
303
  }
304
304
  async fetch(url, options) {
305
305
  this.assertInitialized();
306
- const baseUrl = this.proxyConfigManager.getBaseUrl();
307
- const fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
306
+ let fullUrl;
307
+ if (url.startsWith('https://') || url.startsWith('http://')) {
308
+ fullUrl = url;
309
+ }
310
+ else {
311
+ const baseUrl = this.proxyConfigManager.getBaseUrl();
312
+ fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
313
+ }
308
314
  let response = await this.buildRequest(fullUrl, options);
309
315
  // On 401, try one refresh then retry
310
316
  if (response.status === 401) {
@@ -409,7 +415,7 @@ class DotBotsAuth {
409
415
  }
410
416
  }
411
417
  }
412
- DotBotsAuth.SDK_VERSION = '1.0.7';
418
+ DotBotsAuth.SDK_VERSION = '1.0.8';
413
419
 
414
420
  exports.DotBotsAuth = DotBotsAuth;
415
421
  exports.DotBotsAuthError = DotBotsAuthError;
package/dist/esm/index.js CHANGED
@@ -301,8 +301,14 @@ class DotBotsAuth {
301
301
  }
302
302
  async fetch(url, options) {
303
303
  this.assertInitialized();
304
- const baseUrl = this.proxyConfigManager.getBaseUrl();
305
- const fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
304
+ let fullUrl;
305
+ if (url.startsWith('https://') || url.startsWith('http://')) {
306
+ fullUrl = url;
307
+ }
308
+ else {
309
+ const baseUrl = this.proxyConfigManager.getBaseUrl();
310
+ fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
311
+ }
306
312
  let response = await this.buildRequest(fullUrl, options);
307
313
  // On 401, try one refresh then retry
308
314
  if (response.status === 401) {
@@ -407,6 +413,6 @@ class DotBotsAuth {
407
413
  }
408
414
  }
409
415
  }
410
- DotBotsAuth.SDK_VERSION = '1.0.7';
416
+ DotBotsAuth.SDK_VERSION = '1.0.8';
411
417
 
412
418
  export { DotBotsAuth, DotBotsAuthError };
@@ -8,7 +8,7 @@ export declare class DotBotsAuth {
8
8
  private readonly listeners;
9
9
  private cachedUser;
10
10
  private initialized;
11
- static readonly SDK_VERSION = "1.0.7";
11
+ static readonly SDK_VERSION = "1.0.8";
12
12
  constructor(config: DotBotsConfig);
13
13
  initialize(): Promise<void>;
14
14
  getUser(): Promise<DotBotsUser>;
@@ -301,8 +301,14 @@ class DotBotsAuth {
301
301
  }
302
302
  async fetch(url, options) {
303
303
  this.assertInitialized();
304
- const baseUrl = this.proxyConfigManager.getBaseUrl();
305
- const fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
304
+ let fullUrl;
305
+ if (url.startsWith('https://') || url.startsWith('http://')) {
306
+ fullUrl = url;
307
+ }
308
+ else {
309
+ const baseUrl = this.proxyConfigManager.getBaseUrl();
310
+ fullUrl = `${baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
311
+ }
306
312
  let response = await this.buildRequest(fullUrl, options);
307
313
  // On 401, try one refresh then retry
308
314
  if (response.status === 401) {
@@ -407,6 +413,6 @@ class DotBotsAuth {
407
413
  }
408
414
  }
409
415
  }
410
- DotBotsAuth.SDK_VERSION = '1.0.7';
416
+ DotBotsAuth.SDK_VERSION = '1.0.8';
411
417
 
412
418
  export { DotBotsAuth, DotBotsAuthError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotbots-boutique/auth-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Authentication SDK for DotBots marketplace apps",
5
5
  "license": "MIT",
6
6
  "type": "module",