@pisell/core 1.1.2 → 1.1.3

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.
@@ -144,7 +144,7 @@ var IndexDBManager = /*#__PURE__*/function () {
144
144
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
145
145
  while (1) switch (_context2.prev = _context2.next) {
146
146
  case 0:
147
- log = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : true;
147
+ log = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : false;
148
148
  if (this.useIndexDB) {
149
149
  _context2.next = 5;
150
150
  break;
@@ -319,7 +319,7 @@ var IndexDBManager = /*#__PURE__*/function () {
319
319
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
320
320
  while (1) switch (_context4.prev = _context4.next) {
321
321
  case 0:
322
- log = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : true;
322
+ log = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : false;
323
323
  uuid = "[ IndexDB ] GET: - ".concat(storeName, " - ").concat(key, " - ").concat(dayjs().valueOf());
324
324
  if (log) {
325
325
  this.app.logger.addLog({
@@ -461,7 +461,7 @@ var IndexDBManager = /*#__PURE__*/function () {
461
461
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
462
462
  while (1) switch (_context5.prev = _context5.next) {
463
463
  case 0:
464
- log = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : true;
464
+ log = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : false;
465
465
  if (this.useIndexDB) {
466
466
  _context5.next = 5;
467
467
  break;
@@ -110,7 +110,7 @@ var IndexDBManager = class _IndexDBManager {
110
110
  * @returns {Promise<T>} 添加的数据
111
111
  * @template T
112
112
  */
113
- async add(storeName, data, log = true) {
113
+ async add(storeName, data, log = false) {
114
114
  var _a;
115
115
  if (!this.useIndexDB) {
116
116
  const key = this.getStorageKey(storeName, data[((_a = this.stores.find((s) => s.name === storeName)) == null ? void 0 : _a.keyPath) || "id"]);
@@ -217,7 +217,7 @@ var IndexDBManager = class _IndexDBManager {
217
217
  * @returns {Promise<T|null>} 获取的数据,不存在则返回 null
218
218
  * @template T
219
219
  */
220
- async get(storeName, key, log = true) {
220
+ async get(storeName, key, log = false) {
221
221
  const uuid = `[ IndexDB ] GET: - ${storeName} - ${key} - ${(0, import_dayjs.default)().valueOf()}`;
222
222
  if (log) {
223
223
  this.app.logger.addLog({
@@ -315,7 +315,7 @@ var IndexDBManager = class _IndexDBManager {
315
315
  * @returns {Promise<T>} 更新后的数据
316
316
  * @template T
317
317
  */
318
- async update(storeName, data, log = true) {
318
+ async update(storeName, data, log = false) {
319
319
  var _a;
320
320
  if (!this.useIndexDB) {
321
321
  const key = this.getStorageKey(storeName, data[((_a = this.stores.find((s) => s.name === storeName)) == null ? void 0 : _a.keyPath) || "id"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",