@picgo/store 1.0.1 → 2.0.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 +36 -0
- package/README.md +50 -5
- package/coverage/clover.xml +164 -105
- package/coverage/coverage-final.json +6 -5
- package/coverage/lcov-report/index.html +20 -20
- package/coverage/lcov-report/src/DBStore.ts.html +227 -62
- package/coverage/lcov-report/src/JSONStore.ts.html +58 -28
- package/coverage/lcov-report/src/adapters/JSONAdapter.ts.html +148 -0
- package/coverage/lcov-report/src/adapters/ZlibAdapter.ts.html +89 -47
- package/coverage/lcov-report/src/adapters/index.html +23 -8
- package/coverage/lcov-report/src/index.html +14 -14
- package/coverage/lcov-report/src/types/index.html +5 -5
- package/coverage/lcov-report/src/types/index.ts.html +73 -4
- package/coverage/lcov-report/src/utils/index.html +7 -7
- package/coverage/lcov-report/src/utils/metaInfoHelper.ts.html +22 -34
- package/coverage/lcov.info +314 -196
- package/dist/DBStore.d.ts +15 -7
- package/dist/JSONStore.d.ts +3 -2
- package/dist/adapters/JSONAdapter.d.ts +7 -0
- package/dist/adapters/ZlibAdapter.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/types/index.d.ts +21 -2
- package/package.json +12 -6
- package/rollup.config.js +7 -3
package/coverage/lcov.info
CHANGED
|
@@ -1,179 +1,300 @@
|
|
|
1
1
|
TN:
|
|
2
2
|
SF:/home/runner/work/store/store/src/DBStore.ts
|
|
3
|
-
FN:
|
|
4
|
-
FN:
|
|
5
|
-
FN:
|
|
6
|
-
FN:
|
|
7
|
-
FN:
|
|
8
|
-
FN:
|
|
9
|
-
FN:
|
|
10
|
-
FN:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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)
|
|
20
|
+
FNF:17
|
|
21
|
+
FNH:17
|
|
22
|
+
FNDA:18,(anonymous_0)
|
|
23
|
+
FNDA:1,(anonymous_1)
|
|
24
|
+
FNDA:56,(anonymous_2)
|
|
25
|
+
FNDA:18,(anonymous_3)
|
|
26
|
+
FNDA:33,(anonymous_4)
|
|
27
|
+
FNDA:12,(anonymous_5)
|
|
28
|
+
FNDA:13,(anonymous_6)
|
|
29
|
+
FNDA:8,(anonymous_7)
|
|
30
|
+
FNDA:9,(anonymous_8)
|
|
31
|
+
FNDA:2,(anonymous_9)
|
|
32
|
+
FNDA:3,(anonymous_10)
|
|
33
|
+
FNDA:5,(anonymous_11)
|
|
34
|
+
FNDA:3,(anonymous_12)
|
|
35
|
+
FNDA:4,(anonymous_13)
|
|
36
|
+
FNDA:1,(anonymous_14)
|
|
37
|
+
FNDA:1,(anonymous_15)
|
|
38
|
+
FNDA:1,(anonymous_16)
|
|
24
39
|
DA:4,1
|
|
25
|
-
DA:
|
|
26
|
-
DA:
|
|
27
|
-
DA:
|
|
28
|
-
DA:
|
|
29
|
-
DA:
|
|
30
|
-
DA:
|
|
31
|
-
DA:
|
|
32
|
-
DA:
|
|
33
|
-
DA:
|
|
34
|
-
DA:
|
|
35
|
-
DA:
|
|
36
|
-
DA:
|
|
37
|
-
DA:
|
|
38
|
-
DA:
|
|
39
|
-
DA:
|
|
40
|
-
DA:
|
|
41
|
-
DA:40,
|
|
42
|
-
DA:
|
|
43
|
-
DA:
|
|
44
|
-
DA:
|
|
45
|
-
DA:
|
|
40
|
+
DA:5,1
|
|
41
|
+
DA:6,1
|
|
42
|
+
DA:7,1
|
|
43
|
+
DA:13,18
|
|
44
|
+
DA:14,18
|
|
45
|
+
DA:18,18
|
|
46
|
+
DA:19,2
|
|
47
|
+
DA:21,16
|
|
48
|
+
DA:22,16
|
|
49
|
+
DA:23,16
|
|
50
|
+
DA:24,16
|
|
51
|
+
DA:28,1
|
|
52
|
+
DA:32,56
|
|
53
|
+
DA:33,16
|
|
54
|
+
DA:34,16
|
|
55
|
+
DA:36,56
|
|
56
|
+
DA:40,18
|
|
57
|
+
DA:41,18
|
|
58
|
+
DA:42,18
|
|
59
|
+
DA:43,6
|
|
60
|
+
DA:44,1
|
|
61
|
+
DA:46,6
|
|
62
|
+
DA:47,1
|
|
63
|
+
DA:49,6
|
|
46
64
|
DA:50,1
|
|
47
|
-
DA:
|
|
48
|
-
DA:
|
|
49
|
-
DA:
|
|
50
|
-
DA:
|
|
51
|
-
DA:
|
|
52
|
-
DA:
|
|
53
|
-
DA:
|
|
54
|
-
DA:
|
|
55
|
-
DA:64,2
|
|
56
|
-
DA:66,1
|
|
57
|
-
DA:71,3
|
|
65
|
+
DA:53,18
|
|
66
|
+
DA:60,33
|
|
67
|
+
DA:64,12
|
|
68
|
+
DA:68,13
|
|
69
|
+
DA:72,8
|
|
70
|
+
DA:73,8
|
|
71
|
+
DA:74,8
|
|
72
|
+
DA:75,8
|
|
58
73
|
DA:79,1
|
|
59
|
-
DA:
|
|
60
|
-
DA:
|
|
61
|
-
DA:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
DA:80,9
|
|
75
|
+
DA:81,9
|
|
76
|
+
DA:83,9
|
|
77
|
+
DA:84,1
|
|
78
|
+
DA:85,1
|
|
79
|
+
DA:87,8
|
|
80
|
+
DA:88,8
|
|
81
|
+
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
|
|
88
|
+
DA:101,2
|
|
89
|
+
DA:105,1
|
|
90
|
+
DA:106,3
|
|
91
|
+
DA:107,3
|
|
92
|
+
DA:108,3
|
|
93
|
+
DA:109,5
|
|
94
|
+
DA:110,2
|
|
95
|
+
DA:111,2
|
|
96
|
+
DA:112,2
|
|
97
|
+
DA:114,1
|
|
98
|
+
DA:119,4
|
|
99
|
+
DA:123,1
|
|
100
|
+
DA:124,1
|
|
101
|
+
DA:125,1
|
|
102
|
+
DA:126,1
|
|
103
|
+
DA:127,1
|
|
104
|
+
DA:128,1
|
|
105
|
+
DA:129,1
|
|
106
|
+
DA:134,1
|
|
107
|
+
DA:135,1
|
|
108
|
+
DA:136,1
|
|
109
|
+
DA:137,1
|
|
110
|
+
DA:142,1
|
|
111
|
+
LF:72
|
|
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
|
|
79
153
|
end_of_record
|
|
80
154
|
TN:
|
|
81
155
|
SF:/home/runner/work/store/store/src/JSONStore.ts
|
|
82
156
|
FN:6,(anonymous_0)
|
|
83
|
-
FN:
|
|
84
|
-
FN:
|
|
85
|
-
FN:
|
|
86
|
-
FN:
|
|
87
|
-
FN:
|
|
88
|
-
FN:
|
|
157
|
+
FN:12,(anonymous_1)
|
|
158
|
+
FN:21,(anonymous_2)
|
|
159
|
+
FN:30,(anonymous_3)
|
|
160
|
+
FN:34,(anonymous_4)
|
|
161
|
+
FN:39,(anonymous_5)
|
|
162
|
+
FN:43,(anonymous_6)
|
|
89
163
|
FNF:7
|
|
90
164
|
FNH:7
|
|
91
165
|
FNDA:5,(anonymous_0)
|
|
92
|
-
FNDA:
|
|
166
|
+
FNDA:6,(anonymous_1)
|
|
93
167
|
FNDA:6,(anonymous_2)
|
|
94
|
-
FNDA:
|
|
95
|
-
FNDA:
|
|
168
|
+
FNDA:4,(anonymous_3)
|
|
169
|
+
FNDA:2,(anonymous_4)
|
|
96
170
|
FNDA:1,(anonymous_5)
|
|
97
171
|
FNDA:1,(anonymous_6)
|
|
98
172
|
DA:1,1
|
|
99
173
|
DA:2,1
|
|
100
174
|
DA:3,1
|
|
101
175
|
DA:7,5
|
|
102
|
-
DA:
|
|
103
|
-
DA:
|
|
104
|
-
DA:
|
|
105
|
-
DA:16,
|
|
106
|
-
DA:
|
|
107
|
-
DA:
|
|
108
|
-
DA:
|
|
109
|
-
DA:
|
|
110
|
-
DA:
|
|
111
|
-
DA:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
176
|
+
DA:11,6
|
|
177
|
+
DA:13,6
|
|
178
|
+
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
|
|
186
|
+
DA:31,4
|
|
187
|
+
DA:35,2
|
|
188
|
+
DA:36,2
|
|
189
|
+
DA:40,1
|
|
190
|
+
DA:44,1
|
|
191
|
+
DA:45,1
|
|
192
|
+
DA:46,1
|
|
193
|
+
DA:51,1
|
|
194
|
+
LF:22
|
|
195
|
+
LH:22
|
|
196
|
+
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
|
|
202
|
+
BRDA:30,4,0,1
|
|
203
|
+
BRF:7
|
|
204
|
+
BRH:7
|
|
205
|
+
end_of_record
|
|
206
|
+
TN:
|
|
207
|
+
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)
|
|
211
|
+
FNF:3
|
|
212
|
+
FNH:3
|
|
213
|
+
FNDA:5,(anonymous_0)
|
|
214
|
+
FNDA:6,(anonymous_1)
|
|
215
|
+
FNDA:3,(anonymous_2)
|
|
216
|
+
DA:1,1
|
|
217
|
+
DA:2,1
|
|
218
|
+
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
|
|
119
231
|
end_of_record
|
|
120
232
|
TN:
|
|
121
233
|
SF:/home/runner/work/store/store/src/adapters/ZlibAdapter.ts
|
|
122
|
-
FN:
|
|
123
|
-
FN:
|
|
124
|
-
FN:
|
|
125
|
-
FN:
|
|
126
|
-
FN:
|
|
127
|
-
FN:
|
|
128
|
-
FN:
|
|
129
|
-
FN:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
FNDA:8,(anonymous_0)
|
|
234
|
+
FN:17,(anonymous_0)
|
|
235
|
+
FN:23,(anonymous_1)
|
|
236
|
+
FN:29,(anonymous_2)
|
|
237
|
+
FN:32,(anonymous_3)
|
|
238
|
+
FN:53,(anonymous_4)
|
|
239
|
+
FN:63,(anonymous_5)
|
|
240
|
+
FN:64,(anonymous_6)
|
|
241
|
+
FN:66,(anonymous_7)
|
|
242
|
+
FNF:8
|
|
243
|
+
FNH:8
|
|
244
|
+
FNDA:16,(anonymous_0)
|
|
134
245
|
FNDA:16,(anonymous_1)
|
|
135
246
|
FNDA:16,(anonymous_2)
|
|
136
247
|
FNDA:15,(anonymous_3)
|
|
137
|
-
FNDA:
|
|
138
|
-
FNDA:
|
|
139
|
-
FNDA:
|
|
140
|
-
FNDA:
|
|
141
|
-
FNDA:14,(anonymous_8)
|
|
142
|
-
DA:3,1
|
|
248
|
+
FNDA:1,(anonymous_4)
|
|
249
|
+
FNDA:8,(anonymous_5)
|
|
250
|
+
FNDA:8,(anonymous_6)
|
|
251
|
+
FNDA:8,(anonymous_7)
|
|
143
252
|
DA:4,1
|
|
144
253
|
DA:5,1
|
|
254
|
+
DA:6,1
|
|
145
255
|
DA:7,1
|
|
146
|
-
DA:
|
|
147
|
-
DA:15,
|
|
256
|
+
DA:9,1
|
|
257
|
+
DA:15,16
|
|
258
|
+
DA:18,16
|
|
148
259
|
DA:19,16
|
|
149
260
|
DA:20,16
|
|
150
|
-
DA:
|
|
151
|
-
DA:
|
|
152
|
-
DA:
|
|
153
|
-
DA:
|
|
154
|
-
DA:
|
|
155
|
-
DA:
|
|
156
|
-
DA:
|
|
261
|
+
DA:24,16
|
|
262
|
+
DA:25,16
|
|
263
|
+
DA:29,16
|
|
264
|
+
DA:30,16
|
|
265
|
+
DA:31,15
|
|
266
|
+
DA:32,15
|
|
267
|
+
DA:33,15
|
|
268
|
+
DA:34,1
|
|
269
|
+
DA:35,1
|
|
157
270
|
DA:36,1
|
|
158
|
-
DA:
|
|
159
|
-
DA:
|
|
160
|
-
DA:
|
|
161
|
-
DA:
|
|
162
|
-
DA:52,
|
|
163
|
-
DA:
|
|
164
|
-
DA:56,
|
|
165
|
-
DA:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
271
|
+
DA:38,14
|
|
272
|
+
DA:39,14
|
|
273
|
+
DA:40,14
|
|
274
|
+
DA:41,14
|
|
275
|
+
DA:52,1
|
|
276
|
+
DA:53,1
|
|
277
|
+
DA:56,1
|
|
278
|
+
DA:57,1
|
|
279
|
+
DA:64,8
|
|
280
|
+
DA:65,8
|
|
281
|
+
DA:66,8
|
|
282
|
+
DA:69,8
|
|
283
|
+
DA:70,8
|
|
284
|
+
DA:77,1
|
|
285
|
+
LF:33
|
|
286
|
+
LH:33
|
|
287
|
+
BRDA:30,0,0,15
|
|
288
|
+
BRDA:30,0,1,1
|
|
289
|
+
BRDA:33,1,0,1
|
|
290
|
+
BRDA:33,1,1,14
|
|
291
|
+
BRF:4
|
|
292
|
+
BRH:4
|
|
172
293
|
end_of_record
|
|
173
294
|
TN:
|
|
174
295
|
SF:/home/runner/work/store/store/src/types/index.ts
|
|
175
296
|
FN:1,(anonymous_0)
|
|
176
|
-
FN:
|
|
297
|
+
FN:25,(anonymous_1)
|
|
177
298
|
FNF:2
|
|
178
299
|
FNH:2
|
|
179
300
|
FNDA:1,(anonymous_0)
|
|
@@ -183,15 +304,16 @@ DA:2,1
|
|
|
183
304
|
DA:3,1
|
|
184
305
|
DA:4,1
|
|
185
306
|
DA:5,1
|
|
186
|
-
DA:
|
|
187
|
-
DA:
|
|
188
|
-
DA:
|
|
189
|
-
|
|
190
|
-
|
|
307
|
+
DA:25,1
|
|
308
|
+
DA:26,1
|
|
309
|
+
DA:27,1
|
|
310
|
+
DA:28,1
|
|
311
|
+
LF:9
|
|
312
|
+
LH:9
|
|
191
313
|
BRDA:1,0,0,1
|
|
192
314
|
BRDA:1,0,1,1
|
|
193
|
-
BRDA:
|
|
194
|
-
BRDA:
|
|
315
|
+
BRDA:25,1,0,1
|
|
316
|
+
BRDA:25,1,1,1
|
|
195
317
|
BRF:4
|
|
196
318
|
BRH:4
|
|
197
319
|
end_of_record
|
|
@@ -200,64 +322,60 @@ SF:/home/runner/work/store/store/src/utils/metaInfoHelper.ts
|
|
|
200
322
|
FN:3,metaInfoHelper
|
|
201
323
|
FN:4,(anonymous_1)
|
|
202
324
|
FN:6,(anonymous_2)
|
|
203
|
-
FN:
|
|
204
|
-
FN:
|
|
205
|
-
FN:
|
|
206
|
-
FN:
|
|
325
|
+
FN:9,(anonymous_3)
|
|
326
|
+
FN:23,uuid
|
|
327
|
+
FN:25,metaInfoGenerator
|
|
328
|
+
FN:36,metaInfoUpdater
|
|
207
329
|
FNF:7
|
|
208
330
|
FNH:7
|
|
209
331
|
FNDA:3,metaInfoHelper
|
|
210
332
|
FNDA:3,(anonymous_1)
|
|
211
|
-
FNDA:
|
|
212
|
-
FNDA:
|
|
333
|
+
FNDA:14,(anonymous_2)
|
|
334
|
+
FNDA:5,(anonymous_3)
|
|
213
335
|
FNDA:1,uuid
|
|
214
|
-
FNDA:
|
|
336
|
+
FNDA:14,metaInfoGenerator
|
|
215
337
|
FNDA:3,metaInfoUpdater
|
|
216
338
|
DA:1,1
|
|
217
339
|
DA:4,3
|
|
218
340
|
DA:5,3
|
|
219
341
|
DA:6,3
|
|
220
|
-
DA:7,
|
|
221
|
-
DA:8,
|
|
222
|
-
DA:9,
|
|
223
|
-
DA:10,
|
|
224
|
-
DA:11,
|
|
225
|
-
DA:
|
|
226
|
-
DA:14,
|
|
227
|
-
DA:
|
|
228
|
-
DA:
|
|
229
|
-
DA:
|
|
230
|
-
DA:
|
|
342
|
+
DA:7,14
|
|
343
|
+
DA:8,2
|
|
344
|
+
DA:9,5
|
|
345
|
+
DA:10,2
|
|
346
|
+
DA:11,12
|
|
347
|
+
DA:12,9
|
|
348
|
+
DA:14,3
|
|
349
|
+
DA:16,14
|
|
350
|
+
DA:17,14
|
|
351
|
+
DA:23,1
|
|
352
|
+
DA:26,14
|
|
231
353
|
DA:27,1
|
|
354
|
+
DA:29,14
|
|
232
355
|
DA:30,8
|
|
233
|
-
DA:31,
|
|
234
|
-
DA:33,
|
|
235
|
-
DA:
|
|
236
|
-
DA:
|
|
237
|
-
DA:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
BRDA:
|
|
244
|
-
BRDA:
|
|
245
|
-
BRDA:
|
|
246
|
-
BRDA:
|
|
247
|
-
BRDA:
|
|
248
|
-
BRDA:
|
|
249
|
-
BRDA:
|
|
250
|
-
BRDA:
|
|
251
|
-
BRDA:
|
|
252
|
-
BRDA:
|
|
253
|
-
BRDA:
|
|
254
|
-
BRDA:
|
|
255
|
-
BRDA:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
BRDA:30,8,1,7
|
|
259
|
-
BRDA:33,9,0,5
|
|
260
|
-
BRDA:33,9,1,3
|
|
261
|
-
BRF:18
|
|
262
|
-
BRH:18
|
|
356
|
+
DA:31,8
|
|
357
|
+
DA:33,14
|
|
358
|
+
DA:37,3
|
|
359
|
+
DA:38,3
|
|
360
|
+
DA:42,1
|
|
361
|
+
LF:23
|
|
362
|
+
LH:23
|
|
363
|
+
BRDA:7,0,0,2
|
|
364
|
+
BRDA:7,0,1,12
|
|
365
|
+
BRDA:11,1,0,9
|
|
366
|
+
BRDA:11,1,1,3
|
|
367
|
+
BRDA:23,2,0,1
|
|
368
|
+
BRDA:23,3,0,1
|
|
369
|
+
BRDA:23,4,0,32
|
|
370
|
+
BRDA:23,4,1,4
|
|
371
|
+
BRDA:23,5,0,31
|
|
372
|
+
BRDA:23,5,1,1
|
|
373
|
+
BRDA:23,6,0,30
|
|
374
|
+
BRDA:23,6,1,1
|
|
375
|
+
BRDA:26,7,0,1
|
|
376
|
+
BRDA:26,7,1,13
|
|
377
|
+
BRDA:29,8,0,8
|
|
378
|
+
BRDA:29,8,1,6
|
|
379
|
+
BRF:16
|
|
380
|
+
BRH:16
|
|
263
381
|
end_of_record
|
package/dist/DBStore.d.ts
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IObject, IResult } from './types';
|
|
1
|
+
import { ZlibAdapter } from './adapters/ZlibAdapter';
|
|
2
|
+
import { IObject, IResult, IGetResult, IFilter, ILowData } from './types';
|
|
3
3
|
declare class DBStore {
|
|
4
4
|
private readonly db;
|
|
5
5
|
private readonly collectionName;
|
|
6
6
|
private readonly collectionKey;
|
|
7
|
-
private
|
|
7
|
+
private hasRead;
|
|
8
|
+
errorList: Array<Error | string>;
|
|
9
|
+
private readonly adapter;
|
|
8
10
|
constructor(dbPath: string, collectionName: string);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
getAdapter(): ZlibAdapter;
|
|
12
|
+
read(flush?: boolean): Promise<ILowData | null>;
|
|
13
|
+
get(filter?: IFilter): Promise<IGetResult<IObject>>;
|
|
14
|
+
private getCollection;
|
|
15
|
+
private getCollectionKey;
|
|
16
|
+
private getCollectionKeyMap;
|
|
17
|
+
private setCollectionKey;
|
|
18
|
+
insert<T>(value: T, writable?: boolean): Promise<IResult<T>>;
|
|
12
19
|
insertMany<T>(value: T[]): Promise<Array<IResult<T>>>;
|
|
13
20
|
updateById(id: string, value: IObject): Promise<boolean>;
|
|
14
|
-
getById<T>(id: string): Promise<T | undefined>;
|
|
21
|
+
getById<T>(id: string): Promise<IResult<T> | undefined>;
|
|
15
22
|
removeById(id: string): Promise<void>;
|
|
23
|
+
overwrite<T>(value: T[]): Promise<Array<IResult<T>>>;
|
|
16
24
|
}
|
|
17
25
|
export { DBStore };
|
package/dist/JSONStore.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IJSON } from './types';
|
|
2
2
|
declare class JSONStore {
|
|
3
3
|
private readonly db;
|
|
4
|
+
private hasRead;
|
|
4
5
|
constructor(dbPath: string);
|
|
5
|
-
read():
|
|
6
|
+
read(flush?: boolean): IJSON;
|
|
6
7
|
get(key?: string): any;
|
|
7
8
|
set(key: string, value: any): void;
|
|
8
9
|
has(key: string): boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
declare class ZlibAdapter {
|
|
2
2
|
private readonly dbPath;
|
|
3
3
|
private readonly collectionName;
|
|
4
|
-
|
|
4
|
+
errorList: Array<Error | string>;
|
|
5
|
+
readCount: number;
|
|
6
|
+
constructor(dbPath: string, collectionName: string, errorList: Array<Error | string>);
|
|
5
7
|
read(): Promise<any>;
|
|
6
8
|
write(data: any): Promise<void>;
|
|
7
9
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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=
|
|
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
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -13,5 +13,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
function
|
|
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}};
|
|
17
17
|
//# sourceMappingURL=index.js.map
|