@pisell/core 1.0.43 → 1.0.44

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.
@@ -73,23 +73,12 @@ var LoggerManager = /*#__PURE__*/function () {
73
73
  this.setStatus("running");
74
74
  this.initTimer();
75
75
  // 定期清理旧日志
76
- _context.next = 4;
77
- return this.cleanupOldLogs();
78
- case 4:
79
- _context.prev = 4;
80
- _context.next = 7;
81
- return this.uploadIndexDBLog();
82
- case 7:
83
- _context.next = 11;
84
- break;
85
- case 9:
86
- _context.prev = 9;
87
- _context.t0 = _context["catch"](4);
88
- case 11:
76
+ this.cleanupOldLogs();
77
+ case 3:
89
78
  case "end":
90
79
  return _context.stop();
91
80
  }
92
- }, _callee, this, [[4, 9]]);
81
+ }, _callee, this);
93
82
  }));
94
83
  function init() {
95
84
  return _init.apply(this, arguments);
@@ -591,17 +580,20 @@ var LoggerManager = /*#__PURE__*/function () {
591
580
  if (filesToDelete.length > 0) {
592
581
  console.log("-------- \u5171\u6E05\u7406 ".concat(filesToDelete.length, " \u4E2A\u65E7\u65E5\u5FD7\u6587\u4EF6"));
593
582
  }
594
- _context7.next = 33;
583
+
584
+ // 清理完成后,将IndexDB中的日志上传到AWS
585
+ this.uploadIndexDBLog();
586
+ _context7.next = 34;
595
587
  break;
596
- case 30:
597
- _context7.prev = 30;
588
+ case 31:
589
+ _context7.prev = 31;
598
590
  _context7.t1 = _context7["catch"](2);
599
591
  console.error("清理旧日志失败:", _context7.t1);
600
- case 33:
592
+ case 34:
601
593
  case "end":
602
594
  return _context7.stop();
603
595
  }
604
- }, _callee7, this, [[2, 30], [10, 21, 24, 27]]);
596
+ }, _callee7, this, [[2, 31], [10, 21, 24, 27]]);
605
597
  }));
606
598
  function cleanupOldLogs() {
607
599
  return _cleanupOldLogs.apply(this, arguments);
@@ -70,11 +70,7 @@ var LoggerManager = class {
70
70
  async init() {
71
71
  this.setStatus("running");
72
72
  this.initTimer();
73
- await this.cleanupOldLogs();
74
- try {
75
- await this.uploadIndexDBLog();
76
- } catch (error) {
77
- }
73
+ this.cleanupOldLogs();
78
74
  }
79
75
  /**
80
76
  * 初始化 IndexDB
@@ -327,6 +323,7 @@ var LoggerManager = class {
327
323
  if (filesToDelete.length > 0) {
328
324
  console.log(`-------- 共清理 ${filesToDelete.length} 个旧日志文件`);
329
325
  }
326
+ this.uploadIndexDBLog();
330
327
  } catch (error) {
331
328
  console.error("清理旧日志失败:", error);
332
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",