@bagelink/sdk 0.0.407 → 0.0.409
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 +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -437,9 +437,9 @@ class Bagel {
|
|
|
437
437
|
__publicField(this, "onError");
|
|
438
438
|
__publicField(this, "read_table", null);
|
|
439
439
|
__publicField(this, "auth", new BagelAuth(this));
|
|
440
|
+
this.host = host?.replace(/\/$/, "");
|
|
440
441
|
if (!this.host)
|
|
441
442
|
throw new Error("you probably need to set VITE_BAGEL_BASE_URL in the .env file");
|
|
442
|
-
this.host = host.replace(/\/$/, "");
|
|
443
443
|
axios.defaults.baseURL = this.host;
|
|
444
444
|
this.onError = onError;
|
|
445
445
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -431,9 +431,9 @@ class Bagel {
|
|
|
431
431
|
__publicField(this, "onError");
|
|
432
432
|
__publicField(this, "read_table", null);
|
|
433
433
|
__publicField(this, "auth", new BagelAuth(this));
|
|
434
|
+
this.host = host?.replace(/\/$/, "");
|
|
434
435
|
if (!this.host)
|
|
435
436
|
throw new Error("you probably need to set VITE_BAGEL_BASE_URL in the .env file");
|
|
436
|
-
this.host = host.replace(/\/$/, "");
|
|
437
437
|
axios.defaults.baseURL = this.host;
|
|
438
438
|
this.onError = onError;
|
|
439
439
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -197,8 +197,8 @@ export class Bagel {
|
|
|
197
197
|
onError?: (err: any) => void;
|
|
198
198
|
|
|
199
199
|
constructor({ host, onError }: Record<string, any>) {
|
|
200
|
+
this.host = host?.replace(/\/$/, '');
|
|
200
201
|
if (!this.host) throw new Error('you probably need to set VITE_BAGEL_BASE_URL in the .env file');
|
|
201
|
-
this.host = host.replace(/\/$/, '');
|
|
202
202
|
axios.defaults.baseURL = this.host;
|
|
203
203
|
this.onError = onError;
|
|
204
204
|
}
|