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

Compare commits

..

1 Commits

Author SHA1 Message Date
sunnylqm
dbca54a7f0 v10.20.0-beta.0 2025-01-11 19:23:31 +08:00
41 changed files with 215 additions and 355 deletions

View File

@@ -1,11 +1,25 @@
## 运行harmony_use_pushy项目步骤
### 1. 在项目根目录执行下面命令安装第三方依赖
### 1.将项目克隆到本地后在项目根目录创建libs文件夹
### 2.然后将[`rnoh`](https://github.com/bozaigao/rnoh)克隆到libs文件夹中。
说明rnoh项目基于react-native 0.72.5版本适配如果使用最新的RN版本可能会报错项目适配RN新版本请关注[`gitee仓库`](https://gitee.com/openharmony-sig/ohos_react_native/tree/0.72.5-ohos-5.0-release/tester/harmony/react_native_openharmony/src/main)
### 3.进入rnoh项目执行下面命令对rnoh项目依赖的C++库进行初始化;
```
git submodule update --init --recursive
```
### 4. 确保在react-native-update根目录已经执行过yarn submodule命令。
说明这个命令会在harmony/src/main/cpp目录生成HDiffPatch和lzma的C++模块依赖。
### 5. 在项目根目录执行下面命令安装第三方依赖。
```
yarn install
```
### 2. 在项目根目录执行下面命令生成bundle包文件。
### 6. 在项目根目录执行下面命令生成bundle包文件。
```
yarn build
```
@@ -13,8 +27,8 @@ yarn build
**注意⚠️**在使用pushy bundle --platform harmony命令进行打包的默认bundle包名是Hbundle.harmony.js不要随意修改包名因为diff是匹配该包名进行生成的。
### 3. 使用DevEco Studio IDE打开harmony目录然后执行sync运行项目
### 7. 使用DevEco Studio IDE打开harmony目录然后执行sync运行项目
![image](./sync.png)
### 4 运行效果图
### 8 运行效果图
![image](./demo.png)

View File

@@ -37,6 +37,10 @@
}
]
},
{
name: 'rnoh',
srcPath: '../libs/rnoh',
},
{
name: 'pushy',
srcPath: '../node_modules/react-native-update/harmony',

View File

@@ -14,11 +14,11 @@ export function generatePushyBuildTime(str?: string) {
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true });
}
const moduleJsonPath = path.resolve(__dirname, '../AppScope/app.json5');
const moduleJsonPath = path.resolve(__dirname, './oh-package.json5');
let versionName = '';
if (fs.existsSync(moduleJsonPath)) {
const moduleContent = fs.readFileSync(moduleJsonPath, 'utf-8');
const versionMatch = moduleContent.match(/"versionName":\s*"([^"]+)"/);
const versionMatch = moduleContent.match(/"version":\s*"([^"]+)"/);
if (versionMatch && versionMatch[1]) {
versionName = versionMatch[1];
}
@@ -41,4 +41,4 @@ export function generatePushyBuildTime(str?: string) {
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[generatePushyBuildTime()] /* Custom plugin to extend the functionality of Hvigor. */
}
}

View File

@@ -5,25 +5,24 @@
"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",
"pushy@../../node_modules/react-native-update/harmony": "pushy@../../node_modules/react-native-update/harmony"
"pushy@../../node_modules/react-native-update/harmony": "pushy@../../node_modules/react-native-update/harmony",
"rnoh@../../libs/rnoh": "rnoh@../../libs/rnoh"
},
"packages": {
"@rnoh/react-native-openharmony@0.72.38": {
"name": "@rnoh/react-native-openharmony",
"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",
"registryType": "ohpm"
},
"pushy@../../node_modules/react-native-update/harmony": {
"name": "pushy",
"version": "3.1.0-0.0.7",
"resolved": "../../node_modules/react-native-update/harmony",
"registryType": "local",
"dependencies": {
"@rnoh/react-native-openharmony": "^0.72.38"
"rnoh": "file:../../../libs/rnoh"
}
},
"rnoh@../../libs/rnoh": {
"name": "rnoh",
"version": "0.72.12",
"resolved": "../../libs/rnoh",
"registryType": "local"
}
}
}

View File

@@ -6,7 +6,7 @@
"author": "",
"license": "",
"dependencies": {
"@rnoh/react-native-openharmony": "0.72.38",
"rnoh": "file:../../libs/rnoh",
"pushy": "file:../../node_modules/react-native-update/harmony"
}
}

View File

@@ -2,23 +2,12 @@ cmake_minimum_required(VERSION 3.16)
project(rnapp)
set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
set(OH_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@rnoh/react-native-openharmony/src/main/cpp")
set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/rnoh/src/main/cpp")
set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
set(LOG_VERBOSITY_LEVEL 1)
set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
add_compile_definitions(WITH_HITRACE_SYSTRACE)
add_subdirectory("${OH_MODULES}/pushy/src/main/cpp" ./pushy)
add_subdirectory("${RNOH_CPP_DIR}" ./rn)
file(GLOB GENERATED_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/generated/*.cpp") # this line is needed by codegen v1
add_library(rnoh_app SHARED
${GENERATED_CPP_FILES}
"./PackageProvider.cpp"
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
)

View File

@@ -1,4 +1,4 @@
import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts';
import type {RNPackageContext, RNPackage} from 'rnoh/ts';
import {PushyPackage} from 'pushy/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {

View File

@@ -1,4 +1,4 @@
import {RNAbility} from '@rnoh/react-native-openharmony';
import {RNAbility} from 'rnoh/ts';
export default class EntryAbility extends RNAbility {
getPagePath() {

View File

@@ -1,32 +1,26 @@
import { FileJSBundleProvider } from 'pushy/src/main/ets/FileJSBundleProvider';
import { ComponentBuilderContext, RNOHCoreContext,RNAbility } from '@rnoh/react-native-openharmony';
import { ComponentBuilderContext, JSBundleProvider, RNOHLogger } from 'rnoh';
import {
RNApp,
RNAbility,
AnyJSBundleProvider,
ResourceJSBundleProvider,
TraceJSBundleProviderDecorator,
} from '@rnoh/react-native-openharmony'
} from 'rnoh'
import { createRNPackages } from '../RNPackagesFactory'
import preferences from '@ohos.data.preferences';
const arkTsComponentNames: Array<string> = [];
@Builder
export function buildCustomRNComponent(ctx: ComponentBuilderContext) {
// There seems to be a problem with the placement of ArkTS components in mixed mode. Nested Stack temporarily avoided.
Stack() {
}
.position({ x: 0, y: 0 })
export function CustomComponentBuilder(ctx: ComponentBuilderContext) {
}
const wrappedCustomRNComponentBuilder = wrapBuilder(buildCustomRNComponent)
@Entry
@Component
struct Index {
@StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined
@StorageLink('RNAbility') private rnAbility: RNAbility | undefined = undefined
@State shouldShow: boolean = false
@State message: string = 'Hello World';
aboutToAppear(): void {
this.shouldShow = true
@@ -36,37 +30,28 @@ struct Index {
// NOTE: this is required since `Ability`'s `onBackPressed` function always
// terminates or puts the app in the background, but we want Ark to ignore it completely
// when handled by RN
this.rnohCoreContext!.dispatchBackPress()
// this.preferences = preferences.getPreferencesSync(this.context, {name:'update'});
return true
return this.rnAbility?.onBackPress();
}
build() {
Column() {
if (this.rnohCoreContext && this.shouldShow) {
if (this.rnAbility && this.shouldShow) {
RNApp({
rnInstanceConfig: {
createRNPackages,
enableNDKTextMeasuring: true,
enableBackgroundExecutor: false,
enableCAPIArchitecture: true,
arkTsComponentNames: arkTsComponentNames,
},
rnInstanceConfig: { createRNPackages },
initialProps: { "foo": "bar" } as Record<string, string>,
appKey: "harmony_use_pushy",
wrappedCustomRNComponentBuilder: wrappedCustomRNComponentBuilder,
buildCustomComponent: CustomComponentBuilder,
onSetUp: (rnInstance) => {
rnInstance.enableFeatureFlag("ENABLE_RN_INSTANCE_CLEAN_UP")
},
jsBundleProvider: new TraceJSBundleProviderDecorator(
new AnyJSBundleProvider([
// MetroJSBundleProvider.fromServerIp('127.0.0.1'),
// new ResourceJSBundleProvider(rnohCoreContext.uiAbilityContext.resourceManager, 'hermes_bundle.hbc'),
new FileJSBundleProvider(this.rnohCoreContext.uiAbilityContext),
new ResourceJSBundleProvider(this.rnohCoreContext.uiAbilityContext.resourceManager, 'bundle.harmony.js')
// new ResourceJSBundleProvider(this.rnAbility.context.resourceManager, 'hermes_bundle.hbc'),
new FileJSBundleProvider(this.rnAbility.context),
new ResourceJSBundleProvider(this.rnAbility.context.resourceManager, 'bundle.harmony.js')
]),
this.rnohCoreContext.logger),
this.rnAbility.getLogger()),
})
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
{
"pushy_build_time": "2025-02-14T09:43:25.648Z",
"versionName": "1.0.0"
}

View File

@@ -1,14 +0,0 @@
{
"ios": {
"appId": 24794,
"appKey": "SqShg4Klnj2hG6LAFMW2PdcgSSuniz0T"
},
"android": {
"appId": 27509,
"appKey": "aQz3Uc2pA7gt_prDaQ4rbWRY"
},
"harmony": {
"appId": 29140,
"appKey": "JLklGflGIRbY-cMebjQwm1J1"
}
}

View File

@@ -13,8 +13,5 @@
"suppressImplicitAnyIndexErrors": true,
"strict": false
}
},
"overrides": {
"@rnoh/react-native-openharmony": "0.72.38"
}
}

View File

@@ -8,7 +8,7 @@
"appKey": "aQz3Uc2pA7gt_prDaQ4rbWRY"
},
"harmony": {
"appId": 29140,
"appKey": "JLklGflGIRbY-cMebjQwm1J1"
"appId": 29040,
"appKey": "gdzeAqAFE5Jew15c5Df8EKU9"
}
}

View File

@@ -6003,7 +6003,7 @@ react-is@^17.0.1:
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
"react-native-update@file:../..":
version "10.19.6"
version "10.15.1"
dependencies:
nanoid "^3.3.3"
react-native-url-polyfill "^2.0.0"

View File

@@ -5,7 +5,7 @@ buildscript {
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.25"
kotlinVersion = "1.9.24"
}
repositories {
google()

View File

@@ -1,18 +1,18 @@
{
"lockfileVersion": 1,
"lockfileVersion": 0,
"workspaces": {
"": {
"name": "testHotUpdate",
"dependencies": {
"form-data": "^4.0.2",
"form-data": "^4.0.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"react": "18.3.1",
"react-native": "0.76.7",
"react-native-camera-kit": "^14.2.0",
"react-native": "0.76.6",
"react-native-camera-kit": "^14.1.0",
"react-native-paper": "^5.13.1",
"react-native-safe-area-context": "^5.2.0",
"react-native-svg": "^15.11.1",
"react-native-update": "^10.23.0",
"react-native-safe-area-context": "^5.1.0",
"react-native-update": "^10.19.6",
"react-native-vector-icons": "^10.2.0",
},
"devDependencies": {
@@ -22,10 +22,10 @@
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.7",
"@react-native/eslint-config": "0.76.7",
"@react-native/metro-config": "0.76.7",
"@react-native/typescript-config": "0.76.7",
"@react-native/babel-preset": "0.76.6",
"@react-native/eslint-config": "0.76.6",
"@react-native/metro-config": "0.76.6",
"@react-native/typescript-config": "0.76.6",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
@@ -396,37 +396,37 @@
"@react-native-community/cli-types": ["@react-native-community/cli-types@15.0.1", "", { "dependencies": { "joi": "^17.2.1" } }, "sha512-sWiJ62kkGu2mgYni2dsPxOMBzpwTjNsDH1ubY4mqcNEI9Zmzs0vRwwDUEhYqwNGys9+KpBKoZRrT2PAlhO84xA=="],
"@react-native/assets-registry": ["@react-native/assets-registry@0.76.7", "", {}, "sha512-o79whsqL5fbPTUQO9w1FptRd4cw1TaeOrXtQSLQeDrMVAenw/wmsjyPK10VKtvqxa1KNMtWEyfgxcM8CVZVFmg=="],
"@react-native/assets-registry": ["@react-native/assets-registry@0.76.6", "", {}, "sha512-YI8HoReYiIwdFQs+k9Q9qpFTnsyYikZxgs/UVtVbhKixXDQF6F9LLvj2naOx4cfV+RGybNKxwmDl1vUok/dRFQ=="],
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.76.7", "", { "dependencies": { "@react-native/codegen": "0.76.7" } }, "sha512-+8H4DXJREM4l/pwLF/wSVMRzVhzhGDix5jLezNrMD9J1U1AMfV2aSkWA1XuqR7pjPs/Vqf6TaPL7vJMZ4LU05Q=="],
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.76.6", "", { "dependencies": { "@react-native/codegen": "0.76.6" } }, "sha512-yFC9I/aDBOBz3ZMlqKn2NY/mDUtCksUNZ7AQmBiTAeVTUP0ujEjE0hTOx5Qd+kok7A7hwZEX87HdSgjiJZfr5g=="],
"@react-native/babel-preset": ["@react-native/babel-preset@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.76.7", "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-/c5DYZ6y8tyg+g8tgXKndDT7mWnGmkZ9F+T3qNDfoE3Qh7ucrNeC2XWvU9h5pk8eRtj9l4SzF4aO1phzwoibyg=="],
"@react-native/babel-preset": ["@react-native/babel-preset@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.76.6", "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-ojlVWY6S/VE/nb9hIRetPMTsW9ZmGb2R3dnToEXAtQQDz41eHMHXbkw/k2h0THp6qhas25ruNvn3N5n2o+lBzg=="],
"@react-native/codegen": ["@react-native/codegen@0.76.7", "", { "dependencies": { "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.23.1", "invariant": "^2.2.4", "jscodeshift": "^0.14.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/preset-env": "^7.1.6" } }, "sha512-FAn585Ll65YvkSrKDyAcsdjHhhAGiMlSTUpHh0x7J5ntudUns+voYms0xMP+pEPt0XuLdjhD7zLIIlAWP407+g=="],
"@react-native/codegen": ["@react-native/codegen@0.76.6", "", { "dependencies": { "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.23.1", "invariant": "^2.2.4", "jscodeshift": "^0.14.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/preset-env": "^7.1.6" } }, "sha512-BABb3e5G/+hyQYEYi0AODWh2km2d8ERoASZr6Hv90pVXdUHRYR+yxCatX7vSd9rnDUYndqRTzD0hZWAucPNAKg=="],
"@react-native/community-cli-plugin": ["@react-native/community-cli-plugin@0.76.7", "", { "dependencies": { "@react-native/dev-middleware": "0.76.7", "@react-native/metro-babel-transformer": "0.76.7", "chalk": "^4.0.0", "execa": "^5.1.1", "invariant": "^2.2.4", "metro": "^0.81.0", "metro-config": "^0.81.0", "metro-core": "^0.81.0", "node-fetch": "^2.2.0", "readline": "^1.3.0", "semver": "^7.1.3" }, "peerDependencies": { "@react-native-community/cli-server-api": "*" }, "optionalPeers": ["@react-native-community/cli-server-api"] }, "sha512-lrcsY2WPLCEWU1pjdNV9+Ccj8vCEwCCURZiPa5aqi7lKB4C++1hPrxA8/CWWnTNcQp76DsBKGYqTFj7Ud4aupw=="],
"@react-native/community-cli-plugin": ["@react-native/community-cli-plugin@0.76.6", "", { "dependencies": { "@react-native/dev-middleware": "0.76.6", "@react-native/metro-babel-transformer": "0.76.6", "chalk": "^4.0.0", "execa": "^5.1.1", "invariant": "^2.2.4", "metro": "^0.81.0", "metro-config": "^0.81.0", "metro-core": "^0.81.0", "node-fetch": "^2.2.0", "readline": "^1.3.0", "semver": "^7.1.3" }, "peerDependencies": { "@react-native-community/cli-server-api": "*" }, "optionalPeers": ["@react-native-community/cli-server-api"] }, "sha512-nETlc/+U5cESVluzzgN0OcVfcoMijGBaDWzOaJhoYUodcuqnqtu75XsSEc7yzlYjwNQG+vF83mu9CQGezruNMA=="],
"@react-native/debugger-frontend": ["@react-native/debugger-frontend@0.76.7", "", {}, "sha512-89ZtZXt7ZxE94i7T94qzZMhp4Gfcpr/QVpGqEaejAxZD+gvDCH21cYSF+/Rz2ttBazm0rk5MZ0mFqb0Iqp1jmw=="],
"@react-native/debugger-frontend": ["@react-native/debugger-frontend@0.76.6", "", {}, "sha512-kP97xMQjiANi5/lmf8MakS7d8FTJl+BqYHQMqyvNiY+eeWyKnhqW2GL2v3eEUBAuyPBgJGivuuO4RvjZujduJg=="],
"@react-native/dev-middleware": ["@react-native/dev-middleware@0.76.7", "", { "dependencies": { "@isaacs/ttlcache": "^1.4.1", "@react-native/debugger-frontend": "0.76.7", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", "debug": "^2.2.0", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "open": "^7.0.3", "selfsigned": "^2.4.1", "serve-static": "^1.13.1", "ws": "^6.2.3" } }, "sha512-Jsw8g9DyLPnR9yHEGuT09yHZ7M88/GL9CtU9WmyChlBwdXSeE3AmRqLegsV3XcgULQ1fqdemokaOZ/MwLYkjdA=="],
"@react-native/dev-middleware": ["@react-native/dev-middleware@0.76.6", "", { "dependencies": { "@isaacs/ttlcache": "^1.4.1", "@react-native/debugger-frontend": "0.76.6", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", "debug": "^2.2.0", "nullthrows": "^1.1.1", "open": "^7.0.3", "selfsigned": "^2.4.1", "serve-static": "^1.13.1", "ws": "^6.2.3" } }, "sha512-1bAyd2/X48Nzb45s5l2omM75vy764odx/UnDs4sJfFCuK+cupU4nRPgl0XWIqgdM/2+fbQ3E4QsVS/WIKTFxvQ=="],
"@react-native/eslint-config": ["@react-native/eslint-config@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@react-native/eslint-plugin": "0.76.7", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0" }, "peerDependencies": { "eslint": ">=8", "prettier": ">=2" } }, "sha512-pd5Vgcwph0gtBvPmQ6Np6fC7vfI5/4xGdS4YNT5VTtrIcK5mki9M2iWvvQ5K12C4KHHLCFXGmtghTo1VIKzHCw=="],
"@react-native/eslint-config": ["@react-native/eslint-config@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@react-native/eslint-plugin": "0.76.6", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0" }, "peerDependencies": { "eslint": ">=8", "prettier": ">=2" } }, "sha512-s7dsWapoB2oTgwhS8cjJmls9qsAOEbodWnFVeDkGytcjlOWDEYdDSqOhJXuwAqNmkZP1noXmcqRATo+gCnY20A=="],
"@react-native/eslint-plugin": ["@react-native/eslint-plugin@0.76.7", "", {}, "sha512-mT+XOZJwUVMF/wrnyQcuyhLKLuDQmeC48YD/FBhSqCq+Q7zItxe78gDnXgMmuoeZuEu66s2nV1dzBM3qKOP/Xw=="],
"@react-native/eslint-plugin": ["@react-native/eslint-plugin@0.76.6", "", {}, "sha512-pAqN77lBXyfRcKN2D17AqWJLKkHNV/ZevPKKIGZ2LbLeM8POWsYcNnGtaO+glny8LbE+ZSBEXknMSIN+PrDk/A=="],
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.76.7", "", {}, "sha512-gQI6RcrJbigU8xk7F960C5xQIgvbBj20TUvGecD+N2PHfbLpqR+92cj7hz3UcbrCONmTP40WHnbMMJ8P+kLsrA=="],
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.76.6", "", {}, "sha512-sDzpf4eiynryoS6bpYCweGoxSmWgCSx9lzBoxIIW+S6siyGiTaffzZHWCm8mIn9UZsSPlEO37q62ggnR9Zu/OA=="],
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.76.7", "", {}, "sha512-+iEikj6c6Zvrg1c3cYMeiPB+5nS8EaIC3jCtP6Muk3qc7c386IymEPM2xycIlfg04DPZvO3D4P2/vaO9/TCnUg=="],
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.76.6", "", {}, "sha512-cDD7FynxWYxHkErZzAJtzPGhJ13JdOgL+R0riTh0hCovOfIUz9ItffdLQv2nx48lnvMTQ+HZXMnGOZnsFCNzQw=="],
"@react-native/metro-babel-transformer": ["@react-native/metro-babel-transformer@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.76.7", "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" } }, "sha512-jDS1wR7q46xY5ah+jF714Mvss9l7+lmwW/tplahZgLKozkYDC8Td5o9TOCgKlv18acw9H1V7zv8ivuRSj8ICPg=="],
"@react-native/metro-babel-transformer": ["@react-native/metro-babel-transformer@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.76.6", "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" } }, "sha512-xSBi9jPliThu5HRSJvluqUlDOLLEmf34zY/U7RDDjEbZqC0ufPcPS7c5XsSg0GDPiXc7lgjBVesPZsKFkoIBgA=="],
"@react-native/metro-config": ["@react-native/metro-config@0.76.7", "", { "dependencies": { "@react-native/js-polyfills": "0.76.7", "@react-native/metro-babel-transformer": "0.76.7", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } }, "sha512-5kfw9wbL2FuLkZ/YjxJWgKuvN79hFuj/RtjlJmDntJDumeQH0GKMka2TVal2Cjv9SlV7Vixbt3yAWGLkXsQwTQ=="],
"@react-native/metro-config": ["@react-native/metro-config@0.76.6", "", { "dependencies": { "@react-native/js-polyfills": "0.76.6", "@react-native/metro-babel-transformer": "0.76.6", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } }, "sha512-R//+5BT/1hXv3ZjFjgF5uvR4xBpiHbw9Ci9AtCebPaAslQL8FXqAtwhn1Fjrl+ECo1Nhe25B/Lzl9WMWmI9X0w=="],
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.76.7", "", {}, "sha512-ST1xxBuYVIXPdD81dR6+tzIgso7m3pa9+6rOBXTh5Xm7KEEFik7tnQX+GydXYMp3wr1gagJjragdXkPnxK6WNg=="],
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.76.6", "", {}, "sha512-1n4udXH2Cla31iA/8eLRdhFHpYUYK1NKWCn4m1Sr9L4SarWKAYuRFliK1fcLvPPALCFoFlWvn8I0ekdUOHMzDQ=="],
"@react-native/typescript-config": ["@react-native/typescript-config@0.76.7", "", {}, "sha512-grJJY2DjXTQ0CDReSAHxOmp4eYDnQ5coUT9ZMdXEovmeALRysq54HH3vvdsM8FRAgQx1ZhGzRIUEF0/HDrAgQw=="],
"@react-native/typescript-config": ["@react-native/typescript-config@0.76.6", "", {}, "sha512-i1gh+wLaAwG6ZVe2Mkoa10RJznsfOC1crRh0JAobCHaTaA/ZmuFScBTRzRE60pO5Oz6HWM1qbQST+JM+5LiMuA=="],
"@react-native/virtualized-lists": ["@react-native/virtualized-lists@0.76.7", "", { "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "*", "react-native": "*" }, "optionalPeers": ["@types/react"] }, "sha512-pRUf1jUO8H9Ft04CaWv76t34QI9wY0sydoYlIwEtqXjjMJgmgDoOCAWBjArgn2mk8/rK+u/uicI67ZCYCp1pJw=="],
"@react-native/virtualized-lists": ["@react-native/virtualized-lists@0.76.6", "", { "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "*", "react-native": "*" }, "optionalPeers": ["@types/react"] }, "sha512-0HUWVwJbRq1BWFOu11eOWGTSmK9nMHhoMPyoI27wyWcl/nqUx7HOxMbRVq0DsTCyATSMPeF+vZ6o1REapcNWKw=="],
"@sideway/address": ["@sideway/address@4.1.5", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q=="],
@@ -582,8 +582,6 @@
"bluebird": ["bluebird@3.7.2", "", {}, "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="],
"boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="],
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
@@ -690,12 +688,6 @@
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
"css-select": ["css-select@5.1.0", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" } }, "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg=="],
"css-tree": ["css-tree@1.1.3", "", { "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="],
"css-what": ["css-what@6.1.0", "", {}, "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw=="],
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
"data-view-buffer": ["data-view-buffer@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ=="],
@@ -742,14 +734,6 @@
"doctrine": ["doctrine@3.0.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w=="],
"dom-serializer": ["dom-serializer@2.0.0", "", { "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", "entities": "^4.2.0" } }, "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg=="],
"domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="],
"domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="],
"domutils": ["domutils@3.2.2", "", { "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", "domhandler": "^5.0.3" } }, "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw=="],
"dtrace-provider": ["dtrace-provider@0.8.8", "", { "dependencies": { "nan": "^2.14.0" } }, "sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg=="],
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
@@ -768,8 +752,6 @@
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
"entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
"envinfo": ["envinfo@7.14.0", "", { "bin": { "envinfo": "dist/cli.js" } }, "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg=="],
@@ -892,7 +874,7 @@
"for-each": ["for-each@0.3.3", "", { "dependencies": { "is-callable": "^1.1.3" } }, "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw=="],
"form-data": ["form-data@4.0.2", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" } }, "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w=="],
"form-data": ["form-data@4.0.1", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw=="],
"fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="],
@@ -1214,8 +1196,6 @@
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
"mdn-data": ["mdn-data@2.0.14", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="],
"memoize-one": ["memoize-one@5.2.1", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="],
"merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],
@@ -1312,8 +1292,6 @@
"npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
"nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="],
"nullthrows": ["nullthrows@1.1.1", "", {}, "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw=="],
"ob1": ["ob1@0.81.0", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-6Cvrkxt1tqaRdWqTAMcVYEiO5i1xcF9y7t06nFdjFqkfPsEloCf8WwhXdwBpNUkVYSQlSGS7cDgVQR86miBfBQ=="],
@@ -1424,17 +1402,15 @@
"react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
"react-native": ["react-native@0.76.7", "", { "dependencies": { "@jest/create-cache-key-function": "^29.6.3", "@react-native/assets-registry": "0.76.7", "@react-native/codegen": "0.76.7", "@react-native/community-cli-plugin": "0.76.7", "@react-native/gradle-plugin": "0.76.7", "@react-native/js-polyfills": "0.76.7", "@react-native/normalize-colors": "0.76.7", "@react-native/virtualized-lists": "0.76.7", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "^0.23.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^5.3.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", "ws": "^6.2.3", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-GPJcQeO3qUi1MvuhsC2DC6tH8gJQ4uc4JWPORrdeuCGFWE3QLsN8/hiChTEvJREHLfQSV61YPI8gIOtAQ8c37g=="],
"react-native": ["react-native@0.76.6", "", { "dependencies": { "@jest/create-cache-key-function": "^29.6.3", "@react-native/assets-registry": "0.76.6", "@react-native/codegen": "0.76.6", "@react-native/community-cli-plugin": "0.76.6", "@react-native/gradle-plugin": "0.76.6", "@react-native/js-polyfills": "0.76.6", "@react-native/normalize-colors": "0.76.6", "@react-native/virtualized-lists": "0.76.6", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "^0.23.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^5.3.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", "ws": "^6.2.3", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-AsRi+ud6v6ADH7ZtSOY42kRB4nbM0KtSu450pGO4pDudl4AEK/AF96ai88snb2/VJJSGGa/49QyJVFXxz/qoFg=="],
"react-native-camera-kit": ["react-native-camera-kit@14.2.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-rPk/4Ux52/Kc6oIPk0x6NsrvDkeL+kd/GAUJ4xBtTlnmiWjLTgeA2Vjgg9ik03mmyf6rV+LaqaOBT7KejhuHKQ=="],
"react-native-camera-kit": ["react-native-camera-kit@14.1.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-idkg+Sa2KbGvF6SUqmuAr2U12qBELdiuUJ6fxgB4whUC2AyYHi5jBxiGv6whY/eTB3is7nW1S+TjyM9pEBzNzw=="],
"react-native-paper": ["react-native-paper@5.13.1", "", { "dependencies": { "@callstack/react-theme-provider": "^3.0.9", "color": "^3.1.2", "use-latest-callback": "^0.1.5" }, "peerDependencies": { "react": "*", "react-native": "*", "react-native-safe-area-context": "*", "react-native-vector-icons": "*" } }, "sha512-8frKVKJ5JBd8WL1G3tpcYzOgK40kxkD/U+yLHGKNeLnD6v1Qc9W6DxWTHWN7lsX/DPYnhgvw1aKkYaPTmDj5pg=="],
"react-native-safe-area-context": ["react-native-safe-area-context@5.2.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-QpcGA6MRKe8Zbpf1hirCBudNQYGsMv0n/CTTROMOFcXbqRUoEXLCsYxUmYKi7JJb3ziL2DbyzWXyH2/gw4Tkfw=="],
"react-native-safe-area-context": ["react-native-safe-area-context@5.1.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-Y4vyJX+0HPJUQNVeIJTj2/UOjbSJcB09OEwirAWDrOZ67Lz5p43AmjxSy8nnZft1rMzoh3rcPuonB6jJyHTfCw=="],
"react-native-svg": ["react-native-svg@15.11.1", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", "warn-once": "0.1.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-Qmwx/yJKt+AHUr4zjxx/Q69qwKtRfr1+uIfFMQoq3WFRhqU76aL9db1DyvPiY632DAsVGba1pHf92OZPkpjrdQ=="],
"react-native-update": ["react-native-update@10.23.0", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-gt6kL5Fd8iG46YYwvcuiD6Yod7DSzNZ/Qo5YuiAXrdO/h+3SCJsfDGVmSpanShwAepvvuAUELIJZIRpSrJdIvA=="],
"react-native-update": ["react-native-update@10.19.6", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-6RRM9OvhC4DPFxzcbwDU1SE9Lgxi+p2jFu6CN56Dm2s+G7bIxhG5Y6cN0Y3/MtNFpzbmfsOFy1ywAxnkvUO7sQ=="],
"react-native-url-polyfill": ["react-native-url-polyfill@2.0.0", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="],
@@ -1698,8 +1674,6 @@
"walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="],
"warn-once": ["warn-once@0.1.1", "", {}, "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q=="],
"wcwidth": ["wcwidth@1.0.1", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="],
"webidl-conversions": ["webidl-conversions@5.0.0", "", {}, "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA=="],
@@ -1836,8 +1810,6 @@
"cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
"css-tree/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"detox/fs-extra": ["fs-extra@11.2.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw=="],
"detox/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],

View File

@@ -1242,7 +1242,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-safe-area-context (5.2.0):
- react-native-safe-area-context (5.1.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1255,8 +1255,8 @@ PODS:
- React-featureflags
- React-graphics
- React-ImageManager
- react-native-safe-area-context/common (= 5.2.0)
- react-native-safe-area-context/fabric (= 5.2.0)
- react-native-safe-area-context/common (= 5.1.0)
- react-native-safe-area-context/fabric (= 5.1.0)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
@@ -1265,7 +1265,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-safe-area-context/common (5.2.0):
- react-native-safe-area-context/common (5.1.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1286,7 +1286,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-safe-area-context/fabric (5.2.0):
- react-native-safe-area-context/fabric (5.1.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1308,7 +1308,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-update (10.23.0):
- react-native-update (10.19.6):
- DoubleConversion
- glog
- hermes-engine
@@ -1322,8 +1322,8 @@ PODS:
- React-featureflags
- React-graphics
- React-ImageManager
- react-native-update/HDiffPatch (= 10.23.0)
- react-native-update/RCTPushy (= 10.23.0)
- react-native-update/HDiffPatch (= 10.19.6)
- react-native-update/RCTPushy (= 10.19.6)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
@@ -1333,7 +1333,7 @@ PODS:
- ReactCommon/turbomodule/core
- SSZipArchive
- Yoga
- react-native-update/HDiffPatch (10.23.0):
- react-native-update/HDiffPatch (10.19.6):
- DoubleConversion
- glog
- hermes-engine
@@ -1356,7 +1356,7 @@ PODS:
- ReactCommon/turbomodule/core
- SSZipArchive
- Yoga
- react-native-update/RCTPushy (10.23.0):
- react-native-update/RCTPushy (10.19.6):
- DoubleConversion
- glog
- hermes-engine
@@ -1646,50 +1646,7 @@ PODS:
- React-logger (= 0.76.6)
- React-perflogger (= 0.76.6)
- React-utils (= 0.76.6)
- ReactNativeCameraKit (14.2.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNSVG (15.11.1):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.11.1)
- Yoga
- RNSVG/common (15.11.1):
- ReactNativeCameraKit (14.1.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1803,7 +1760,6 @@ DEPENDENCIES:
- ReactCodegen (from `build/generated/ios`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- ReactNativeCameraKit (from `../node_modules/react-native-camera-kit`)
- RNSVG (from `../node_modules/react-native-svg`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
@@ -1944,8 +1900,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeCameraKit:
:path: "../node_modules/react-native-camera-kit"
RNSVG:
:path: "../node_modules/react-native-svg"
RNVectorIcons:
:path: "../node_modules/react-native-vector-icons"
Yoga:
@@ -1987,8 +1941,8 @@ SPEC CHECKSUMS:
React-logger: d42a53754a7252cc7a851315f0da2e46b450ea92
React-Mapbuffer: 89885d1518433a462fe64b68bf5e097997380090
React-microtasksnativemodule: 36341e09dcd1df535503e6ed2ddf88f10da56d52
react-native-safe-area-context: 5e53e2b0fc3a2994ad0c89a2486e545b6566d8c4
react-native-update: 4a39d6a9ae4393fbb165af238dc55b1b79e1b9da
react-native-safe-area-context: 0d8827b2420dfb4c8a8e27639585e61b912261be
react-native-update: 3a5f413d7b9eadfe0af4d15c1b32de678670c2ce
React-nativeconfig: 539ff4de6ce3b694e8e751080568c281c84903ce
React-NativeModulesApple: 702246817c286d057e23fe4b1302019796e62521
React-perflogger: f260e2de95f9dbd002035251559c13bf1f0643d4
@@ -2016,8 +1970,7 @@ SPEC CHECKSUMS:
React-utils: 1b14c41c3edf4d96db1247a78e0ad96e7ceea011
ReactCodegen: 0a0eef9c8cd84c932ae1868832086c6441811e84
ReactCommon: 3c1c8c6d777103c0e60e37c6c5f08e828e2a77c9
ReactNativeCameraKit: 32b81683fe511833e266d428be942fafc43bea1c
RNSVG: c50d29abf38abbf48ebfc50b6258f81099aeabae
ReactNativeCameraKit: d4d3b606063d42d34091d53de6193ed4b330bb0c
RNVectorIcons: a24016b773380b1aa37fca501ec6b94a951890a0
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef

View File

@@ -14,16 +14,15 @@
"dev:harmony": "react-native bundle-harmony --dev"
},
"dependencies": {
"form-data": "^4.0.2",
"form-data": "^4.0.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"react": "18.3.1",
"react-native": "0.76.7",
"react-native-camera-kit": "^14.2.0",
"react-native": "0.76.6",
"react-native-camera-kit": "^14.1.0",
"react-native-paper": "^5.13.1",
"react-native-safe-area-context": "^5.2.0",
"react-native-svg": "^15.11.1",
"react-native-update": "^10.23.0",
"react-native-safe-area-context": "^5.1.0",
"react-native-update": "^10.19.6",
"react-native-vector-icons": "^10.2.0"
},
"devDependencies": {
@@ -33,10 +32,10 @@
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.7",
"@react-native/eslint-config": "0.76.7",
"@react-native/metro-config": "0.76.7",
"@react-native/typescript-config": "0.76.7",
"@react-native/babel-preset": "0.76.6",
"@react-native/eslint-config": "0.76.6",
"@react-native/metro-config": "0.76.6",
"@react-native/typescript-config": "0.76.6",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",

View File

@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-11.5 -10.23174 23 20.46348">
<title>React Logo</title>
<circle cx="0" cy="0" r="2.05" fill="#61dafb"/>
<g stroke="#61dafb" stroke-width="1" fill="none">
<ellipse rx="11" ry="4.2"/>
<ellipse rx="11" ry="4.2" transform="rotate(60)"/>
<ellipse rx="11" ry="4.2" transform="rotate(120)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 365 B

View File

@@ -20,7 +20,6 @@ import {
Portal,
} from 'react-native-paper';
import {Camera} from 'react-native-camera-kit';
import {LocalSvg} from 'react-native-svg/css';
import TestConsole from './TestConsole';
@@ -92,21 +91,11 @@ function App() {
/>
</Modal>
</Portal>
<View style={{flexDirection: 'row', alignItems: 'center', gap: 10}}>
<Text>png:</Text>
<Image
resizeMode={'contain'}
source={require('./assets/shezhi.png')}
style={styles.image}
/>
</View>
<View style={{flexDirection: 'row', alignItems: 'center', gap: 10}}>
<Text>svg:</Text>
<LocalSvg
asset={require('./assets/react-logo.svg')}
style={{width: 30, height: 30}}
/>
</View>
<Image
resizeMode={'contain'}
source={require('./assets/shezhi.png')}
style={styles.image}
/>
<Text style={styles.instructions}>
{'\n'}
: {packageVersion}

View File

@@ -2,8 +2,6 @@
本组件是面向 React Native 提供热更新功能的组件,详情请访问我们的官方网站 <https://pushy.reactnative.cn>
**现已支持鸿蒙以及新架构**
### 快速开始
请查看[文档](https://pushy.reactnative.cn/docs/getting-started.html)
@@ -22,7 +20,7 @@
### 本地开发
```
$ git clone git@github.com:reactnativecn/react-native-update.git
$ git clone git@github.com:reactnativecn/react-native-pushy.git
$ cd react-native-pushy/Example/testHotUpdate
$ yarn
$ yarn start
@@ -34,4 +32,4 @@ $ yarn start
本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-update/issues)发帖提问。
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-pushy/issues)发帖提问。

View File

@@ -144,24 +144,8 @@ public class UpdateModuleImpl {
return;
}
try {
// Try to get getReactDelegate method using reflection
java.lang.reflect.Method getReactDelegateMethod =
ReactActivity.class.getMethod("getReactDelegate");
if (getReactDelegateMethod != null) {
ReactDelegate reactDelegate = (ReactDelegate)
getReactDelegateMethod.invoke(currentActivity);
// Try to get reload method using reflection
java.lang.reflect.Method reloadMethod =
ReactDelegate.class.getMethod("reload");
if (reloadMethod != null) {
reloadMethod.invoke(reactDelegate);
} else {
throw new NoSuchMethodException();
}
} else {
throw new NoSuchMethodException();
}
final ReactDelegate reactDelegate = ((ReactActivity) currentActivity).getReactDelegate();
reactDelegate.reload();
} catch (Throwable e) {
currentActivity.runOnUiThread(new Runnable() {
@Override

11
harmony/README.OpenSource Normal file
View File

@@ -0,0 +1,11 @@
[
{
"Name": "react-native-netinfo",
"License": "MIT License",
"License File": "https://github.com/react-native-netinfo/react-native-netinfo/blob/master/LICENSE",
"Version Number": "11.1.0",
"Owner" : "Matt Oakes <hello@mattoakes.net>"
"Upstream URL": "https://github.com/react-native-netinfo/react-native-netinfo",
"Description": "React Native Network Info API for Android, iOS, macOS, Windows & Web. It allows you to get information on:Connection typeConnection quality"
}
]

View File

@@ -5,15 +5,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@../../../libs/rnoh": "rnoh@../../../libs/rnoh"
},
"packages": {
"@rnoh/react-native-openharmony@0.72.38": {
"name": "@rnoh/react-native-openharmony",
"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",
"registryType": "ohpm"
"rnoh@../../../libs/rnoh": {
"name": "rnoh",
"version": "0.72.12",
"resolved": "../../../libs/rnoh",
"registryType": "local"
}
}
}

View File

@@ -7,6 +7,6 @@
"main": "index.ets",
"version": "3.1.0-0.0.7",
"dependencies": {
"@rnoh/react-native-openharmony":"^0.72.38"
"rnoh": "file:../../../libs/rnoh"
}
}

View File

@@ -1 +0,0 @@
../../../../../harmony/oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.38/oh_modules/@rnoh/react-native-openharmony

View File

@@ -72,18 +72,16 @@ napi_value HdiffPatch(napi_env env, napi_callback_info info) {
// 创建结果buffer
napi_value resultBuffer;
uint8_t* outPtr;
void* data;
status = napi_create_arraybuffer(env, newsize, &data, &resultBuffer);
status = napi_create_buffer(env, newsize, (void**)&outPtr, &resultBuffer);
if (status != napi_ok) {
napi_throw_error(env, NULL, "Failed to create result buffer");
return NULL;
}
outPtr = (uint8_t*)data;
// 执行patch
_check(kHPatch_ok==hpatch_by_mem(originPtr, originLength, outPtr, newsize,
patchPtr, patchLength, &patInfo), "hpatch");
return resultBuffer;
_clear:

View File

@@ -288,9 +288,7 @@ export class DownloadTask {
}
}
if(entry.filename !== '.DS_Store'){
await zip.decompressFile(entry.filename, params.unzipDirectory);
}
await zip.decompressFile(entry.filename, params.unzipDirectory);
}
if (!foundDiff) {
@@ -491,4 +489,4 @@ export class DownloadTask {
params.listener?.onDownloadFailed(error);
}
}
}
}

View File

@@ -1,4 +1,4 @@
import { HotReloadConfig, JSBundleProvider, JSBundleProviderError, JSPackagerClientConfig } from '@rnoh/react-native-openharmony';
import { HotReloadConfig, JSBundleProvider, JSBundleProviderError, JSPackagerClientConfig } from 'rnoh';
import fileIo from '@ohos.file.fs';
import common from '@ohos.app.ability.common';
import { UpdateContext } from './UpdateContext';
@@ -40,15 +40,20 @@ export class FileJSBundleProvider extends JSBundleProvider {
}
throw new Error('Update bundle not found');
} catch (error) {
throw new JSBundleProviderError({
whatHappened: `Couldn't load JSBundle from ${this.filePath}`,
extraData: error,
howCanItBeFixed: [`Check if a bundle exists at "${this.filePath}" on your device.`]
})
throw new JSBundleProviderError(`Couldn't load JSBundle from ${this.filePath}`, error)
}
}
getAppKeys(): string[] {
return [];
}
getHotReloadConfig(): HotReloadConfig | null {
return null;
}
getJSPackagerClientConfig(): JSPackagerClientConfig | null {
return null;
}
}

View File

@@ -1,5 +1,5 @@
import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
import { RNPackage, TurboModulesFactory } from 'rnoh/ts';
import type { TurboModule, TurboModuleContext } from 'rnoh/ts';
import { PushyTurboModule } from './PushyTurboModule';
class PushyTurboModulesFactory extends TurboModulesFactory {

View File

@@ -1,4 +1,4 @@
import { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
import { TurboModule, TurboModuleContext } from 'rnoh/ts';
import common from '@ohos.app.ability.common';
import dataPreferences from '@ohos.data.preferences';
import { bundleManager } from '@kit.AbilityKit';

View File

@@ -26,49 +26,49 @@ export class UpdateContext {
this.initPreferences();
}
private initPreferences() {
private async initPreferences() {
try {
this.preferences = preferences.getPreferencesSync(this.context, {name:'update'});
const packageVersion = this.getPackageVersion();
const storedVersion = this.preferences.getSync('packageVersion', '');
this.preferences = await preferences.getPreferences(this.context, 'update');
const packageVersion = await this.getPackageVersion();
const storedVersion = await this.preferences.get('packageVersion', '');
if (packageVersion !== storedVersion) {
this.preferences.clear();
this.preferences.putSync('packageVersion', packageVersion);
this.preferences.flush();
this.cleanUp();
await this.preferences.clear();
await this.preferences.put('packageVersion', packageVersion);
await this.preferences.flush();
this.cleanUp();
}
} catch (e) {
console.error('Failed to init preferences:', e);
}
}
public setKv(key: string, value: string): void {
this.preferences.putSync(key, value);
this.preferences.flush();
public async setKv(key: string, value: string): Promise<void> {
await this.preferences.put(key, value);
await this.preferences.flush();
}
public getKv(key: string): string {
return this.preferences.getSync(key, '') as string;
public async getKv(key: string): Promise<string> {
return await this.preferences.get(key, '') as string;
}
public isFirstTime(): boolean {
return this.preferences.getSync('firstTime', false) as boolean;
public async isFirstTime(): Promise<boolean> {
return await this.preferences.get('firstTime', false) as boolean;
}
public rolledBackVersion(): string {
return this.preferences.getSync('rolledBackVersion', '') as string;
public async rolledBackVersion(): Promise<string> {
return await this.preferences.get('rolledBackVersion', '') as string;
}
public markSuccess(): void {
this.preferences.putSync('firstTimeOk', true);
const lastVersion = this.preferences.getSync('lastVersion', '') as string;
const curVersion = this.preferences.getSync('currentVersion', '') as string;
public async markSuccess(): Promise<void> {
await this.preferences.put('firstTimeOk', true);
const lastVersion = await this.preferences.get('lastVersion', '') as string;
const curVersion = await this.preferences.get('currentVersion', '') as string;
if (lastVersion && lastVersion !== curVersion) {
this.preferences.deleteSync('lastVersion');
this.preferences.deleteSync(`hash_${lastVersion}`);
await this.preferences.delete('lastVersion');
await this.preferences.delete(`hash_${lastVersion}`);
}
this.preferences.flush();
await this.preferences.flush();
this.cleanUp();
}
@@ -143,23 +143,23 @@ export class UpdateContext {
}
}
public switchVersion(hash: string): void {
public async switchVersion(hash: string): Promise<void> {
try {
const bundlePath = `${this.rootDir}/${hash}/bundle.harmony.js`;
if (!fileIo.accessSync(bundlePath)) {
throw new Error(`Bundle version ${hash} not found.`);
}
const lastVersion = this.getKv('currentVersion');
this.setKv('currentVersion', hash);
const lastVersion = await this.getKv('currentVersion');
await this.setKv('currentVersion', hash);
if (lastVersion && lastVersion !== hash) {
this.setKv('lastVersion', lastVersion);
await this.setKv('lastVersion', lastVersion);
}
this.setKv('firstTime', 'true');
this.setKv('firstTimeOk', 'false');
this.setKv('rolledBackVersion', null);
await this.setKv('firstTime', 'true');
await this.setKv('firstTimeOk', 'false');
await this.setKv('rolledBackVersion', null);
} catch (e) {
console.error('Failed to switch version:', e);
}
@@ -176,7 +176,7 @@ export class UpdateContext {
return defaultAssetsUrl;
}
if (!this.isFirstTime()) {
if (!this.preferences.getSync('firstTimeOk', true)) {
if (!this.preferences.get('firstTimeOk', true)) {
return this.rollBack();
}
}

View File

@@ -1,5 +1,8 @@
import { TurboModuleContext } from 'rnoh/ts';
import dataPreferences from '@ohos.data.preferences';
import bundleManager from '@ohos.bundle.bundleManager';
import common from '@ohos.app.ability.common';
import { BusinessError } from '@ohos.base';
import { UpdateContext } from './UpdateContext';
import { DownloadTaskParams } from './DownloadTaskParams';
import logger from './Logger';

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "10.23.1",
"version": "10.20.0-beta.0",
"description": "react-native hot update",
"main": "src/index",
"scripts": {
@@ -26,7 +26,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/reactnativecn/react-native-update.git"
"url": "git+https://github.com/reactnativecn/react-native-pushy.git"
},
"keywords": [
"react-native",
@@ -37,13 +37,13 @@
"author": "reactnativecn",
"license": "MIT",
"bugs": {
"url": "https://github.com/reactnativecn/react-native-update/issues"
"url": "https://github.com/reactnativecn/react-native-pushy/issues"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-native": ">=0.59.0"
},
"homepage": "https://github.com/reactnativecn/react-native-update#readme",
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
"dependencies": {
"nanoid": "^3.3.3",
"react-native-url-polyfill": "^2.0.0"

View File

@@ -4,8 +4,6 @@ new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
podspec_dir = File.dirname(__FILE__)
Pod::Spec.new do |s|
s.name = package['name']
s.version = package['version']
@@ -18,16 +16,13 @@ Pod::Spec.new do |s|
s.cocoapods_version = '>= 1.6.0'
s.platform = :ios, "8.0"
s.platforms = { :ios => "11.0" }
s.source = { :git => 'https://github.com/reactnativecn/react-native-update.git', :tag => '#{s.version}' }
s.source = { :git => 'https://github.com/reactnativecn/react-native-pushy.git', :tag => '#{s.version}' }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.libraries = 'bz2', 'z'
s.vendored_libraries = 'RCTPushy/libRCTPushy.a'
s.pod_target_xcconfig = {
'USER_HEADER_SEARCH_PATHS' => "#{podspec_dir}/ios",
"DEFINES_MODULE" => "YES"
}
s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"$(SRCROOT)/../node_modules/react-native-update/ios"' }
s.resource = 'ios/pushy_build_time.txt'
s.script_phase = { :name => 'Generate build time', :script => "set -x;date +%s > \"#{podspec_dir}/ios/pushy_build_time.txt\"", :execution_position => :before_compile }
s.script_phase = { :name => 'Generate build time', :script => 'set -x;date +%s > ${PODS_ROOT}/../../node_modules/react-native-update/ios/pushy_build_time.txt', :execution_position => :before_compile }
s.dependency 'React'
s.dependency "React-Core"
@@ -45,7 +40,7 @@ Pod::Spec.new do |s|
'android/jni/HDiffPatch/file_for_patch.{h,c}',
'android/jni/lzma/C/LzmaDec.{h,c}',
'android/jni/lzma/C/Lzma2Dec.{h,c}']
ss.public_header_files = 'ios/RCTPushy/HDiffPatch/**/*.h'
ss.private_header_files = 'ios/RCTPushy/HDiffPatch/**/*.h'
end
if defined?(install_modules_dependencies()) != nil

View File

@@ -20,7 +20,7 @@ const defaultServer = {
backups: ['https://update.reactnative.cn/api'],
queryUrls: [
'https://gitee.com/sunnylqm/react-native-pushy/raw/master/endpoints.json',
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints.json',
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-pushy@master/endpoints.json',
],
};
@@ -205,11 +205,7 @@ export class Pushy {
// @ts-ignore
delete fetchBody.buildTime;
}
// harmony fetch body is not string
let body: any = fetchBody;
if (Platform.OS === 'ios' || Platform.OS === 'android') {
body = JSON.stringify(fetchBody);
}
const body = JSON.stringify(fetchBody);
const fetchPayload = {
method: 'POST',
headers: {

View File

@@ -14,7 +14,7 @@ export const PushyModule =
: NativeModules.Pushy;
if (!PushyModule) {
throw new Error('react-native-update 模块无法加载,请尝试重新编译');
throw new Error('react-native-update 模块无法加载,请对照安装文档检查配置。');
}
const PushyConstants = isTurboModuleEnabled
@@ -32,8 +32,8 @@ export const buildTime: string = PushyConstants.buildTime;
let uuid = PushyConstants.uuid;
if (Platform.OS === 'android' && !PushyConstants.isUsingBundleUrl) {
console.warn(
'react-native-update 没有检测到 Bundle URL 的配置,这可能是因为您使用了某种懒加载机制(比如使用 expo可忽略本警告或是 Bundle URL 的配置不正确(请对照文档检查)',
throw new Error(
'react-native-update 模块无法加载,请对照文档检查 Bundle URL 的配置',
);
}