Skip to content

Commit 84e9313

Browse files
committed
update
1 parent 26c7c70 commit 84e9313

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

bun.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"i18next": "^24.2.3",
5252
"isomorphic-git": "^1.30.1",
5353
"isomorphic-unzip": "^1.1.5",
54+
"node-bsdiff": "^0.1.9",
5455
"node-fetch": "^2.6.1",
5556
"plist": "^3.1.0",
5657
"progress": "^2.0.3",

src/bundle.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
597597
}
598598

599599
const copies = {};
600+
const copiesv2 = {};
600601

601602
const zipfile = new YazlZipFile();
602603

@@ -668,7 +669,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
668669
addEntry(base);
669670
}
670671
copies[entry.fileName] = originMap[entry.crc32];
671-
copies[entry.crc32] = entry.fileName;
672+
copiesv2[entry.crc32] = entry.fileName;
672673
return;
673674
}
674675

@@ -701,7 +702,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
701702

702703
//console.log({copies, deletes});
703704
zipfile.addBuffer(
704-
Buffer.from(JSON.stringify({ copies, deletes })),
705+
Buffer.from(JSON.stringify({ copies, copiesv2, deletes })),
705706
'__diff.json',
706707
);
707708
zipfile.end();
@@ -748,6 +749,7 @@ async function diffFromPackage(
748749
}
749750

750751
const copies = {};
752+
const copiesv2 = {};
751753

752754
const zipfile = new YazlZipFile();
753755

@@ -793,7 +795,7 @@ async function diffFromPackage(
793795
// If moved from other place
794796
if (originMap[entry.crc32]) {
795797
copies[entry.fileName] = originMap[entry.crc32];
796-
copies[entry.crc32] = entry.fileName;
798+
copiesv2[entry.crc32] = entry.fileName;
797799
return;
798800
}
799801

@@ -812,7 +814,7 @@ async function diffFromPackage(
812814
}
813815
});
814816

815-
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
817+
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies, copiesv2 })), '__diff.json');
816818
zipfile.end();
817819
await writePromise;
818820
}

0 commit comments

Comments
 (0)