react-native-update-cli 2.1.3 → 2.2.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/lib/bundle.js CHANGED
@@ -544,6 +544,7 @@ async function diffFromPPK(origin, next, output) {
544
544
  throw new Error('Bundle file not found! Please use default bundle file name and path.');
545
545
  }
546
546
  const copies = {};
547
+ const copiesv2 = {};
547
548
  const zipfile = new _yazl.ZipFile();
548
549
  const writePromise = new Promise((resolve, reject)=>{
549
550
  zipfile.outputStream.on('error', (err)=>{
@@ -601,6 +602,7 @@ async function diffFromPPK(origin, next, output) {
601
602
  addEntry(base);
602
603
  }
603
604
  copies[entry.fileName] = originMap[entry.crc32];
605
+ copiesv2[entry.crc32] = entry.fileName;
604
606
  return;
605
607
  }
606
608
  // New file.
@@ -631,6 +633,7 @@ async function diffFromPPK(origin, next, output) {
631
633
  //console.log({copies, deletes});
632
634
  zipfile.addBuffer(Buffer.from(JSON.stringify({
633
635
  copies,
636
+ copiesv2,
634
637
  deletes
635
638
  })), '__diff.json');
636
639
  zipfile.end();
@@ -661,6 +664,7 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
661
664
  throw new Error('Bundle file not found! Please use default bundle file name and path.');
662
665
  }
663
666
  const copies = {};
667
+ const copiesv2 = {};
664
668
  const zipfile = new _yazl.ZipFile();
665
669
  const writePromise = new Promise((resolve, reject)=>{
666
670
  zipfile.outputStream.on('error', (err)=>{
@@ -697,6 +701,7 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
697
701
  // If moved from other place
698
702
  if (originMap[entry.crc32]) {
699
703
  copies[entry.fileName] = originMap[entry.crc32];
704
+ copiesv2[entry.crc32] = entry.fileName;
700
705
  return;
701
706
  }
702
707
  return new Promise((resolve, reject)=>{
@@ -714,7 +719,8 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
714
719
  }
715
720
  });
716
721
  zipfile.addBuffer(Buffer.from(JSON.stringify({
717
- copies
722
+ copies,
723
+ copiesv2
718
724
  })), '__diff.json');
719
725
  zipfile.end();
720
726
  await writePromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "command line tool for react-native-update (remote updates for react native)",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/bundle.ts CHANGED
@@ -597,6 +597,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
597
597
  }
598
598
 
599
599
  const copies = {};
600
+ const copiesv2 = {};
600
601
 
601
602
  const zipfile = new YazlZipFile();
602
603
 
@@ -668,6 +669,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
668
669
  addEntry(base);
669
670
  }
670
671
  copies[entry.fileName] = originMap[entry.crc32];
672
+ copiesv2[entry.crc32] = entry.fileName;
671
673
  return;
672
674
  }
673
675
 
@@ -700,7 +702,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
700
702
 
701
703
  //console.log({copies, deletes});
702
704
  zipfile.addBuffer(
703
- Buffer.from(JSON.stringify({ copies, deletes })),
705
+ Buffer.from(JSON.stringify({ copies, copiesv2, deletes })),
704
706
  '__diff.json',
705
707
  );
706
708
  zipfile.end();
@@ -747,6 +749,7 @@ async function diffFromPackage(
747
749
  }
748
750
 
749
751
  const copies = {};
752
+ const copiesv2 = {};
750
753
 
751
754
  const zipfile = new YazlZipFile();
752
755
 
@@ -792,6 +795,7 @@ async function diffFromPackage(
792
795
  // If moved from other place
793
796
  if (originMap[entry.crc32]) {
794
797
  copies[entry.fileName] = originMap[entry.crc32];
798
+ copiesv2[entry.crc32] = entry.fileName;
795
799
  return;
796
800
  }
797
801
 
@@ -810,7 +814,7 @@ async function diffFromPackage(
810
814
  }
811
815
  });
812
816
 
813
- zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
817
+ zipfile.addBuffer(Buffer.from(JSON.stringify({ copies, copiesv2 })), '__diff.json');
814
818
  zipfile.end();
815
819
  await writePromise;
816
820
  }