@expo/build-tools 0.1.155 → 0.1.157
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.
|
@@ -137,6 +137,18 @@ exports.buildErrorHandlers = [
|
|
|
137
137
|
: undefined,
|
|
138
138
|
createError: () => new TrackedBuildError('NPM_CACHE_ERROR', `npm: cache error`),
|
|
139
139
|
})),
|
|
140
|
+
{
|
|
141
|
+
platform: eas_build_job_1.Platform.IOS,
|
|
142
|
+
phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
|
|
143
|
+
regexp: ({ env }) => env.EAS_BUILD_COCOAPODS_CACHE_URL ? /Error installing/ : undefined,
|
|
144
|
+
createError: () => new TrackedBuildError('COCOAPODS_CACHE_INSTALLING_POD_ERROR', `cocoapods: error installing a pod using internal cache instance`),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
platform: eas_build_job_1.Platform.IOS,
|
|
148
|
+
phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
|
|
149
|
+
regexp: ({ env }) => env.EAS_BUILD_COCOAPODS_CACHE_URL ? /No podspec exists at path/ : undefined,
|
|
150
|
+
createError: () => new TrackedBuildError('COCOAPODS_CACHE_NO_PODSPEC_EXISTS_AT_PATH_ERROR', `cocoapods: error fetching a podspec through internal cache instance`),
|
|
151
|
+
},
|
|
140
152
|
{
|
|
141
153
|
platform: eas_build_job_1.Platform.IOS,
|
|
142
154
|
phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/buildErrorHandlers.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA2D;AAC3D,uEAA+C;AAI/C,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,SAAiB,EAAS,OAAe;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,cAAS,GAAT,SAAS,CAAQ;QAAS,YAAO,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, Platform } from '@expo/eas-build-job';\nimport escapeRegExp from 'lodash/escapeRegExp';\n\nimport { ErrorContext, ErrorHandler } from './errors.types';\n\nexport class TrackedBuildError extends Error {\n constructor(public errorCode: string, public message: string) {\n super(message);\n }\n}\n\nexport const buildErrorHandlers: ErrorHandler<TrackedBuildError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/2/a/e/MultiplatformBleAdapter/0.0.3/MultiplatformBleAdapter.podspec.json Response: 429 429: Too Many Requests\n regexp: /CDN: trunk URL couldn't be downloaded.* Response: 429 429: Too Many Requests/,\n createError: () =>\n new TrackedBuildError('COCOAPODS_TO_MANY_REQUEST', 'cocoapods: too many requests'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // Host key verification failed.\n // fatal: Could not read from remote repository.\n regexp: /Host key verification failed\\.\\nfatal: Could not read from remote repository/,\n createError: () => new TrackedBuildError('NPM_INSTALL_SSH_AUTHENTICATION', 'Missing ssh key.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error functions@1.0.0: The engine \"node\" is incompatible with this module. Expected version \"14\". Got \"16.13.2\"\n // error Found incompatible module.\n regexp: /The engine \"node\" is incompatible with this module\\. Expected version/,\n createError: () =>\n new TrackedBuildError('NODE_ENGINE_INCOMPATIBLE', 'node: Incompatible engine field.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz: Request failed \\\"500 Internal Server Error\\\"\".\n // or\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/request/-/request-2.88.2.tgz: Request failed \\\"503 Service Unavailable\\\"\".\n regexp: /An unexpected error occurred: \"https:\\/\\/registry.yarnpkg.com\\/.*Request failed \\\\\"5/,\n createError: () => new TrackedBuildError('YARN_REGISTRY_5XX_RESPONSE', 'yarn: 5xx response.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Input is required, but Expo CLI is in non-interactive mode\n // or\n // CommandError: Input is required, but 'npx expo' is in non-interactive mode.\n regexp: /Input is required, but .* is in non-interactive mode/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_INPUT_REQUIRED_ERROR',\n `expo-cli: Input required in non-interactive mode.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [03:03:05] [ios.infoPlist]: withIosInfoPlistBaseMod: GoogleService-Info.plist is empty\n regexp: /withIosInfoPlistBaseMod: GoogleService-Info\\.plist is empty/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Empty GoogleService-Info.plist.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [01:52:04] [ios.xcodeproj]: withIosXcodeprojBaseMod: Path to GoogleService-Info.plist is not defined. Please specify the `expo.ios.googleServicesFile` field in app.json.\n regexp: /withIosXcodeprojBaseMod: Path to GoogleService-Info\\.plist is not defined/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Path to GoogleService-Info.plist is not defined.`\n ),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Error: [android.dangerous]: withAndroidDangerousBaseMod: ENOENT: no such file or directory, open './assets/adaptive-icon.png'\n // at Object.openSync (node:fs:585:3)\n // at readFileSync (node:fs:453:35)\n // at calculateHash (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async generateIconAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:369:11)\n // at async /home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:310:21\n // at async Promise.all (index 0)\n // at async generateMultiLayerImageAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:306:3)\n // or\n // Error: [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open './assets/images/app_icon_staging.png'\n // at Object.openSync (fs.js:497:3)\n // at readFileSync (fs.js:393:35)\n // at calculateHash (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async setIconsAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:169:15)\n // at async /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:71:5\n // at async action (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)\n // at async interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)\n regexp: /ENOENT: no such file or directory[\\s\\S]*prebuild-config\\/build\\/plugins\\/icons\\/with(Android|Ios)Icons\\.js/,\n createError: () => new TrackedBuildError('EXPO_CLI_MISSING_ICON', 'expo-cli: Missing icon.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.\n regexp: /Cannot determine which native SDK version your project uses because the module `expo` is not installed/,\n createError: () =>\n new TrackedBuildError('EXPO_CLI_EXPO_PACKAGE_MISSING', 'expo-cli: \"expo\" package missing.'),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static\n regexp: /The Swift pod .* depends upon .* which does not define modules/,\n createError: () =>\n new TrackedBuildError(\n 'SWIFT_POD_INCOMPATIBLE_DEPENDENCY',\n 'pod: Swift pod depends on a pod that does not define modules.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // Adding spec repo `24-repository-cocoapods-proxy` with CDN `http://10.254.24.7:8081/repository/cocoapods-proxy/`\n // [!] No podspec exists at path `/Users/expo/.cocoapods/repos/24-repository-cocoapods-proxy/Specs/1/9/2/libwebp/1.2.0/libwebp.podspec.json`.\n regexp: /Adding spec repo .* with CDN .*\\n\\s*\\[!\\] No podspec exists at path `(.*)`/,\n // Some pods are hosted on git registries that are not supported e.g. chromium.googlesource.com\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR',\n `cocoapods: Missing podspec ${match[1]}.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.\n regexp: /\\[!\\] Invalid `Podfile` file: .* unexpected token at 'info Run CLI with --verbose flag for more details./,\n createError: () =>\n new TrackedBuildError('NODE_ENV_PRODUCTION_DEFINED', 'npm: NODE_ENV=production was defined.'),\n },\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n // example log:\n // [stderr] WARN tarball tarball data for @typescript-eslint/typescript-estree@5.26.0 (sha512-cozo/GbwixVR0sgfHItz3t1yXu521yn71Wj6PlYCFA3WPhy51CUPkifFKfBis91bDclGmAY45hhaAXVjdn4new==) seems to be corrupted. Trying again.\n regexp: /tarball tarball data for ([^ ]*) .* seems to be corrupted. Trying again/,\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError('NPM_CORRUPTED_PACKAGE', `npm: corrupted package ${match[1]}`),\n })),\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_NPM_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_NPM_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('NPM_CACHE_ERROR', `npm: cache error`),\n })),\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_COCOAPODS_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('COCOAPODS_CACHE_ERROR', `cocoapods: cache error`),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration.\n regexp: /\\[!\\] Invalid `Podfile` file/,\n createError: () => new TrackedBuildError('INVALID_PODFILE', 'pod: Invalid Podfile file.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // info There appears to be trouble with your network connection. Retrying...\n regexp: /info There appears to be trouble with your network connection. Retrying/,\n createError: () =>\n new TrackedBuildError(\n 'YARN_INSTALL_TROUBLE_WITH_NETWORK_CONNECTION',\n 'yarn: There appears to be trouble with your network connection'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8\n regexp: /Android Gradle plugin requires Java .* to run. You are currently using Java/,\n createError: () =>\n new TrackedBuildError('INCOMPATIBLE_JAVA_VERSION', 'gradle: Incompatible java version.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml:27:9-33:20 Error:\n // \tandroid:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.\n regexp: /Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`/,\n createError: () =>\n new TrackedBuildError(\n 'REQUIRE_EXPLICIT_EXPORTED_ANDROID_12',\n 'Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable\n // > Android resource compilation failed\n // ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.\n regexp: /AAPT: error: failed to read PNG signature: file does not start with PNG signature/,\n createError: () =>\n new TrackedBuildError('INVALID_PNG_SIGNATURE', 'gradle: Invalid PNG signature.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:processReleaseGoogleServices'.\n // > Malformed root json\n regexp: /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Malformed root json/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Malformed google-services.json.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:processDebugGoogleServices'.\n // > Missing project_info object\n regexp: /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Missing project_info object/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Missing project_info object.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:bundleReleaseJsAndAssets'.\n // > Process 'command 'node'' finished with non-zero exit value 1\n regexp: /Execution failed for task ':app:bundleReleaseJsAndAssets'.*\\s.*Process 'command 'node'' finished with non-zero exit value/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_BUILD_BUNDLER_ERROR',\n \"gradle: ':app:bundleReleaseJsAndAssets' failed.\"\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // Required by:\n // project :expo-updates\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // > Could not get resource 'https://lsdkfjsdlkjf.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Could not HEAD 'https://slkdfjldskjfl.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Connect to sdlkfjsdlkf.com:443 [slkdfjdslk.com/38.178.101.5] failed: connect timed out\n regexp: /Could not get resource.*\\n.*Could not HEAD 'https/,\n createError: () =>\n new TrackedBuildError('MAVEN_REGISTRY_CONNECTION_ERROR', `maven: registry connection error`),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_MAVEN_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_MAVEN_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('MAVEN_CACHE_ERROR', `maven: cache error`),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // error: exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\": expected one of {Development, Production}, but no value was provided\n regexp: /exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\"/,\n createError: () =>\n new TrackedBuildError(\n 'MISSING_ICLOUD_CONTAINER_ENVIRONMENT',\n 'fastlane: Missing iCloudContainerEnvironment in exportOptionsPlist.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution [CP-User]\\ Generate\\ app.manifest\\ for\\ expo-updates /Users/expo/Library/Developer/Xcode/DerivedData/Kenkohub-eqseedlxbgrzjqagscbclhbtstwh/Build/Intermediates.noindex/ArchiveIntermediates/Kenkohub/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXUpdates.build/Script-BB6B5FD28815C045A20B2E5E3FEEBD6E.sh (in target 'EXUpdates' from project 'Pods')\n regexp: /The following build commands failed.*\\s.*\\[CP-User\\]\\\\ Generate\\\\ app\\.manifest\\\\ for\\\\ expo-updates/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_UPDATES_PHASE_SCRIPT',\n 'fastlane: Generating app.manifest for expo-updates failed.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n // \tCompileC /Users/expo/Library/Developer/Xcode/DerivedData/Docent-amxxhphjfdtkpxecgidgzvwvnvtc/Build/Intermediates.noindex/ArchiveIntermediates/Docent/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/arm64/SSLErrors.o /Users/expo/workingdir/build/ios/Pods/Flipper-Folly/folly/io/async/ssl/SSLErrors.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper-Folly' from project 'Pods')\n regexp: /in target 'Flipper-Folly' from project 'Pods'/,\n createError: () =>\n new TrackedBuildError(\n 'FLIPPER_FOLLY_COMPILE_ERROR',\n 'fastlane: Flipper-Folly compile error.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution Bundle\\ React\\ Native\\ code\\ and\\ images /Users/expo/Library/Developer/Xcode/DerivedData/cnaxwpahkhcjluhigkcwrturapmm/Build/Intermediates.noindex/ArchiveIntermediates/Test/IntermediateBuildFilesPath/Test.build/Release-iphoneos/Test.build/Script-00DD1BFF151E006B06BC.sh (in target 'Test' from project 'Test')\n regexp: /The following build commands failed.*\\s.*PhaseScriptExecution Bundle\\\\ React\\\\ Native\\\\ code\\\\ and\\\\ images \\/Users\\/expo/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_BUNDLER_ERROR',\n 'fastlane: Bundle React Native code and images failed.'\n ),\n },\n];\n"]}
|
|
1
|
+
{"version":3,"file":"buildErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/buildErrorHandlers.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA2D;AAC3D,uEAA+C;AAI/C,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,SAAiB,EAAS,OAAe;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,cAAS,GAAT,SAAS,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAQ;IAE5D,CAAC;CACF;AAJD,8CAIC;AAEY,QAAA,kBAAkB,GAAsC;IACnE;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,eAAe;QACf,4LAA4L;QAC5L,MAAM,EAAE,8EAA8E;QACtF,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,8BAA8B,CAAC;KACrF;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,oBAAoB;QACtC,gCAAgC;QAChC,gDAAgD;QAChD,MAAM,EAAE,8EAA8E;QACtF,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,gCAAgC,EAAE,kBAAkB,CAAC;KAC/F;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,oBAAoB;QACtC,kHAAkH;QAClH,mCAAmC;QACnC,MAAM,EAAE,uEAAuE;QAC/E,WAAW,EAAE,GAAG,EAAE,CA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build-job';\nimport escapeRegExp from 'lodash/escapeRegExp';\n\nimport { ErrorContext, ErrorHandler } from './errors.types';\n\nexport class TrackedBuildError extends Error {\n constructor(public errorCode: string, public message: string) {\n super(message);\n }\n}\n\nexport const buildErrorHandlers: ErrorHandler<TrackedBuildError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/2/a/e/MultiplatformBleAdapter/0.0.3/MultiplatformBleAdapter.podspec.json Response: 429 429: Too Many Requests\n regexp: /CDN: trunk URL couldn't be downloaded.* Response: 429 429: Too Many Requests/,\n createError: () =>\n new TrackedBuildError('COCOAPODS_TO_MANY_REQUEST', 'cocoapods: too many requests'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // Host key verification failed.\n // fatal: Could not read from remote repository.\n regexp: /Host key verification failed\\.\\nfatal: Could not read from remote repository/,\n createError: () => new TrackedBuildError('NPM_INSTALL_SSH_AUTHENTICATION', 'Missing ssh key.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error functions@1.0.0: The engine \"node\" is incompatible with this module. Expected version \"14\". Got \"16.13.2\"\n // error Found incompatible module.\n regexp: /The engine \"node\" is incompatible with this module\\. Expected version/,\n createError: () =>\n new TrackedBuildError('NODE_ENGINE_INCOMPATIBLE', 'node: Incompatible engine field.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz: Request failed \\\"500 Internal Server Error\\\"\".\n // or\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/request/-/request-2.88.2.tgz: Request failed \\\"503 Service Unavailable\\\"\".\n regexp: /An unexpected error occurred: \"https:\\/\\/registry.yarnpkg.com\\/.*Request failed \\\\\"5/,\n createError: () => new TrackedBuildError('YARN_REGISTRY_5XX_RESPONSE', 'yarn: 5xx response.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Input is required, but Expo CLI is in non-interactive mode\n // or\n // CommandError: Input is required, but 'npx expo' is in non-interactive mode.\n regexp: /Input is required, but .* is in non-interactive mode/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_INPUT_REQUIRED_ERROR',\n `expo-cli: Input required in non-interactive mode.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [03:03:05] [ios.infoPlist]: withIosInfoPlistBaseMod: GoogleService-Info.plist is empty\n regexp: /withIosInfoPlistBaseMod: GoogleService-Info\\.plist is empty/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Empty GoogleService-Info.plist.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [01:52:04] [ios.xcodeproj]: withIosXcodeprojBaseMod: Path to GoogleService-Info.plist is not defined. Please specify the `expo.ios.googleServicesFile` field in app.json.\n regexp: /withIosXcodeprojBaseMod: Path to GoogleService-Info\\.plist is not defined/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Path to GoogleService-Info.plist is not defined.`\n ),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Error: [android.dangerous]: withAndroidDangerousBaseMod: ENOENT: no such file or directory, open './assets/adaptive-icon.png'\n // at Object.openSync (node:fs:585:3)\n // at readFileSync (node:fs:453:35)\n // at calculateHash (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async generateIconAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:369:11)\n // at async /home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:310:21\n // at async Promise.all (index 0)\n // at async generateMultiLayerImageAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:306:3)\n // or\n // Error: [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open './assets/images/app_icon_staging.png'\n // at Object.openSync (fs.js:497:3)\n // at readFileSync (fs.js:393:35)\n // at calculateHash (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async setIconsAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:169:15)\n // at async /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:71:5\n // at async action (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)\n // at async interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)\n regexp: /ENOENT: no such file or directory[\\s\\S]*prebuild-config\\/build\\/plugins\\/icons\\/with(Android|Ios)Icons\\.js/,\n createError: () => new TrackedBuildError('EXPO_CLI_MISSING_ICON', 'expo-cli: Missing icon.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.\n regexp: /Cannot determine which native SDK version your project uses because the module `expo` is not installed/,\n createError: () =>\n new TrackedBuildError('EXPO_CLI_EXPO_PACKAGE_MISSING', 'expo-cli: \"expo\" package missing.'),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static\n regexp: /The Swift pod .* depends upon .* which does not define modules/,\n createError: () =>\n new TrackedBuildError(\n 'SWIFT_POD_INCOMPATIBLE_DEPENDENCY',\n 'pod: Swift pod depends on a pod that does not define modules.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // Adding spec repo `24-repository-cocoapods-proxy` with CDN `http://10.254.24.7:8081/repository/cocoapods-proxy/`\n // [!] No podspec exists at path `/Users/expo/.cocoapods/repos/24-repository-cocoapods-proxy/Specs/1/9/2/libwebp/1.2.0/libwebp.podspec.json`.\n regexp: /Adding spec repo .* with CDN .*\\n\\s*\\[!\\] No podspec exists at path `(.*)`/,\n // Some pods are hosted on git registries that are not supported e.g. chromium.googlesource.com\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR',\n `cocoapods: Missing podspec ${match[1]}.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.\n regexp: /\\[!\\] Invalid `Podfile` file: .* unexpected token at 'info Run CLI with --verbose flag for more details./,\n createError: () =>\n new TrackedBuildError('NODE_ENV_PRODUCTION_DEFINED', 'npm: NODE_ENV=production was defined.'),\n },\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n // example log:\n // [stderr] WARN tarball tarball data for @typescript-eslint/typescript-estree@5.26.0 (sha512-cozo/GbwixVR0sgfHItz3t1yXu521yn71Wj6PlYCFA3WPhy51CUPkifFKfBis91bDclGmAY45hhaAXVjdn4new==) seems to be corrupted. Trying again.\n regexp: /tarball tarball data for ([^ ]*) .* seems to be corrupted. Trying again/,\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError('NPM_CORRUPTED_PACKAGE', `npm: corrupted package ${match[1]}`),\n })),\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_NPM_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_NPM_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('NPM_CACHE_ERROR', `npm: cache error`),\n })),\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /Error installing/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INSTALLING_POD_ERROR',\n `cocoapods: error installing a pod using internal cache instance`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /No podspec exists at path/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_NO_PODSPEC_EXISTS_AT_PATH_ERROR',\n `cocoapods: error fetching a podspec through internal cache instance`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_COCOAPODS_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('COCOAPODS_CACHE_ERROR', `cocoapods: cache error`),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration.\n regexp: /\\[!\\] Invalid `Podfile` file/,\n createError: () => new TrackedBuildError('INVALID_PODFILE', 'pod: Invalid Podfile file.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // info There appears to be trouble with your network connection. Retrying...\n regexp: /info There appears to be trouble with your network connection. Retrying/,\n createError: () =>\n new TrackedBuildError(\n 'YARN_INSTALL_TROUBLE_WITH_NETWORK_CONNECTION',\n 'yarn: There appears to be trouble with your network connection'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8\n regexp: /Android Gradle plugin requires Java .* to run. You are currently using Java/,\n createError: () =>\n new TrackedBuildError('INCOMPATIBLE_JAVA_VERSION', 'gradle: Incompatible java version.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml:27:9-33:20 Error:\n // \tandroid:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.\n regexp: /Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`/,\n createError: () =>\n new TrackedBuildError(\n 'REQUIRE_EXPLICIT_EXPORTED_ANDROID_12',\n 'Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable\n // > Android resource compilation failed\n // ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.\n regexp: /AAPT: error: failed to read PNG signature: file does not start with PNG signature/,\n createError: () =>\n new TrackedBuildError('INVALID_PNG_SIGNATURE', 'gradle: Invalid PNG signature.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:processReleaseGoogleServices'.\n // > Malformed root json\n regexp: /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Malformed root json/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Malformed google-services.json.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:processDebugGoogleServices'.\n // > Missing project_info object\n regexp: /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Missing project_info object/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Missing project_info object.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:bundleReleaseJsAndAssets'.\n // > Process 'command 'node'' finished with non-zero exit value 1\n regexp: /Execution failed for task ':app:bundleReleaseJsAndAssets'.*\\s.*Process 'command 'node'' finished with non-zero exit value/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_BUILD_BUNDLER_ERROR',\n \"gradle: ':app:bundleReleaseJsAndAssets' failed.\"\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // Required by:\n // project :expo-updates\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // > Could not get resource 'https://lsdkfjsdlkjf.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Could not HEAD 'https://slkdfjldskjfl.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Connect to sdlkfjsdlkf.com:443 [slkdfjdslk.com/38.178.101.5] failed: connect timed out\n regexp: /Could not get resource.*\\n.*Could not HEAD 'https/,\n createError: () =>\n new TrackedBuildError('MAVEN_REGISTRY_CONNECTION_ERROR', `maven: registry connection error`),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_MAVEN_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_MAVEN_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('MAVEN_CACHE_ERROR', `maven: cache error`),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // error: exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\": expected one of {Development, Production}, but no value was provided\n regexp: /exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\"/,\n createError: () =>\n new TrackedBuildError(\n 'MISSING_ICLOUD_CONTAINER_ENVIRONMENT',\n 'fastlane: Missing iCloudContainerEnvironment in exportOptionsPlist.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution [CP-User]\\ Generate\\ app.manifest\\ for\\ expo-updates /Users/expo/Library/Developer/Xcode/DerivedData/Kenkohub-eqseedlxbgrzjqagscbclhbtstwh/Build/Intermediates.noindex/ArchiveIntermediates/Kenkohub/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXUpdates.build/Script-BB6B5FD28815C045A20B2E5E3FEEBD6E.sh (in target 'EXUpdates' from project 'Pods')\n regexp: /The following build commands failed.*\\s.*\\[CP-User\\]\\\\ Generate\\\\ app\\.manifest\\\\ for\\\\ expo-updates/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_UPDATES_PHASE_SCRIPT',\n 'fastlane: Generating app.manifest for expo-updates failed.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n // \tCompileC /Users/expo/Library/Developer/Xcode/DerivedData/Docent-amxxhphjfdtkpxecgidgzvwvnvtc/Build/Intermediates.noindex/ArchiveIntermediates/Docent/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/arm64/SSLErrors.o /Users/expo/workingdir/build/ios/Pods/Flipper-Folly/folly/io/async/ssl/SSLErrors.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper-Folly' from project 'Pods')\n regexp: /in target 'Flipper-Folly' from project 'Pods'/,\n createError: () =>\n new TrackedBuildError(\n 'FLIPPER_FOLLY_COMPILE_ERROR',\n 'fastlane: Flipper-Folly compile error.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution Bundle\\ React\\ Native\\ code\\ and\\ images /Users/expo/Library/Developer/Xcode/DerivedData/cnaxwpahkhcjluhigkcwrturapmm/Build/Intermediates.noindex/ArchiveIntermediates/Test/IntermediateBuildFilesPath/Test.build/Release-iphoneos/Test.build/Script-00DD1BFF151E006B06BC.sh (in target 'Test' from project 'Test')\n regexp: /The following build commands failed.*\\s.*PhaseScriptExecution Bundle\\\\ React\\\\ Native\\\\ code\\\\ and\\\\ images \\/Users\\/expo/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_BUNDLER_ERROR',\n 'fastlane: Bundle React Native code and images failed.'\n ),\n },\n];\n"]}
|
package/dist/utils/project.js
CHANGED
|
@@ -31,13 +31,13 @@ async function setup(ctx) {
|
|
|
31
31
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PRE_INSTALL_HOOK, async () => {
|
|
32
32
|
await (0, hooks_1.runHookIfPresent)(ctx, hooks_1.Hook.PRE_INSTALL);
|
|
33
33
|
});
|
|
34
|
-
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, async () => {
|
|
35
|
-
await installDependencies(ctx);
|
|
36
|
-
});
|
|
37
34
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.READ_PACKAGE_JSON, async () => {
|
|
38
35
|
ctx.logger.info('Using package.json:');
|
|
39
36
|
ctx.logger.info(JSON.stringify(packageJson, null, 2));
|
|
40
37
|
});
|
|
38
|
+
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, async () => {
|
|
39
|
+
await installDependencies(ctx);
|
|
40
|
+
});
|
|
41
41
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.READ_APP_CONFIG, async () => {
|
|
42
42
|
ctx.logger.info('Using app configuration:');
|
|
43
43
|
ctx.logger.info(JSON.stringify(ctx.appConfig, null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/utils/project.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,kEAA4C;AAC5C,uDAAwF;AACxF,sEAAoF;AACpF,wDAA0B;AAC1B,oDAA4B;AAG5B,8CAAmE;AAEnE,mCAAiD;AACjD,mCAAsD;AACtD,qDAAuE;AAEvE,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtC,KAAK,UAAU,KAAK,CAAmB,GAAuB;;IACnE,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,wBAAwB,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE;YACrB,MAAM,IAAA,mCAA2B,EAAC,GAAG,CAAC,CAAC;SACxC;QACD,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,gBAAgB,KAAK,WAAW,EAAE;YACjF,MAAM,IAAA,2CAAgC,EAAC,GAA4B,CAAC,CAAC;SACtE;QACD,4DAA4D;QAC5D,OAAO,eAAe,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,gBAAgB,EAAE,KAAK,IAA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CAAC;QAC/B,OAAO,MAAM,OAAO,CAAC;KACtB;YAAS;QACR,IAAI,OAAO,EAAE;YACX,YAAY,CAAC,OAAO,CAAC,CAAC;SACvB;KACF;AACH,CAAC;AAED,SAAgB,eAAe,CAAC,UAAkB;IAChD,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC9D,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,kCAAkC,UAAU,EAAE,CAAC,CAAC;KACjE;IACD,IAAI;QACF,OAAO,kBAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;KACzC;IAAC,OAAO,GAAQ,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;KACzE;AACH,CAAC;AAVD,0CAUC","sourcesContent":["import path from 'path';\n\nimport downloadFile from '@expo/downloader';\nimport { ArchiveSourceType, BuildPhase, Ios, Job, Platform } from '@expo/eas-build-job';\nimport spawn, { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\nimport fs from 'fs-extra';\nimport semver from 'semver';\n\nimport { BuildContext } from '../context';\nimport { deleteXcodeEnvLocalIfExistsAsync } from '../ios/xcodeEnv';\n\nimport { Hook, runHookIfPresent } from './hooks';\nimport { createNpmrcIfNotExistsAsync } from './npmrc';\nimport { findPackagerRootDir, PackageManager } from './packageManager';\n\nconst MAX_EXPO_DOCTOR_TIMEOUT_MS = 20 * 1000;\n\nexport async function setup<TJob extends Job>(ctx: BuildContext<TJob>): Promise<void> {\n const packageJson = await ctx.runBuildPhase(BuildPhase.PREPARE_PROJECT, async () => {\n await downloadAndUnpackProject(ctx);\n if (ctx.env.NPM_TOKEN) {\n await createNpmrcIfNotExistsAsync(ctx);\n }\n if (ctx.job.platform === Platform.IOS && ctx.env.EAS_BUILD_RUNNER === 'eas-build') {\n await deleteXcodeEnvLocalIfExistsAsync(ctx as BuildContext<Ios.Job>);\n }\n // try to read package.json to see if it exists and is valid\n return readPackageJson(ctx.reactNativeProjectDirectory);\n });\n\n await ctx.runBuildPhase(BuildPhase.PRE_INSTALL_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.PRE_INSTALL);\n });\n\n await ctx.runBuildPhase(BuildPhase.INSTALL_DEPENDENCIES, async () => {\n await installDependencies(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.READ_PACKAGE_JSON, async () => {\n ctx.logger.info('Using package.json:');\n ctx.logger.info(JSON.stringify(packageJson, null, 2));\n });\n\n await ctx.runBuildPhase(BuildPhase.READ_APP_CONFIG, async () => {\n ctx.logger.info('Using app configuration:');\n ctx.logger.info(JSON.stringify(ctx.appConfig, null, 2));\n });\n\n const hasExpoPackage = !!packageJson.dependencies?.expo;\n if (hasExpoPackage) {\n await ctx.runBuildPhase(BuildPhase.RUN_EXPO_DOCTOR, async () => {\n try {\n const { stdout } = await runExpoDoctor(ctx);\n if (!stdout.match(/Didn't find any issues with the project/)) {\n ctx.markBuildPhaseHasWarnings();\n }\n } catch (err) {\n ctx.logger.error({ err }, 'Command \"expo doctor\" failed.');\n ctx.markBuildPhaseHasWarnings();\n }\n });\n }\n}\n\nasync function downloadAndUnpackProject<TJob extends Job>(ctx: BuildContext<TJob>): Promise<void> {\n const projectTarball = path.join(ctx.workingdir, 'project.tar.gz');\n if (ctx.job.projectArchive.type === ArchiveSourceType.S3) {\n throw new Error('ArchiveSourceType.S3 should be resolved earlier to url');\n } else if (ctx.job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.copy(ctx.job.projectArchive.path, projectTarball); // used in eas-build-cli\n } else if (ctx.job.projectArchive.type === ArchiveSourceType.URL) {\n try {\n await downloadFile(ctx.job.projectArchive.url, projectTarball, { retry: 3 });\n } catch (err: any) {\n ctx.reportError?.('Failed to download project archive', err, {\n extras: { buildId: ctx.env.EAS_BUILD_ID },\n });\n throw err;\n }\n }\n\n await spawn(\n 'tar',\n ['--strip-components', '1', '-zxf', 'project.tar.gz', '-C', ctx.buildDirectory],\n {\n cwd: ctx.workingdir,\n logger: ctx.logger,\n }\n );\n}\n\nexport async function installDependencies<TJob extends Job>(\n ctx: BuildContext<TJob>\n): Promise<void> {\n const packagerRunDir = findPackagerRootDir(ctx.reactNativeProjectDirectory);\n if (packagerRunDir !== ctx.reactNativeProjectDirectory) {\n const relativeReactNativeProjectDirectory = path.relative(\n ctx.buildDirectory,\n ctx.reactNativeProjectDirectory\n );\n ctx.logger.info(\n `We detected that '${relativeReactNativeProjectDirectory}' is a ${ctx.packageManager} workspace`\n );\n }\n\n const relativePackagerRunDir = path.relative(ctx.buildDirectory, packagerRunDir);\n let args = ['install'];\n if (ctx.packageManager === PackageManager.PNPM) {\n args = ['install', '--no-frozen-lockfile'];\n } else if (ctx.packageManager === PackageManager.YARN) {\n const isYarn2 = await isUsingYarn2(ctx.reactNativeProjectDirectory);\n if (isYarn2) {\n args = ['install', '--no-immutable'];\n }\n }\n ctx.logger.info(\n `Running \"${ctx.packageManager} ${args.join(' ')}\" in ${\n relativePackagerRunDir\n ? `directory '${relativePackagerRunDir}'`\n : 'the root dir of your repository'\n } `\n );\n await spawn(ctx.packageManager, args, {\n cwd: packagerRunDir,\n logger: ctx.logger,\n env: ctx.env,\n });\n}\n\n/**\n * check if .yarnrc.yml exists in the project dir or in the workspace root dir\n */\nexport async function isUsingYarn2(projectDir: string): Promise<boolean> {\n const yarnrcPath = path.join(projectDir, '.yarnrc.yml');\n const yarnrcRootPath = path.join(findPackagerRootDir(projectDir), '.yarnrc.yml');\n return (await fs.pathExists(yarnrcPath)) || (await fs.pathExists(yarnrcRootPath));\n}\n\nexport function runExpoCliCommand<TJob extends Job>(\n ctx: BuildContext<TJob>,\n args: string[],\n options: SpawnOptions,\n { forceUseGlobalExpoCli = false } = {}\n): SpawnPromise<SpawnResult> {\n if (shouldUseGlobalExpoCli(ctx, forceUseGlobalExpoCli)) {\n return ctx.runGlobalExpoCliCommand(args.join(' '), options);\n } else {\n const argsWithExpo = ['expo', ...args];\n if (ctx.packageManager === PackageManager.NPM) {\n return spawn('npx', argsWithExpo, options);\n } else if (ctx.packageManager === PackageManager.YARN) {\n return spawn('yarn', argsWithExpo, options);\n } else if (ctx.packageManager === PackageManager.PNPM) {\n return spawn('pnpm', argsWithExpo, options);\n } else {\n throw new Error(`Unsupported package manager: ${ctx.packageManager}`);\n }\n }\n}\n\nexport function shouldUseGlobalExpoCli<TJob extends Job>(\n ctx: BuildContext<TJob>,\n forceUseGlobalExpoCli = false\n): boolean {\n return (\n forceUseGlobalExpoCli ||\n ctx.env.EXPO_USE_LOCAL_CLI === '0' ||\n !ctx.appConfig.sdkVersion ||\n semver.satisfies(ctx.appConfig.sdkVersion, '<46')\n );\n}\n\nasync function runExpoDoctor<TJob extends Job>(ctx: BuildContext<TJob>): Promise<SpawnResult> {\n ctx.logger.info('Running \"expo doctor\"');\n let timeout: NodeJS.Timeout | undefined;\n try {\n const promise = runExpoCliCommand(\n ctx,\n ['doctor'],\n {\n cwd: ctx.reactNativeProjectDirectory,\n logger: ctx.logger,\n env: ctx.env,\n },\n // local Expo CLI does not have \"doctor\" for now\n { forceUseGlobalExpoCli: true }\n );\n timeout = setTimeout(() => {\n promise.child.kill();\n ctx.reportError?.(`\"expo doctor\" timed out`, undefined, {\n extras: { buildId: ctx.env.EAS_BUILD_ID },\n });\n }, MAX_EXPO_DOCTOR_TIMEOUT_MS);\n return await promise;\n } finally {\n if (timeout) {\n clearTimeout(timeout);\n }\n }\n}\n\nexport function readPackageJson(projectDir: string): any {\n const packageJsonPath = path.join(projectDir, 'package.json');\n if (!fs.pathExistsSync(packageJsonPath)) {\n throw new Error(`package.json does not exist in ${projectDir}`);\n }\n try {\n return fs.readJSONSync(packageJsonPath);\n } catch (err: any) {\n throw new Error(`Failed to parse or read package.json: ${err.message}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/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C;KACjE;IACD,IAAI;QACF,OAAO,kBAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;KACzC;IAAC,OAAO,GAAQ,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;KACzE;AACH,CAAC;AAVD,0CAUC","sourcesContent":["import path from 'path';\n\nimport downloadFile from '@expo/downloader';\nimport { ArchiveSourceType, BuildPhase, Ios, Job, Platform } from '@expo/eas-build-job';\nimport spawn, { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\nimport fs from 'fs-extra';\nimport semver from 'semver';\n\nimport { BuildContext } from '../context';\nimport { deleteXcodeEnvLocalIfExistsAsync } from '../ios/xcodeEnv';\n\nimport { Hook, runHookIfPresent } from './hooks';\nimport { createNpmrcIfNotExistsAsync } from './npmrc';\nimport { findPackagerRootDir, PackageManager } from './packageManager';\n\nconst MAX_EXPO_DOCTOR_TIMEOUT_MS = 20 * 1000;\n\nexport async function setup<TJob extends Job>(ctx: BuildContext<TJob>): Promise<void> {\n const packageJson = await ctx.runBuildPhase(BuildPhase.PREPARE_PROJECT, async () => {\n await downloadAndUnpackProject(ctx);\n if (ctx.env.NPM_TOKEN) {\n await createNpmrcIfNotExistsAsync(ctx);\n }\n if (ctx.job.platform === Platform.IOS && ctx.env.EAS_BUILD_RUNNER === 'eas-build') {\n await deleteXcodeEnvLocalIfExistsAsync(ctx as BuildContext<Ios.Job>);\n }\n // try to read package.json to see if it exists and is valid\n return readPackageJson(ctx.reactNativeProjectDirectory);\n });\n\n await ctx.runBuildPhase(BuildPhase.PRE_INSTALL_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.PRE_INSTALL);\n });\n\n await ctx.runBuildPhase(BuildPhase.READ_PACKAGE_JSON, async () => {\n ctx.logger.info('Using package.json:');\n ctx.logger.info(JSON.stringify(packageJson, null, 2));\n });\n\n await ctx.runBuildPhase(BuildPhase.INSTALL_DEPENDENCIES, async () => {\n await installDependencies(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.READ_APP_CONFIG, async () => {\n ctx.logger.info('Using app configuration:');\n ctx.logger.info(JSON.stringify(ctx.appConfig, null, 2));\n });\n\n const hasExpoPackage = !!packageJson.dependencies?.expo;\n if (hasExpoPackage) {\n await ctx.runBuildPhase(BuildPhase.RUN_EXPO_DOCTOR, async () => {\n try {\n const { stdout } = await runExpoDoctor(ctx);\n if (!stdout.match(/Didn't find any issues with the project/)) {\n ctx.markBuildPhaseHasWarnings();\n }\n } catch (err) {\n ctx.logger.error({ err }, 'Command \"expo doctor\" failed.');\n ctx.markBuildPhaseHasWarnings();\n }\n });\n }\n}\n\nasync function downloadAndUnpackProject<TJob extends Job>(ctx: BuildContext<TJob>): Promise<void> {\n const projectTarball = path.join(ctx.workingdir, 'project.tar.gz');\n if (ctx.job.projectArchive.type === ArchiveSourceType.S3) {\n throw new Error('ArchiveSourceType.S3 should be resolved earlier to url');\n } else if (ctx.job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.copy(ctx.job.projectArchive.path, projectTarball); // used in eas-build-cli\n } else if (ctx.job.projectArchive.type === ArchiveSourceType.URL) {\n try {\n await downloadFile(ctx.job.projectArchive.url, projectTarball, { retry: 3 });\n } catch (err: any) {\n ctx.reportError?.('Failed to download project archive', err, {\n extras: { buildId: ctx.env.EAS_BUILD_ID },\n });\n throw err;\n }\n }\n\n await spawn(\n 'tar',\n ['--strip-components', '1', '-zxf', 'project.tar.gz', '-C', ctx.buildDirectory],\n {\n cwd: ctx.workingdir,\n logger: ctx.logger,\n }\n );\n}\n\nexport async function installDependencies<TJob extends Job>(\n ctx: BuildContext<TJob>\n): Promise<void> {\n const packagerRunDir = findPackagerRootDir(ctx.reactNativeProjectDirectory);\n if (packagerRunDir !== ctx.reactNativeProjectDirectory) {\n const relativeReactNativeProjectDirectory = path.relative(\n ctx.buildDirectory,\n ctx.reactNativeProjectDirectory\n );\n ctx.logger.info(\n `We detected that '${relativeReactNativeProjectDirectory}' is a ${ctx.packageManager} workspace`\n );\n }\n\n const relativePackagerRunDir = path.relative(ctx.buildDirectory, packagerRunDir);\n let args = ['install'];\n if (ctx.packageManager === PackageManager.PNPM) {\n args = ['install', '--no-frozen-lockfile'];\n } else if (ctx.packageManager === PackageManager.YARN) {\n const isYarn2 = await isUsingYarn2(ctx.reactNativeProjectDirectory);\n if (isYarn2) {\n args = ['install', '--no-immutable'];\n }\n }\n ctx.logger.info(\n `Running \"${ctx.packageManager} ${args.join(' ')}\" in ${\n relativePackagerRunDir\n ? `directory '${relativePackagerRunDir}'`\n : 'the root dir of your repository'\n } `\n );\n await spawn(ctx.packageManager, args, {\n cwd: packagerRunDir,\n logger: ctx.logger,\n env: ctx.env,\n });\n}\n\n/**\n * check if .yarnrc.yml exists in the project dir or in the workspace root dir\n */\nexport async function isUsingYarn2(projectDir: string): Promise<boolean> {\n const yarnrcPath = path.join(projectDir, '.yarnrc.yml');\n const yarnrcRootPath = path.join(findPackagerRootDir(projectDir), '.yarnrc.yml');\n return (await fs.pathExists(yarnrcPath)) || (await fs.pathExists(yarnrcRootPath));\n}\n\nexport function runExpoCliCommand<TJob extends Job>(\n ctx: BuildContext<TJob>,\n args: string[],\n options: SpawnOptions,\n { forceUseGlobalExpoCli = false } = {}\n): SpawnPromise<SpawnResult> {\n if (shouldUseGlobalExpoCli(ctx, forceUseGlobalExpoCli)) {\n return ctx.runGlobalExpoCliCommand(args.join(' '), options);\n } else {\n const argsWithExpo = ['expo', ...args];\n if (ctx.packageManager === PackageManager.NPM) {\n return spawn('npx', argsWithExpo, options);\n } else if (ctx.packageManager === PackageManager.YARN) {\n return spawn('yarn', argsWithExpo, options);\n } else if (ctx.packageManager === PackageManager.PNPM) {\n return spawn('pnpm', argsWithExpo, options);\n } else {\n throw new Error(`Unsupported package manager: ${ctx.packageManager}`);\n }\n }\n}\n\nexport function shouldUseGlobalExpoCli<TJob extends Job>(\n ctx: BuildContext<TJob>,\n forceUseGlobalExpoCli = false\n): boolean {\n return (\n forceUseGlobalExpoCli ||\n ctx.env.EXPO_USE_LOCAL_CLI === '0' ||\n !ctx.appConfig.sdkVersion ||\n semver.satisfies(ctx.appConfig.sdkVersion, '<46')\n );\n}\n\nasync function runExpoDoctor<TJob extends Job>(ctx: BuildContext<TJob>): Promise<SpawnResult> {\n ctx.logger.info('Running \"expo doctor\"');\n let timeout: NodeJS.Timeout | undefined;\n try {\n const promise = runExpoCliCommand(\n ctx,\n ['doctor'],\n {\n cwd: ctx.reactNativeProjectDirectory,\n logger: ctx.logger,\n env: ctx.env,\n },\n // local Expo CLI does not have \"doctor\" for now\n { forceUseGlobalExpoCli: true }\n );\n timeout = setTimeout(() => {\n promise.child.kill();\n ctx.reportError?.(`\"expo doctor\" timed out`, undefined, {\n extras: { buildId: ctx.env.EAS_BUILD_ID },\n });\n }, MAX_EXPO_DOCTOR_TIMEOUT_MS);\n return await promise;\n } finally {\n if (timeout) {\n clearTimeout(timeout);\n }\n }\n}\n\nexport function readPackageJson(projectDir: string): any {\n const packageJsonPath = path.join(projectDir, 'package.json');\n if (!fs.pathExistsSync(packageJsonPath)) {\n throw new Error(`package.json does not exist in ${projectDir}`);\n }\n try {\n return fs.readJSONSync(packageJsonPath);\n } catch (err: any) {\n throw new Error(`Failed to parse or read package.json: ${err.message}`);\n }\n}\n"]}
|