@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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  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
- this.fetchImpl = options.fetch || globalThis.fetch;
277
- if (typeof this.fetchImpl !== 'function') {
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurelo_npm/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Aurelo API-key SDK with stable client identity and backend-driven session rotation.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",