@chaja/sdk-node 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.mjs +8 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -241,11 +241,17 @@ function replay(directory, transport) {
|
|
|
241
241
|
(async function resend() {
|
|
242
242
|
for (const name of readdirSync(directory).filter(isEnvelopeFile).toSorted()) {
|
|
243
243
|
const path = join(directory, name);
|
|
244
|
-
|
|
244
|
+
let body;
|
|
245
|
+
try {
|
|
246
|
+
body = readFileSync(path, "utf8");
|
|
247
|
+
} catch {
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
const result = await transport.send(body);
|
|
245
251
|
if (result.status === 0 || result.status === 429 || result.status >= 500) return;
|
|
246
252
|
rmSync(path, { force: true });
|
|
247
253
|
}
|
|
248
|
-
})();
|
|
254
|
+
})().catch(function ignore() {});
|
|
249
255
|
}
|
|
250
256
|
/**
|
|
251
257
|
* Whether a file name looks like a saved envelope.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaja/sdk-node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Chajá error tracking for Node.js: process handlers, source context, offline buffer, Express and Fetch helpers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chaja",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"tsdown": "0.23.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@chaja/sdk-core": "0.2.
|
|
41
|
+
"@chaja/sdk-core": "0.2.1"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=22"
|