@picgo/store 2.0.0 → 2.0.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.
@@ -1,22 +1,22 @@
1
1
  TN:
2
2
  SF:/home/runner/work/store/store/src/DBStore.ts
3
- FN:16,(anonymous_0)
4
- FN:27,(anonymous_1)
5
- FN:31,(anonymous_2)
6
- FN:39,(anonymous_3)
7
- FN:59,(anonymous_4)
8
- FN:63,(anonymous_5)
9
- FN:67,(anonymous_6)
10
- FN:71,(anonymous_7)
11
- FN:79,(anonymous_8)
12
- FN:96,(anonymous_9)
13
- FN:105,(anonymous_10)
14
- FN:109,(anonymous_11)
15
- FN:118,(anonymous_12)
16
- FN:119,(anonymous_13)
17
- FN:122,(anonymous_14)
18
- FN:125,(anonymous_15)
19
- FN:133,(anonymous_16)
3
+ FN:17,(anonymous_0)
4
+ FN:28,(anonymous_1)
5
+ FN:32,(anonymous_2)
6
+ FN:40,(anonymous_3)
7
+ FN:60,(anonymous_4)
8
+ FN:64,(anonymous_5)
9
+ FN:68,(anonymous_6)
10
+ FN:72,(anonymous_7)
11
+ FN:80,(anonymous_8)
12
+ FN:97,(anonymous_9)
13
+ FN:106,(anonymous_10)
14
+ FN:110,(anonymous_11)
15
+ FN:119,(anonymous_12)
16
+ FN:120,(anonymous_13)
17
+ FN:123,(anonymous_14)
18
+ FN:126,(anonymous_15)
19
+ FN:134,(anonymous_16)
20
20
  FNF:17
21
21
  FNH:17
22
22
  FNDA:18,(anonymous_0)
@@ -36,120 +36,114 @@ FNDA:4,(anonymous_13)
36
36
  FNDA:1,(anonymous_14)
37
37
  FNDA:1,(anonymous_15)
38
38
  FNDA:1,(anonymous_16)
39
- DA:4,1
40
39
  DA:5,1
41
40
  DA:6,1
42
41
  DA:7,1
43
- DA:13,18
42
+ DA:8,1
44
43
  DA:14,18
45
- DA:18,18
46
- DA:19,2
47
- DA:21,16
44
+ DA:15,18
45
+ DA:19,18
46
+ DA:20,2
48
47
  DA:22,16
49
48
  DA:23,16
50
49
  DA:24,16
51
- DA:28,1
52
- DA:32,56
53
- DA:33,16
50
+ DA:25,16
51
+ DA:29,1
52
+ DA:33,56
54
53
  DA:34,16
55
- DA:36,56
56
- DA:40,18
54
+ DA:35,16
55
+ DA:37,56
57
56
  DA:41,18
58
57
  DA:42,18
59
- DA:43,6
60
- DA:44,1
61
- DA:46,6
62
- DA:47,1
63
- DA:49,6
64
- DA:50,1
65
- DA:53,18
66
- DA:60,33
67
- DA:64,12
68
- DA:68,13
69
- DA:72,8
58
+ DA:43,18
59
+ DA:44,6
60
+ DA:45,1
61
+ DA:47,6
62
+ DA:48,1
63
+ DA:50,6
64
+ DA:51,1
65
+ DA:54,18
66
+ DA:61,33
67
+ DA:65,12
68
+ DA:69,13
70
69
  DA:73,8
71
70
  DA:74,8
72
71
  DA:75,8
73
- DA:79,1
74
- DA:80,9
72
+ DA:76,8
73
+ DA:80,1
75
74
  DA:81,9
76
- DA:83,9
77
- DA:84,1
75
+ DA:82,9
76
+ DA:84,9
78
77
  DA:85,1
79
- DA:87,8
78
+ DA:86,1
80
79
  DA:88,8
81
80
  DA:89,8
82
- DA:90,3
83
- DA:92,8
84
- DA:96,1
85
- DA:97,2
86
- DA:98,5
87
- DA:100,2
81
+ DA:90,8
82
+ DA:91,3
83
+ DA:93,8
84
+ DA:97,1
85
+ DA:98,2
86
+ DA:99,5
88
87
  DA:101,2
89
- DA:105,1
90
- DA:106,3
88
+ DA:102,2
89
+ DA:106,1
91
90
  DA:107,3
92
91
  DA:108,3
93
- DA:109,5
94
- DA:110,2
92
+ DA:109,3
93
+ DA:110,5
95
94
  DA:111,2
96
95
  DA:112,2
97
- DA:114,1
98
- DA:119,4
99
- DA:123,1
96
+ DA:113,2
97
+ DA:115,1
98
+ DA:120,4
100
99
  DA:124,1
101
100
  DA:125,1
102
101
  DA:126,1
103
102
  DA:127,1
104
103
  DA:128,1
105
104
  DA:129,1
106
- DA:134,1
105
+ DA:130,1
107
106
  DA:135,1
108
107
  DA:136,1
109
108
  DA:137,1
110
- DA:142,1
109
+ DA:138,1
110
+ DA:143,1
111
111
  LF:72
112
112
  LH:72
113
- BRDA:18,0,0,2
114
- BRDA:18,0,1,16
115
- BRDA:18,1,0,18
116
- BRDA:18,1,1,17
117
- BRDA:31,2,0,56
118
- BRDA:32,3,0,16
119
- BRDA:32,3,1,40
120
- BRDA:32,4,0,56
121
- BRDA:32,4,1,56
122
- BRDA:42,5,0,6
123
- BRDA:42,5,1,12
124
- BRDA:43,6,0,1
125
- BRDA:43,6,1,5
126
- BRDA:46,7,0,1
127
- BRDA:46,7,1,5
128
- BRDA:46,8,0,6
129
- BRDA:46,8,1,2
130
- BRDA:49,9,0,1
131
- BRDA:49,9,1,5
132
- BRDA:49,10,0,6
133
- BRDA:49,10,1,2
134
- BRDA:60,11,0,0
135
- BRDA:60,11,1,33
136
- BRDA:60,12,0,33
137
- BRDA:60,12,1,33
138
- BRDA:68,13,0,0
139
- BRDA:68,13,1,13
140
- BRDA:68,14,0,13
141
- BRDA:68,14,1,13
142
- BRDA:79,15,0,4
143
- BRDA:83,16,0,1
144
- BRDA:83,16,1,8
145
- BRDA:89,17,0,3
146
- BRDA:89,17,1,5
147
- BRDA:108,18,0,2
148
- BRDA:108,18,1,1
149
- BRDA:126,19,0,1
150
- BRDA:126,19,1,0
151
- BRF:38
152
- BRH:35
113
+ BRDA:19,0,0,2
114
+ BRDA:19,0,1,16
115
+ BRDA:19,1,0,18
116
+ BRDA:19,1,1,17
117
+ BRDA:32,2,0,56
118
+ BRDA:33,3,0,16
119
+ BRDA:33,3,1,40
120
+ BRDA:33,4,0,56
121
+ BRDA:33,4,1,56
122
+ BRDA:43,5,0,6
123
+ BRDA:43,5,1,12
124
+ BRDA:44,6,0,1
125
+ BRDA:44,6,1,5
126
+ BRDA:47,7,0,1
127
+ BRDA:47,7,1,5
128
+ BRDA:47,8,0,6
129
+ BRDA:47,8,1,2
130
+ BRDA:50,9,0,1
131
+ BRDA:50,9,1,5
132
+ BRDA:50,10,0,6
133
+ BRDA:50,10,1,2
134
+ BRDA:80,11,0,4
135
+ BRDA:84,12,0,1
136
+ BRDA:84,12,1,8
137
+ BRDA:90,13,0,3
138
+ BRDA:90,13,1,5
139
+ BRDA:109,14,0,2
140
+ BRDA:109,14,1,1
141
+ BRDA:110,15,0,2
142
+ BRDA:110,15,1,0
143
+ BRDA:127,16,0,1
144
+ BRDA:127,16,1,0
145
+ BRF:32
146
+ BRH:30
153
147
  end_of_record
154
148
  TN:
155
149
  SF:/home/runner/work/store/store/src/JSONStore.ts
@@ -162,9 +156,9 @@ FN:39,(anonymous_5)
162
156
  FN:43,(anonymous_6)
163
157
  FNF:7
164
158
  FNH:7
165
- FNDA:5,(anonymous_0)
166
- FNDA:6,(anonymous_1)
167
- FNDA:6,(anonymous_2)
159
+ FNDA:7,(anonymous_0)
160
+ FNDA:8,(anonymous_1)
161
+ FNDA:10,(anonymous_2)
168
162
  FNDA:4,(anonymous_3)
169
163
  FNDA:2,(anonymous_4)
170
164
  FNDA:1,(anonymous_5)
@@ -172,17 +166,17 @@ FNDA:1,(anonymous_6)
172
166
  DA:1,1
173
167
  DA:2,1
174
168
  DA:3,1
175
- DA:7,5
176
- DA:11,6
177
- DA:13,6
169
+ DA:7,7
170
+ DA:11,8
171
+ DA:13,8
178
172
  DA:14,1
179
- DA:16,5
180
- DA:17,5
181
- DA:18,5
182
- DA:23,6
183
- DA:24,6
184
- DA:25,6
185
- DA:27,6
173
+ DA:16,7
174
+ DA:17,7
175
+ DA:18,7
176
+ DA:23,10
177
+ DA:24,10
178
+ DA:25,10
179
+ DA:27,10
186
180
  DA:31,4
187
181
  DA:35,2
188
182
  DA:36,2
@@ -194,40 +188,48 @@ DA:51,1
194
188
  LF:22
195
189
  LH:22
196
190
  BRDA:13,0,0,1
197
- BRDA:13,0,1,5
198
- BRDA:21,1,0,5
199
- BRDA:23,2,0,6
200
- BRDA:23,3,0,6
201
- BRDA:23,3,1,5
191
+ BRDA:13,0,1,7
192
+ BRDA:21,1,0,7
193
+ BRDA:23,2,0,10
194
+ BRDA:23,3,0,10
195
+ BRDA:23,3,1,7
202
196
  BRDA:30,4,0,1
203
197
  BRF:7
204
198
  BRH:7
205
199
  end_of_record
206
200
  TN:
207
201
  SF:/home/runner/work/store/store/src/adapters/JSONAdapter.ts
208
- FN:7,(anonymous_0)
209
- FN:11,(anonymous_1)
210
- FN:20,(anonymous_2)
202
+ FN:8,(anonymous_0)
203
+ FN:13,(anonymous_1)
204
+ FN:32,(anonymous_2)
211
205
  FNF:3
212
206
  FNH:3
213
- FNDA:5,(anonymous_0)
214
- FNDA:6,(anonymous_1)
207
+ FNDA:7,(anonymous_0)
208
+ FNDA:10,(anonymous_1)
215
209
  FNDA:3,(anonymous_2)
216
210
  DA:1,1
217
211
  DA:2,1
212
+ DA:4,1
218
213
  DA:5,1
219
- DA:8,5
220
- DA:12,6
221
- DA:13,6
222
- DA:14,1
223
- DA:16,5
224
- DA:21,3
225
- LF:9
226
- LH:9
227
- BRDA:13,0,0,1
228
- BRDA:13,0,1,5
229
- BRF:2
230
- BRH:2
214
+ DA:9,7
215
+ DA:10,7
216
+ DA:14,10
217
+ DA:16,10
218
+ DA:19,9
219
+ DA:21,9
220
+ DA:23,4
221
+ DA:24,4
222
+ DA:26,4
223
+ DA:33,3
224
+ LF:14
225
+ LH:14
226
+ BRDA:16,0,0,9
227
+ BRDA:21,1,0,9
228
+ BRDA:21,1,1,0
229
+ BRDA:24,2,0,4
230
+ BRDA:24,2,1,0
231
+ BRF:5
232
+ BRH:3
231
233
  end_of_record
232
234
  TN:
233
235
  SF:/home/runner/work/store/store/src/adapters/ZlibAdapter.ts
@@ -1,7 +1,8 @@
1
1
  import { IJSON } from 'src/types';
2
2
  export declare class JSONAdapter {
3
3
  private readonly adapter;
4
- constructor(dbName: string);
4
+ private readonly dbPath;
5
+ constructor(dbPath: string);
5
6
  read(): IJSON;
6
7
  write(obj: any): void;
7
8
  }
package/dist/index.js CHANGED
@@ -1,17 +1,2 @@
1
- "use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@commonify/lowdb"),i=t(require("fs")),r=require("util"),a=require("fflate"),s=t(require("write-file-atomic")),n=t(require("comment-json")),o=t(require("lodash"));
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
- this file except in compliance with the License. You may obtain a copy of the
6
- License at http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
- MERCHANTABLITY OR NON-INFRINGEMENT.
12
-
13
- See the Apache Version 2.0 License for specific language governing permissions
14
- and limitations under the License.
15
- ***************************************************************************** */
16
- function c(t,e,i,r){var a,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(n=(s<3?a(n):s>3?a(e,i,n):a(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n}const d=r.promisify(i.readFile);class l{constructor(t,e,i){this.readCount=0,this.dbPath=t,this.collectionName=e,this.errorList=i}async read(){this.readCount++;const t={[this.collectionName]:[],[`__${this.collectionName}_KEY__`]:{}};return new Promise(async(e,r)=>{if(i.existsSync(this.dbPath)){const i=await d(this.dbPath);a.gunzip(i,(i,r)=>{if(i)return console.error(i),this.errorList.push(i),e(t);const s=a.strFromU8(r);try{const t=JSON.parse(s);return e(t)}catch(i){return console.error(i),this.errorList.push(i),e(t)}})}else{const i=Buffer.from(JSON.stringify(t));a.gzip(i,async(i,a)=>{if(i)return r(i);await s(this.dbPath,Buffer.from(a)),e(t)})}})}async write(t){return new Promise((e,i)=>{t=Buffer.from(JSON.stringify(t)),a.gzip(t,async(t,r)=>{if(t)return i(t);await s(this.dbPath,Buffer.from(r)),e()})})}}var h,u;function f(t){return function(e,i,r){const a=r.value;r.value=async function(...e){t===u.createMany?e=[e=(e=e[0]).map(t=>y(t))]:t===u.create?e[0]=y(e[0]):e[1].updatedAt=Date.now();return await a.call(this,...e)}}}function y(t){return t.id||(t.id=function(t="",e=""){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e}()),t.createdAt||(t.createdAt=Date.now(),t.updatedAt=Date.now()),t}!function(t){t.inited="inited",t.loaded="loaded",t.started="started",t.stopped="stopped"}(h||(h={})),function(t){t[t.createMany=0]="createMany",t[t.create=1]="create",t[t.update=2]="update"}(u||(u={}));class p{constructor(t,i){if(this.hasRead=!1,this.errorList=[],!t||!i)throw Error("Please provide valid dbPath or collectionName");this.collectionName=i,this.collectionKey=`__${i}_KEY__`,this.adapter=new l(t,i,this.errorList),this.db=new e.Low(this.adapter)}getAdapter(){return this.adapter}async read(t=!1){return!t&&this.hasRead||(this.hasRead=!0,await this.db.read()),this.db.data}async get(t){let e=(await this.getCollection()).slice();const i=e.length;return void 0!==t&&("desc"===t.orderBy&&(e=e.reverse()),"number"==typeof t.offset&&t.offset>=0&&(e=e.slice(t.offset)),"number"==typeof t.limit&&t.limit>0&&(e=e.slice(0,t.limit))),{total:i,data:e}}async getCollection(){var t;return null===(t=await this.read())||void 0===t?void 0:t[this.collectionName]}async getCollectionKey(t){return(await this.getCollectionKeyMap())[t]}async getCollectionKeyMap(){var t;return null===(t=await this.read())||void 0===t?void 0:t[this.collectionKey]}async setCollectionKey(t){await this.read();this.db.data[this.collectionKey][t]=1}async insert(t,e=!0){const i=t.id;return await this.getCollectionKey(i)?(await this.updateById(i,t),t):((await this.getCollection()).push(t),await this.setCollectionKey(i),e&&await this.db.write(),t)}async insertMany(t){for(const e of t)await this.insert(e,!1);return await this.db.write(),t}async updateById(t,e){const i=await this.getCollection();if(await this.getCollectionKey(t)){const r=i.find(e=>e.id===t);return Object.assign(r,e),await this.db.write(),!0}return!1}async getById(t){return(await this.getCollection()).find(e=>e.id===t)}async removeById(t){const e=await this.getCollection(),i=await this.getCollectionKeyMap(),r=e.findIndex(e=>e.id===t);-1!==r&&(e.splice(r,1),delete i[t],await this.db.write())}async overwrite(t){return await this.read(),this.db.data[this.collectionName]=[],this.db.data[this.collectionKey]={},await this.insertMany(t)}}c([f(u.create)],p.prototype,"insert",null),c([f(u.createMany)],p.prototype,"insertMany",null),c([f(u.update)],p.prototype,"updateById",null);class w{constructor(t){this.adapter=new e.TextFileSync(t)}read(){const t=this.adapter.read();return null===t?{}:n.parse(t)}write(t){this.adapter.write(n.stringify(t))}}class b extends e.LowSync{constructor(){super(...arguments),this.chain=o.chain(this).get("data")}}exports.DBStore=p,exports.JSONStore=class{constructor(t){if(this.hasRead=!1,!t)throw Error("Please provide valid dbPath");const e=new w(t);this.db=new b(e),this.read()}read(t=!1){return!t&&this.hasRead||(this.hasRead=!0,this.db.read()),this.db.data}get(t=""){return this.db.chain.get(t).value()}set(t,e){this.db.chain.set(t,e).value(),this.db.write()}has(t){return this.db.chain.has(t).value()}unset(t,e){const i=this.db.chain.get(t).unset(e).value();return this.db.write(),i}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@commonify/lowdb"),e=require("fs"),i=require("util"),r=require("fflate"),a=require("write-file-atomic"),s=require("comment-json"),n=require("lodash");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=o(e),d=o(a),l=o(s),h=o(n);function u(t,e,i,r){var a,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(n=(s<3?a(n):s>3?a(e,i,n):a(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n}const f=i.promisify(c.default.readFile);class y{constructor(t,e,i){this.readCount=0,this.dbPath=t,this.collectionName=e,this.errorList=i}async read(){this.readCount++;const t={[this.collectionName]:[],[`__${this.collectionName}_KEY__`]:{}};return new Promise((async(e,i)=>{if(c.default.existsSync(this.dbPath)){const i=await f(this.dbPath);r.gunzip(i,((i,a)=>{if(i)return console.error(i),this.errorList.push(i),e(t);const s=r.strFromU8(a);try{const t=JSON.parse(s);return e(t)}catch(i){return console.error(i),this.errorList.push(i),e(t)}}))}else{const a=Buffer.from(JSON.stringify(t));r.gzip(a,(async(r,a)=>{if(r)return i(r);await d.default(this.dbPath,Buffer.from(a)),e(t)}))}}))}async write(t){return new Promise(((e,i)=>{t=Buffer.from(JSON.stringify(t)),r.gzip(t,(async(t,r)=>{if(t)return i(t);await d.default(this.dbPath,Buffer.from(r)),e()}))}))}}var p,w;function b(t){return function(e,i,r){const a=r.value;r.value=async function(...e){t===w.createMany?e=[e=(e=e[0]).map((t=>g(t)))]:t===w.create?e[0]=g(e[0]):e[1].updatedAt=Date.now();return await a.call(this,...e)}}}function g(t){return t.id||(t.id=function(t="",e=""){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e}()),t.createdAt||(t.createdAt=Date.now(),t.updatedAt=Date.now()),t}!function(t){t.inited="inited",t.loaded="loaded",t.started="started",t.stopped="stopped"}(p||(p={})),function(t){t[t.createMany=0]="createMany",t[t.create=1]="create",t[t.update=2]="update"}(w||(w={}));class m{constructor(e,i){if(this.hasRead=!1,this.errorList=[],!e||!i)throw Error("Please provide valid dbPath or collectionName");this.collectionName=i,this.collectionKey=`__${i}_KEY__`,this.adapter=new y(e,i,this.errorList),this.db=new t.Low(this.adapter)}getAdapter(){return this.adapter}async read(t=!1){return!t&&this.hasRead||(this.hasRead=!0,await this.db.read()),this.db.data}async get(t){let e=(await this.getCollection()).slice();const i=e.length;return void 0!==t&&("desc"===t.orderBy&&(e=e.reverse()),"number"==typeof t.offset&&t.offset>=0&&(e=e.slice(t.offset)),"number"==typeof t.limit&&t.limit>0&&(e=e.slice(0,t.limit))),{total:i,data:e}}async getCollection(){return(await this.read())?.[this.collectionName]}async getCollectionKey(t){return(await this.getCollectionKeyMap())[t]}async getCollectionKeyMap(){return(await this.read())?.[this.collectionKey]}async setCollectionKey(t){await this.read();this.db.data[this.collectionKey][t]=1}async insert(t,e=!0){const i=t.id;return await this.getCollectionKey(i)?(await this.updateById(i,t),t):((await this.getCollection()).push(t),await this.setCollectionKey(i),e&&await this.db.write(),t)}async insertMany(t){for(const e of t)await this.insert(e,!1);return await this.db.write(),t}async updateById(t,e){const i=await this.getCollection();if(await this.getCollectionKey(t)){const r=i.find((e=>e.id===t))||{};return Object.assign(r,e),await this.db.write(),!0}return!1}async getById(t){return(await this.getCollection()).find((e=>e.id===t))}async removeById(t){const e=await this.getCollection(),i=await this.getCollectionKeyMap(),r=e.findIndex((e=>e.id===t));-1!==r&&(e.splice(r,1),delete i[t],await this.db.write())}async overwrite(t){return await this.read(),this.db.data[this.collectionName]=[],this.db.data[this.collectionKey]={},await this.insertMany(t)}}u([b(w.create)],m.prototype,"insert",null),u([b(w.createMany)],m.prototype,"insertMany",null),u([b(w.update)],m.prototype,"updateById",null);class v{constructor(e){this.dbPath=e,this.adapter=new t.TextFileSync(e)}read(){const t=this.adapter.read();if(null===t)return{};try{return l.default.parse(t||"{}")}catch(e){try{return JSON.parse(t||"{}")}catch(t){return{}}}}write(t){d.default.sync(this.dbPath,l.default.stringify(t,null,2))}}class C extends t.LowSync{constructor(){super(...arguments),this.chain=h.default.chain(this).get("data")}}exports.DBStore=m,exports.JSONStore=class{constructor(t){if(this.hasRead=!1,!t)throw Error("Please provide valid dbPath");const e=new v(t);this.db=new C(e),this.read()}read(t=!1){return!t&&this.hasRead||(this.hasRead=!0,this.db.read()),this.db.data}get(t=""){return this.db.chain.get(t).value()}set(t,e){this.db.chain.set(t,e).value(),this.db.write()}has(t){return this.db.chain.has(t).value()}unset(t,e){const i=this.db.chain.get(t).unset(e).value();return this.db.write(),i}};
17
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picgo/store",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -62,12 +62,12 @@
62
62
  "husky": "^4.0.10",
63
63
  "jest": "^24.9.0",
64
64
  "rimraf": "^3.0.2",
65
- "rollup": "^1.29.0",
65
+ "rollup": "^2.78.1",
66
66
  "rollup-plugin-node-resolve": "^5.2.0",
67
- "rollup-plugin-terser": "^5.2.0",
68
- "rollup-plugin-typescript2": "^0.25.3",
67
+ "rollup-plugin-terser": "^7.0.2",
68
+ "rollup-plugin-typescript2": "^0.33.0",
69
69
  "ts-jest": "^24.3.0",
70
- "typescript": "^3.7.4"
70
+ "typescript": "^4.7.4"
71
71
  },
72
72
  "dependencies": {
73
73
  "@commonify/lowdb": "^3.0.0",