@pisell/core 1.0.57 → 1.0.59

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.
@@ -331,7 +331,7 @@ var IndexDBManager = /*#__PURE__*/function () {
331
331
  _context3.prev = 9;
332
332
  case 10:
333
333
  if (!(buffer.length > 0)) {
334
- _context3.next = 33;
334
+ _context3.next = 38;
335
335
  break;
336
336
  }
337
337
  batch = buffer.splice(0, this.debouncedBatchSize);
@@ -340,55 +340,62 @@ var IndexDBManager = /*#__PURE__*/function () {
340
340
  _iterator.s();
341
341
  case 15:
342
342
  if ((_step = _iterator.n()).done) {
343
- _context3.next = 23;
343
+ _context3.next = 28;
344
344
  break;
345
345
  }
346
346
  item = _step.value;
347
347
  _context3.next = 19;
348
348
  return mockPromise({}, this.debouncedDelay);
349
349
  case 19:
350
- _context3.next = 21;
350
+ _context3.prev = 19;
351
+ _context3.next = 22;
351
352
  return this.add(storeName, item);
352
- case 21:
353
- _context3.next = 15;
353
+ case 22:
354
+ _context3.next = 26;
354
355
  break;
355
- case 23:
356
- _context3.next = 28;
356
+ case 24:
357
+ _context3.prev = 24;
358
+ _context3.t0 = _context3["catch"](19);
359
+ case 26:
360
+ _context3.next = 15;
357
361
  break;
358
- case 25:
359
- _context3.prev = 25;
360
- _context3.t0 = _context3["catch"](13);
361
- _iterator.e(_context3.t0);
362
362
  case 28:
363
- _context3.prev = 28;
363
+ _context3.next = 33;
364
+ break;
365
+ case 30:
366
+ _context3.prev = 30;
367
+ _context3.t1 = _context3["catch"](13);
368
+ _iterator.e(_context3.t1);
369
+ case 33:
370
+ _context3.prev = 33;
364
371
  _iterator.f();
365
- return _context3.finish(28);
366
- case 31:
372
+ return _context3.finish(33);
373
+ case 36:
367
374
  _context3.next = 10;
368
375
  break;
369
- case 33:
370
- _context3.next = 38;
376
+ case 38:
377
+ _context3.next = 43;
371
378
  break;
372
- case 35:
373
- _context3.prev = 35;
374
- _context3.t1 = _context3["catch"](9);
379
+ case 40:
380
+ _context3.prev = 40;
381
+ _context3.t2 = _context3["catch"](9);
375
382
  this.app.logger.addLog({
376
383
  type: 'error',
377
384
  title: uuid,
378
385
  metadata: {
379
386
  msg: '防抖合并 add 失败',
380
- error: _context3.t1.message
387
+ error: _context3.t2.message
381
388
  }
382
389
  });
383
- case 38:
384
- _context3.prev = 38;
390
+ case 43:
391
+ _context3.prev = 43;
385
392
  this.debouncedFlushing.delete(storeName);
386
- return _context3.finish(38);
387
- case 41:
393
+ return _context3.finish(43);
394
+ case 46:
388
395
  case "end":
389
396
  return _context3.stop();
390
397
  }
391
- }, _callee3, this, [[9, 35, 38, 41], [13, 25, 28, 31]]);
398
+ }, _callee3, this, [[9, 40, 43, 46], [13, 30, 33, 36], [19, 24]]);
392
399
  }));
393
400
  function flushDebouncedAdd(_x) {
394
401
  return _flushDebouncedAdd.apply(this, arguments);
@@ -243,7 +243,10 @@ var IndexDBManager = class _IndexDBManager {
243
243
  const batch = buffer.splice(0, this.debouncedBatchSize);
244
244
  for (const item of batch) {
245
245
  await mockPromise({}, this.debouncedDelay);
246
- await this.add(storeName, item);
246
+ try {
247
+ await this.add(storeName, item);
248
+ } catch (err) {
249
+ }
247
250
  }
248
251
  }
249
252
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",