1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-11-23 08:43:37 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

2 Commits

Author SHA1 Message Date
Sunny Luo
e3c951bc1b Update package.json 2025-09-23 15:37:35 +08:00
波仔糕
f6ed8872bd add logic to support android aab package hot update (#17)
* add logic to support android aab package hot update

* update

* udpate
2025-09-23 15:22:34 +08:00
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-native-update-cli", "name": "react-native-update-cli",
"version": "2.1.3", "version": "2.2.0",
"description": "command line tool for react-native-update (remote updates for react native)", "description": "command line tool for react-native-update (remote updates for react native)",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

View File

@@ -597,6 +597,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
} }
const copies = {}; const copies = {};
const copiesv2 = {};
const zipfile = new YazlZipFile(); const zipfile = new YazlZipFile();
@@ -668,6 +669,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
addEntry(base); addEntry(base);
} }
copies[entry.fileName] = originMap[entry.crc32]; copies[entry.fileName] = originMap[entry.crc32];
copiesv2[entry.crc32] = entry.fileName;
return; return;
} }
@@ -700,7 +702,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
//console.log({copies, deletes}); //console.log({copies, deletes});
zipfile.addBuffer( zipfile.addBuffer(
Buffer.from(JSON.stringify({ copies, deletes })), Buffer.from(JSON.stringify({ copies, copiesv2, deletes })),
'__diff.json', '__diff.json',
); );
zipfile.end(); zipfile.end();
@@ -747,6 +749,7 @@ async function diffFromPackage(
} }
const copies = {}; const copies = {};
const copiesv2 = {};
const zipfile = new YazlZipFile(); const zipfile = new YazlZipFile();
@@ -792,6 +795,7 @@ async function diffFromPackage(
// If moved from other place // If moved from other place
if (originMap[entry.crc32]) { if (originMap[entry.crc32]) {
copies[entry.fileName] = originMap[entry.crc32]; copies[entry.fileName] = originMap[entry.crc32];
copiesv2[entry.crc32] = entry.fileName;
return; return;
} }
@@ -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(); zipfile.end();
await writePromise; await writePromise;
} }