@onekeyfe/react-native-bundle-update 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/ReactNativeBundleUpdate.podspec +34 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +139 -0
- package/android/gradle.properties +4 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt +1409 -0
- package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdatePackage.kt +24 -0
- package/ios/Frameworks/Gopenpgp.xcframework/Info.plist +52 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Gopenpgp +0 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Info.plist +20 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Modules/module.modulemap +13 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Gopenpgp +0 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Info.plist +20 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Modules/module.modulemap +13 -0
- package/ios/ReactNativeBundleUpdate.swift +1338 -0
- package/lib/module/ReactNativeBundleUpdate.nitro.js +4 -0
- package/lib/module/ReactNativeBundleUpdate.nitro.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/ReactNativeBundleUpdate.nitro.d.ts +101 -0
- package/lib/typescript/src/ReactNativeBundleUpdate.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitro.json +17 -0
- package/nitrogen/generated/android/c++/JAscFileInfo.hpp +65 -0
- package/nitrogen/generated/android/c++/JBundleDownloadASCParams.hpp +77 -0
- package/nitrogen/generated/android/c++/JBundleDownloadEvent.hpp +65 -0
- package/nitrogen/generated/android/c++/JBundleDownloadParams.hpp +73 -0
- package/nitrogen/generated/android/c++/JBundleDownloadResult.hpp +73 -0
- package/nitrogen/generated/android/c++/JBundleInstallParams.hpp +69 -0
- package/nitrogen/generated/android/c++/JBundleSwitchParams.hpp +65 -0
- package/nitrogen/generated/android/c++/JBundleVerifyASCParams.hpp +73 -0
- package/nitrogen/generated/android/c++/JBundleVerifyParams.hpp +69 -0
- package/nitrogen/generated/android/c++/JFallbackBundleInfo.hpp +65 -0
- package/nitrogen/generated/android/c++/JFunc_void_BundleDownloadEvent.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp +486 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp +89 -0
- package/nitrogen/generated/android/c++/JLocalBundleInfo.hpp +61 -0
- package/nitrogen/generated/android/c++/JTestResult.hpp +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/AscFileInfo.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadASCParams.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadEvent.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadParams.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadResult.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleInstallParams.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleSwitchParams.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyASCParams.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyParams.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/FallbackBundleInfo.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/Func_void_BundleDownloadEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt +159 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/LocalBundleInfo.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/TestResult.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/reactnativebundleupdateOnLoad.kt +35 -0
- package/nitrogen/generated/android/reactnativebundleupdate+autolinking.cmake +81 -0
- package/nitrogen/generated/android/reactnativebundleupdate+autolinking.gradle +27 -0
- package/nitrogen/generated/android/reactnativebundleupdateOnLoad.cpp +46 -0
- package/nitrogen/generated/android/reactnativebundleupdateOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdate+autolinking.rb +60 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.cpp +113 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp +513 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Umbrella.hpp +83 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.mm +33 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp +304 -0
- package/nitrogen/generated/ios/swift/AscFileInfo.swift +58 -0
- package/nitrogen/generated/ios/swift/BundleDownloadASCParams.swift +91 -0
- package/nitrogen/generated/ios/swift/BundleDownloadEvent.swift +58 -0
- package/nitrogen/generated/ios/swift/BundleDownloadParams.swift +80 -0
- package/nitrogen/generated/ios/swift/BundleDownloadResult.swift +80 -0
- package/nitrogen/generated/ios/swift/BundleInstallParams.swift +69 -0
- package/nitrogen/generated/ios/swift/BundleSwitchParams.swift +58 -0
- package/nitrogen/generated/ios/swift/BundleVerifyASCParams.swift +80 -0
- package/nitrogen/generated/ios/swift/BundleVerifyParams.swift +69 -0
- package/nitrogen/generated/ios/swift/FallbackBundleInfo.swift +58 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_BundleDownloadEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_BundleDownloadResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_TestResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AscFileInfo_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_FallbackBundleInfo_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_LocalBundleInfo_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift +80 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift +595 -0
- package/nitrogen/generated/ios/swift/LocalBundleInfo.swift +47 -0
- package/nitrogen/generated/ios/swift/TestResult.swift +47 -0
- package/nitrogen/generated/shared/c++/AscFileInfo.hpp +83 -0
- package/nitrogen/generated/shared/c++/BundleDownloadASCParams.hpp +95 -0
- package/nitrogen/generated/shared/c++/BundleDownloadEvent.hpp +83 -0
- package/nitrogen/generated/shared/c++/BundleDownloadParams.hpp +91 -0
- package/nitrogen/generated/shared/c++/BundleDownloadResult.hpp +91 -0
- package/nitrogen/generated/shared/c++/BundleInstallParams.hpp +87 -0
- package/nitrogen/generated/shared/c++/BundleSwitchParams.hpp +83 -0
- package/nitrogen/generated/shared/c++/BundleVerifyASCParams.hpp +91 -0
- package/nitrogen/generated/shared/c++/BundleVerifyParams.hpp +87 -0
- package/nitrogen/generated/shared/c++/FallbackBundleInfo.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp +124 -0
- package/nitrogen/generated/shared/c++/LocalBundleInfo.hpp +79 -0
- package/nitrogen/generated/shared/c++/TestResult.hpp +79 -0
- package/package.json +169 -0
- package/src/ReactNativeBundleUpdate.nitro.ts +143 -0
- package/src/index.tsx +8 -0
package/package.json
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@onekeyfe/react-native-bundle-update",
|
|
3
|
+
"version": "1.1.21",
|
|
4
|
+
"description": "react-native-bundle-update",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"nitrogen",
|
|
22
|
+
"nitro.json",
|
|
23
|
+
"*.podspec",
|
|
24
|
+
"react-native.config.js",
|
|
25
|
+
"!ios/build",
|
|
26
|
+
"!android/build",
|
|
27
|
+
"!android/gradle",
|
|
28
|
+
"!android/gradlew",
|
|
29
|
+
"!android/gradlew.bat",
|
|
30
|
+
"!android/local.properties",
|
|
31
|
+
"!**/__tests__",
|
|
32
|
+
"!**/__fixtures__",
|
|
33
|
+
"!**/__mocks__",
|
|
34
|
+
"!**/.*"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
38
|
+
"prepare": "bob build",
|
|
39
|
+
"nitrogen": "nitrogen",
|
|
40
|
+
"typecheck": "tsc",
|
|
41
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
42
|
+
"test": "jest",
|
|
43
|
+
"release": "yarn prepare && npm whoami && npm publish --access public"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"react-native",
|
|
47
|
+
"ios",
|
|
48
|
+
"android"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/OneKeyHQ/app-modules/react-native-bundle-update.git"
|
|
53
|
+
},
|
|
54
|
+
"author": "onekeyfe <huanming@onekey.so> (https://github.com/OneKeyHQ/app-modules)",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/OneKeyHQ/app-modules/react-native-bundle-update/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/OneKeyHQ/app-modules/react-native-bundle-update#readme",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"registry": "https://registry.npmjs.org/"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
65
|
+
"@eslint/compat": "^1.3.2",
|
|
66
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
67
|
+
"@eslint/js": "^9.35.0",
|
|
68
|
+
"@react-native/babel-preset": "0.83.0",
|
|
69
|
+
"@react-native/eslint-config": "0.83.0",
|
|
70
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
71
|
+
"@types/jest": "^29.5.14",
|
|
72
|
+
"@types/react": "^19.2.0",
|
|
73
|
+
"commitlint": "^19.8.1",
|
|
74
|
+
"del-cli": "^6.0.0",
|
|
75
|
+
"eslint": "^9.35.0",
|
|
76
|
+
"eslint-config-prettier": "^10.1.8",
|
|
77
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
78
|
+
"jest": "^29.7.0",
|
|
79
|
+
"lefthook": "^2.0.3",
|
|
80
|
+
"nitrogen": "0.31.10",
|
|
81
|
+
"prettier": "^2.8.8",
|
|
82
|
+
"react": "19.2.0",
|
|
83
|
+
"react-native": "0.83.0",
|
|
84
|
+
"react-native-builder-bob": "^0.40.13",
|
|
85
|
+
"react-native-nitro-modules": "0.33.2",
|
|
86
|
+
"release-it": "^19.0.4",
|
|
87
|
+
"turbo": "^2.5.6",
|
|
88
|
+
"typescript": "^5.9.2"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"react": "*",
|
|
92
|
+
"react-native": "*",
|
|
93
|
+
"react-native-nitro-modules": "0.33.2"
|
|
94
|
+
},
|
|
95
|
+
"react-native-builder-bob": {
|
|
96
|
+
"source": "src",
|
|
97
|
+
"output": "lib",
|
|
98
|
+
"targets": [
|
|
99
|
+
[
|
|
100
|
+
"custom",
|
|
101
|
+
{
|
|
102
|
+
"script": "nitrogen",
|
|
103
|
+
"clean": "nitrogen/"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
"module",
|
|
108
|
+
{
|
|
109
|
+
"esm": true
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"typescript",
|
|
114
|
+
{
|
|
115
|
+
"project": "tsconfig.build.json"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"prettier": {
|
|
121
|
+
"quoteProps": "consistent",
|
|
122
|
+
"singleQuote": true,
|
|
123
|
+
"tabWidth": 2,
|
|
124
|
+
"trailingComma": "es5",
|
|
125
|
+
"useTabs": false
|
|
126
|
+
},
|
|
127
|
+
"jest": {
|
|
128
|
+
"preset": "react-native",
|
|
129
|
+
"modulePathIgnorePatterns": [
|
|
130
|
+
"<rootDir>/example/node_modules",
|
|
131
|
+
"<rootDir>/lib/"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"commitlint": {
|
|
135
|
+
"extends": [
|
|
136
|
+
"@commitlint/config-conventional"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"release-it": {
|
|
140
|
+
"git": {
|
|
141
|
+
"commitMessage": "chore: release ${version}",
|
|
142
|
+
"tagName": "v${version}"
|
|
143
|
+
},
|
|
144
|
+
"npm": {
|
|
145
|
+
"publish": true
|
|
146
|
+
},
|
|
147
|
+
"github": {
|
|
148
|
+
"release": true
|
|
149
|
+
},
|
|
150
|
+
"plugins": {
|
|
151
|
+
"@release-it/conventional-changelog": {
|
|
152
|
+
"preset": {
|
|
153
|
+
"name": "angular"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"create-react-native-library": {
|
|
159
|
+
"type": "nitro-module",
|
|
160
|
+
"languages": "kotlin-swift",
|
|
161
|
+
"tools": [
|
|
162
|
+
"eslint",
|
|
163
|
+
"jest",
|
|
164
|
+
"lefthook",
|
|
165
|
+
"release-it"
|
|
166
|
+
],
|
|
167
|
+
"version": "0.56.0"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
|
|
3
|
+
export interface BundleDownloadParams {
|
|
4
|
+
downloadUrl: string;
|
|
5
|
+
latestVersion: string;
|
|
6
|
+
bundleVersion: string;
|
|
7
|
+
fileSize: number;
|
|
8
|
+
sha256: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BundleDownloadResult {
|
|
12
|
+
downloadedFile: string;
|
|
13
|
+
downloadUrl: string;
|
|
14
|
+
latestVersion: string;
|
|
15
|
+
bundleVersion: string;
|
|
16
|
+
sha256: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface BundleVerifyParams {
|
|
20
|
+
downloadedFile: string;
|
|
21
|
+
sha256: string;
|
|
22
|
+
latestVersion: string;
|
|
23
|
+
bundleVersion: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface BundleVerifyASCParams {
|
|
27
|
+
downloadedFile: string;
|
|
28
|
+
sha256: string;
|
|
29
|
+
latestVersion: string;
|
|
30
|
+
bundleVersion: string;
|
|
31
|
+
signature: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface BundleDownloadASCParams {
|
|
35
|
+
downloadUrl: string;
|
|
36
|
+
downloadedFile: string;
|
|
37
|
+
signature: string;
|
|
38
|
+
latestVersion: string;
|
|
39
|
+
bundleVersion: string;
|
|
40
|
+
sha256: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface BundleInstallParams {
|
|
44
|
+
downloadedFile: string;
|
|
45
|
+
latestVersion: string;
|
|
46
|
+
bundleVersion: string;
|
|
47
|
+
signature: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface BundleSwitchParams {
|
|
51
|
+
appVersion: string;
|
|
52
|
+
bundleVersion: string;
|
|
53
|
+
signature: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface BundleDownloadEvent {
|
|
57
|
+
type: string;
|
|
58
|
+
progress: number;
|
|
59
|
+
message: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface TestResult {
|
|
63
|
+
success: boolean;
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface LocalBundleInfo {
|
|
68
|
+
appVersion: string;
|
|
69
|
+
bundleVersion: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface FallbackBundleInfo {
|
|
73
|
+
appVersion: string;
|
|
74
|
+
bundleVersion: string;
|
|
75
|
+
signature: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface AscFileInfo {
|
|
79
|
+
fileName: string;
|
|
80
|
+
filePath: string;
|
|
81
|
+
fileSize: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ReactNativeBundleUpdate
|
|
85
|
+
extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
|
|
86
|
+
// Download
|
|
87
|
+
downloadBundle(params: BundleDownloadParams): Promise<BundleDownloadResult>;
|
|
88
|
+
|
|
89
|
+
// Verify
|
|
90
|
+
verifyBundle(params: BundleVerifyParams): Promise<void>;
|
|
91
|
+
verifyBundleASC(params: BundleVerifyASCParams): Promise<void>;
|
|
92
|
+
downloadBundleASC(params: BundleDownloadASCParams): Promise<void>;
|
|
93
|
+
|
|
94
|
+
// Install
|
|
95
|
+
installBundle(params: BundleInstallParams): Promise<void>;
|
|
96
|
+
|
|
97
|
+
// Clear
|
|
98
|
+
clearBundle(): Promise<void>;
|
|
99
|
+
clearAllJSBundleData(): Promise<TestResult>;
|
|
100
|
+
|
|
101
|
+
// Bundle data
|
|
102
|
+
getFallbackUpdateBundleData(): Promise<FallbackBundleInfo[]>;
|
|
103
|
+
setCurrentUpdateBundleData(params: BundleSwitchParams): Promise<void>;
|
|
104
|
+
|
|
105
|
+
// Paths
|
|
106
|
+
getWebEmbedPath(): string;
|
|
107
|
+
getWebEmbedPathAsync(): Promise<string>;
|
|
108
|
+
getJsBundlePath(): Promise<string>;
|
|
109
|
+
getNativeAppVersion(): Promise<string>;
|
|
110
|
+
|
|
111
|
+
// Verification & testing
|
|
112
|
+
testVerification(): Promise<boolean>;
|
|
113
|
+
isBundleExists(appVersion: string, bundleVersion: string): Promise<boolean>;
|
|
114
|
+
verifyExtractedBundle(
|
|
115
|
+
appVersion: string,
|
|
116
|
+
bundleVersion: string,
|
|
117
|
+
): Promise<void>;
|
|
118
|
+
listLocalBundles(): Promise<LocalBundleInfo[]>;
|
|
119
|
+
listAscFiles(): Promise<AscFileInfo[]>;
|
|
120
|
+
getSha256FromFilePath(filePath: string): Promise<string>;
|
|
121
|
+
|
|
122
|
+
// Test/debug methods
|
|
123
|
+
testDeleteJsBundle(
|
|
124
|
+
appVersion: string,
|
|
125
|
+
bundleVersion: string,
|
|
126
|
+
): Promise<TestResult>;
|
|
127
|
+
testDeleteJsRuntimeDir(
|
|
128
|
+
appVersion: string,
|
|
129
|
+
bundleVersion: string,
|
|
130
|
+
): Promise<TestResult>;
|
|
131
|
+
testDeleteMetadataJson(
|
|
132
|
+
appVersion: string,
|
|
133
|
+
bundleVersion: string,
|
|
134
|
+
): Promise<TestResult>;
|
|
135
|
+
testWriteEmptyMetadataJson(
|
|
136
|
+
appVersion: string,
|
|
137
|
+
bundleVersion: string,
|
|
138
|
+
): Promise<TestResult>;
|
|
139
|
+
|
|
140
|
+
// Events
|
|
141
|
+
addDownloadListener(callback: (event: BundleDownloadEvent) => void): number;
|
|
142
|
+
removeDownloadListener(id: number): void;
|
|
143
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NitroModules } from 'react-native-nitro-modules';
|
|
2
|
+
import type { ReactNativeBundleUpdate as ReactNativeBundleUpdateType } from './ReactNativeBundleUpdate.nitro';
|
|
3
|
+
|
|
4
|
+
const ReactNativeBundleUpdateHybridObject =
|
|
5
|
+
NitroModules.createHybridObject<ReactNativeBundleUpdateType>('ReactNativeBundleUpdate');
|
|
6
|
+
|
|
7
|
+
export const ReactNativeBundleUpdate = ReactNativeBundleUpdateHybridObject;
|
|
8
|
+
export type * from './ReactNativeBundleUpdate.nitro';
|