@aurelo_npm/sdk 0.1.0 → 0.1.1
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.
Potentially problematic release.
This version of @aurelo_npm/sdk might be problematic. Click here for more details.
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -273,10 +273,11 @@ export class AureloSDK {
|
|
|
273
273
|
this.apiKey = String(options.apiKey).trim();
|
|
274
274
|
this.baseUrl = normalizeBaseUrl(options.baseUrl || 'https://aurelo.tech');
|
|
275
275
|
this.queueUrl = String(options.queueUrl || defaultQueueUrl(this.baseUrl)).trim();
|
|
276
|
-
|
|
277
|
-
if (typeof
|
|
276
|
+
const resolvedFetch = options.fetch || globalThis.fetch;
|
|
277
|
+
if (typeof resolvedFetch !== 'function') {
|
|
278
278
|
throw new Error('AureloSDK requires fetch. Pass options.fetch in this runtime.');
|
|
279
279
|
}
|
|
280
|
+
this.fetchImpl = resolvedFetch.bind(globalThis);
|
|
280
281
|
this.storage = options.storage || createDefaultStorage();
|
|
281
282
|
if (options.clientId) {
|
|
282
283
|
this.clientIdValue = normalizeClientId(options.clientId);
|