@expo/cli 0.16.8 → 0.17.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.
Files changed (52) hide show
  1. package/build/bin/cli +4 -3
  2. package/build/bin/cli.map +1 -1
  3. package/build/src/customize/customizeAsync.js +2 -1
  4. package/build/src/customize/customizeAsync.js.map +1 -1
  5. package/build/src/customize/typescript.js +1 -1
  6. package/build/src/customize/typescript.js.map +1 -1
  7. package/build/src/export/resolveOptions.js +7 -5
  8. package/build/src/export/resolveOptions.js.map +1 -1
  9. package/build/src/export/web/exportWebAsync.js +1 -1
  10. package/build/src/export/web/exportWebAsync.js.map +1 -1
  11. package/build/src/export/web/index.js +1 -1
  12. package/build/src/export/web/index.js.map +1 -1
  13. package/build/src/install/installAsync.js +1 -5
  14. package/build/src/install/installAsync.js.map +1 -1
  15. package/build/src/prebuild/configureProjectAsync.js +7 -1
  16. package/build/src/prebuild/configureProjectAsync.js.map +1 -1
  17. package/build/src/prebuild/prebuildAsync.js +3 -2
  18. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  19. package/build/src/prebuild/resolveTemplate.js +41 -48
  20. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  21. package/build/src/prebuild/updateFromTemplate.js +9 -8
  22. package/build/src/prebuild/updateFromTemplate.js.map +1 -1
  23. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +4 -12
  24. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  25. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +6 -1
  26. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
  27. package/build/src/start/server/DevServerManager.js +2 -2
  28. package/build/src/start/server/DevServerManager.js.map +1 -1
  29. package/build/src/start/server/metro/createServerRouteMiddleware.js +12 -7
  30. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  31. package/build/src/start/server/metro/instantiateMetro.js +5 -7
  32. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  33. package/build/src/start/server/metro/withMetroMultiPlatform.js +7 -4
  34. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  35. package/build/src/start/server/middleware/CorsMiddleware.js +55 -0
  36. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -0
  37. package/build/src/start/server/middleware/ManifestMiddleware.js +5 -5
  38. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  39. package/build/src/start/server/platformBundlers.js +18 -5
  40. package/build/src/start/server/platformBundlers.js.map +1 -1
  41. package/build/src/start/startAsync.js +1 -1
  42. package/build/src/start/startAsync.js.map +1 -1
  43. package/build/src/utils/analytics/rudderstackClient.js +2 -2
  44. package/build/src/utils/npm.js +12 -4
  45. package/build/src/utils/npm.js.map +1 -1
  46. package/build/src/utils/resolveArgs.js +8 -2
  47. package/build/src/utils/resolveArgs.js.map +1 -1
  48. package/package.json +3 -3
  49. package/build/src/start/server/middleware/remoteDevtoolsCorsMiddleware.js +0 -31
  50. package/build/src/start/server/middleware/remoteDevtoolsCorsMiddleware.js.map +0 -1
  51. package/build/src/start/server/middleware/remoteDevtoolsSecurityHeadersMiddleware.js +0 -17
  52. package/build/src/start/server/middleware/remoteDevtoolsSecurityHeadersMiddleware.js.map +0 -1
package/build/bin/cli CHANGED
@@ -137,7 +137,7 @@ const args = (0, _arg).default({
137
137
  });
138
138
  if (args["--version"]) {
139
139
  // Version is added in the build script.
140
- console.log("0.16.8");
140
+ console.log("0.17.0");
141
141
  process.exit(0);
142
142
  }
143
143
  if (args["--non-interactive"]) {
@@ -150,7 +150,8 @@ if (!isSubcommand && args["--help"]) {
150
150
  const { login , logout , whoami , register , start , install , add , export: _export , config , customize , prebuild , "run:ios": runIos , "run:android": runAndroid , // NOTE(EvanBacon): Don't document this command as it's a temporary
151
151
  // workaround until we can use `expo export` for all production bundling.
152
152
  // https://github.com/expo/expo/pull/21396/files#r1121025873
153
- "export:embed": exportEmbed_unused , // Other ignored commands, these are intentially not listed in the `--help` output
153
+ "export:embed": exportEmbed_unused , // The export:web command is deprecated. Hide it from the help prompt.
154
+ "export:web": exportWeb_unused , // Other ignored commands, these are intentially not listed in the `--help` output
154
155
  run: _run , // All other commands
155
156
  ...others } = commands;
156
157
  console.log(_chalk.default`
@@ -271,7 +272,7 @@ commands[command]().then((exec)=>{
271
272
  logEventAsync("action", {
272
273
  action: `expo ${command}`,
273
274
  source: "expo/cli",
274
- source_version: "0.16.8"
275
+ source_version: "0.17.0"
275
276
  });
276
277
  }
277
278
  });
package/build/bin/cli.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport Debug from 'debug';\nimport { boolish } from 'getenv';\n\n// Setup before requiring `debug`.\nif (boolish('EXPO_DEBUG', false)) {\n Debug.enable('expo:*');\n} else if (Debug.enabled('expo:')) {\n process.env.EXPO_DEBUG = '1';\n}\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n // NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.\n run: () => import('../src/run/index.js').then((i) => i.expoRun),\n 'run:ios': () => import('../src/run/ios/index.js').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android/index.js').then((i) => i.expoRunAndroid),\n start: () => import('../src/start/index.js').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild/index.js').then((i) => i.expoPrebuild),\n config: () => import('../src/config/index.js').then((i) => i.expoConfig),\n export: () => import('../src/export/index.js').then((i) => i.expoExport),\n 'export:web': () => import('../src/export/web/index.js').then((i) => i.expoExportWeb),\n 'export:embed': () => import('../src/export/embed/index.js').then((i) => i.expoExportEmbed),\n\n // Auxiliary commands\n install: () => import('../src/install/index.js').then((i) => i.expoInstall),\n add: () => import('../src/install/index.js').then((i) => i.expoInstall),\n customize: () => import('../src/customize/index.js').then((i) => i.expoCustomize),\n\n // Auth\n login: () => import('../src/login/index.js').then((i) => i.expoLogin),\n logout: () => import('../src/logout/index.js').then((i) => i.expoLogout),\n register: () => import('../src/register/index.js').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami/index.js').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n // NOTE(EvanBacon): This is here to silence warnings from processes that\n // expect the global expo-cli.\n '--non-interactive': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\nif (args['--non-interactive']) {\n console.warn(chalk.yellow` {bold --non-interactive} is not supported, use {bold $CI=1} instead`);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n add,\n export: _export,\n config,\n customize,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n // NOTE(EvanBacon): Don't document this command as it's a temporary\n // workaround until we can use `expo export` for all production bundling.\n // https://github.com/expo/expo/pull/21396/files#r1121025873\n 'export:embed': exportEmbed_unused,\n // Other ignored commands, these are intentially not listed in the `--help` output\n run: _run,\n // All other commands\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, export: _export, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n ${Object.keys({ install, customize, config }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n\n process.exit(0);\n}\n\n// NOTE(EvanBacon): Squat some directory names to help with migration,\n// users can still use folders named \"send\" or \"eject\" by using the fully qualified `npx expo start ./send`.\nif (!isSubcommand) {\n const migrationMap: Record<string, string> = {\n init: 'npx create-expo-app',\n eject: 'npx expo prebuild',\n web: 'npx expo start --web',\n 'start:web': 'npx expo start --web',\n 'build:ios': 'eas build -p ios',\n 'build:android': 'eas build -p android',\n 'client:install:ios': 'npx expo start --ios',\n 'client:install:android': 'npx expo start --android',\n doctor: 'npx expo-doctor',\n upgrade: 'https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/',\n 'customize:web': 'npx expo customize',\n\n publish: 'eas update',\n 'publish:set': 'eas update',\n 'publish:rollback': 'eas update',\n 'publish:history': 'eas update',\n 'publish:details': 'eas update',\n\n 'build:web': 'npx expo export:web',\n\n 'credentials:manager': `eas credentials`,\n 'fetch:ios:certs': `eas credentials`,\n 'fetch:android:keystore': `eas credentials`,\n 'fetch:android:hashes': `eas credentials`,\n 'fetch:android:upload-cert': `eas credentials`,\n 'push:android:upload': `eas credentials`,\n 'push:android:show': `eas credentials`,\n 'push:android:clear': `eas credentials`,\n url: `eas build:list`,\n 'url:ipa': `eas build:list`,\n 'url:apk': `eas build:list`,\n webhooks: `eas webhook`,\n 'webhooks:add': `eas webhook:create`,\n 'webhooks:remove': `eas webhook:delete`,\n 'webhooks:update': `eas webhook:update`,\n\n 'build:status': `eas build:list`,\n 'upload:android': `eas submit -p android`,\n 'upload:ios': `eas submit -p ios`,\n };\n\n // TODO: Log telemetry about invalid command used.\n const subcommand = args._[0];\n if (subcommand in migrationMap) {\n const replacement = migrationMap[subcommand];\n console.log();\n const instruction = subcommand === 'upgrade' ? 'follow this guide' : 'use'\n console.log(\n chalk.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please ${instruction} {bold ${replacement}} instead`\n );\n console.log();\n process.exit(1);\n }\n const deprecated = ['send', 'client:ios'];\n if (deprecated.includes(subcommand)) {\n console.log();\n console.log(chalk.yellow` {gray $} {bold expo ${subcommand}} is deprecated`);\n console.log();\n process.exit(1);\n }\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => {\n exec(commandArgs);\n\n if (!boolish('EXPO_NO_TELEMETRY', false)) {\n // NOTE(EvanBacon): Track some basic telemetry events indicating the command\n // that was run. This can be disabled with the $EXPO_NO_TELEMETRY environment variable.\n // We do this to determine how well deprecations are going before removing a command.\n const { logEventAsync } =\n require('../src/utils/analytics/rudderstackClient') as typeof import('../src/utils/analytics/rudderstackClient');\n logEventAsync('action', {\n action: `expo ${command}`,\n source: 'expo/cli',\n source_version: process.env.__EXPO_VERSION,\n });\n }\n});\n"],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","defaultCmd","commands","run","then","i","expoRun","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","expoExportWeb","expoExportEmbed","install","expoInstall","add","customize","expoCustomize","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","__EXPO_VERSION","exit","warn","chalk","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","_run","others","Object","keys","join","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","instruction","deprecated","includes","command","commandArgs","slice","push","on","exec","logEventAsync","require","action","source","source_version"],"mappings":"AAAA;;AACgB,IAAA,IAAK,kCAAL,KAAK,EAAA;AACH,IAAA,MAAO,kCAAP,OAAO,EAAA;AACP,IAAA,MAAO,kCAAP,OAAO,EAAA;AACD,IAAA,OAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,kCAAkC;AAClC,IAAIA,CAAAA,GAAAA,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F,MAAM,EAAEgF,aAAa,CAAA,EAAE,GACrBC,OAAO,CAAC,0CAA0C,CAAC,AAA6D,AAAC;QACnHD,aAAa,CAAC,QAAQ,EAAE;YACtBE,MAAM,EAAE,CAAC,KAAK,EAAER,OAAO,CAAC,CAAC;YACzBS,MAAM,EAAE,UAAU;YAClBC,cAAc,EAAEhF,OAAO,CAACC,GAAG,CAACuC,cAAc;SAC3C,CAAC,CAAC;KACJ;CACF,CAAC,CAAC"}
1
+ {"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport Debug from 'debug';\nimport { boolish } from 'getenv';\n\n// Setup before requiring `debug`.\nif (boolish('EXPO_DEBUG', false)) {\n Debug.enable('expo:*');\n} else if (Debug.enabled('expo:')) {\n process.env.EXPO_DEBUG = '1';\n}\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n // NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.\n run: () => import('../src/run/index.js').then((i) => i.expoRun),\n 'run:ios': () => import('../src/run/ios/index.js').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android/index.js').then((i) => i.expoRunAndroid),\n start: () => import('../src/start/index.js').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild/index.js').then((i) => i.expoPrebuild),\n config: () => import('../src/config/index.js').then((i) => i.expoConfig),\n export: () => import('../src/export/index.js').then((i) => i.expoExport),\n 'export:web': () => import('../src/export/web/index.js').then((i) => i.expoExportWeb),\n 'export:embed': () => import('../src/export/embed/index.js').then((i) => i.expoExportEmbed),\n\n // Auxiliary commands\n install: () => import('../src/install/index.js').then((i) => i.expoInstall),\n add: () => import('../src/install/index.js').then((i) => i.expoInstall),\n customize: () => import('../src/customize/index.js').then((i) => i.expoCustomize),\n\n // Auth\n login: () => import('../src/login/index.js').then((i) => i.expoLogin),\n logout: () => import('../src/logout/index.js').then((i) => i.expoLogout),\n register: () => import('../src/register/index.js').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami/index.js').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n // NOTE(EvanBacon): This is here to silence warnings from processes that\n // expect the global expo-cli.\n '--non-interactive': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\nif (args['--non-interactive']) {\n console.warn(chalk.yellow` {bold --non-interactive} is not supported, use {bold $CI=1} instead`);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n add,\n export: _export,\n config,\n customize,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n // NOTE(EvanBacon): Don't document this command as it's a temporary\n // workaround until we can use `expo export` for all production bundling.\n // https://github.com/expo/expo/pull/21396/files#r1121025873\n 'export:embed': exportEmbed_unused,\n // The export:web command is deprecated. Hide it from the help prompt.\n 'export:web': exportWeb_unused,\n // Other ignored commands, these are intentially not listed in the `--help` output\n run: _run,\n // All other commands\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, export: _export, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n ${Object.keys({ install, customize, config }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n\n process.exit(0);\n}\n\n// NOTE(EvanBacon): Squat some directory names to help with migration,\n// users can still use folders named \"send\" or \"eject\" by using the fully qualified `npx expo start ./send`.\nif (!isSubcommand) {\n const migrationMap: Record<string, string> = {\n init: 'npx create-expo-app',\n eject: 'npx expo prebuild',\n web: 'npx expo start --web',\n 'start:web': 'npx expo start --web',\n 'build:ios': 'eas build -p ios',\n 'build:android': 'eas build -p android',\n 'client:install:ios': 'npx expo start --ios',\n 'client:install:android': 'npx expo start --android',\n doctor: 'npx expo-doctor',\n upgrade: 'https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/',\n 'customize:web': 'npx expo customize',\n\n publish: 'eas update',\n 'publish:set': 'eas update',\n 'publish:rollback': 'eas update',\n 'publish:history': 'eas update',\n 'publish:details': 'eas update',\n\n 'build:web': 'npx expo export:web',\n\n 'credentials:manager': `eas credentials`,\n 'fetch:ios:certs': `eas credentials`,\n 'fetch:android:keystore': `eas credentials`,\n 'fetch:android:hashes': `eas credentials`,\n 'fetch:android:upload-cert': `eas credentials`,\n 'push:android:upload': `eas credentials`,\n 'push:android:show': `eas credentials`,\n 'push:android:clear': `eas credentials`,\n url: `eas build:list`,\n 'url:ipa': `eas build:list`,\n 'url:apk': `eas build:list`,\n webhooks: `eas webhook`,\n 'webhooks:add': `eas webhook:create`,\n 'webhooks:remove': `eas webhook:delete`,\n 'webhooks:update': `eas webhook:update`,\n\n 'build:status': `eas build:list`,\n 'upload:android': `eas submit -p android`,\n 'upload:ios': `eas submit -p ios`,\n };\n\n // TODO: Log telemetry about invalid command used.\n const subcommand = args._[0];\n if (subcommand in migrationMap) {\n const replacement = migrationMap[subcommand];\n console.log();\n const instruction = subcommand === 'upgrade' ? 'follow this guide' : 'use'\n console.log(\n chalk.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please ${instruction} {bold ${replacement}} instead`\n );\n console.log();\n process.exit(1);\n }\n const deprecated = ['send', 'client:ios'];\n if (deprecated.includes(subcommand)) {\n console.log();\n console.log(chalk.yellow` {gray $} {bold expo ${subcommand}} is deprecated`);\n console.log();\n process.exit(1);\n }\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => {\n exec(commandArgs);\n\n if (!boolish('EXPO_NO_TELEMETRY', false)) {\n // NOTE(EvanBacon): Track some basic telemetry events indicating the command\n // that was run. This can be disabled with the $EXPO_NO_TELEMETRY environment variable.\n // We do this to determine how well deprecations are going before removing a command.\n const { logEventAsync } =\n require('../src/utils/analytics/rudderstackClient') as typeof import('../src/utils/analytics/rudderstackClient');\n logEventAsync('action', {\n action: `expo ${command}`,\n source: 'expo/cli',\n source_version: process.env.__EXPO_VERSION,\n });\n }\n});\n"],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","defaultCmd","commands","run","then","i","expoRun","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","expoExportWeb","expoExportEmbed","install","expoInstall","add","customize","expoCustomize","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","__EXPO_VERSION","exit","warn","chalk","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","exportWeb_unused","_run","others","Object","keys","join","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","instruction","deprecated","includes","command","commandArgs","slice","push","on","exec","logEventAsync","require","action","source","source_version"],"mappings":"AAAA;;AACgB,IAAA,IAAK,kCAAL,KAAK,EAAA;AACH,IAAA,MAAO,kCAAP,OAAO,EAAA;AACP,IAAA,MAAO,kCAAP,OAAO,EAAA;AACD,IAAA,OAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,kCAAkC;AAClC,IAAIA,CAAAA,GAAAA,OAAO,AAAq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AA4E;QAC5E,uFAAuF;QACvF,qFAAqF;QACrF,MAAM,EAAEiF,aAAa,CAAA,EAAE,GACrBC,OAAO,CAAC,0CAA0C,CAAC,AAA6D,AAAC;QACnHD,aAAa,CAAC,QAAQ,EAAE;YACtBE,MAAM,EAAE,CAAC,KAAK,EAAER,OAAO,CAAC,CAAC;YACzBS,MAAM,EAAE,UAAU;YAClBC,cAAc,EAAEjF,OAAO,CAACC,GAAG,CAACuC,cAAc;SAC3C,CAAC,CAAC;KACJ;CACF,CAAC,CAAC"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  exports.customizeAsync = customizeAsync;
6
6
  var _config = require("@expo/config");
7
7
  var _generate = require("./generate");
8
+ var _platformBundlers = require("../start/server/platformBundlers");
8
9
  var _findUp = require("../utils/findUp");
9
10
  var _nodeEnv = require("../utils/nodeEnv");
10
11
  async function customizeAsync(files, options, extras) {
@@ -23,7 +24,7 @@ async function customizeAsync(files, options, extras) {
23
24
  // Create the destination resolution props which are used in both
24
25
  // the query and select functions.
25
26
  const props = {
26
- webStaticPath: (ref1 = (ref = exp.web) == null ? void 0 : ref.staticPath) != null ? ref1 : "web"
27
+ webStaticPath: ((ref1 = (ref = exp.web) == null ? void 0 : ref.staticPath) != null ? ref1 : (0, _platformBundlers).getPlatformBundlers(projectRoot, exp).web === "webpack") ? "web" : "public"
27
28
  };
28
29
  // If the user provided files, we'll generate them without prompting.
29
30
  if (files.length) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/customize/customizeAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { queryAndGenerateAsync, selectAndGenerateAsync } from './generate';\nimport { Options } from './resolveOptions';\nimport { DestinationResolutionProps } from './templates';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { setNodeEnv } from '../utils/nodeEnv';\n\nexport async function customizeAsync(files: string[], options: Options, extras: any[]) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo customize` from a subdirectory of the project.\n const projectRoot = findUpProjectRootOrAssert(process.cwd());\n\n require('@expo/env').load(projectRoot);\n\n // Get the static path (defaults to 'web/')\n // Doesn't matter if expo is installed or which mode is used.\n const { exp } = getConfig(projectRoot, {\n skipSDKVersionRequirement: true,\n });\n\n // Create the destination resolution props which are used in both\n // the query and select functions.\n const props: DestinationResolutionProps = {\n webStaticPath: exp.web?.staticPath ?? 'web',\n };\n\n // If the user provided files, we'll generate them without prompting.\n if (files.length) {\n return queryAndGenerateAsync(projectRoot, {\n files,\n props,\n extras,\n });\n }\n\n // Otherwise, we'll prompt the user to select which files to generate.\n await selectAndGenerateAsync(projectRoot, {\n props,\n extras,\n });\n}\n"],"names":["customizeAsync","files","options","extras","exp","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","getConfig","skipSDKVersionRequirement","props","webStaticPath","web","staticPath","length","queryAndGenerateAsync","selectAndGenerateAsync"],"mappings":"AAAA;;;;QAQsBA,cAAc,GAAdA,cAAc;AARV,IAAA,OAAc,WAAd,cAAc,CAAA;AAEsB,IAAA,SAAY,WAAZ,YAAY,CAAA;AAGhC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAChC,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AAEtC,eAAeA,cAAc,CAACC,KAAe,EAAEC,OAAgB,EAAEC,MAAa,EAAE;QAiBpEC,GAAO;IAhBxBC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1B,0EAA0E;IAC1E,qFAAqF;IACrF,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,OAAyB,AAAe,CAAA,0BAAf,CAACC,OAAO,CAACC,GAAG,EAAE,CAAC,AAAC;IAE7DC,OAAO,CAAC,WAAW,CAAC,CAACC,IAAI,CAACL,WAAW,CAAC,CAAC;IAEvC,2CAA2C;IAC3C,6DAA6D;IAC7D,MAAM,EAAEF,GAAG,CAAA,EAAE,GAAGQ,CAAAA,GAAAA,OAAS,AAEvB,CAAA,UAFuB,CAACN,WAAW,EAAE;QACrCO,yBAAyB,EAAE,IAAI;KAChC,CAAC,AAAC;QAKcT,IAAmB;IAHpC,iEAAiE;IACjE,kCAAkC;IAClC,MAAMU,KAAK,GAA+B;QACxCC,aAAa,EAAEX,CAAAA,IAAmB,GAAnBA,CAAAA,GAAO,GAAPA,GAAG,CAACY,GAAG,SAAY,GAAnBZ,KAAAA,CAAmB,GAAnBA,GAAO,CAAEa,UAAU,YAAnBb,IAAmB,GAAI,KAAK;KAC5C,AAAC;IAEF,qEAAqE;IACrE,IAAIH,KAAK,CAACiB,MAAM,EAAE;QAChB,OAAOC,CAAAA,GAAAA,SAAqB,AAI1B,CAAA,sBAJ0B,CAACb,WAAW,EAAE;YACxCL,KAAK;YACLa,KAAK;YACLX,MAAM;SACP,CAAC,CAAC;KACJ;IAED,sEAAsE;IACtE,MAAMiB,CAAAA,GAAAA,SAAsB,AAG1B,CAAA,uBAH0B,CAACd,WAAW,EAAE;QACxCQ,KAAK;QACLX,MAAM;KACP,CAAC,CAAC;CACJ"}
1
+ {"version":3,"sources":["../../../src/customize/customizeAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { queryAndGenerateAsync, selectAndGenerateAsync } from './generate';\nimport { Options } from './resolveOptions';\nimport { DestinationResolutionProps } from './templates';\nimport { getPlatformBundlers } from '../start/server/platformBundlers';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { setNodeEnv } from '../utils/nodeEnv';\n\nexport async function customizeAsync(files: string[], options: Options, extras: any[]) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo customize` from a subdirectory of the project.\n const projectRoot = findUpProjectRootOrAssert(process.cwd());\n\n require('@expo/env').load(projectRoot);\n\n // Get the static path (defaults to 'web/')\n // Doesn't matter if expo is installed or which mode is used.\n const { exp } = getConfig(projectRoot, {\n skipSDKVersionRequirement: true,\n });\n\n // Create the destination resolution props which are used in both\n // the query and select functions.\n const props: DestinationResolutionProps = {\n webStaticPath:\n exp.web?.staticPath ?? getPlatformBundlers(projectRoot, exp).web === 'webpack'\n ? 'web'\n : 'public',\n };\n\n // If the user provided files, we'll generate them without prompting.\n if (files.length) {\n return queryAndGenerateAsync(projectRoot, {\n files,\n props,\n extras,\n });\n }\n\n // Otherwise, we'll prompt the user to select which files to generate.\n await selectAndGenerateAsync(projectRoot, {\n props,\n extras,\n });\n}\n"],"names":["customizeAsync","files","options","extras","exp","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","getConfig","skipSDKVersionRequirement","props","webStaticPath","web","staticPath","getPlatformBundlers","length","queryAndGenerateAsync","selectAndGenerateAsync"],"mappings":"AAAA;;;;QASsBA,cAAc,GAAdA,cAAc;AATV,IAAA,OAAc,WAAd,cAAc,CAAA;AAEsB,IAAA,SAAY,WAAZ,YAAY,CAAA;AAGtC,IAAA,iBAAkC,WAAlC,kCAAkC,CAAA;AAC5B,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAChC,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AAEtC,eAAeA,cAAc,CAACC,KAAe,EAAEC,OAAgB,EAAEC,MAAa,EAAE;QAkBjFC,GAAO;IAjBXC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1B,0EAA0E;IAC1E,qFAAqF;IACrF,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,OAAyB,AAAe,CAAA,0BAAf,CAACC,OAAO,CAACC,GAAG,EAAE,CAAC,AAAC;IAE7DC,OAAO,CAAC,WAAW,CAAC,CAACC,IAAI,CAACL,WAAW,CAAC,CAAC;IAEvC,2CAA2C;IAC3C,6DAA6D;IAC7D,MAAM,EAAEF,GAAG,CAAA,EAAE,GAAGQ,CAAAA,GAAAA,OAAS,AAEvB,CAAA,UAFuB,CAACN,WAAW,EAAE;QACrCO,yBAAyB,EAAE,IAAI;KAChC,CAAC,AAAC;QAMCT,IAAmB;IAJvB,iEAAiE;IACjE,kCAAkC;IAClC,MAAMU,KAAK,GAA+B;QACxCC,aAAa,EACXX,CAAAA,CAAAA,IAAmB,GAAnBA,CAAAA,GAAO,GAAPA,GAAG,CAACY,GAAG,SAAY,GAAnBZ,KAAAA,CAAmB,GAAnBA,GAAO,CAAEa,UAAU,YAAnBb,IAAmB,GAAIc,CAAAA,GAAAA,iBAAmB,AAAkB,CAAA,oBAAlB,CAACZ,WAAW,EAAEF,GAAG,CAAC,CAACY,GAAG,KAAK,SAAS,CAAA,GAC1E,KAAK,GACL,QAAQ;KACf,AAAC;IAEF,qEAAqE;IACrE,IAAIf,KAAK,CAACkB,MAAM,EAAE;QAChB,OAAOC,CAAAA,GAAAA,SAAqB,AAI1B,CAAA,sBAJ0B,CAACd,WAAW,EAAE;YACxCL,KAAK;YACLa,KAAK;YACLX,MAAM;SACP,CAAC,CAAC;KACJ;IAED,sEAAsE;IACtE,MAAMkB,CAAAA,GAAAA,SAAsB,AAG1B,CAAA,uBAH0B,CAACf,WAAW,EAAE;QACxCQ,KAAK;QACLX,MAAM;KACP,CAAC,CAAC;CACJ"}
@@ -48,7 +48,7 @@ async function typescript(projectRoot) {
48
48
  const { exp } = (0, _config).getConfig(projectRoot, {
49
49
  skipSDKVersionRequirement: true
50
50
  });
51
- await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(exp), {
51
+ await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(projectRoot, exp), {
52
52
  isDevClient: true
53
53
  }).startTypeScriptServices();
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/customize/typescript.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { Log } from '../log';\n\nexport async function typescript(projectRoot: string) {\n const { TypeScriptProjectPrerequisite } = await import(\n '../start/doctor/typescript/TypeScriptProjectPrerequisite.js'\n );\n const { MetroBundlerDevServer } = await import('../start/server/metro/MetroBundlerDevServer.js');\n const { getPlatformBundlers } = await import('../start/server/platformBundlers.js');\n\n try {\n await new TypeScriptProjectPrerequisite(projectRoot).bootstrapAsync();\n } catch (error: any) {\n // Ensure the process doesn't fail if the TypeScript check fails.\n // This could happen during the install.\n Log.log();\n Log.exception(error);\n return;\n }\n\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(exp), {\n isDevClient: true,\n }).startTypeScriptServices();\n}\n"],"names":["typescript","projectRoot","TypeScriptProjectPrerequisite","MetroBundlerDevServer","getPlatformBundlers","bootstrapAsync","error","Log","log","exception","exp","getConfig","skipSDKVersionRequirement","isDevClient","startTypeScriptServices"],"mappings":"AAAA;;;;QAIsBA,UAAU,GAAVA,UAAU;AAJN,IAAA,OAAc,WAAd,cAAc,CAAA;AAEpB,IAAA,IAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;AAErB,eAAeA,UAAU,CAACC,WAAmB,EAAE;IACpD,MAAM,EAAEC,6BAA6B,CAAA,EAAE,GAAG,MAAM;+CAC9C,6DAA6D;MAC9D,AAAC;IACF,MAAM,EAAEC,qBAAqB,CAAA,EAAE,GAAG,MAAM;+CAAO,gDAAgD;MAAC,AAAC;IACjG,MAAM,EAAEC,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qCAAqC;MAAC,AAAC;IAEpF,IAAI;QACF,MAAM,IAAIF,6BAA6B,CAACD,WAAW,CAAC,CAACI,cAAc,EAAE,CAAC;KACvE,CAAC,OAAOC,KAAK,EAAO;QACnB,iEAAiE;QACjE,wCAAwC;QACxCC,IAAG,IAAA,CAACC,GAAG,EAAE,CAAC;QACVD,IAAG,IAAA,CAACE,SAAS,CAACH,KAAK,CAAC,CAAC;QACrB,OAAO;KACR;IAED,MAAM,EAAEI,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAkD,CAAA,UAAlD,CAACV,WAAW,EAAE;QAAEW,yBAAyB,EAAE,IAAI;KAAE,CAAC,AAAC;IAC5E,MAAM,IAAIT,qBAAqB,CAACF,WAAW,EAAEG,mBAAmB,CAACM,GAAG,CAAC,EAAE;QACrEG,WAAW,EAAE,IAAI;KAClB,CAAC,CAACC,uBAAuB,EAAE,CAAC;CAC9B"}
1
+ {"version":3,"sources":["../../../src/customize/typescript.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { Log } from '../log';\n\nexport async function typescript(projectRoot: string) {\n const { TypeScriptProjectPrerequisite } = await import(\n '../start/doctor/typescript/TypeScriptProjectPrerequisite.js'\n );\n const { MetroBundlerDevServer } = await import('../start/server/metro/MetroBundlerDevServer.js');\n const { getPlatformBundlers } = await import('../start/server/platformBundlers.js');\n\n try {\n await new TypeScriptProjectPrerequisite(projectRoot).bootstrapAsync();\n } catch (error: any) {\n // Ensure the process doesn't fail if the TypeScript check fails.\n // This could happen during the install.\n Log.log();\n Log.exception(error);\n return;\n }\n\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(projectRoot, exp), {\n isDevClient: true,\n }).startTypeScriptServices();\n}\n"],"names":["typescript","projectRoot","TypeScriptProjectPrerequisite","MetroBundlerDevServer","getPlatformBundlers","bootstrapAsync","error","Log","log","exception","exp","getConfig","skipSDKVersionRequirement","isDevClient","startTypeScriptServices"],"mappings":"AAAA;;;;QAIsBA,UAAU,GAAVA,UAAU;AAJN,IAAA,OAAc,WAAd,cAAc,CAAA;AAEpB,IAAA,IAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;AAErB,eAAeA,UAAU,CAACC,WAAmB,EAAE;IACpD,MAAM,EAAEC,6BAA6B,CAAA,EAAE,GAAG,MAAM;+CAC9C,6DAA6D;MAC9D,AAAC;IACF,MAAM,EAAEC,qBAAqB,CAAA,EAAE,GAAG,MAAM;+CAAO,gDAAgD;MAAC,AAAC;IACjG,MAAM,EAAEC,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qCAAqC;MAAC,AAAC;IAEpF,IAAI;QACF,MAAM,IAAIF,6BAA6B,CAACD,WAAW,CAAC,CAACI,cAAc,EAAE,CAAC;KACvE,CAAC,OAAOC,KAAK,EAAO;QACnB,iEAAiE;QACjE,wCAAwC;QACxCC,IAAG,IAAA,CAACC,GAAG,EAAE,CAAC;QACVD,IAAG,IAAA,CAACE,SAAS,CAACH,KAAK,CAAC,CAAC;QACrB,OAAO;KACR;IAED,MAAM,EAAEI,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAkD,CAAA,UAAlD,CAACV,WAAW,EAAE;QAAEW,yBAAyB,EAAE,IAAI;KAAE,CAAC,AAAC;IAC5E,MAAM,IAAIT,qBAAqB,CAACF,WAAW,EAAEG,mBAAmB,CAACH,WAAW,EAAES,GAAG,CAAC,EAAE;QAClFG,WAAW,EAAE,IAAI;KAClB,CAAC,CAACC,uBAAuB,EAAE,CAAC;CAC9B"}
@@ -7,11 +7,13 @@ exports.resolveOptionsAsync = resolveOptionsAsync;
7
7
  var _config = require("@expo/config");
8
8
  var _platformBundlers = require("../start/server/platformBundlers");
9
9
  var _errors = require("../utils/errors");
10
- function resolvePlatformOption(platformBundlers, platform1 = [
10
+ function resolvePlatformOption(exp, platformBundlers, platform1 = [
11
11
  "all"
12
12
  ]) {
13
- const platformsAvailable = Object.fromEntries(Object.entries(platformBundlers).filter(([, bundler])=>bundler === "metro"
14
- ));
13
+ const platformsAvailable = Object.fromEntries(Object.entries(platformBundlers).filter(([platform, bundler])=>{
14
+ var ref;
15
+ return bundler === "metro" && ((ref = exp.platforms) == null ? void 0 : ref.includes(platform));
16
+ }));
15
17
  if (!Object.keys(platformsAvailable).length) {
16
18
  throw new _errors.CommandError(`No platforms are configured to use the Metro bundler in the project Expo config.`);
17
19
  }
@@ -46,10 +48,10 @@ async function resolveOptionsAsync(projectRoot, args) {
46
48
  skipPlugins: true,
47
49
  skipSDKVersionRequirement: true
48
50
  });
49
- const platformBundlers = (0, _platformBundlers).getPlatformBundlers(exp);
51
+ const platformBundlers = (0, _platformBundlers).getPlatformBundlers(projectRoot, exp);
50
52
  var ref;
51
53
  return {
52
- platforms: resolvePlatformOption(platformBundlers, args["--platform"]),
54
+ platforms: resolvePlatformOption(exp, platformBundlers, args["--platform"]),
53
55
  outputDir: (ref = args["--output-dir"]) != null ? ref : "dist",
54
56
  minify: !args["--no-minify"],
55
57
  clear: !!args["--clear"],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/export/resolveOptions.ts"],"sourcesContent":["import { getConfig, Platform } from '@expo/config';\n\nimport { getPlatformBundlers, PlatformBundlers } from '../start/server/platformBundlers';\nimport { CommandError } from '../utils/errors';\n\nexport type Options = {\n outputDir: string;\n platforms: Platform[];\n maxWorkers?: number;\n dev: boolean;\n clear: boolean;\n minify: boolean;\n dumpAssetmap: boolean;\n sourceMaps: boolean;\n};\n\n/** Returns an array of platforms based on the input platform identifier and runtime constraints. */\nexport function resolvePlatformOption(\n platformBundlers: PlatformBundlers,\n platform: string[] = ['all']\n): Platform[] {\n const platformsAvailable: Partial<PlatformBundlers> = Object.fromEntries(\n Object.entries(platformBundlers).filter(([, bundler]) => bundler === 'metro')\n );\n\n if (!Object.keys(platformsAvailable).length) {\n throw new CommandError(\n `No platforms are configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n const assertPlatformBundler = (platform: Platform): Platform => {\n if (!platformsAvailable[platform]) {\n throw new CommandError(\n 'BAD_ARGS',\n `Platform \"${platform}\" is not configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n return platform;\n };\n\n const knownPlatforms = ['android', 'ios', 'web'] as Platform[];\n const assertPlatformIsKnown = (platform: string): Platform => {\n if (!knownPlatforms.includes(platform as Platform)) {\n throw new CommandError(\n `Unsupported platform \"${platform}\". Options are: ${knownPlatforms.join(',')},all`\n );\n }\n\n return platform as Platform;\n };\n\n return (\n platform\n // Expand `all` to all available platforms.\n .map((platform) => (platform === 'all' ? Object.keys(platformsAvailable) : platform))\n .flat()\n // Remove duplicated platforms\n .filter((platform, index, list) => list.indexOf(platform) === index)\n // Assert platforms are valid\n .map((platform) => assertPlatformIsKnown(platform))\n .map((platform) => assertPlatformBundler(platform))\n );\n}\n\nexport async function resolveOptionsAsync(projectRoot: string, args: any): Promise<Options> {\n const { exp } = getConfig(projectRoot, { skipPlugins: true, skipSDKVersionRequirement: true });\n const platformBundlers = getPlatformBundlers(exp);\n\n return {\n platforms: resolvePlatformOption(platformBundlers, args['--platform']),\n outputDir: args['--output-dir'] ?? 'dist',\n minify: !args['--no-minify'],\n clear: !!args['--clear'],\n dev: !!args['--dev'],\n maxWorkers: args['--max-workers'],\n dumpAssetmap: !!args['--dump-assetmap'],\n sourceMaps: !!args['--source-maps'],\n };\n}\n"],"names":["resolvePlatformOption","resolveOptionsAsync","platformBundlers","platform","platformsAvailable","Object","fromEntries","entries","filter","bundler","keys","length","CommandError","assertPlatformBundler","knownPlatforms","assertPlatformIsKnown","includes","join","map","flat","index","list","indexOf","projectRoot","args","exp","getConfig","skipPlugins","skipSDKVersionRequirement","getPlatformBundlers","platforms","outputDir","minify","clear","dev","maxWorkers","dumpAssetmap","sourceMaps"],"mappings":"AAAA;;;;QAiBgBA,qBAAqB,GAArBA,qBAAqB;QAiDfC,mBAAmB,GAAnBA,mBAAmB;AAlEL,IAAA,OAAc,WAAd,cAAc,CAAA;AAEI,IAAA,iBAAkC,WAAlC,kCAAkC,CAAA;AAC3D,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAcvC,SAASD,qBAAqB,CACnCE,gBAAkC,EAClCC,SAAkB,GAAG;IAAC,KAAK;CAAC,EAChB;IACZ,MAAMC,kBAAkB,GAA8BC,MAAM,CAACC,WAAW,CACtED,MAAM,CAACE,OAAO,CAACL,gBAAgB,CAAC,CAACM,MAAM,CAAC,CAAC,GAAGC,OAAO,CAAC,GAAKA,OAAO,KAAK,OAAO;IAAA,CAAC,CAC9E,AAAC;IAEF,IAAI,CAACJ,MAAM,CAACK,IAAI,CAACN,kB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CAAC;IAAA,CAAC,CACrD;CACH;AAEM,eAAeF,mBAAmB,CAACsB,WAAmB,EAAEC,IAAS,EAAoB;IAC1F,MAAM,EAAEC,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAqE,CAAA,UAArE,CAACH,WAAW,EAAE;QAAEI,WAAW,EAAE,IAAI;QAAEC,yBAAyB,EAAE,IAAI;KAAE,CAAC,AAAC;IAC/F,MAAM1B,gBAAgB,GAAG2B,CAAAA,GAAAA,iBAAmB,AAAK,CAAA,oBAAL,CAACJ,GAAG,CAAC,AAAC;QAIrCD,GAAoB;IAFjC,OAAO;QACLM,SAAS,EAAE9B,qBAAqB,CAACE,gBAAgB,EAAEsB,IAAI,CAAC,YAAY,CAAC,CAAC;QACtEO,SAAS,EAAEP,CAAAA,GAAoB,GAApBA,IAAI,CAAC,cAAc,CAAC,YAApBA,GAAoB,GAAI,MAAM;QACzCQ,MAAM,EAAE,CAACR,IAAI,CAAC,aAAa,CAAC;QAC5BS,KAAK,EAAE,CAAC,CAACT,IAAI,CAAC,SAAS,CAAC;QACxBU,GAAG,EAAE,CAAC,CAACV,IAAI,CAAC,OAAO,CAAC;QACpBW,UAAU,EAAEX,IAAI,CAAC,eAAe,CAAC;QACjCY,YAAY,EAAE,CAAC,CAACZ,IAAI,CAAC,iBAAiB,CAAC;QACvCa,UAAU,EAAE,CAAC,CAACb,IAAI,CAAC,eAAe,CAAC;KACpC,CAAC;CACH"}
1
+ {"version":3,"sources":["../../../src/export/resolveOptions.ts"],"sourcesContent":["import { ExpoConfig, getConfig, Platform } from '@expo/config';\n\nimport { getPlatformBundlers, PlatformBundlers } from '../start/server/platformBundlers';\nimport { CommandError } from '../utils/errors';\n\nexport type Options = {\n outputDir: string;\n platforms: Platform[];\n maxWorkers?: number;\n dev: boolean;\n clear: boolean;\n minify: boolean;\n dumpAssetmap: boolean;\n sourceMaps: boolean;\n};\n\n/** Returns an array of platforms based on the input platform identifier and runtime constraints. */\nexport function resolvePlatformOption(\n exp: ExpoConfig,\n platformBundlers: PlatformBundlers,\n platform: string[] = ['all']\n): Platform[] {\n const platformsAvailable: Partial<PlatformBundlers> = Object.fromEntries(\n Object.entries(platformBundlers).filter(\n ([platform, bundler]) => bundler === 'metro' && exp.platforms?.includes(platform as Platform)\n )\n );\n\n if (!Object.keys(platformsAvailable).length) {\n throw new CommandError(\n `No platforms are configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n const assertPlatformBundler = (platform: Platform): Platform => {\n if (!platformsAvailable[platform]) {\n throw new CommandError(\n 'BAD_ARGS',\n `Platform \"${platform}\" is not configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n return platform;\n };\n\n const knownPlatforms = ['android', 'ios', 'web'] as Platform[];\n const assertPlatformIsKnown = (platform: string): Platform => {\n if (!knownPlatforms.includes(platform as Platform)) {\n throw new CommandError(\n `Unsupported platform \"${platform}\". Options are: ${knownPlatforms.join(',')},all`\n );\n }\n\n return platform as Platform;\n };\n\n return (\n platform\n // Expand `all` to all available platforms.\n .map((platform) => (platform === 'all' ? Object.keys(platformsAvailable) : platform))\n .flat()\n // Remove duplicated platforms\n .filter((platform, index, list) => list.indexOf(platform) === index)\n // Assert platforms are valid\n .map((platform) => assertPlatformIsKnown(platform))\n .map((platform) => assertPlatformBundler(platform))\n );\n}\n\nexport async function resolveOptionsAsync(projectRoot: string, args: any): Promise<Options> {\n const { exp } = getConfig(projectRoot, { skipPlugins: true, skipSDKVersionRequirement: true });\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n\n return {\n platforms: resolvePlatformOption(exp, platformBundlers, args['--platform']),\n outputDir: args['--output-dir'] ?? 'dist',\n minify: !args['--no-minify'],\n clear: !!args['--clear'],\n dev: !!args['--dev'],\n maxWorkers: args['--max-workers'],\n dumpAssetmap: !!args['--dump-assetmap'],\n sourceMaps: !!args['--source-maps'],\n };\n}\n"],"names":["resolvePlatformOption","resolveOptionsAsync","exp","platformBundlers","platform","platformsAvailable","Object","fromEntries","entries","filter","bundler","platforms","includes","keys","length","CommandError","assertPlatformBundler","knownPlatforms","assertPlatformIsKnown","join","map","flat","index","list","indexOf","projectRoot","args","getConfig","skipPlugins","skipSDKVersionRequirement","getPlatformBundlers","outputDir","minify","clear","dev","maxWorkers","dumpAssetmap","sourceMaps"],"mappings":"AAAA;;;;QAiBgBA,qBAAqB,GAArBA,qBAAqB;QAoDfC,mBAAmB,GAAnBA,mBAAmB;AArEO,IAAA,OAAc,WAAd,cAAc,CAAA;AAER,IAAA,iBAAkC,WAAlC,kCAAkC,CAAA;AAC3D,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAcvC,SAASD,qBAAqB,CACnCE,GAAe,EACfC,gBAAkC,EAClCC,SAAkB,GAAG;IAAC,KAAK;CAAC,EAChB;IACZ,MAAMC,kBAAkB,GAA8BC,MAAM,CAACC,WAAW,CACtED,MAAM,CAACE,OAAO,CAACL,gBAAgB,CAAC,CAACM,MAAM,CACrC,CAAC,CAACL,QAAQ,EAAEM,OAAO,CAAC;YAA4BR,GAAa;QAApCQ,OAAAA,OAAO,KAAK,OAAO,KAAIR,CAAAA,GAAa,GAAbA,GAAG,CAACS,SAAS,SAAU,GAAvBT,KAAAA,CAAuB,GAAvBA,GAAa,CAAEU,QAAQ,CAACR,QAAQ,CAAa,CAAA,CAAA;KAAA,CAC9F,CACF,AAAC;IAEF,IAAI,CAACE,MAAM,CAACO,IAAI,CAACR,kBAAkB,CAAC,CAACS,MAAM,EAAE;QAC3C,MAAM,IAAIC,OAAY,aAAA,CACpB,CAAC,gFAAgF,CAAC,CACnF,CAAC;KACH;IAED,MAAMC,qBAAqB,GAAG,CAACZ,QAAkB,GAAe;QAC9D,IAAI,CAACC,kBAAkB,CAACD,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAIW,OAAY,aAAA,CACpB,UAAU,EACV,CAAC,UAAU,EAAEX,QAAQ,CAAC,wEAAwE,CAAC,CAChG,CAAC;SACH;QAED,OAAOA,QAAQ,CAAC;KACjB,AAAC;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AW,EAAEvB,GAAG,CAAC,AAAC;QAIlDwB,GAAoB;IAFjC,OAAO;QACLf,SAAS,EAAEX,qBAAqB,CAACE,GAAG,EAAEC,gBAAgB,EAAEuB,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3EK,SAAS,EAAEL,CAAAA,GAAoB,GAApBA,IAAI,CAAC,cAAc,CAAC,YAApBA,GAAoB,GAAI,MAAM;QACzCM,MAAM,EAAE,CAACN,IAAI,CAAC,aAAa,CAAC;QAC5BO,KAAK,EAAE,CAAC,CAACP,IAAI,CAAC,SAAS,CAAC;QACxBQ,GAAG,EAAE,CAAC,CAACR,IAAI,CAAC,OAAO,CAAC;QACpBS,UAAU,EAAET,IAAI,CAAC,eAAe,CAAC;QACjCU,YAAY,EAAE,CAAC,CAACV,IAAI,CAAC,iBAAiB,CAAC;QACvCW,UAAU,EAAE,CAAC,CAACX,IAAI,CAAC,eAAe,CAAC;KACpC,CAAC;CACH"}
@@ -22,7 +22,7 @@ async function exportWebAsync(projectRoot, options) {
22
22
  (0, _nodeEnv).setNodeEnv(options.dev ? "development" : "production");
23
23
  require("@expo/env").load(projectRoot);
24
24
  const { exp } = (0, _config).getConfig(projectRoot);
25
- const platformBundlers = (0, _platformBundlers).getPlatformBundlers(exp);
25
+ const platformBundlers = (0, _platformBundlers).getPlatformBundlers(projectRoot, exp);
26
26
  // Create a bundler interface
27
27
  const bundler = new _webpackBundlerDevServer.WebpackBundlerDevServer(projectRoot, platformBundlers);
28
28
  // If the user set `web.bundler: 'metro'` then they should use `expo export` instead.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/export/web/exportWebAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { Options } from './resolveOptions';\nimport { Log } from '../../log';\nimport { WebSupportProjectPrerequisite } from '../../start/doctor/web/WebSupportProjectPrerequisite';\nimport { getPlatformBundlers } from '../../start/server/platformBundlers';\nimport { WebpackBundlerDevServer } from '../../start/server/webpack/WebpackBundlerDevServer';\nimport { CommandError } from '../../utils/errors';\nimport { setNodeEnv } from '../../utils/nodeEnv';\n\nexport async function exportWebAsync(projectRoot: string, options: Options) {\n // Ensure webpack is available\n await new WebSupportProjectPrerequisite(projectRoot).assertAsync();\n\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n const { exp } = getConfig(projectRoot);\n const platformBundlers = getPlatformBundlers(exp);\n // Create a bundler interface\n const bundler = new WebpackBundlerDevServer(projectRoot, platformBundlers);\n\n // If the user set `web.bundler: 'metro'` then they should use `expo export` instead.\n if (!bundler.isTargetingWeb()) {\n throw new CommandError(\n chalk`{bold expo export:web} can only be used with Webpack. Use {bold expo export} for other bundlers.`\n );\n }\n\n Log.log(`Exporting with Webpack...`);\n\n // Bundle the app\n await bundler.bundleAsync({\n mode: options.dev ? 'development' : 'production',\n clear: options.clear,\n });\n}\n"],"names":["exportWebAsync","projectRoot","options","WebSupportProjectPrerequisite","assertAsync","setNodeEnv","dev","require","load","exp","getConfig","platformBundlers","getPlatformBundlers","bundler","WebpackBundlerDevServer","isTargetingWeb","CommandError","chalk","Log","log","bundleAsync","mode","clear"],"mappings":"AAAA;;;;QAWsBA,cAAc,GAAdA,cAAc;AAXV,IAAA,OAAc,WAAd,cAAc,CAAA;AACtB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAGL,IAAA,IAAW,WAAX,WAAW,CAAA;AACe,IAAA,8BAAsD,WAAtD,sDAAsD,CAAA;AAChE,IAAA,iBAAqC,WAArC,qCAAqC,CAAA;AACjC,IAAA,wBAAoD,WAApD,oDAAoD,CAAA;AAC/D,IAAA,OAAoB,WAApB,oBAAoB,CAAA;AACtB,IAAA,QAAqB,WAArB,qBAAqB,CAAA;;;;;;AAEzC,eAAeA,cAAc,CAACC,WAAmB,EAAEC,OAAgB,EAAE;IAC1E,8BAA8B;IAC9B,MAAM,IAAIC,8BAA6B,8BAAA,CAACF,WAAW,CAAC,CAACG,WAAW,EAAE,CAAC;IAEnEC,CAAAA,GAAAA,QAAU,AAA4C,CAAA,WAA5C,CAACH,OAAO,CAACI,GAAG,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC;IACvDC,OAAO,CAAC,WAAW,CAAC,CAACC,IAAI,CAACP,WAAW,CAAC,CAAC;IAEvC,MAAM,EAAEQ,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAa,CAAA,UAAb,CAACT,WAAW,CAAC,AAAC;IACvC,MAAMU,gBAAgB,GAAGC,CAAAA,GAAAA,iBAAmB,AAAK,CAAA,oBAAL,CAACH,GAAG,CAAC,AAAC;IAClD,6BAA6B;IAC7B,MAAMI,OAAO,GAAG,IAAIC,wBAAuB,wBAAA,CAACb,WAAW,EAAEU,gBAAgB,CAAC,AAAC;IAE3E,qFAAqF;IACrF,IAAI,CAACE,OAAO,CAACE,cAAc,EAAE,EAAE;QAC7B,MAAM,IAAIC,OAAY,aAAA,CACpBC,MAAK,QAAA,CAAC,gGAAgG,CAAC,CACxG,CAAC;KACH;IAEDC,IAAG,IAAA,CAACC,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAErC,iBAAiB;IACjB,MAAMN,OAAO,CAACO,WAAW,CAAC;QACxBC,IAAI,EAAEnB,OAAO,CAACI,GAAG,GAAG,aAAa,GAAG,YAAY;QAChDgB,KAAK,EAAEpB,OAAO,CAACoB,KAAK;KACrB,CAAC,CAAC;CACJ"}
1
+ {"version":3,"sources":["../../../../src/export/web/exportWebAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { Options } from './resolveOptions';\nimport { Log } from '../../log';\nimport { WebSupportProjectPrerequisite } from '../../start/doctor/web/WebSupportProjectPrerequisite';\nimport { getPlatformBundlers } from '../../start/server/platformBundlers';\nimport { WebpackBundlerDevServer } from '../../start/server/webpack/WebpackBundlerDevServer';\nimport { CommandError } from '../../utils/errors';\nimport { setNodeEnv } from '../../utils/nodeEnv';\n\nexport async function exportWebAsync(projectRoot: string, options: Options) {\n // Ensure webpack is available\n await new WebSupportProjectPrerequisite(projectRoot).assertAsync();\n\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n const { exp } = getConfig(projectRoot);\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n // Create a bundler interface\n const bundler = new WebpackBundlerDevServer(projectRoot, platformBundlers);\n\n // If the user set `web.bundler: 'metro'` then they should use `expo export` instead.\n if (!bundler.isTargetingWeb()) {\n throw new CommandError(\n chalk`{bold expo export:web} can only be used with Webpack. Use {bold expo export} for other bundlers.`\n );\n }\n\n Log.log(`Exporting with Webpack...`);\n\n // Bundle the app\n await bundler.bundleAsync({\n mode: options.dev ? 'development' : 'production',\n clear: options.clear,\n });\n}\n"],"names":["exportWebAsync","projectRoot","options","WebSupportProjectPrerequisite","assertAsync","setNodeEnv","dev","require","load","exp","getConfig","platformBundlers","getPlatformBundlers","bundler","WebpackBundlerDevServer","isTargetingWeb","CommandError","chalk","Log","log","bundleAsync","mode","clear"],"mappings":"AAAA;;;;QAWsBA,cAAc,GAAdA,cAAc;AAXV,IAAA,OAAc,WAAd,cAAc,CAAA;AACtB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAGL,IAAA,IAAW,WAAX,WAAW,CAAA;AACe,IAAA,8BAAsD,WAAtD,sDAAsD,CAAA;AAChE,IAAA,iBAAqC,WAArC,qCAAqC,CAAA;AACjC,IAAA,wBAAoD,WAApD,oDAAoD,CAAA;AAC/D,IAAA,OAAoB,WAApB,oBAAoB,CAAA;AACtB,IAAA,QAAqB,WAArB,qBAAqB,CAAA;;;;;;AAEzC,eAAeA,cAAc,CAACC,WAAmB,EAAEC,OAAgB,EAAE;IAC1E,8BAA8B;IAC9B,MAAM,IAAIC,8BAA6B,8BAAA,CAACF,WAAW,CAAC,CAACG,WAAW,EAAE,CAAC;IAEnEC,CAAAA,GAAAA,QAAU,AAA4C,CAAA,WAA5C,CAACH,OAAO,CAACI,GAAG,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC;IACvDC,OAAO,CAAC,WAAW,CAAC,CAACC,IAAI,CAACP,WAAW,CAAC,CAAC;IAEvC,MAAM,EAAEQ,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAa,CAAA,UAAb,CAACT,WAAW,CAAC,AAAC;IACvC,MAAMU,gBAAgB,GAAGC,CAAAA,GAAAA,iBAAmB,AAAkB,CAAA,oBAAlB,CAACX,WAAW,EAAEQ,GAAG,CAAC,AAAC;IAC/D,6BAA6B;IAC7B,MAAMI,OAAO,GAAG,IAAIC,wBAAuB,wBAAA,CAACb,WAAW,EAAEU,gBAAgB,CAAC,AAAC;IAE3E,qFAAqF;IACrF,IAAI,CAACE,OAAO,CAACE,cAAc,EAAE,EAAE;QAC7B,MAAM,IAAIC,OAAY,aAAA,CACpBC,MAAK,QAAA,CAAC,gGAAgG,CAAC,CACxG,CAAC;KACH;IAEDC,IAAG,IAAA,CAACC,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAErC,iBAAiB;IACjB,MAAMN,OAAO,CAACO,WAAW,CAAC;QACxBC,IAAI,EAAEnB,OAAO,CAACI,GAAG,GAAG,aAAa,GAAG,YAAY;QAChDgB,KAAK,EAAEpB,OAAO,CAACoB,KAAK;KACrB,CAAC,CAAC;CACJ"}
@@ -44,7 +44,7 @@ const expoExportWeb = async (argv)=>{
44
44
  "-c": "--clear"
45
45
  }, argv);
46
46
  if (args["--help"]) {
47
- (0, _args).printHelp(`Export the static files of the web app for hosting on a web server`, _chalk.default`npx expo export:web {dim <dir>}`, [
47
+ (0, _args).printHelp(`(Deprecated) Bundle the static files of the web app with Webpack for hosting on a web server`, _chalk.default`npx expo export:web {dim <dir>}`, [
48
48
  _chalk.default`<dir> Directory of the Expo project. {dim Default: Current working directory}`,
49
49
  `--dev Bundle in development mode`,
50
50
  `-c, --clear Clear the bundler cache`,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/export/web/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoExportWeb: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dev': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the web app for hosting on a web server`,\n chalk`npx expo export:web {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Bundle in development mode`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportWebAsync } = await import('./exportWebAsync.js');\n return exportWebAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExportWeb","argv","args","assertArgs","Boolean","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportWebAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5C,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,aAAa,GAAY,OAAOC,IAAI,GAAK;IACpD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAWtB,CAAA,WAXsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AASR,CAAA,UATQ,CACP,CAAC,kEAAkE,CAAC,EACpEC,MAAK,QAAA,CAAC,+BAA+B,CAAC,EACtC;YACEA,MAAK,QAAA,CAAC,qGAAqG,CAAC;YAC5G,CAAC,wDAAwD,CAAC;YAC1D,CAAC,qDAAqD,CAAC;YACvD,CAAC,wCAAwC,CAAC;SAC3C,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACP,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEQ,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IACpE,MAAMC,OAAO,GAAG,MAAMD,mBAAmB,CAACR,IAAI,CAAC,CAACU,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEnE,MAAM,EAAEC,cAAc,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IAC/D,OAAOA,cAAc,CAACN,WAAW,EAAEG,OAAO,CAAC,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAChE,AAAC;QAjCWb,aAAa,GAAbA,aAAa"}
1
+ {"version":3,"sources":["../../../../src/export/web/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoExportWeb: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dev': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `(Deprecated) Bundle the static files of the web app with Webpack for hosting on a web server`,\n chalk`npx expo export:web {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Bundle in development mode`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportWebAsync } = await import('./exportWebAsync.js');\n return exportWebAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExportWeb","argv","args","assertArgs","Boolean","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportWebAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5C,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,aAAa,GAAY,OAAOC,IAAI,GAAK;IACpD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAWtB,CAAA,WAXsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AASR,CAAA,UATQ,CACP,CAAC,4FAA4F,CAAC,EAC9FC,MAAK,QAAA,CAAC,+BAA+B,CAAC,EACtC;YACEA,MAAK,QAAA,CAAC,qGAAqG,CAAC;YAC5G,CAAC,wDAAwD,CAAC;YAC1D,CAAC,qDAAqD,CAAC;YACvD,CAAC,wCAAwC,CAAC;SAC3C,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACP,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEQ,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IACpE,MAAMC,OAAO,GAAG,MAAMD,mBAAmB,CAACR,IAAI,CAAC,CAACU,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEnE,MAAM,EAAEC,cAAc,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IAC/D,OAAOA,cAAc,CAACN,WAAW,EAAEG,OAAO,CAAC,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAChE,AAAC;QAjCWb,aAAa,GAAbA,aAAa"}
@@ -92,11 +92,7 @@ async function installAsync(packages, options, packageManagerArguments = []) {
92
92
  }
93
93
  async function installPackagesAsync(projectRoot, { packages , packageManager , sdkVersion , packageManagerArguments , fix , check }) {
94
94
  // Read the project Expo config without plugins.
95
- const { pkg: pkg1 } = (0, _config).getConfig(projectRoot, {
96
- // Sometimes users will add a plugin to the config before installing the library,
97
- // this wouldn't work unless we dangerously disable plugin serialization.
98
- skipPlugins: true
99
- });
95
+ const pkg1 = (0, _config).getPackageJson(projectRoot);
100
96
  //assertNotInstallingExcludedPackages(projectRoot, packages, pkg);
101
97
  const versioning = await (0, _getVersionedPackages).getVersionedPackagesAsync(projectRoot, {
102
98
  packages,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/install/installAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\n\nimport { applyPluginsAsync } from './applyPlugins';\nimport { checkPackagesAsync } from './checkPackages';\nimport { installExpoPackageAsync } from './installExpoPackage';\nimport { Options } from './resolveOptions';\nimport * as Log from '../log';\nimport { getVersionedPackagesAsync } from '../start/doctor/dependencies/getVersionedPackages';\nimport { CommandError } from '../utils/errors';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { learnMore } from '../utils/link';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { joinWithCommasAnd } from '../utils/strings';\n\n/**\n * Installs versions of specified packages compatible with the current Expo SDK version, or\n * checks/ fixes dependencies in project if they don't match compatible versions specified in bundledNativeModules or versions endpoints.\n *\n * @param packages list of packages to install, if installing specific packages and not checking/ fixing\n * @param options options, including check or fix\n * @param packageManagerArguments arguments to forward to the package manager invoked while installing\n * @returns Promise<void>\n */\nexport async function installAsync(\n packages: string[],\n options: Options & { projectRoot?: string },\n packageManagerArguments: string[] = []\n) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo install` from a subdirectory of the project.\n const projectRoot = options.projectRoot ?? findUpProjectRootOrAssert(process.cwd());\n require('@expo/env').load(projectRoot);\n\n // Resolve the package manager used by the project, or based on the provided arguments.\n const packageManager = PackageManager.createForProject(projectRoot, {\n npm: options.npm,\n yarn: options.yarn,\n bun: options.bun,\n pnpm: options.pnpm,\n silent: options.silent,\n log: Log.log,\n });\n\n const expoVersion = findPackageByName(packages, 'expo');\n const otherPackages = packages.filter((pkg) => pkg !== expoVersion);\n\n // Abort early when installing `expo@<version>` and other packages with `--fix/--check`\n if (packageHasVersion(expoVersion) && otherPackages.length && (options.check || options.fix)) {\n throw new CommandError(\n 'BAD_ARGS',\n `Cannot install other packages with ${expoVersion} and --fix or --check`\n );\n }\n\n // Only check/fix packages if `expo@<version>` is not requested\n if (!packageHasVersion(expoVersion) && (options.check || options.fix)) {\n return await checkPackagesAsync(projectRoot, {\n packages,\n options,\n packageManager,\n packageManagerArguments,\n });\n }\n\n // Read the project Expo config without plugins.\n const { exp } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n // Resolve the versioned packages, then install them.\n return installPackagesAsync(projectRoot, {\n ...options,\n packageManager,\n packages,\n packageManagerArguments,\n sdkVersion: exp.sdkVersion!,\n });\n}\n\n/** Version packages and install in a project. */\nexport async function installPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n fix,\n check,\n }: Options & {\n /**\n * List of packages to version, grouped by the type of dependency.\n * @example ['uuid', 'react-native-reanimated@latest']\n */\n packages: string[];\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n // Read the project Expo config without plugins.\n const { pkg } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n //assertNotInstallingExcludedPackages(projectRoot, packages, pkg);\n\n const versioning = await getVersionedPackagesAsync(projectRoot, {\n packages,\n // sdkVersion is always defined because we don't skipSDKVersionRequirement in getConfig.\n sdkVersion,\n pkg,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioning.messages.length ? versioning.messages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (versioning.excludedNativeModules.length) {\n const alreadyExcluded = versioning.excludedNativeModules.filter(\n (module) => module.isExcludedFromValidation\n );\n const specifiedExactVersion = versioning.excludedNativeModules.filter(\n (module) => !module.isExcludedFromValidation\n );\n\n if (alreadyExcluded.length) {\n Log.log(\n chalk`\\u203A Using ${joinWithCommasAnd(\n alreadyExcluded.map(\n ({ bundledNativeVersion, name, specifiedVersion }) =>\n `${specifiedVersion || 'latest'} instead of ${bundledNativeVersion} for ${name}`\n )\n )} because ${\n alreadyExcluded.length > 1 ? 'they are' : 'it is'\n } listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n\n if (specifiedExactVersion.length) {\n Log.log(\n chalk`\\u203A Using ${joinWithCommasAnd(\n specifiedExactVersion.map(\n ({ bundledNativeVersion, name, specifiedVersion }) =>\n `${specifiedVersion} instead of ${bundledNativeVersion} for ${name}`\n )\n )} because ${\n specifiedExactVersion.length > 1 ? 'these versions' : 'this version'\n } was explicitly provided. Packages excluded from dependency validation should be listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n }\n\n // `expo` needs to be installed before installing other packages\n const expoPackage = findPackageByName(packages, 'expo');\n if (expoPackage) {\n const postInstallCommand = packages.filter((pkg) => pkg !== expoPackage);\n\n // Pipe options to the next command\n if (fix) postInstallCommand.push('--fix');\n if (check) postInstallCommand.push('--check');\n\n // Abort after installing `expo`, follow up command is spawn in a new process\n return await installExpoPackageAsync(projectRoot, {\n packageManager,\n packageManagerArguments,\n expoPackageToInstall: versioning.packages.find((pkg) => pkg.startsWith('expo@'))!,\n followUpCommandArgs: postInstallCommand,\n });\n }\n\n await packageManager.addAsync([...packageManagerArguments, ...versioning.packages]);\n\n await applyPluginsAsync(projectRoot, versioning.packages);\n}\n\n/** Find a package, by name, in the requested packages list (`expo` -> `expo`/`expo@<version>`) */\nfunction findPackageByName(packages: string[], name: string) {\n return packages.find((pkg) => pkg === name || pkg.startsWith(`${name}@`));\n}\n\n/** Determine if a specific version is requested for a package */\nfunction packageHasVersion(name = '') {\n return name.includes('@');\n}\n"],"names":["installAsync","installPackagesAsync","PackageManager","Log","packages","options","packageManagerArguments","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","packageManager","createForProject","npm","yarn","bun","pnpm","silent","log","expoVersion","findPackageByName","otherPackages","filter","pkg","packageHasVersion","length","check","fix","CommandError","checkPackagesAsync","exp","getConfig","skipPlugins","sdkVersion","versioning","getVersionedPackagesAsync","chalk","messages","join","name","excludedNativeModules","alreadyExcluded","module","isExcludedFromValidation","specifiedExactVersion","joinWithCommasAnd","map","bundledNativeVersion","specifiedVersion","learnMore","expoPackage","postInstallCommand","push","installExpoPackageAsync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
+ {"version":3,"sources":["../../../src/install/installAsync.ts"],"sourcesContent":["import { getConfig, getPackageJson } from '@expo/config';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\n\nimport { applyPluginsAsync } from './applyPlugins';\nimport { checkPackagesAsync } from './checkPackages';\nimport { installExpoPackageAsync } from './installExpoPackage';\nimport { Options } from './resolveOptions';\nimport * as Log from '../log';\nimport { getVersionedPackagesAsync } from '../start/doctor/dependencies/getVersionedPackages';\nimport { CommandError } from '../utils/errors';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { learnMore } from '../utils/link';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { joinWithCommasAnd } from '../utils/strings';\n\n/**\n * Installs versions of specified packages compatible with the current Expo SDK version, or\n * checks/ fixes dependencies in project if they don't match compatible versions specified in bundledNativeModules or versions endpoints.\n *\n * @param packages list of packages to install, if installing specific packages and not checking/ fixing\n * @param options options, including check or fix\n * @param packageManagerArguments arguments to forward to the package manager invoked while installing\n * @returns Promise<void>\n */\nexport async function installAsync(\n packages: string[],\n options: Options & { projectRoot?: string },\n packageManagerArguments: string[] = []\n) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo install` from a subdirectory of the project.\n const projectRoot = options.projectRoot ?? findUpProjectRootOrAssert(process.cwd());\n require('@expo/env').load(projectRoot);\n\n // Resolve the package manager used by the project, or based on the provided arguments.\n const packageManager = PackageManager.createForProject(projectRoot, {\n npm: options.npm,\n yarn: options.yarn,\n bun: options.bun,\n pnpm: options.pnpm,\n silent: options.silent,\n log: Log.log,\n });\n\n const expoVersion = findPackageByName(packages, 'expo');\n const otherPackages = packages.filter((pkg) => pkg !== expoVersion);\n\n // Abort early when installing `expo@<version>` and other packages with `--fix/--check`\n if (packageHasVersion(expoVersion) && otherPackages.length && (options.check || options.fix)) {\n throw new CommandError(\n 'BAD_ARGS',\n `Cannot install other packages with ${expoVersion} and --fix or --check`\n );\n }\n\n // Only check/fix packages if `expo@<version>` is not requested\n if (!packageHasVersion(expoVersion) && (options.check || options.fix)) {\n return await checkPackagesAsync(projectRoot, {\n packages,\n options,\n packageManager,\n packageManagerArguments,\n });\n }\n\n // Read the project Expo config without plugins.\n const { exp } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n // Resolve the versioned packages, then install them.\n return installPackagesAsync(projectRoot, {\n ...options,\n packageManager,\n packages,\n packageManagerArguments,\n sdkVersion: exp.sdkVersion!,\n });\n}\n\n/** Version packages and install in a project. */\nexport async function installPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n fix,\n check,\n }: Options & {\n /**\n * List of packages to version, grouped by the type of dependency.\n * @example ['uuid', 'react-native-reanimated@latest']\n */\n packages: string[];\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n // Read the project Expo config without plugins.\n const pkg = getPackageJson(projectRoot);\n\n //assertNotInstallingExcludedPackages(projectRoot, packages, pkg);\n\n const versioning = await getVersionedPackagesAsync(projectRoot, {\n packages,\n // sdkVersion is always defined because we don't skipSDKVersionRequirement in getConfig.\n sdkVersion,\n pkg,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioning.messages.length ? versioning.messages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (versioning.excludedNativeModules.length) {\n const alreadyExcluded = versioning.excludedNativeModules.filter(\n (module) => module.isExcludedFromValidation\n );\n const specifiedExactVersion = versioning.excludedNativeModules.filter(\n (module) => !module.isExcludedFromValidation\n );\n\n if (alreadyExcluded.length) {\n Log.log(\n chalk`\\u203A Using ${joinWithCommasAnd(\n alreadyExcluded.map(\n ({ bundledNativeVersion, name, specifiedVersion }) =>\n `${specifiedVersion || 'latest'} instead of ${bundledNativeVersion} for ${name}`\n )\n )} because ${\n alreadyExcluded.length > 1 ? 'they are' : 'it is'\n } listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n\n if (specifiedExactVersion.length) {\n Log.log(\n chalk`\\u203A Using ${joinWithCommasAnd(\n specifiedExactVersion.map(\n ({ bundledNativeVersion, name, specifiedVersion }) =>\n `${specifiedVersion} instead of ${bundledNativeVersion} for ${name}`\n )\n )} because ${\n specifiedExactVersion.length > 1 ? 'these versions' : 'this version'\n } was explicitly provided. Packages excluded from dependency validation should be listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n }\n\n // `expo` needs to be installed before installing other packages\n const expoPackage = findPackageByName(packages, 'expo');\n if (expoPackage) {\n const postInstallCommand = packages.filter((pkg) => pkg !== expoPackage);\n\n // Pipe options to the next command\n if (fix) postInstallCommand.push('--fix');\n if (check) postInstallCommand.push('--check');\n\n // Abort after installing `expo`, follow up command is spawn in a new process\n return await installExpoPackageAsync(projectRoot, {\n packageManager,\n packageManagerArguments,\n expoPackageToInstall: versioning.packages.find((pkg) => pkg.startsWith('expo@'))!,\n followUpCommandArgs: postInstallCommand,\n });\n }\n\n await packageManager.addAsync([...packageManagerArguments, ...versioning.packages]);\n\n await applyPluginsAsync(projectRoot, versioning.packages);\n}\n\n/** Find a package, by name, in the requested packages list (`expo` -> `expo`/`expo@<version>`) */\nfunction findPackageByName(packages: string[], name: string) {\n return packages.find((pkg) => pkg === name || pkg.startsWith(`${name}@`));\n}\n\n/** Determine if a specific version is requested for a package */\nfunction packageHasVersion(name = '') {\n return name.includes('@');\n}\n"],"names":["installAsync","installPackagesAsync","PackageManager","Log","packages","options","packageManagerArguments","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","packageManager","createForProject","npm","yarn","bun","pnpm","silent","log","expoVersion","findPackageByName","otherPackages","filter","pkg","packageHasVersion","length","check","fix","CommandError","checkPackagesAsync","exp","getConfig","skipPlugins","sdkVersion","getPackageJson","versioning","getVersionedPackagesAsync","chalk","messages","join","name","excludedNativeModules","alreadyExcluded","module","isExcludedFromValidation","specifiedExactVersion","joinWithCommasAnd","map","bundledNativeVersion","specifiedVersion","learnMore","expoPackage","postInstallCommand","push","installExpoPackageAsync","expoPackageToInstall","find","startsWith","followUpCommandArgs","addAsync","applyPluginsAsync","includes"],"mappings":"AAAA;;;;QAyBsBA,YAAY,GAAZA,YAAY;QA4DZC,oBAAoB,GAApBA,oBAAoB;AArFA,IAAA,OAAc,WAAd,cAAc,CAAA;AAC5CC,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACR,IAAA,MAAO,kCAAP,OAAO,EAAA;AAES,IAAA,aAAgB,WAAhB,gBAAgB,CAAA;AACf,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AACZ,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AAElDC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AAC2B,IAAA,qBAAmD,WAAnD,mDAAmD,CAAA;AAChE,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AACJ,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AACjC,IAAA,KAAe,WAAf,eAAe,CAAA;AACd,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACX,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAW7C,eAAeH,YAAY,CAChCI,QAAkB,EAClBC,OAA2C,EAC3CC,uBAAiC,GAAG,EAAE,EACtC;IACAC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;QAGNF,YAAmB;IAFvC,0EAA0E;IAC1E,mFAAmF;IACnF,MAAMG,WAAW,GAAGH,CAAAA,YAA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CAAC,CAAC,EAAEjB,IAAI,CAAC,CAAC,CAAC,CAAC;IAAA,CAAC,CAAC;CAC3E;AAED,iEAAiE,CACjE,SAAShB,iBAAiB,CAACgB,IAAI,GAAG,EAAE,EAAE;IACpC,OAAOA,IAAI,CAACqB,QAAQ,CAAC,GAAG,CAAC,CAAC;CAC3B"}
@@ -30,7 +30,7 @@ function _interopRequireWildcard(obj) {
30
30
  return newObj;
31
31
  }
32
32
  }
33
- async function configureProjectAsync(projectRoot, { platforms , exp }) {
33
+ async function configureProjectAsync(projectRoot, { platforms , exp , templateChecksum }) {
34
34
  let bundleIdentifier;
35
35
  if (platforms.includes("ios")) {
36
36
  // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.
@@ -46,6 +46,12 @@ async function configureProjectAsync(projectRoot, { platforms , exp }) {
46
46
  packageName,
47
47
  bundleIdentifier
48
48
  });
49
+ if (templateChecksum) {
50
+ var __internal;
51
+ // Prepare template checksum for the patch mods
52
+ config._internal = (__internal = config._internal) != null ? __internal : {};
53
+ config._internal.templateChecksum = templateChecksum;
54
+ }
49
55
  // compile all plugins and mods
50
56
  config = await (0, _configPlugins).compileModsAsync(config, {
51
57
  projectRoot,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/configureProjectAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { compileModsAsync, ModPlatform } from '@expo/config-plugins';\nimport { getPrebuildConfigAsync } from '@expo/prebuild-config';\n\nimport { logConfig } from '../config/configAsync';\nimport * as Log from '../log';\nimport { env } from '../utils/env';\nimport {\n getOrPromptForBundleIdentifier,\n getOrPromptForPackage,\n} from '../utils/getOrPromptApplicationId';\n\nexport async function configureProjectAsync(\n projectRoot: string,\n {\n platforms,\n exp,\n }: {\n platforms: ModPlatform[];\n exp?: ExpoConfig;\n }\n): Promise<ExpoConfig> {\n let bundleIdentifier: string | undefined;\n if (platforms.includes('ios')) {\n // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.\n bundleIdentifier = await getOrPromptForBundleIdentifier(projectRoot, exp);\n }\n let packageName: string | undefined;\n if (platforms.includes('android')) {\n // Check package before reading the config because it may mutate the config if the user is prompted to define it.\n packageName = await getOrPromptForPackage(projectRoot, exp);\n }\n\n let { exp: config } = await getPrebuildConfigAsync(projectRoot, {\n platforms,\n packageName,\n bundleIdentifier,\n });\n\n // compile all plugins and mods\n config = await compileModsAsync(config, {\n projectRoot,\n platforms,\n assertMissingModProviders: false,\n });\n\n if (env.EXPO_DEBUG) {\n Log.log();\n Log.log('Evaluated config:');\n logConfig(config);\n Log.log();\n }\n\n return config;\n}\n"],"names":["configureProjectAsync","Log","projectRoot","platforms","exp","bundleIdentifier","includes","getOrPromptForBundleIdentifier","packageName","getOrPromptForPackage","config","getPrebuildConfigAsync","compileModsAsync","assertMissingModProviders","env","EXPO_DEBUG","log","logConfig"],"mappings":"AAAA;;;;QAYsBA,qBAAqB,GAArBA,qBAAqB;AAXG,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,eAAuB,WAAvB,uBAAuB,CAAA;AAEpC,IAAA,YAAuB,WAAvB,uBAAuB,CAAA;AACrCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACK,IAAA,IAAc,WAAd,cAAc,CAAA;AAI3B,IAAA,yBAAmC,WAAnC,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEnC,eAAeD,qBAAqB,CACzCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EACTC,GAAG,CAAA,EAIJ,EACoB;IACrB,IAAIC,gBAAgB,AAAoB,AAAC;IACzC,IAAIF,SAAS,CAACG,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC7B,mHAAmH;QACnHD,gBAAgB,GAAG,MAAME,CAAAA,GAAAA,yBAA8B,AAAkB,CAAA,+BAAlB,CAACL,WAAW,EAAEE,GAAG,CAAC,CAAC;KAC3E;IACD,IAAII,WAAW,AAAoB,AAAC;IACpC,IAAIL,SAAS,CAACG,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,iHAAiH;QACjHE,WAAW,GAAG,MAAMC,CAAAA,GAAAA,yBAAqB,AAAkB,CAAA,sBAAlB,CAACP,WAAW,EAAEE,GAAG,CAAC,CAAC;KAC7D;IAED,IAAI,EAAEA,GAAG,EAAEM,MAAM,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,eAAsB,AAIhD,CAAA,uBAJgD,CAACT,WAAW,EAAE;QAC9DC,SAAS;QACTK,WAAW;QACXH,gBAAgB;KACjB,CAAC,AAAC;IAEH,+BAA+B;IAC/BK,MAAM,GAAG,MAAME,CAAAA,GAAAA,cAAgB,AAI7B,CAAA,iBAJ6B,CAACF,MAAM,EAAE;QACtCR,WAAW;QACXC,SAAS;QACTU,yBAAyB,EAAE,KAAK;KACjC,CAAC,CAAC;IAEH,IAAIC,IAAG,IAAA,CAACC,UAAU,EAAE;QAClBd,GAAG,CAACe,GAAG,EAAE,CAAC;QACVf,GAAG,CAACe,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC7BC,CAAAA,GAAAA,YAAS,AAAQ,CAAA,UAAR,CAACP,MAAM,CAAC,CAAC;QAClBT,GAAG,CAACe,GAAG,EAAE,CAAC;KACX;IAED,OAAON,MAAM,CAAC;CACf"}
1
+ {"version":3,"sources":["../../../src/prebuild/configureProjectAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { compileModsAsync, ModPlatform } from '@expo/config-plugins';\nimport { getPrebuildConfigAsync } from '@expo/prebuild-config';\n\nimport { logConfig } from '../config/configAsync';\nimport * as Log from '../log';\nimport { env } from '../utils/env';\nimport {\n getOrPromptForBundleIdentifier,\n getOrPromptForPackage,\n} from '../utils/getOrPromptApplicationId';\n\nexport async function configureProjectAsync(\n projectRoot: string,\n {\n platforms,\n exp,\n templateChecksum,\n }: {\n platforms: ModPlatform[];\n exp?: ExpoConfig;\n templateChecksum?: string;\n }\n): Promise<ExpoConfig> {\n let bundleIdentifier: string | undefined;\n if (platforms.includes('ios')) {\n // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.\n bundleIdentifier = await getOrPromptForBundleIdentifier(projectRoot, exp);\n }\n let packageName: string | undefined;\n if (platforms.includes('android')) {\n // Check package before reading the config because it may mutate the config if the user is prompted to define it.\n packageName = await getOrPromptForPackage(projectRoot, exp);\n }\n\n let { exp: config } = await getPrebuildConfigAsync(projectRoot, {\n platforms,\n packageName,\n bundleIdentifier,\n });\n\n if (templateChecksum) {\n // Prepare template checksum for the patch mods\n config._internal = config._internal ?? {};\n config._internal.templateChecksum = templateChecksum;\n }\n\n // compile all plugins and mods\n config = await compileModsAsync(config, {\n projectRoot,\n platforms,\n assertMissingModProviders: false,\n });\n\n if (env.EXPO_DEBUG) {\n Log.log();\n Log.log('Evaluated config:');\n logConfig(config);\n Log.log();\n }\n\n return config;\n}\n"],"names":["configureProjectAsync","Log","projectRoot","platforms","exp","templateChecksum","bundleIdentifier","includes","getOrPromptForBundleIdentifier","packageName","getOrPromptForPackage","config","getPrebuildConfigAsync","_internal","compileModsAsync","assertMissingModProviders","env","EXPO_DEBUG","log","logConfig"],"mappings":"AAAA;;;;QAYsBA,qBAAqB,GAArBA,qBAAqB;AAXG,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,eAAuB,WAAvB,uBAAuB,CAAA;AAEpC,IAAA,YAAuB,WAAvB,uBAAuB,CAAA;AACrCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACK,IAAA,IAAc,WAAd,cAAc,CAAA;AAI3B,IAAA,yBAAmC,WAAnC,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEnC,eAAeD,qBAAqB,CACzCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EACTC,GAAG,CAAA,EACHC,gBAAgB,CAAA,EAKjB,EACoB;IACrB,IAAIC,gBAAgB,AAAoB,AAAC;IACzC,IAAIH,SAAS,CAACI,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC7B,mHAA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ebuildAsync(projectRoot, options) {
70
70
  platforms: options.platforms
71
71
  });
72
72
  // Create native projects from template.
73
- const { hasNewProjectFiles , needsPodInstall , changedDependencies } = await (0, _updateFromTemplate).updateFromTemplateAsync(projectRoot, {
73
+ const { hasNewProjectFiles , needsPodInstall , templateChecksum , changedDependencies } = await (0, _updateFromTemplate).updateFromTemplateAsync(projectRoot, {
74
74
  exp,
75
75
  pkg,
76
76
  template: options.template != null ? (0, _resolveOptions).resolveTemplateOption(options.template) : undefined,
@@ -116,7 +116,8 @@ async function prebuildAsync(projectRoot, options) {
116
116
  try {
117
117
  await (0, _profile).profile(_configureProjectAsync.configureProjectAsync)(projectRoot, {
118
118
  platforms: options.platforms,
119
- exp
119
+ exp,
120
+ templateChecksum
120
121
  });
121
122
  configSyncingStep.succeed("Finished prebuild");
122
123
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\nimport chalk from 'chalk';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { Log } from '../log';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\nimport { confirmAsync } from '../utils/prompts';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git.js');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, changedDependencies } =\n await updateFromTemplateAsync(projectRoot, {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n });\n\n // Install node modules\n if (options.install) {\n if (changedDependencies.length) {\n if (options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n Log.log(chalk.gray(chalk`Dependencies in the {bold package.json} changed:`));\n Log.log(chalk.gray(' ' + changedDependencies.join(', ')));\n\n // Installing dependencies is a legacy feature from the unversioned\n // command. We know opt to not change dependencies unless a template\n // indicates a new dependency is required, or if the core dependencies are wrong.\n if (\n await confirmAsync({\n message: `Install the updated dependencies?`,\n initial: true,\n })\n ) {\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n }\n }\n\n // Apply Expo config to native projects. Prevent log-spew from ora when running in debug mode.\n const configSyncingStep: { succeed(text?: string): unknown; fail(text?: string): unknown } =\n env.EXPO_DEBUG\n ? {\n succeed(text) {\n Log.log(text!);\n },\n fail(text) {\n Log.error(text!);\n },\n }\n : logNewSection('Running prebuild');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n exp,\n });\n configSyncingStep.succeed('Finished prebuild');\n } catch (error) {\n configSyncingStep.fail('Prebuild failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods.js');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","changedDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","length","packageManager","npm","clearNodeModulesAsync","Log","log","chalk","gray","join","confirmAsync","message","initial","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","succeed","text","fail","error","logNewSection","profile","configureProjectAsync","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QA0CsBA,aAAa,GAAbA,aAAa;AAxCjB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEoD,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAQ,WAAR,QAAQ,CAAA;AACR,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACb,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IAEvC,IAAIC,OAAO,CAACG,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,iBAAiB;UAAC,AAAC;QACtE,+BAA+B;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,IAAIP,eAAe,EAAE;QAC3E,MAAM,EAAEsC,qBAAqB,CAAA,EAAE,GAAG,MAAM;mDAAO,uBAAuB;UAAC,AAAC;QAExEF,aAAa,GAAG,MAAME,qBAAqB,CAACrD,WAAW,CAAC,CAAC;KAC1D,MAAM;QACLF,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC9B;IAED,OAAO;QACLwD,WAAW,EAAE,CAAC,CAACrD,OAAO,CAACqB,OAAO;QAC9BiC,UAAU,EAAE,CAACJ,aAAa;QAC1B5C,SAAS,EAAEN,OAAO,CAACM,SAAS;QAC5BO,kBAAkB;QAClBH,GAAG;KACJ,CAAC;CACH"}
1
+ {"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\nimport chalk from 'chalk';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { Log } from '../log';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\nimport { confirmAsync } from '../utils/prompts';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git.js');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, templateChecksum, changedDependencies } =\n await updateFromTemplateAsync(projectRoot, {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n });\n\n // Install node modules\n if (options.install) {\n if (changedDependencies.length) {\n if (options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n Log.log(chalk.gray(chalk`Dependencies in the {bold package.json} changed:`));\n Log.log(chalk.gray(' ' + changedDependencies.join(', ')));\n\n // Installing dependencies is a legacy feature from the unversioned\n // command. We know opt to not change dependencies unless a template\n // indicates a new dependency is required, or if the core dependencies are wrong.\n if (\n await confirmAsync({\n message: `Install the updated dependencies?`,\n initial: true,\n })\n ) {\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n }\n }\n\n // Apply Expo config to native projects. Prevent log-spew from ora when running in debug mode.\n const configSyncingStep: { succeed(text?: string): unknown; fail(text?: string): unknown } =\n env.EXPO_DEBUG\n ? {\n succeed(text) {\n Log.log(text!);\n },\n fail(text) {\n Log.error(text!);\n },\n }\n : logNewSection('Running prebuild');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n exp,\n templateChecksum,\n });\n configSyncingStep.succeed('Finished prebuild');\n } catch (error) {\n configSyncingStep.fail('Prebuild failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods.js');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","templateChecksum","changedDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","length","packageManager","npm","clearNodeModulesAsync","Log","log","chalk","gray","join","confirmAsync","message","initial","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","succeed","text","fail","error","logNewSection","profile","configureProjectAsync","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QA0CsBA,aAAa,GAAbA,aAAa;AAxCjB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEoD,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAQ,WAAR,QAAQ,CAAA;AACR,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACb,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IAEvC,IAAIC,OAAO,CAACG,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,iBAAiB;UAAC,AAAC;QACtE,+BAA+B;QAC/B,IAAI,MAAMA,yBAAyB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC;SACb;QACD,0CAA0C;QAC1C,MAAMC,C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