expo-updates-interface 0.6.0 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.7.0 — 2022-07-07
14
+
15
+ ### 💡 Others
16
+
17
+ - [Android] Get downloaded update IDs. ([#17933](https://github.com/expo/expo/pull/17933) by [@douglowder](https://github.com/douglowder))
18
+
13
19
  ## 0.6.0 — 2022-04-18
14
20
 
15
21
  ### 🎉 New features
@@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions'
4
4
  apply plugin: 'maven-publish'
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '0.6.0'
7
+ version = '0.7.0'
8
8
 
9
9
  buildscript {
10
10
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -75,7 +75,7 @@ android {
75
75
  minSdkVersion safeExtGet("minSdkVersion", 21)
76
76
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
77
77
  versionCode 1
78
- versionName '0.6.0'
78
+ versionName '0.7.0'
79
79
  }
80
80
  lintOptions {
81
81
  abortOnError false
@@ -5,6 +5,8 @@ import android.content.Context;
5
5
  import org.json.JSONObject;
6
6
 
7
7
  import java.util.HashMap;
8
+ import java.util.List;
9
+ import java.util.UUID;
8
10
 
9
11
  /**
10
12
  * Interface for modules that depend on expo-updates for loading production updates but do not want
@@ -25,6 +27,11 @@ public interface UpdatesInterface {
25
27
  boolean onManifestLoaded(JSONObject manifest);
26
28
  }
27
29
 
30
+ interface QueryCallback {
31
+ void onFailure(Exception e);
32
+ void onSuccess(List<UUID> updateIds);
33
+ }
34
+
28
35
  interface Update {
29
36
  JSONObject getManifest();
30
37
  String getLaunchAssetPath();
@@ -33,4 +40,6 @@ public interface UpdatesInterface {
33
40
  void reset();
34
41
 
35
42
  void fetchUpdateWithConfiguration(HashMap<String, Object> configuration, Context context, UpdateCallback callback);
43
+
44
+ void storedUpdateIdsWithConfiguration(HashMap<String, Object> configuration, Context context, QueryCallback callback);
36
45
  }
@@ -5,7 +5,8 @@
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
7
  typedef void (^EXUpdatesErrorBlock) (NSError *error);
8
- typedef void (^EXUpdatesSuccessBlock) (NSDictionary * _Nullable manifest);
8
+ typedef void (^EXUpdatesUpdateSuccessBlock) (NSDictionary * _Nullable manifest);
9
+ typedef void (^EXUpdatesQuerySuccessBlock) (NSArray<NSUUID *> * _Nonnull updateIds);
9
10
  typedef void (^EXUpdatesProgressBlock) (NSUInteger successfulAssetCount, NSUInteger failedAssetCount, NSUInteger totalAssetCount);
10
11
  /**
11
12
  * Called when a manifest has been downloaded. The return value indicates whether or not to
@@ -29,9 +30,17 @@ typedef BOOL (^EXUpdatesManifestBlock) (NSDictionary *manifest);
29
30
  - (void)fetchUpdateWithConfiguration:(NSDictionary *)configuration
30
31
  onManifest:(EXUpdatesManifestBlock)manifestBlock
31
32
  progress:(EXUpdatesProgressBlock)progressBlock
32
- success:(EXUpdatesSuccessBlock)successBlock
33
+ success:(EXUpdatesUpdateSuccessBlock)successBlock
33
34
  error:(EXUpdatesErrorBlock)errorBlock;
34
35
 
36
+ /**
37
+ * Obtains a list of UUIDs for updates already in the updates DB that are in the READY state.
38
+ * The success block will pass in the array of UUIDs
39
+ */
40
+ - (void)storedUpdateIdsWithConfiguration:(NSDictionary *)configuration
41
+ success:(EXUpdatesQuerySuccessBlock)successBlock
42
+ error:(EXUpdatesErrorBlock)errorBlock;
43
+
35
44
  @end
36
45
 
37
46
  NS_ASSUME_NONNULL_END
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-updates-interface",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Native interface for modules that optionally depend on expo-updates, e.g. expo-dev-launcher.",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -23,5 +23,5 @@
23
23
  "peerDependencies": {
24
24
  "expo": "*"
25
25
  },
26
- "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
26
+ "gitHead": "6e131f2da851a47c3a24eb3d6fc971a1a7822086"
27
27
  }