@absolutejs/voice 0.0.22-beta.428 → 0.0.22-beta.429

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 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28816,7 +28816,7 @@ var isDefined = (value) => value !== undefined;
28816
28816
  var readRecentJsonFiles = async (directory, limit) => {
28817
28817
  const files = await listRecentJsonFiles(directory, limit);
28818
28818
  const missingPaths = new Set;
28819
- const records = await Promise.all(files.map(async (file) => {
28819
+ const readRecentFile = async (file) => {
28820
28820
  try {
28821
28821
  return await readJsonFile(file);
28822
28822
  } catch (error) {
@@ -28826,7 +28826,8 @@ var readRecentJsonFiles = async (directory, limit) => {
28826
28826
  }
28827
28827
  throw error;
28828
28828
  }
28829
- }));
28829
+ };
28830
+ const records = await Promise.all(files.map((file) => readRecentFile(file)));
28830
28831
  if (missingPaths.size > 0) {
28831
28832
  await writeRecentJsonFileIndex(directory, (await readRecentJsonFileIndex(directory)).filter((entry) => !missingPaths.has(entry.path)));
28832
28833
  }
@@ -28835,8 +28836,8 @@ var readRecentJsonFiles = async (directory, limit) => {
28835
28836
  return existingRecords;
28836
28837
  }
28837
28838
  const rebuiltFiles = (await rebuildRecentJsonFileIndex(directory)).slice(0, limit).map((entry) => entry.path);
28838
- const rebuiltRecords = await Promise.all(rebuiltFiles.map((file) => readJsonFile(file)));
28839
- return rebuiltRecords;
28839
+ const rebuiltRecords = await Promise.all(rebuiltFiles.map((file) => readRecentFile(file)));
28840
+ return rebuiltRecords.filter(isDefined);
28840
28841
  };
28841
28842
  var shouldUseRecentReadWindow = (filter) => filter.readWindow === "recent" && typeof filter.limit === "number" && filter.limit >= 0;
28842
28843
  var omitReadWindow = (filter) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.428",
3
+ "version": "0.0.22-beta.429",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",