You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1269 lines
32 KiB
1269 lines
32 KiB
|
3 years ago
|
<!doctype html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<title>Code coverage report for tar/lib/pack.js</title>
|
||
|
|
<meta charset="utf-8" />
|
||
|
|
<link rel="stylesheet" href="../../prettify.css" />
|
||
|
|
<link rel="stylesheet" href="../../base.css" />
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
|
<style type='text/css'>
|
||
|
|
.coverage-summary .sorter {
|
||
|
|
background-image: url(../../sort-arrow-sprite.png);
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class='wrapper'>
|
||
|
|
<div class='pad1'>
|
||
|
|
<h1>
|
||
|
|
<a href="../../index.html">All files</a> / <a href="index.html">tar/lib</a> pack.js
|
||
|
|
</h1>
|
||
|
|
<div class='clearfix'>
|
||
|
|
<div class='fl pad1y space-right2'>
|
||
|
|
<span class="strong">100% </span>
|
||
|
|
<span class="quiet">Statements</span>
|
||
|
|
<span class='fraction'>228/228</span>
|
||
|
|
</div>
|
||
|
|
<div class='fl pad1y space-right2'>
|
||
|
|
<span class="strong">100% </span>
|
||
|
|
<span class="quiet">Branches</span>
|
||
|
|
<span class='fraction'>123/123</span>
|
||
|
|
</div>
|
||
|
|
<div class='fl pad1y space-right2'>
|
||
|
|
<span class="strong">100% </span>
|
||
|
|
<span class="quiet">Functions</span>
|
||
|
|
<span class='fraction'>44/44</span>
|
||
|
|
</div>
|
||
|
|
<div class='fl pad1y space-right2'>
|
||
|
|
<span class="strong">100% </span>
|
||
|
|
<span class="quiet">Lines</span>
|
||
|
|
<span class='fraction'>222/222</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class='status-line high'></div>
|
||
|
|
<pre><table class="coverage">
|
||
|
|
<tr><td class="line-count quiet">1
|
||
|
|
2
|
||
|
|
3
|
||
|
|
4
|
||
|
|
5
|
||
|
|
6
|
||
|
|
7
|
||
|
|
8
|
||
|
|
9
|
||
|
|
10
|
||
|
|
11
|
||
|
|
12
|
||
|
|
13
|
||
|
|
14
|
||
|
|
15
|
||
|
|
16
|
||
|
|
17
|
||
|
|
18
|
||
|
|
19
|
||
|
|
20
|
||
|
|
21
|
||
|
|
22
|
||
|
|
23
|
||
|
|
24
|
||
|
|
25
|
||
|
|
26
|
||
|
|
27
|
||
|
|
28
|
||
|
|
29
|
||
|
|
30
|
||
|
|
31
|
||
|
|
32
|
||
|
|
33
|
||
|
|
34
|
||
|
|
35
|
||
|
|
36
|
||
|
|
37
|
||
|
|
38
|
||
|
|
39
|
||
|
|
40
|
||
|
|
41
|
||
|
|
42
|
||
|
|
43
|
||
|
|
44
|
||
|
|
45
|
||
|
|
46
|
||
|
|
47
|
||
|
|
48
|
||
|
|
49
|
||
|
|
50
|
||
|
|
51
|
||
|
|
52
|
||
|
|
53
|
||
|
|
54
|
||
|
|
55
|
||
|
|
56
|
||
|
|
57
|
||
|
|
58
|
||
|
|
59
|
||
|
|
60
|
||
|
|
61
|
||
|
|
62
|
||
|
|
63
|
||
|
|
64
|
||
|
|
65
|
||
|
|
66
|
||
|
|
67
|
||
|
|
68
|
||
|
|
69
|
||
|
|
70
|
||
|
|
71
|
||
|
|
72
|
||
|
|
73
|
||
|
|
74
|
||
|
|
75
|
||
|
|
76
|
||
|
|
77
|
||
|
|
78
|
||
|
|
79
|
||
|
|
80
|
||
|
|
81
|
||
|
|
82
|
||
|
|
83
|
||
|
|
84
|
||
|
|
85
|
||
|
|
86
|
||
|
|
87
|
||
|
|
88
|
||
|
|
89
|
||
|
|
90
|
||
|
|
91
|
||
|
|
92
|
||
|
|
93
|
||
|
|
94
|
||
|
|
95
|
||
|
|
96
|
||
|
|
97
|
||
|
|
98
|
||
|
|
99
|
||
|
|
100
|
||
|
|
101
|
||
|
|
102
|
||
|
|
103
|
||
|
|
104
|
||
|
|
105
|
||
|
|
106
|
||
|
|
107
|
||
|
|
108
|
||
|
|
109
|
||
|
|
110
|
||
|
|
111
|
||
|
|
112
|
||
|
|
113
|
||
|
|
114
|
||
|
|
115
|
||
|
|
116
|
||
|
|
117
|
||
|
|
118
|
||
|
|
119
|
||
|
|
120
|
||
|
|
121
|
||
|
|
122
|
||
|
|
123
|
||
|
|
124
|
||
|
|
125
|
||
|
|
126
|
||
|
|
127
|
||
|
|
128
|
||
|
|
129
|
||
|
|
130
|
||
|
|
131
|
||
|
|
132
|
||
|
|
133
|
||
|
|
134
|
||
|
|
135
|
||
|
|
136
|
||
|
|
137
|
||
|
|
138
|
||
|
|
139
|
||
|
|
140
|
||
|
|
141
|
||
|
|
142
|
||
|
|
143
|
||
|
|
144
|
||
|
|
145
|
||
|
|
146
|
||
|
|
147
|
||
|
|
148
|
||
|
|
149
|
||
|
|
150
|
||
|
|
151
|
||
|
|
152
|
||
|
|
153
|
||
|
|
154
|
||
|
|
155
|
||
|
|
156
|
||
|
|
157
|
||
|
|
158
|
||
|
|
159
|
||
|
|
160
|
||
|
|
161
|
||
|
|
162
|
||
|
|
163
|
||
|
|
164
|
||
|
|
165
|
||
|
|
166
|
||
|
|
167
|
||
|
|
168
|
||
|
|
169
|
||
|
|
170
|
||
|
|
171
|
||
|
|
172
|
||
|
|
173
|
||
|
|
174
|
||
|
|
175
|
||
|
|
176
|
||
|
|
177
|
||
|
|
178
|
||
|
|
179
|
||
|
|
180
|
||
|
|
181
|
||
|
|
182
|
||
|
|
183
|
||
|
|
184
|
||
|
|
185
|
||
|
|
186
|
||
|
|
187
|
||
|
|
188
|
||
|
|
189
|
||
|
|
190
|
||
|
|
191
|
||
|
|
192
|
||
|
|
193
|
||
|
|
194
|
||
|
|
195
|
||
|
|
196
|
||
|
|
197
|
||
|
|
198
|
||
|
|
199
|
||
|
|
200
|
||
|
|
201
|
||
|
|
202
|
||
|
|
203
|
||
|
|
204
|
||
|
|
205
|
||
|
|
206
|
||
|
|
207
|
||
|
|
208
|
||
|
|
209
|
||
|
|
210
|
||
|
|
211
|
||
|
|
212
|
||
|
|
213
|
||
|
|
214
|
||
|
|
215
|
||
|
|
216
|
||
|
|
217
|
||
|
|
218
|
||
|
|
219
|
||
|
|
220
|
||
|
|
221
|
||
|
|
222
|
||
|
|
223
|
||
|
|
224
|
||
|
|
225
|
||
|
|
226
|
||
|
|
227
|
||
|
|
228
|
||
|
|
229
|
||
|
|
230
|
||
|
|
231
|
||
|
|
232
|
||
|
|
233
|
||
|
|
234
|
||
|
|
235
|
||
|
|
236
|
||
|
|
237
|
||
|
|
238
|
||
|
|
239
|
||
|
|
240
|
||
|
|
241
|
||
|
|
242
|
||
|
|
243
|
||
|
|
244
|
||
|
|
245
|
||
|
|
246
|
||
|
|
247
|
||
|
|
248
|
||
|
|
249
|
||
|
|
250
|
||
|
|
251
|
||
|
|
252
|
||
|
|
253
|
||
|
|
254
|
||
|
|
255
|
||
|
|
256
|
||
|
|
257
|
||
|
|
258
|
||
|
|
259
|
||
|
|
260
|
||
|
|
261
|
||
|
|
262
|
||
|
|
263
|
||
|
|
264
|
||
|
|
265
|
||
|
|
266
|
||
|
|
267
|
||
|
|
268
|
||
|
|
269
|
||
|
|
270
|
||
|
|
271
|
||
|
|
272
|
||
|
|
273
|
||
|
|
274
|
||
|
|
275
|
||
|
|
276
|
||
|
|
277
|
||
|
|
278
|
||
|
|
279
|
||
|
|
280
|
||
|
|
281
|
||
|
|
282
|
||
|
|
283
|
||
|
|
284
|
||
|
|
285
|
||
|
|
286
|
||
|
|
287
|
||
|
|
288
|
||
|
|
289
|
||
|
|
290
|
||
|
|
291
|
||
|
|
292
|
||
|
|
293
|
||
|
|
294
|
||
|
|
295
|
||
|
|
296
|
||
|
|
297
|
||
|
|
298
|
||
|
|
299
|
||
|
|
300
|
||
|
|
301
|
||
|
|
302
|
||
|
|
303
|
||
|
|
304
|
||
|
|
305
|
||
|
|
306
|
||
|
|
307
|
||
|
|
308
|
||
|
|
309
|
||
|
|
310
|
||
|
|
311
|
||
|
|
312
|
||
|
|
313
|
||
|
|
314
|
||
|
|
315
|
||
|
|
316
|
||
|
|
317
|
||
|
|
318
|
||
|
|
319
|
||
|
|
320
|
||
|
|
321
|
||
|
|
322
|
||
|
|
323
|
||
|
|
324
|
||
|
|
325
|
||
|
|
326
|
||
|
|
327
|
||
|
|
328
|
||
|
|
329
|
||
|
|
330
|
||
|
|
331
|
||
|
|
332
|
||
|
|
333
|
||
|
|
334
|
||
|
|
335
|
||
|
|
336
|
||
|
|
337
|
||
|
|
338
|
||
|
|
339
|
||
|
|
340
|
||
|
|
341
|
||
|
|
342
|
||
|
|
343
|
||
|
|
344
|
||
|
|
345
|
||
|
|
346
|
||
|
|
347
|
||
|
|
348
|
||
|
|
349
|
||
|
|
350
|
||
|
|
351
|
||
|
|
352
|
||
|
|
353
|
||
|
|
354
|
||
|
|
355
|
||
|
|
356
|
||
|
|
357
|
||
|
|
358
|
||
|
|
359
|
||
|
|
360
|
||
|
|
361
|
||
|
|
362
|
||
|
|
363
|
||
|
|
364
|
||
|
|
365
|
||
|
|
366
|
||
|
|
367
|
||
|
|
368
|
||
|
|
369
|
||
|
|
370
|
||
|
|
371
|
||
|
|
372
|
||
|
|
373
|
||
|
|
374
|
||
|
|
375
|
||
|
|
376
|
||
|
|
377
|
||
|
|
378
|
||
|
|
379
|
||
|
|
380
|
||
|
|
381
|
||
|
|
382
|
||
|
|
383
|
||
|
|
384
|
||
|
|
385
|
||
|
|
386
|
||
|
|
387
|
||
|
|
388
|
||
|
|
389
|
||
|
|
390
|
||
|
|
391
|
||
|
|
392
|
||
|
|
393
|
||
|
|
394
|
||
|
|
395
|
||
|
|
396
|
||
|
|
397
|
||
|
|
398
|
||
|
|
399
|
||
|
|
400
|
||
|
|
401
|
||
|
|
402</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-yes">6566x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">3x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">4x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">503x</span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-yes">146x</span>
|
||
|
|
<span class="cline-any cline-yes">219x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">117x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6507x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-yes">122x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">106x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">107x</span>
|
||
|
|
<span class="cline-any cline-yes">103x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">100x</span>
|
||
|
|
<span class="cline-any cline-yes">21x</span>
|
||
|
|
<span class="cline-any cline-yes">99x</span>
|
||
|
|
<span class="cline-any cline-yes">99x</span>
|
||
|
|
<span class="cline-any cline-yes">99x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">128x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">127x</span>
|
||
|
|
<span class="cline-any cline-yes">27x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">100x</span>
|
||
|
|
<span class="cline-any cline-yes">123x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">27x</span>
|
||
|
|
<span class="cline-any cline-yes">27x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">27x</span>
|
||
|
|
<span class="cline-any cline-yes">2x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">27x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6541x</span>
|
||
|
|
<span class="cline-any cline-yes">6541x</span>
|
||
|
|
<span class="cline-any cline-yes">34x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6541x</span>
|
||
|
|
<span class="cline-any cline-yes">6541x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6452x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6538x</span>
|
||
|
|
<span class="cline-any cline-yes">6538x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6538x</span>
|
||
|
|
<span class="cline-any cline-yes">24x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6538x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-yes">820x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">858x</span>
|
||
|
|
<span class="cline-any cline-yes">858x</span>
|
||
|
|
<span class="cline-any cline-yes">858x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">20596x</span>
|
||
|
|
<span class="cline-any cline-yes">9093x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">11503x</span>
|
||
|
|
<span class="cline-any cline-yes">11503x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">38739x</span>
|
||
|
|
<span class="cline-any cline-yes">38735x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-yes">25x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">11499x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">11499x</span>
|
||
|
|
<span class="cline-any cline-yes">96x</span>
|
||
|
|
<span class="cline-any cline-yes">4x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">92x</span>
|
||
|
|
<span class="cline-any cline-yes">92x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">25863x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6533x</span>
|
||
|
|
<span class="cline-any cline-yes">6533x</span>
|
||
|
|
<span class="cline-any cline-yes">6533x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">38739x</span>
|
||
|
|
<span class="cline-any cline-yes">6156x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">32583x</span>
|
||
|
|
<span class="cline-any cline-yes">18770x</span>
|
||
|
|
<span class="cline-any cline-yes">4954x</span>
|
||
|
|
<span class="cline-any cline-yes">18770x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">13813x</span>
|
||
|
|
<span class="cline-any cline-yes">6541x</span>
|
||
|
|
<span class="cline-any cline-yes">4x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6537x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">13811x</span>
|
||
|
|
<span class="cline-any cline-yes">6453x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">7358x</span>
|
||
|
|
<span class="cline-any cline-yes">24x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">7334x</span>
|
||
|
|
<span class="cline-any cline-yes">860x</span>
|
||
|
|
<span class="cline-any cline-yes">2x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">858x</span>
|
||
|
|
<span class="cline-any cline-yes">859x</span>
|
||
|
|
<span class="cline-any cline-yes">821x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6512x</span>
|
||
|
|
<span class="cline-any cline-yes">6511x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6510x</span>
|
||
|
|
<span class="cline-any cline-yes">1581x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6537x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6512x</span>
|
||
|
|
<span class="cline-any cline-yes">6512x</span>
|
||
|
|
<span class="cline-any cline-yes">6512x</span>
|
||
|
|
<span class="cline-any cline-yes">6508x</span>
|
||
|
|
<span class="cline-any cline-yes">1x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">2x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">248x</span>
|
||
|
|
<span class="cline-any cline-yes">158x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6448x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6448x</span>
|
||
|
|
<span class="cline-any cline-yes">820x</span>
|
||
|
|
<span class="cline-any cline-yes">6393x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6393x</span>
|
||
|
|
<span class="cline-any cline-yes">6393x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6448x</span>
|
||
|
|
<span class="cline-any cline-yes">6448x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">6448x</span>
|
||
|
|
<span class="cline-any cline-yes">6336x</span>
|
||
|
|
<span class="cline-any cline-yes">11830x</span>
|
||
|
|
<span class="cline-any cline-yes">156x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">112x</span>
|
||
|
|
<span class="cline-any cline-yes">199x</span>
|
||
|
|
<span class="cline-any cline-yes">53x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">265x</span>
|
||
|
|
<span class="cline-any cline-yes">214x</span>
|
||
|
|
<span class="cline-any cline-yes">265x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">47x</span>
|
||
|
|
<span class="cline-any cline-yes">47x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">84x</span>
|
||
|
|
<span class="cline-any cline-yes">84x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">37x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">87x</span>
|
||
|
|
<span class="cline-any cline-yes">87x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">87x</span>
|
||
|
|
<span class="cline-any cline-yes">38x</span>
|
||
|
|
<span class="cline-any cline-yes">48x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">48x</span>
|
||
|
|
<span class="cline-any cline-yes">48x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">87x</span>
|
||
|
|
<span class="cline-any cline-yes">31x</span>
|
||
|
|
<span class="cline-any cline-yes">39x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">56x</span>
|
||
|
|
<span class="cline-any cline-yes">106x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span>
|
||
|
|
<span class="cline-any cline-yes">5x</span>
|
||
|
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">'use strict'
|
||
|
|
|
||
|
|
// A readable tar stream creator
|
||
|
|
// Technically, this is a transform stream that you write paths into,
|
||
|
|
// and tar format comes out of.
|
||
|
|
// The `add()` method is like `write()` but returns this,
|
||
|
|
// and end() return `this` as well, so you can
|
||
|
|
// do `new Pack(opt).add('files').add('dir').end().pipe(output)
|
||
|
|
// You could also do something like:
|
||
|
|
// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))
|
||
|
|
|
||
|
|
class PackJob {
|
||
|
|
constructor (path, absolute) {
|
||
|
|
this.path = path || './'
|
||
|
|
this.absolute = absolute
|
||
|
|
this.entry = null
|
||
|
|
this.stat = null
|
||
|
|
this.readdir = null
|
||
|
|
this.pending = false
|
||
|
|
this.ignore = false
|
||
|
|
this.piped = false
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const MiniPass = require('minipass')
|
||
|
|
const zlib = require('minizlib')
|
||
|
|
const ReadEntry = require('./read-entry.js')
|
||
|
|
const WriteEntry = require('./write-entry.js')
|
||
|
|
const WriteEntrySync = WriteEntry.Sync
|
||
|
|
const WriteEntryTar = WriteEntry.Tar
|
||
|
|
const Yallist = require('yallist')
|
||
|
|
const EOF = Buffer.alloc(1024)
|
||
|
|
const ONSTAT = Symbol('onStat')
|
||
|
|
const ENDED = Symbol('ended')
|
||
|
|
const QUEUE = Symbol('queue')
|
||
|
|
const CURRENT = Symbol('current')
|
||
|
|
const PROCESS = Symbol('process')
|
||
|
|
const PROCESSING = Symbol('processing')
|
||
|
|
const PROCESSJOB = Symbol('processJob')
|
||
|
|
const JOBS = Symbol('jobs')
|
||
|
|
const JOBDONE = Symbol('jobDone')
|
||
|
|
const ADDFSENTRY = Symbol('addFSEntry')
|
||
|
|
const ADDTARENTRY = Symbol('addTarEntry')
|
||
|
|
const STAT = Symbol('stat')
|
||
|
|
const READDIR = Symbol('readdir')
|
||
|
|
const ONREADDIR = Symbol('onreaddir')
|
||
|
|
const PIPE = Symbol('pipe')
|
||
|
|
const ENTRY = Symbol('entry')
|
||
|
|
const ENTRYOPT = Symbol('entryOpt')
|
||
|
|
const WRITEENTRYCLASS = Symbol('writeEntryClass')
|
||
|
|
const WRITE = Symbol('write')
|
||
|
|
const ONDRAIN = Symbol('ondrain')
|
||
|
|
|
||
|
|
const fs = require('fs')
|
||
|
|
const path = require('path')
|
||
|
|
const warner = require('./warn-mixin.js')
|
||
|
|
|
||
|
|
const Pack = warner(class Pack extends MiniPass {
|
||
|
|
constructor (opt) {
|
||
|
|
super(opt)
|
||
|
|
opt = opt || Object.create(null)
|
||
|
|
this.opt = opt
|
||
|
|
this.cwd = opt.cwd || process.cwd()
|
||
|
|
this.maxReadSize = opt.maxReadSize
|
||
|
|
this.preservePaths = !!opt.preservePaths
|
||
|
|
this.strict = !!opt.strict
|
||
|
|
this.noPax = !!opt.noPax
|
||
|
|
this.prefix = (opt.prefix || '').replace(/(\\|\/)+$/, '')
|
||
|
|
this.linkCache = opt.linkCache || new Map()
|
||
|
|
this.statCache = opt.statCache || new Map()
|
||
|
|
this.readdirCache = opt.readdirCache || new Map()
|
||
|
|
this[WRITEENTRYCLASS] = WriteEntry
|
||
|
|
if (typeof opt.onwarn === 'function')
|
||
|
|
this.on('warn', opt.onwarn)
|
||
|
|
|
||
|
|
this.zip = null
|
||
|
|
if (opt.gzip) {
|
||
|
|
if (typeof opt.gzip !== 'object')
|
||
|
|
opt.gzip = {}
|
||
|
|
this.zip = new zlib.Gzip(opt.gzip)
|
||
|
|
this.zip.on('data', chunk => super.write(chunk))
|
||
|
|
this.zip.on('end', _ => super.end())
|
||
|
|
this.zip.on('drain', _ => this[ONDRAIN]())
|
||
|
|
this.on('resume', _ => this.zip.resume())
|
||
|
|
} else
|
||
|
|
this.on('drain', this[ONDRAIN])
|
||
|
|
|
||
|
|
this.portable = !!opt.portable
|
||
|
|
this.noDirRecurse = !!opt.noDirRecurse
|
||
|
|
this.follow = !!opt.follow
|
||
|
|
this.noMtime = !!opt.noMtime
|
||
|
|
|
||
|
|
|
||
|
|
this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
|
||
|
|
|
||
|
|
this[QUEUE] = new Yallist
|
||
|
|
this[JOBS] = 0
|
||
|
|
this.jobs = +opt.jobs || 4
|
||
|
|
this[PROCESSING] = false
|
||
|
|
this[ENDED] = false
|
||
|
|
}
|
||
|
|
|
||
|
|
[WRITE] (chunk) {
|
||
|
|
return super.write(chunk)
|
||
|
|
}
|
||
|
|
|
||
|
|
add (path) {
|
||
|
|
this.write(path)
|
||
|
|
return this
|
||
|
|
}
|
||
|
|
|
||
|
|
end (path) {
|
||
|
|
if (path)
|
||
|
|
this.write(path)
|
||
|
|
this[ENDED] = true
|
||
|
|
this[PROCESS]()
|
||
|
|
return this
|
||
|
|
}
|
||
|
|
|
||
|
|
write (path) {
|
||
|
|
if (this[ENDED])
|
||
|
|
throw new Error('write after end')
|
||
|
|
|
||
|
|
if (path instanceof ReadEntry)
|
||
|
|
this[ADDTARENTRY](path)
|
||
|
|
else
|
||
|
|
this[ADDFSENTRY](path)
|
||
|
|
return this.flowing
|
||
|
|
}
|
||
|
|
|
||
|
|
[ADDTARENTRY] (p) {
|
||
|
|
const absolute = path.resolve(this.cwd, p.path)
|
||
|
|
if (this.prefix)
|
||
|
|
p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '')
|
||
|
|
|
||
|
|
// in this case, we don't have to wait for the stat
|
||
|
|
if (!this.filter(p.path, p))
|
||
|
|
p.resume()
|
||
|
|
else {
|
||
|
|
const job = new PackJob(p.path, absolute, false)
|
||
|
|
job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))
|
||
|
|
job.entry.on('end', _ => this[JOBDONE](job))
|
||
|
|
this[JOBS] += 1
|
||
|
|
this[QUEUE].push(job)
|
||
|
|
}
|
||
|
|
|
||
|
|
this[PROCESS]()
|
||
|
|
}
|
||
|
|
|
||
|
|
[ADDFSENTRY] (p) {
|
||
|
|
const absolute = path.resolve(this.cwd, p)
|
||
|
|
if (this.prefix)
|
||
|
|
p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '')
|
||
|
|
|
||
|
|
this[QUEUE].push(new PackJob(p, absolute))
|
||
|
|
this[PROCESS]()
|
||
|
|
}
|
||
|
|
|
||
|
|
[STAT] (job) {
|
||
|
|
job.pending = true
|
||
|
|
this[JOBS] += 1
|
||
|
|
const stat = this.follow ? 'stat' : 'lstat'
|
||
|
|
fs[stat](job.absolute, (er, stat) => {
|
||
|
|
job.pending = false
|
||
|
|
this[JOBS] -= 1
|
||
|
|
if (er)
|
||
|
|
this.emit('error', er)
|
||
|
|
else
|
||
|
|
this[ONSTAT](job, stat)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
[ONSTAT] (job, stat) {
|
||
|
|
this.statCache.set(job.absolute, stat)
|
||
|
|
job.stat = stat
|
||
|
|
|
||
|
|
// now we have the stat, we can filter it.
|
||
|
|
if (!this.filter(job.path, stat))
|
||
|
|
job.ignore = true
|
||
|
|
|
||
|
|
this[PROCESS]()
|
||
|
|
}
|
||
|
|
|
||
|
|
[READDIR] (job) {
|
||
|
|
job.pending = true
|
||
|
|
this[JOBS] += 1
|
||
|
|
fs.readdir(job.absolute, (er, entries) => {
|
||
|
|
job.pending = false
|
||
|
|
this[JOBS] -= 1
|
||
|
|
if (er)
|
||
|
|
return this.emit('error', er)
|
||
|
|
this[ONREADDIR](job, entries)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
[ONREADDIR] (job, entries) {
|
||
|
|
this.readdirCache.set(job.absolute, entries)
|
||
|
|
job.readdir = entries
|
||
|
|
this[PROCESS]()
|
||
|
|
}
|
||
|
|
|
||
|
|
[PROCESS] () {
|
||
|
|
if (this[PROCESSING])
|
||
|
|
return
|
||
|
|
|
||
|
|
this[PROCESSING] = true
|
||
|
|
for (let w = this[QUEUE].head;
|
||
|
|
w !== null && this[JOBS] < this.jobs;
|
||
|
|
w = w.next) {
|
||
|
|
this[PROCESSJOB](w.value)
|
||
|
|
if (w.value.ignore) {
|
||
|
|
const p = w.next
|
||
|
|
this[QUEUE].removeNode(w)
|
||
|
|
w.next = p
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
this[PROCESSING] = false
|
||
|
|
|
||
|
|
if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
|
||
|
|
if (this.zip)
|
||
|
|
this.zip.end(EOF)
|
||
|
|
else {
|
||
|
|
super.write(EOF)
|
||
|
|
super.end()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
get [CURRENT] () {
|
||
|
|
return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value
|
||
|
|
}
|
||
|
|
|
||
|
|
[JOBDONE] (job) {
|
||
|
|
this[QUEUE].shift()
|
||
|
|
this[JOBS] -= 1
|
||
|
|
this[PROCESS]()
|
||
|
|
}
|
||
|
|
|
||
|
|
[PROCESSJOB] (job) {
|
||
|
|
if (job.pending)
|
||
|
|
return
|
||
|
|
|
||
|
|
if (job.entry) {
|
||
|
|
if (job === this[CURRENT] && !job.piped)
|
||
|
|
this[PIPE](job)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
if (!job.stat) {
|
||
|
|
if (this.statCache.has(job.absolute))
|
||
|
|
this[ONSTAT](job, this.statCache.get(job.absolute))
|
||
|
|
else
|
||
|
|
this[STAT](job)
|
||
|
|
}
|
||
|
|
if (!job.stat)
|
||
|
|
return
|
||
|
|
|
||
|
|
// filtered out!
|
||
|
|
if (job.ignore)
|
||
|
|
return
|
||
|
|
|
||
|
|
if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
|
||
|
|
if (this.readdirCache.has(job.absolute))
|
||
|
|
this[ONREADDIR](job, this.readdirCache.get(job.absolute))
|
||
|
|
else
|
||
|
|
this[READDIR](job)
|
||
|
|
if (!job.readdir)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
// we know it doesn't have an entry, because that got checked above
|
||
|
|
job.entry = this[ENTRY](job)
|
||
|
|
if (!job.entry) {
|
||
|
|
job.ignore = true
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
if (job === this[CURRENT] && !job.piped)
|
||
|
|
this[PIPE](job)
|
||
|
|
}
|
||
|
|
|
||
|
|
[ENTRYOPT] (job) {
|
||
|
|
return {
|
||
|
|
onwarn: (msg, data) => {
|
||
|
|
this.warn(msg, data)
|
||
|
|
},
|
||
|
|
noPax: this.noPax,
|
||
|
|
cwd: this.cwd,
|
||
|
|
absolute: job.absolute,
|
||
|
|
preservePaths: this.preservePaths,
|
||
|
|
maxReadSize: this.maxReadSize,
|
||
|
|
strict: this.strict,
|
||
|
|
portable: this.portable,
|
||
|
|
linkCache: this.linkCache,
|
||
|
|
statCache: this.statCache,
|
||
|
|
noMtime: this.noMtime
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[ENTRY] (job) {
|
||
|
|
this[JOBS] += 1
|
||
|
|
try {
|
||
|
|
return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job))
|
||
|
|
.on('end', () => this[JOBDONE](job))
|
||
|
|
.on('error', er => this.emit('error', er))
|
||
|
|
} catch (er) {
|
||
|
|
this.emit('error', er)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[ONDRAIN] () {
|
||
|
|
if (this[CURRENT] && this[CURRENT].entry)
|
||
|
|
this[CURRENT].entry.resume()
|
||
|
|
}
|
||
|
|
|
||
|
|
// like .pipe() but using super, because our write() is special
|
||
|
|
[PIPE] (job) {
|
||
|
|
job.piped = true
|
||
|
|
|
||
|
|
if (job.readdir)
|
||
|
|
job.readdir.forEach(entry => {
|
||
|
|
const p = this.prefix ?
|
||
|
|
job.path.slice(this.prefix.length + 1) || './'
|
||
|
|
: job.path
|
||
|
|
|
||
|
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
||
|
|
this[ADDFSENTRY](base + entry)
|
||
|
|
})
|
||
|
|
|
||
|
|
const source = job.entry
|
||
|
|
const zip = this.zip
|
||
|
|
|
||
|
|
if (zip)
|
||
|
|
source.on('data', chunk => {
|
||
|
|
if (!zip.write(chunk))
|
||
|
|
source.pause()
|
||
|
|
})
|
||
|
|
else
|
||
|
|
source.on('data', chunk => {
|
||
|
|
if (!super.write(chunk))
|
||
|
|
source.pause()
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
pause () {
|
||
|
|
if (this.zip)
|
||
|
|
this.zip.pause()
|
||
|
|
return super.pause()
|
||
|
|
}
|
||
|
|
})
|
||
|
|
|
||
|
|
class PackSync extends Pack {
|
||
|
|
constructor (opt) {
|
||
|
|
super(opt)
|
||
|
|
this[WRITEENTRYCLASS] = WriteEntrySync
|
||
|
|
}
|
||
|
|
|
||
|
|
// pause/resume are no-ops in sync streams.
|
||
|
|
pause () {}
|
||
|
|
resume () {}
|
||
|
|
|
||
|
|
[STAT] (job) {
|
||
|
|
const stat = this.follow ? 'statSync' : 'lstatSync'
|
||
|
|
this[ONSTAT](job, fs[stat](job.absolute))
|
||
|
|
}
|
||
|
|
|
||
|
|
[READDIR] (job, stat) {
|
||
|
|
this[ONREADDIR](job, fs.readdirSync(job.absolute))
|
||
|
|
}
|
||
|
|
|
||
|
|
// gotta get it all in this tick
|
||
|
|
[PIPE] (job) {
|
||
|
|
const source = job.entry
|
||
|
|
const zip = this.zip
|
||
|
|
|
||
|
|
if (job.readdir)
|
||
|
|
job.readdir.forEach(entry => {
|
||
|
|
const p = this.prefix ?
|
||
|
|
job.path.slice(this.prefix.length + 1) || './'
|
||
|
|
: job.path
|
||
|
|
|
||
|
|
|
||
|
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
||
|
|
this[ADDFSENTRY](base + entry)
|
||
|
|
})
|
||
|
|
|
||
|
|
if (zip)
|
||
|
|
source.on('data', chunk => {
|
||
|
|
zip.write(chunk)
|
||
|
|
})
|
||
|
|
else
|
||
|
|
source.on('data', chunk => {
|
||
|
|
super[WRITE](chunk)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
Pack.Sync = PackSync
|
||
|
|
|
||
|
|
module.exports = Pack
|
||
|
|
</pre></td></tr>
|
||
|
|
</table></pre>
|
||
|
|
<div class='push'></div><!-- for sticky footer -->
|
||
|
|
</div><!-- /wrapper -->
|
||
|
|
<div class='footer quiet pad2 space-top1 center small'>
|
||
|
|
Code coverage
|
||
|
|
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Nov 20 2017 16:00:38 GMT-0800 (PST)
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<script src="../../prettify.js"></script>
|
||
|
|
<script>
|
||
|
|
window.onload = function () {
|
||
|
|
if (typeof prettyPrint === 'function') {
|
||
|
|
prettyPrint();
|
||
|
|
}
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
<script src="../../sorter.js"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|