From b973ace4432ddca77f895289cff9b91a68849a6d Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Sun, 26 Oct 2025 18:05:18 +0800 Subject: [PATCH] Update version to 2.3.1 in package.json and add support for harmony platform in runReactNativeBundleCommand to handle asset copying and file movement. --- package.json | 2 +- src/bundle.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d16b2b..b7cc042 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update-cli", - "version": "2.3.0", + "version": "2.3.1", "description": "command line tool for react-native-update (remote updates for react native)", "main": "index.js", "bin": { diff --git a/src/bundle.ts b/src/bundle.ts index 9b7677a..fda6879 100644 --- a/src/bundle.ts +++ b/src/bundle.ts @@ -256,6 +256,19 @@ async function runReactNativeBundleCommand({ !isSentry, ); } + if (platform === 'harmony') { + const harmonyRawAssetsPath = + 'harmony/entry/src/main/resources/rawfile/assets'; + // copy all files in outputFolder to harmonyRawPath + // assets should be in rawfile/assets + fs.ensureDirSync(harmonyRawAssetsPath); + fs.copySync(outputFolder, harmonyRawAssetsPath, { overwrite: true }); + fs.moveSync( + `${harmonyRawAssetsPath}/bundle.harmony.js`, + `${harmonyRawAssetsPath}/../bundle.harmony.js`, + { overwrite: true }, + ); + } resolve(null); } });