@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/dist/index.mjs CHANGED
@@ -2252,7 +2252,8 @@ ${Date.now()}
2252
2252
  release = async () => {
2253
2253
  try {
2254
2254
  await fs.unlink(lockPath);
2255
- } catch {
2255
+ } catch (e) {
2256
+ warnLockCleanupFailed("release", lockPath, e);
2256
2257
  }
2257
2258
  };
2258
2259
  break;
@@ -2269,7 +2270,8 @@ ${Date.now()}
2269
2270
  if (stale) {
2270
2271
  try {
2271
2272
  await fs.unlink(lockPath);
2272
- } catch {
2273
+ } catch (e2) {
2274
+ warnLockCleanupFailed("stale-break", lockPath, e2);
2273
2275
  }
2274
2276
  continue;
2275
2277
  }
@@ -2372,6 +2374,12 @@ ${Date.now()}
2372
2374
  });
2373
2375
  }
2374
2376
  };
2377
+ function warnLockCleanupFailed(stage, lockPath, e) {
2378
+ if (isNotExistError(e)) return;
2379
+ console.warn(
2380
+ `[acosmi-sdk] warning: unlink token file lock (${stage}) failed: ${lockPath}: ${e instanceof Error ? e.message : String(e)}`
2381
+ );
2382
+ }
2375
2383
  function isNotExistError(e) {
2376
2384
  if (typeof e === "object" && e !== null && "code" in e) {
2377
2385
  return e.code === "ENOENT";