@eventra_dev/eventra-cli 0.1.14 → 0.1.15

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.
@@ -52,20 +52,19 @@ async function watch() {
52
52
  locked = true;
53
53
  const batch = [...queued];
54
54
  queued.clear();
55
- const touched = new Set();
56
55
  for (const file of batch) {
57
56
  try {
58
57
  const abs = path_1.default.resolve(file);
59
58
  const raw = await promises_1.default.readFile(abs, "utf-8");
60
59
  const { content, virtualFile } = (0, processFile_1.processFile)(abs, raw);
61
60
  engine["ts"].updateFile(virtualFile, content);
62
- touched.add(virtualFile);
63
61
  }
64
62
  catch {
65
63
  console.log(chalk_1.default.gray(`skip: ${file}`));
66
64
  }
67
65
  }
68
- for (const file of engine["ts"]["fileNames"]) {
66
+ const allFiles = [...engine["ts"]["fileNames"]];
67
+ for (const file of allFiles) {
69
68
  const content = engine["ts"].getFileContent(file);
70
69
  if (!content)
71
70
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventra_dev/eventra-cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Eventra CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -63,25 +63,23 @@ export async function watch() {
63
63
  const batch = [...queued];
64
64
  queued.clear();
65
65
 
66
- const touched = new Set<string>();
67
-
68
66
  for (const file of batch) {
69
67
  try {
70
68
  const abs = path.resolve(file);
71
-
72
69
  const raw = await fs.readFile(abs, "utf-8");
70
+
73
71
  const { content, virtualFile } = processFile(abs, raw);
74
72
 
75
73
  engine["ts"].updateFile(virtualFile, content);
76
74
 
77
- touched.add(virtualFile);
78
-
79
75
  } catch {
80
76
  console.log(chalk.gray(`skip: ${file}`));
81
77
  }
82
78
  }
83
79
 
84
- for (const file of engine["ts"]["fileNames"]) {
80
+ const allFiles = [...engine["ts"]["fileNames"]];
81
+
82
+ for (const file of allFiles) {
85
83
  const content = engine["ts"].getFileContent(file);
86
84
  if (!content) continue;
87
85