@capgo/capacitor-updater 7.2.19 → 7.2.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/android/src/main/java/ee/forgr/capacitor_updater/BundleInfo.java +22 -8
- package/android/src/main/java/ee/forgr/capacitor_updater/Callback.java +2 -2
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +185 -188
- package/android/src/main/java/ee/forgr/capacitor_updater/{CapacitorUpdater.java → CapgoUpdater.java} +50 -49
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipherV2.java +7 -7
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayUpdateUtils.java +21 -24
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +1 -1
- package/ios/Plugin/AES.swift +2 -2
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +93 -93
- package/ios/Plugin/{CapacitorUpdater.swift → CapgoUpdater.swift} +67 -67
- package/ios/Plugin/CryptoCipherV2.swift +25 -25
- package/ios/Plugin/DelayUpdateUtils.swift +23 -23
- package/package.json +1 -1
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
package ee.forgr.capacitor_updater;
|
|
8
8
|
|
|
9
|
-
import com.getcapacitor.JSObject;
|
|
10
9
|
import java.text.SimpleDateFormat;
|
|
11
10
|
import java.util.Date;
|
|
11
|
+
import java.util.HashMap;
|
|
12
|
+
import java.util.Map;
|
|
12
13
|
import java.util.Objects;
|
|
13
14
|
import java.util.TimeZone;
|
|
14
15
|
import org.json.JSONException;
|
|
@@ -109,10 +110,6 @@ public class BundleInfo {
|
|
|
109
110
|
return new BundleInfo(this.id, this.version, status, this.downloaded, this.checksum);
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
public static BundleInfo fromJSON(final JSObject json) throws JSONException {
|
|
113
|
-
return BundleInfo.fromJSON(json.toString());
|
|
114
|
-
}
|
|
115
|
-
|
|
116
113
|
public static BundleInfo fromJSON(final String jsonString) throws JSONException {
|
|
117
114
|
JSONObject json = new JSONObject(new JSONTokener(jsonString));
|
|
118
115
|
return new BundleInfo(
|
|
@@ -124,8 +121,8 @@ public class BundleInfo {
|
|
|
124
121
|
);
|
|
125
122
|
}
|
|
126
123
|
|
|
127
|
-
public
|
|
128
|
-
final
|
|
124
|
+
public Map<String, Object> toJSONMap() {
|
|
125
|
+
final Map<String, Object> result = new HashMap<>();
|
|
129
126
|
result.put("id", this.getId());
|
|
130
127
|
result.put("version", this.getVersionName());
|
|
131
128
|
result.put("downloaded", this.getDownloaded());
|
|
@@ -149,6 +146,23 @@ public class BundleInfo {
|
|
|
149
146
|
|
|
150
147
|
@Override
|
|
151
148
|
public String toString() {
|
|
152
|
-
return
|
|
149
|
+
return (
|
|
150
|
+
"BundleInfo{" +
|
|
151
|
+
"id='" +
|
|
152
|
+
getId() +
|
|
153
|
+
'\'' +
|
|
154
|
+
", version='" +
|
|
155
|
+
getVersionName() +
|
|
156
|
+
'\'' +
|
|
157
|
+
", downloaded='" +
|
|
158
|
+
getDownloaded() +
|
|
159
|
+
'\'' +
|
|
160
|
+
", checksum='" +
|
|
161
|
+
getChecksum() +
|
|
162
|
+
'\'' +
|
|
163
|
+
", status=" +
|
|
164
|
+
getStatus() +
|
|
165
|
+
'}'
|
|
166
|
+
);
|
|
153
167
|
}
|
|
154
168
|
}
|