@expo/cli 57.0.32 → 57.0.34

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.
Files changed (79) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/events/index.js +1 -1
  3. package/build/src/export/compileHermesArtifacts.js +28 -0
  4. package/build/src/export/compileHermesArtifacts.js.map +1 -0
  5. package/build/src/export/embed/exportEmbedAsync.js +4 -0
  6. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  7. package/build/src/export/exportApp.js +9 -5
  8. package/build/src/export/exportApp.js.map +1 -1
  9. package/build/src/export/exportDomComponents.js +5 -11
  10. package/build/src/export/exportDomComponents.js.map +1 -1
  11. package/build/src/prebuild/prebuildAsync.js +3 -2
  12. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  13. package/build/src/run/ensureNativeProject.js +3 -2
  14. package/build/src/run/ensureNativeProject.js.map +1 -1
  15. package/build/src/run/ios/appleDevice/ClientManager.js +11 -6
  16. package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
  17. package/build/src/run/ios/runIosAsync.js +12 -4
  18. package/build/src/run/ios/runIosAsync.js.map +1 -1
  19. package/build/src/start/interface/cliExtensionMenuItemHandler.js.map +1 -1
  20. package/build/src/start/interface/commandsTable.js.map +1 -1
  21. package/build/src/start/interface/createDevToolsMenuItems.js.map +1 -1
  22. package/build/src/start/interface/interactiveActions.js.map +1 -1
  23. package/build/src/start/platforms/android/adb.js +6 -1
  24. package/build/src/start/platforms/android/adb.js.map +1 -1
  25. package/build/src/start/platforms/ios/devicectl.js +2 -5
  26. package/build/src/start/platforms/ios/devicectl.js.map +1 -1
  27. package/build/src/start/server/BundlerDevServer.js +6 -9
  28. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  29. package/build/src/start/server/DevServerManager.js +1 -1
  30. package/build/src/start/server/DevServerManager.js.map +1 -1
  31. package/build/src/start/server/UrlCreator.js +10 -4
  32. package/build/src/start/server/UrlCreator.js.map +1 -1
  33. package/build/src/start/server/{DevToolsPlugin.js → devtools/DevToolsPlugin.js} +14 -5
  34. package/build/src/start/server/devtools/DevToolsPlugin.js.map +1 -0
  35. package/build/src/start/server/devtools/DevToolsPlugin.schema.js +195 -0
  36. package/build/src/start/server/devtools/DevToolsPlugin.schema.js.map +1 -0
  37. package/build/src/start/server/{DevToolsPluginCliExtensionExecutor.js → devtools/DevToolsPluginCliExtensionExecutor.js} +1 -1
  38. package/build/src/start/server/devtools/DevToolsPluginCliExtensionExecutor.js.map +1 -0
  39. package/build/src/start/server/{DevToolsPluginCliExtensionResults.js → devtools/DevToolsPluginCliExtensionResults.js} +24 -12
  40. package/build/src/start/server/devtools/DevToolsPluginCliExtensionResults.js.map +1 -0
  41. package/build/src/start/server/{DevToolsPluginManager.js → devtools/DevToolsPluginManager.js} +2 -2
  42. package/build/src/start/server/devtools/DevToolsPluginManager.js.map +1 -0
  43. package/build/src/start/server/devtools/DevToolsPluginServerHelpers.js.map +1 -0
  44. package/build/src/start/server/{MCP.js → mcp/MCP.js} +25 -15
  45. package/build/src/start/server/mcp/MCP.js.map +1 -0
  46. package/build/src/start/server/{MCPDevToolsPluginCLIExtensions.js → mcp/MCPDevToolsPluginCLIExtensions.js} +14 -27
  47. package/build/src/start/server/mcp/MCPDevToolsPluginCLIExtensions.js.map +1 -0
  48. package/build/src/start/server/{createMCPDevToolsExtensionSchema.js → mcp/createMCPDevToolsExtensionSchema.js} +8 -15
  49. package/build/src/start/server/mcp/createMCPDevToolsExtensionSchema.js.map +1 -0
  50. package/build/src/start/server/metro/MetroBundlerDevServer.js +2 -4
  51. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  52. package/build/src/start/server/metro/instantiateMetro.js +6 -2
  53. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  54. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +1 -1
  55. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
  56. package/build/src/start/server/middleware/metroOptions.js +4 -1
  57. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  58. package/build/src/start/server/middleware/openHandlers.js +2 -6
  59. package/build/src/start/server/middleware/openHandlers.js.map +1 -1
  60. package/build/src/start/startAsync.js +2 -4
  61. package/build/src/start/startAsync.js.map +1 -1
  62. package/build/src/utils/obj.js +1 -1
  63. package/build/src/utils/obj.js.map +1 -1
  64. package/build/src/utils/open.js +47 -31
  65. package/build/src/utils/open.js.map +1 -1
  66. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  67. package/build/src/utils/telemetry/utils/context.js +1 -1
  68. package/package.json +26 -22
  69. package/build/src/start/server/DevToolsPlugin.js.map +0 -1
  70. package/build/src/start/server/DevToolsPlugin.schema.js +0 -84
  71. package/build/src/start/server/DevToolsPlugin.schema.js.map +0 -1
  72. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js.map +0 -1
  73. package/build/src/start/server/DevToolsPluginCliExtensionResults.js.map +0 -1
  74. package/build/src/start/server/DevToolsPluginManager.js.map +0 -1
  75. package/build/src/start/server/DevToolsPluginServerHelpers.js.map +0 -1
  76. package/build/src/start/server/MCP.js.map +0 -1
  77. package/build/src/start/server/MCPDevToolsPluginCLIExtensions.js.map +0 -1
  78. package/build/src/start/server/createMCPDevToolsExtensionSchema.js.map +0 -1
  79. /package/build/src/start/server/{DevToolsPluginServerHelpers.js → devtools/DevToolsPluginServerHelpers.js} +0 -0
@@ -8,12 +8,11 @@ Object.defineProperty(exports, "addMcpCapabilities", {
8
8
  return addMcpCapabilities;
9
9
  }
10
10
  });
11
- const _DevToolsPluginschema = require("./DevToolsPlugin.schema");
12
- const _DevToolsPluginCliExtensionExecutor = require("./DevToolsPluginCliExtensionExecutor");
11
+ const _log = require("../../../log");
13
12
  const _createMCPDevToolsExtensionSchema = require("./createMCPDevToolsExtensionSchema");
14
- const _log = require("../../log");
13
+ const _DevToolsPluginCliExtensionExecutor = require("../devtools/DevToolsPluginCliExtensionExecutor");
15
14
  const debug = require('debug')('expo:start:server:devtools:mcp');
16
- async function addMcpCapabilities(mcpServer, devServerManager) {
15
+ async function addMcpCapabilities(mcpServer, devServerManager, z) {
17
16
  const plugins = await devServerManager.devtoolsPluginManager.queryPluginsAsync();
18
17
  for (const plugin of plugins){
19
18
  if (plugin.cliExtensions) {
@@ -34,7 +33,7 @@ async function addMcpCapabilities(mcpServer, devServerManager) {
34
33
  commands: mcpCommands
35
34
  }
36
35
  };
37
- const schema = (0, _createMCPDevToolsExtensionSchema.createMCPDevToolsExtensionSchema)(mcpPlugin);
36
+ const schema = (0, _createMCPDevToolsExtensionSchema.createMCPDevToolsExtensionSchema)(mcpPlugin, z);
38
37
  debug(`Installing MCP CLI extension for plugin: ${plugin.packageName} - found ${mcpCommands.length} commands`);
39
38
  mcpServer.registerTool(plugin.packageName, {
40
39
  title: plugin.packageName,
@@ -51,30 +50,18 @@ async function addMcpCapabilities(mcpServer, devServerManager) {
51
50
  args,
52
51
  metroServerOrigin
53
52
  });
54
- const parsedResults = _DevToolsPluginschema.DevToolsPluginOutputSchema.safeParse(results);
55
- if (parsedResults.success === false) {
56
- throw new Error(`Invalid output from CLI command: ${parsedResults.error.issues.map((issue)=>issue.message).join(', ')}`);
57
- }
58
53
  return {
59
- content: parsedResults.data.map((line)=>{
60
- const { type } = line;
61
- if (type === 'text') {
62
- return {
63
- type,
64
- text: line.text,
65
- level: line.level,
66
- url: line.url
67
- };
68
- } else if (line.type === 'image' || line.type === 'audio') {
69
- // We could present this as a resource_link, but it seems not to be well supported in MCP clients,
70
- // so we'll return a text with the link instead.
71
- return {
72
- type: 'text',
73
- text: `${type} resource: ${line.url}${line.text ? ' (' + line.text + ')' : ''}`
74
- };
54
+ content: results.map((line)=>{
55
+ if (line.type === 'text') {
56
+ return line;
75
57
  }
76
- return null;
77
- }).filter((line)=>line !== null)
58
+ // We could present this as a resource_link, but it seems not to be well supported in MCP clients,
59
+ // so we'll return a text with the link instead.
60
+ return {
61
+ type: 'text',
62
+ text: `${line.type} resource: ${line.url}${line.text ? ' (' + line.text + ')' : ''}`
63
+ };
64
+ })
78
65
  };
79
66
  } catch (e) {
80
67
  _log.Log.error('Error executing MCP CLI command:', e);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/start/server/mcp/MCPDevToolsPluginCLIExtensions.ts"],"sourcesContent":["import { Log } from '../../../log';\nimport type { DevServerManager } from '../DevServerManager';\nimport type { McpServer } from './MCP';\nimport { createMCPDevToolsExtensionSchema } from './createMCPDevToolsExtensionSchema';\nimport type { DevToolsPluginInfo } from '../devtools/DevToolsPlugin.schema';\nimport { DevToolsPluginCliExtensionExecutor } from '../devtools/DevToolsPluginCliExtensionExecutor';\n\nconst debug = require('debug')('expo:start:server:devtools:mcp');\n\nexport async function addMcpCapabilities(\n mcpServer: Pick<McpServer, 'registerTool'>,\n devServerManager: DevServerManager,\n z: typeof import('zod').z\n) {\n const plugins = await devServerManager.devtoolsPluginManager.queryPluginsAsync();\n\n for (const plugin of plugins) {\n if (plugin.cliExtensions) {\n const mcpCommands = (plugin.cliExtensions.commands ?? []).filter((p) =>\n p.environments?.includes('mcp')\n );\n if (mcpCommands.length === 0) {\n continue;\n }\n\n // Build an MCP-scoped descriptor so the schema enum and the executor's\n // existence check both reject commands that were not declared MCP-enabled.\n const mcpPlugin: DevToolsPluginInfo = {\n packageName: plugin.packageName,\n packageRoot: plugin.packageRoot,\n cliExtensions: {\n ...plugin.cliExtensions,\n commands: mcpCommands,\n },\n };\n\n const schema = createMCPDevToolsExtensionSchema(mcpPlugin, z);\n\n debug(\n `Installing MCP CLI extension for plugin: ${plugin.packageName} - found ${mcpCommands.length} commands`\n );\n\n mcpServer.registerTool(\n plugin.packageName,\n {\n title: plugin.packageName,\n description: plugin.description,\n inputSchema: { parameters: schema },\n },\n async ({ parameters }) => {\n try {\n const { command, ...args } = parameters;\n\n const metroServerOrigin = devServerManager\n .getDefaultDevServer()\n .getJsInspectorBaseUrl();\n\n const results = await new DevToolsPluginCliExtensionExecutor(\n mcpPlugin,\n devServerManager.projectRoot\n ).execute({ command, args, metroServerOrigin });\n\n return {\n content: results.map((line) => {\n if (line.type === 'text') {\n return line;\n }\n // We could present this as a resource_link, but it seems not to be well supported in MCP clients,\n // so we'll return a text with the link instead.\n return {\n type: 'text',\n text: `${line.type} resource: ${line.url}${line.text ? ' (' + line.text + ')' : ''}`,\n } as const;\n }),\n };\n } catch (e: any) {\n Log.error('Error executing MCP CLI command:', e);\n return {\n content: [{ type: 'text', text: `Error executing command: ${e.toString()}` }],\n isError: true,\n };\n }\n }\n );\n }\n }\n}\n"],"names":["addMcpCapabilities","debug","require","mcpServer","devServerManager","z","plugins","devtoolsPluginManager","queryPluginsAsync","plugin","cliExtensions","mcpCommands","commands","filter","p","environments","includes","length","mcpPlugin","packageName","packageRoot","schema","createMCPDevToolsExtensionSchema","registerTool","title","description","inputSchema","parameters","command","args","metroServerOrigin","getDefaultDevServer","getJsInspectorBaseUrl","results","DevToolsPluginCliExtensionExecutor","projectRoot","execute","content","map","line","type","text","url","e","Log","error","toString","isError"],"mappings":";;;;+BASsBA;;;eAAAA;;;qBATF;kDAG6B;oDAEE;AAEnD,MAAMC,QAAQC,QAAQ,SAAS;AAExB,eAAeF,mBACpBG,SAA0C,EAC1CC,gBAAkC,EAClCC,CAAyB;IAEzB,MAAMC,UAAU,MAAMF,iBAAiBG,qBAAqB,CAACC,iBAAiB;IAE9E,KAAK,MAAMC,UAAUH,QAAS;QAC5B,IAAIG,OAAOC,aAAa,EAAE;YACxB,MAAMC,cAAc,AAACF,CAAAA,OAAOC,aAAa,CAACE,QAAQ,IAAI,EAAE,AAAD,EAAGC,MAAM,CAAC,CAACC;oBAChEA;wBAAAA,kBAAAA,EAAEC,YAAY,qBAAdD,gBAAgBE,QAAQ,CAAC;;YAE3B,IAAIL,YAAYM,MAAM,KAAK,GAAG;gBAC5B;YACF;YAEA,uEAAuE;YACvE,2EAA2E;YAC3E,MAAMC,YAAgC;gBACpCC,aAAaV,OAAOU,WAAW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IACF;AACF"}
@@ -8,14 +8,7 @@ Object.defineProperty(exports, "createMCPDevToolsExtensionSchema", {
8
8
  return createMCPDevToolsExtensionSchema;
9
9
  }
10
10
  });
11
- function _zod() {
12
- const data = require("zod");
13
- _zod = function() {
14
- return data;
15
- };
16
- return data;
17
- }
18
- function createMCPDevToolsExtensionSchema(plugin) {
11
+ function createMCPDevToolsExtensionSchema(plugin, z) {
19
12
  var _plugin_cliExtensions;
20
13
  if (plugin.cliExtensions == null || ((_plugin_cliExtensions = plugin.cliExtensions) == null ? void 0 : _plugin_cliExtensions.commands.length) === 0) {
21
14
  throw new Error(`Plugin ${plugin.packageName} has no commands defined. Please define at least one command.`);
@@ -55,26 +48,26 @@ function createMCPDevToolsExtensionSchema(plugin) {
55
48
  const commandsUsingParam = commandList.length === commands.length ? 'all commands' : commandList.map((c)=>`"${c}"`).join(', ');
56
49
  // Include command context in the description so LLMs know when to use each parameter
57
50
  const fullDescription = baseDescription ? `${baseDescription} (Used by: ${commandsUsingParam})` : `Parameter for: ${commandsUsingParam}`;
58
- allParameters[paramName] = paramTypeToZod(parameterTypes[paramName]).optional().describe(fullDescription);
51
+ allParameters[paramName] = paramTypeToZod(parameterTypes[paramName], z).optional().describe(fullDescription);
59
52
  }
60
53
  // Build the command description with clear instructions for the LLM
61
54
  const hasParameters = Object.keys(allParameters).length > 0;
62
55
  const commandDescription = hasParameters ? `Required. The command to execute. You must select exactly one command from the enum values. ` + `Each command may require specific parameters - only include parameters that belong to the selected command. ` + `Commands: ${commandDescriptions}.` : `Required. The command to execute. Select exactly one from the available options. ` + `Commands: ${commandDescriptions}.`;
63
56
  // Build the flat schema with additionalProperties: false for LLM compatibility
64
- const schema = _zod().z.object({
65
- command: _zod().z.enum(commandNames).describe(commandDescription),
57
+ const schema = z.object({
58
+ command: z.enum(commandNames).describe(commandDescription),
66
59
  ...allParameters
67
60
  }).strict(); // .strict() adds additionalProperties: false
68
61
  return schema;
69
62
  }
70
- function paramTypeToZod(type) {
63
+ function paramTypeToZod(type, z) {
71
64
  switch(type){
72
65
  case 'number':
73
- return _zod().z.number();
66
+ return z.number();
74
67
  case 'confirm':
75
- return _zod().z.boolean();
68
+ return z.boolean();
76
69
  case 'text':
77
- return _zod().z.string();
70
+ return z.string();
78
71
  }
79
72
  }
80
73
 
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/start/server/mcp/createMCPDevToolsExtensionSchema.ts"],"sourcesContent":["import type { z as Zod } from 'zod';\n\nimport type {\n DevToolsPluginCommandParameter,\n DevToolsPluginInfo,\n} from '../devtools/DevToolsPlugin.schema';\n\n/**\n * Creates an MCP-compatible JSON schema for a DevTools plugin's CLI extensions.\n *\n * LLM agents have varying support for complex JSON schema features like `anyOf`/`oneOf`\n * discriminated unions. This implementation uses a flat schema with an enum for the\n * command name, which provides the best compatibility across different LLM providers:\n *\n * - OpenAI: Supports `anyOf` but requires `additionalProperties: false` and all fields `required`\n * - Claude/Anthropic: Works best with simple flat schemas with enums\n * - Other providers: Generally have limited or inconsistent support for discriminated unions\n *\n * To compensate for the lack of discriminated unions, parameter descriptions include\n * which command(s) they belong to, and command descriptions include their parameters.\n *\n * The resulting schema structure is:\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"command\": {\n * \"type\": \"string\",\n * \"enum\": [\"cmd1\", \"cmd2\", ...],\n * \"description\": \"The command to execute. Available commands: \\\"cmd1\\\" - Title 1 (params: foo); ...\"\n * },\n * \"foo\": { \"type\": \"string\", \"description\": \"Foo description (Used by: \\\"cmd1\\\")\" },\n * ...\n * },\n * \"required\": [\"command\"],\n * \"additionalProperties\": false\n * }\n * ```\n */\nexport function createMCPDevToolsExtensionSchema(plugin: DevToolsPluginInfo, z: typeof Zod) {\n if (plugin.cliExtensions == null || plugin.cliExtensions?.commands.length === 0) {\n throw new Error(\n `Plugin ${plugin.packageName} has no commands defined. Please define at least one command.`\n );\n }\n\n const commands = plugin.cliExtensions.commands;\n\n // Build a rich description that explains each command and its parameters\n const commandDescriptions = commands\n .map((c) => {\n const params = c.parameters?.map((p) => p.name).join(', ');\n return params ? `\"${c.name}\": ${c.title} (params: ${params})` : `\"${c.name}\": ${c.title}`;\n })\n .join('. ');\n\n // Create enum of command names for clear LLM selection\n const commandNames = commands.map((c) => c.name) as [string, ...string[]];\n\n // Collect all unique parameters across all commands\n // Track which commands use each parameter for documentation\n const parameterCommandMap: Record<string, string[]> = {};\n const parameterDescriptions: Record<string, string> = {};\n const parameterTypes: Record<string, DevToolsPluginCommandParameter['type']> = {};\n\n for (const command of commands) {\n if (command.parameters && command.parameters.length > 0) {\n for (const param of command.parameters) {\n let commands = parameterCommandMap[param.name];\n if (!commands) {\n commands = [];\n parameterCommandMap[param.name] = commands;\n parameterDescriptions[param.name] = param.description || '';\n parameterTypes[param.name] = param.type;\n }\n commands.push(command.name);\n }\n }\n }\n\n // Build parameters with descriptions that indicate which command(s) they belong to\n const allParameters: Record<string, Zod.ZodTypeAny> = {};\n for (const [paramName, commandList] of Object.entries(parameterCommandMap)) {\n const baseDescription = parameterDescriptions[paramName];\n const commandsUsingParam =\n commandList.length === commands.length\n ? 'all commands'\n : commandList.map((c) => `\"${c}\"`).join(', ');\n\n // Include command context in the description so LLMs know when to use each parameter\n const fullDescription = baseDescription\n ? `${baseDescription} (Used by: ${commandsUsingParam})`\n : `Parameter for: ${commandsUsingParam}`;\n\n allParameters[paramName] = paramTypeToZod(parameterTypes[paramName]!, z)\n .optional()\n .describe(fullDescription);\n }\n\n // Build the command description with clear instructions for the LLM\n const hasParameters = Object.keys(allParameters).length > 0;\n const commandDescription = hasParameters\n ? `Required. The command to execute. You must select exactly one command from the enum values. ` +\n `Each command may require specific parameters - only include parameters that belong to the selected command. ` +\n `Commands: ${commandDescriptions}.`\n : `Required. The command to execute. Select exactly one from the available options. ` +\n `Commands: ${commandDescriptions}.`;\n\n // Build the flat schema with additionalProperties: false for LLM compatibility\n const schema = z\n .object({\n command: z.enum(commandNames).describe(commandDescription),\n ...allParameters,\n })\n .strict(); // .strict() adds additionalProperties: false\n\n return schema;\n}\n\nfunction paramTypeToZod(type: DevToolsPluginCommandParameter['type'], z: typeof Zod) {\n switch (type) {\n case 'number':\n return z.number();\n case 'confirm':\n return z.boolean();\n case 'text':\n return z.string();\n }\n}\n"],"names":["createMCPDevToolsExtensionSchema","plugin","z","cliExtensions","commands","length","Error","packageName","commandDescriptions","map","c","params","parameters","p","name","join","title","commandNames","parameterCommandMap","parameterDescriptions","parameterTypes","command","param","description","type","push","allParameters","paramName","commandList","Object","entries","baseDescription","commandsUsingParam","fullDescription","paramTypeToZod","optional","describe","hasParameters","keys","commandDescription","schema","object","enum","strict","number","boolean","string"],"mappings":";;;;+BAuCgBA;;;eAAAA;;;AAAT,SAASA,iCAAiCC,MAA0B,EAAEC,CAAa;QACpDD;IAApC,IAAIA,OAAOE,aAAa,IAAI,QAAQF,EAAAA,wBAAAA,OAAOE,aAAa,qBAApBF,sBAAsBG,QAAQ,CAACC,MAAM,MAAK,GAAG;QAC/E,MAAM,IAAIC,MACR,CAAC,OAAO,EAAEL,OAAOM,WAAW,CAAC,6DAA6D,CAAC;IAE/F;IAEA,MAAMH,WAAWH,OAAOE,aAAa,CAACC,QAAQ;IAE9C,yEAAyE;IACzE,MAAMI,sBAAsBJ,SACzBK,GAAG,CAAC,CAACC;YACWA;QAAf,MAAMC,UAASD,gBAAAA,EAAEE,UAAU,qBAAZF,cAAcD,GAAG,CAAC,CAACI,IAAMA,EAAEC,IAAI,EAAEC,IAAI,CAAC;QACrD,OAAOJ,SAAS,CAAC,CAAC,EAAED,EAAEI,IAAI,CAAC,GAAG,EAAEJ,EAAEM,KAAK,CAAC,UAAU,EAAEL,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAED,EAAEI,IAAI,CAAC,GAAG,EAAEJ,EAAEM,KAAK,EAAE;IAC3F,GACCD,IAAI,CAAC;IAER,uDAAuD;IACvD,MAAME,eAAeb,SAASK,GAAG,CAAC,CAACC,IAAMA,EAAEI,IAA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AerB,MAAM,GAAG;IAC1D,MAAMkC,qBAAqBF,gBACvB,CAAC,4FAA4F,CAAC,GAC9F,CAAC,4GAA4G,CAAC,GAC9G,CAAC,UAAU,EAAE7B,oBAAoB,CAAC,CAAC,GACnC,CAAC,iFAAiF,CAAC,GACnF,CAAC,UAAU,EAAEA,oBAAoB,CAAC,CAAC;IAEvC,+EAA+E;IAC/E,MAAMgC,SAAStC,EACZuC,MAAM,CAAC;QACNpB,SAASnB,EAAEwC,IAAI,CAACzB,cAAcmB,QAAQ,CAACG;QACvC,GAAGb,aAAa;IAClB,GACCiB,MAAM,IAAI,6CAA6C;IAE1D,OAAOH;AACT;AAEA,SAASN,eAAeV,IAA4C,EAAEtB,CAAa;IACjF,OAAQsB;QACN,KAAK;YACH,OAAOtB,EAAE0C,MAAM;QACjB,KAAK;YACH,OAAO1C,EAAE2C,OAAO;QAClB,KAAK;YACH,OAAO3C,EAAE4C,MAAM;IACnB;AACF"}
@@ -910,7 +910,7 @@ class MetroBundlerDevServer extends _BundlerDevServer.BundlerDevServer {
910
910
  };
911
911
  this.instanceMetroOptions = instanceMetroOptions;
912
912
  const parsedOptions = {
913
- host: options.location.hostType === 'localhost' ? 'localhost' : undefined,
913
+ host: options.location.hostType === 'localhost' ? '127.0.0.1' : undefined,
914
914
  port: options.port,
915
915
  maxWorkers: options.maxWorkers,
916
916
  resetCache: options.resetDevServer
@@ -959,9 +959,7 @@ class MetroBundlerDevServer extends _BundlerDevServer.BundlerDevServer {
959
959
  return (_this_urlCreator = this.urlCreator) == null ? void 0 : _this_urlCreator.constructDevClientUrl();
960
960
  } else {
961
961
  var _this_urlCreator1;
962
- return (_this_urlCreator1 = this.urlCreator) == null ? void 0 : _this_urlCreator1.constructUrl({
963
- scheme: 'exp'
964
- });
962
+ return (_this_urlCreator1 = this.urlCreator) == null ? void 0 : _this_urlCreator1.constructExpoGoUrl();
965
963
  }
966
964
  }
967
965
  });