@vexor-push/react-native-code-push 0.2.0

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.
Files changed (57) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +61 -0
  3. package/android/build.gradle +129 -0
  4. package/android/generated/java/com/vexorpush/codepush/NativeVexorCodePushSpec.java +91 -0
  5. package/android/generated/jni/CMakeLists.txt +36 -0
  6. package/android/generated/jni/RNVexorCodePushSpec-generated.cpp +110 -0
  7. package/android/generated/jni/RNVexorCodePushSpec.h +31 -0
  8. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/ComponentDescriptors.cpp +22 -0
  9. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/ComponentDescriptors.h +24 -0
  10. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/EventEmitters.cpp +16 -0
  11. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/EventEmitters.h +17 -0
  12. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/Props.cpp +19 -0
  13. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/Props.h +18 -0
  14. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/RNVexorCodePushSpecJSI-generated.cpp +129 -0
  15. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/RNVexorCodePushSpecJSI.h +184 -0
  16. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/ShadowNodes.cpp +17 -0
  17. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/ShadowNodes.h +23 -0
  18. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/States.cpp +16 -0
  19. package/android/generated/jni/react/renderer/components/RNVexorCodePushSpec/States.h +19 -0
  20. package/android/gradle.properties +5 -0
  21. package/android/src/main/AndroidManifest.xml +3 -0
  22. package/android/src/main/AndroidManifestNew.xml +2 -0
  23. package/android/src/main/java/com/vexorpush/codepush/CrashHandler.kt +78 -0
  24. package/android/src/main/java/com/vexorpush/codepush/SharedPrefs.kt +60 -0
  25. package/android/src/main/java/com/vexorpush/codepush/Utils.kt +105 -0
  26. package/android/src/main/java/com/vexorpush/codepush/VexorCodePush.kt +100 -0
  27. package/android/src/main/java/com/vexorpush/codepush/VexorCodePushModule.kt +698 -0
  28. package/android/src/newarch/VexorCodePushSpec.kt +7 -0
  29. package/android/src/oldarch/VexorCodePushSpec.kt +24 -0
  30. package/app.plugin.js +1 -0
  31. package/current-version.js +27 -0
  32. package/deployment-state.js +33 -0
  33. package/index.d.ts +101 -0
  34. package/index.js +535 -0
  35. package/ios/VexorCodePush.h +13 -0
  36. package/ios/VexorCodePush.mm +949 -0
  37. package/ios/generated/RNVexorCodePushSpec/ComponentDescriptors.cpp +22 -0
  38. package/ios/generated/RNVexorCodePushSpec/ComponentDescriptors.h +24 -0
  39. package/ios/generated/RNVexorCodePushSpec/EventEmitters.cpp +16 -0
  40. package/ios/generated/RNVexorCodePushSpec/EventEmitters.h +17 -0
  41. package/ios/generated/RNVexorCodePushSpec/Props.cpp +19 -0
  42. package/ios/generated/RNVexorCodePushSpec/Props.h +18 -0
  43. package/ios/generated/RNVexorCodePushSpec/RCTComponentViewHelpers.h +18 -0
  44. package/ios/generated/RNVexorCodePushSpec/RNVexorCodePushSpec-generated.mm +130 -0
  45. package/ios/generated/RNVexorCodePushSpec/RNVexorCodePushSpec.h +109 -0
  46. package/ios/generated/RNVexorCodePushSpec/ShadowNodes.cpp +17 -0
  47. package/ios/generated/RNVexorCodePushSpec/ShadowNodes.h +23 -0
  48. package/ios/generated/RNVexorCodePushSpec/States.cpp +16 -0
  49. package/ios/generated/RNVexorCodePushSpec/States.h +19 -0
  50. package/ios/generated/RNVexorCodePushSpecJSI-generated.cpp +129 -0
  51. package/ios/generated/RNVexorCodePushSpecJSI.h +184 -0
  52. package/package.json +51 -0
  53. package/plugin/src/index.ts +92 -0
  54. package/plugin/tsconfig.json +9 -0
  55. package/react-native-code-push.podspec +48 -0
  56. package/react-native.config.js +13 -0
  57. package/src/NativeVexorCodePush.ts +21 -0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 vantuan88291
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @vexor-push/react-native-code-push
2
+
3
+ React Native CodePush SDK for Vexor Push. This package combines the app-facing CodePush wrapper and the native OTA bundle loader so mobile apps only install one Vexor package.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @vexor-push/react-native-code-push
9
+ ```
10
+
11
+ The SDK downloads, stores, and installs OTA bundles through the native `VexorCodePush` bridge. Apps do not need a separate downloader or file-system package.
12
+
13
+ ## Configure
14
+
15
+ ```ts
16
+ import {
17
+ checkPendingUpdate,
18
+ checkUpdate,
19
+ configure,
20
+ installUpdate,
21
+ notifyApplicationReady,
22
+ sync,
23
+ } from '@vexor-push/react-native-code-push';
24
+
25
+ configure({
26
+ baseUrl: 'https://app.vexor.one',
27
+ deploymentKey: '<deployment-key-from-admin>',
28
+ binaryVersion: '1.0.0',
29
+ clientId: '<stable-device-or-install-id>',
30
+ });
31
+
32
+ await checkPendingUpdate();
33
+ await notifyApplicationReady();
34
+
35
+ const update = await checkUpdate();
36
+ if (update.hasUpdate) {
37
+ await installUpdate(update);
38
+ }
39
+
40
+ await sync();
41
+ ```
42
+
43
+ Pass a stable `clientId` for device/install metrics. If it is omitted, the SDK generates and stores one through the configured storage adapter.
44
+
45
+ ## Native Loader
46
+
47
+ The package includes the Vexor native CodePush loader. Keep the standard native setup:
48
+
49
+ - iOS release builds should return `VexorCodePush.getBundle()`.
50
+ - Android release builds should return `VexorCodePush.bundleJS(applicationContext)`.
51
+ - Debug builds should keep using Metro.
52
+
53
+ ## Manifest Endpoint
54
+
55
+ Preferred endpoint:
56
+
57
+ ```text
58
+ GET https://app.vexor.one/api/ota/key/:deploymentKey/update.json?currentVersion=0&platform=ios&binaryVersion=1.0.0
59
+ ```
60
+
61
+ The SDK also supports app/deployment fallback configuration for debugging, but production apps should use deployment keys.
@@ -0,0 +1,129 @@
1
+ buildscript {
2
+ // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
+ def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["VexorCodePush_kotlinVersion"]
4
+
5
+ repositories {
6
+ google()
7
+ mavenCentral()
8
+ }
9
+
10
+ dependencies {
11
+ classpath "com.android.tools.build:gradle:7.2.1"
12
+ // noinspection DifferentKotlinGradleVersion
13
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
+ }
15
+ }
16
+
17
+ def reactNativeArchitectures() {
18
+ def value = rootProject.getProperties().get("reactNativeArchitectures")
19
+ return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
20
+ }
21
+
22
+ def isNewArchitectureEnabled() {
23
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
24
+ }
25
+
26
+ apply plugin: "com.android.library"
27
+ apply plugin: "kotlin-android"
28
+
29
+ if (isNewArchitectureEnabled()) {
30
+ apply plugin: "com.facebook.react"
31
+ }
32
+
33
+ def getExtOrDefault(name) {
34
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["VexorCodePush_" + name]
35
+ }
36
+
37
+ def getExtOrIntegerDefault(name) {
38
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["VexorCodePush_" + name]).toInteger()
39
+ }
40
+
41
+ def supportsNamespace() {
42
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
43
+ def major = parsed[0].toInteger()
44
+ def minor = parsed[1].toInteger()
45
+
46
+ // Namespace support was added in 7.3.0
47
+ return (major == 7 && minor >= 3) || major >= 8
48
+ }
49
+
50
+ android {
51
+ if (supportsNamespace()) {
52
+ namespace "com.vexorpush.codepush"
53
+
54
+ sourceSets {
55
+ main {
56
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
57
+ }
58
+ }
59
+ }
60
+
61
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
62
+
63
+ defaultConfig {
64
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
65
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
66
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
67
+
68
+ }
69
+
70
+ buildFeatures {
71
+ buildConfig true
72
+ }
73
+
74
+ buildTypes {
75
+ release {
76
+ minifyEnabled false
77
+ }
78
+ }
79
+
80
+ lintOptions {
81
+ disable "GradleCompatible"
82
+ }
83
+
84
+ compileOptions {
85
+ sourceCompatibility JavaVersion.VERSION_1_8
86
+ targetCompatibility JavaVersion.VERSION_1_8
87
+ }
88
+
89
+ sourceSets {
90
+ main {
91
+ if (isNewArchitectureEnabled()) {
92
+ java.srcDirs += [
93
+ "src/newarch",
94
+ // Codegen specs
95
+ "generated/java",
96
+ "generated/jni"
97
+ ]
98
+ } else {
99
+ java.srcDirs += ["src/oldarch"]
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ repositories {
106
+ mavenCentral()
107
+ google()
108
+ }
109
+
110
+ def kotlin_version = getExtOrDefault("kotlinVersion")
111
+
112
+ dependencies {
113
+ // For < 0.71, this will be from the local maven repo
114
+ // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
115
+ //noinspection GradleDynamicVersion
116
+ implementation "com.facebook.react:react-native:+"
117
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
118
+ implementation 'com.jakewharton:process-phoenix:3.0.0'
119
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
120
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
121
+ }
122
+
123
+ if (isNewArchitectureEnabled()) {
124
+ react {
125
+ jsRootDir = file("../src/")
126
+ libraryName = "VexorCodePush"
127
+ codegenJavaPackageName = "com.vexorpush.codepush"
128
+ }
129
+ }
@@ -0,0 +1,91 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.vexorpush.codepush;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.Promise;
17
+ import com.facebook.react.bridge.ReactApplicationContext;
18
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
+ import com.facebook.react.bridge.ReactMethod;
20
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
21
+ import javax.annotation.Nonnull;
22
+ import javax.annotation.Nullable;
23
+
24
+ public abstract class NativeVexorCodePushSpec extends ReactContextBaseJavaModule implements TurboModule {
25
+ public static final String NAME = "VexorCodePush";
26
+
27
+ public NativeVexorCodePushSpec(ReactApplicationContext reactContext) {
28
+ super(reactContext);
29
+ }
30
+
31
+ @Override
32
+ public @Nonnull String getName() {
33
+ return NAME;
34
+ }
35
+
36
+ @ReactMethod
37
+ @DoNotStrip
38
+ public abstract void setupBundlePath(String path, String extension, @Nullable Double version, @Nullable Double maxVersions, @Nullable String metadata, Promise promise);
39
+
40
+ @ReactMethod
41
+ @DoNotStrip
42
+ public abstract void downloadAndInstallBundle(String url, String headersJson, String extension, @Nullable Double version, @Nullable Double maxVersions, @Nullable String metadata, Promise promise);
43
+
44
+ @ReactMethod
45
+ @DoNotStrip
46
+ public abstract void setExactBundlePath(String path, Promise promise);
47
+
48
+ @ReactMethod
49
+ @DoNotStrip
50
+ public abstract void deleteBundle(double i, Promise promise);
51
+
52
+ @ReactMethod
53
+ @DoNotStrip
54
+ public abstract void restart();
55
+
56
+ @ReactMethod
57
+ @DoNotStrip
58
+ public abstract void getCurrentVersion(double a, Promise promise);
59
+
60
+ @ReactMethod
61
+ @DoNotStrip
62
+ public abstract void getUpdateMetadata(double a, Promise promise);
63
+
64
+ @ReactMethod
65
+ @DoNotStrip
66
+ public abstract void setCurrentVersion(String version, Promise promise);
67
+
68
+ @ReactMethod
69
+ @DoNotStrip
70
+ public abstract void setUpdateMetadata(String metadata, Promise promise);
71
+
72
+ @ReactMethod
73
+ @DoNotStrip
74
+ public abstract void rollbackToPreviousBundle(double a, Promise promise);
75
+
76
+ @ReactMethod
77
+ @DoNotStrip
78
+ public abstract void getBundleList(double a, Promise promise);
79
+
80
+ @ReactMethod
81
+ @DoNotStrip
82
+ public abstract void deleteBundleById(String id, Promise promise);
83
+
84
+ @ReactMethod
85
+ @DoNotStrip
86
+ public abstract void clearAllBundles(double a, Promise promise);
87
+
88
+ @ReactMethod
89
+ @DoNotStrip
90
+ public abstract void writeFile(String path, String base64Content, String encoding, Promise promise);
91
+ }
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNVexorCodePushSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNVexorCodePushSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNVexorCodePushSpec PUBLIC . react/renderer/components/RNVexorCodePushSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNVexorCodePushSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNVexorCodePushSpec
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,110 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RNVexorCodePushSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_setupBundlePath(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setupBundlePath", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_downloadAndInstallBundle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
+ static jmethodID cachedMethodId = nullptr;
22
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "downloadAndInstallBundle", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_setExactBundlePath(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
+ static jmethodID cachedMethodId = nullptr;
27
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setExactBundlePath", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
+ }
29
+
30
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_deleteBundle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31
+ static jmethodID cachedMethodId = nullptr;
32
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "deleteBundle", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
33
+ }
34
+
35
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_restart(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36
+ static jmethodID cachedMethodId = nullptr;
37
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "restart", "()V", args, count, cachedMethodId);
38
+ }
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_getCurrentVersion(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
+ static jmethodID cachedMethodId = nullptr;
42
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getCurrentVersion", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
43
+ }
44
+
45
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_getUpdateMetadata(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46
+ static jmethodID cachedMethodId = nullptr;
47
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getUpdateMetadata", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
48
+ }
49
+
50
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_setCurrentVersion(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
+ static jmethodID cachedMethodId = nullptr;
52
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setCurrentVersion", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
53
+ }
54
+
55
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_setUpdateMetadata(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
56
+ static jmethodID cachedMethodId = nullptr;
57
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setUpdateMetadata", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_rollbackToPreviousBundle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ static jmethodID cachedMethodId = nullptr;
62
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "rollbackToPreviousBundle", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
63
+ }
64
+
65
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_getBundleList(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
66
+ static jmethodID cachedMethodId = nullptr;
67
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getBundleList", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
68
+ }
69
+
70
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_deleteBundleById(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
71
+ static jmethodID cachedMethodId = nullptr;
72
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "deleteBundleById", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
73
+ }
74
+
75
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_clearAllBundles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
76
+ static jmethodID cachedMethodId = nullptr;
77
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "clearAllBundles", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeVexorCodePushSpecJSI_writeFile(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ static jmethodID cachedMethodId = nullptr;
82
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "writeFile", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
83
+ }
84
+
85
+ NativeVexorCodePushSpecJSI::NativeVexorCodePushSpecJSI(const JavaTurboModule::InitParams &params)
86
+ : JavaTurboModule(params) {
87
+ methodMap_["setupBundlePath"] = MethodMetadata {5, __hostFunction_NativeVexorCodePushSpecJSI_setupBundlePath};
88
+ methodMap_["downloadAndInstallBundle"] = MethodMetadata {6, __hostFunction_NativeVexorCodePushSpecJSI_downloadAndInstallBundle};
89
+ methodMap_["setExactBundlePath"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_setExactBundlePath};
90
+ methodMap_["deleteBundle"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_deleteBundle};
91
+ methodMap_["restart"] = MethodMetadata {0, __hostFunction_NativeVexorCodePushSpecJSI_restart};
92
+ methodMap_["getCurrentVersion"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_getCurrentVersion};
93
+ methodMap_["getUpdateMetadata"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_getUpdateMetadata};
94
+ methodMap_["setCurrentVersion"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_setCurrentVersion};
95
+ methodMap_["setUpdateMetadata"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_setUpdateMetadata};
96
+ methodMap_["rollbackToPreviousBundle"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_rollbackToPreviousBundle};
97
+ methodMap_["getBundleList"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_getBundleList};
98
+ methodMap_["deleteBundleById"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_deleteBundleById};
99
+ methodMap_["clearAllBundles"] = MethodMetadata {1, __hostFunction_NativeVexorCodePushSpecJSI_clearAllBundles};
100
+ methodMap_["writeFile"] = MethodMetadata {3, __hostFunction_NativeVexorCodePushSpecJSI_writeFile};
101
+ }
102
+
103
+ std::shared_ptr<TurboModule> RNVexorCodePushSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
104
+ if (moduleName == "VexorCodePush") {
105
+ return std::make_shared<NativeVexorCodePushSpecJSI>(params);
106
+ }
107
+ return nullptr;
108
+ }
109
+
110
+ } // namespace facebook::react
@@ -0,0 +1,31 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+ /**
20
+ * JNI C++ class for module 'NativeVexorCodePush'
21
+ */
22
+ class JSI_EXPORT NativeVexorCodePushSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeVexorCodePushSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RNVexorCodePushSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react
@@ -0,0 +1,22 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateComponentDescriptorCpp.js
9
+ */
10
+
11
+ #include "ComponentDescriptors.h"
12
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
13
+ #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
14
+
15
+ namespace facebook::react {
16
+
17
+ void RNVexorCodePushSpec_registerComponentDescriptorsFromCodegen(
18
+ std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
19
+
20
+ }
21
+
22
+ } // namespace facebook::react
@@ -0,0 +1,24 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateComponentDescriptorH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include "ShadowNodes.h"
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+ #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
+
17
+ namespace facebook::react {
18
+
19
+
20
+
21
+ void RNVexorCodePushSpec_registerComponentDescriptorsFromCodegen(
22
+ std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
+
24
+ } // namespace facebook::react
@@ -0,0 +1,16 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterCpp.js
9
+ */
10
+
11
+ #include "EventEmitters.h"
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+ } // namespace facebook::react
@@ -0,0 +1,17 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewEventEmitter.h>
13
+
14
+
15
+ namespace facebook::react {
16
+
17
+ } // namespace facebook::react
@@ -0,0 +1,19 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsCpp.js
9
+ */
10
+
11
+ #include "Props.h"
12
+ #include <react/renderer/core/PropsParserContext.h>
13
+ #include <react/renderer/core/propsConversions.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -0,0 +1,18 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsH.js
9
+ */
10
+ #pragma once
11
+
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+
17
+
18
+ } // namespace facebook::react