mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 02:26:10 +08:00
Compare commits
1 Commits
v10.22.1
...
v10.20.0-b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dbca54a7f0 |
@@ -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];
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 0,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "testHotUpdate",
|
||||
"dependencies": {
|
||||
"form-data": "^4.0.1",
|
||||
"patch-package": "^8.0.0",
|
||||
@@ -11,7 +12,7 @@
|
||||
"react-native-camera-kit": "^14.1.0",
|
||||
"react-native-paper": "^5.13.1",
|
||||
"react-native-safe-area-context": "^5.1.0",
|
||||
"react-native-update": "^10.22.0",
|
||||
"react-native-update": "^10.19.6",
|
||||
"react-native-vector-icons": "^10.2.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -1409,7 +1410,7 @@
|
||||
|
||||
"react-native-safe-area-context": ["react-native-safe-area-context@5.1.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-Y4vyJX+0HPJUQNVeIJTj2/UOjbSJcB09OEwirAWDrOZ67Lz5p43AmjxSy8nnZft1rMzoh3rcPuonB6jJyHTfCw=="],
|
||||
|
||||
"react-native-update": ["react-native-update@10.22.0", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-RP49tCaMSb7+H1zhpzd8RWiCcG5Opc5jklAB2T67SKVoiGYF4AH+/xdPlpOmuNHfUm97rJG945UPb/GcVT7/nA=="],
|
||||
"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=="],
|
||||
|
||||
|
@@ -1308,7 +1308,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- react-native-update (10.22.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.22.0)
|
||||
- react-native-update/RCTPushy (= 10.22.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.22.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.22.0):
|
||||
- react-native-update/RCTPushy (10.19.6):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1942,7 +1942,7 @@ SPEC CHECKSUMS:
|
||||
React-Mapbuffer: 89885d1518433a462fe64b68bf5e097997380090
|
||||
React-microtasksnativemodule: 36341e09dcd1df535503e6ed2ddf88f10da56d52
|
||||
react-native-safe-area-context: 0d8827b2420dfb4c8a8e27639585e61b912261be
|
||||
react-native-update: 73336810994cf31c5085070faa1ad4ead5b76e3c
|
||||
react-native-update: 3a5f413d7b9eadfe0af4d15c1b32de678670c2ce
|
||||
React-nativeconfig: 539ff4de6ce3b694e8e751080568c281c84903ce
|
||||
React-NativeModulesApple: 702246817c286d057e23fe4b1302019796e62521
|
||||
React-perflogger: f260e2de95f9dbd002035251559c13bf1f0643d4
|
||||
|
@@ -22,7 +22,7 @@
|
||||
"react-native-camera-kit": "^14.1.0",
|
||||
"react-native-paper": "^5.13.1",
|
||||
"react-native-safe-area-context": "^5.1.0",
|
||||
"react-native-update": "^10.22.0",
|
||||
"react-native-update": "^10.19.6",
|
||||
"react-native-vector-icons": "^10.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
本组件是面向 React Native 提供热更新功能的组件,详情请访问我们的官方网站 <https://pushy.reactnative.cn>。
|
||||
|
||||
**现已支持鸿蒙以及新架构**
|
||||
|
||||
### 快速开始
|
||||
|
||||
请查看[文档](https://pushy.reactnative.cn/docs/getting-started.html)
|
||||
|
@@ -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
11
harmony/README.OpenSource
Normal 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 type,Connection quality"
|
||||
}
|
||||
]
|
0
harmony/README.md
Normal file
0
harmony/README.md
Normal 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:
|
||||
|
@@ -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) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update",
|
||||
"version": "10.22.1",
|
||||
"version": "10.20.0-beta.0",
|
||||
"description": "react-native hot update",
|
||||
"main": "src/index",
|
||||
"scripts": {
|
||||
|
@@ -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']
|
||||
@@ -22,12 +20,9 @@ Pod::Spec.new do |s|
|
||||
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
|
||||
|
@@ -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: {
|
||||
|
Reference in New Issue
Block a user