@expo/build-tools 22.2.0 → 22.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builders/android.js +2 -2
- package/dist/builders/ios.js +2 -2
- package/dist/ios/xcode.d.ts +3 -0
- package/dist/ios/xcode.js +22 -0
- package/dist/steps/easFunctions.js +4 -0
- package/dist/steps/functions/downloadBuild.d.ts +9 -2
- package/dist/steps/functions/downloadBuild.js +108 -15
- package/dist/steps/functions/installBuild.d.ts +12 -0
- package/dist/steps/functions/installBuild.js +85 -0
- package/dist/steps/functions/installMaestro.js +92 -11
- package/dist/steps/functions/launchApplication.d.ts +12 -0
- package/dist/steps/functions/launchApplication.js +121 -0
- package/dist/steps/functions/readIpaInfo.d.ts +1 -0
- package/dist/steps/functions/readIpaInfo.js +2 -0
- package/dist/steps/functions/repack.d.ts +5 -2
- package/dist/steps/functions/repack.js +50 -2
- package/dist/steps/functions/restoreBuildCache.d.ts +3 -3
- package/dist/steps/functions/restoreBuildCache.js +19 -6
- package/dist/steps/functions/saveBuildCache.d.ts +3 -3
- package/dist/steps/functions/saveBuildCache.js +17 -4
- package/dist/steps/functions/startServeSimRemoteSession.js +7 -0
- package/dist/steps/functions/uploadToAsc.js +11 -1
- package/dist/steps/utils/ios/AscApiClient.d.ts +1 -0
- package/dist/steps/utils/ios/AscApiUtils.d.ts +11 -2
- package/dist/steps/utils/ios/AscApiUtils.js +36 -2
- package/dist/steps/utils/ios/xcactivitylog.js +2 -8
- package/dist/steps/utils/remoteDeviceRunSession.d.ts +4 -2
- package/dist/steps/utils/remoteDeviceRunSession.js +9 -6
- package/dist/utils/IosSimulatorUtils.d.ts +8 -0
- package/dist/utils/IosSimulatorUtils.js +9 -0
- package/dist/utils/cacheKey.d.ts +8 -2
- package/dist/utils/cacheKey.js +12 -8
- package/dist/utils/download.d.ts +4 -0
- package/dist/utils/download.js +10 -0
- package/package.json +6 -4
|
@@ -69,7 +69,7 @@ const sentry_1 = require("../../sentry");
|
|
|
69
69
|
const retry_1 = require("../../utils/retry");
|
|
70
70
|
const turtleFetch_1 = require("../../utils/turtleFetch");
|
|
71
71
|
const XCODE_DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer';
|
|
72
|
-
const
|
|
72
|
+
const SERVE_SIM_PACKAGE_NAME = '@expo/serve-sim';
|
|
73
73
|
const SERVE_SIM_HOST = '127.0.0.1';
|
|
74
74
|
const SERVE_SIM_MAX_DIMENSION = '1280';
|
|
75
75
|
const SERVE_SIM_MJPEG_QUALITY = '0.55';
|
|
@@ -473,10 +473,13 @@ function metricsCorsOriginToServeSimArgs(env) {
|
|
|
473
473
|
}
|
|
474
474
|
return args;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function createServeSimPackageSpec(packageVersion) {
|
|
477
|
+
return `${SERVE_SIM_PACKAGE_NAME}@${packageVersion ?? 'latest'}`;
|
|
478
|
+
}
|
|
479
|
+
function createServeSimArgs({ port, turnArgs = [], metricsCorsArgs = [], packageVersion, }) {
|
|
477
480
|
return [
|
|
478
481
|
'--yes',
|
|
479
|
-
|
|
482
|
+
createServeSimPackageSpec(packageVersion),
|
|
480
483
|
'--port',
|
|
481
484
|
String(port),
|
|
482
485
|
'--host',
|
|
@@ -540,14 +543,14 @@ async function waitForServeSimReadyAsync({ serveSim, port, timeoutMs, }) {
|
|
|
540
543
|
}
|
|
541
544
|
throw new eas_build_job_1.SystemError(`Timed out waiting for serve-sim readiness at ${readyUrl}${lastError instanceof Error ? `: ${lastError.message}` : ''}. Last output:\n${serveSim.getOutput() || '<empty>'}`);
|
|
542
545
|
}
|
|
543
|
-
async function startServeSimWithTunnelAsync(ctx, { baseDomain, env, logger, timeoutMs, }) {
|
|
546
|
+
async function startServeSimWithTunnelAsync(ctx, { baseDomain, env, logger, timeoutMs, packageVersion, }) {
|
|
544
547
|
const port = await findAvailablePortAsync();
|
|
545
|
-
logger.info(`Launching ${
|
|
548
|
+
logger.info(`Launching ${createServeSimPackageSpec(packageVersion)} on ${SERVE_SIM_HOST}:${port}.`);
|
|
546
549
|
const turnArgs = await fetchServeSimTurnArgsAsync(ctx, { env, logger });
|
|
547
550
|
const metricsCorsArgs = metricsCorsOriginToServeSimArgs(env);
|
|
548
551
|
const serveSim = spawnDetached({
|
|
549
552
|
command: 'npx',
|
|
550
|
-
args: createServeSimArgs({ port, turnArgs, metricsCorsArgs }),
|
|
553
|
+
args: createServeSimArgs({ port, turnArgs, metricsCorsArgs, packageVersion }),
|
|
551
554
|
env,
|
|
552
555
|
});
|
|
553
556
|
try {
|
|
@@ -27,6 +27,14 @@ export declare namespace IosSimulatorUtils {
|
|
|
27
27
|
runtimeDisplayName: string;
|
|
28
28
|
displayName: string;
|
|
29
29
|
};
|
|
30
|
+
export type IosSimulatorRuntime = {
|
|
31
|
+
identifier: string;
|
|
32
|
+
isAvailable?: boolean;
|
|
33
|
+
version?: string;
|
|
34
|
+
};
|
|
35
|
+
export function getAvailableRuntimesAsync({ env, }: {
|
|
36
|
+
env: NodeJS.ProcessEnv;
|
|
37
|
+
}): Promise<IosSimulatorRuntime[]>;
|
|
30
38
|
export function getAvailableDevicesAsync({ env, filter, }: {
|
|
31
39
|
env: NodeJS.ProcessEnv;
|
|
32
40
|
filter: 'available' | 'booted';
|
|
@@ -13,6 +13,15 @@ const promises_1 = require("node:timers/promises");
|
|
|
13
13
|
const retry_1 = require("./retry");
|
|
14
14
|
var IosSimulatorUtils;
|
|
15
15
|
(function (IosSimulatorUtils) {
|
|
16
|
+
async function getAvailableRuntimesAsync({ env, }) {
|
|
17
|
+
const { stdout } = await (0, turtle_spawn_1.default)('xcrun', ['simctl', 'list', 'runtimes', '--json'], { env });
|
|
18
|
+
const { runtimes } = JSON.parse(stdout);
|
|
19
|
+
return runtimes.flatMap(runtime => runtime.isAvailable !== false &&
|
|
20
|
+
runtime.identifier?.startsWith('com.apple.CoreSimulator.SimRuntime.iOS-')
|
|
21
|
+
? [{ ...runtime, identifier: runtime.identifier }]
|
|
22
|
+
: []);
|
|
23
|
+
}
|
|
24
|
+
IosSimulatorUtils.getAvailableRuntimesAsync = getAvailableRuntimesAsync;
|
|
16
25
|
async function getAvailableDevicesAsync({ env, filter, }) {
|
|
17
26
|
const result = await (0, turtle_spawn_1.default)('xcrun', ['simctl', 'list', 'devices', '--json', '--no-escape-slashes', filter], { env });
|
|
18
27
|
const xcrunData = JSON.parse(result.stdout);
|
package/dist/utils/cacheKey.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
|
-
export
|
|
2
|
+
export type CcacheBuildTarget = {
|
|
3
|
+
platform: Platform.ANDROID;
|
|
4
|
+
} | {
|
|
5
|
+
platform: Platform.IOS;
|
|
6
|
+
simulator: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function getCcacheKeyPrefix(target: CcacheBuildTarget): string;
|
|
3
9
|
export declare const PUBLIC_CACHE_KEY_PREFIX_BY_PLATFORM: Record<Platform, string>;
|
|
4
10
|
export declare function getCcachePath(env: Record<string, string | undefined>): string;
|
|
5
|
-
export declare function generateDefaultBuildCacheKeyAsync(workingDirectory: string,
|
|
11
|
+
export declare function generateDefaultBuildCacheKeyAsync(workingDirectory: string, target: CcacheBuildTarget): Promise<string>;
|
package/dist/utils/cacheKey.js
CHANGED
|
@@ -36,7 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.PUBLIC_CACHE_KEY_PREFIX_BY_PLATFORM =
|
|
39
|
+
exports.PUBLIC_CACHE_KEY_PREFIX_BY_PLATFORM = void 0;
|
|
40
|
+
exports.getCcacheKeyPrefix = getCcacheKeyPrefix;
|
|
40
41
|
exports.getCcachePath = getCcachePath;
|
|
41
42
|
exports.generateDefaultBuildCacheKeyAsync = generateDefaultBuildCacheKeyAsync;
|
|
42
43
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -46,16 +47,19 @@ const assert_1 = __importDefault(require("assert"));
|
|
|
46
47
|
const os_1 = __importDefault(require("os"));
|
|
47
48
|
const path_1 = __importDefault(require("path"));
|
|
48
49
|
const packageManager_1 = require("./packageManager");
|
|
49
|
-
const
|
|
50
|
+
const IOS_DEVICE_CACHE_KEY_PREFIX = 'ios-device-ccache-';
|
|
51
|
+
const IOS_SIMULATOR_CACHE_KEY_PREFIX = 'ios-simulator-ccache-';
|
|
50
52
|
const ANDROID_CACHE_KEY_PREFIX = 'android-ccache-';
|
|
51
53
|
const PUBLIC_IOS_CACHE_KEY_PREFIX = 'public-ios-ccache-';
|
|
52
54
|
const PUBLIC_ANDROID_CACHE_KEY_PREFIX = 'public-android-ccache-';
|
|
53
55
|
const DARWIN_CACHE_PATH = 'Library/Caches/ccache';
|
|
54
56
|
const LINUX_CACHE_PATH = '.cache/ccache';
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
57
|
+
function getCcacheKeyPrefix(target) {
|
|
58
|
+
if (target.platform === eas_build_job_1.Platform.IOS) {
|
|
59
|
+
return target.simulator ? IOS_SIMULATOR_CACHE_KEY_PREFIX : IOS_DEVICE_CACHE_KEY_PREFIX;
|
|
60
|
+
}
|
|
61
|
+
return ANDROID_CACHE_KEY_PREFIX;
|
|
62
|
+
}
|
|
59
63
|
exports.PUBLIC_CACHE_KEY_PREFIX_BY_PLATFORM = {
|
|
60
64
|
[eas_build_job_1.Platform.ANDROID]: PUBLIC_ANDROID_CACHE_KEY_PREFIX,
|
|
61
65
|
[eas_build_job_1.Platform.IOS]: PUBLIC_IOS_CACHE_KEY_PREFIX,
|
|
@@ -68,14 +72,14 @@ function getCcachePath(env) {
|
|
|
68
72
|
(0, assert_1.default)(env.HOME, 'Failed to infer directory: $HOME environment variable is empty.');
|
|
69
73
|
return path_1.default.join(env.HOME, PATH_BY_PLATFORM[os_1.default.platform()]);
|
|
70
74
|
}
|
|
71
|
-
async function generateDefaultBuildCacheKeyAsync(workingDirectory,
|
|
75
|
+
async function generateDefaultBuildCacheKeyAsync(workingDirectory, target) {
|
|
72
76
|
// This will resolve which package manager and use the relevant lock file
|
|
73
77
|
// The lock file hash is the key and ensures cache is fresh
|
|
74
78
|
const packagerRunDir = (0, packageManager_1.findPackagerRootDir)(workingDirectory);
|
|
75
79
|
const manager = PackageManagerUtils.createForProject(packagerRunDir);
|
|
76
80
|
const lockPath = path_1.default.join(packagerRunDir, manager.lockFile);
|
|
77
81
|
try {
|
|
78
|
-
return `${
|
|
82
|
+
return `${getCcacheKeyPrefix(target)}${(0, steps_1.hashFiles)([lockPath])}`;
|
|
79
83
|
}
|
|
80
84
|
catch (err) {
|
|
81
85
|
throw new Error(`Failed to read lockfile for cache key generation: ${err.message}`);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProxiedDownloadUrl = getProxiedDownloadUrl;
|
|
4
|
+
function getProxiedDownloadUrl({ directUrl, proxyBaseUrl, }) {
|
|
5
|
+
if (!proxyBaseUrl) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const parsedUrl = new URL(directUrl);
|
|
9
|
+
return directUrl.replace(`${parsedUrl.protocol}//${parsedUrl.host}`, `${proxyBaseUrl.replace(/\/$/, '')}/${parsedUrl.host}`);
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0",
|
|
4
4
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Expo <support@expo.io>",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@expo/plist": "^0.3.5",
|
|
47
47
|
"@expo/results": "^1.0.0",
|
|
48
48
|
"@expo/spawn-async": "1.7.2",
|
|
49
|
-
"@expo/steps": "22.
|
|
49
|
+
"@expo/steps": "22.4.0",
|
|
50
50
|
"@expo/template-file": "22.0.0",
|
|
51
51
|
"@expo/turtle-spawn": "22.0.0",
|
|
52
52
|
"@expo/xcpretty": "^4.3.1",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@sentry/node": "7.77.0",
|
|
55
55
|
"@urql/core": "^6.0.1",
|
|
56
56
|
"bplist-parser": "0.3.2",
|
|
57
|
+
"content-disposition": "1.0.1",
|
|
57
58
|
"fast-glob": "^3.3.2",
|
|
58
59
|
"fast-xml-parser": "^4.4.1",
|
|
59
60
|
"fs-extra": "^11.2.0",
|
|
@@ -77,7 +78,8 @@
|
|
|
77
78
|
"zod": "^4.3.5"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@expo/repack-app": "~0.
|
|
81
|
+
"@expo/repack-app": "~0.9.0",
|
|
82
|
+
"@types/content-disposition": "0.5.9",
|
|
81
83
|
"@types/fs-extra": "^11.0.4",
|
|
82
84
|
"@types/jest": "^29.5.12",
|
|
83
85
|
"@types/lodash": "^4.17.4",
|
|
@@ -100,5 +102,5 @@
|
|
|
100
102
|
"typescript": "^5.5.4",
|
|
101
103
|
"uuid": "^9.0.1"
|
|
102
104
|
},
|
|
103
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "39c39ad4bfdd1e7e74417bb6f7178b011ce61bbe"
|
|
104
106
|
}
|