@picgo/store 2.0.3 → 2.1.0
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.
- package/CHANGELOG.md +23 -0
- package/README.md +28 -1
- package/coverage/clover.xml +145 -128
- package/coverage/coverage-final.json +6 -6
- package/coverage/lcov-report/index.html +20 -20
- package/coverage/lcov-report/src/DBStore.ts.html +123 -48
- package/coverage/lcov-report/src/JSONStore.ts.html +11 -11
- package/coverage/lcov-report/src/adapters/JSONAdapter.ts.html +28 -13
- package/coverage/lcov-report/src/adapters/ZlibAdapter.ts.html +19 -19
- package/coverage/lcov-report/src/adapters/index.html +9 -9
- package/coverage/lcov-report/src/index.html +9 -9
- package/coverage/lcov-report/src/types/index.html +5 -5
- package/coverage/lcov-report/src/types/index.ts.html +8 -5
- package/coverage/lcov-report/src/utils/index.html +9 -9
- package/coverage/lcov-report/src/utils/metaInfoHelper.ts.html +33 -21
- package/coverage/lcov.info +250 -225
- package/dist/DBStore.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/types/index.d.ts +2 -1
- package/package.json +11 -9
- package/rollup.config.js +8 -3
- package/dist/index.js.map +0 -1
package/coverage/lcov.info
CHANGED
|
@@ -5,122 +5,130 @@ FN:28,(anonymous_1)
|
|
|
5
5
|
FN:32,(anonymous_2)
|
|
6
6
|
FN:40,(anonymous_3)
|
|
7
7
|
FN:60,(anonymous_4)
|
|
8
|
-
FN:
|
|
9
|
-
FN:
|
|
10
|
-
FN:
|
|
11
|
-
FN:
|
|
12
|
-
FN:
|
|
13
|
-
FN:
|
|
14
|
-
FN:
|
|
15
|
-
FN:
|
|
16
|
-
FN:
|
|
17
|
-
FN:
|
|
18
|
-
FN:
|
|
19
|
-
FN:
|
|
8
|
+
FN:65,(anonymous_5)
|
|
9
|
+
FN:69,(anonymous_6)
|
|
10
|
+
FN:74,(anonymous_7)
|
|
11
|
+
FN:82,(anonymous_8)
|
|
12
|
+
FN:99,(anonymous_9)
|
|
13
|
+
FN:108,(anonymous_10)
|
|
14
|
+
FN:123,(anonymous_11)
|
|
15
|
+
FN:144,(anonymous_12)
|
|
16
|
+
FN:145,(anonymous_13)
|
|
17
|
+
FN:148,(anonymous_14)
|
|
18
|
+
FN:151,(anonymous_15)
|
|
19
|
+
FN:159,(anonymous_16)
|
|
20
20
|
FNF:17
|
|
21
21
|
FNH:17
|
|
22
|
-
FNDA:
|
|
22
|
+
FNDA:19,(anonymous_0)
|
|
23
23
|
FNDA:1,(anonymous_1)
|
|
24
|
-
FNDA:
|
|
25
|
-
FNDA:
|
|
26
|
-
FNDA:
|
|
27
|
-
FNDA:
|
|
28
|
-
FNDA:
|
|
29
|
-
FNDA:
|
|
30
|
-
FNDA:
|
|
31
|
-
FNDA:
|
|
24
|
+
FNDA:73,(anonymous_2)
|
|
25
|
+
FNDA:19,(anonymous_3)
|
|
26
|
+
FNDA:39,(anonymous_4)
|
|
27
|
+
FNDA:18,(anonymous_5)
|
|
28
|
+
FNDA:20,(anonymous_6)
|
|
29
|
+
FNDA:11,(anonymous_7)
|
|
30
|
+
FNDA:12,(anonymous_8)
|
|
31
|
+
FNDA:3,(anonymous_9)
|
|
32
32
|
FNDA:3,(anonymous_10)
|
|
33
|
-
FNDA:
|
|
33
|
+
FNDA:1,(anonymous_11)
|
|
34
34
|
FNDA:3,(anonymous_12)
|
|
35
35
|
FNDA:4,(anonymous_13)
|
|
36
|
-
FNDA:
|
|
36
|
+
FNDA:2,(anonymous_14)
|
|
37
37
|
FNDA:1,(anonymous_15)
|
|
38
|
-
FNDA:
|
|
38
|
+
FNDA:2,(anonymous_16)
|
|
39
39
|
DA:5,1
|
|
40
40
|
DA:6,1
|
|
41
41
|
DA:7,1
|
|
42
42
|
DA:8,1
|
|
43
|
-
DA:14,
|
|
44
|
-
DA:15,
|
|
45
|
-
DA:19,
|
|
43
|
+
DA:14,19
|
|
44
|
+
DA:15,19
|
|
45
|
+
DA:19,19
|
|
46
46
|
DA:20,2
|
|
47
|
-
DA:22,
|
|
48
|
-
DA:23,
|
|
49
|
-
DA:24,
|
|
50
|
-
DA:25,
|
|
47
|
+
DA:22,17
|
|
48
|
+
DA:23,17
|
|
49
|
+
DA:24,17
|
|
50
|
+
DA:25,17
|
|
51
51
|
DA:29,1
|
|
52
|
-
DA:33,
|
|
53
|
-
DA:34,
|
|
54
|
-
DA:35,
|
|
55
|
-
DA:37,
|
|
56
|
-
DA:41,
|
|
57
|
-
DA:42,
|
|
58
|
-
DA:43,
|
|
52
|
+
DA:33,73
|
|
53
|
+
DA:34,17
|
|
54
|
+
DA:35,17
|
|
55
|
+
DA:37,73
|
|
56
|
+
DA:41,19
|
|
57
|
+
DA:42,19
|
|
58
|
+
DA:43,19
|
|
59
59
|
DA:44,6
|
|
60
60
|
DA:45,1
|
|
61
61
|
DA:47,6
|
|
62
62
|
DA:48,1
|
|
63
63
|
DA:50,6
|
|
64
64
|
DA:51,1
|
|
65
|
-
DA:54,
|
|
66
|
-
DA:
|
|
67
|
-
DA:
|
|
68
|
-
DA:
|
|
69
|
-
DA:
|
|
70
|
-
DA:
|
|
71
|
-
DA:
|
|
72
|
-
DA:
|
|
73
|
-
DA:
|
|
74
|
-
DA:
|
|
75
|
-
DA:
|
|
76
|
-
DA:
|
|
77
|
-
DA:
|
|
78
|
-
DA:
|
|
79
|
-
DA:
|
|
80
|
-
DA:
|
|
81
|
-
DA:
|
|
82
|
-
DA:
|
|
83
|
-
DA:
|
|
84
|
-
DA:
|
|
85
|
-
DA:
|
|
86
|
-
DA:
|
|
87
|
-
DA:
|
|
88
|
-
DA:102,2
|
|
89
|
-
DA:106,1
|
|
90
|
-
DA:107,3
|
|
91
|
-
DA:108,3
|
|
65
|
+
DA:54,19
|
|
66
|
+
DA:66,18
|
|
67
|
+
DA:75,11
|
|
68
|
+
DA:76,11
|
|
69
|
+
DA:77,11
|
|
70
|
+
DA:78,11
|
|
71
|
+
DA:82,1
|
|
72
|
+
DA:83,12
|
|
73
|
+
DA:84,12
|
|
74
|
+
DA:86,12
|
|
75
|
+
DA:87,1
|
|
76
|
+
DA:88,1
|
|
77
|
+
DA:90,11
|
|
78
|
+
DA:91,11
|
|
79
|
+
DA:92,11
|
|
80
|
+
DA:93,3
|
|
81
|
+
DA:95,11
|
|
82
|
+
DA:99,1
|
|
83
|
+
DA:100,3
|
|
84
|
+
DA:101,8
|
|
85
|
+
DA:103,3
|
|
86
|
+
DA:104,3
|
|
87
|
+
DA:108,1
|
|
92
88
|
DA:109,3
|
|
93
|
-
DA:110,
|
|
94
|
-
DA:111,
|
|
95
|
-
DA:
|
|
96
|
-
DA:
|
|
97
|
-
DA:
|
|
98
|
-
DA:
|
|
89
|
+
DA:110,3
|
|
90
|
+
DA:111,3
|
|
91
|
+
DA:114,2
|
|
92
|
+
DA:115,2
|
|
93
|
+
DA:116,2
|
|
94
|
+
DA:118,1
|
|
95
|
+
DA:123,1
|
|
99
96
|
DA:124,1
|
|
100
97
|
DA:125,1
|
|
101
98
|
DA:126,1
|
|
102
|
-
DA:127,
|
|
103
|
-
DA:128,
|
|
104
|
-
DA:129,
|
|
105
|
-
DA:130,
|
|
106
|
-
DA:
|
|
107
|
-
DA:136,1
|
|
99
|
+
DA:127,4
|
|
100
|
+
DA:128,3
|
|
101
|
+
DA:129,3
|
|
102
|
+
DA:130,2
|
|
103
|
+
DA:133,2
|
|
108
104
|
DA:137,1
|
|
109
105
|
DA:138,1
|
|
110
|
-
DA:
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
DA:145,4
|
|
107
|
+
DA:149,2
|
|
108
|
+
DA:150,2
|
|
109
|
+
DA:151,2
|
|
110
|
+
DA:152,2
|
|
111
|
+
DA:153,1
|
|
112
|
+
DA:154,1
|
|
113
|
+
DA:155,1
|
|
114
|
+
DA:160,2
|
|
115
|
+
DA:161,2
|
|
116
|
+
DA:162,2
|
|
117
|
+
DA:163,2
|
|
118
|
+
DA:168,1
|
|
119
|
+
LF:80
|
|
120
|
+
LH:80
|
|
113
121
|
BRDA:19,0,0,2
|
|
114
|
-
BRDA:19,0,1,
|
|
115
|
-
BRDA:19,1,0,
|
|
116
|
-
BRDA:19,1,1,
|
|
117
|
-
BRDA:32,2,0,
|
|
118
|
-
BRDA:33,3,0,
|
|
119
|
-
BRDA:33,3,1,
|
|
120
|
-
BRDA:33,4,0,
|
|
121
|
-
BRDA:33,4,1,
|
|
122
|
+
BRDA:19,0,1,17
|
|
123
|
+
BRDA:19,1,0,19
|
|
124
|
+
BRDA:19,1,1,18
|
|
125
|
+
BRDA:32,2,0,73
|
|
126
|
+
BRDA:33,3,0,17
|
|
127
|
+
BRDA:33,3,1,56
|
|
128
|
+
BRDA:33,4,0,73
|
|
129
|
+
BRDA:33,4,1,73
|
|
122
130
|
BRDA:43,5,0,6
|
|
123
|
-
BRDA:43,5,1,
|
|
131
|
+
BRDA:43,5,1,13
|
|
124
132
|
BRDA:44,6,0,1
|
|
125
133
|
BRDA:44,6,1,5
|
|
126
134
|
BRDA:47,7,0,1
|
|
@@ -131,19 +139,21 @@ BRDA:50,9,0,1
|
|
|
131
139
|
BRDA:50,9,1,5
|
|
132
140
|
BRDA:50,10,0,6
|
|
133
141
|
BRDA:50,10,1,2
|
|
134
|
-
BRDA:
|
|
135
|
-
BRDA:
|
|
136
|
-
BRDA:
|
|
137
|
-
BRDA:
|
|
138
|
-
BRDA:
|
|
139
|
-
BRDA:
|
|
140
|
-
BRDA:
|
|
141
|
-
BRDA:
|
|
142
|
-
BRDA:
|
|
143
|
-
BRDA:
|
|
144
|
-
BRDA:
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
BRDA:82,11,0,4
|
|
143
|
+
BRDA:86,12,0,1
|
|
144
|
+
BRDA:86,12,1,11
|
|
145
|
+
BRDA:92,13,0,3
|
|
146
|
+
BRDA:92,13,1,8
|
|
147
|
+
BRDA:111,14,0,2
|
|
148
|
+
BRDA:111,14,1,1
|
|
149
|
+
BRDA:127,15,0,3
|
|
150
|
+
BRDA:127,15,1,1
|
|
151
|
+
BRDA:129,16,0,2
|
|
152
|
+
BRDA:129,16,1,1
|
|
153
|
+
BRDA:152,17,0,1
|
|
154
|
+
BRDA:152,17,1,1
|
|
155
|
+
BRF:34
|
|
156
|
+
BRH:34
|
|
147
157
|
end_of_record
|
|
148
158
|
TN:
|
|
149
159
|
SF:/home/runner/work/store/store/src/JSONStore.ts
|
|
@@ -156,9 +166,9 @@ FN:39,(anonymous_5)
|
|
|
156
166
|
FN:43,(anonymous_6)
|
|
157
167
|
FNF:7
|
|
158
168
|
FNH:7
|
|
159
|
-
FNDA:
|
|
160
|
-
FNDA:
|
|
161
|
-
FNDA:
|
|
169
|
+
FNDA:9,(anonymous_0)
|
|
170
|
+
FNDA:10,(anonymous_1)
|
|
171
|
+
FNDA:14,(anonymous_2)
|
|
162
172
|
FNDA:4,(anonymous_3)
|
|
163
173
|
FNDA:2,(anonymous_4)
|
|
164
174
|
FNDA:1,(anonymous_5)
|
|
@@ -166,17 +176,17 @@ FNDA:1,(anonymous_6)
|
|
|
166
176
|
DA:1,1
|
|
167
177
|
DA:2,1
|
|
168
178
|
DA:3,1
|
|
169
|
-
DA:7,
|
|
170
|
-
DA:11,
|
|
171
|
-
DA:13,
|
|
179
|
+
DA:7,9
|
|
180
|
+
DA:11,10
|
|
181
|
+
DA:13,10
|
|
172
182
|
DA:14,1
|
|
173
|
-
DA:16,
|
|
174
|
-
DA:17,
|
|
175
|
-
DA:18,
|
|
176
|
-
DA:23,
|
|
177
|
-
DA:24,
|
|
178
|
-
DA:25,
|
|
179
|
-
DA:27,
|
|
183
|
+
DA:16,9
|
|
184
|
+
DA:17,9
|
|
185
|
+
DA:18,9
|
|
186
|
+
DA:23,14
|
|
187
|
+
DA:24,14
|
|
188
|
+
DA:25,14
|
|
189
|
+
DA:27,14
|
|
180
190
|
DA:31,4
|
|
181
191
|
DA:35,2
|
|
182
192
|
DA:36,2
|
|
@@ -188,11 +198,11 @@ DA:51,1
|
|
|
188
198
|
LF:22
|
|
189
199
|
LH:22
|
|
190
200
|
BRDA:13,0,0,1
|
|
191
|
-
BRDA:13,0,1,
|
|
192
|
-
BRDA:21,1,0,
|
|
193
|
-
BRDA:23,2,0,
|
|
194
|
-
BRDA:23,3,0,
|
|
195
|
-
BRDA:23,3,1,
|
|
201
|
+
BRDA:13,0,1,9
|
|
202
|
+
BRDA:21,1,0,9
|
|
203
|
+
BRDA:23,2,0,14
|
|
204
|
+
BRDA:23,3,0,14
|
|
205
|
+
BRDA:23,3,1,9
|
|
196
206
|
BRDA:30,4,0,1
|
|
197
207
|
BRF:7
|
|
198
208
|
BRH:7
|
|
@@ -201,35 +211,41 @@ TN:
|
|
|
201
211
|
SF:/home/runner/work/store/store/src/adapters/JSONAdapter.ts
|
|
202
212
|
FN:8,(anonymous_0)
|
|
203
213
|
FN:13,(anonymous_1)
|
|
204
|
-
FN:
|
|
214
|
+
FN:37,(anonymous_2)
|
|
205
215
|
FNF:3
|
|
206
216
|
FNH:3
|
|
207
|
-
FNDA:
|
|
208
|
-
FNDA:
|
|
217
|
+
FNDA:9,(anonymous_0)
|
|
218
|
+
FNDA:14,(anonymous_1)
|
|
209
219
|
FNDA:3,(anonymous_2)
|
|
210
220
|
DA:1,1
|
|
211
221
|
DA:2,1
|
|
212
222
|
DA:4,1
|
|
213
223
|
DA:5,1
|
|
214
|
-
DA:9,
|
|
215
|
-
DA:10,
|
|
216
|
-
DA:14,
|
|
217
|
-
DA:16,
|
|
218
|
-
DA:19,
|
|
219
|
-
DA:21,
|
|
220
|
-
DA:
|
|
221
|
-
DA:
|
|
222
|
-
DA:
|
|
223
|
-
DA:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
BRDA:
|
|
231
|
-
|
|
232
|
-
|
|
224
|
+
DA:9,9
|
|
225
|
+
DA:10,9
|
|
226
|
+
DA:14,14
|
|
227
|
+
DA:16,14
|
|
228
|
+
DA:19,13
|
|
229
|
+
DA:21,13
|
|
230
|
+
DA:22,9
|
|
231
|
+
DA:23,2
|
|
232
|
+
DA:25,7
|
|
233
|
+
DA:27,4
|
|
234
|
+
DA:28,4
|
|
235
|
+
DA:30,4
|
|
236
|
+
DA:31,4
|
|
237
|
+
DA:38,3
|
|
238
|
+
LF:18
|
|
239
|
+
LH:18
|
|
240
|
+
BRDA:16,0,0,13
|
|
241
|
+
BRDA:21,1,0,13
|
|
242
|
+
BRDA:21,1,1,2
|
|
243
|
+
BRDA:22,2,0,2
|
|
244
|
+
BRDA:22,2,1,7
|
|
245
|
+
BRDA:22,3,0,9
|
|
246
|
+
BRDA:22,3,1,7
|
|
247
|
+
BRF:7
|
|
248
|
+
BRH:7
|
|
233
249
|
end_of_record
|
|
234
250
|
TN:
|
|
235
251
|
SF:/home/runner/work/store/store/src/adapters/ZlibAdapter.ts
|
|
@@ -243,53 +259,53 @@ FN:64,(anonymous_6)
|
|
|
243
259
|
FN:66,(anonymous_7)
|
|
244
260
|
FNF:8
|
|
245
261
|
FNH:8
|
|
246
|
-
FNDA:
|
|
247
|
-
FNDA:
|
|
248
|
-
FNDA:
|
|
249
|
-
FNDA:
|
|
262
|
+
FNDA:17,(anonymous_0)
|
|
263
|
+
FNDA:17,(anonymous_1)
|
|
264
|
+
FNDA:17,(anonymous_2)
|
|
265
|
+
FNDA:16,(anonymous_3)
|
|
250
266
|
FNDA:1,(anonymous_4)
|
|
251
|
-
FNDA:
|
|
252
|
-
FNDA:
|
|
253
|
-
FNDA:
|
|
267
|
+
FNDA:10,(anonymous_5)
|
|
268
|
+
FNDA:10,(anonymous_6)
|
|
269
|
+
FNDA:10,(anonymous_7)
|
|
254
270
|
DA:4,1
|
|
255
271
|
DA:5,1
|
|
256
272
|
DA:6,1
|
|
257
273
|
DA:7,1
|
|
258
274
|
DA:9,1
|
|
259
|
-
DA:15,
|
|
260
|
-
DA:18,
|
|
261
|
-
DA:19,
|
|
262
|
-
DA:20,
|
|
263
|
-
DA:24,
|
|
264
|
-
DA:25,
|
|
265
|
-
DA:29,
|
|
266
|
-
DA:30,
|
|
267
|
-
DA:31,
|
|
268
|
-
DA:32,
|
|
269
|
-
DA:33,
|
|
275
|
+
DA:15,17
|
|
276
|
+
DA:18,17
|
|
277
|
+
DA:19,17
|
|
278
|
+
DA:20,17
|
|
279
|
+
DA:24,17
|
|
280
|
+
DA:25,17
|
|
281
|
+
DA:29,17
|
|
282
|
+
DA:30,17
|
|
283
|
+
DA:31,16
|
|
284
|
+
DA:32,16
|
|
285
|
+
DA:33,16
|
|
270
286
|
DA:34,1
|
|
271
287
|
DA:35,1
|
|
272
288
|
DA:36,1
|
|
273
|
-
DA:38,
|
|
274
|
-
DA:39,
|
|
275
|
-
DA:40,
|
|
276
|
-
DA:41,
|
|
289
|
+
DA:38,15
|
|
290
|
+
DA:39,15
|
|
291
|
+
DA:40,15
|
|
292
|
+
DA:41,15
|
|
277
293
|
DA:52,1
|
|
278
294
|
DA:53,1
|
|
279
295
|
DA:56,1
|
|
280
296
|
DA:57,1
|
|
281
|
-
DA:64,
|
|
282
|
-
DA:65,
|
|
283
|
-
DA:66,
|
|
284
|
-
DA:69,
|
|
285
|
-
DA:70,
|
|
297
|
+
DA:64,10
|
|
298
|
+
DA:65,10
|
|
299
|
+
DA:66,10
|
|
300
|
+
DA:69,10
|
|
301
|
+
DA:70,10
|
|
286
302
|
DA:77,1
|
|
287
303
|
LF:33
|
|
288
304
|
LH:33
|
|
289
|
-
BRDA:30,0,0,
|
|
305
|
+
BRDA:30,0,0,16
|
|
290
306
|
BRDA:30,0,1,1
|
|
291
307
|
BRDA:33,1,0,1
|
|
292
|
-
BRDA:33,1,1,
|
|
308
|
+
BRDA:33,1,1,15
|
|
293
309
|
BRF:4
|
|
294
310
|
BRH:4
|
|
295
311
|
end_of_record
|
|
@@ -310,8 +326,9 @@ DA:25,1
|
|
|
310
326
|
DA:26,1
|
|
311
327
|
DA:27,1
|
|
312
328
|
DA:28,1
|
|
313
|
-
|
|
314
|
-
|
|
329
|
+
DA:29,1
|
|
330
|
+
LF:10
|
|
331
|
+
LH:10
|
|
315
332
|
BRDA:1,0,0,1
|
|
316
333
|
BRDA:1,0,1,1
|
|
317
334
|
BRDA:25,1,0,1
|
|
@@ -325,59 +342,67 @@ FN:3,metaInfoHelper
|
|
|
325
342
|
FN:4,(anonymous_1)
|
|
326
343
|
FN:6,(anonymous_2)
|
|
327
344
|
FN:9,(anonymous_3)
|
|
328
|
-
FN:
|
|
329
|
-
FN:
|
|
330
|
-
FN:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
FNDA:
|
|
335
|
-
FNDA:
|
|
336
|
-
FNDA:
|
|
345
|
+
FN:15,(anonymous_4)
|
|
346
|
+
FN:27,uuid
|
|
347
|
+
FN:29,metaInfoGenerator
|
|
348
|
+
FN:40,metaInfoUpdater
|
|
349
|
+
FNF:8
|
|
350
|
+
FNH:8
|
|
351
|
+
FNDA:4,metaInfoHelper
|
|
352
|
+
FNDA:4,(anonymous_1)
|
|
353
|
+
FNDA:19,(anonymous_2)
|
|
354
|
+
FNDA:8,(anonymous_3)
|
|
355
|
+
FNDA:4,(anonymous_4)
|
|
337
356
|
FNDA:1,uuid
|
|
338
|
-
FNDA:
|
|
339
|
-
FNDA:
|
|
357
|
+
FNDA:20,metaInfoGenerator
|
|
358
|
+
FNDA:7,metaInfoUpdater
|
|
340
359
|
DA:1,1
|
|
341
|
-
DA:4,
|
|
342
|
-
DA:5,
|
|
343
|
-
DA:6,
|
|
344
|
-
DA:7,
|
|
345
|
-
DA:8,
|
|
346
|
-
DA:9,
|
|
347
|
-
DA:10,
|
|
348
|
-
DA:11,
|
|
349
|
-
DA:12,
|
|
350
|
-
DA:
|
|
351
|
-
DA:
|
|
352
|
-
DA:
|
|
353
|
-
DA:
|
|
354
|
-
DA:
|
|
360
|
+
DA:4,4
|
|
361
|
+
DA:5,4
|
|
362
|
+
DA:6,4
|
|
363
|
+
DA:7,19
|
|
364
|
+
DA:8,3
|
|
365
|
+
DA:9,8
|
|
366
|
+
DA:10,3
|
|
367
|
+
DA:11,16
|
|
368
|
+
DA:12,12
|
|
369
|
+
DA:13,4
|
|
370
|
+
DA:14,1
|
|
371
|
+
DA:15,4
|
|
372
|
+
DA:16,1
|
|
373
|
+
DA:18,3
|
|
374
|
+
DA:20,19
|
|
375
|
+
DA:21,19
|
|
355
376
|
DA:27,1
|
|
356
|
-
DA:
|
|
357
|
-
DA:
|
|
358
|
-
DA:
|
|
359
|
-
DA:
|
|
360
|
-
DA:
|
|
361
|
-
DA:
|
|
362
|
-
DA:
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
BRDA:
|
|
368
|
-
BRDA:
|
|
369
|
-
BRDA:
|
|
370
|
-
BRDA:
|
|
371
|
-
BRDA:
|
|
372
|
-
BRDA:
|
|
373
|
-
BRDA:
|
|
374
|
-
BRDA:
|
|
375
|
-
BRDA:
|
|
376
|
-
BRDA:
|
|
377
|
-
BRDA:
|
|
378
|
-
BRDA:
|
|
379
|
-
BRDA:
|
|
380
|
-
BRDA:
|
|
381
|
-
|
|
382
|
-
|
|
377
|
+
DA:30,20
|
|
378
|
+
DA:31,1
|
|
379
|
+
DA:33,20
|
|
380
|
+
DA:34,11
|
|
381
|
+
DA:35,11
|
|
382
|
+
DA:37,20
|
|
383
|
+
DA:41,7
|
|
384
|
+
DA:42,7
|
|
385
|
+
DA:46,1
|
|
386
|
+
LF:27
|
|
387
|
+
LH:27
|
|
388
|
+
BRDA:7,0,0,3
|
|
389
|
+
BRDA:7,0,1,16
|
|
390
|
+
BRDA:11,1,0,12
|
|
391
|
+
BRDA:11,1,1,4
|
|
392
|
+
BRDA:13,2,0,1
|
|
393
|
+
BRDA:13,2,1,3
|
|
394
|
+
BRDA:27,3,0,1
|
|
395
|
+
BRDA:27,4,0,1
|
|
396
|
+
BRDA:27,5,0,32
|
|
397
|
+
BRDA:27,5,1,4
|
|
398
|
+
BRDA:27,6,0,31
|
|
399
|
+
BRDA:27,6,1,1
|
|
400
|
+
BRDA:27,7,0,30
|
|
401
|
+
BRDA:27,7,1,1
|
|
402
|
+
BRDA:30,8,0,1
|
|
403
|
+
BRDA:30,8,1,19
|
|
404
|
+
BRDA:33,9,0,11
|
|
405
|
+
BRDA:33,9,1,9
|
|
406
|
+
BRF:18
|
|
407
|
+
BRH:18
|
|
383
408
|
end_of_record
|
package/dist/DBStore.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ declare class DBStore {
|
|
|
18
18
|
insert<T>(value: T, writable?: boolean): Promise<IResult<T>>;
|
|
19
19
|
insertMany<T>(value: T[]): Promise<Array<IResult<T>>>;
|
|
20
20
|
updateById(id: string, value: IObject): Promise<boolean>;
|
|
21
|
+
updateMany(list: IObject[]): Promise<{
|
|
22
|
+
total: number;
|
|
23
|
+
success: number;
|
|
24
|
+
}>;
|
|
21
25
|
getById<T>(id: string): Promise<IResult<T> | undefined>;
|
|
22
26
|
removeById(id: string): Promise<void>;
|
|
23
27
|
overwrite<T>(value: T[]): Promise<Array<IResult<T>>>;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@commonify/lowdb"),e=require("fs"),i=require("util"),
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@commonify/lowdb"),e=require("fs"),i=require("util"),a=require("fflate"),r=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(r),l=o(s),u=o(n);function h(t,e,i,a){var r,s=arguments.length,n=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(s<3?r(n):s>3?r(e,i,n):r(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);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 r=Buffer.from(JSON.stringify(t));a.gzip(r,(async(a,r)=>{if(a)return i(a);await d.default(this.dbPath,Buffer.from(r)),e(t)}))}}))}async write(t){return new Promise(((e,i)=>{t=Buffer.from(JSON.stringify(t)),a.gzip(t,(async(t,a)=>{if(t)return i(t);await d.default(this.dbPath,Buffer.from(a)),e()}))}))}}var p,w;function b(t){return function(e,i,a){const r=a.value;a.value=async function(...e){t===w.createMany?e=[e=(e=e[0]).map((t=>g(t)))]:t===w.create?e[0]=g(e[0]):t===w.updateMany?e=[e=(e=e[0]).map((t=>m(t)))]:m(e[1]);return await r.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 m(t){return 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",t[t.updateMany=3]="updateMany"}(w||(w={}));class v{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(){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 a=i.find((e=>e.id===t))||{};return Object.assign(a,e),await this.db.write(),!0}return!1}async updateMany(t){const e=await this.getCollection();let i=0;for(const a of t)if(a.id){if(await this.getCollectionKey(a.id)){i++;const t=e.find((t=>t.id===a.id))||{};Object.assign(t,a)}}return await this.db.write(),{success:i,total:t.length}}async getById(t){return(await this.getCollection()).find((e=>e.id===t))}async removeById(t){const e=await this.getCollection(),i=await this.getCollectionKeyMap(),a=e.findIndex((e=>e.id===t));-1!==a&&(e.splice(a,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)}}h([b(w.create)],v.prototype,"insert",null),h([b(w.createMany)],v.prototype,"insertMany",null),h([b(w.update)],v.prototype,"updateById",null),h([b(w.updateMany)],v.prototype,"updateMany",null);class C{constructor(e){this.dbPath=e,this.adapter=new t.TextFileSync(e)}read(){const t=this.adapter.read();if(null===t)return{};try{const e=l.default.parse(t||"{}");return null===e||"object"!=typeof e?{}:e}catch(e){try{return JSON.parse(t)}catch(t){return console.error("[PicGo store] JSON parse error",t),{}}}}write(t){d.default.sync(this.dbPath,l.default.stringify(t,null,2))}}class M extends t.LowSync{constructor(){super(...arguments),this.chain=u.default.chain(this).get("data")}}exports.DBStore=v,exports.JSONStore=class{constructor(t){if(this.hasRead=!1,!t)throw Error("Please provide valid dbPath");const e=new C(t);this.db=new M(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}};
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ export declare type IInsertData = IObject[] | [string, IObject] | [IObject[]];
|
|
|
21
21
|
export declare enum IMetaInfoMode {
|
|
22
22
|
createMany = 0,
|
|
23
23
|
create = 1,
|
|
24
|
-
update = 2
|
|
24
|
+
update = 2,
|
|
25
|
+
updateMany = 3
|
|
25
26
|
}
|
|
26
27
|
export declare type IResult<T> = T & {
|
|
27
28
|
id: string;
|