@expo/cli 1.0.0-canary-20250320-7a205d3 → 1.0.0-canary-20250402-161f57b
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 +93 -91
- package/build/bin/cli.map +1 -1
- package/build/metro-require/require.js +53 -52
- package/build/src/api/endpoint.js +6 -2
- package/build/src/api/endpoint.js.map +1 -1
- package/build/src/api/getExpoGoIntermediateCertificate.js +5 -3
- package/build/src/api/getExpoGoIntermediateCertificate.js.map +1 -1
- package/build/src/api/getExpoSchema.js +16 -12
- package/build/src/api/getExpoSchema.js.map +1 -1
- package/build/src/api/getNativeModuleVersions.js +6 -4
- package/build/src/api/getNativeModuleVersions.js.map +1 -1
- package/build/src/api/getProjectDevelopmentCertificate.js +5 -3
- package/build/src/api/getProjectDevelopmentCertificate.js.map +1 -1
- package/build/src/api/getVersions.js +7 -5
- package/build/src/api/getVersions.js.map +1 -1
- package/build/src/api/graphql/client.js +32 -26
- package/build/src/api/graphql/client.js.map +1 -1
- package/build/src/api/graphql/queries/AppQuery.js +6 -4
- package/build/src/api/graphql/queries/AppQuery.js.map +1 -1
- package/build/src/api/graphql/queries/UserQuery.js +5 -3
- package/build/src/api/graphql/queries/UserQuery.js.map +1 -1
- package/build/src/api/graphql/types/App.js +3 -1
- package/build/src/api/graphql/types/App.js.map +1 -1
- package/build/src/api/rest/cache/FileSystemResponseCache.js +36 -32
- package/build/src/api/rest/cache/FileSystemResponseCache.js.map +1 -1
- package/build/src/api/rest/cache/ResponseCache.js +20 -12
- package/build/src/api/rest/cache/ResponseCache.js.map +1 -1
- package/build/src/api/rest/cache/wrapFetchWithCache.js +13 -11
- package/build/src/api/rest/cache/wrapFetchWithCache.js.map +1 -1
- package/build/src/api/rest/client.js +55 -37
- package/build/src/api/rest/client.js.map +1 -1
- package/build/src/api/rest/client.types.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithBaseUrl.js +5 -3
- package/build/src/api/rest/wrapFetchWithBaseUrl.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithOffline.js +5 -3
- package/build/src/api/rest/wrapFetchWithOffline.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithProgress.js +11 -7
- package/build/src/api/rest/wrapFetchWithProgress.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithProxy.js +5 -3
- package/build/src/api/rest/wrapFetchWithProxy.js.map +1 -1
- package/build/src/api/rest/wrapFetchWithUserAgent.js +8 -6
- package/build/src/api/rest/wrapFetchWithUserAgent.js.map +1 -1
- package/build/src/api/settings.js +7 -5
- package/build/src/api/settings.js.map +1 -1
- package/build/src/api/updateDevelopmentSession.js +23 -17
- package/build/src/api/updateDevelopmentSession.js.map +1 -1
- package/build/src/api/user/UserSettings.js +53 -31
- package/build/src/api/user/UserSettings.js.map +1 -1
- package/build/src/api/user/actions.js +27 -21
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/api/user/expoSsoLauncher.js +30 -26
- package/build/src/api/user/expoSsoLauncher.js.map +1 -1
- package/build/src/api/user/otp.js +35 -29
- package/build/src/api/user/otp.js.map +1 -1
- package/build/src/api/user/user.js +44 -30
- package/build/src/api/user/user.js.map +1 -1
- package/build/src/config/configAsync.js +29 -23
- package/build/src/config/configAsync.js.map +1 -1
- package/build/src/config/index.js +25 -21
- package/build/src/config/index.js.map +1 -1
- package/build/src/customize/customizeAsync.js +8 -6
- package/build/src/customize/customizeAsync.js.map +1 -1
- package/build/src/customize/generate.js +20 -16
- package/build/src/customize/generate.js.map +1 -1
- package/build/src/customize/index.js +14 -12
- package/build/src/customize/index.js.map +1 -1
- package/build/src/customize/resolveOptions.js +4 -2
- package/build/src/customize/resolveOptions.js.map +1 -1
- package/build/src/customize/templates.js +58 -54
- package/build/src/customize/templates.js.map +1 -1
- package/build/src/customize/typescript.js +11 -7
- package/build/src/customize/typescript.js.map +1 -1
- package/build/src/export/createMetadataJson.js +11 -9
- package/build/src/export/createMetadataJson.js.map +1 -1
- package/build/src/export/embed/exportEager.js +8 -6
- package/build/src/export/embed/exportEager.js.map +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +72 -62
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/embed/exportServer.js +57 -55
- package/build/src/export/embed/exportServer.js.map +1 -1
- package/build/src/export/embed/index.js +44 -40
- package/build/src/export/embed/index.js.map +1 -1
- package/build/src/export/embed/resolveOptions.js +44 -36
- package/build/src/export/embed/resolveOptions.js.map +1 -1
- package/build/src/export/embed/xcodeCompilerLogger.js +39 -27
- package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -1
- package/build/src/export/exportApp.js +68 -64
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAssets.js +34 -26
- package/build/src/export/exportAssets.js.map +1 -1
- package/build/src/export/exportAsync.js +13 -9
- package/build/src/export/exportAsync.js.map +1 -1
- package/build/src/export/exportDomComponents.js +53 -45
- package/build/src/export/exportDomComponents.js.map +1 -1
- package/build/src/export/exportHermes.js +75 -53
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +73 -62
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/favicon.js +33 -27
- package/build/src/export/favicon.js.map +1 -1
- package/build/src/export/getPublicExpoManifest.js +7 -5
- package/build/src/export/getPublicExpoManifest.js.map +1 -1
- package/build/src/export/getResolvedLocales.js +11 -9
- package/build/src/export/getResolvedLocales.js.map +1 -1
- package/build/src/export/html.js +10 -6
- package/build/src/export/html.js.map +1 -1
- package/build/src/export/index.js +32 -28
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/metroAssetLocalPath.js +36 -30
- package/build/src/export/metroAssetLocalPath.js.map +1 -1
- package/build/src/export/persistMetroAssets.js +64 -34
- package/build/src/export/persistMetroAssets.js.map +1 -1
- package/build/src/export/publicFolder.js +10 -6
- package/build/src/export/publicFolder.js.map +1 -1
- package/build/src/export/resolveOptions.js +28 -24
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/export/saveAssets.js +50 -46
- package/build/src/export/saveAssets.js.map +1 -1
- package/build/src/export/web/exportWebAsync.js +13 -11
- package/build/src/export/web/exportWebAsync.js.map +1 -1
- package/build/src/export/web/index.js +19 -15
- package/build/src/export/web/index.js.map +1 -1
- package/build/src/export/web/resolveOptions.js +5 -3
- package/build/src/export/web/resolveOptions.js.map +1 -1
- package/build/src/export/writeContents.js +4 -2
- package/build/src/export/writeContents.js.map +1 -1
- package/build/src/graphql/generated.js +705 -479
- package/build/src/graphql/generated.js.map +1 -1
- package/build/src/install/applyPlugins.js +11 -7
- package/build/src/install/applyPlugins.js.map +1 -1
- package/build/src/install/checkPackages.js +26 -22
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/fixPackages.js +16 -12
- package/build/src/install/fixPackages.js.map +1 -1
- package/build/src/install/index.js +18 -16
- package/build/src/install/index.js.map +1 -1
- package/build/src/install/installAsync.js +32 -26
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/install/installExpoPackage.js +22 -18
- package/build/src/install/installExpoPackage.js.map +1 -1
- package/build/src/install/resolveOptions.js +21 -19
- package/build/src/install/resolveOptions.js.map +1 -1
- package/build/src/install/utils/autoAddConfigPlugins.js +18 -14
- package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js +14 -12
- package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
- package/build/src/lint/ESlintPrerequisite.js +50 -44
- package/build/src/lint/ESlintPrerequisite.js.map +1 -1
- package/build/src/lint/index.js +12 -8
- package/build/src/lint/index.js.map +1 -1
- package/build/src/lint/lintAsync.js +10 -8
- package/build/src/lint/lintAsync.js.map +1 -1
- package/build/src/log.js +36 -16
- package/build/src/log.js.map +1 -1
- package/build/src/login/index.js +24 -20
- package/build/src/login/index.js.map +1 -1
- package/build/src/logout/index.js +11 -7
- package/build/src/logout/index.js.map +1 -1
- package/build/src/prebuild/clearNativeFolder.js +38 -26
- package/build/src/prebuild/clearNativeFolder.js.map +1 -1
- package/build/src/prebuild/configureProjectAsync.js +18 -14
- package/build/src/prebuild/configureProjectAsync.js.map +1 -1
- package/build/src/prebuild/copyTemplateFiles.js +17 -13
- package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
- package/build/src/prebuild/ensureConfigAsync.js +6 -4
- package/build/src/prebuild/ensureConfigAsync.js.map +1 -1
- package/build/src/prebuild/index.js +36 -32
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +29 -25
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/prebuild/renameTemplateAppName.js +43 -37
- package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
- package/build/src/prebuild/resolveOptions.js +70 -53
- package/build/src/prebuild/resolveOptions.js.map +1 -1
- package/build/src/prebuild/resolveTemplate.js +36 -32
- package/build/src/prebuild/resolveTemplate.js.map +1 -1
- package/build/src/prebuild/updateFromTemplate.js +19 -13
- package/build/src/prebuild/updateFromTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +53 -39
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/prebuild/validateTemplatePlatforms.js +12 -8
- package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
- package/build/src/register/index.js +11 -7
- package/build/src/register/index.js.map +1 -1
- package/build/src/register/registerAsync.js +5 -3
- package/build/src/register/registerAsync.js.map +1 -1
- package/build/src/run/android/index.js +36 -32
- package/build/src/run/android/index.js.map +1 -1
- package/build/src/run/android/resolveDevice.js +10 -8
- package/build/src/run/android/resolveDevice.js.map +1 -1
- package/build/src/run/android/resolveGradlePropsAsync.js +18 -16
- package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
- package/build/src/run/android/resolveInstallApkName.js +17 -15
- package/build/src/run/android/resolveInstallApkName.js.map +1 -1
- package/build/src/run/android/resolveLaunchProps.js +12 -10
- package/build/src/run/android/resolveLaunchProps.js.map +1 -1
- package/build/src/run/android/resolveOptions.js +4 -2
- package/build/src/run/android/resolveOptions.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +23 -21
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ensureNativeProject.js +7 -5
- package/build/src/run/ensureNativeProject.js.map +1 -1
- package/build/src/run/hints.js +13 -7
- package/build/src/run/hints.js.map +1 -1
- package/build/src/run/index.js +27 -23
- package/build/src/run/index.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.js +80 -60
- package/build/src/run/ios/XcodeBuild.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.types.js.map +1 -1
- package/build/src/run/ios/appleDevice/AppleDevice.js +69 -63
- package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
- package/build/src/run/ios/appleDevice/ClientManager.js +29 -26
- package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/AFCClient.js +28 -25
- package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js +29 -26
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +22 -21
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js +32 -29
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js +28 -24
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/ServiceClient.js +7 -4
- package/build/src/run/ios/appleDevice/client/ServiceClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js +28 -27
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -1
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +23 -17
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +146 -132
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +29 -21
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +29 -21
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +34 -22
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -1
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +27 -17
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -1
- package/build/src/run/ios/codeSigning/Security.js +53 -39
- package/build/src/run/ios/codeSigning/Security.js.map +1 -1
- package/build/src/run/ios/codeSigning/configureCodeSigning.js +13 -9
- package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -1
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +27 -19
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -1
- package/build/src/run/ios/codeSigning/settings.js +9 -5
- package/build/src/run/ios/codeSigning/settings.js.map +1 -1
- package/build/src/run/ios/codeSigning/simulatorCodeSigning.js +14 -12
- package/build/src/run/ios/codeSigning/simulatorCodeSigning.js.map +1 -1
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +27 -21
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -1
- package/build/src/run/ios/index.js +40 -36
- package/build/src/run/ios/index.js.map +1 -1
- package/build/src/run/ios/launchApp.js +23 -17
- package/build/src/run/ios/launchApp.js.map +1 -1
- package/build/src/run/ios/options/appleDestinations.js +38 -36
- package/build/src/run/ios/options/appleDestinations.js.map +1 -1
- package/build/src/run/ios/options/promptDevice.js +20 -16
- package/build/src/run/ios/options/promptDevice.js.map +1 -1
- package/build/src/run/ios/options/resolveDevice.js +30 -24
- package/build/src/run/ios/options/resolveDevice.js.map +1 -1
- package/build/src/run/ios/options/resolveNativeScheme.js +31 -23
- package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -1
- package/build/src/run/ios/options/resolveOptions.js +7 -5
- package/build/src/run/ios/options/resolveOptions.js.map +1 -1
- package/build/src/run/ios/options/resolveXcodeProject.js +7 -5
- package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +48 -44
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/run/ios/validateExternalBinary.js +24 -22
- package/build/src/run/ios/validateExternalBinary.js.map +1 -1
- package/build/src/run/resolveBundlerProps.js +4 -2
- package/build/src/run/resolveBundlerProps.js.map +1 -1
- package/build/src/run/startBundler.js +16 -12
- package/build/src/run/startBundler.js.map +1 -1
- package/build/src/serve/index.js +20 -16
- package/build/src/serve/index.js.map +1 -1
- package/build/src/serve/serveAsync.js +36 -32
- package/build/src/serve/serveAsync.js.map +1 -1
- package/build/src/start/detectDevClient.js +13 -9
- package/build/src/start/detectDevClient.js.map +1 -1
- package/build/src/start/doctor/Prerequisite.js +12 -7
- package/build/src/start/doctor/Prerequisite.js.map +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js +13 -11
- package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +23 -19
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js +23 -19
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js +51 -45
- package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcrunPrerequisite.js +18 -16
- package/build/src/start/doctor/apple/XcrunPrerequisite.js.map +1 -1
- package/build/src/start/doctor/dependencies/bundledNativeModules.js +23 -19
- package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +31 -25
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
- package/build/src/start/doctor/dependencies/getMissingPackages.js +25 -17
- package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/getVersionedPackages.js +40 -32
- package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js +32 -26
- package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +41 -31
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +34 -29
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/doctor/ngrok/NgrokResolver.js +12 -8
- package/build/src/start/doctor/ngrok/NgrokResolver.js.map +1 -1
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js +32 -28
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
- package/build/src/start/doctor/typescript/updateTSConfig.js +23 -17
- package/build/src/start/doctor/typescript/updateTSConfig.js.map +1 -1
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +33 -27
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
- package/build/src/start/index.js +46 -42
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/interface/KeyPressHandler.js +18 -14
- package/build/src/start/interface/KeyPressHandler.js.map +1 -1
- package/build/src/start/interface/commandsTable.js +94 -80
- package/build/src/start/interface/commandsTable.js.map +1 -1
- package/build/src/start/interface/interactiveActions.js +44 -40
- package/build/src/start/interface/interactiveActions.js.map +1 -1
- package/build/src/start/interface/startInterface.js +65 -61
- package/build/src/start/interface/startInterface.js.map +1 -1
- package/build/src/start/platforms/AppIdResolver.js +6 -4
- package/build/src/start/platforms/AppIdResolver.js.map +1 -1
- package/build/src/start/platforms/DeviceManager.js +10 -6
- package/build/src/start/platforms/DeviceManager.js.map +1 -1
- package/build/src/start/platforms/ExpoGoInstaller.js +25 -20
- package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
- package/build/src/start/platforms/PlatformManager.js +17 -15
- package/build/src/start/platforms/PlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/ADBServer.js +39 -35
- package/build/src/start/platforms/android/ADBServer.js.map +1 -1
- package/build/src/start/platforms/android/AndroidAppIdResolver.js +18 -16
- package/build/src/start/platforms/android/AndroidAppIdResolver.js.map +1 -1
- package/build/src/start/platforms/android/AndroidDeviceManager.js +24 -20
- package/build/src/start/platforms/android/AndroidDeviceManager.js.map +1 -1
- package/build/src/start/platforms/android/AndroidPlatformManager.js +17 -17
- package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/AndroidSdk.js +11 -9
- package/build/src/start/platforms/android/AndroidSdk.js.map +1 -1
- package/build/src/start/platforms/android/activateWindow.js +26 -22
- package/build/src/start/platforms/android/activateWindow.js.map +1 -1
- package/build/src/start/platforms/android/adb.js +121 -83
- package/build/src/start/platforms/android/adb.js.map +1 -1
- package/build/src/start/platforms/android/adbReverse.js +20 -12
- package/build/src/start/platforms/android/adbReverse.js.map +1 -1
- package/build/src/start/platforms/android/emulator.js +36 -26
- package/build/src/start/platforms/android/emulator.js.map +1 -1
- package/build/src/start/platforms/android/getDevices.js +7 -5
- package/build/src/start/platforms/android/getDevices.js.map +1 -1
- package/build/src/start/platforms/android/gradle.js +36 -28
- package/build/src/start/platforms/android/gradle.js.map +1 -1
- package/build/src/start/platforms/android/promptAndroidDevice.js +19 -15
- package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
- package/build/src/start/platforms/ios/AppleAppIdResolver.js +21 -19
- package/build/src/start/platforms/ios/AppleAppIdResolver.js.map +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js +37 -31
- package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
- package/build/src/start/platforms/ios/ApplePlatformManager.js +12 -12
- package/build/src/start/platforms/ios/ApplePlatformManager.js.map +1 -1
- package/build/src/start/platforms/ios/assertSystemRequirements.js +9 -7
- package/build/src/start/platforms/ios/assertSystemRequirements.js.map +1 -1
- package/build/src/start/platforms/ios/devicectl.js +88 -74
- package/build/src/start/platforms/ios/devicectl.js.map +1 -1
- package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js +22 -18
- package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js.map +1 -1
- package/build/src/start/platforms/ios/getBestSimulator.js +29 -19
- package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
- package/build/src/start/platforms/ios/promptAppleDevice.js +14 -10
- package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
- package/build/src/start/platforms/ios/simctl.js +102 -74
- package/build/src/start/platforms/ios/simctl.js.map +1 -1
- package/build/src/start/platforms/ios/simctlLogging.js +57 -52
- package/build/src/start/platforms/ios/simctlLogging.js.map +1 -1
- package/build/src/start/platforms/ios/xcrun.js +22 -18
- package/build/src/start/platforms/ios/xcrun.js.map +1 -1
- package/build/src/start/project/devices.js +19 -9
- package/build/src/start/project/devices.js.map +1 -1
- package/build/src/start/project/dotExpo.js +15 -11
- package/build/src/start/project/dotExpo.js.map +1 -1
- package/build/src/start/project/settings.js +4 -2
- package/build/src/start/project/settings.js.map +1 -1
- package/build/src/start/resolveOptions.js +48 -40
- package/build/src/start/resolveOptions.js.map +1 -1
- package/build/src/start/server/AsyncNgrok.js +55 -51
- package/build/src/start/server/AsyncNgrok.js.map +1 -1
- package/build/src/start/server/AsyncWsTunnel.js +37 -33
- package/build/src/start/server/AsyncWsTunnel.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.js +81 -79
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.js +42 -38
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/DevToolsPluginManager.js +18 -14
- package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
- package/build/src/start/server/DevelopmentSession.js +18 -14
- package/build/src/start/server/DevelopmentSession.js.map +1 -1
- package/build/src/start/server/ReactDevToolsProxy.js +16 -10
- package/build/src/start/server/ReactDevToolsProxy.js.map +1 -1
- package/build/src/start/server/UrlCreator.js +36 -33
- package/build/src/start/server/UrlCreator.js.map +1 -1
- package/build/src/start/server/getStaticRenderFunctions.js +30 -22
- package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
- package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +9 -5
- package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +293 -280
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +63 -56
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.js +39 -33
- 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/createExpoFallbackResolver.js +13 -11
- package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js +47 -41
- package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
- package/build/src/start/server/metro/createJResolver.js +31 -27
- package/build/src/start/server/metro/createJResolver.js.map +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js +110 -98
- package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
- package/build/src/start/server/metro/createServerRouteMiddleware.js +34 -30
- package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/AtlasPrerequisite.js +13 -11
- package/build/src/start/server/metro/debugging/AtlasPrerequisite.js.map +1 -1
- package/build/src/start/server/metro/debugging/MessageHandler.js +3 -1
- package/build/src/start/server/metro/debugging/MessageHandler.js.map +1 -1
- package/build/src/start/server/metro/debugging/attachAtlas.js +26 -22
- package/build/src/start/server/metro/debugging/attachAtlas.js.map +1 -1
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -17
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/createHandlersFactory.js +25 -31
- package/build/src/start/server/metro/debugging/createHandlersFactory.js.map +1 -1
- package/build/src/start/server/metro/debugging/getDebuggerType.js +6 -4
- package/build/src/start/server/metro/debugging/getDebuggerType.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js +14 -8
- package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js +7 -5
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js +8 -6
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js +7 -5
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js +14 -12
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js.map +1 -1
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js +14 -10
- package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js.map +1 -1
- package/build/src/start/server/metro/debugging/pageIsSupported.js +6 -4
- package/build/src/start/server/metro/debugging/pageIsSupported.js.map +1 -1
- package/build/src/start/server/metro/debugging/types.js.map +1 -1
- package/build/src/start/server/metro/dev-server/createEventSocket.js +18 -16
- package/build/src/start/server/metro/dev-server/createEventSocket.js.map +1 -1
- package/build/src/start/server/metro/dev-server/createMessageSocket.js +23 -21
- package/build/src/start/server/metro/dev-server/createMessageSocket.js.map +1 -1
- package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +23 -21
- package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
- package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js +4 -2
- package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js.map +1 -1
- package/build/src/start/server/metro/dev-server/utils/createSocketMap.js +4 -2
- package/build/src/start/server/metro/dev-server/utils/createSocketMap.js.map +1 -1
- package/build/src/start/server/metro/dev-server/utils/socketMessages.js +8 -4
- package/build/src/start/server/metro/dev-server/utils/socketMessages.js.map +1 -1
- package/build/src/start/server/metro/externals.js +33 -25
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/fetchRouterManifest.js +28 -12
- package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
- package/build/src/start/server/metro/formatFileCandidates.js +11 -9
- package/build/src/start/server/metro/formatFileCandidates.js.map +1 -1
- package/build/src/start/server/metro/getCssModulesFromBundler.js +24 -20
- package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +87 -81
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxLog.js +40 -36
- package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +20 -14
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js +10 -6
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +88 -78
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/metroErrors.js +8 -4
- package/build/src/start/server/metro/metroErrors.js.map +1 -1
- package/build/src/start/server/metro/metroPrivateServer.js +9 -7
- package/build/src/start/server/metro/metroPrivateServer.js.map +1 -1
- package/build/src/start/server/metro/metroVirtualModules.js +10 -8
- package/build/src/start/server/metro/metroVirtualModules.js.map +1 -1
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +24 -22
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
- package/build/src/start/server/metro/router.js +48 -32
- package/build/src/start/server/metro/router.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +24 -22
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/metro/serializeHtml.js +24 -22
- package/build/src/start/server/metro/serializeHtml.js.map +1 -1
- package/build/src/start/server/metro/symbolicate.js.map +1 -1
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +35 -29
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +150 -140
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/metro/withMetroResolvers.js +49 -39
- package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
- package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js +8 -6
- package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/CorsMiddleware.js +17 -15
- package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/CreateFileMiddleware.js +32 -31
- package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +22 -19
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/DomComponentsMiddleware.js +33 -27
- package/build/src/start/server/middleware/DomComponentsMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +61 -57
- package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ExpoMiddleware.js +15 -9
- package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/FaviconMiddleware.js +16 -15
- package/build/src/start/server/middleware/FaviconMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/HistoryFallbackMiddleware.js +4 -2
- package/build/src/start/server/middleware/HistoryFallbackMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js +34 -31
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +64 -56
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js +23 -19
- package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +20 -19
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ServeStaticMiddleware.js +11 -9
- package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js +17 -11
- package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js.map +1 -1
- package/build/src/start/server/middleware/inspector/CdpClient.js +12 -10
- package/build/src/start/server/middleware/inspector/CdpClient.js.map +1 -1
- package/build/src/start/server/middleware/inspector/JsInspector.js +35 -27
- package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +21 -19
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/inspector/middlwareMutations.js +6 -2
- package/build/src/start/server/middleware/inspector/middlwareMutations.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +120 -96
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/start/server/middleware/mutations.js +7 -3
- package/build/src/start/server/middleware/mutations.js.map +1 -1
- package/build/src/start/server/middleware/resolveAssets.js +26 -18
- package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
- package/build/src/start/server/middleware/resolvePlatform.js +23 -15
- package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
- package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js +11 -9
- package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js.map +1 -1
- package/build/src/start/server/middleware/server.types.js.map +1 -1
- package/build/src/start/server/openPlatforms.js +10 -8
- package/build/src/start/server/openPlatforms.js.map +1 -1
- package/build/src/start/server/platformBundlers.js +13 -11
- package/build/src/start/server/platformBundlers.js.map +1 -1
- package/build/src/start/server/serverLogLikeMetro.js +58 -50
- package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
- package/build/src/start/server/type-generation/expo-env.js +11 -7
- package/build/src/start/server/type-generation/expo-env.js.map +1 -1
- package/build/src/start/server/type-generation/routes.js +72 -50
- package/build/src/start/server/type-generation/routes.js.map +1 -1
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js +21 -19
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
- package/build/src/start/server/type-generation/tsconfig.js +36 -28
- package/build/src/start/server/type-generation/tsconfig.js.map +1 -1
- package/build/src/start/server/webTemplate.js +28 -24
- package/build/src/start/server/webTemplate.js.map +1 -1
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js +52 -46
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
- package/build/src/start/server/webpack/compile.js +15 -11
- package/build/src/start/server/webpack/compile.js.map +1 -1
- package/build/src/start/server/webpack/formatWebpackMessages.js +28 -26
- package/build/src/start/server/webpack/formatWebpackMessages.js.map +1 -1
- package/build/src/start/server/webpack/resolveFromProject.js +18 -12
- package/build/src/start/server/webpack/resolveFromProject.js.map +1 -1
- package/build/src/start/server/webpack/tls.js +18 -12
- package/build/src/start/server/webpack/tls.js.map +1 -1
- package/build/src/start/startAsync.js +31 -27
- package/build/src/start/startAsync.js.map +1 -1
- package/build/src/utils/FileNotifier.js +20 -17
- package/build/src/utils/FileNotifier.js.map +1 -1
- package/build/src/utils/ansi.js +7 -5
- package/build/src/utils/ansi.js.map +1 -1
- package/build/src/utils/args.js +24 -14
- package/build/src/utils/args.js.map +1 -1
- package/build/src/utils/array.js +18 -6
- package/build/src/utils/array.js.map +1 -1
- package/build/src/utils/cocoapods.js +54 -46
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/codesigning.js +79 -69
- package/build/src/utils/codesigning.js.map +1 -1
- package/build/src/utils/createFileTransform.js +16 -12
- package/build/src/utils/createFileTransform.js.map +1 -1
- package/build/src/utils/createTempPath.js +12 -8
- package/build/src/utils/createTempPath.js.map +1 -1
- package/build/src/utils/delay.js +12 -6
- package/build/src/utils/delay.js.map +1 -1
- package/build/src/utils/dir.js +40 -22
- package/build/src/utils/dir.js.map +1 -1
- package/build/src/utils/downloadAppAsync.js +10 -8
- package/build/src/utils/downloadAppAsync.js.map +1 -1
- package/build/src/utils/downloadExpoGoAsync.js +27 -23
- package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
- package/build/src/utils/editor.js +41 -35
- package/build/src/utils/editor.js.map +1 -1
- package/build/src/utils/env.js +63 -59
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/errors.js +37 -30
- package/build/src/utils/errors.js.map +1 -1
- package/build/src/utils/exit.js +35 -31
- package/build/src/utils/exit.js.map +1 -1
- package/build/src/utils/expoUpdatesCli.js +32 -22
- package/build/src/utils/expoUpdatesCli.js.map +1 -1
- package/build/src/utils/fetch.js +8 -4
- package/build/src/utils/fetch.js.map +1 -1
- package/build/src/utils/filePath.js +10 -6
- package/build/src/utils/filePath.js.map +1 -1
- package/build/src/utils/findUp.js +13 -9
- package/build/src/utils/findUp.js.map +1 -1
- package/build/src/utils/fn.js +6 -2
- package/build/src/utils/fn.js.map +1 -1
- package/build/src/utils/getOrPromptApplicationId.js +41 -35
- package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
- package/build/src/utils/getRunningProcess.js +29 -21
- package/build/src/utils/getRunningProcess.js.map +1 -1
- package/build/src/utils/git.js +26 -20
- package/build/src/utils/git.js.map +1 -1
- package/build/src/utils/glob.js +8 -4
- package/build/src/utils/glob.js.map +1 -1
- package/build/src/utils/interactive.js +3 -1
- package/build/src/utils/interactive.js.map +1 -1
- package/build/src/utils/ip.js +21 -19
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/isModuleSymlinked.js +11 -9
- package/build/src/utils/isModuleSymlinked.js.map +1 -1
- package/build/src/utils/jsonSchemaDeref.js +20 -18
- package/build/src/utils/jsonSchemaDeref.js.map +1 -1
- package/build/src/utils/link.js +17 -13
- package/build/src/utils/link.js.map +1 -1
- package/build/src/utils/mergeGitIgnorePaths.js +46 -28
- package/build/src/utils/mergeGitIgnorePaths.js.map +1 -1
- package/build/src/utils/modifyConfigAsync.js +16 -10
- package/build/src/utils/modifyConfigAsync.js.map +1 -1
- package/build/src/utils/modifyConfigPlugins.js +10 -6
- package/build/src/utils/modifyConfigPlugins.js.map +1 -1
- package/build/src/utils/multipartMixed.js +13 -11
- package/build/src/utils/multipartMixed.js.map +1 -1
- package/build/src/utils/nodeEnv.js +12 -6
- package/build/src/utils/nodeEnv.js.map +1 -1
- package/build/src/utils/nodeModules.js +10 -8
- package/build/src/utils/nodeModules.js.map +1 -1
- package/build/src/utils/npm.js +49 -35
- package/build/src/utils/npm.js.map +1 -1
- package/build/src/utils/obj.js +11 -5
- package/build/src/utils/obj.js.map +1 -1
- package/build/src/utils/open.js +10 -8
- package/build/src/utils/open.js.map +1 -1
- package/build/src/utils/ora.js +13 -7
- package/build/src/utils/ora.js.map +1 -1
- package/build/src/utils/plist.js +21 -15
- package/build/src/utils/plist.js.map +1 -1
- package/build/src/utils/port.js +43 -33
- package/build/src/utils/port.js.map +1 -1
- package/build/src/utils/profile.js +11 -7
- package/build/src/utils/profile.js.map +1 -1
- package/build/src/utils/progress.js +11 -5
- package/build/src/utils/progress.js.map +1 -1
- package/build/src/utils/prompts.js +47 -29
- package/build/src/utils/prompts.js.map +1 -1
- package/build/src/utils/resolveArgs.js +36 -24
- package/build/src/utils/resolveArgs.js.map +1 -1
- package/build/src/utils/scheme.js +40 -32
- package/build/src/utils/scheme.js.map +1 -1
- package/build/src/utils/stream.js +5 -3
- package/build/src/utils/stream.js.map +1 -1
- package/build/src/utils/strings.js +6 -4
- package/build/src/utils/strings.js.map +1 -1
- package/build/src/utils/tar.js +18 -14
- package/build/src/utils/tar.js.map +1 -1
- package/build/src/utils/telemetry/Telemetry.js +29 -27
- package/build/src/utils/telemetry/Telemetry.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +15 -13
- package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchDetachedClient.js +26 -22
- package/build/src/utils/telemetry/clients/FetchDetachedClient.js.map +1 -1
- package/build/src/utils/telemetry/clients/flushFetchDetached.js +10 -10
- package/build/src/utils/telemetry/clients/flushFetchDetached.js.map +1 -1
- package/build/src/utils/telemetry/events.js +4 -2
- package/build/src/utils/telemetry/events.js.map +1 -1
- package/build/src/utils/telemetry/index.js +25 -29
- package/build/src/utils/telemetry/index.js.map +1 -1
- package/build/src/utils/telemetry/types.js.map +1 -1
- package/build/src/utils/telemetry/utils/constants.js +8 -4
- package/build/src/utils/telemetry/utils/constants.js.map +1 -1
- package/build/src/utils/telemetry/utils/context.js +18 -14
- package/build/src/utils/telemetry/utils/context.js.map +1 -1
- package/build/src/utils/template.js +6 -4
- package/build/src/utils/template.js.map +1 -1
- package/build/src/utils/terminal.js +4 -2
- package/build/src/utils/terminal.js.map +1 -1
- package/build/src/utils/tsconfig/evaluateTsConfig.js +21 -17
- package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
- package/build/src/utils/tsconfig/loadTsConfigPaths.js +18 -14
- package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +1 -1
- package/build/src/utils/tsconfig/matchTsConfigPathAlias.js +7 -5
- package/build/src/utils/tsconfig/matchTsConfigPathAlias.js.map +1 -1
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +14 -12
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +1 -1
- package/build/src/utils/url.js +23 -13
- package/build/src/utils/url.js.map +1 -1
- package/build/src/utils/validateApplicationId.js +108 -86
- package/build/src/utils/validateApplicationId.js.map +1 -1
- package/build/src/utils/variadic.js +22 -16
- package/build/src/utils/variadic.js.map +1 -1
- package/build/src/whoami/index.js +11 -7
- package/build/src/whoami/index.js.map +1 -1
- package/build/src/whoami/whoamiAsync.js +11 -7
- package/build/src/whoami/whoamiAsync.js.map +1 -1
- package/package.json +17 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\nimport process from 'node:process';\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 /**\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 /** 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 /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return string('__EXPO_EAGER_BUNDLE_OPTIONS', '');\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental mode where React Native Web isn't required to run Expo apps on web. */\n get EXPO_NO_REACT_NATIVE_WEB(): boolean {\n return boolish('EXPO_NO_REACT_NATIVE_WEB', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', false);\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n // Default to disabling when running in a web container (stackblitz, bolt, etc).\n const isWebContainer = process.versions.webcontainer != null;\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', isWebContainer);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n"],"names":["env","envIsWebcontainer","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_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_FAST_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_NO_REACT_NATIVE_WEB","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","isWebContainer","versions","webcontainer","EXPO_FORCE_WEBCONTAINER_ENV","SHELL"],"mappings":"AAAA;;;;;;;;;;;IAwQaA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D;AAEM,MAAMJ,GAAG,GAAG,IAAIE,GAAG,EAAE,AAAC;AAEtB,SAASD,iBAAiB,GAAG;IAClC,gHAAgH;IAChH,OACED,GAAG,CAAC0D,2BAA2B,IAC9B1B,YAAO,EAAA,QAAA,CAAChC,GAAG,CAAC2D,KAAK,KAAK,UAAU,IAAI,CAAC,CAAC3B,YAAO,EAAA,QAAA,CAACwB,QAAQ,CAACC,YAAY,AAAC,CACrE;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\nimport process from 'node:process';\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 /**\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 /** 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 /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return string('__EXPO_EAGER_BUNDLE_OPTIONS', '');\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental mode where React Native Web isn't required to run Expo apps on web. */\n get EXPO_NO_REACT_NATIVE_WEB(): boolean {\n return boolish('EXPO_NO_REACT_NATIVE_WEB', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', false);\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n // Default to disabling when running in a web container (stackblitz, bolt, etc).\n const isWebContainer = process.versions.webcontainer != null;\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', isWebContainer);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n"],"names":["env","envIsWebcontainer","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_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_FAST_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_NO_REACT_NATIVE_WEB","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","isWebContainer","versions","webcontainer","EXPO_FORCE_WEBCONTAINER_ENV","SHELL"],"mappings":";;;;;;;;;;;IAwQaA,GAAG;eAAHA;;IAEGC,iBAAiB;eAAjBA;;;;yBA1QqB;;;;;;;gEACjB;;;;;;;;;;;AAEpB,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMC;IACJ,6BAA6B,GAC7B,IAAIC,eAAe;QACjB,OAAOC,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,yBAAyB,GACzB,IAAIC,aAAa;QACf,OAAOD,IAAAA,iBAAO,EAAC,cAAc;IAC/B;IAEA,iCAAiC,GACjC,IAAIE,eAAe;QACjB,OAAOF,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AAA,iBAAO,EAAC,aAAa;IAC9B;IAEA,yGAAyG,GACzG,IAAIiD,gCAAyC;QAC3C,OAAOjD,IAAAA,iBAAO,EAAC,iCAAiC;IAClD;IAEA,kGAAkG,GAClG,IAAIkD,gCAAyC;QAC3C,gFAAgF;QAChF,MAAMC,iBAAiBvB,sBAAO,CAACwB,QAAQ,CAACC,YAAY,IAAI;QACxD,OAAOrD,IAAAA,iBAAO,EAAC,iCAAiCmD;IAClD;IAEA,sGAAsG,GACtG,IAAIG,8BAAuC;QACzC,OAAOtD,IAAAA,iBAAO,EAAC,+BAA+B;IAChD;AACF;AAEO,MAAMJ,MAAM,IAAIE;AAEhB,SAASD;IACd,gHAAgH;IAChH,OACED,IAAI0D,2BAA2B,IAC9B1B,sBAAO,CAAChC,GAAG,CAAC2D,KAAK,KAAK,cAAc,CAAC,CAAC3B,sBAAO,CAACwB,QAAQ,CAACC,YAAY;AAExE"}
|
|
@@ -9,11 +9,21 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
AbortCommandError: function() {
|
|
13
|
+
return AbortCommandError;
|
|
14
|
+
},
|
|
15
|
+
CommandError: function() {
|
|
16
|
+
return CommandError;
|
|
17
|
+
},
|
|
18
|
+
SilentError: function() {
|
|
19
|
+
return SilentError;
|
|
20
|
+
},
|
|
21
|
+
UnimplementedError: function() {
|
|
22
|
+
return UnimplementedError;
|
|
23
|
+
},
|
|
24
|
+
logCmdError: function() {
|
|
25
|
+
return logCmdError;
|
|
26
|
+
}
|
|
17
27
|
});
|
|
18
28
|
function _assert() {
|
|
19
29
|
const data = require("assert");
|
|
@@ -23,32 +33,29 @@ function _assert() {
|
|
|
23
33
|
return data;
|
|
24
34
|
}
|
|
25
35
|
function _chalk() {
|
|
26
|
-
const data = /*#__PURE__*/
|
|
36
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
27
37
|
_chalk = function() {
|
|
28
38
|
return data;
|
|
29
39
|
};
|
|
30
40
|
return data;
|
|
31
41
|
}
|
|
32
|
-
function
|
|
42
|
+
function _child_process() {
|
|
33
43
|
const data = require("child_process");
|
|
34
|
-
|
|
44
|
+
_child_process = function() {
|
|
35
45
|
return data;
|
|
36
46
|
};
|
|
37
47
|
return data;
|
|
38
48
|
}
|
|
39
49
|
const _log = require("../log");
|
|
40
|
-
function
|
|
50
|
+
function _interop_require_default(obj) {
|
|
41
51
|
return obj && obj.__esModule ? obj : {
|
|
42
52
|
default: obj
|
|
43
53
|
};
|
|
44
54
|
}
|
|
45
|
-
const ERROR_PREFIX =
|
|
55
|
+
const ERROR_PREFIX = 'Error: ';
|
|
46
56
|
class CommandError extends Error {
|
|
47
|
-
constructor(code, message =
|
|
48
|
-
super(
|
|
49
|
-
this.code = code;
|
|
50
|
-
this.name = "CommandError";
|
|
51
|
-
this.isCommandError = true;
|
|
57
|
+
constructor(code, message = ''){
|
|
58
|
+
super(''), this.code = code, this.name = 'CommandError', this.isCommandError = true;
|
|
52
59
|
// If e.toString() was called to get `message` we don't want it to look
|
|
53
60
|
// like "Error: Error:".
|
|
54
61
|
if (message.startsWith(ERROR_PREFIX)) {
|
|
@@ -59,14 +66,14 @@ class CommandError extends Error {
|
|
|
59
66
|
}
|
|
60
67
|
class AbortCommandError extends CommandError {
|
|
61
68
|
constructor(){
|
|
62
|
-
super(
|
|
69
|
+
super('ABORTED', 'Interactive prompt was cancelled.');
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
72
|
class SilentError extends CommandError {
|
|
66
73
|
constructor(messageOrError){
|
|
67
|
-
const message = (typeof messageOrError ===
|
|
68
|
-
super(
|
|
69
|
-
if (typeof messageOrError !==
|
|
74
|
+
const message = (typeof messageOrError === 'string' ? messageOrError : messageOrError == null ? void 0 : messageOrError.message) ?? 'This error should fail silently in the CLI';
|
|
75
|
+
super('SILENT', message);
|
|
76
|
+
if (typeof messageOrError !== 'string') {
|
|
70
77
|
// forward the props of the incoming error for tests or processes outside of expo-cli that use expo cli internals.
|
|
71
78
|
this.stack = (messageOrError == null ? void 0 : messageOrError.stack) ?? this.stack;
|
|
72
79
|
this.name = (messageOrError == null ? void 0 : messageOrError.name) ?? this.name;
|
|
@@ -80,17 +87,17 @@ function logCmdError(error) {
|
|
|
80
87
|
if (error instanceof AbortCommandError || error instanceof SilentError) {
|
|
81
88
|
// Do nothing, this is used for prompts or other cases that were custom logged.
|
|
82
89
|
process.exit(0);
|
|
83
|
-
} else if (error instanceof CommandError || error instanceof _assert().AssertionError || error.name ===
|
|
90
|
+
} else if (error instanceof CommandError || error instanceof _assert().AssertionError || error.name === 'ApiV2Error' || error.name === 'ConfigError') {
|
|
84
91
|
// Print the stack trace in debug mode only.
|
|
85
92
|
(0, _log.exit)(error);
|
|
86
93
|
}
|
|
87
|
-
const errorDetails = error.stack ?
|
|
94
|
+
const errorDetails = error.stack ? '\n' + _chalk().default.gray(error.stack) : '';
|
|
88
95
|
(0, _log.exit)(_chalk().default.red(error.toString()) + errorDetails);
|
|
89
96
|
}
|
|
90
97
|
class UnimplementedError extends Error {
|
|
91
98
|
constructor(){
|
|
92
|
-
super(
|
|
93
|
-
this.name =
|
|
99
|
+
super('Unimplemented');
|
|
100
|
+
this.name = 'UnimplementedError';
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
/**
|
|
@@ -103,17 +110,17 @@ class UnimplementedError extends Error {
|
|
|
103
110
|
* @see https://github.com/fsevents/fsevents/issues/42#issuecomment-62632234
|
|
104
111
|
*/ function handleTooManyOpenFileErrors(error) {
|
|
105
112
|
// Only enable special logging when running on macOS and are running into the `EMFILE` error
|
|
106
|
-
if (
|
|
113
|
+
if ('code' in error && error.code === 'EMFILE' && process.platform === 'darwin') {
|
|
107
114
|
try {
|
|
108
115
|
// Try to recover watchman, if it's not installed this will throw
|
|
109
|
-
(0,
|
|
110
|
-
stdio:
|
|
116
|
+
(0, _child_process().execSync)('watchman shutdown-server', {
|
|
117
|
+
stdio: 'ignore'
|
|
111
118
|
});
|
|
112
119
|
// NOTE(cedric): this both starts the watchman server and resets all watchers
|
|
113
|
-
(0,
|
|
114
|
-
stdio:
|
|
120
|
+
(0, _child_process().execSync)('watchman watch-del-all', {
|
|
121
|
+
stdio: 'ignore'
|
|
115
122
|
});
|
|
116
|
-
(0, _log.warn)(
|
|
123
|
+
(0, _log.warn)('Watchman is installed but was likely not enabled when starting Metro, try starting your project again.\nIf this problem persists, follow the troubleshooting guide of Watchman: https://facebook.github.io/watchman/docs/troubleshooting');
|
|
117
124
|
} catch {
|
|
118
125
|
(0, _log.warn)(`Your macOS system limit does not allow enough watchers for Metro, install Watchman instead. Learn more: https://facebook.github.io/watchman/docs/install`);
|
|
119
126
|
}
|
|
@@ -122,6 +129,6 @@ class UnimplementedError extends Error {
|
|
|
122
129
|
}
|
|
123
130
|
throw error;
|
|
124
131
|
}
|
|
125
|
-
process.on(
|
|
132
|
+
process.on('uncaughtException', handleTooManyOpenFileErrors);
|
|
126
133
|
|
|
127
134
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\n\nimport { exit, exception, warn } 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\n/**\n * Add additional information when EMFILE errors are encountered.\n * These errors originate from Metro's FSEventsWatcher due to `fsevents` going over MacOS system limit.\n * Unfortunately, these limits in macOS are relatively low compared to an average React Native project.\n *\n * @see https://github.com/expo/expo/issues/29083\n * @see https://github.com/facebook/metro/issues/834\n * @see https://github.com/fsevents/fsevents/issues/42#issuecomment-62632234\n */\nfunction handleTooManyOpenFileErrors(error: any) {\n // Only enable special logging when running on macOS and are running into the `EMFILE` error\n if ('code' in error && error.code === 'EMFILE' && process.platform === 'darwin') {\n try {\n // Try to recover watchman, if it's not installed this will throw\n execSync('watchman shutdown-server', { stdio: 'ignore' });\n // NOTE(cedric): this both starts the watchman server and resets all watchers\n execSync('watchman watch-del-all', { stdio: 'ignore' });\n\n warn(\n 'Watchman is installed but was likely not enabled when starting Metro, try starting your project again.\\nIf this problem persists, follow the troubleshooting guide of Watchman: https://facebook.github.io/watchman/docs/troubleshooting'\n );\n } catch {\n warn(\n `Your macOS system limit does not allow enough watchers for Metro, install Watchman instead. Learn more: https://facebook.github.io/watchman/docs/install`\n );\n }\n\n exception(error);\n process.exit(1);\n }\n\n throw error;\n}\n\nprocess.on('uncaughtException', handleTooManyOpenFileErrors);\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\n\nimport { exit, exception, warn } 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\n/**\n * Add additional information when EMFILE errors are encountered.\n * These errors originate from Metro's FSEventsWatcher due to `fsevents` going over MacOS system limit.\n * Unfortunately, these limits in macOS are relatively low compared to an average React Native project.\n *\n * @see https://github.com/expo/expo/issues/29083\n * @see https://github.com/facebook/metro/issues/834\n * @see https://github.com/fsevents/fsevents/issues/42#issuecomment-62632234\n */\nfunction handleTooManyOpenFileErrors(error: any) {\n // Only enable special logging when running on macOS and are running into the `EMFILE` error\n if ('code' in error && error.code === 'EMFILE' && process.platform === 'darwin') {\n try {\n // Try to recover watchman, if it's not installed this will throw\n execSync('watchman shutdown-server', { stdio: 'ignore' });\n // NOTE(cedric): this both starts the watchman server and resets all watchers\n execSync('watchman watch-del-all', { stdio: 'ignore' });\n\n warn(\n 'Watchman is installed but was likely not enabled when starting Metro, try starting your project again.\\nIf this problem persists, follow the troubleshooting guide of Watchman: https://facebook.github.io/watchman/docs/troubleshooting'\n );\n } catch {\n warn(\n `Your macOS system limit does not allow enough watchers for Metro, install Watchman instead. Learn more: https://facebook.github.io/watchman/docs/install`\n );\n }\n\n exception(error);\n process.exit(1);\n }\n\n throw error;\n}\n\nprocess.on('uncaughtException', handleTooManyOpenFileErrors);\n"],"names":["AbortCommandError","CommandError","SilentError","UnimplementedError","logCmdError","ERROR_PREFIX","Error","constructor","code","message","name","isCommandError","startsWith","substring","length","messageOrError","stack","error","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","handleTooManyOpenFileErrors","platform","execSync","stdio","warn","exception","on"],"mappings":";;;;;;;;;;;I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/BH,MAAMP,IAAI,KAAK,gBACfO,MAAMP,IAAI,KAAK,eACf;QACA,4CAA4C;QAC5CS,IAAAA,SAAI,EAACF;IACP;IAEA,MAAMI,eAAeJ,MAAMD,KAAK,GAAG,OAAOM,gBAAK,CAACC,IAAI,CAACN,MAAMD,KAAK,IAAI;IAEpEG,IAAAA,SAAI,EAACG,gBAAK,CAACE,GAAG,CAACP,MAAMQ,QAAQ,MAAMJ;AACrC;AAGO,MAAMlB,2BAA2BG;IACtCC,aAAc;QACZ,KAAK,CAAC;QACN,IAAI,CAACG,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;CAQC,GACD,SAASgB,4BAA4BT,KAAU;IAC7C,4FAA4F;IAC5F,IAAI,UAAUA,SAASA,MAAMT,IAAI,KAAK,YAAYU,QAAQS,QAAQ,KAAK,UAAU;QAC/E,IAAI;YACF,iEAAiE;YACjEC,IAAAA,yBAAQ,EAAC,4BAA4B;gBAAEC,OAAO;YAAS;YACvD,6EAA6E;YAC7ED,IAAAA,yBAAQ,EAAC,0BAA0B;gBAAEC,OAAO;YAAS;YAErDC,IAAAA,SAAI,EACF;QAEJ,EAAE,OAAM;YACNA,IAAAA,SAAI,EACF,CAAC,wJAAwJ,CAAC;QAE9J;QAEAC,IAAAA,cAAS,EAACd;QACVC,QAAQC,IAAI,CAAC;IACf;IAEA,MAAMF;AACR;AAEAC,QAAQc,EAAE,CAAC,qBAAqBN"}
|
package/build/src/utils/exit.js
CHANGED
|
@@ -9,36 +9,40 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
ensureProcessExitsAfterDelay: function() {
|
|
13
|
+
return ensureProcessExitsAfterDelay;
|
|
14
|
+
},
|
|
15
|
+
installExitHooks: function() {
|
|
16
|
+
return installExitHooks;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
function
|
|
19
|
+
function _nodechild_process() {
|
|
16
20
|
const data = require("node:child_process");
|
|
17
|
-
|
|
21
|
+
_nodechild_process = function() {
|
|
18
22
|
return data;
|
|
19
23
|
};
|
|
20
24
|
return data;
|
|
21
25
|
}
|
|
22
|
-
function
|
|
23
|
-
const data = /*#__PURE__*/
|
|
24
|
-
|
|
26
|
+
function _nodeprocess() {
|
|
27
|
+
const data = /*#__PURE__*/ _interop_require_default(require("node:process"));
|
|
28
|
+
_nodeprocess = function() {
|
|
25
29
|
return data;
|
|
26
30
|
};
|
|
27
31
|
return data;
|
|
28
32
|
}
|
|
29
33
|
const _fn = require("./fn");
|
|
30
34
|
const _log = require("../log");
|
|
31
|
-
function
|
|
35
|
+
function _interop_require_default(obj) {
|
|
32
36
|
return obj && obj.__esModule ? obj : {
|
|
33
37
|
default: obj
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
|
-
const debug = require(
|
|
40
|
+
const debug = require('debug')('expo:utils:exit');
|
|
37
41
|
const PRE_EXIT_SIGNALS = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
'SIGHUP',
|
|
43
|
+
'SIGINT',
|
|
44
|
+
'SIGTERM',
|
|
45
|
+
'SIGBREAK'
|
|
42
46
|
];
|
|
43
47
|
// We create a queue since Node.js throws an error if we try to append too many listeners:
|
|
44
48
|
// (node:4405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit
|
|
@@ -73,8 +77,8 @@ function createExitHook(signal) {
|
|
|
73
77
|
debug(`Error in exit hook: %O (queue: ${index})`, error);
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
|
-
debug(`post-exit (code: ${
|
|
77
|
-
|
|
80
|
+
debug(`post-exit (code: ${_nodeprocess().default.exitCode ?? 0})`);
|
|
81
|
+
_nodeprocess().default.exit();
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
84
|
function attachMasterListener() {
|
|
@@ -85,11 +89,11 @@ function attachMasterListener() {
|
|
|
85
89
|
signal,
|
|
86
90
|
hook
|
|
87
91
|
]);
|
|
88
|
-
|
|
92
|
+
_nodeprocess().default.on(signal, hook);
|
|
89
93
|
}
|
|
90
94
|
return ()=>{
|
|
91
95
|
for (const [signal, hook] of hooks){
|
|
92
|
-
|
|
96
|
+
_nodeprocess().default.removeListener(signal, hook);
|
|
93
97
|
}
|
|
94
98
|
};
|
|
95
99
|
}
|
|
@@ -97,13 +101,13 @@ function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Dat
|
|
|
97
101
|
// Create a list of the expected active resources before exiting.
|
|
98
102
|
// Note, the order is undeterministic
|
|
99
103
|
const expectedResources = [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
_nodeprocess().default.stdout.isTTY ? 'TTYWrap' : 'PipeWrap',
|
|
105
|
+
_nodeprocess().default.stderr.isTTY ? 'TTYWrap' : 'PipeWrap',
|
|
106
|
+
_nodeprocess().default.stdin.isTTY ? 'TTYWrap' : 'PipeWrap'
|
|
103
107
|
];
|
|
104
108
|
// Check active resources, besides the TTYWrap/PipeWrap (process.stdin, process.stdout, process.stderr)
|
|
105
109
|
// @ts-expect-error Added in v17.3.0, v16.14.0 but unavailable in v18 typings
|
|
106
|
-
const activeResources =
|
|
110
|
+
const activeResources = _nodeprocess().default.getActiveResourcesInfo();
|
|
107
111
|
// Filter the active resource list by subtracting the expected resources, in undeterministic order
|
|
108
112
|
const unexpectedActiveResources = activeResources.filter((activeResource)=>{
|
|
109
113
|
const index = expectedResources.indexOf(activeResource);
|
|
@@ -115,16 +119,16 @@ function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Dat
|
|
|
115
119
|
});
|
|
116
120
|
const canExitProcess = !unexpectedActiveResources.length;
|
|
117
121
|
if (canExitProcess) {
|
|
118
|
-
return debug(
|
|
122
|
+
return debug('no active resources detected, process can safely exit');
|
|
119
123
|
} else {
|
|
120
124
|
debug(`process is trying to exit, but is stuck on unexpected active resources:`, unexpectedActiveResources);
|
|
121
125
|
}
|
|
122
126
|
// Check if the process needs to be force-closed
|
|
123
127
|
const elapsedTime = Date.now() - startedAtMs;
|
|
124
128
|
if (elapsedTime > waitUntilExitMs) {
|
|
125
|
-
debug(
|
|
129
|
+
debug('active handles detected past the exit delay, forcefully exiting:', activeResources);
|
|
126
130
|
tryWarnActiveProcesses();
|
|
127
|
-
return
|
|
131
|
+
return _nodeprocess().default.exit(0);
|
|
128
132
|
}
|
|
129
133
|
const timeoutId = setTimeout(()=>{
|
|
130
134
|
// Ensure the timeout is cleared before checking the active resources
|
|
@@ -147,20 +151,20 @@ function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Dat
|
|
|
147
151
|
*/ function tryWarnActiveProcesses() {
|
|
148
152
|
let activeProcesses = [];
|
|
149
153
|
try {
|
|
150
|
-
const children =
|
|
151
|
-
._getActiveHandles().filter((handle)=>handle instanceof
|
|
154
|
+
const children = _nodeprocess().default// @ts-expect-error - This is an internal method, not designed to be exposed. It's also our only way to get this info
|
|
155
|
+
._getActiveHandles().filter((handle)=>handle instanceof _nodechild_process().ChildProcess);
|
|
152
156
|
if (children.length) {
|
|
153
|
-
activeProcesses = children.map((child)=>child.spawnargs.join(
|
|
157
|
+
activeProcesses = children.map((child)=>child.spawnargs.join(' '));
|
|
154
158
|
}
|
|
155
159
|
} catch (error) {
|
|
156
|
-
debug(
|
|
160
|
+
debug('failed to get active process information:', error);
|
|
157
161
|
}
|
|
158
162
|
if (!activeProcesses.length) {
|
|
159
|
-
(0, _log.warn)(
|
|
163
|
+
(0, _log.warn)('Something prevented Expo from exiting, forcefully exiting now.');
|
|
160
164
|
} else {
|
|
161
|
-
const singularOrPlural = activeProcesses.length === 1 ?
|
|
165
|
+
const singularOrPlural = activeProcesses.length === 1 ? '1 process' : `${activeProcesses.length} processes`;
|
|
162
166
|
(0, _log.warn)(`Detected ${singularOrPlural} preventing Expo from exiting, forcefully exiting now.`);
|
|
163
|
-
(0, _log.warn)(
|
|
167
|
+
(0, _log.warn)(' - ' + activeProcesses.join('\n - '));
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/exit.ts"],"sourcesContent":["import { ChildProcess } from 'node:child_process';\nimport process from 'node:process';\n\nimport { guardAsync } from './fn';\nimport { warn } from '../log';\n\nconst debug = require('debug')('expo:utils:exit') as typeof console.log;\n\ntype AsyncExitHook = (signal: NodeJS.Signals) => void | Promise<void>;\n\nconst PRE_EXIT_SIGNALS: NodeJS.Signals[] = ['SIGHUP', 'SIGINT', 'SIGTERM', 'SIGBREAK'];\n\n// We create a queue since Node.js throws an error if we try to append too many listeners:\n// (node:4405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit\nconst queue: AsyncExitHook[] = [];\n\nlet unsubscribe: (() => void) | null = null;\n\n/** Add functions that run before the process exits. Returns a function for removing the listeners. */\nexport function installExitHooks(asyncExitHook: AsyncExitHook): () => void {\n // We need to instantiate the master listener the first time the queue is used.\n if (!queue.length) {\n // Track the master listener so we can remove it later.\n unsubscribe = attachMasterListener();\n }\n\n queue.push(asyncExitHook);\n\n return () => {\n const index = queue.indexOf(asyncExitHook);\n if (index >= 0) {\n queue.splice(index, 1);\n }\n // Clean up the master listener if we don't need it anymore.\n if (!queue.length) {\n unsubscribe?.();\n }\n };\n}\n\n// Create a function that runs before the process exits and guards against running multiple times.\nfunction createExitHook(signal: NodeJS.Signals) {\n return guardAsync(async () => {\n debug(`pre-exit (signal: ${signal}, queue length: ${queue.length})`);\n\n for (const [index, hookAsync] of Object.entries(queue)) {\n try {\n await hookAsync(signal);\n } catch (error: any) {\n debug(`Error in exit hook: %O (queue: ${index})`, error);\n }\n }\n\n debug(`post-exit (code: ${process.exitCode ?? 0})`);\n\n process.exit();\n });\n}\n\nfunction attachMasterListener() {\n const hooks: [NodeJS.Signals, () => any][] = [];\n for (const signal of PRE_EXIT_SIGNALS) {\n const hook = createExitHook(signal);\n hooks.push([signal, hook]);\n process.on(signal, hook);\n }\n return () => {\n for (const [signal, hook] of hooks) {\n process.removeListener(signal, hook);\n }\n };\n}\n\n/**\n * Monitor if the current process is exiting before the delay is reached.\n * If there are active resources, the process will be forced to exit after the delay is reached.\n *\n * @see https://nodejs.org/docs/latest-v18.x/api/process.html#processgetactiveresourcesinfo\n */\nexport function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Date.now()) {\n // Create a list of the expected active resources before exiting.\n // Note, the order is undeterministic\n const expectedResources = [\n process.stdout.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stderr.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stdin.isTTY ? 'TTYWrap' : 'PipeWrap',\n ];\n // Check active resources, besides the TTYWrap/PipeWrap (process.stdin, process.stdout, process.stderr)\n // @ts-expect-error Added in v17.3.0, v16.14.0 but unavailable in v18 typings\n const activeResources = process.getActiveResourcesInfo() as string[];\n // Filter the active resource list by subtracting the expected resources, in undeterministic order\n const unexpectedActiveResources = activeResources.filter((activeResource) => {\n const index = expectedResources.indexOf(activeResource);\n if (index >= 0) {\n expectedResources.splice(index, 1);\n return false;\n }\n\n return true;\n });\n\n const canExitProcess = !unexpectedActiveResources.length;\n if (canExitProcess) {\n return debug('no active resources detected, process can safely exit');\n } else {\n debug(\n `process is trying to exit, but is stuck on unexpected active resources:`,\n unexpectedActiveResources\n );\n }\n\n // Check if the process needs to be force-closed\n const elapsedTime = Date.now() - startedAtMs;\n if (elapsedTime > waitUntilExitMs) {\n debug('active handles detected past the exit delay, forcefully exiting:', activeResources);\n tryWarnActiveProcesses();\n return process.exit(0);\n }\n\n const timeoutId = setTimeout(() => {\n // Ensure the timeout is cleared before checking the active resources\n clearTimeout(timeoutId);\n // Check if the process can exit\n ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs);\n }, 100);\n}\n\n/**\n * Try to warn the user about unexpected active processes running in the background.\n * This uses the internal `process._getActiveHandles` method, within a try-catch block.\n * If active child processes are detected, the commands of these processes are logged.\n *\n * @example ```bash\n * Done writing bundle output\n * Detected 2 processes preventing Expo from exiting, forcefully exiting now.\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * ```\n */\nfunction tryWarnActiveProcesses() {\n let activeProcesses: string[] = [];\n\n try {\n const children: ChildProcess[] = process\n // @ts-expect-error - This is an internal method, not designed to be exposed. It's also our only way to get this info\n ._getActiveHandles()\n .filter((handle: any) => handle instanceof ChildProcess);\n\n if (children.length) {\n activeProcesses = children.map((child) => child.spawnargs.join(' '));\n }\n } catch (error) {\n debug('failed to get active process information:', error);\n }\n\n if (!activeProcesses.length) {\n warn('Something prevented Expo from exiting, forcefully exiting now.');\n } else {\n const singularOrPlural =\n activeProcesses.length === 1 ? '1 process' : `${activeProcesses.length} processes`;\n\n warn(`Detected ${singularOrPlural} preventing Expo from exiting, forcefully exiting now.`);\n warn(' - ' + activeProcesses.join('\\n - '));\n }\n}\n"],"names":["installExitHooks","ensureProcessExitsAfterDelay","debug","require","PRE_EXIT_SIGNALS","queue","unsubscribe","asyncExitHook","length","attachMasterListener","push","index","indexOf","splice","createExitHook","signal","guardAsync","hookAsync","Object","entries","error","process","exitCode","exit","hooks","hook","on","removeListener","waitUntilExitMs","startedAtMs","Date","now","expectedResources","stdout","isTTY","stderr","stdin","activeResources","getActiveResourcesInfo","unexpectedActiveResources","filter","activeResource","canExitProcess","elapsedTime","tryWarnActiveProcesses","timeoutId","setTimeout","clearTimeout","activeProcesses","children","_getActiveHandles","handle","ChildProcess","map","child","spawnargs","join","warn","singularOrPlural"],"mappings":"AAAA;;;;;;;;;;;IAmBgBA,gBAAgB,MAAhBA,gBAAgB;IA4DhBC,4BAA4B,MAA5BA,4BAA4B;;;yBA/Ef,oBAAoB;;;;;;;8DAC7B,cAAc;;;;;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,EAAE,GAAG,CAAC,AAAC;AACV,CAAC;AAED;;;;;;;;;;;CAWC,GACD,SAASe,sBAAsB,GAAG;IAChC,IAAII,eAAe,GAAa,EAAE,AAAC;IAEnC,IAAI;QACF,MAAMC,QAAQ,GAAmB5B,YAAO,EAAA,QAAA,AACtC,qHAAqH;SACpH6B,iBAAiB,EAAE,CACnBV,MAAM,CAAC,CAACW,MAAW,GAAKA,MAAM,YAAYC,iBAAY,EAAA,aAAA,CAAC,AAAC;QAE3D,IAAIH,QAAQ,CAACzC,MAAM,EAAE;YACnBwC,eAAe,GAAGC,QAAQ,CAACI,GAAG,CAAC,CAACC,KAAK,GAAKA,KAAK,CAACC,SAAS,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,EAAE,OAAOpC,KAAK,EAAE;QACdlB,KAAK,CAAC,2CAA2C,EAAEkB,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,CAAC4B,eAAe,CAACxC,MAAM,EAAE;QAC3BiD,IAAAA,IAAI,KAAA,EAAC,gEAAgE,CAAC,CAAC;IACzE,OAAO;QACL,MAAMC,gBAAgB,GACpBV,eAAe,CAACxC,MAAM,KAAK,CAAC,GAAG,WAAW,GAAG,CAAC,EAAEwC,eAAe,CAACxC,MAAM,CAAC,UAAU,CAAC,AAAC;QAErFiD,IAAAA,IAAI,KAAA,EAAC,CAAC,SAAS,EAAEC,gBAAgB,CAAC,sDAAsD,CAAC,CAAC,CAAC;QAC3FD,IAAAA,IAAI,KAAA,EAAC,MAAM,GAAGT,eAAe,CAACQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/exit.ts"],"sourcesContent":["import { ChildProcess } from 'node:child_process';\nimport process from 'node:process';\n\nimport { guardAsync } from './fn';\nimport { warn } from '../log';\n\nconst debug = require('debug')('expo:utils:exit') as typeof console.log;\n\ntype AsyncExitHook = (signal: NodeJS.Signals) => void | Promise<void>;\n\nconst PRE_EXIT_SIGNALS: NodeJS.Signals[] = ['SIGHUP', 'SIGINT', 'SIGTERM', 'SIGBREAK'];\n\n// We create a queue since Node.js throws an error if we try to append too many listeners:\n// (node:4405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit\nconst queue: AsyncExitHook[] = [];\n\nlet unsubscribe: (() => void) | null = null;\n\n/** Add functions that run before the process exits. Returns a function for removing the listeners. */\nexport function installExitHooks(asyncExitHook: AsyncExitHook): () => void {\n // We need to instantiate the master listener the first time the queue is used.\n if (!queue.length) {\n // Track the master listener so we can remove it later.\n unsubscribe = attachMasterListener();\n }\n\n queue.push(asyncExitHook);\n\n return () => {\n const index = queue.indexOf(asyncExitHook);\n if (index >= 0) {\n queue.splice(index, 1);\n }\n // Clean up the master listener if we don't need it anymore.\n if (!queue.length) {\n unsubscribe?.();\n }\n };\n}\n\n// Create a function that runs before the process exits and guards against running multiple times.\nfunction createExitHook(signal: NodeJS.Signals) {\n return guardAsync(async () => {\n debug(`pre-exit (signal: ${signal}, queue length: ${queue.length})`);\n\n for (const [index, hookAsync] of Object.entries(queue)) {\n try {\n await hookAsync(signal);\n } catch (error: any) {\n debug(`Error in exit hook: %O (queue: ${index})`, error);\n }\n }\n\n debug(`post-exit (code: ${process.exitCode ?? 0})`);\n\n process.exit();\n });\n}\n\nfunction attachMasterListener() {\n const hooks: [NodeJS.Signals, () => any][] = [];\n for (const signal of PRE_EXIT_SIGNALS) {\n const hook = createExitHook(signal);\n hooks.push([signal, hook]);\n process.on(signal, hook);\n }\n return () => {\n for (const [signal, hook] of hooks) {\n process.removeListener(signal, hook);\n }\n };\n}\n\n/**\n * Monitor if the current process is exiting before the delay is reached.\n * If there are active resources, the process will be forced to exit after the delay is reached.\n *\n * @see https://nodejs.org/docs/latest-v18.x/api/process.html#processgetactiveresourcesinfo\n */\nexport function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Date.now()) {\n // Create a list of the expected active resources before exiting.\n // Note, the order is undeterministic\n const expectedResources = [\n process.stdout.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stderr.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stdin.isTTY ? 'TTYWrap' : 'PipeWrap',\n ];\n // Check active resources, besides the TTYWrap/PipeWrap (process.stdin, process.stdout, process.stderr)\n // @ts-expect-error Added in v17.3.0, v16.14.0 but unavailable in v18 typings\n const activeResources = process.getActiveResourcesInfo() as string[];\n // Filter the active resource list by subtracting the expected resources, in undeterministic order\n const unexpectedActiveResources = activeResources.filter((activeResource) => {\n const index = expectedResources.indexOf(activeResource);\n if (index >= 0) {\n expectedResources.splice(index, 1);\n return false;\n }\n\n return true;\n });\n\n const canExitProcess = !unexpectedActiveResources.length;\n if (canExitProcess) {\n return debug('no active resources detected, process can safely exit');\n } else {\n debug(\n `process is trying to exit, but is stuck on unexpected active resources:`,\n unexpectedActiveResources\n );\n }\n\n // Check if the process needs to be force-closed\n const elapsedTime = Date.now() - startedAtMs;\n if (elapsedTime > waitUntilExitMs) {\n debug('active handles detected past the exit delay, forcefully exiting:', activeResources);\n tryWarnActiveProcesses();\n return process.exit(0);\n }\n\n const timeoutId = setTimeout(() => {\n // Ensure the timeout is cleared before checking the active resources\n clearTimeout(timeoutId);\n // Check if the process can exit\n ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs);\n }, 100);\n}\n\n/**\n * Try to warn the user about unexpected active processes running in the background.\n * This uses the internal `process._getActiveHandles` method, within a try-catch block.\n * If active child processes are detected, the commands of these processes are logged.\n *\n * @example ```bash\n * Done writing bundle output\n * Detected 2 processes preventing Expo from exiting, forcefully exiting now.\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * ```\n */\nfunction tryWarnActiveProcesses() {\n let activeProcesses: string[] = [];\n\n try {\n const children: ChildProcess[] = process\n // @ts-expect-error - This is an internal method, not designed to be exposed. It's also our only way to get this info\n ._getActiveHandles()\n .filter((handle: any) => handle instanceof ChildProcess);\n\n if (children.length) {\n activeProcesses = children.map((child) => child.spawnargs.join(' '));\n }\n } catch (error) {\n debug('failed to get active process information:', error);\n }\n\n if (!activeProcesses.length) {\n warn('Something prevented Expo from exiting, forcefully exiting now.');\n } else {\n const singularOrPlural =\n activeProcesses.length === 1 ? '1 process' : `${activeProcesses.length} processes`;\n\n warn(`Detected ${singularOrPlural} preventing Expo from exiting, forcefully exiting now.`);\n warn(' - ' + activeProcesses.join('\\n - '));\n }\n}\n"],"names":["ensureProcessExitsAfterDelay","installExitHooks","debug","require","PRE_EXIT_SIGNALS","queue","unsubscribe","asyncExitHook","length","attachMasterListener","push","index","indexOf","splice","createExitHook","signal","guardAsync","hookAsync","Object","entries","error","process","exitCode","exit","hooks","hook","on","removeListener","waitUntilExitMs","startedAtMs","Date","now","expectedResources","stdout","isTTY","stderr","stdin","activeResources","getActiveResourcesInfo","unexpectedActiveResources","filter","activeResource","canExitProcess","elapsedTime","tryWarnActiveProcesses","timeoutId","setTimeout","clearTimeout","activeProcesses","children","_getActiveHandles","handle","ChildProcess","map","child","spawnargs","join","warn","singularOrPlural"],"mappings":";;;;;;;;;;;IA+EgBA,4BAA4B;eAA5BA;;IA5DAC,gBAAgB;eAAhBA;;;;yBAnBa;;;;;;;gEACT;;;;;;oBAEO;qBACN;;;;;;AAErB,MAAMC,QAAQC,QAAQ,SAAS;AAI/B,MAAMC,mBAAqC;IAAC;IAAU;IAAU;IAAW;CAAW;AAEtF,0FAA0F;AAC1F,+KAA+K;AAC/K,MAAMC,QAAyB,EAAE;AAEjC,IAAIC,cAAmC;AAGhC,SAASL,iBAAiBM,aAA4B;IAC3D,+EAA+E;IAC/E,IAAI,CAACF,MAAMG,MAAM,EAAE;QACjB,uDAAuD;QACvDF,cAAcG;IAChB;IAEAJ,MAAMK,IAAI,CAACH;IAEX,OAAO;Q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,GAAGwC,gBAAgBxC,MAAM,CAAC,UAAU,CAAC;QAEpFiD,IAAAA,SAAI,EAAC,CAAC,SAAS,EAAEC,iBAAiB,sDAAsD,CAAC;QACzFD,IAAAA,SAAI,EAAC,SAAST,gBAAgBQ,IAAI,CAAC;IACrC;AACF"}
|
|
@@ -9,26 +9,34 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
ExpoUpdatesCLICommandFailedError: function() {
|
|
13
|
+
return ExpoUpdatesCLICommandFailedError;
|
|
14
|
+
},
|
|
15
|
+
ExpoUpdatesCLIInvalidCommandError: function() {
|
|
16
|
+
return ExpoUpdatesCLIInvalidCommandError;
|
|
17
|
+
},
|
|
18
|
+
ExpoUpdatesCLIModuleNotFoundError: function() {
|
|
19
|
+
return ExpoUpdatesCLIModuleNotFoundError;
|
|
20
|
+
},
|
|
21
|
+
expoUpdatesCommandAsync: function() {
|
|
22
|
+
return expoUpdatesCommandAsync;
|
|
23
|
+
}
|
|
16
24
|
});
|
|
17
|
-
function
|
|
18
|
-
const data = /*#__PURE__*/
|
|
19
|
-
|
|
25
|
+
function _spawnasync() {
|
|
26
|
+
const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
|
|
27
|
+
_spawnasync = function() {
|
|
20
28
|
return data;
|
|
21
29
|
};
|
|
22
30
|
return data;
|
|
23
31
|
}
|
|
24
|
-
function
|
|
25
|
-
const data = /*#__PURE__*/
|
|
26
|
-
|
|
32
|
+
function _resolvefrom() {
|
|
33
|
+
const data = /*#__PURE__*/ _interop_require_wildcard(require("resolve-from"));
|
|
34
|
+
_resolvefrom = function() {
|
|
27
35
|
return data;
|
|
28
36
|
};
|
|
29
37
|
return data;
|
|
30
38
|
}
|
|
31
|
-
function
|
|
39
|
+
function _interop_require_default(obj) {
|
|
32
40
|
return obj && obj.__esModule ? obj : {
|
|
33
41
|
default: obj
|
|
34
42
|
};
|
|
@@ -41,7 +49,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
41
49
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
42
50
|
})(nodeInterop);
|
|
43
51
|
}
|
|
44
|
-
function
|
|
52
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
45
53
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
46
54
|
return obj;
|
|
47
55
|
}
|
|
@@ -54,7 +62,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
54
62
|
if (cache && cache.has(obj)) {
|
|
55
63
|
return cache.get(obj);
|
|
56
64
|
}
|
|
57
|
-
var newObj = {
|
|
65
|
+
var newObj = {
|
|
66
|
+
__proto__: null
|
|
67
|
+
};
|
|
58
68
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
59
69
|
for(var key in obj){
|
|
60
70
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -81,29 +91,29 @@ class ExpoUpdatesCLICommandFailedError extends Error {
|
|
|
81
91
|
async function expoUpdatesCommandAsync(projectDir, args) {
|
|
82
92
|
let expoUpdatesCli;
|
|
83
93
|
try {
|
|
84
|
-
expoUpdatesCli = (0,
|
|
94
|
+
expoUpdatesCli = (0, _resolvefrom().silent)(projectDir, 'expo-updates/bin/cli') ?? (0, _resolvefrom().default)(projectDir, 'expo-updates/bin/cli.js');
|
|
85
95
|
} catch (e) {
|
|
86
|
-
if (e.code ===
|
|
96
|
+
if (e.code === 'MODULE_NOT_FOUND') {
|
|
87
97
|
throw new ExpoUpdatesCLIModuleNotFoundError(`The \`expo-updates\` package was not found. `);
|
|
88
98
|
}
|
|
89
99
|
throw e;
|
|
90
100
|
}
|
|
91
101
|
try {
|
|
92
|
-
return (await (0,
|
|
93
|
-
stdio:
|
|
102
|
+
return (await (0, _spawnasync().default)(expoUpdatesCli, args, {
|
|
103
|
+
stdio: 'pipe',
|
|
94
104
|
env: {
|
|
95
105
|
...process.env
|
|
96
106
|
}
|
|
97
107
|
})).stdout;
|
|
98
|
-
} catch (
|
|
99
|
-
if (
|
|
100
|
-
if (
|
|
108
|
+
} catch (e) {
|
|
109
|
+
if (e.stderr && typeof e.stderr === 'string') {
|
|
110
|
+
if (e.stderr.includes('Invalid command')) {
|
|
101
111
|
throw new ExpoUpdatesCLIInvalidCommandError(`The command specified by ${args} was not valid in the \`expo-updates\` CLI.`);
|
|
102
112
|
} else {
|
|
103
|
-
throw new ExpoUpdatesCLICommandFailedError(
|
|
113
|
+
throw new ExpoUpdatesCLICommandFailedError(e.stderr);
|
|
104
114
|
}
|
|
105
115
|
}
|
|
106
|
-
throw
|
|
116
|
+
throw e;
|
|
107
117
|
}
|
|
108
118
|
}
|
|
109
119
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/expoUpdatesCli.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport resolveFrom, { silent as silentResolveFrom } from 'resolve-from';\n\nexport class ExpoUpdatesCLIModuleNotFoundError extends Error {}\nexport class ExpoUpdatesCLIInvalidCommandError extends Error {}\nexport class ExpoUpdatesCLICommandFailedError extends Error {}\n\nexport async function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string> {\n let expoUpdatesCli;\n try {\n expoUpdatesCli =\n silentResolveFrom(projectDir, 'expo-updates/bin/cli') ??\n resolveFrom(projectDir, 'expo-updates/bin/cli.js');\n } catch (e: any) {\n if (e.code === 'MODULE_NOT_FOUND') {\n throw new ExpoUpdatesCLIModuleNotFoundError(`The \\`expo-updates\\` package was not found. `);\n }\n throw e;\n }\n\n try {\n return (\n await spawnAsync(expoUpdatesCli, args, {\n stdio: 'pipe',\n env: { ...process.env },\n })\n ).stdout;\n } catch (e: any) {\n if (e.stderr && typeof e.stderr === 'string') {\n if (e.stderr.includes('Invalid command')) {\n throw new ExpoUpdatesCLIInvalidCommandError(\n `The command specified by ${args} was not valid in the \\`expo-updates\\` CLI.`\n );\n } else {\n throw new ExpoUpdatesCLICommandFailedError(e.stderr);\n }\n }\n\n throw e;\n }\n}\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/expoUpdatesCli.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport resolveFrom, { silent as silentResolveFrom } from 'resolve-from';\n\nexport class ExpoUpdatesCLIModuleNotFoundError extends Error {}\nexport class ExpoUpdatesCLIInvalidCommandError extends Error {}\nexport class ExpoUpdatesCLICommandFailedError extends Error {}\n\nexport async function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string> {\n let expoUpdatesCli;\n try {\n expoUpdatesCli =\n silentResolveFrom(projectDir, 'expo-updates/bin/cli') ??\n resolveFrom(projectDir, 'expo-updates/bin/cli.js');\n } catch (e: any) {\n if (e.code === 'MODULE_NOT_FOUND') {\n throw new ExpoUpdatesCLIModuleNotFoundError(`The \\`expo-updates\\` package was not found. `);\n }\n throw e;\n }\n\n try {\n return (\n await spawnAsync(expoUpdatesCli, args, {\n stdio: 'pipe',\n env: { ...process.env },\n })\n ).stdout;\n } catch (e: any) {\n if (e.stderr && typeof e.stderr === 'string') {\n if (e.stderr.includes('Invalid command')) {\n throw new ExpoUpdatesCLIInvalidCommandError(\n `The command specified by ${args} was not valid in the \\`expo-updates\\` CLI.`\n );\n } else {\n throw new ExpoUpdatesCLICommandFailedError(e.stderr);\n }\n }\n\n throw e;\n }\n}\n"],"names":["ExpoUpdatesCLICommandFailedError","ExpoUpdatesCLIInvalidCommandError","ExpoUpdatesCLIModuleNotFoundError","expoUpdatesCommandAsync","Error","projectDir","args","expoUpdatesCli","silentResolveFrom","resolveFrom","e","code","spawnAsync","stdio","env","process","stdout","stderr","includes"],"mappings":";;;;;;;;;;;IAKaA,gCAAgC;eAAhCA;;IADAC,iCAAiC;eAAjCA;;IADAC,iCAAiC;eAAjCA;;IAISC,uBAAuB;eAAvBA;;;;gEAPC;;;;;;;iEACkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,MAAMD,0CAA0CE;AAAO;AACvD,MAAMH,0CAA0CG;AAAO;AACvD,MAAMJ,yCAAyCI;AAAO;AAEtD,eAAeD,wBAAwBE,UAAkB,EAAEC,IAAc;IAC9E,IAAIC;IACJ,IAAI;QACFA,iBACEC,IAAAA,qBAAiB,EAACH,YAAY,2BAC9BI,IAAAA,sBAAW,EAACJ,YAAY;IAC5B,EAAE,OAAOK,GAAQ;QACf,IAAIA,EAAEC,IAAI,KAAK,oBAAoB;YACjC,MAAM,IAAIT,kCAAkC,CAAC,4CAA4C,CAAC;QAC5F;QACA,MAAMQ;IACR;IAEA,IAAI;QACF,OAAO,AACL,CAAA,MAAME,IAAAA,qBAAU,EAACL,gBAAgBD,MAAM;YACrCO,OAAO;YACPC,KAAK;gBAAE,GAAGC,QAAQD,GAAG;YAAC;QACxB,EAAC,EACDE,MAAM;IACV,EAAE,OAAON,GAAQ;QACf,IAAIA,EAAEO,MAAM,IAAI,OAAOP,EAAEO,MAAM,KAAK,UAAU;YAC5C,IAAIP,EAAEO,MAAM,CAACC,QAAQ,CAAC,oBAAoB;gBACxC,MAAM,IAAIjB,kCACR,CAAC,yBAAyB,EAAEK,KAAK,2CAA2C,CAAC;YAEjF,OAAO;gBACL,MAAM,IAAIN,iCAAiCU,EAAEO,MAAM;YACrD;QACF;QAEA,MAAMP;IACR;AACF"}
|
package/build/src/utils/fetch.js
CHANGED
|
@@ -9,10 +9,14 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Headers: function() {
|
|
13
|
+
return Headers;
|
|
14
|
+
},
|
|
15
|
+
fetch: function() {
|
|
16
|
+
return fetch;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const fetch = typeof globalThis.fetch !==
|
|
16
|
-
const Headers = typeof globalThis.Headers !==
|
|
19
|
+
const fetch = typeof globalThis.fetch !== 'undefined' ? globalThis.fetch : require('undici').fetch;
|
|
20
|
+
const Headers = typeof globalThis.Headers !== 'undefined' ? globalThis.Headers : require('undici').Headers;
|
|
17
21
|
|
|
18
22
|
//# sourceMappingURL=fetch.js.map
|