expo-dev-launcher 5.0.17 → 5.0.18
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
package/android/build.gradle
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevLauncherErrorManager.js","sourceRoot":"","sources":["../src/DevLauncherErrorManager.ts"],"names":[],"mappings":"AAGA,IAAI,sBAAsB,GAAG,IAAI,CAAC;AAClC,IAAI,MAAM,GAAG,KAAK,CAAC,CAAC,gDAAgD;AAEpE,MAAM,iCAAiC,GAAG;;;;mGAIyD,CAAC;AAEpG,MAAM,gCAAgC,GAAG;;;mGAG0D,CAAC;AAEpG,SAAS,2BAA2B,CAAC,KAAiB;IACpD,KAAK,CAAC,OAAO,IAAI,MAAM,GAAG,iCAAiC,CAAC;AAC9D,CAAC;AAED,SAAS,+BAA+B,CAAC,KAAY;IACnD,KAAK,CAAC,OAAO,GAAG;;EAEhB,gCAAgC,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,cAAc,CAAC,KAAyB;IAC/C,IAAI,MAAM,IAAI,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"DevLauncherErrorManager.js","sourceRoot":"","sources":["../src/DevLauncherErrorManager.ts"],"names":[],"mappings":"AAGA,IAAI,sBAAsB,GAAG,IAAI,CAAC;AAClC,IAAI,MAAM,GAAG,KAAK,CAAC,CAAC,gDAAgD;AAEpE,MAAM,iCAAiC,GAAG;;;;mGAIyD,CAAC;AAEpG,MAAM,gCAAgC,GAAG;;;mGAG0D,CAAC;AAEpG,SAAS,2BAA2B,CAAC,KAAiB;IACpD,KAAK,CAAC,OAAO,IAAI,MAAM,GAAG,iCAAiC,CAAC;AAC9D,CAAC;AAED,SAAS,+BAA+B,CAAC,KAAY;IACnD,KAAK,CAAC,OAAO,GAAG;;EAEhB,gCAAgC,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,cAAc,CAAC,KAAyB;IAC/C,IAAI,MAAM,IAAI,KAAK,EAAE;QACnB,sCAAsC;QACtC,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,iBAAiB,CAAC,CAAC;gBACtB,2BAA2B,CAAC,KAAK,CAAC,CAAC;gBACnC,MAAM;aACP;SACF;KACF;SAAM,IACL,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,IAAI,4BAA4B;QACtF,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,0DAA0D,CAAC,CAAC,mBAAmB;MACtG;QACA,+BAA+B,CAAC,KAAK,CAAC,CAAC;KACxC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO;IACnD,IAAI,KAAK,YAAY,KAAK,EAAE;QAC1B,gGAAgG;QAChG,oGAAoG;QACpG,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,6CAA6C,CAAC,EAAE;YACpF,OAAO;SACR;QACD,cAAc,CAAC,KAAK,CAAC,CAAC;KACvB;IAED,MAAM,GAAG,IAAI,CAAC;IACd,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,eAAe;IAChD,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,IAAI,sBAAsB,EAAE;YAC1B,YAAY,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO;SACR;QAED,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,sBAAsB,GAAG,KAAK,CAAC;AACjC,CAAC","sourcesContent":["// Similar interface to the one used in expo modules.\ntype CodedError = Error & { code?: string };\n\nlet isErrorHandlingEnabled = true;\nlet wasHit = false; // whether the original error handler was called\n\nconst unavailableErrorPossibleSolutions = `Some possible solutions:\n- Make sure that the method is available on the current platform.\n- Make sure you're using the newest available version of this development client.\n- Make sure you're running a compatible version of your JavaScript code.\n- If you've installed a new library recently, you may need to make a new development client build.`;\n\nconst moduleIsMissingPossibleSolutions = `Some possible solutions:\n- Make sure you're using the newest available version of this development client.\n- Make sure you're running a compatible version of your JavaScript code.\n- If you've installed a new library recently, you may need to make a new development client build.`;\n\nfunction customizeUnavailableMessage(error: CodedError) {\n error.message += '\\n\\n' + unavailableErrorPossibleSolutions;\n}\n\nfunction customizeModuleIsMissingMessage(error: Error) {\n error.message = `Your JavaScript code tried to access a native module that doesn't exist in this development client. \n\n${moduleIsMissingPossibleSolutions}`;\n}\n\nfunction customizeError(error: Error | CodedError) {\n if ('code' in error) {\n // It's a CodedError from expo modules\n switch (error.code) {\n case 'ERR_UNAVAILABLE': {\n customizeUnavailableMessage(error);\n break;\n }\n }\n } else if (\n error.message.includes('Native module cannot be null') || // RN 0.64 and below message\n error.message.includes('`new NativeEventEmitter()` requires a non-null argument.') // RN 0.65+ message\n ) {\n customizeModuleIsMissingMessage(error);\n }\n}\n\nfunction errorHandler(originalHandler, error, isFatal) {\n if (error instanceof Error) {\n // Suppresses `\"main\" has not been registered` error only if it was caused by a different error.\n // Otherwise, we want to show it, cause the user may forget to call `AppRegistry.registerComponent`.\n if (wasHit && error.message?.includes('has not been registered. This can happen if')) {\n return;\n }\n customizeError(error);\n }\n\n wasHit = true;\n originalHandler(error, isFatal);\n}\n\n/**\n * @hidden\n */\nexport function createErrorHandler(originalHandler) {\n return (error, isFatal) => {\n if (isErrorHandlingEnabled) {\n errorHandler(originalHandler, error, isFatal);\n return;\n }\n\n originalHandler(error, isFatal);\n };\n}\n\n/**\n * @hidden\n */\nexport function disableErrorHandling() {\n isErrorHandlingEnabled = false;\n}\n"]}
|
|
@@ -274,20 +274,28 @@
|
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
void (^navigateToLauncher)(NSError *) = ^(NSError *error) {
|
|
278
|
+
__weak typeof(self) weakSelf = self;
|
|
279
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
280
|
+
typeof(self) self = weakSelf;
|
|
281
|
+
if (!self) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
[self navigateToLauncher];
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
NSURL* initialUrl = [EXDevLauncherController initialUrlFromProcessInfo];
|
|
290
|
+
if (initialUrl) {
|
|
291
|
+
[self loadApp:initialUrl withProjectUrl:nil onSuccess:nil onError:navigateToLauncher];
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
277
295
|
NSNumber *devClientTryToLaunchLastBundleValue = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"DEV_CLIENT_TRY_TO_LAUNCH_LAST_BUNDLE"];
|
|
278
296
|
BOOL shouldTryToLaunchLastOpenedBundle = (devClientTryToLaunchLastBundleValue != nil) ? [devClientTryToLaunchLastBundleValue boolValue] : YES;
|
|
279
297
|
if (_lastOpenedAppUrl != nil && shouldTryToLaunchLastOpenedBundle) {
|
|
280
|
-
[self loadApp:_lastOpenedAppUrl withProjectUrl:nil onSuccess:nil onError
|
|
281
|
-
__weak typeof(self) weakSelf = self;
|
|
282
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
283
|
-
typeof(self) self = weakSelf;
|
|
284
|
-
if (!self) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
[self navigateToLauncher];
|
|
289
|
-
});
|
|
290
|
-
}];
|
|
298
|
+
[self loadApp:_lastOpenedAppUrl withProjectUrl:nil onSuccess:nil onError:navigateToLauncher];
|
|
291
299
|
return;
|
|
292
300
|
}
|
|
293
301
|
[self navigateToLauncher];
|
|
@@ -808,4 +816,24 @@
|
|
|
808
816
|
[self loadApp:appUrl onSuccess:nil onError:nil];
|
|
809
817
|
}
|
|
810
818
|
|
|
819
|
+
+ (NSURL *)initialUrlFromProcessInfo
|
|
820
|
+
{
|
|
821
|
+
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
|
822
|
+
NSArray *arguments = [processInfo arguments];
|
|
823
|
+
BOOL nextIsUrl = NO;
|
|
824
|
+
|
|
825
|
+
for (NSString *arg in arguments) {
|
|
826
|
+
if (nextIsUrl) {
|
|
827
|
+
NSURL *url = [NSURL URLWithString:arg];
|
|
828
|
+
if (url) {
|
|
829
|
+
return url;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
if ([arg isEqualToString:@"--initialUrl"]) {
|
|
833
|
+
nextIsUrl = YES;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return nil;
|
|
837
|
+
}
|
|
838
|
+
|
|
811
839
|
@end
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-launcher",
|
|
3
3
|
"title": "Expo Development Launcher",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.18",
|
|
5
5
|
"description": "Pre-release version of the Expo development launcher package for testing.",
|
|
6
6
|
"main": "build/DevLauncher.js",
|
|
7
7
|
"types": "build/DevLauncher.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"homepage": "https://docs.expo.dev",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "8.11.0",
|
|
34
|
-
"expo-dev-menu": "6.0.
|
|
34
|
+
"expo-dev-menu": "6.0.13",
|
|
35
35
|
"expo-manifests": "~0.15.0",
|
|
36
36
|
"resolve-from": "^5.0.0"
|
|
37
37
|
},
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
],
|
|
67
67
|
"testTimeout": 15000
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "728158f99d680cf64fb06f08301d3806c18c6f63"
|
|
70
70
|
}
|