viberadar 0.3.228 → 0.3.229

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAiBlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AA0vED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAssH1G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAiBlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AA0vED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAutH1G"}
@@ -2594,9 +2594,29 @@ function startServer({ data: initialData, port, projectRoot }) {
2594
2594
  if (!latest)
2595
2595
  return;
2596
2596
  try {
2597
- const record = JSON.parse(fs.readFileSync(path.join(loadRunsDir, `${latest.runId}.json`), 'utf-8'));
2598
- if (record && typeof record === 'object')
2597
+ const runPath = path.join(loadRunsDir, `${latest.runId}.json`);
2598
+ const parsed = JSON.parse(fs.readFileSync(runPath, 'utf-8'));
2599
+ if (parsed && typeof parsed === 'object') {
2600
+ const { record, changed } = enrichLoadRunRecord(parsed);
2599
2601
  loadState = record;
2602
+ if (changed) {
2603
+ try {
2604
+ fs.writeFileSync(runPath, JSON.stringify(record, null, 2), 'utf-8');
2605
+ }
2606
+ catch { }
2607
+ try {
2608
+ const index = readLoadRunIndex();
2609
+ const item = index.find((i) => i.runId === latest.runId);
2610
+ if (item) {
2611
+ item.summary = record.summary;
2612
+ item.status = record.status;
2613
+ item.endTime = record.endTime;
2614
+ writeLoadRunIndex(index);
2615
+ }
2616
+ }
2617
+ catch { }
2618
+ }
2619
+ }
2600
2620
  }
2601
2621
  catch { }
2602
2622
  }