@bagelink/sdk 0.0.978 → 0.0.982
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/bin/utils.ts +0 -4
- package/dist/index.cjs +1 -3
- package/dist/index.mjs +1 -3
- package/package.json +1 -1
- package/src/index.ts +1 -3
package/bin/utils.ts
CHANGED
|
@@ -9,10 +9,6 @@ import { loadEnv } from 'vite'
|
|
|
9
9
|
const cwd = proc.cwd()
|
|
10
10
|
const env = loadEnv('', cwd)
|
|
11
11
|
|
|
12
|
-
if (!env.VITE_BAGEL_BASE_URL) {
|
|
13
|
-
throw new Error('VITE_BAGEL_BASE_URL is not defined')
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
const [_, __, dirFlag, withAuthArg] = proc.argv as Partial<string[]>
|
|
17
13
|
|
|
18
14
|
const withAuth = withAuthArg === '--auth'
|
package/dist/index.cjs
CHANGED
|
@@ -457,9 +457,7 @@ class Bagel {
|
|
|
457
457
|
__publicField(this, "auth", new BagelAuth(this));
|
|
458
458
|
this.host = host?.replace(/\/$/, "");
|
|
459
459
|
if (!this.host) {
|
|
460
|
-
|
|
461
|
-
"you probably need to set VITE_BAGEL_BASE_URL in the .env file"
|
|
462
|
-
);
|
|
460
|
+
return this;
|
|
463
461
|
}
|
|
464
462
|
axios.defaults.baseURL = this.host;
|
|
465
463
|
this.onError = onError;
|
package/dist/index.mjs
CHANGED
|
@@ -451,9 +451,7 @@ class Bagel {
|
|
|
451
451
|
__publicField(this, "auth", new BagelAuth(this));
|
|
452
452
|
this.host = host?.replace(/\/$/, "");
|
|
453
453
|
if (!this.host) {
|
|
454
|
-
|
|
455
|
-
"you probably need to set VITE_BAGEL_BASE_URL in the .env file"
|
|
456
|
-
);
|
|
454
|
+
return this;
|
|
457
455
|
}
|
|
458
456
|
axios.defaults.baseURL = this.host;
|
|
459
457
|
this.onError = onError;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -195,9 +195,7 @@ export class Bagel {
|
|
|
195
195
|
constructor({ host, onError }: { [key: string]: any }) {
|
|
196
196
|
this.host = host?.replace(/\/$/, '')
|
|
197
197
|
if (!this.host) {
|
|
198
|
-
|
|
199
|
-
'you probably need to set VITE_BAGEL_BASE_URL in the .env file',
|
|
200
|
-
)
|
|
198
|
+
return this
|
|
201
199
|
}
|
|
202
200
|
axios.defaults.baseURL = this.host
|
|
203
201
|
this.onError = onError
|