react-native-3rddigital-appupdate 1.0.1 → 1.0.3
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/README.md +0 -26
- package/package.json +1 -1
- package/scripts/bundle.js +0 -8
package/README.md
CHANGED
|
@@ -100,18 +100,6 @@ Props (LoaderOptions):
|
|
|
100
100
|
| `containerStyle` | ViewStyle | `{}` | Custom style for the loader container |
|
|
101
101
|
| `textStyle` | TextStyle | `{}` | Custom style for the loader text |
|
|
102
102
|
|
|
103
|
-
Usage:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
AppLoader.show({
|
|
107
|
-
text: "Downloading...",
|
|
108
|
-
color: "#ff0000",
|
|
109
|
-
backgroundColor: "rgba(0,0,0,0.6)",
|
|
110
|
-
textColor: "#fff",
|
|
111
|
-
});
|
|
112
|
-
AppLoader.hide();
|
|
113
|
-
```
|
|
114
|
-
|
|
115
103
|
🔹 Dialog (AppAlertDialog)
|
|
116
104
|
|
|
117
105
|
- Global confirmation dialog used to prompt users for updates.
|
|
@@ -134,19 +122,6 @@ Props (DialogOptions):
|
|
|
134
122
|
| `confirmTextStyle` | TextStyle | `{}` | Style override for confirm button text |
|
|
135
123
|
| `overlayColor` | string | `'rgba(0,0,0,0.3)'` | Overlay background color |
|
|
136
124
|
|
|
137
|
-
Usage:
|
|
138
|
-
|
|
139
|
-
```sh
|
|
140
|
-
AppAlertDialog.showMessage({
|
|
141
|
-
title: "Update Available",
|
|
142
|
-
message: "A new version is ready to install.",
|
|
143
|
-
confirmText: "Update Now",
|
|
144
|
-
cancelText: "Later",
|
|
145
|
-
onConfirm: () => console.log("User confirmed"),
|
|
146
|
-
onCancel: () => console.log("User cancelled"),
|
|
147
|
-
});
|
|
148
|
-
```
|
|
149
|
-
|
|
150
125
|
## 🖥️ CLI Tool – appupdate
|
|
151
126
|
|
|
152
127
|
- This package also provides a CLI for building and uploading OTA bundles.
|
|
@@ -165,7 +140,6 @@ You will be prompted for:
|
|
|
165
140
|
- Project ID
|
|
166
141
|
- Environment (development / production)
|
|
167
142
|
- Version
|
|
168
|
-
- Build Number
|
|
169
143
|
- Force Update (true/false)
|
|
170
144
|
|
|
171
145
|
What it does
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-3rddigital-appupdate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A React Native library for seamless over-the-air (OTA) updates with version checks, automatic bundle download, and customizable user prompts for iOS and Android.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
package/scripts/bundle.js
CHANGED
|
@@ -34,7 +34,6 @@ async function uploadBundle({ filePath, platform, config }) {
|
|
|
34
34
|
form.append('environment', config.ENVIRONMENT);
|
|
35
35
|
form.append('platform', platform);
|
|
36
36
|
form.append('version', config.VERSION);
|
|
37
|
-
form.append('buildNumber', String(config.BUILD_NUMBER));
|
|
38
37
|
form.append('forceUpdate', String(config.FORCE_UPDATE));
|
|
39
38
|
|
|
40
39
|
try {
|
|
@@ -116,12 +115,6 @@ async function getConfig(platform) {
|
|
|
116
115
|
validate: (val) => (val.trim() ? true : 'Version is required'),
|
|
117
116
|
});
|
|
118
117
|
|
|
119
|
-
const BUILD_NUMBER = await input({
|
|
120
|
-
message: `(${platform}) Enter Build Number:`,
|
|
121
|
-
validate: (val) =>
|
|
122
|
-
!isNaN(val) && val.trim() !== '' ? true : 'Must be a number',
|
|
123
|
-
});
|
|
124
|
-
|
|
125
118
|
const FORCE_UPDATE = await confirm({
|
|
126
119
|
message: `(${platform}) Force Update?`,
|
|
127
120
|
default: false,
|
|
@@ -132,7 +125,6 @@ async function getConfig(platform) {
|
|
|
132
125
|
PROJECT_ID,
|
|
133
126
|
ENVIRONMENT,
|
|
134
127
|
VERSION,
|
|
135
|
-
BUILD_NUMBER,
|
|
136
128
|
FORCE_UPDATE,
|
|
137
129
|
};
|
|
138
130
|
}
|