@expo/cli 0.17.10 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin/cli +11 -7
- package/build/bin/cli.map +1 -1
- package/build/src/api/getExpoSchema.js +23 -5
- package/build/src/api/getExpoSchema.js.map +1 -1
- package/build/src/api/graphql/client.js +28 -10
- package/build/src/api/graphql/client.js.map +1 -1
- package/build/src/api/graphql/queries/AppQuery.js +16 -4
- package/build/src/api/graphql/queries/AppQuery.js.map +1 -1
- package/build/src/api/graphql/queries/UserQuery.js +8 -2
- package/build/src/api/graphql/queries/UserQuery.js.map +1 -1
- package/build/src/api/graphql/types/App.js +8 -2
- package/build/src/api/graphql/types/App.js.map +1 -1
- package/build/src/api/rest/cache/FileSystemCache.js +21 -9
- package/build/src/api/rest/cache/FileSystemCache.js.map +1 -1
- package/build/src/api/rest/cache/response.js +9 -3
- package/build/src/api/rest/cache/response.js.map +1 -1
- package/build/src/api/rest/cache/wrapFetchWithCache.js +32 -8
- package/build/src/api/rest/cache/wrapFetchWithCache.js.map +1 -1
- package/build/src/api/rest/client.js +23 -5
- package/build/src/api/rest/client.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithBaseUrl.js +9 -4
- package/build/src/api/rest/wrapFetchWithBaseUrl.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithProxy.js +8 -2
- package/build/src/api/rest/wrapFetchWithProxy.js.map +1 -1
- package/build/src/api/settings.js +8 -2
- package/build/src/api/settings.js.map +1 -1
- package/build/src/api/updateDevelopmentSession.js +18 -6
- package/build/src/api/updateDevelopmentSession.js.map +1 -1
- package/build/src/api/user/UserSettings.js +26 -8
- package/build/src/api/user/UserSettings.js.map +1 -1
- package/build/src/api/user/actions.js +17 -5
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/api/user/expoSsoLauncher.js +32 -8
- package/build/src/api/user/expoSsoLauncher.js.map +1 -1
- package/build/src/api/user/otp.js +17 -5
- package/build/src/api/user/otp.js.map +1 -1
- package/build/src/api/user/user.js +19 -12
- package/build/src/api/user/user.js.map +1 -1
- package/build/src/config/configAsync.js +25 -7
- package/build/src/config/configAsync.js.map +1 -1
- package/build/src/config/index.js +9 -3
- package/build/src/config/index.js.map +1 -1
- package/build/src/customize/customizeAsync.js +8 -2
- package/build/src/customize/customizeAsync.js.map +1 -1
- package/build/src/customize/generate.js +16 -4
- package/build/src/customize/generate.js.map +1 -1
- package/build/src/customize/index.js +10 -4
- package/build/src/customize/index.js.map +1 -1
- package/build/src/customize/templates.js +33 -9
- package/build/src/customize/templates.js.map +1 -1
- package/build/src/customize/typescript.js +8 -2
- package/build/src/customize/typescript.js.map +1 -1
- package/build/src/export/createMetadataJson.js +8 -2
- package/build/src/export/createMetadataJson.js.map +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +58 -18
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/embed/index.js +17 -5
- package/build/src/export/embed/index.js.map +1 -1
- package/build/src/export/embed/resolveOptions.js +8 -2
- package/build/src/export/embed/resolveOptions.js.map +1 -1
- package/build/src/export/embed/xcodeCompilerLogger.js +16 -4
- package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -1
- package/build/src/export/exportApp.js +32 -12
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAssets.js +27 -9
- package/build/src/export/exportAssets.js.map +1 -1
- package/build/src/export/exportAsync.js +10 -2
- package/build/src/export/exportAsync.js.map +1 -1
- package/build/src/export/exportHermes.js +29 -17
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +69 -37
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/favicon.js +33 -9
- package/build/src/export/favicon.js.map +1 -1
- package/build/src/export/fork-bundleAsync.js +61 -16
- package/build/src/export/fork-bundleAsync.js.map +1 -1
- package/build/src/export/getPublicExpoManifest.js +8 -2
- package/build/src/export/getPublicExpoManifest.js.map +1 -1
- package/build/src/export/getResolvedLocales.js +15 -3
- package/build/src/export/getResolvedLocales.js.map +1 -1
- package/build/src/export/index.js +11 -5
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/metroAssetLocalPath.js +9 -3
- package/build/src/export/metroAssetLocalPath.js.map +1 -1
- package/build/src/export/persistMetroAssets.js +27 -15
- package/build/src/export/persistMetroAssets.js.map +1 -1
- package/build/src/export/publicFolder.js +18 -6
- package/build/src/export/publicFolder.js.map +1 -1
- package/build/src/export/resolveOptions.js +8 -2
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/export/saveAssets.js +43 -19
- package/build/src/export/saveAssets.js.map +1 -1
- package/build/src/export/web/exportWebAsync.js +16 -4
- package/build/src/export/web/exportWebAsync.js.map +1 -1
- package/build/src/export/web/index.js +9 -3
- package/build/src/export/web/index.js.map +1 -1
- package/build/src/install/applyPlugins.js +8 -2
- package/build/src/install/applyPlugins.js.map +1 -1
- package/build/src/install/checkPackages.js +18 -6
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/fixPackages.js +8 -2
- package/build/src/install/fixPackages.js.map +1 -1
- package/build/src/install/index.js +14 -8
- package/build/src/install/index.js.map +1 -1
- package/build/src/install/installAsync.js +27 -9
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/install/installExpoPackage.js +17 -5
- package/build/src/install/installExpoPackage.js.map +1 -1
- package/build/src/install/utils/autoAddConfigPlugins.js +17 -5
- package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
- package/build/src/log.js +9 -3
- package/build/src/log.js.map +1 -1
- package/build/src/prebuild/clearNativeFolder.js +37 -13
- package/build/src/prebuild/clearNativeFolder.js.map +1 -1
- package/build/src/prebuild/configureProjectAsync.js +16 -4
- package/build/src/prebuild/configureProjectAsync.js.map +1 -1
- package/build/src/prebuild/copyTemplateFiles.js +29 -11
- package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
- package/build/src/prebuild/ensureConfigAsync.js +24 -6
- package/build/src/prebuild/ensureConfigAsync.js.map +1 -1
- package/build/src/prebuild/index.js +14 -8
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +9 -3
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/prebuild/renameTemplateAppName.js +119 -0
- package/build/src/prebuild/renameTemplateAppName.js.map +1 -0
- package/build/src/prebuild/resolveOptions.js +32 -8
- package/build/src/prebuild/resolveOptions.js.map +1 -1
- package/build/src/prebuild/resolveTemplate.js +44 -14
- package/build/src/prebuild/resolveTemplate.js.map +1 -1
- package/build/src/prebuild/updateFromTemplate.js +18 -2
- package/build/src/prebuild/updateFromTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +49 -13
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/prebuild/validateTemplatePlatforms.js +16 -4
- package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
- package/build/src/run/android/index.js +20 -4
- package/build/src/run/android/index.js.map +1 -1
- package/build/src/run/android/resolveGradlePropsAsync.js +55 -0
- package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -0
- package/build/src/run/android/resolveInstallApkName.js +18 -6
- package/build/src/run/android/resolveInstallApkName.js.map +1 -1
- package/build/src/run/android/resolveLaunchProps.js +10 -4
- package/build/src/run/android/resolveLaunchProps.js.map +1 -1
- package/build/src/run/android/resolveOptions.js +5 -3
- package/build/src/run/android/resolveOptions.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +13 -4
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ensureNativeProject.js +15 -3
- package/build/src/run/ensureNativeProject.js.map +1 -1
- package/build/src/run/hints.js +10 -4
- package/build/src/run/hints.js.map +1 -1
- package/build/src/run/index.js +8 -2
- package/build/src/run/index.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.js +57 -21
- package/build/src/run/ios/XcodeBuild.js.map +1 -1
- package/build/src/run/ios/appleDevice/AppleDevice.js +25 -7
- package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
- package/build/src/run/ios/appleDevice/ClientManager.js +10 -4
- package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/AFCClient.js +34 -10
- package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js +16 -4
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +8 -2
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js +17 -5
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js +17 -5
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js +25 -7
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +24 -6
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +8 -2
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +16 -4
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +8 -2
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +16 -4
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +16 -4
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -1
- package/build/src/run/ios/codeSigning/Security.js +17 -5
- package/build/src/run/ios/codeSigning/Security.js.map +1 -1
- package/build/src/run/ios/codeSigning/configureCodeSigning.js +8 -2
- package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -1
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +9 -3
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -1
- package/build/src/run/ios/codeSigning/simulatorCodeSigning.js +25 -7
- package/build/src/run/ios/codeSigning/simulatorCodeSigning.js.map +1 -1
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +22 -10
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -1
- package/build/src/run/ios/index.js +19 -7
- package/build/src/run/ios/index.js.map +1 -1
- package/build/src/run/ios/launchApp.js +17 -5
- package/build/src/run/ios/launchApp.js.map +1 -1
- package/build/src/run/ios/options/promptDevice.js +9 -3
- package/build/src/run/ios/options/promptDevice.js.map +1 -1
- package/build/src/run/ios/options/resolveDevice.js +1 -2
- package/build/src/run/ios/options/resolveDevice.js.map +1 -1
- package/build/src/run/ios/options/resolveNativeScheme.js +27 -9
- package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -1
- package/build/src/run/ios/options/resolveXcodeProject.js +8 -2
- package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +10 -2
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/run/startBundler.js +16 -4
- package/build/src/run/startBundler.js.map +1 -1
- package/build/src/start/detectDevClient.js +29 -0
- package/build/src/start/detectDevClient.js.map +1 -0
- package/build/src/start/doctor/SecurityBinPrerequisite.js +8 -2
- package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +16 -4
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js +16 -4
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js +79 -29
- package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcrunPrerequisite.js +24 -6
- package/build/src/start/doctor/apple/XcrunPrerequisite.js.map +1 -1
- package/build/src/start/doctor/dependencies/bundledNativeModules.js +25 -7
- package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +27 -9
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
- package/build/src/start/doctor/dependencies/getMissingPackages.js +24 -6
- package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/getVersionedPackages.js +8 -2
- package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js +25 -7
- package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +32 -21
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +33 -9
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js +18 -6
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
- package/build/src/start/doctor/typescript/updateTSConfig.js +29 -11
- package/build/src/start/doctor/typescript/updateTSConfig.js.map +1 -1
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +18 -6
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
- package/build/src/start/index.js +17 -11
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/interface/commandsTable.js +27 -9
- package/build/src/start/interface/commandsTable.js.map +1 -1
- package/build/src/start/interface/interactiveActions.js +17 -11
- package/build/src/start/interface/interactiveActions.js.map +1 -1
- package/build/src/start/interface/startInterface.js +8 -2
- package/build/src/start/interface/startInterface.js.map +1 -1
- package/build/src/start/platforms/AppIdResolver.js +9 -3
- package/build/src/start/platforms/AppIdResolver.js.map +1 -1
- package/build/src/start/platforms/DeviceManager.js +8 -2
- package/build/src/start/platforms/DeviceManager.js.map +1 -1
- package/build/src/start/platforms/ExpoGoInstaller.js +30 -14
- package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
- package/build/src/start/platforms/PlatformManager.js +33 -13
- package/build/src/start/platforms/PlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/ADBServer.js +17 -5
- package/build/src/start/platforms/android/ADBServer.js.map +1 -1
- package/build/src/start/platforms/android/AndroidAppIdResolver.js +13 -7
- package/build/src/start/platforms/android/AndroidAppIdResolver.js.map +1 -1
- package/build/src/start/platforms/android/AndroidDeviceManager.js +19 -7
- package/build/src/start/platforms/android/AndroidDeviceManager.js.map +1 -1
- package/build/src/start/platforms/android/AndroidSdk.js +34 -10
- package/build/src/start/platforms/android/AndroidSdk.js.map +1 -1
- package/build/src/start/platforms/android/activateWindow.js +16 -4
- package/build/src/start/platforms/android/activateWindow.js.map +1 -1
- package/build/src/start/platforms/android/adb.js +21 -4
- package/build/src/start/platforms/android/adb.js.map +1 -1
- package/build/src/start/platforms/android/emulator.js +32 -8
- package/build/src/start/platforms/android/emulator.js.map +1 -1
- package/build/src/start/platforms/android/gradle.js +23 -6
- package/build/src/start/platforms/android/gradle.js.map +1 -1
- package/build/src/start/platforms/android/promptAndroidDevice.js +10 -4
- package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
- package/build/src/start/platforms/ios/AppleAppIdResolver.js +26 -8
- package/build/src/start/platforms/ios/AppleAppIdResolver.js.map +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js +50 -18
- package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
- package/build/src/start/platforms/ios/assertSystemRequirements.js +4 -3
- package/build/src/start/platforms/ios/assertSystemRequirements.js.map +1 -1
- package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js +16 -4
- package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js.map +1 -1
- package/build/src/start/platforms/ios/getBestSimulator.js +8 -2
- package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
- package/build/src/start/platforms/ios/promptAppleDevice.js +9 -3
- package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
- package/build/src/start/platforms/ios/simctl.js +12 -6
- package/build/src/start/platforms/ios/simctl.js.map +1 -1
- package/build/src/start/platforms/ios/simctlLogging.js +40 -10
- package/build/src/start/platforms/ios/simctlLogging.js.map +1 -1
- package/build/src/start/platforms/ios/xcrun.js +16 -4
- package/build/src/start/platforms/ios/xcrun.js.map +1 -1
- package/build/src/start/project/dotExpo.js +27 -9
- package/build/src/start/project/dotExpo.js.map +1 -1
- package/build/src/start/resolveOptions.js +33 -15
- package/build/src/start/resolveOptions.js.map +1 -1
- package/build/src/start/server/AsyncNgrok.js +34 -10
- package/build/src/start/server/AsyncNgrok.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.js +16 -4
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.js +28 -10
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/DevToolsPluginManager.js +16 -4
- package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
- package/build/src/start/server/DevelopmentSession.js +9 -3
- package/build/src/start/server/DevelopmentSession.js.map +1 -1
- package/build/src/start/server/ReactDevToolsProxy.js +26 -8
- package/build/src/start/server/ReactDevToolsProxy.js.map +1 -1
- package/build/src/start/server/UrlCreator.js +19 -6
- package/build/src/start/server/UrlCreator.js.map +1 -1
- package/build/src/start/server/getStaticRenderFunctions.js +91 -55
- package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +231 -83
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +30 -15
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.js +26 -8
- package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.types.js.map +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js +56 -20
- package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
- package/build/src/start/server/metro/createJResolver.js +90 -45
- package/build/src/start/server/metro/createJResolver.js.map +1 -1
- package/build/src/start/server/metro/createServerRouteMiddleware.js +29 -28
- package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/MessageHandler.js +27 -0
- package/build/src/start/server/metro/debugging/MessageHandler.js.map +1 -0
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +11 -8
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/createHandlersFactory.js +63 -0
- package/build/src/start/server/metro/debugging/createHandlersFactory.js.map +1 -0
- package/build/src/start/server/metro/debugging/{inspectorHandlers/utils.js → getDebuggerType.js} +1 -6
- package/build/src/start/server/metro/debugging/getDebuggerType.js.map +1 -0
- package/build/src/start/server/metro/debugging/{inspectorHandlers → messageHandlers}/NetworkResponse.js +8 -5
- package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js.map +1 -0
- package/build/src/start/server/metro/debugging/{inspectorHandlers → messageHandlers}/PageReload.js +7 -6
- package/build/src/start/server/metro/debugging/messageHandlers/PageReload.js.map +1 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js +25 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js +22 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +1 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js +28 -0
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js.map +1 -0
- package/build/src/start/server/metro/debugging/{inspectorHandlers → messageHandlers}/VscodeRuntimeGetProperties.js +10 -6
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js.map +1 -0
- package/build/src/start/server/metro/debugging/pageIsSupported.js +14 -0
- package/build/src/start/server/metro/debugging/pageIsSupported.js.map +1 -0
- package/build/src/start/server/metro/debugging/types.js.map +1 -0
- package/build/src/start/server/metro/externals.js +51 -64
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/fetchRouterManifest.js +8 -2
- package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
- package/build/src/start/server/metro/formatFileCandidates.js +8 -2
- package/build/src/start/server/metro/formatFileCandidates.js.map +1 -1
- package/build/src/start/server/metro/getCssModulesFromBundler.js +34 -10
- package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +96 -30
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +40 -21
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/metroVirtualModules.js +82 -0
- package/build/src/start/server/metro/metroVirtualModules.js.map +1 -0
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +8 -2
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
- package/build/src/start/server/metro/router.js +44 -17
- package/build/src/start/server/metro/router.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +56 -14
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/metro/serializeHtml.js +25 -12
- package/build/src/start/server/metro/serializeHtml.js.map +1 -1
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +8 -2
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +148 -46
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/metro/withMetroResolvers.js +31 -13
- package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
- package/build/src/start/server/middleware/CreateFileMiddleware.js +22 -10
- package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +16 -4
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +42 -12
- package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ExpoMiddleware.js +8 -2
- package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js +41 -11
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +40 -10
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js +24 -6
- package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +8 -2
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ServeStaticMiddleware.js +24 -6
- package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/inspector/JsInspector.js +25 -8
- package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowser.js +10 -4
- package/build/src/start/server/middleware/inspector/LaunchBrowser.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js +24 -6
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js +33 -9
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js +27 -11
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js.map +1 -1
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +33 -9
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +12 -2
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/start/server/middleware/resolveAssets.js +17 -5
- package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
- package/build/src/start/server/middleware/resolvePlatform.js +8 -2
- package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
- package/build/src/start/server/platformBundlers.js +8 -2
- package/build/src/start/server/platformBundlers.js.map +1 -1
- package/build/src/start/server/serverLogLikeMetro.js +37 -13
- package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
- package/build/src/start/server/type-generation/expo-env.js +16 -4
- package/build/src/start/server/type-generation/expo-env.js.map +1 -1
- package/build/src/start/server/type-generation/routes.js +91 -37
- package/build/src/start/server/type-generation/routes.js.map +1 -1
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js +27 -9
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
- package/build/src/start/server/type-generation/tsconfig.js +27 -9
- package/build/src/start/server/type-generation/tsconfig.js.map +1 -1
- package/build/src/start/server/webTemplate.js +26 -8
- package/build/src/start/server/webTemplate.js.map +1 -1
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js +36 -12
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
- package/build/src/start/server/webpack/compile.js +17 -5
- package/build/src/start/server/webpack/compile.js.map +1 -1
- package/build/src/start/server/webpack/resolveFromProject.js +8 -2
- package/build/src/start/server/webpack/resolveFromProject.js.map +1 -1
- package/build/src/start/server/webpack/tls.js +35 -11
- package/build/src/start/server/webpack/tls.js.map +1 -1
- package/build/src/start/startAsync.js +36 -11
- package/build/src/start/startAsync.js.map +1 -1
- package/build/src/utils/FileNotifier.js +32 -8
- package/build/src/utils/FileNotifier.js.map +1 -1
- package/build/src/utils/analytics/getDevClientProperties.js +26 -8
- package/build/src/utils/analytics/getDevClientProperties.js.map +1 -1
- package/build/src/utils/analytics/metroDebuggerMiddleware.js +2 -2
- package/build/src/utils/analytics/metroDebuggerMiddleware.js.map +1 -1
- package/build/src/utils/args.js +32 -8
- package/build/src/utils/args.js.map +1 -1
- package/build/src/utils/cocoapods.js +64 -28
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/codesigning.js +79 -29
- package/build/src/utils/codesigning.js.map +1 -1
- package/build/src/utils/createFileTransform.js +24 -69
- package/build/src/utils/createFileTransform.js.map +1 -1
- package/build/src/utils/dir.js +33 -26
- package/build/src/utils/dir.js.map +1 -1
- package/build/src/utils/downloadAppAsync.js +40 -10
- package/build/src/utils/downloadAppAsync.js.map +1 -1
- package/build/src/utils/downloadExpoGoAsync.js +26 -11
- package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
- package/build/src/utils/editor.js +18 -6
- package/build/src/utils/editor.js.map +1 -1
- package/build/src/utils/env.js +40 -31
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/errors.js +20 -5
- package/build/src/utils/errors.js.map +1 -1
- package/build/src/utils/findUp.js +18 -6
- package/build/src/utils/findUp.js.map +1 -1
- package/build/src/utils/getOrPromptApplicationId.js +19 -7
- package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
- package/build/src/utils/getRunningProcess.js +18 -6
- package/build/src/utils/getRunningProcess.js.map +1 -1
- package/build/src/utils/git.js +18 -6
- package/build/src/utils/git.js.map +1 -1
- package/build/src/utils/glob.js +9 -3
- package/build/src/utils/glob.js.map +1 -1
- package/build/src/utils/ip.js +8 -2
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/isModuleSymlinked.js +16 -4
- package/build/src/utils/isModuleSymlinked.js.map +1 -1
- package/build/src/utils/link.js +18 -6
- package/build/src/utils/link.js.map +1 -1
- package/build/src/utils/mergeGitIgnorePaths.js +25 -13
- package/build/src/utils/mergeGitIgnorePaths.js.map +1 -1
- package/build/src/utils/modifyConfigAsync.js +18 -6
- package/build/src/utils/modifyConfigAsync.js.map +1 -1
- package/build/src/utils/modifyConfigPlugins.js +8 -2
- package/build/src/utils/modifyConfigPlugins.js.map +1 -1
- package/build/src/utils/nodeEnv.js +2 -0
- package/build/src/utils/nodeEnv.js.map +1 -1
- package/build/src/utils/nodeModules.js +23 -5
- package/build/src/utils/nodeModules.js.map +1 -1
- package/build/src/utils/npm.js +64 -17
- package/build/src/utils/npm.js.map +1 -1
- package/build/src/utils/open.js +9 -3
- package/build/src/utils/open.js.map +1 -1
- package/build/src/utils/ora.js +16 -4
- package/build/src/utils/ora.js.map +1 -1
- package/build/src/utils/plist.js +24 -6
- package/build/src/utils/plist.js.map +1 -1
- package/build/src/utils/port.js +22 -10
- package/build/src/utils/port.js.map +1 -1
- package/build/src/utils/profile.js +8 -2
- package/build/src/utils/profile.js.map +1 -1
- package/build/src/utils/progress.js +8 -2
- package/build/src/utils/progress.js.map +1 -1
- package/build/src/utils/prompts.js +16 -4
- package/build/src/utils/prompts.js.map +1 -1
- package/build/src/utils/scheme.js +75 -23
- package/build/src/utils/scheme.js.map +1 -1
- package/build/src/utils/tar.js +16 -4
- package/build/src/utils/tar.js.map +1 -1
- package/build/src/utils/telemetry/DetachedClient.js +87 -0
- package/build/src/utils/telemetry/DetachedClient.js.map +1 -0
- package/build/src/utils/telemetry/RudderClient.js +98 -0
- package/build/src/utils/telemetry/RudderClient.js.map +1 -0
- package/build/src/utils/telemetry/flushDetached.js +43 -0
- package/build/src/utils/telemetry/flushDetached.js.map +1 -0
- package/build/src/utils/telemetry/getContext.js +92 -0
- package/build/src/utils/telemetry/getContext.js.map +1 -0
- package/build/src/utils/telemetry/index.js +32 -0
- package/build/src/utils/telemetry/index.js.map +1 -0
- package/build/src/utils/telemetry/types.js +6 -0
- package/build/src/utils/telemetry/types.js.map +1 -0
- package/build/src/utils/tsconfig/evaluateTsConfig.js +16 -4
- package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
- package/build/src/utils/tsconfig/loadTsConfigPaths.js +18 -6
- package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +1 -1
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +10 -4
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +1 -1
- package/build/src/utils/url.js +19 -10
- package/build/src/utils/url.js.map +1 -1
- package/build/src/utils/validateApplicationId.js +18 -6
- package/build/src/utils/validateApplicationId.js.map +1 -1
- package/build/src/whoami/whoamiAsync.js +8 -2
- package/build/src/whoami/whoamiAsync.js.map +1 -1
- package/package.json +15 -16
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +27907 -0
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +9494 -0
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +10015 -0
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +28375 -0
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +9714 -0
- package/build/src/run/android/resolveGradleProps.js +0 -37
- package/build/src/run/android/resolveGradleProps.js.map +0 -1
- package/build/src/start/server/metro/bundleApiRoutes.js +0 -52
- package/build/src/start/server/metro/bundleApiRoutes.js.map +0 -1
- package/build/src/start/server/metro/debugging/InspectorDevice.js +0 -80
- package/build/src/start/server/metro/debugging/InspectorDevice.js.map +0 -1
- package/build/src/start/server/metro/debugging/InspectorProxy.js +0 -116
- package/build/src/start/server/metro/debugging/InspectorProxy.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/NetworkResponse.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/PageReload.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerGetPossibleBreakpoints.js +0 -21
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerScriptParsed.js +0 -56
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerScriptParsed.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerSetBreakpointByUrl.js +0 -18
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeCallFunctionOn.js +0 -24
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeCallFunctionOn.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeGetProperties.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/types.js.map +0 -1
- package/build/src/start/server/metro/debugging/inspectorHandlers/utils.js.map +0 -1
- package/build/src/start/server/type-generation/__typetests__/fixtures/basic.js +0 -38
- package/build/src/start/server/type-generation/__typetests__/fixtures/basic.js.map +0 -1
- package/build/src/start/server/type-generation/__typetests__/generateFixtures.js +0 -38
- package/build/src/start/server/type-generation/__typetests__/generateFixtures.js.map +0 -1
- package/build/src/start/server/type-generation/__typetests__/route.test.js +0 -184
- package/build/src/start/server/type-generation/__typetests__/route.test.js.map +0 -1
- package/build/src/utils/analytics/rudderstackClient.js +0 -147
- package/build/src/utils/analytics/rudderstackClient.js.map +0 -1
- /package/build/src/start/server/metro/debugging/{inspectorHandlers/types.js → types.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/downloadExpoGoAsync.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport path from 'path';\nimport ProgressBar from 'progress';\nimport { gt } from 'semver';\n\nimport { downloadAppAsync } from './downloadAppAsync';\nimport { CommandError } from './errors';\nimport { ora } from './ora';\nimport { profile } from './profile';\nimport { createProgressBar } from './progress';\nimport { getVersionsAsync, SDKVersion } from '../api/getVersions';\nimport { Log } from '../log';\n\nconst debug = require('debug')('expo:utils:downloadExpoGo') as typeof console.log;\n\nconst platformSettings: Record<\n string,\n {\n shouldExtractResults: boolean;\n versionsKey: keyof SDKVersion;\n getFilePath: (filename: string) => string;\n }\n> = {\n ios: {\n versionsKey: 'iosClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'ios-simulator-app-cache', `${filename}.app`),\n shouldExtractResults: true,\n },\n android: {\n versionsKey: 'androidClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'android-apk-cache', `${filename}.apk`),\n shouldExtractResults: false,\n },\n};\n\n/**\n * @internal exposed for testing.\n * @returns the matching `SDKVersion` object from the Expo API.\n */\nexport async function getExpoGoVersionEntryAsync(sdkVersion: string): Promise<SDKVersion> {\n const { sdkVersions: versions } = await getVersionsAsync();\n let version: SDKVersion;\n\n if (sdkVersion.toUpperCase() === 'UNVERSIONED') {\n // find the latest version\n const latestVersionKey = Object.keys(versions).reduce((a, b) => {\n if (gt(b, a)) {\n return b;\n }\n return a;\n }, '0.0.0');\n\n Log.warn(\n `Downloading the latest Expo Go client (${latestVersionKey}). This will not fully conform to UNVERSIONED.`\n );\n version = versions[latestVersionKey];\n } else {\n version = versions[sdkVersion];\n }\n\n if (!version) {\n throw new CommandError(`Unable to find a version of Expo Go for SDK ${sdkVersion}`);\n }\n return version;\n}\n\n/** Download the Expo Go app from the Expo servers (if only it was this easy for every app). */\nexport async function downloadExpoGoAsync(\n platform: keyof typeof platformSettings,\n {\n url,\n sdkVersion,\n }: {\n url?: string;\n sdkVersion
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/downloadExpoGoAsync.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport path from 'path';\nimport ProgressBar from 'progress';\nimport { gt } from 'semver';\n\nimport { downloadAppAsync } from './downloadAppAsync';\nimport { CommandError } from './errors';\nimport { ora } from './ora';\nimport { profile } from './profile';\nimport { createProgressBar } from './progress';\nimport { getVersionsAsync, SDKVersion } from '../api/getVersions';\nimport { Log } from '../log';\n\nconst debug = require('debug')('expo:utils:downloadExpoGo') as typeof console.log;\n\nconst platformSettings: Record<\n string,\n {\n shouldExtractResults: boolean;\n versionsKey: keyof SDKVersion;\n getFilePath: (filename: string) => string;\n }\n> = {\n ios: {\n versionsKey: 'iosClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'ios-simulator-app-cache', `${filename}.app`),\n shouldExtractResults: true,\n },\n android: {\n versionsKey: 'androidClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'android-apk-cache', `${filename}.apk`),\n shouldExtractResults: false,\n },\n};\n\n/**\n * @internal exposed for testing.\n * @returns the matching `SDKVersion` object from the Expo API.\n */\nexport async function getExpoGoVersionEntryAsync(sdkVersion: string): Promise<SDKVersion> {\n const { sdkVersions: versions } = await getVersionsAsync();\n let version: SDKVersion;\n\n if (sdkVersion.toUpperCase() === 'UNVERSIONED') {\n // find the latest version\n const latestVersionKey = Object.keys(versions).reduce((a, b) => {\n if (gt(b, a)) {\n return b;\n }\n return a;\n }, '0.0.0');\n\n Log.warn(\n `Downloading the latest Expo Go client (${latestVersionKey}). This will not fully conform to UNVERSIONED.`\n );\n version = versions[latestVersionKey];\n } else {\n version = versions[sdkVersion];\n }\n\n if (!version) {\n throw new CommandError(`Unable to find a version of Expo Go for SDK ${sdkVersion}`);\n }\n return version;\n}\n\n/** Download the Expo Go app from the Expo servers (if only it was this easy for every app). */\nexport async function downloadExpoGoAsync(\n platform: keyof typeof platformSettings,\n {\n url,\n sdkVersion,\n }: {\n url?: string;\n sdkVersion: string;\n }\n): Promise<string> {\n const { getFilePath, versionsKey, shouldExtractResults } = platformSettings[platform];\n\n const spinner = ora({ text: 'Fetching Expo Go', color: 'white' }).start();\n\n let bar: ProgressBar | null = null;\n\n try {\n if (!url) {\n const version = await getExpoGoVersionEntryAsync(sdkVersion);\n\n debug(`Installing Expo Go version for SDK ${sdkVersion} at URL: ${version[versionsKey]}`);\n url = version[versionsKey] as string;\n }\n } catch (error) {\n spinner.fail();\n throw error;\n }\n\n const filename = path.parse(url).name;\n\n try {\n const outputPath = getFilePath(filename);\n debug(`Downloading Expo Go from \"${url}\" to \"${outputPath}\".`);\n debug(\n `The requested copy of Expo Go might already be cached in: \"${getExpoHomeDirectory()}\". You can disable the cache with EXPO_NO_CACHE=1`\n );\n await profile(downloadAppAsync)({\n url,\n // Save all encrypted cache data to `~/.expo/expo-go`\n cacheDirectory: 'expo-go',\n outputPath,\n extract: shouldExtractResults,\n onProgress({ progress, total }) {\n if (progress && total) {\n if (!bar) {\n if (spinner.isSpinning) {\n spinner.stop();\n }\n bar = createProgressBar('Downloading the Expo Go app [:bar] :percent :etas', {\n width: 64,\n total: 100,\n // clear: true,\n complete: '=',\n incomplete: ' ',\n });\n } else {\n bar!.update(progress, total);\n }\n }\n },\n });\n return outputPath;\n } finally {\n spinner.stop();\n // @ts-expect-error\n bar?.terminate();\n }\n}\n"],"names":["getExpoGoVersionEntryAsync","downloadExpoGoAsync","debug","require","platformSettings","ios","versionsKey","getFilePath","filename","path","join","getExpoHomeDirectory","shouldExtractResults","android","sdkVersion","sdkVersions","versions","getVersionsAsync","version","toUpperCase","latestVersionKey","Object","keys","reduce","a","b","gt","Log","warn","CommandError","platform","url","spinner","ora","text","color","start","bar","error","fail","parse","name","outputPath","profile","downloadAppAsync","cacheDirectory","extract","onProgress","progress","total","isSpinning","stop","createProgressBar","width","complete","incomplete","update","terminate"],"mappings":"AAAA;;;;QAyCsBA,0BAA0B,GAA1BA,0BAA0B;QA4B1BC,mBAAmB,GAAnBA,mBAAmB;SArEJ,aAAiC;yBAAjC,iCAAiC;IAAjC,aAAiC;;;;;SACrD,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MAAM,CAACR,QAAQ,EAAEC,KAAK,CAAC,CAAC;qBAC9B;iBACF;aACF;SACF,CAAC,CAAC;QACH,OAAOP,UAAU,CAAC;KACnB,QAAS;QACRV,OAAO,CAACmB,IAAI,EAAE,CAAC;QACf,mBAAmB;QACnBd,GAAG,QAAW,GAAdA,KAAAA,CAAc,GAAdA,GAAG,CAAEoB,SAAS,EAAE,AAtIpB,CAsIqB;KAClB;CACF"}
|
|
@@ -4,8 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
exports.guessEditor = guessEditor;
|
|
6
6
|
exports.openInEditorAsync = openInEditorAsync;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function _spawnAsync() {
|
|
8
|
+
const data = _interopRequireDefault(require("@expo/spawn-async"));
|
|
9
|
+
_spawnAsync = function() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _envEditor() {
|
|
15
|
+
const data = _interopRequireDefault(require("env-editor"));
|
|
16
|
+
_envEditor = function() {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
9
21
|
var _env = require("./env");
|
|
10
22
|
var Log = _interopRequireWildcard(require("../log"));
|
|
11
23
|
function _interopRequireDefault(obj) {
|
|
@@ -40,13 +52,13 @@ function guessEditor() {
|
|
|
40
52
|
const editor = _env.env.EXPO_EDITOR;
|
|
41
53
|
if (editor) {
|
|
42
54
|
debug("Using $EXPO_EDITOR:", editor);
|
|
43
|
-
return _envEditor.default.getEditor(editor);
|
|
55
|
+
return _envEditor().default.getEditor(editor);
|
|
44
56
|
}
|
|
45
57
|
debug("Falling back on $EDITOR:", editor);
|
|
46
|
-
return _envEditor.default.defaultEditor();
|
|
58
|
+
return _envEditor().default.defaultEditor();
|
|
47
59
|
} catch {
|
|
48
60
|
debug("Falling back on vscode");
|
|
49
|
-
return _envEditor.default.getEditor("vscode");
|
|
61
|
+
return _envEditor().default.getEditor("vscode");
|
|
50
62
|
}
|
|
51
63
|
}
|
|
52
64
|
async function openInEditorAsync(path) {
|
|
@@ -54,7 +66,7 @@ async function openInEditorAsync(path) {
|
|
|
54
66
|
debug(`Opening ${path} in ${editor == null ? void 0 : editor.name} (bin: ${editor == null ? void 0 : editor.binary}, id: ${editor == null ? void 0 : editor.id})`);
|
|
55
67
|
if (editor) {
|
|
56
68
|
try {
|
|
57
|
-
await (
|
|
69
|
+
await _spawnAsync().default(editor.binary, [
|
|
58
70
|
path
|
|
59
71
|
]);
|
|
60
72
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/editor.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport editors from 'env-editor';\n\nimport { env } from './env';\nimport * as Log from '../log';\n\nconst debug = require('debug')('expo:utils:editor') as typeof console.log;\n\n/** Guess what the default editor is and default to VSCode. */\nexport function guessEditor(): editors.Editor {\n try {\n const editor = env.EXPO_EDITOR;\n if (editor) {\n debug('Using $EXPO_EDITOR:', editor);\n return editors.getEditor(editor);\n }\n debug('Falling back on $EDITOR:', editor);\n return editors.defaultEditor();\n } catch {\n debug('Falling back on vscode');\n return editors.getEditor('vscode');\n }\n}\n\n/** Open a file path in a given editor. */\nexport async function openInEditorAsync(path: string): Promise<boolean> {\n const editor = guessEditor();\n\n debug(`Opening ${path} in ${editor?.name} (bin: ${editor?.binary}, id: ${editor?.id})`);\n if (editor) {\n try {\n await spawnAsync(editor.binary, [path]);\n return true;\n } catch (error: any) {\n debug(`Failed to auto open path in editor (path: ${path}, binary: ${editor.binary}):`, error);\n }\n }\n\n Log.error(\n 'Could not open editor, you can set it by defining the $EDITOR environment variable with the binary of your editor. (e.g. \"vscode\" or \"atom\")'\n );\n return false;\n}\n"],"names":["guessEditor","openInEditorAsync","Log","debug","require","editor","env","EXPO_EDITOR","editors","getEditor","defaultEditor","path","name","binary","id","spawnAsync","error"],"mappings":"AAAA;;;;QASgBA,WAAW,GAAXA,WAAW;QAgBLC,iBAAiB,GAAjBA,iBAAiB;
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/editor.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport editors from 'env-editor';\n\nimport { env } from './env';\nimport * as Log from '../log';\n\nconst debug = require('debug')('expo:utils:editor') as typeof console.log;\n\n/** Guess what the default editor is and default to VSCode. */\nexport function guessEditor(): editors.Editor {\n try {\n const editor = env.EXPO_EDITOR;\n if (editor) {\n debug('Using $EXPO_EDITOR:', editor);\n return editors.getEditor(editor);\n }\n debug('Falling back on $EDITOR:', editor);\n return editors.defaultEditor();\n } catch {\n debug('Falling back on vscode');\n return editors.getEditor('vscode');\n }\n}\n\n/** Open a file path in a given editor. */\nexport async function openInEditorAsync(path: string): Promise<boolean> {\n const editor = guessEditor();\n\n debug(`Opening ${path} in ${editor?.name} (bin: ${editor?.binary}, id: ${editor?.id})`);\n if (editor) {\n try {\n await spawnAsync(editor.binary, [path]);\n return true;\n } catch (error: any) {\n debug(`Failed to auto open path in editor (path: ${path}, binary: ${editor.binary}):`, error);\n }\n }\n\n Log.error(\n 'Could not open editor, you can set it by defining the $EDITOR environment variable with the binary of your editor. (e.g. \"vscode\" or \"atom\")'\n );\n return false;\n}\n"],"names":["guessEditor","openInEditorAsync","Log","debug","require","editor","env","EXPO_EDITOR","editors","getEditor","defaultEditor","path","name","binary","id","spawnAsync","error"],"mappings":"AAAA;;;;QASgBA,WAAW,GAAXA,WAAW;QAgBLC,iBAAiB,GAAjBA,iBAAiB;SAzBhB,WAAmB;gDAAnB,mBAAmB;IAAnB,WAAmB;;;;;SACtB,UAAY;gDAAZ,YAAY;IAAZ,UAAY;;;;;AAEZ,IAAA,IAAO,WAAP,OAAO,CAAA;AACfC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,m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CAACc,KAAK,CACP,8IAA8I,CAC/I,CAAC;IACF,OAAO,KAAK,CAAC;CACd"}
|
package/build/src/utils/env.js
CHANGED
|
@@ -3,75 +3,84 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
exports.env = void 0;
|
|
6
|
-
|
|
6
|
+
function _getenv() {
|
|
7
|
+
const data = require("getenv");
|
|
8
|
+
_getenv = function() {
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
7
13
|
// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP
|
|
8
14
|
// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD
|
|
9
15
|
class Env {
|
|
10
16
|
/** Enable profiling metrics */ get EXPO_PROFILE() {
|
|
11
|
-
return (
|
|
17
|
+
return _getenv().boolish("EXPO_PROFILE", false);
|
|
12
18
|
}
|
|
13
19
|
/** Enable debug logging */ get EXPO_DEBUG() {
|
|
14
|
-
return (
|
|
20
|
+
return _getenv().boolish("EXPO_DEBUG", false);
|
|
15
21
|
}
|
|
16
22
|
/** Disable all network requests */ get EXPO_OFFLINE() {
|
|
17
|
-
return (
|
|
23
|
+
return _getenv().boolish("EXPO_OFFLINE", false);
|
|
18
24
|
}
|
|
19
25
|
/** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */ get EXPO_BETA() {
|
|
20
|
-
return (
|
|
26
|
+
return _getenv().boolish("EXPO_BETA", false);
|
|
21
27
|
}
|
|
22
28
|
/** Enable staging API environment */ get EXPO_STAGING() {
|
|
23
|
-
return (
|
|
29
|
+
return _getenv().boolish("EXPO_STAGING", false);
|
|
24
30
|
}
|
|
25
31
|
/** Enable local API environment */ get EXPO_LOCAL() {
|
|
26
|
-
return (
|
|
32
|
+
return _getenv().boolish("EXPO_LOCAL", false);
|
|
27
33
|
}
|
|
28
34
|
/** Is running in non-interactive CI mode */ get CI() {
|
|
29
|
-
return (
|
|
35
|
+
return _getenv().boolish("CI", false);
|
|
30
36
|
}
|
|
31
37
|
/** Disable telemetry (analytics) */ get EXPO_NO_TELEMETRY() {
|
|
32
|
-
return (
|
|
38
|
+
return _getenv().boolish("EXPO_NO_TELEMETRY", false);
|
|
39
|
+
}
|
|
40
|
+
/** Disable detaching telemetry to separate process */ get EXPO_NO_TELEMETRY_DETACH() {
|
|
41
|
+
return _getenv().boolish("EXPO_NO_TELEMETRY_DETACH", false);
|
|
33
42
|
}
|
|
34
43
|
/** local directory to the universe repo for testing locally */ get EXPO_UNIVERSE_DIR() {
|
|
35
|
-
return (
|
|
44
|
+
return _getenv().string("EXPO_UNIVERSE_DIR", "");
|
|
36
45
|
}
|
|
37
46
|
/** @deprecated Default Webpack host string */ get WEB_HOST() {
|
|
38
|
-
return (
|
|
47
|
+
return _getenv().string("WEB_HOST", "0.0.0.0");
|
|
39
48
|
}
|
|
40
49
|
/** Skip warning users about a dirty git status */ get EXPO_NO_GIT_STATUS() {
|
|
41
|
-
return (
|
|
50
|
+
return _getenv().boolish("EXPO_NO_GIT_STATUS", false);
|
|
42
51
|
}
|
|
43
52
|
/** Disable auto web setup */ get EXPO_NO_WEB_SETUP() {
|
|
44
|
-
return (
|
|
53
|
+
return _getenv().boolish("EXPO_NO_WEB_SETUP", false);
|
|
45
54
|
}
|
|
46
55
|
/** Disable auto TypeScript setup */ get EXPO_NO_TYPESCRIPT_SETUP() {
|
|
47
|
-
return (
|
|
56
|
+
return _getenv().boolish("EXPO_NO_TYPESCRIPT_SETUP", false);
|
|
48
57
|
}
|
|
49
58
|
/** Disable all API caches. Does not disable bundler caches. */ get EXPO_NO_CACHE() {
|
|
50
|
-
return (
|
|
59
|
+
return _getenv().boolish("EXPO_NO_CACHE", false);
|
|
51
60
|
}
|
|
52
61
|
/** Disable the app select redirect page. */ get EXPO_NO_REDIRECT_PAGE() {
|
|
53
|
-
return (
|
|
62
|
+
return _getenv().boolish("EXPO_NO_REDIRECT_PAGE", false);
|
|
54
63
|
}
|
|
55
64
|
/** The React Metro port that's baked into react-native scripts and tools. */ get RCT_METRO_PORT() {
|
|
56
|
-
return (
|
|
65
|
+
return _getenv().int("RCT_METRO_PORT", 0);
|
|
57
66
|
}
|
|
58
67
|
/** Skip validating the manifest during `export`. */ get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN() {
|
|
59
|
-
return !!(
|
|
68
|
+
return !!_getenv().string("EXPO_SKIP_MANIFEST_VALIDATION_TOKEN", "");
|
|
60
69
|
}
|
|
61
70
|
/** Public folder path relative to the project root. Default to `public` */ get EXPO_PUBLIC_FOLDER() {
|
|
62
|
-
return (
|
|
71
|
+
return _getenv().string("EXPO_PUBLIC_FOLDER", "public");
|
|
63
72
|
}
|
|
64
73
|
/** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */ get EXPO_EDITOR() {
|
|
65
|
-
return (
|
|
74
|
+
return _getenv().string("EXPO_EDITOR", "");
|
|
66
75
|
}
|
|
67
76
|
/** Enable auto server root detection for Metro. This will change the server root to the workspace root. */ get EXPO_USE_METRO_WORKSPACE_ROOT() {
|
|
68
|
-
return (
|
|
77
|
+
return _getenv().boolish("EXPO_USE_METRO_WORKSPACE_ROOT", false);
|
|
69
78
|
}
|
|
70
79
|
/**
|
|
71
80
|
* Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.
|
|
72
81
|
* This is useful for browser editors that require custom proxy URLs.
|
|
73
82
|
*/ get EXPO_PACKAGER_PROXY_URL() {
|
|
74
|
-
return (
|
|
83
|
+
return _getenv().string("EXPO_PACKAGER_PROXY_URL", "");
|
|
75
84
|
}
|
|
76
85
|
/**
|
|
77
86
|
* **Experimental** - Disable using `exp.direct` as the hostname for
|
|
@@ -82,7 +91,7 @@ class Env {
|
|
|
82
91
|
*
|
|
83
92
|
* Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.
|
|
84
93
|
*/ get EXPO_TUNNEL_SUBDOMAIN() {
|
|
85
|
-
const subdomain = (
|
|
94
|
+
const subdomain = _getenv().string("EXPO_TUNNEL_SUBDOMAIN", "");
|
|
86
95
|
if ([
|
|
87
96
|
"0",
|
|
88
97
|
"false",
|
|
@@ -102,7 +111,7 @@ class Env {
|
|
|
102
111
|
*
|
|
103
112
|
* By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.
|
|
104
113
|
*/ get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE() {
|
|
105
|
-
return (
|
|
114
|
+
return _getenv().boolish("EXPO_METRO_NO_MAIN_FIELD_OVERRIDE", false);
|
|
106
115
|
}
|
|
107
116
|
/**
|
|
108
117
|
* HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).
|
|
@@ -113,25 +122,25 @@ class Env {
|
|
|
113
122
|
* Use the network inspector by overriding the metro inspector proxy with a custom version.
|
|
114
123
|
* @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.
|
|
115
124
|
*/ get EXPO_NO_INSPECTOR_PROXY() {
|
|
116
|
-
return (
|
|
125
|
+
return _getenv().boolish("EXPO_NO_INSPECTOR_PROXY", false);
|
|
117
126
|
}
|
|
118
127
|
/** Disable lazy bundling in Metro bundler. */ get EXPO_NO_METRO_LAZY() {
|
|
119
|
-
return (
|
|
128
|
+
return _getenv().boolish("EXPO_NO_METRO_LAZY", false);
|
|
120
129
|
}
|
|
121
130
|
/** Enable the unstable inverse dependency stack trace for Metro bundling errors. */ get EXPO_METRO_UNSTABLE_ERRORS() {
|
|
122
|
-
return (
|
|
131
|
+
return _getenv().boolish("EXPO_METRO_UNSTABLE_ERRORS", false);
|
|
123
132
|
}
|
|
124
133
|
/** Enable the unstable fast resolver for Metro. */ get EXPO_USE_FAST_RESOLVER() {
|
|
125
|
-
return (
|
|
134
|
+
return _getenv().boolish("EXPO_USE_FAST_RESOLVER", false);
|
|
126
135
|
}
|
|
127
136
|
/** Disable Environment Variable injection in client bundles. */ get EXPO_NO_CLIENT_ENV_VARS() {
|
|
128
|
-
return (
|
|
137
|
+
return _getenv().boolish("EXPO_NO_CLIENT_ENV_VARS", false);
|
|
129
138
|
}
|
|
130
139
|
/** Enable the React Native JS Inspector, instead of the "classic" Chrome DevTools (SDK <=49) */ get EXPO_USE_UNSTABLE_DEBUGGER() {
|
|
131
|
-
return (
|
|
140
|
+
return _getenv().boolish("EXPO_USE_UNSTABLE_DEBUGGER", false);
|
|
132
141
|
}
|
|
133
142
|
/** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */ get EXPO_ADB_USER() {
|
|
134
|
-
return (
|
|
143
|
+
return _getenv().string("EXPO_ADB_USER", "0");
|
|
135
144
|
}
|
|
136
145
|
}
|
|
137
146
|
const env = new Env();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n return string('EXPO_UNIVERSE_DIR', '');\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', false);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', false);\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /** Enable auto server root detection for Metro. This will change the server root to the workspace root. */\n get EXPO_USE_METRO_WORKSPACE_ROOT(): boolean {\n return boolish('EXPO_USE_METRO_WORKSPACE_ROOT', false);\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n return string('EXPO_PACKAGER_PROXY_URL', '');\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /** Enable the unstable inverse dependency stack trace for Metro bundling errors. */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', false);\n }\n\n /** Enable the unstable fast resolver for Metro. */\n get EXPO_USE_FAST_RESOLVER() {\n return boolish('EXPO_USE_FAST_RESOLVER', false);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Enable the React Native JS Inspector, instead of the \"classic\" Chrome DevTools (SDK <=49) */\n get EXPO_USE_UNSTABLE_DEBUGGER(): boolean {\n return boolish('EXPO_USE_UNSTABLE_DEBUGGER', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n}\n\nexport const env = new Env();\n"],"names":["Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_UNIVERSE_DIR","string","WEB_HOST","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_USE_METRO_WORKSPACE_ROOT","EXPO_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","env","http_proxy","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_FAST_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_USE_UNSTABLE_DEBUGGER","EXPO_ADB_USER"],"mappings":"AAAA;;;;;AAAqC,IAAA,OAAQ,WAAR,QAAQ,CAAA;AAE7C,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMA,GAA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,CAAA,QAAlC,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;KAClD;IAED,8CAA8C,CAC9C,IAAIgC,kBAAkB,GAAG;QACvB,OAAOhC,CAAAA,GAAAA,OAAO,AAA6B,CAAA,QAA7B,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;KAC7C;IAED,oFAAoF,CACpF,IAAIiC,0BAA0B,GAAG;QAC/B,OAAOjC,CAAAA,GAAAA,OAAO,AAAqC,CAAA,QAArC,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;KACrD;IAED,mDAAmD,CACnD,IAAIkC,sBAAsB,GAAG;QAC3B,OAAOlC,CAAAA,GAAAA,OAAO,AAAiC,CAAA,QAAjC,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;KACjD;IAED,gEAAgE,CAChE,IAAImC,uBAAuB,GAAY;QACrC,OAAOnC,CAAAA,GAAAA,OAAO,AAAkC,CAAA,QAAlC,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;KAClD;IAED,gGAAgG,CAChG,IAAIoC,0BAA0B,GAAY;QACxC,OAAOpC,CAAAA,GAAAA,OAAO,AAAqC,CAAA,QAArC,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;KACrD;IAED,uKAAuK,CACvK,IAAIqC,aAAa,GAAW;QAC1B,OAAO5B,CAAAA,GAAAA,OAAM,AAAsB,CAAA,OAAtB,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;KACrC;CACF;AAEM,MAAMoB,GAAG,GAAG,IAAI/B,GAAG,EAAE,AAAC;QAAhB+B,GAAG,GAAHA,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** Disable detaching telemetry to separate process */\n get EXPO_NO_TELEMETRY_DETACH() {\n return boolish('EXPO_NO_TELEMETRY_DETACH', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n return string('EXPO_UNIVERSE_DIR', '');\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', false);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', false);\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /** Enable auto server root detection for Metro. This will change the server root to the workspace root. */\n get EXPO_USE_METRO_WORKSPACE_ROOT(): boolean {\n return boolish('EXPO_USE_METRO_WORKSPACE_ROOT', false);\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n return string('EXPO_PACKAGER_PROXY_URL', '');\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /** Enable the unstable inverse dependency stack trace for Metro bundling errors. */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', false);\n }\n\n /** Enable the unstable fast resolver for Metro. */\n get EXPO_USE_FAST_RESOLVER() {\n return boolish('EXPO_USE_FAST_RESOLVER', false);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Enable the React Native JS Inspector, instead of the \"classic\" Chrome DevTools (SDK <=49) */\n get EXPO_USE_UNSTABLE_DEBUGGER(): boolean {\n return boolish('EXPO_USE_UNSTABLE_DEBUGGER', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n}\n\nexport const env = new Env();\n"],"names":["Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_NO_TELEMETRY_DETACH","EXPO_UNIVERSE_DIR","string","WEB_HOST","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_USE_METRO_WORKSPACE_ROOT","EXPO_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","env","http_proxy","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_FAST_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_USE_UNSTABLE_DEBUGGER","EXPO_ADB_USER"],"mappings":"AAAA;;;;;SAAqC,OAAQ;yBAAR,QAAQ;IAAR,OAAQ;;;;;AAE7C,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMA,GAAG;IACP,+BAA+B,CAC/B,IAAIC,YAAY,GAAG;QACjB,OAAOC,OAAO,UAAA,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,2BAA2B,CAC3B,IAAIC,UAAU,GAAG;QACf,OAAOD,OAAO,UAAA,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;KACrC;IAED,mCAAmC,CACnC,IAAIE,YAAY,GAAG;QACjB,OAAOF,OAAO,UAAA,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,wGAAwG,CACxG,IAAIG,SAAS,GAAG;QACd,OAAOH,OAAO,UAAA,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;KACpC;IAED,qCAAqC,CACrC,IAAII,YAAY,GAAG;QACjB,OAAOJ,OAAO,UAAA,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,mCAAmC,CACnC,IAAIK,UAAU,GAAG;QACf,OAAOL,OAAO,UAAA,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;KACrC;IAED,4CAA4C,CAC5C,IAAIM,EAAE,GA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A,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;KAClD;IAED,8CAA8C,CAC9C,IAAIiC,kBAAkB,GAAG;QACvB,OAAOjC,OAAO,UAAA,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;KAC7C;IAED,oFAAoF,CACpF,IAAIkC,0BAA0B,GAAG;QAC/B,OAAOlC,OAAO,UAAA,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;KACrD;IAED,mDAAmD,CACnD,IAAImC,sBAAsB,GAAG;QAC3B,OAAOnC,OAAO,UAAA,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;KACjD;IAED,gEAAgE,CAChE,IAAIoC,uBAAuB,GAAY;QACrC,OAAOpC,OAAO,UAAA,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;KAClD;IAED,gGAAgG,CAChG,IAAIqC,0BAA0B,GAAY;QACxC,OAAOrC,OAAO,UAAA,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;KACrD;IAED,uKAAuK,CACvK,IAAIsC,aAAa,GAAW;QAC1B,OAAO5B,OAAM,SAAA,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;KACrC;CACF;AAEM,MAAMoB,GAAG,GAAG,IAAIhC,GAAG,EAAE,AAAC;QAAhBgC,GAAG,GAAHA,GAAG"}
|
|
@@ -3,8 +3,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
exports.logCmdError = logCmdError;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function _assert() {
|
|
7
|
+
const data = require("assert");
|
|
8
|
+
_assert = function() {
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
function _chalk() {
|
|
14
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
15
|
+
_chalk = function() {
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
return data;
|
|
19
|
+
}
|
|
8
20
|
var _log = require("../log");
|
|
9
21
|
function _interopRequireDefault(obj) {
|
|
10
22
|
return obj && obj.__esModule ? obj : {
|
|
@@ -49,15 +61,18 @@ class SilentError extends CommandError {
|
|
|
49
61
|
}
|
|
50
62
|
exports.SilentError = SilentError;
|
|
51
63
|
function logCmdError(error) {
|
|
64
|
+
if (!(error instanceof Error)) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
52
67
|
if (error instanceof AbortCommandError || error instanceof SilentError) {
|
|
53
68
|
// Do nothing, this is used for prompts or other cases that were custom logged.
|
|
54
69
|
process.exit(0);
|
|
55
|
-
} else if (error instanceof CommandError || error instanceof _assert.AssertionError || error.name === "ApiV2Error" || error.name === "ConfigError") {
|
|
70
|
+
} else if (error instanceof CommandError || error instanceof _assert().AssertionError || error.name === "ApiV2Error" || error.name === "ConfigError") {
|
|
56
71
|
// Print the stack trace in debug mode only.
|
|
57
72
|
(0, _log).exit(error);
|
|
58
73
|
}
|
|
59
|
-
const errorDetails = error.stack ? "\n" + _chalk.default.gray(error.stack) : "";
|
|
60
|
-
(0, _log).exit(_chalk.default.red(error.toString()) + errorDetails);
|
|
74
|
+
const errorDetails = error.stack ? "\n" + _chalk().default.gray(error.stack) : "";
|
|
75
|
+
(0, _log).exit(_chalk().default.red(error.toString()) + errorDetails);
|
|
61
76
|
}
|
|
62
77
|
class UnimplementedError extends Error {
|
|
63
78
|
constructor(){
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\n\nimport { exit } from '../log';\n\nconst ERROR_PREFIX = 'Error: ';\n\n/**\n * General error, formatted as a message in red text when caught by expo-cli (no stack trace is printed). Should be used in favor of `log.error()` in most cases.\n */\nexport class CommandError extends Error {\n name = 'CommandError';\n readonly isCommandError = true;\n\n constructor(\n public code: string,\n message: string = ''\n ) {\n super('');\n // If e.toString() was called to get `message` we don't want it to look\n // like \"Error: Error:\".\n if (message.startsWith(ERROR_PREFIX)) {\n message = message.substring(ERROR_PREFIX.length);\n }\n\n this.message = message || code;\n }\n}\n\nexport class AbortCommandError extends CommandError {\n constructor() {\n super('ABORTED', 'Interactive prompt was cancelled.');\n }\n}\n\n/**\n * Used to end a CLI process without printing a stack trace in the Expo CLI. Should be used in favor of `process.exit`.\n */\nexport class SilentError extends CommandError {\n constructor(messageOrError?: string | Error) {\n const message =\n (typeof messageOrError === 'string' ? messageOrError : messageOrError?.message) ??\n 'This error should fail silently in the CLI';\n super('SILENT', message);\n if (typeof messageOrError !== 'string') {\n // forward the props of the incoming error for tests or processes outside of expo-cli that use expo cli internals.\n this.stack = messageOrError?.stack ?? this.stack;\n this.name = messageOrError?.name ?? this.name;\n }\n }\n}\n\nexport function logCmdError(error:
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\n\nimport { exit } from '../log';\n\nconst ERROR_PREFIX = 'Error: ';\n\n/**\n * General error, formatted as a message in red text when caught by expo-cli (no stack trace is printed). Should be used in favor of `log.error()` in most cases.\n */\nexport class CommandError extends Error {\n name = 'CommandError';\n readonly isCommandError = true;\n\n constructor(\n public code: string,\n message: string = ''\n ) {\n super('');\n // If e.toString() was called to get `message` we don't want it to look\n // like \"Error: Error:\".\n if (message.startsWith(ERROR_PREFIX)) {\n message = message.substring(ERROR_PREFIX.length);\n }\n\n this.message = message || code;\n }\n}\n\nexport class AbortCommandError extends CommandError {\n constructor() {\n super('ABORTED', 'Interactive prompt was cancelled.');\n }\n}\n\n/**\n * Used to end a CLI process without printing a stack trace in the Expo CLI. Should be used in favor of `process.exit`.\n */\nexport class SilentError extends CommandError {\n constructor(messageOrError?: string | Error) {\n const message =\n (typeof messageOrError === 'string' ? messageOrError : messageOrError?.message) ??\n 'This error should fail silently in the CLI';\n super('SILENT', message);\n if (typeof messageOrError !== 'string') {\n // forward the props of the incoming error for tests or processes outside of expo-cli that use expo cli internals.\n this.stack = messageOrError?.stack ?? this.stack;\n this.name = messageOrError?.name ?? this.name;\n }\n }\n}\n\nexport function logCmdError(error: any): never {\n if (!(error instanceof Error)) {\n throw error;\n }\n if (error instanceof AbortCommandError || error instanceof SilentError) {\n // Do nothing, this is used for prompts or other cases that were custom logged.\n process.exit(0);\n } else if (\n error instanceof CommandError ||\n error instanceof AssertionError ||\n error.name === 'ApiV2Error' ||\n error.name === 'ConfigError'\n ) {\n // Print the stack trace in debug mode only.\n exit(error);\n }\n\n const errorDetails = error.stack ? '\\n' + chalk.gray(error.stack) : '';\n\n exit(chalk.red(error.toString()) + errorDetails);\n}\n\n/** This should never be thrown in production. */\nexport class UnimplementedError extends Error {\n constructor() {\n super('Unimplemented');\n this.name = 'UnimplementedError';\n }\n}\n"],"names":["logCmdError","ERROR_PREFIX","CommandError","Error","constructor","code","message","name","isCommandError","startsWith","substring","length","AbortCommandError","SilentError","messageOrError","stack","error","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","UnimplementedError"],"mappings":"AAAA;;;;QAoDgBA,WAAW,GAAXA,WAAW;SApDI,OAAQ;yBAAR,QAAQ;IAAR,OAAQ;;;;;SACrB,MAAO;gDAAP,OAAO;IAAP,MAAO;;;;;AAEJ,IAAA,IAAQ,WAAR,QAAQ,CAAA;;;;;;AAE7B,MAAMC,YAAY,GAAG,SAAS,AAAC;AAKxB,MAAMC,YAAY,SAASC,KAAK;IAIrCC,YACSC,IAAY,EACnBC,OAAe,GAAG,EAAE,CACpB;QACA,KAAK,CAAC,EAAE,CAAC,CAAC;aAHHD,IAAY,GAAZA,IAAY;aAJrBE,IAAI,GAAG,cAAc;aACZC,cAAc,GAAG,IAAI;QAO5B,uEAAuE;QACvE,wBAAwB;QACxB,IAAIF,OAAO,CAACG,UAAU,CAACR,YAAY,CAAC,EAAE;YACpCK,OAAO,GAAGA,OAAO,CAACI,SAAS,CAACT,YAAY,CAACU,MAAM,CAAC,CAAC;SAClD;QAED,IAAI,CAACL,OAA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AAC,CAAC;KACjB,MAAM,IACLF,KAAK,YAAYd,YAAY,IAC7Bc,KAAK,YAAYG,OAAc,iBAAA,IAC/BH,KAAK,CAACT,IAAI,KAAK,YAAY,IAC3BS,KAAK,CAACT,IAAI,KAAK,aAAa,EAC5B;QACA,4CAA4C;QAC5CW,CAAAA,GAAAA,IAAI,AAAO,CAAA,KAAP,CAACF,KAAK,CAAC,CAAC;KACb;IAED,MAAMI,YAAY,GAAGJ,KAAK,CAACD,KAAK,GAAG,IAAI,GAAGM,MAAK,UAAA,CAACC,IAAI,CAACN,KAAK,CAACD,KAAK,CAAC,GAAG,EAAE,AAAC;IAEvEG,CAAAA,GAAAA,IAAI,AAA4C,CAAA,KAA5C,CAACG,MAAK,UAAA,CAACE,GAAG,CAACP,KAAK,CAACQ,QAAQ,EAAE,CAAC,GAAGJ,YAAY,CAAC,CAAC;CAClD;AAGM,MAAMK,kBAAkB,SAAStB,KAAK;IAC3CC,aAAc;QACZ,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAACG,IAAI,GAAG,oBAAoB,CAAC;KAClC;CACF;QALYkB,kBAAkB,GAAlBA,kBAAkB"}
|
|
@@ -3,8 +3,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
exports.findUpProjectRootOrAssert = findUpProjectRootOrAssert;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function _path() {
|
|
7
|
+
const data = _interopRequireDefault(require("path"));
|
|
8
|
+
_path = function() {
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
function _resolveFrom() {
|
|
14
|
+
const data = _interopRequireDefault(require("resolve-from"));
|
|
15
|
+
_resolveFrom = function() {
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
return data;
|
|
19
|
+
}
|
|
8
20
|
var _errors = require("../utils/errors");
|
|
9
21
|
function _interopRequireDefault(obj) {
|
|
10
22
|
return obj && obj.__esModule ? obj : {
|
|
@@ -21,13 +33,13 @@ function findUpProjectRootOrAssert(cwd) {
|
|
|
21
33
|
function findUpProjectRoot(cwd) {
|
|
22
34
|
if ([
|
|
23
35
|
".",
|
|
24
|
-
_path.default.sep
|
|
36
|
+
_path().default.sep
|
|
25
37
|
].includes(cwd)) return null;
|
|
26
|
-
const found = _resolveFrom.default.silent(cwd, "./package.json");
|
|
38
|
+
const found = _resolveFrom().default.silent(cwd, "./package.json");
|
|
27
39
|
if (found) {
|
|
28
|
-
return _path.default.dirname(found);
|
|
40
|
+
return _path().default.dirname(found);
|
|
29
41
|
}
|
|
30
|
-
return findUpProjectRoot(_path.default.dirname(cwd));
|
|
42
|
+
return findUpProjectRoot(_path().default.dirname(cwd));
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
//# sourceMappingURL=findUp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { CommandError } from '../utils/errors';\n\n/** Look up directories until one with a `package.json` can be found, assert if none can be found. */\nexport function findUpProjectRootOrAssert(cwd: string): string {\n const projectRoot = findUpProjectRoot(cwd);\n if (!projectRoot) {\n throw new CommandError(`Project root directory not found (working directory: ${cwd})`);\n }\n return projectRoot;\n}\n\nfunction findUpProjectRoot(cwd: string): string | null {\n if (['.', path.sep].includes(cwd)) return null;\n\n const found = resolveFrom.silent(cwd, './package.json');\n if (found) {\n return path.dirname(found);\n }\n return findUpProjectRoot(path.dirname(cwd));\n}\n"],"names":["findUpProjectRootOrAssert","cwd","projectRoot","findUpProjectRoot","CommandError","path","sep","includes","found","resolveFrom","silent","dirname"],"mappings":"AAAA;;;;QAMgBA,yBAAyB,GAAzBA,yBAAyB;
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { CommandError } from '../utils/errors';\n\n/** Look up directories until one with a `package.json` can be found, assert if none can be found. */\nexport function findUpProjectRootOrAssert(cwd: string): string {\n const projectRoot = findUpProjectRoot(cwd);\n if (!projectRoot) {\n throw new CommandError(`Project root directory not found (working directory: ${cwd})`);\n }\n return projectRoot;\n}\n\nfunction findUpProjectRoot(cwd: string): string | null {\n if (['.', path.sep].includes(cwd)) return null;\n\n const found = resolveFrom.silent(cwd, './package.json');\n if (found) {\n return path.dirname(found);\n }\n return findUpProjectRoot(path.dirname(cwd));\n}\n"],"names":["findUpProjectRootOrAssert","cwd","projectRoot","findUpProjectRoot","CommandError","path","sep","includes","found","resolveFrom","silent","dirname"],"mappings":"AAAA;;;;QAMgBA,yBAAyB,GAAzBA,yBAAyB;SANxB,KAAM;gDAAN,MAAM;IAAN,KAAM;;;;;SACC,YAAc;gDAAd,cAAc;IAAd,YAAc;;;;;AAET,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;AAGvC,SAASA,yBAAyB,CAACC,GAAW,EAAU;IAC7D,MAAMC,WAAW,GAAGC,iBAAiB,CAACF,GAAG,CAAC,AAAC;IAC3C,IAAI,CAACC,WAAW,EAAE;QAChB,MAAM,IAAIE,OAAY,aAAA,CAAC,CAAC,qDAAqD,EAAEH,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;KACxF;IACD,OAAOC,WAAW,CAAC;CACpB;AAED,SAASC,iBAAiB,CAACF,GAAW,EAAiB;IACrD,IAAI;QAAC,GAAG;QAAEI,KAAI,UAAA,CAACC,GAAG;KAAC,CAACC,QAAQ,CAACN,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC;IAE/C,MAAMO,KAAK,GAAGC,YAAW,UAAA,CAACC,MAAM,CAACT,GAAG,EAAE,gBAAgB,CAAC,AAAC;IACxD,IAAIO,KAAK,EAAE;QACT,OAAOH,KAAI,UAAA,CAACM,OAAO,CAACH,KAAK,CAAC,CAAC;KAC5B;IACD,OAAOL,iBAAiB,CAACE,KAAI,UAAA,CAACM,OAAO,CAACV,GAAG,CAAC,CAAC,CAAC;CAC7C"}
|
|
@@ -4,8 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
exports.getOrPromptForBundleIdentifier = getOrPromptForBundleIdentifier;
|
|
6
6
|
exports.getOrPromptForPackage = getOrPromptForPackage;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function _config() {
|
|
8
|
+
const data = require("@expo/config");
|
|
9
|
+
_config = function() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _chalk() {
|
|
15
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
16
|
+
_chalk = function() {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
9
21
|
var _link = require("./link");
|
|
10
22
|
var _modifyConfigAsync = require("./modifyConfigAsync");
|
|
11
23
|
var _prompts = _interopRequireWildcard(require("./prompts"));
|
|
@@ -40,18 +52,18 @@ function _interopRequireWildcard(obj) {
|
|
|
40
52
|
function getUsernameAsync(exp) {
|
|
41
53
|
// TODO: Use XDL's UserManager
|
|
42
54
|
// import { UserManager } from 'xdl';
|
|
43
|
-
return (
|
|
55
|
+
return _config().getAccountUsername(exp);
|
|
44
56
|
}
|
|
45
57
|
const NO_BUNDLE_ID_MESSAGE = `Project must have a \`ios.bundleIdentifier\` set in the Expo config (app.json or app.config.js).`;
|
|
46
58
|
const NO_PACKAGE_MESSAGE = `Project must have a \`android.package\` set in the Expo config (app.json or app.config.js).`;
|
|
47
|
-
async function getOrPromptForBundleIdentifier(projectRoot, exp = (
|
|
59
|
+
async function getOrPromptForBundleIdentifier(projectRoot, exp = _config().getConfig(projectRoot).exp) {
|
|
48
60
|
var ref;
|
|
49
61
|
const current = (ref = exp.ios) == null ? void 0 : ref.bundleIdentifier;
|
|
50
62
|
if (current) {
|
|
51
63
|
(0, _validateApplicationId).assertValidBundleId(current);
|
|
52
64
|
return current;
|
|
53
65
|
}
|
|
54
|
-
Log.log(_chalk.default`\n{bold 📝 iOS Bundle Identifier} {dim ${(0, _link).learnMore("https://expo.fyi/bundle-identifier")}}\n`);
|
|
66
|
+
Log.log(_chalk().default`\n{bold 📝 iOS Bundle Identifier} {dim ${(0, _link).learnMore("https://expo.fyi/bundle-identifier")}}\n`);
|
|
55
67
|
return await promptForBundleIdAsync(projectRoot, exp);
|
|
56
68
|
}
|
|
57
69
|
async function promptForBundleIdAsync(projectRoot, exp) {
|
|
@@ -133,14 +145,14 @@ async function getRecommendedPackageNameAsync(exp) {
|
|
|
133
145
|
}
|
|
134
146
|
return null;
|
|
135
147
|
}
|
|
136
|
-
async function getOrPromptForPackage(projectRoot, exp = (
|
|
148
|
+
async function getOrPromptForPackage(projectRoot, exp = _config().getConfig(projectRoot).exp) {
|
|
137
149
|
var ref;
|
|
138
150
|
const current = (ref = exp.android) == null ? void 0 : ref.package;
|
|
139
151
|
if (current) {
|
|
140
152
|
(0, _validateApplicationId).assertValidPackage(current);
|
|
141
153
|
return current;
|
|
142
154
|
}
|
|
143
|
-
Log.log(_chalk.default`\n{bold 📝 Android package} {dim ${(0, _link).learnMore("https://expo.fyi/android-package")}}\n`);
|
|
155
|
+
Log.log(_chalk().default`\n{bold 📝 Android package} {dim ${(0, _link).learnMore("https://expo.fyi/android-package")}}\n`);
|
|
144
156
|
return await promptForPackageAsync(projectRoot, exp);
|
|
145
157
|
}
|
|
146
158
|
async function promptForPackageAsync(projectRoot, exp) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/getOrPromptApplicationId.ts"],"sourcesContent":["import { ExpoConfig, getAccountUsername, getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { learnMore } from './link';\nimport { attemptModification } from './modifyConfigAsync';\nimport prompt, { confirmAsync } from './prompts';\nimport {\n assertValidBundleId,\n assertValidPackage,\n getBundleIdWarningAsync,\n getPackageNameWarningAsync,\n validateBundleId,\n validatePackage,\n validatePackageWithWarning,\n} from './validateApplicationId';\nimport * as Log from '../log';\n\nfunction getUsernameAsync(exp: ExpoConfig) {\n // TODO: Use XDL's UserManager\n // import { UserManager } from 'xdl';\n return getAccountUsername(exp);\n}\n\nconst NO_BUNDLE_ID_MESSAGE = `Project must have a \\`ios.bundleIdentifier\\` set in the Expo config (app.json or app.config.js).`;\n\nconst NO_PACKAGE_MESSAGE = `Project must have a \\`android.package\\` set in the Expo config (app.json or app.config.js).`;\n\n/**\n * Get the bundle identifier from the Expo config or prompt the user to choose a new bundle identifier.\n * Prompted value will be validated against the App Store and a local regex.\n * If the project Expo config is a static JSON file, the bundle identifier will be updated in the config automatically.\n */\nexport async function getOrPromptForBundleIdentifier(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.ios?.bundleIdentifier;\n if (current) {\n assertValidBundleId(current);\n return current;\n }\n\n Log.log(\n chalk`\\n{bold 📝 iOS Bundle Identifier} {dim ${learnMore(\n 'https://expo.fyi/bundle-identifier'\n )}}\\n`\n );\n\n return await promptForBundleIdAsync(projectRoot, exp);\n}\n\nasync function promptForBundleIdAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n // Prompt the user for the bundle ID.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom bundle ID upfront.\n const { bundleIdentifier } = await prompt(\n {\n type: 'text',\n name: 'bundleIdentifier',\n initial: (await getRecommendedBundleIdAsync(exp)) ?? undefined,\n // The Apple helps people know this isn't an EAS feature.\n message: `What would you like your iOS bundle identifier to be?`,\n validate: validateBundleId,\n },\n {\n nonInteractiveHelp: NO_BUNDLE_ID_MESSAGE,\n }\n );\n\n // Warn the user if the bundle ID is already in use.\n const warning = await getBundleIdWarningAsync(bundleIdentifier);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Bundle ID prompt to try again.\n return await promptForBundleIdAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n await attemptModification(\n projectRoot,\n {\n ios: { ...(exp.ios || {}), bundleIdentifier },\n },\n { ios: { bundleIdentifier } }\n );\n\n return bundleIdentifier;\n}\n\nasync function warnAndConfirmAsync(warning: string): Promise<boolean> {\n Log.log();\n Log.warn(warning);\n Log.log();\n if (\n !(await confirmAsync({\n message: `Continue?`,\n initial: true,\n }))\n ) {\n return false;\n }\n return true;\n}\n\n// Recommend a bundle identifier based on the username and project slug.\nasync function getRecommendedBundleIdAsync(exp: ExpoConfig): Promise<string | null> {\n // Attempt to use the android package name first since it's convenient to have them aligned.\n if (exp.android?.package && validateBundleId(exp.android?.package)) {\n return exp.android?.package;\n } else {\n const username = await getUsernameAsync(exp);\n const possibleId = `com.${username}.${exp.slug}`;\n if (username && validateBundleId(possibleId)) {\n return possibleId;\n }\n }\n\n return null;\n}\n\n// Recommend a package name based on the username and project slug.\nasync function getRecommendedPackageNameAsync(exp: ExpoConfig): Promise<string | null> {\n // Attempt to use the ios bundle id first since it's convenient to have them aligned.\n if (exp.ios?.bundleIdentifier && validatePackage(exp.ios.bundleIdentifier)) {\n return exp.ios.bundleIdentifier;\n } else {\n const username = await getUsernameAsync(exp);\n // It's common to use dashes in your node project name, strip them from the suggested package name.\n const possibleId = `com.${username}.${exp.slug}`.split('-').join('');\n if (username && validatePackage(possibleId)) {\n return possibleId;\n }\n }\n return null;\n}\n\n/**\n * Get the package name from the Expo config or prompt the user to choose a new package name.\n * Prompted value will be validated against the Play Store and a local regex.\n * If the project Expo config is a static JSON file, the package name will be updated in the config automatically.\n */\nexport async function getOrPromptForPackage(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.android?.package;\n if (current) {\n assertValidPackage(current);\n return current;\n }\n\n Log.log(\n chalk`\\n{bold 📝 Android package} {dim ${learnMore('https://expo.fyi/android-package')}}\\n`\n );\n\n return await promptForPackageAsync(projectRoot, exp);\n}\n\nasync function promptForPackageAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n // Prompt the user for the android package.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom android package upfront.\n const { packageName } = await prompt(\n {\n type: 'text',\n name: 'packageName',\n initial: (await getRecommendedPackageNameAsync(exp)) ?? undefined,\n message: `What would you like your Android package name to be?`,\n validate: validatePackageWithWarning,\n },\n {\n nonInteractiveHelp: NO_PACKAGE_MESSAGE,\n }\n );\n\n // Warn the user if the package name is already in use.\n const warning = await getPackageNameWarningAsync(packageName);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Package name prompt to try again.\n return await promptForPackageAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n await attemptModification(\n projectRoot,\n {\n android: { ...(exp.android || {}), package: packageName },\n },\n {\n android: { package: packageName },\n }\n );\n\n return packageName;\n}\n"],"names":["getOrPromptForBundleIdentifier","getOrPromptForPackage","Log","getUsernameAsync","exp","getAccountUsername","NO_BUNDLE_ID_MESSAGE","NO_PACKAGE_MESSAGE","projectRoot","getConfig","current","ios","bundleIdentifier","assertValidBundleId","log","chalk","learnMore","promptForBundleIdAsync","prompt","type","name","initial","getRecommendedBundleIdAsync","undefined","message","validate","validateBundleId","nonInteractiveHelp","warning","getBundleIdWarningAsync","warnAndConfirmAsync","attemptModification","warn","confirmAsync","android","package","username","possibleId","slug","getRecommendedPackageNameAsync","validatePackage","split","join","assertValidPackage","promptForPackageAsync","packageName","validatePackageWithWarning","getPackageNameWarningAsync"],"mappings":"AAAA;;;;QAgCsBA,8BAA8B,GAA9BA,8BAA8B;QA6G9BC,qBAAqB,GAArBA,qBAAqB;AA7Ie,IAAA,OAAc,WAAd,cAAc,CAAA;AACtD,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEC,IAAA,KAAQ,WAAR,QAAQ,CAAA;AACE,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACpB,IAAA,QAAW,mCAAX,WAAW,EAAA;AASzC,IAAA,sBAAyB,WAAzB,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AW,CAAA,EAAE,GAAG,MAAM3B,CAAAA,GAAAA,QAAM,AAWnC,CAAA,QAXmC,CAClC;QACEC,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,aAAa;QACnBC,OAAO,EAAE,CAAA,GAA2C,GAA1C,MAAMkB,8BAA8B,CAACnC,GAAG,CAAC,YAA1C,GAA2C,GAAImB,SAAS;QACjEC,OAAO,EAAE,CAAC,oDAAoD,CAAC;QAC/DC,QAAQ,EAAEqB,sBAA0B,2BAAA;KACrC,EACD;QACEnB,kBAAkB,EAAEpB,kBAAkB;KACvC,CACF,AAAC;IAEF,uDAAuD;IACvD,MAAMqB,OAAO,GAAG,MAAMmB,CAAAA,GAAAA,sBAA0B,AAAa,CAAA,2BAAb,CAACF,WAAW,CAAC,AAAC;IAC9D,IAAIjB,OAAO,IAAI,CAAE,MAAME,mBAAmB,CAACF,OAAO,CAAC,AAAC,EAAE;QACpD,8CAA8C;QAC9C,OAAO,MAAMgB,qBAAqB,CAACpC,WAAW,EAAEJ,GAAG,CAAC,CAAC;KACtD;IAED,mCAAmC;IACnC,MAAM2B,CAAAA,GAAAA,kBAAmB,AAQxB,CAAA,oBARwB,CACvBvB,WAAW,EACX;QACE0B,OAAO,EAAE;YAAE,GAAI9B,GAAG,CAAC8B,OAAO,IAAI,EAAE;YAAGC,OAAO,EAAEU,WAAW;SAAE;KAC1D,EACD;QACEX,OAAO,EAAE;YAAEC,OAAO,EAAEU,WAAW;SAAE;KAClC,CACF,CAAC;IAEF,OAAOA,WAAW,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/getOrPromptApplicationId.ts"],"sourcesContent":["import { ExpoConfig, getAccountUsername, getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { learnMore } from './link';\nimport { attemptModification } from './modifyConfigAsync';\nimport prompt, { confirmAsync } from './prompts';\nimport {\n assertValidBundleId,\n assertValidPackage,\n getBundleIdWarningAsync,\n getPackageNameWarningAsync,\n validateBundleId,\n validatePackage,\n validatePackageWithWarning,\n} from './validateApplicationId';\nimport * as Log from '../log';\n\nfunction getUsernameAsync(exp: ExpoConfig) {\n // TODO: Use XDL's UserManager\n // import { UserManager } from 'xdl';\n return getAccountUsername(exp);\n}\n\nconst NO_BUNDLE_ID_MESSAGE = `Project must have a \\`ios.bundleIdentifier\\` set in the Expo config (app.json or app.config.js).`;\n\nconst NO_PACKAGE_MESSAGE = `Project must have a \\`android.package\\` set in the Expo config (app.json or app.config.js).`;\n\n/**\n * Get the bundle identifier from the Expo config or prompt the user to choose a new bundle identifier.\n * Prompted value will be validated against the App Store and a local regex.\n * If the project Expo config is a static JSON file, the bundle identifier will be updated in the config automatically.\n */\nexport async function getOrPromptForBundleIdentifier(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.ios?.bundleIdentifier;\n if (current) {\n assertValidBundleId(current);\n return current;\n }\n\n Log.log(\n chalk`\\n{bold 📝 iOS Bundle Identifier} {dim ${learnMore(\n 'https://expo.fyi/bundle-identifier'\n )}}\\n`\n );\n\n return await promptForBundleIdAsync(projectRoot, exp);\n}\n\nasync function promptForBundleIdAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n // Prompt the user for the bundle ID.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom bundle ID upfront.\n const { bundleIdentifier } = await prompt(\n {\n type: 'text',\n name: 'bundleIdentifier',\n initial: (await getRecommendedBundleIdAsync(exp)) ?? undefined,\n // The Apple helps people know this isn't an EAS feature.\n message: `What would you like your iOS bundle identifier to be?`,\n validate: validateBundleId,\n },\n {\n nonInteractiveHelp: NO_BUNDLE_ID_MESSAGE,\n }\n );\n\n // Warn the user if the bundle ID is already in use.\n const warning = await getBundleIdWarningAsync(bundleIdentifier);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Bundle ID prompt to try again.\n return await promptForBundleIdAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n await attemptModification(\n projectRoot,\n {\n ios: { ...(exp.ios || {}), bundleIdentifier },\n },\n { ios: { bundleIdentifier } }\n );\n\n return bundleIdentifier;\n}\n\nasync function warnAndConfirmAsync(warning: string): Promise<boolean> {\n Log.log();\n Log.warn(warning);\n Log.log();\n if (\n !(await confirmAsync({\n message: `Continue?`,\n initial: true,\n }))\n ) {\n return false;\n }\n return true;\n}\n\n// Recommend a bundle identifier based on the username and project slug.\nasync function getRecommendedBundleIdAsync(exp: ExpoConfig): Promise<string | null> {\n // Attempt to use the android package name first since it's convenient to have them aligned.\n if (exp.android?.package && validateBundleId(exp.android?.package)) {\n return exp.android?.package;\n } else {\n const username = await getUsernameAsync(exp);\n const possibleId = `com.${username}.${exp.slug}`;\n if (username && validateBundleId(possibleId)) {\n return possibleId;\n }\n }\n\n return null;\n}\n\n// Recommend a package name based on the username and project slug.\nasync function getRecommendedPackageNameAsync(exp: ExpoConfig): Promise<string | null> {\n // Attempt to use the ios bundle id first since it's convenient to have them aligned.\n if (exp.ios?.bundleIdentifier && validatePackage(exp.ios.bundleIdentifier)) {\n return exp.ios.bundleIdentifier;\n } else {\n const username = await getUsernameAsync(exp);\n // It's common to use dashes in your node project name, strip them from the suggested package name.\n const possibleId = `com.${username}.${exp.slug}`.split('-').join('');\n if (username && validatePackage(possibleId)) {\n return possibleId;\n }\n }\n return null;\n}\n\n/**\n * Get the package name from the Expo config or prompt the user to choose a new package name.\n * Prompted value will be validated against the Play Store and a local regex.\n * If the project Expo config is a static JSON file, the package name will be updated in the config automatically.\n */\nexport async function getOrPromptForPackage(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.android?.package;\n if (current) {\n assertValidPackage(current);\n return current;\n }\n\n Log.log(\n chalk`\\n{bold 📝 Android package} {dim ${learnMore('https://expo.fyi/android-package')}}\\n`\n );\n\n return await promptForPackageAsync(projectRoot, exp);\n}\n\nasync function promptForPackageAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n // Prompt the user for the android package.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom android package upfront.\n const { packageName } = await prompt(\n {\n type: 'text',\n name: 'packageName',\n initial: (await getRecommendedPackageNameAsync(exp)) ?? undefined,\n message: `What would you like your Android package name to be?`,\n validate: validatePackageWithWarning,\n },\n {\n nonInteractiveHelp: NO_PACKAGE_MESSAGE,\n }\n );\n\n // Warn the user if the package name is already in use.\n const warning = await getPackageNameWarningAsync(packageName);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Package name prompt to try again.\n return await promptForPackageAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n await attemptModification(\n projectRoot,\n {\n android: { ...(exp.android || {}), package: packageName },\n },\n {\n android: { package: packageName },\n }\n );\n\n return packageName;\n}\n"],"names":["getOrPromptForBundleIdentifier","getOrPromptForPackage","Log","getUsernameAsync","exp","getAccountUsername","NO_BUNDLE_ID_MESSAGE","NO_PACKAGE_MESSAGE","projectRoot","getConfig","current","ios","bundleIdentifier","assertValidBundleId","log","chalk","learnMore","promptForBundleIdAsync","prompt","type","name","initial","getRecommendedBundleIdAsync","undefined","message","validate","validateBundleId","nonInteractiveHelp","warning","getBundleIdWarningAsync","warnAndConfirmAsync","attemptModification","warn","confirmAsync","android","package","username","possibleId","slug","getRecommendedPackageNameAsync","validatePackage","split","join","assertValidPackage","promptForPackageAsync","packageName","validatePackageWithWarning","getPackageNameWarningAsync"],"mappings":"AAAA;;;;QAgCsBA,8BAA8B,GAA9BA,8BAA8B;QA6G9BC,qBAAqB,GAArBA,qBAAqB;SA7Ie,OAAc;yBAAd,cAAc;IAAd,OAAc;;;;;SACtD,MAAO;gDAAP,OAAO;IAAP,MAAO;;;;;AAEC,IAAA,KAAQ,WAAR,QAAQ,CAAA;AACE,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACpB,IAAA,QAAW,mCAAX,WAAW,EAAA;AASzC,IAAA,sBAAyB,WAAzB,yBAA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