@pixwel/pixwel-sdk 1.1.8 → 1.1.10
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/coverage/clover.xml +138 -132
- package/coverage/coverage-final.json +8 -8
- package/coverage/lcov-report/Ass.js.html +212 -216
- package/coverage/lcov-report/Asset.js.html +25 -29
- package/coverage/lcov-report/Filename.js.html +257 -261
- package/coverage/lcov-report/Ingest.js.html +608 -600
- package/coverage/lcov-report/IngestFile.js.html +8 -12
- package/coverage/lcov-report/Order.js.html +51 -55
- package/coverage/lcov-report/Srt.js.html +112 -116
- package/coverage/lcov-report/Sub.js.html +40 -44
- package/coverage/lcov-report/TimeFormat.js.html +61 -65
- package/coverage/lcov-report/base.css +3 -14
- package/coverage/lcov-report/index.html +33 -37
- package/coverage/lcov.info +285 -279
- package/dist/src/Filename.js +10 -10
- package/dist/src/Ingest.js +4 -0
- package/package.json +1 -1
- package/src/Filename.js +10 -10
- package/src/Ingest.js +4 -0
- package/test/Ingest.spec.js +12 -0
|
@@ -40,258 +40,255 @@
|
|
|
40
40
|
<span class='fraction'>0/92</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
43
|
</div>
|
|
47
44
|
<div class='status-line low'></div>
|
|
48
45
|
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"
|
|
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
|
-
|
|
46
|
+
<tr><td class="line-count quiet">1
|
|
47
|
+
2
|
|
48
|
+
3
|
|
49
|
+
4
|
|
50
|
+
5
|
|
51
|
+
6
|
|
52
|
+
7
|
|
53
|
+
8
|
|
54
|
+
9
|
|
55
|
+
10
|
|
56
|
+
11
|
|
57
|
+
12
|
|
58
|
+
13
|
|
59
|
+
14
|
|
60
|
+
15
|
|
61
|
+
16
|
|
62
|
+
17
|
|
63
|
+
18
|
|
64
|
+
19
|
|
65
|
+
20
|
|
66
|
+
21
|
|
67
|
+
22
|
|
68
|
+
23
|
|
69
|
+
24
|
|
70
|
+
25
|
|
71
|
+
26
|
|
72
|
+
27
|
|
73
|
+
28
|
|
74
|
+
29
|
|
75
|
+
30
|
|
76
|
+
31
|
|
77
|
+
32
|
|
78
|
+
33
|
|
79
|
+
34
|
|
80
|
+
35
|
|
81
|
+
36
|
|
82
|
+
37
|
|
83
|
+
38
|
|
84
|
+
39
|
|
85
|
+
40
|
|
86
|
+
41
|
|
87
|
+
42
|
|
88
|
+
43
|
|
89
|
+
44
|
|
90
|
+
45
|
|
91
|
+
46
|
|
92
|
+
47
|
|
93
|
+
48
|
|
94
|
+
49
|
|
95
|
+
50
|
|
96
|
+
51
|
|
97
|
+
52
|
|
98
|
+
53
|
|
99
|
+
54
|
|
100
|
+
55
|
|
101
|
+
56
|
|
102
|
+
57
|
|
103
|
+
58
|
|
104
|
+
59
|
|
105
|
+
60
|
|
106
|
+
61
|
|
107
|
+
62
|
|
108
|
+
63
|
|
109
|
+
64
|
|
110
|
+
65
|
|
111
|
+
66
|
|
112
|
+
67
|
|
113
|
+
68
|
|
114
|
+
69
|
|
115
|
+
70
|
|
116
|
+
71
|
|
117
|
+
72
|
|
118
|
+
73
|
|
119
|
+
74
|
|
120
|
+
75
|
|
121
|
+
76
|
|
122
|
+
77
|
|
123
|
+
78
|
|
124
|
+
79
|
|
125
|
+
80
|
|
126
|
+
81
|
|
127
|
+
82
|
|
128
|
+
83
|
|
129
|
+
84
|
|
130
|
+
85
|
|
131
|
+
86
|
|
132
|
+
87
|
|
133
|
+
88
|
|
134
|
+
89
|
|
135
|
+
90
|
|
136
|
+
91
|
|
137
|
+
92
|
|
138
|
+
93
|
|
139
|
+
94
|
|
140
|
+
95
|
|
141
|
+
96
|
|
142
|
+
97
|
|
143
|
+
98
|
|
144
|
+
99
|
|
145
|
+
100
|
|
146
|
+
101
|
|
147
|
+
102
|
|
148
|
+
103
|
|
149
|
+
104
|
|
150
|
+
105
|
|
151
|
+
106
|
|
152
|
+
107
|
|
153
|
+
108
|
|
154
|
+
109
|
|
155
|
+
110
|
|
156
|
+
111
|
|
157
|
+
112
|
|
158
|
+
113
|
|
159
|
+
114
|
|
160
|
+
115
|
|
161
|
+
116
|
|
162
|
+
117
|
|
163
|
+
118
|
|
164
|
+
119
|
|
165
|
+
120
|
|
166
|
+
121
|
|
167
|
+
122
|
|
168
|
+
123
|
|
169
|
+
124
|
|
170
|
+
125
|
|
171
|
+
126
|
|
172
|
+
127
|
|
173
|
+
128
|
|
174
|
+
129
|
|
175
|
+
130
|
|
176
|
+
131
|
|
177
|
+
132
|
|
178
|
+
133
|
|
179
|
+
134
|
|
180
|
+
135
|
|
181
|
+
136
|
|
182
|
+
137
|
|
183
|
+
138
|
|
184
|
+
139
|
|
185
|
+
140
|
|
186
|
+
141
|
|
187
|
+
142
|
|
188
|
+
143
|
|
189
|
+
144
|
|
190
|
+
145
|
|
191
|
+
146
|
|
192
|
+
147
|
|
193
|
+
148
|
|
194
|
+
149
|
|
195
|
+
150
|
|
196
|
+
151
|
|
197
|
+
152
|
|
198
|
+
153
|
|
199
|
+
154
|
|
200
|
+
155
|
|
201
|
+
156
|
|
202
|
+
157
|
|
203
|
+
158
|
|
204
|
+
159
|
|
205
|
+
160
|
|
206
|
+
161
|
|
207
|
+
162
|
|
208
|
+
163
|
|
209
|
+
164
|
|
210
|
+
165
|
|
211
|
+
166
|
|
212
|
+
167
|
|
213
|
+
168
|
|
214
|
+
169
|
|
215
|
+
170
|
|
216
|
+
171
|
|
217
|
+
172
|
|
218
|
+
173
|
|
219
|
+
174
|
|
220
|
+
175
|
|
221
|
+
176
|
|
222
|
+
177
|
|
223
|
+
178
|
|
224
|
+
179
|
|
225
|
+
180
|
|
226
|
+
181
|
|
227
|
+
182
|
|
228
|
+
183
|
|
229
|
+
184
|
|
230
|
+
185
|
|
231
|
+
186
|
|
232
|
+
187
|
|
233
|
+
188
|
|
234
|
+
189
|
|
235
|
+
190
|
|
236
|
+
191
|
|
237
|
+
192
|
|
238
|
+
193
|
|
239
|
+
194
|
|
240
|
+
195
|
|
241
|
+
196
|
|
242
|
+
197
|
|
243
|
+
198
|
|
244
|
+
199
|
|
245
|
+
200
|
|
246
|
+
201
|
|
247
|
+
202
|
|
248
|
+
203
|
|
249
|
+
204
|
|
250
|
+
205
|
|
251
|
+
206
|
|
252
|
+
207
|
|
253
|
+
208
|
|
254
|
+
209
|
|
255
|
+
210
|
|
256
|
+
211
|
|
257
|
+
212
|
|
258
|
+
213
|
|
259
|
+
214
|
|
260
|
+
215
|
|
261
|
+
216
|
|
262
|
+
217
|
|
263
|
+
218
|
|
264
|
+
219
|
|
265
|
+
220
|
|
266
|
+
221
|
|
267
|
+
222
|
|
268
|
+
223
|
|
269
|
+
224
|
|
270
|
+
225
|
|
271
|
+
226
|
|
272
|
+
227
|
|
273
|
+
228
|
|
274
|
+
229
|
|
275
|
+
230
|
|
276
|
+
231
|
|
277
|
+
232
|
|
278
|
+
233
|
|
279
|
+
234
|
|
280
|
+
235
|
|
281
|
+
236
|
|
282
|
+
237
|
|
283
|
+
238
|
|
284
|
+
239
|
|
285
|
+
240
|
|
286
|
+
241
|
|
287
|
+
242
|
|
288
|
+
243
|
|
289
|
+
244
|
|
290
|
+
245
|
|
291
|
+
246</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
295
292
|
<span class="cline-any cline-neutral"> </span>
|
|
296
293
|
<span class="cline-any cline-neutral"> </span>
|
|
297
294
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -562,19 +559,19 @@ export default class Filename {
|
|
|
562
559
|
mediaType = <span class="branch-0 cbranch-no" title="branch not covered" >""</span>
|
|
563
560
|
) {
|
|
564
561
|
<span class="cstat-no" title="statement not covered" > if (!asset.project) {</span>
|
|
565
|
-
<span class="cstat-no" title="statement not covered" > throw "missing asset.project";</span>
|
|
562
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing asset.project");</span>
|
|
566
563
|
}
|
|
567
564
|
|
|
568
565
|
<span class="cstat-no" title="statement not covered" > if (asset.project && !asset.project.filePrefix) {</span>
|
|
569
|
-
<span class="cstat-no" title="statement not covered" > throw "missing asset.project.filePrefix";</span>
|
|
566
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing asset.project.filePrefix");</span>
|
|
570
567
|
}
|
|
571
568
|
|
|
572
569
|
<span class="cstat-no" title="statement not covered" > if (!asset.name) {</span>
|
|
573
|
-
<span class="cstat-no" title="statement not covered" > throw "missing asset.name";</span>
|
|
570
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing asset.name");</span>
|
|
574
571
|
}
|
|
575
572
|
|
|
576
573
|
<span class="cstat-no" title="statement not covered" > if (!asset.type) {</span>
|
|
577
|
-
<span class="cstat-no" title="statement not covered" > throw "missing asset.type";</span>
|
|
574
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing asset.type");</span>
|
|
578
575
|
}
|
|
579
576
|
|
|
580
577
|
let defaults = <span class="cstat-no" title="statement not covered" >{</span>
|
|
@@ -599,23 +596,23 @@ export default class Filename {
|
|
|
599
596
|
<span class="cstat-no" title="statement not covered" > options = _.merge(defaults, options);</span>
|
|
600
597
|
|
|
601
598
|
<span class="cstat-no" title="statement not covered" > if (!options.language) {</span>
|
|
602
|
-
<span class="cstat-no" title="statement not covered" > throw "missing options.language";</span>
|
|
599
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing options.language");</span>
|
|
603
600
|
}
|
|
604
601
|
|
|
605
602
|
<span class="cstat-no" title="statement not covered" > if (mediaType && mediaType == "video" && !options.tags.Codec) {</span>
|
|
606
|
-
<span class="cstat-no" title="statement not covered" > throw "missing options.tags.Codec";</span>
|
|
603
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing options.tags.Codec");</span>
|
|
607
604
|
}
|
|
608
605
|
|
|
609
606
|
<span class="cstat-no" title="statement not covered" > if (mediaType && mediaType == "video" && !options.tags.Resolution) {</span>
|
|
610
|
-
<span class="cstat-no" title="statement not covered" > throw "missing options.tags.Resolution";</span>
|
|
607
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing options.tags.Resolution");</span>
|
|
611
608
|
}
|
|
612
609
|
|
|
613
610
|
<span class="cstat-no" title="statement not covered" > if (mediaType && mediaType == "video" && !options.tags.Framerate) {</span>
|
|
614
|
-
<span class="cstat-no" title="statement not covered" > throw "missing options.tags.Framerate";</span>
|
|
611
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing options.tags.Framerate");</span>
|
|
615
612
|
}
|
|
616
613
|
|
|
617
614
|
<span class="cstat-no" title="statement not covered" > if (mediaType == "video" && !options.tags["Frame Mode"]) {</span>
|
|
618
|
-
<span class="cstat-no" title="statement not covered" > throw "missing options.tags[Frame Mode]";</span>
|
|
615
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("missing options.tags[Frame Mode]");</span>
|
|
619
616
|
}
|
|
620
617
|
|
|
621
618
|
function <span class="fstat-no" title="function not covered" >assetType(</span>asset, types) {
|
|
@@ -625,7 +622,7 @@ export default class Filename {
|
|
|
625
622
|
|
|
626
623
|
let matchingType = <span class="cstat-no" title="statement not covered" >_.find(types, { name: asset.type });</span>
|
|
627
624
|
<span class="cstat-no" title="statement not covered" > if (!matchingType) {</span>
|
|
628
|
-
<span class="cstat-no" title="statement not covered" > throw `Asset type "${asset.type}" could not be found
|
|
625
|
+
<span class="cstat-no" title="statement not covered" > throw new Error(`Asset type "${asset.type}" could not be found`);</span>
|
|
629
626
|
}
|
|
630
627
|
|
|
631
628
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
@@ -787,7 +784,7 @@ export default class Filename {
|
|
|
787
784
|
</div><!-- /wrapper -->
|
|
788
785
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
789
786
|
Code coverage
|
|
790
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu
|
|
787
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Aug 01 2019 10:00:08 GMT-0500 (Central Daylight Time)
|
|
791
788
|
</div>
|
|
792
789
|
</div>
|
|
793
790
|
<script src="prettify.js"></script>
|
|
@@ -799,6 +796,5 @@ window.onload = function () {
|
|
|
799
796
|
};
|
|
800
797
|
</script>
|
|
801
798
|
<script src="sorter.js"></script>
|
|
802
|
-
<script src="block-navigation.js"></script>
|
|
803
799
|
</body>
|
|
804
800
|
</html>
|