From de35d931289aad820ebebed4beb27ebb43fbb56c Mon Sep 17 00:00:00 2001 From: HeYanbo Date: Wed, 30 Apr 2025 14:06:14 +0800 Subject: [PATCH 1/2] fix FileJSBundleProvider conflics issue --- Example/harmony_use_pushy/bun.lock | 2 +- .../harmony/entry/src/main/ets/pages/Index.ets | 5 +++-- .../harmony/entry/src/main/resources/rawfile/meta.json | 2 +- Example/harmony_use_pushy/package.json | 2 +- ...ileJSBundleProvider.ets => PushyFileJSBundleProvider.ets} | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) rename harmony/src/main/ets/{FileJSBundleProvider.ets => PushyFileJSBundleProvider.ets} (96%) diff --git a/Example/harmony_use_pushy/bun.lock b/Example/harmony_use_pushy/bun.lock index 1c1a6388..ab8dd2a5 100644 --- a/Example/harmony_use_pushy/bun.lock +++ b/Example/harmony_use_pushy/bun.lock @@ -4,7 +4,7 @@ "": { "name": "harmony_use_pushy", "dependencies": { - "@react-native-oh/react-native-harmony": "^0.72.43", + "@react-native-oh/react-native-harmony": "^0.72.59", "react": "18.2.0", "react-native": "0.72.5", "react-native-update": "^10.26.4", diff --git a/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets b/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets index 90ec87d1..836a29fb 100644 --- a/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets +++ b/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets @@ -1,4 +1,4 @@ -import { FileJSBundleProvider } from 'pushy/src/main/ets/FileJSBundleProvider'; +import { PushyFileJSBundleProvider } from 'pushy/src/main/ets/PushyFileJSBundleProvider'; import { ComponentBuilderContext, RNOHCoreContext,RNAbility, MetroJSBundleProvider } from '@rnoh/react-native-openharmony'; import { @@ -6,6 +6,7 @@ import { AnyJSBundleProvider, ResourceJSBundleProvider, TraceJSBundleProviderDecorator, + FileJSBundleProvider } from '@rnoh/react-native-openharmony' import { createRNPackages } from '../RNPackagesFactory' import preferences from '@ohos.data.preferences'; @@ -65,7 +66,7 @@ struct Index { // local debug mode new MetroJSBundleProvider(), // release mode - new FileJSBundleProvider(this.rnohCoreContext.uiAbilityContext), + new PushyFileJSBundleProvider(this.rnohCoreContext.uiAbilityContext), new ResourceJSBundleProvider(this.rnohCoreContext.uiAbilityContext.resourceManager, 'bundle.harmony.js') ]), this.rnohCoreContext.logger), diff --git a/Example/harmony_use_pushy/harmony/entry/src/main/resources/rawfile/meta.json b/Example/harmony_use_pushy/harmony/entry/src/main/resources/rawfile/meta.json index e7272e1a..7c3ad724 100644 --- a/Example/harmony_use_pushy/harmony/entry/src/main/resources/rawfile/meta.json +++ b/Example/harmony_use_pushy/harmony/entry/src/main/resources/rawfile/meta.json @@ -1,4 +1,4 @@ { - "pushy_build_time": "2025-04-12T11:12:43.423Z", + "pushy_build_time": "2025-04-30T02:46:33.340Z", "versionName": "1.0.0" } \ No newline at end of file diff --git a/Example/harmony_use_pushy/package.json b/Example/harmony_use_pushy/package.json index 3263db08..64890de4 100644 --- a/Example/harmony_use_pushy/package.json +++ b/Example/harmony_use_pushy/package.json @@ -15,7 +15,7 @@ "hash": "pushy hash /Users/yanbo.he/Desktop/HarmonyOS/react-native-pushy/Example/harmony_use_pushy/.pushy/output/harmony.1735048297258.ppk" }, "dependencies": { - "@react-native-oh/react-native-harmony": "^0.72.43", + "@react-native-oh/react-native-harmony": "^0.72.59", "react": "18.2.0", "react-native": "0.72.5", "react-native-update": "^10.26.4" diff --git a/harmony/src/main/ets/FileJSBundleProvider.ets b/harmony/src/main/ets/PushyFileJSBundleProvider.ets similarity index 96% rename from harmony/src/main/ets/FileJSBundleProvider.ets rename to harmony/src/main/ets/PushyFileJSBundleProvider.ets index 59d5ac08..8e5f3467 100644 --- a/harmony/src/main/ets/FileJSBundleProvider.ets +++ b/harmony/src/main/ets/PushyFileJSBundleProvider.ets @@ -3,7 +3,7 @@ import fileIo from '@ohos.file.fs'; import common from '@ohos.app.ability.common'; import { UpdateContext } from './UpdateContext'; -export class FileJSBundleProvider extends JSBundleProvider { +export class PushyFileJSBundleProvider extends JSBundleProvider { private updateContext: UpdateContext; private filePath: string = '' From ea69d6feae87bbc6bfca47683e9cf9fc5bba680d Mon Sep 17 00:00:00 2001 From: HeYanbo Date: Wed, 30 Apr 2025 14:09:52 +0800 Subject: [PATCH 2/2] udpate --- .../harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets | 1 - 1 file changed, 1 deletion(-) diff --git a/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets b/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets index 836a29fb..76767d99 100644 --- a/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets +++ b/Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets @@ -6,7 +6,6 @@ import { AnyJSBundleProvider, ResourceJSBundleProvider, TraceJSBundleProviderDecorator, - FileJSBundleProvider } from '@rnoh/react-native-openharmony' import { createRNPackages } from '../RNPackagesFactory' import preferences from '@ohos.data.preferences';