Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
}

const copies = {};
const copiesv2 = {};

const zipfile = new YazlZipFile();

Expand Down Expand Up @@ -668,6 +669,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
addEntry(base);
}
copies[entry.fileName] = originMap[entry.crc32];
copiesv2[entry.crc32] = entry.fileName;
return;
}

Expand Down Expand Up @@ -700,7 +702,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {

//console.log({copies, deletes});
zipfile.addBuffer(
Buffer.from(JSON.stringify({ copies, deletes })),
Buffer.from(JSON.stringify({ copies, copiesv2, deletes })),
'__diff.json',
);
zipfile.end();
Expand Down Expand Up @@ -747,6 +749,7 @@ async function diffFromPackage(
}

const copies = {};
const copiesv2 = {};

const zipfile = new YazlZipFile();

Expand Down Expand Up @@ -792,6 +795,7 @@ async function diffFromPackage(
// If moved from other place
if (originMap[entry.crc32]) {
copies[entry.fileName] = originMap[entry.crc32];
copiesv2[entry.crc32] = entry.fileName;
return;
}

Expand All @@ -810,7 +814,7 @@ async function diffFromPackage(
}
});

zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies, copiesv2 })), '__diff.json');
zipfile.end();
await writePromise;
}
Expand Down
Loading