@acosmi/sdk-ts 2.19.5 → 2.19.6
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/CHANGELOG.md +6 -0
- package/README.md +7 -2
- package/dist/browser/index.mjs +10 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node/adapters/anthropic.cjs.map +1 -1
- package/dist/node/adapters/anthropic.d.cts +1 -1
- package/dist/node/adapters/anthropic.d.ts +1 -1
- package/dist/node/adapters/anthropic.mjs.map +1 -1
- package/dist/node/adapters/openai.cjs.map +1 -1
- package/dist/node/adapters/openai.d.cts +2 -2
- package/dist/node/adapters/openai.d.ts +2 -2
- package/dist/node/adapters/openai.mjs.map +1 -1
- package/dist/node/{format-DWA12pVT.d.cts → format-CKpXSSqY.d.cts} +22 -0
- package/dist/node/{format-DWA12pVT.d.ts → format-CKpXSSqY.d.ts} +22 -0
- package/dist/node/index.cjs +10 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +4 -4
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.mjs +10 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{openai-Cuu_DPxM.d.cts → openai-ByUO-cSR.d.cts} +1 -1
- package/dist/node/{openai-DsbJUOOW.d.ts → openai-CH0wnJXv.d.ts} +1 -1
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -2254,7 +2254,8 @@ ${Date.now()}
|
|
|
2254
2254
|
release = async () => {
|
|
2255
2255
|
try {
|
|
2256
2256
|
await fs.unlink(lockPath);
|
|
2257
|
-
} catch {
|
|
2257
|
+
} catch (e) {
|
|
2258
|
+
warnLockCleanupFailed("release", lockPath, e);
|
|
2258
2259
|
}
|
|
2259
2260
|
};
|
|
2260
2261
|
break;
|
|
@@ -2271,7 +2272,8 @@ ${Date.now()}
|
|
|
2271
2272
|
if (stale) {
|
|
2272
2273
|
try {
|
|
2273
2274
|
await fs.unlink(lockPath);
|
|
2274
|
-
} catch {
|
|
2275
|
+
} catch (e2) {
|
|
2276
|
+
warnLockCleanupFailed("stale-break", lockPath, e2);
|
|
2275
2277
|
}
|
|
2276
2278
|
continue;
|
|
2277
2279
|
}
|
|
@@ -2374,6 +2376,12 @@ ${Date.now()}
|
|
|
2374
2376
|
});
|
|
2375
2377
|
}
|
|
2376
2378
|
};
|
|
2379
|
+
function warnLockCleanupFailed(stage, lockPath, e) {
|
|
2380
|
+
if (isNotExistError(e)) return;
|
|
2381
|
+
console.warn(
|
|
2382
|
+
`[acosmi-sdk] warning: unlink token file lock (${stage}) failed: ${lockPath}: ${e instanceof Error ? e.message : String(e)}`
|
|
2383
|
+
);
|
|
2384
|
+
}
|
|
2377
2385
|
function isNotExistError(e) {
|
|
2378
2386
|
if (typeof e === "object" && e !== null && "code" in e) {
|
|
2379
2387
|
return e.code === "ENOENT";
|