@hot-updater/react-native 0.19.9 → 0.19.10

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.
@@ -68,6 +68,9 @@ android {
68
68
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
69
69
  consumerProguardFiles 'proguard-rules.pro'
70
70
  buildConfigField "long", "BUILD_TIMESTAMP", "${System.currentTimeMillis()}L"
71
+
72
+ def minBundleId = project.hasProperty("MIN_BUNDLE_ID") ? project.properties["MIN_BUNDLE_ID"] : null
73
+ buildConfigField "String", "MIN_BUNDLE_ID", minBundleId == null ? "\"null\"" : "\"${minBundleId}\""
71
74
  }
72
75
 
73
76
  buildFeatures {
@@ -69,10 +69,16 @@ class HotUpdaterImpl(
69
69
  }
70
70
 
71
71
  /**
72
- * Generates a bundle ID based on build timestamp
72
+ * Get minimum bundle ID string
73
73
  * @return The minimum bundle ID string
74
74
  */
75
- fun getMinBundleId(): String =
75
+ fun getMinBundleId(): String = BuildConfig.MIN_BUNDLE_ID.takeIf { it != "null" } ?: generateMinBundleIdFromBuildTimestamp()
76
+
77
+ /**
78
+ * Generates a bundle ID based on build timestamp
79
+ * @return The generated minimum bundle ID string
80
+ */
81
+ private fun generateMinBundleIdFromBuildTimestamp(): String =
76
82
  try {
77
83
  val buildTimestampMs = BuildConfig.BUILD_TIMESTAMP
78
84
  val bytes =
@@ -10,7 +10,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
10
10
  * When an update exists and the bundle is being downloaded, this component will block access
11
11
  * to the entry point and show download progress.
12
12
  *
13
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#fallback-component}
13
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#fallback-component}
14
14
  *
15
15
  * ```tsx
16
16
  * HotUpdater.wrap({
@@ -42,7 +42,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
42
42
  /**
43
43
  * Callback function that is called when the update process is completed.
44
44
  *
45
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#onupdateprocesscompleted}
45
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#onupdateprocesscompleted}
46
46
  */
47
47
  onUpdateProcessCompleted?: (response: RunUpdateProcessResponse) => void;
48
48
  }
@@ -10,7 +10,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
10
10
  * When an update exists and the bundle is being downloaded, this component will block access
11
11
  * to the entry point and show download progress.
12
12
  *
13
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#fallback-component}
13
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#fallback-component}
14
14
  *
15
15
  * ```tsx
16
16
  * HotUpdater.wrap({
@@ -42,7 +42,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
42
42
  /**
43
43
  * Callback function that is called when the update process is completed.
44
44
  *
45
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#onupdateprocesscompleted}
45
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#onupdateprocesscompleted}
46
46
  */
47
47
  onUpdateProcessCompleted?: (response: RunUpdateProcessResponse) => void;
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/react-native",
3
- "version": "0.19.9",
3
+ "version": "0.19.10",
4
4
  "description": "React Native OTA solution for self-hosted",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -119,13 +119,13 @@
119
119
  "react-native": "0.79.1",
120
120
  "react-native-builder-bob": "^0.40.10",
121
121
  "typescript": "^5.8.3",
122
- "hot-updater": "0.19.9"
122
+ "hot-updater": "0.19.10"
123
123
  },
124
124
  "dependencies": {
125
125
  "use-sync-external-store": "1.5.0",
126
- "@hot-updater/js": "0.19.9",
127
- "@hot-updater/plugin-core": "0.19.9",
128
- "@hot-updater/core": "0.19.9"
126
+ "@hot-updater/core": "0.19.10",
127
+ "@hot-updater/js": "0.19.10",
128
+ "@hot-updater/plugin-core": "0.19.10"
129
129
  },
130
130
  "scripts": {
131
131
  "build": "bob build && tsc -p plugin/tsconfig.json",
package/src/wrap.tsx CHANGED
@@ -19,7 +19,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
19
19
  * When an update exists and the bundle is being downloaded, this component will block access
20
20
  * to the entry point and show download progress.
21
21
  *
22
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#fallback-component}
22
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#fallback-component}
23
23
  *
24
24
  * ```tsx
25
25
  * HotUpdater.wrap({
@@ -51,7 +51,7 @@ export interface HotUpdaterOptions extends CheckForUpdateOptions {
51
51
  /**
52
52
  * Callback function that is called when the update process is completed.
53
53
  *
54
- * @see {@link https://gronxb.github.io/hot-updater/guide/hot-updater/wrap.html#onupdateprocesscompleted}
54
+ * @see {@link https://hot-updater.dev/guide/hot-updater/wrap.html#onupdateprocesscompleted}
55
55
  */
56
56
  onUpdateProcessCompleted?: (response: RunUpdateProcessResponse) => void;
57
57
  }