@expo/build-tools 18.0.1 → 18.0.2
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.
|
@@ -13,7 +13,7 @@ exports.userErrorHandlers = [
|
|
|
13
13
|
// [!] `React` requires CocoaPods version `>= 1.10.1`, which is not satisfied by your current version, `1.10.0`.
|
|
14
14
|
createError: () => new UserFacingError('EAS_BUILD_UNSUPPORTED_COCOAPODS_VERSION_ERROR', `Your project requires a newer version of CocoaPods. You can update it in the build profile in eas.json by either:
|
|
15
15
|
- changing the current version under key "cocoapods"
|
|
16
|
-
- switching to an image that supports that version under key "image"`, 'https://docs.expo.dev/build-reference/eas-json/'),
|
|
16
|
+
- switching to an image that supports that version under key "image"`, { docsUrl: 'https://docs.expo.dev/build-reference/eas-json/' }),
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
platform: eas_build_job_1.Platform.IOS,
|
|
@@ -21,7 +21,7 @@ exports.userErrorHandlers = [
|
|
|
21
21
|
regexp: /Could not find 'bundler' (.*) required by your/,
|
|
22
22
|
// example log:
|
|
23
23
|
// /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (2.2.3) required by your /Users/expo/project/build/ios/Gemfile.lock. (Gem::MissingSpecVersionError)
|
|
24
|
-
createError: () => new UserFacingError('EAS_BUILD_UNSUPPORTED_BUNDLER_VERSION_ERROR', `Your project requires a different version of the Ruby "bundler" program than the version installed in this EAS Build environment. You can specify which version of "bundler" to install by specifying the version under "build"→[buildProfileName]→"ios"→"bundler" in eas.json.`, 'https://docs.expo.dev/build-reference/eas-json/'),
|
|
24
|
+
createError: () => new UserFacingError('EAS_BUILD_UNSUPPORTED_BUNDLER_VERSION_ERROR', `Your project requires a different version of the Ruby "bundler" program than the version installed in this EAS Build environment. You can specify which version of "bundler" to install by specifying the version under "build"→[buildProfileName]→"ios"→"bundler" in eas.json.`, { docsUrl: 'https://docs.expo.dev/build-reference/eas-json/' }),
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
@@ -48,7 +48,7 @@ exports.userErrorHandlers = [
|
|
|
48
48
|
// [11:17:29] [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.
|
|
49
49
|
// [11:17:29] Error: [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.
|
|
50
50
|
regexp: /Cannot copy google-services\.json/,
|
|
51
|
-
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables'),
|
|
51
|
+
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', { docsUrl: 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' }),
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
@@ -57,7 +57,7 @@ exports.userErrorHandlers = [
|
|
|
57
57
|
// > File google-services.json is missing. The Google Services Plugin cannot function without it.
|
|
58
58
|
// Searched Location:
|
|
59
59
|
regexp: /File google-services\.json is missing\. The Google Services Plugin cannot function without it/,
|
|
60
|
-
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables'),
|
|
60
|
+
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', { docsUrl: 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' }),
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
platform: eas_build_job_1.Platform.IOS,
|
|
@@ -65,7 +65,7 @@ exports.userErrorHandlers = [
|
|
|
65
65
|
// example log:
|
|
66
66
|
// [08:44:18] ENOENT: no such file or directory, copyfile '/Users/expo/workingdir/build/managed/abc' -> '/Users/expo/workingdir/build/managed/ios/testapp/GoogleService-Info.plist'
|
|
67
67
|
regexp: /ENOENT: no such file or directory, copyfile .*GoogleService-Info.plist/,
|
|
68
|
-
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_PLIST_ERROR', '"GoogleService-Info.plist" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables'),
|
|
68
|
+
createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_PLIST_ERROR', '"GoogleService-Info.plist" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', { docsUrl: 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' }),
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
platform: eas_build_job_1.Platform.IOS,
|
|
@@ -176,9 +176,13 @@ You are seeing this error because either:
|
|
|
176
176
|
regexp: /error: Signing for "[a-zA-Z-0-9_]+" requires a development team/,
|
|
177
177
|
createError: (_, { job }) => 'type' in job && job.type === eas_build_job_1.Workflow.MANAGED
|
|
178
178
|
? new UserFacingError('XCODE_RESOURCE_BUNDLE_CODE_SIGNING_ERROR', `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
|
|
179
|
-
To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or upgrade to SDK 46 or higher.`,
|
|
179
|
+
To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or upgrade to SDK 46 or higher.`, {
|
|
180
|
+
docsUrl: 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations',
|
|
181
|
+
})
|
|
180
182
|
: new UserFacingError('XCODE_RESOURCE_BUNDLE_CODE_SIGNING_ERROR', `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
|
|
181
|
-
To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or turn off signing resource bundles in your Podfile: https://expo.fyi/r/disable-bundle-resource-signing`,
|
|
183
|
+
To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or turn off signing resource bundles in your Podfile: https://expo.fyi/r/disable-bundle-resource-signing`, {
|
|
184
|
+
docsUrl: 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations',
|
|
185
|
+
}),
|
|
182
186
|
},
|
|
183
187
|
{
|
|
184
188
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
@@ -20,6 +20,7 @@ const installNodeModules_1 = require("./functions/installNodeModules");
|
|
|
20
20
|
const installPods_1 = require("./functions/installPods");
|
|
21
21
|
const internalMaestroTest_1 = require("./functions/internalMaestroTest");
|
|
22
22
|
const prebuild_1 = require("./functions/prebuild");
|
|
23
|
+
const readIpaInfo_1 = require("./functions/readIpaInfo");
|
|
23
24
|
const repack_1 = require("./functions/repack");
|
|
24
25
|
const resolveAppleTeamIdFromCredentials_1 = require("./functions/resolveAppleTeamIdFromCredentials");
|
|
25
26
|
const resolveBuildConfig_1 = require("./functions/resolveBuildConfig");
|
|
@@ -44,6 +45,7 @@ function getEasFunctions(ctx) {
|
|
|
44
45
|
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)(),
|
|
45
46
|
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)(),
|
|
46
47
|
(0, prebuild_1.createPrebuildBuildFunction)(),
|
|
48
|
+
(0, readIpaInfo_1.createReadIpaInfoBuildFunction)(),
|
|
47
49
|
(0, downloadBuild_1.createDownloadBuildFunction)(),
|
|
48
50
|
(0, repack_1.createRepackBuildFunction)(),
|
|
49
51
|
(0, restoreCache_1.createRestoreCacheFunction)(),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BuildFunction } from '@expo/steps';
|
|
2
|
+
export type IpaInfo = {
|
|
3
|
+
bundleIdentifier: string;
|
|
4
|
+
bundleShortVersion: string;
|
|
5
|
+
bundleVersion: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createReadIpaInfoBuildFunction(): BuildFunction;
|
|
8
|
+
export declare function readIpaInfoAsync(ipaPath: string): Promise<IpaInfo>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createReadIpaInfoBuildFunction = createReadIpaInfoBuildFunction;
|
|
7
|
+
exports.readIpaInfoAsync = readIpaInfoAsync;
|
|
8
|
+
const errors_1 = require("@expo/eas-build-job/dist/errors");
|
|
9
|
+
const steps_1 = require("@expo/steps");
|
|
10
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
+
const node_stream_zip_1 = __importDefault(require("node-stream-zip"));
|
|
13
|
+
const zod_1 = require("zod");
|
|
14
|
+
const bplist_parser_1 = __importDefault(require("bplist-parser"));
|
|
15
|
+
const plist_1 = __importDefault(require("plist"));
|
|
16
|
+
const INFO_PLIST_PATH_REGEXP = /^Payload\/[^/]+\.app\/Info\.plist$/;
|
|
17
|
+
function createReadIpaInfoBuildFunction() {
|
|
18
|
+
return new steps_1.BuildFunction({
|
|
19
|
+
namespace: 'eas',
|
|
20
|
+
id: 'read_ipa_info',
|
|
21
|
+
name: 'Read IPA Info',
|
|
22
|
+
__metricsId: 'eas/read_ipa_info',
|
|
23
|
+
inputProviders: [
|
|
24
|
+
steps_1.BuildStepInput.createProvider({
|
|
25
|
+
id: 'ipa_path',
|
|
26
|
+
required: true,
|
|
27
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
outputProviders: [
|
|
31
|
+
steps_1.BuildStepOutput.createProvider({
|
|
32
|
+
id: 'bundle_identifier',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
steps_1.BuildStepOutput.createProvider({
|
|
36
|
+
id: 'bundle_short_version',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
steps_1.BuildStepOutput.createProvider({
|
|
40
|
+
id: 'bundle_version',
|
|
41
|
+
required: true,
|
|
42
|
+
}),
|
|
43
|
+
],
|
|
44
|
+
fn: async (stepCtx, { inputs, outputs }) => {
|
|
45
|
+
const ipaPathInput = zod_1.z.string().parse(inputs.ipa_path.value);
|
|
46
|
+
const ipaPath = node_path_1.default.resolve(stepCtx.workingDirectory, ipaPathInput);
|
|
47
|
+
if (!(await fs_extra_1.default.pathExists(ipaPath))) {
|
|
48
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_FILE_NOT_FOUND', `IPA file not found: ${ipaPath}`);
|
|
49
|
+
}
|
|
50
|
+
const ipaInfo = await readIpaInfoAsync(ipaPath);
|
|
51
|
+
outputs.bundle_identifier.set(ipaInfo.bundleIdentifier);
|
|
52
|
+
outputs.bundle_short_version.set(ipaInfo.bundleShortVersion);
|
|
53
|
+
outputs.bundle_version.set(ipaInfo.bundleVersion);
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async function readIpaInfoAsync(ipaPath) {
|
|
58
|
+
try {
|
|
59
|
+
const infoPlistBuffer = await readInfoPlistBufferFromIpaAsync(ipaPath);
|
|
60
|
+
const infoPlist = parseInfoPlistBuffer(infoPlistBuffer);
|
|
61
|
+
const bundleIdentifier = infoPlist.CFBundleIdentifier;
|
|
62
|
+
if (typeof bundleIdentifier !== 'string') {
|
|
63
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_INVALID_INFO_PLIST', 'Failed to read IPA info: Missing or invalid CFBundleIdentifier in Info.plist');
|
|
64
|
+
}
|
|
65
|
+
const bundleShortVersion = infoPlist.CFBundleShortVersionString;
|
|
66
|
+
if (typeof bundleShortVersion !== 'string') {
|
|
67
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_INVALID_INFO_PLIST', 'Failed to read IPA info: Missing or invalid CFBundleShortVersionString in Info.plist');
|
|
68
|
+
}
|
|
69
|
+
const bundleVersion = infoPlist.CFBundleVersion;
|
|
70
|
+
if (typeof bundleVersion !== 'string') {
|
|
71
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_INVALID_INFO_PLIST', 'Failed to read IPA info: Missing or invalid CFBundleVersion in Info.plist');
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
bundleIdentifier,
|
|
75
|
+
bundleShortVersion,
|
|
76
|
+
bundleVersion,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
if (error instanceof errors_1.UserFacingError) {
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_FAILED', `Failed to read IPA info: ${error.message}`, { cause: error });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function parseInfoPlistBuffer(data) {
|
|
87
|
+
const isBinaryPlist = data.subarray(0, 8).toString('ascii') === 'bplist00';
|
|
88
|
+
if (isBinaryPlist) {
|
|
89
|
+
const parsedBinaryPlists = bplist_parser_1.default.parseBuffer(data);
|
|
90
|
+
const parsedBinaryPlist = parsedBinaryPlists[0];
|
|
91
|
+
if (!parsedBinaryPlist || typeof parsedBinaryPlist !== 'object') {
|
|
92
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_INVALID_BINARY_PLIST', 'Invalid binary plist in IPA');
|
|
93
|
+
}
|
|
94
|
+
return parsedBinaryPlist;
|
|
95
|
+
}
|
|
96
|
+
return plist_1.default.parse(data.toString('utf8'));
|
|
97
|
+
}
|
|
98
|
+
async function readInfoPlistBufferFromIpaAsync(ipaPath) {
|
|
99
|
+
const zip = new node_stream_zip_1.default.async({ file: ipaPath });
|
|
100
|
+
try {
|
|
101
|
+
const entries = Object.values(await zip.entries());
|
|
102
|
+
const infoPlistEntry = entries.find(entry => INFO_PLIST_PATH_REGEXP.test(entry.name));
|
|
103
|
+
if (!infoPlistEntry) {
|
|
104
|
+
throw new errors_1.UserFacingError('EAS_READ_IPA_INFO_INFO_PLIST_NOT_FOUND', `Failed to read IPA info: Could not find Info.plist in ${ipaPath}`);
|
|
105
|
+
}
|
|
106
|
+
return await zip.entryData(infoPlistEntry.name);
|
|
107
|
+
}
|
|
108
|
+
finally {
|
|
109
|
+
await zip.close();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -223,7 +223,7 @@ function createUploadToAscBuildFunction() {
|
|
|
223
223
|
}
|
|
224
224
|
stepsCtx.logger.info('Checking build upload status...');
|
|
225
225
|
const waitingForBuildStartedAt = Date.now();
|
|
226
|
-
while (Date.now() - waitingForBuildStartedAt <
|
|
226
|
+
while (Date.now() - waitingForBuildStartedAt < 30 * 60 * 1000 /* 30 minutes */) {
|
|
227
227
|
const { data: { attributes: { state }, }, } = await client.getAsync(`/v1/buildUploads/:id`, { 'fields[buildUploads]': ['state', 'build'], include: ['build'] }, { id: buildUploadId });
|
|
228
228
|
if (state.state === 'AWAITING_UPLOAD' || state.state === 'PROCESSING') {
|
|
229
229
|
stepsCtx.logger.info(`Waiting for build upload to complete... (status = ${state.state})`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.2",
|
|
4
4
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Expo <support@expo.io>",
|
|
@@ -38,19 +38,20 @@
|
|
|
38
38
|
"@expo/config": "10.0.6",
|
|
39
39
|
"@expo/config-plugins": "9.0.12",
|
|
40
40
|
"@expo/downloader": "18.0.1",
|
|
41
|
-
"@expo/eas-build-job": "18.0.
|
|
41
|
+
"@expo/eas-build-job": "18.0.2",
|
|
42
42
|
"@expo/env": "^0.4.0",
|
|
43
43
|
"@expo/logger": "18.0.1",
|
|
44
44
|
"@expo/package-manager": "1.9.10",
|
|
45
45
|
"@expo/plist": "^0.2.0",
|
|
46
46
|
"@expo/results": "^1.0.0",
|
|
47
47
|
"@expo/spawn-async": "1.7.2",
|
|
48
|
-
"@expo/steps": "18.0.
|
|
48
|
+
"@expo/steps": "18.0.2",
|
|
49
49
|
"@expo/template-file": "18.0.1",
|
|
50
50
|
"@expo/turtle-spawn": "18.0.1",
|
|
51
51
|
"@expo/xcpretty": "^4.3.1",
|
|
52
52
|
"@google-cloud/storage": "^7.11.2",
|
|
53
53
|
"@urql/core": "^6.0.1",
|
|
54
|
+
"bplist-parser": "0.3.2",
|
|
54
55
|
"fast-glob": "^3.3.2",
|
|
55
56
|
"fs-extra": "^11.2.0",
|
|
56
57
|
"gql.tada": "^1.8.13",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"lodash": "^4.17.21",
|
|
60
61
|
"node-fetch": "^2.7.0",
|
|
61
62
|
"node-forge": "^1.3.1",
|
|
63
|
+
"node-stream-zip": "1.15.0",
|
|
62
64
|
"nullthrows": "^1.1.1",
|
|
63
65
|
"plist": "^3.1.0",
|
|
64
66
|
"promise-limit": "^2.7.0",
|
|
@@ -94,5 +96,5 @@
|
|
|
94
96
|
"typescript": "^5.5.4",
|
|
95
97
|
"uuid": "^9.0.1"
|
|
96
98
|
},
|
|
97
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "d5da4f416791938a7c1ffdaf83a7c644e7aa6261"
|
|
98
100
|
}
|