1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-28 20:13:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

use latest rnoh package

This commit is contained in:
sunnylqm
2025-10-24 22:51:07 +08:00
parent 268f39f43b
commit a248f18035
11 changed files with 31 additions and 34 deletions

View File

@@ -6,14 +6,14 @@
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@rnoh/react-native-openharmony@0.72.38": "@rnoh/react-native-openharmony@0.72.38"
"@rnoh/react-native-openharmony@^0.72.96": "@rnoh/react-native-openharmony@0.72.96"
},
"packages": {
"@rnoh/react-native-openharmony@0.72.38": {
"@rnoh/react-native-openharmony@0.72.96": {
"name": "",
"version": "0.72.38",
"integrity": "sha512-br5SIrbB0OarSLirenleE7eTOX1lNccMJ7nb/G7qWTyJ7kW4DalmTXVKYpoT2qaOLls1uEE7McD1OjbZZM9jug==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@rnoh/react-native-openharmony/-/react-native-openharmony-0.72.38.har",
"version": "0.72.96",
"integrity": "sha512-gBbm8LLyqi5UE7qHWdZYeQnjyncfEpCczKZUP/9M2U1Z7exR0Kya8PMKMwr1ta5ujy7w/hZVC2LomEV4QvBeqA==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@rnoh/react-native-openharmony/-/react-native-openharmony-0.72.96.har",
"registryType": "ohpm"
}
}

View File

@@ -1,13 +1,13 @@
{
"license": "MIT",
"types": "",
"devDependencies": {},
"name": "pushy",
"description": "",
"main": "index.ets",
"version": "3.1.0-0.0.7",
"dependencies": {
"@rnoh/react-native-openharmony":"^0.72.38"
license: 'MIT',
types: '',
devDependencies: {},
name: 'pushy',
description: '',
main: 'index.ets',
version: '10.35.1',
dependencies: {
'@rnoh/react-native-openharmony': '^0.72.96',
},
"modelVersion": "5.0.0"
modelVersion: '5.0.0',
}

View File

@@ -23,6 +23,11 @@ export class PushyFileJSBundleProvider extends JSBundleProvider {
}
async getBundle(): Promise<FileJSBundle> {
if (!this.path) {
throw new JSBundleProviderError({
whatHappened: 'No pushy bundle found. using default bundle',
})
}
try {
const status = await fs.access(this.path, fs.OpenMode.READ_ONLY);
if (status) {
@@ -30,7 +35,6 @@ export class PushyFileJSBundleProvider extends JSBundleProvider {
filePath: this.path
}
}
throw new Error('Update bundle not found');
} catch (error) {
throw new JSBundleProviderError({
whatHappened: `Couldn't load JSBundle from ${this.path}`,

View File

@@ -189,18 +189,11 @@ export class UpdateContext {
}
}
public static getBundleUrl(
context: common.UIAbilityContext,
defaultAssetsUrl?: string,
) {
return new UpdateContext(context).getBundleUrl(defaultAssetsUrl);
}
public getBundleUrl(defaultAssetsUrl?: string) {
public getBundleUrl() {
UpdateContext.isUsingBundleUrl = true;
const currentVersion = this.getCurrentVersion();
if (!currentVersion) {
return defaultAssetsUrl;
return '';
}
if (!this.isFirstTime()) {
if (!this.preferences.getSync('firstTimeOk', true)) {
@@ -222,7 +215,7 @@ export class UpdateContext {
version = this.rollBack();
}
}
return defaultAssetsUrl;
return '';
}
getPackageVersion(): string {