@lvce-editor/output-view 2.21.1 → 2.22.0

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.
@@ -2105,10 +2105,13 @@ const getLogsDir = async () => {
2105
2105
  };
2106
2106
 
2107
2107
  const legacyWindowLogFileName = 'log-window.txt';
2108
+ const isWindowLogFileName = name => {
2109
+ return /^\d+\.txt$/.test(name) || /^\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z\.txt$/.test(name);
2110
+ };
2108
2111
  const getLatestLogFileName = dirents => {
2109
2112
  let latest = '';
2110
2113
  for (const dirent of dirents) {
2111
- if (dirent.type === 1 && /^\d+\.txt$/.test(dirent.name) && dirent.name > latest) {
2114
+ if (dirent.type === 1 && isWindowLogFileName(dirent.name) && dirent.name > latest) {
2112
2115
  latest = dirent.name;
2113
2116
  }
2114
2117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/output-view",
3
- "version": "2.21.1",
3
+ "version": "2.22.0",
4
4
  "description": "Output View Worker",
5
5
  "repository": {
6
6
  "type": "git",