Page MenuHomePhorge

D14961.1765104993.diff
No OneTemporary

Size
6 KB
Referenced Files
None
Subscribers
None

D14961.1765104993.diff

diff --git a/patches/@expo+cli+0.4.11.patch b/patches/@expo+cli+0.24.13.patch
rename from patches/@expo+cli+0.4.11.patch
rename to patches/@expo+cli+0.24.13.patch
--- a/patches/@expo+cli+0.4.11.patch
+++ b/patches/@expo+cli+0.24.13.patch
@@ -1,65 +1,65 @@
diff --git a/node_modules/@expo/cli/build/src/start/interface/interactiveActions.js b/node_modules/@expo/cli/build/src/start/interface/interactiveActions.js
-index 9ab8961..27b9cc2 100644
+index 1604ed4..7c93ac7 100644
--- a/node_modules/@expo/cli/build/src/start/interface/interactiveActions.js
+++ b/node_modules/@expo/cli/build/src/start/interface/interactiveActions.js
-@@ -45,12 +45,17 @@ class DevServerManagerActions {
+@@ -80,12 +80,17 @@ class DevServerManagerActions {
if (this.devServerManager.getNativeDevServerPort()) {
const devServer = this.devServerManager.getDefaultDevServer();
try {
+ const devServerUrl = devServer.getDevServerUrl();
const nativeRuntimeUrl = devServer.getNativeRuntimeUrl();
const interstitialPageUrl = devServer.getRedirectUrl();
- (0, _commandsTable).printQRCode(interstitialPageUrl != null ? interstitialPageUrl : nativeRuntimeUrl);
+ (0, _commandsTable.printQRCode)(interstitialPageUrl ?? nativeRuntimeUrl);
if (interstitialPageUrl) {
- Log.log((0, _commandsTable).printItem(_chalk.default`Choose an app to open your project at {underline ${interstitialPageUrl}}`));
+ _log.log((0, _commandsTable.printItem)((0, _chalk().default)`Choose an app to open your project at {underline ${interstitialPageUrl}}`));
}
+ if (nativeRuntimeUrl !== devServerUrl) {
-+ // When using a custom scheme, the IP in the deep link URL is difficult to read, so we print the LAN address too.
-+ Log.log((0, _commandsTable).printItem(_chalk.default`Dev server LAN address: {underline ${devServerUrl}}`));
++ // When using a custom scheme, the IP in the deep link URL is difficult to read, so we print the LAN address too.
++ Log.log((0, _commandsTable).printItem(_chalk.default`Dev server LAN address: {underline ${devServerUrl}}`));
+ }
- Log.log((0, _commandsTable).printItem(_chalk.default`Metro waiting on {underline ${nativeRuntimeUrl}}`));
- // TODO: if development build, change this message!
- Log.log((0, _commandsTable).printItem("Scan the QR code above with Expo Go (Android) or the Camera app (iOS)"));
+ if (_env.env.__EXPO_E2E_TEST) {
+ // Print the URL to stdout for tests
+ console.info(`[__EXPO_E2E_TEST:server] ${JSON.stringify({
diff --git a/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js b/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
-index 0a601bd..c4dbd20 100644
+index c0ebf7e..b3ee4c5 100644
--- a/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
+++ b/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
-@@ -255,6 +255,16 @@ class BundlerDevServer {
+@@ -293,6 +293,16 @@ class BundlerDevServer {
+ if (options.hostType === 'localhost') {
return `${location.protocol}://localhost:${location.port}`;
}
- var _url;
+ if (location.host === 'localhost') {
-+ // try autodetect IP
-+ try {
-+ const ip = require("../../utils/ip").getIpAddress();
-+ if (ip !== "127.0.0.1") {
-+ return `${location.protocol}://${ip}:${location.port}`;
-+ }
-+ } catch(e) {}
-+ // if the above fails, fall back to localhost
++ // try autodetect IP
++ try {
++ const ip = require("../../utils/ip").getIpAddress();
++ if (ip !== "127.0.0.1") {
++ return `${location.protocol}://${ip}:${location.port}`;
++ }
++ } catch(e) {}
++ // if the above fails, fall back to localhost
+ }
- return (_url = location.url) != null ? _url : null;
+ return location.url ?? null;
}
- /** Get the base URL for JS inspector */ getJsInspectorBaseUrl() {
+ getDevServerUrlOrAssert(options = {}) {
diff --git a/node_modules/@expo/cli/build/src/utils/scheme.js b/node_modules/@expo/cli/build/src/utils/scheme.js
-index 0d1b9dd..3b0402b 100644
+index a1a78ca..b0f9626 100644
--- a/node_modules/@expo/cli/build/src/utils/scheme.js
+++ b/node_modules/@expo/cli/build/src/utils/scheme.js
-@@ -50,7 +50,9 @@ function sortLongest(obj) {
+@@ -133,7 +133,9 @@ function sortLongest(obj) {
}
async function getSchemesForIosAsync(projectRoot) {
try {
-- const infoPlistBuildProperty = (0, _getInfoPlistPath).getInfoPlistPathFromPbxproj(projectRoot);
+- const infoPlistBuildProperty = (0, _getInfoPlistPath().getInfoPlistPathFromPbxproj)(projectRoot);
+ // see https://github.com/expo/expo/discussions/20875 for details on this patch
+ // if this patch ever breaks, it can be worked around by adding a --scheme flag to the expo start command
+ const infoPlistBuildProperty = (0, _getInfoPlistPath).getInfoPlistPathFromPbxproj(projectRoot, { buildConfiguration: 'Debug' });
debug(`ios application Info.plist path:`, infoPlistBuildProperty);
if (infoPlistBuildProperty) {
- const configPath = _path.default.join(projectRoot, "ios", infoPlistBuildProperty);
-@@ -71,6 +73,14 @@ async function getSchemesForAndroidAsync(projectRoot) {
- const configPath = await _configPlugins.AndroidConfig.Paths.getAndroidManifestAsync(projectRoot);
- const manifest = await _configPlugins.AndroidConfig.Manifest.readAndroidManifestAsync(configPath);
- const schemes = await _configPlugins.AndroidConfig.Scheme.getSchemesFromManifest(manifest);
+ const configPath = _path().default.join(projectRoot, 'ios', infoPlistBuildProperty);
+@@ -154,6 +156,14 @@ async function getSchemesForAndroidAsync(projectRoot) {
+ const configPath = await _configplugins().AndroidConfig.Paths.getAndroidManifestAsync(projectRoot);
+ const manifest = await _configplugins().AndroidConfig.Manifest.readAndroidManifestAsync(configPath);
+ const schemes = await _configplugins().AndroidConfig.Scheme.getSchemesFromManifest(manifest);
+ // see https://github.com/expo/expo/discussions/20875 for details on this patch
+ // if this patch ever breaks, it can be worked around by adding a --scheme flag to the expo start command
+ if (schemes.length < 1) {
@@ -69,5 +69,5 @@
+ schemes.push(...debugSchemes);
+ }
debug(`android application schemes:`, schemes);
- return sortLongest(schemes);
+ return resolveExpoOrLongestScheme(schemes);
} catch (error) {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 10:56 AM (10 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5841083
Default Alt Text
D14961.1765104993.diff (6 KB)

Event Timeline