@chaja/sdk-core 0.2.0 → 0.2.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.
package/dist/index.d.mts CHANGED
@@ -125,7 +125,8 @@ interface QueueOptions {
125
125
  schedule: (callback: () => void, delayMs: number) => unknown;
126
126
  cancel: (handle: unknown) => void;
127
127
  /**
128
- * Called with envelopes that exhausted their retries on network failures (Node persists them to disk).
128
+ * Called with envelopes that exhausted their retries on network failures or server back-pressure (429, 5xx), so a long
129
+ * outage or a restarting server does not lose them (Node persists them to disk). Permanent rejections (4xx) are not passed.
129
130
  */
130
131
  onUndeliverable?: (body: string) => void;
131
132
  debug?: (event: string, fields: Record<string, unknown>) => void;
@@ -375,7 +376,7 @@ export declare function parseStack(stack: string | undefined): Frame[];
375
376
  export declare function exceptionsFrom(error: unknown, mechanism: Mechanism): Exception[];
376
377
  //#endregion
377
378
  //#region src/index.d.ts
378
- export declare const SDK_VERSION = "0.2.0";
379
+ export declare const SDK_VERSION = "0.2.1";
379
380
  /**
380
381
  * Parse a `Retry-After` header given in seconds or as an HTTP date.
381
382
  *
package/dist/index.mjs CHANGED
@@ -201,7 +201,7 @@ function createQueue(options) {
201
201
  items: batch.length
202
202
  });
203
203
  failures = 0;
204
- if (result.status === 0) options.onUndeliverable?.(body);
204
+ options.onUndeliverable?.(body);
205
205
  return;
206
206
  }
207
207
  pending.unshift(...batch);
@@ -563,7 +563,7 @@ function createClient(options, platform) {
563
563
  }
564
564
  //#endregion
565
565
  //#region src/index.ts
566
- const SDK_VERSION = "0.2.0";
566
+ const SDK_VERSION = "0.2.1";
567
567
  /**
568
568
  * Parse a `Retry-After` header given in seconds or as an HTTP date.
569
569
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chaja/sdk-core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared client for the Chajá JavaScript SDKs: capture, scrubbing, sampling, batching and retries.",
5
5
  "keywords": [
6
6
  "chaja",