@pixwel/pixwel-sdk 1.1.7 → 1.1.8

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.
@@ -30,9 +30,9 @@
30
30
  <span class='fraction'>0/8</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">100% </span>
33
+ <span class="strong">0% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>0/0</span>
35
+ <span class='fraction'>0/1</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
38
  <span class="strong">0% </span>
@@ -87,7 +87,7 @@
87
87
  <span class="cline-any cline-neutral">&nbsp;</span>
88
88
  <span class="cline-any cline-neutral">&nbsp;</span>
89
89
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">export default class Asset {
90
- static mapFromOrder(order) {
90
+ <span class="fstat-no" title="function not covered" > st</span>atic mapFromOrder(order) {
91
91
  <span class="cstat-no" title="statement not covered" > if (!order) {</span>
92
92
  <span class="cstat-no" title="statement not covered" > throw new Error("missing order");</span>
93
93
  }
@@ -112,7 +112,7 @@
112
112
  </div><!-- /wrapper -->
113
113
  <div class='footer quiet pad2 space-top1 center small'>
114
114
  Code coverage
115
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jul 16 2018 16:40:28 GMT-0500 (Central Daylight Time)
115
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Mar 28 2019 13:36:20 GMT-0500 (Central Daylight Time)
116
116
  </div>
117
117
  </div>
118
118
  <script src="prettify.js"></script>
@@ -22,22 +22,22 @@
22
22
  <div class='fl pad1y space-right2'>
23
23
  <span class="strong">0% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>0/94</span>
25
+ <span class='fraction'>0/92</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
28
  <span class="strong">0% </span>
29
29
  <span class="quiet">Branches</span>
30
- <span class='fraction'>0/120</span>
30
+ <span class='fraction'>0/102</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
33
  <span class="strong">0% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>0/10</span>
35
+ <span class='fraction'>0/11</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
38
  <span class="strong">0% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>0/94</span>
40
+ <span class='fraction'>0/92</span>
41
41
  </div>
42
42
  </div>
43
43
  <p class="quiet">
@@ -291,18 +291,8 @@
291
291
  <a name='L243'></a><a href='#L243'>243</a>
292
292
  <a name='L244'></a><a href='#L244'>244</a>
293
293
  <a name='L245'></a><a href='#L245'>245</a>
294
- <a name='L246'></a><a href='#L246'>246</a>
295
- <a name='L247'></a><a href='#L247'>247</a>
296
- <a name='L248'></a><a href='#L248'>248</a>
297
- <a name='L249'></a><a href='#L249'>249</a>
298
- <a name='L250'></a><a href='#L250'>250</a>
299
- <a name='L251'></a><a href='#L251'>251</a>
300
- <a name='L252'></a><a href='#L252'>252</a>
301
- <a name='L253'></a><a href='#L253'>253</a>
302
- <a name='L254'></a><a href='#L254'>254</a>
303
- <a name='L255'></a><a href='#L255'>255</a>
304
- <a name='L256'></a><a href='#L256'>256</a>
305
- <a name='L257'></a><a href='#L257'>257</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
294
+ <a name='L246'></a><a href='#L246'>246</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
295
+ <span class="cline-any cline-neutral">&nbsp;</span>
306
296
  <span class="cline-any cline-neutral">&nbsp;</span>
307
297
  <span class="cline-any cline-neutral">&nbsp;</span>
308
298
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -326,7 +316,6 @@
326
316
  <span class="cline-any cline-neutral">&nbsp;</span>
327
317
  <span class="cline-any cline-neutral">&nbsp;</span>
328
318
  <span class="cline-any cline-neutral">&nbsp;</span>
329
- <span class="cline-any cline-no">&nbsp;</span>
330
319
  <span class="cline-any cline-no">&nbsp;</span>
331
320
  <span class="cline-any cline-no">&nbsp;</span>
332
321
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -369,14 +358,6 @@
369
358
  <span class="cline-any cline-neutral">&nbsp;</span>
370
359
  <span class="cline-any cline-neutral">&nbsp;</span>
371
360
  <span class="cline-any cline-no">&nbsp;</span>
372
- <span class="cline-any cline-neutral">&nbsp;</span>
373
- <span class="cline-any cline-neutral">&nbsp;</span>
374
- <span class="cline-any cline-neutral">&nbsp;</span>
375
- <span class="cline-any cline-neutral">&nbsp;</span>
376
- <span class="cline-any cline-no">&nbsp;</span>
377
- <span class="cline-any cline-neutral">&nbsp;</span>
378
- <span class="cline-any cline-neutral">&nbsp;</span>
379
- <span class="cline-any cline-no">&nbsp;</span>
380
361
  <span class="cline-any cline-no">&nbsp;</span>
381
362
  <span class="cline-any cline-neutral">&nbsp;</span>
382
363
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -393,12 +374,6 @@
393
374
  <span class="cline-any cline-neutral">&nbsp;</span>
394
375
  <span class="cline-any cline-neutral">&nbsp;</span>
395
376
  <span class="cline-any cline-neutral">&nbsp;</span>
396
- <span class="cline-any cline-neutral">&nbsp;</span>
397
- <span class="cline-any cline-neutral">&nbsp;</span>
398
- <span class="cline-any cline-neutral">&nbsp;</span>
399
- <span class="cline-any cline-neutral">&nbsp;</span>
400
- <span class="cline-any cline-neutral">&nbsp;</span>
401
- <span class="cline-any cline-neutral">&nbsp;</span>
402
377
  <span class="cline-any cline-no">&nbsp;</span>
403
378
  <span class="cline-any cline-no">&nbsp;</span>
404
379
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -459,6 +434,9 @@
459
434
  <span class="cline-any cline-neutral">&nbsp;</span>
460
435
  <span class="cline-any cline-neutral">&nbsp;</span>
461
436
  <span class="cline-any cline-no">&nbsp;</span>
437
+ <span class="cline-any cline-no">&nbsp;</span>
438
+ <span class="cline-any cline-neutral">&nbsp;</span>
439
+ <span class="cline-any cline-no">&nbsp;</span>
462
440
  <span class="cline-any cline-neutral">&nbsp;</span>
463
441
  <span class="cline-any cline-no">&nbsp;</span>
464
442
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -558,7 +536,7 @@
558
536
  <span class="cline-any cline-no">&nbsp;</span>
559
537
  <span class="cline-any cline-neutral">&nbsp;</span>
560
538
  <span class="cline-any cline-neutral">&nbsp;</span>
561
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >import _ from "lodash";</span>
539
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import _ from "lodash";
562
540
  &nbsp;
563
541
  /**
564
542
  * The Filename class parses a filename into tokens, and can also take a set of
@@ -576,13 +554,13 @@ export default class Filename {
576
554
  * @param {String} [mediaType=''] Indicates video, audio, image and allows for stricter required fields
577
555
  * @return {String} A valid filename
578
556
  */
579
- static render(
580
- allTags = [],
581
- allTypes = [],
582
- asset = {},
583
- options = {},
584
- mediaType = ""
585
- ) <span class="cstat-no" title="statement not covered" >{</span>
557
+ <span class="fstat-no" title="function not covered" > st</span>atic render(
558
+ allTags = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
559
+ allTypes = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
560
+ asset = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
561
+ options = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
562
+ mediaType = <span class="branch-0 cbranch-no" title="branch not covered" >""</span>
563
+ ) {
586
564
  <span class="cstat-no" title="statement not covered" > if (!asset.project) {</span>
587
565
  <span class="cstat-no" title="statement not covered" > throw "missing asset.project";</span>
588
566
  }
@@ -624,14 +602,6 @@ export default class Filename {
624
602
  <span class="cstat-no" title="statement not covered" > throw "missing options.language";</span>
625
603
  }
626
604
  &nbsp;
627
- <span class="cstat-no" title="statement not covered" > if (</span>
628
- !options.tags.SubDub.sub &amp;&amp;
629
- !options.tags.SubDub.dub &amp;&amp;
630
- !options.tags.Text
631
- ) {
632
- <span class="cstat-no" title="statement not covered" > throw "missing options.tags.Text or options.tags.SubDub";</span>
633
- }
634
- &nbsp;
635
605
  <span class="cstat-no" title="statement not covered" > if (mediaType &amp;&amp; mediaType == "video" &amp;&amp; !options.tags.Codec) {</span>
636
606
  <span class="cstat-no" title="statement not covered" > throw "missing options.tags.Codec";</span>
637
607
  }
@@ -648,13 +618,7 @@ export default class Filename {
648
618
  <span class="cstat-no" title="statement not covered" > throw "missing options.tags[Frame Mode]";</span>
649
619
  }
650
620
  &nbsp;
651
- // currently, slurpee's filename.ts will render this, but we can add this back in later when
652
- // filename.ts starts to rely on Filename.render
653
- // if ((options.tags.SubDub.dub || options.tags.SubDub.sub) &amp;&amp; options.tags.Text) {
654
- // throw 'conflicting options supplied: SubDub and Text';
655
- // }
656
- &nbsp;
657
- function <span class="fstat-no" title="function not covered" >assetType(asset, types) {</span>
621
+ function <span class="fstat-no" title="function not covered" >assetType(</span>asset, types) {
658
622
  <span class="cstat-no" title="statement not covered" > if (/trailer/.test(asset.type)) {</span>
659
623
  <span class="cstat-no" title="statement not covered" > return false;</span>
660
624
  }
@@ -669,7 +633,7 @@ export default class Filename {
669
633
  );
670
634
  }
671
635
  &nbsp;
672
- function <span class="fstat-no" title="function not covered" >assetTitle(asset) {</span>
636
+ function <span class="fstat-no" title="function not covered" >assetTitle(</span>asset) {
673
637
  let prefix = <span class="cstat-no" title="statement not covered" >"";</span>
674
638
  let name = <span class="cstat-no" title="statement not covered" >asset.slug.toUpperCase().replace("INT-L", "INTL");</span>
675
639
  <span class="cstat-no" title="statement not covered" > if (/trailer/.test(asset.type)) {</span>
@@ -691,7 +655,7 @@ export default class Filename {
691
655
  <span class="cstat-no" title="statement not covered" > return prefix + name;</span>
692
656
  }
693
657
  &nbsp;
694
- function <span class="fstat-no" title="function not covered" >runningTime(asset) {</span>
658
+ function <span class="fstat-no" title="function not covered" >runningTime(</span>asset) {
695
659
  let matches = <span class="cstat-no" title="statement not covered" >asset.type.match(/^film-clip|^featurette/);</span>
696
660
  <span class="cstat-no" title="statement not covered" > if (!matches) {</span>
697
661
  <span class="cstat-no" title="statement not covered" > return;</span>
@@ -713,15 +677,18 @@ export default class Filename {
713
677
  <span class="cstat-no" title="statement not covered" > return result;</span>
714
678
  }
715
679
  &nbsp;
716
- function <span class="fstat-no" title="function not covered" >locale(country, language) {</span>
680
+ function <span class="fstat-no" title="function not covered" >locale(</span>country, language) {
681
+ <span class="cstat-no" title="statement not covered" > if (language.includes('-')) {</span>
682
+ <span class="cstat-no" title="statement not covered" > country = '';</span>
683
+ }
717
684
  <span class="cstat-no" title="statement not covered" > return [language, country]</span>
718
- .filter(<span class="fstat-no" title="function not covered" >str =&gt; </span>{
685
+ .filter(<span class="fstat-no" title="function not covered" >st</span>r =&gt; {
719
686
  <span class="cstat-no" title="statement not covered" > return !!str &amp;&amp; str !== "WW";</span>
720
687
  })
721
688
  .join("-");
722
689
  }
723
690
  &nbsp;
724
- function <span class="fstat-no" title="function not covered" >textType(subDub, text) {</span>
691
+ function <span class="fstat-no" title="function not covered" >textType(</span>subDub, text) {
725
692
  <span class="cstat-no" title="statement not covered" > if (!subDub || (!subDub.sub &amp;&amp; !subDub.dub)) {</span>
726
693
  <span class="cstat-no" title="statement not covered" > return text;</span>
727
694
  }
@@ -738,7 +705,7 @@ export default class Filename {
738
705
  <span class="cstat-no" title="statement not covered" > return result;</span>
739
706
  }
740
707
  &nbsp;
741
- function <span class="fstat-no" title="function not covered" >matchSet(allTags, tags) {</span>
708
+ function <span class="fstat-no" title="function not covered" >matchSet(</span>allTags, tags) {
742
709
  let selectedTags = <span class="cstat-no" title="statement not covered" >_(tags)</span>
743
710
  .values()
744
711
  .flatten()
@@ -746,7 +713,7 @@ export default class Filename {
746
713
  &nbsp;
747
714
  let setTag = <span class="cstat-no" title="statement not covered" >_(allTags)</span>
748
715
  .filter("set")
749
- .find(<span class="fstat-no" title="function not covered" >setTag =&gt; </span>{
716
+ .find(<span class="fstat-no" title="function not covered" >se</span>tTag =&gt; {
750
717
  <span class="cstat-no" title="statement not covered" > return _.difference(setTag.set, selectedTags).length === 0;</span>
751
718
  });
752
719
  &nbsp;
@@ -771,7 +738,7 @@ export default class Filename {
771
738
  <span class="cstat-no" title="statement not covered" > parts = _(parts)</span>
772
739
  .flatten()
773
740
  .filter()
774
- .map(<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >part =&gt; part.toUpperCase());</span></span>
741
+ .map(<span class="fstat-no" title="function not covered" >pa</span>rt =&gt; <span class="cstat-no" title="statement not covered" >part.toUpperCase())</span>;
775
742
  &nbsp;
776
743
  let matchedSet = <span class="cstat-no" title="statement not covered" >matchSet(allTags, options.tags);</span>
777
744
  let requiredInfo = <span class="cstat-no" title="statement not covered" >tags.Resolution &amp;&amp; tags["Frame Mode"] &amp;&amp; tags.Framerate;</span>
@@ -798,7 +765,7 @@ export default class Filename {
798
765
  : tags["Frame Mode"].toLowerCase().slice(0, 1),
799
766
  tags.Framerate.replace(".", "").toUpperCase()
800
767
  ]
801
- .filter(<span class="fstat-no" title="function not covered" >val =&gt; </span>{
768
+ .filter(<span class="fstat-no" title="function not covered" >va</span>l =&gt; {
802
769
  <span class="cstat-no" title="statement not covered" > return val;</span>
803
770
  })
804
771
  .join("");
@@ -820,7 +787,7 @@ export default class Filename {
820
787
  </div><!-- /wrapper -->
821
788
  <div class='footer quiet pad2 space-top1 center small'>
822
789
  Code coverage
823
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jul 16 2018 16:40:28 GMT-0500 (Central Daylight Time)
790
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Mar 28 2019 13:36:20 GMT-0500 (Central Daylight Time)
824
791
  </div>
825
792
  </div>
826
793
  <script src="prettify.js"></script>