@absolutejs/voice 0.0.22-beta.425 → 0.0.22-beta.427

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 +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25054,8 +25054,7 @@ var resolveSessions2 = async (options) => {
25054
25054
  if (!options.store) {
25055
25055
  return [];
25056
25056
  }
25057
- const summaries = await options.store.list();
25058
- const ids = options.sessionIds ?? summaries.map((summary) => summary.id);
25057
+ const ids = options.sessionIds ?? (await options.store.list()).map((summary) => summary.id);
25059
25058
  const hydrated = await Promise.all(ids.slice(0, options.limit ?? 25).map((id) => options.store?.get(id)));
25060
25059
  const sessions = [];
25061
25060
  for (const session of hydrated) {
@@ -28796,10 +28795,13 @@ var writeRecentJsonFileIndex = async (directory, files) => {
28796
28795
  await mkdir3(directory, {
28797
28796
  recursive: true
28798
28797
  });
28799
- await writeFile(recentJsonFileIndexPath(directory), JSON.stringify({
28798
+ const path = recentJsonFileIndexPath(directory);
28799
+ const tempPath = `${path}.${crypto.randomUUID()}.tmp`;
28800
+ await writeFile(tempPath, JSON.stringify({
28800
28801
  files: sortRecentJsonFileIndexEntries(files).slice(0, 5000),
28801
28802
  version: 1
28802
28803
  }));
28804
+ await rename(tempPath, path);
28803
28805
  };
28804
28806
  var rebuildRecentJsonFileIndex = async (directory) => {
28805
28807
  const files = await listJsonFiles(directory);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.425",
3
+ "version": "0.0.22-beta.427",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",