@expo/build-tools 18.7.0 → 18.8.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.
Files changed (34) hide show
  1. package/dist/builders/ios.js +15 -2
  2. package/dist/common/easBuildInternal.js +3 -27
  3. package/dist/context.js +3 -1
  4. package/dist/ios/fastlane.d.ts +4 -1
  5. package/dist/ios/fastlane.js +9 -1
  6. package/dist/ios/gymfile.d.ts +5 -2
  7. package/dist/ios/gymfile.js +5 -2
  8. package/dist/steps/easFunctions.js +6 -0
  9. package/dist/steps/functionGroups/build.js +4 -0
  10. package/dist/steps/functions/configureIosCredentials.js +9 -3
  11. package/dist/steps/functions/configureIosVersion.js +32 -14
  12. package/dist/steps/functions/deploy.d.ts +2 -0
  13. package/dist/steps/functions/deploy.js +136 -0
  14. package/dist/steps/functions/eagerBundle.js +1 -1
  15. package/dist/steps/functions/export.d.ts +2 -0
  16. package/dist/steps/functions/export.js +115 -0
  17. package/dist/steps/functions/generateGymfileFromTemplate.js +9 -0
  18. package/dist/steps/functions/installNodeModules.js +1 -1
  19. package/dist/steps/functions/parseXcactivitylog.d.ts +2 -0
  20. package/dist/steps/functions/parseXcactivitylog.js +49 -0
  21. package/dist/steps/functions/prebuild.js +1 -1
  22. package/dist/steps/functions/restoreBuildCache.js +1 -1
  23. package/dist/steps/functions/saveBuildCache.js +1 -1
  24. package/dist/steps/utils/ios/xcactivitylog.d.ts +57 -0
  25. package/dist/steps/utils/ios/xcactivitylog.js +278 -0
  26. package/dist/templates/GymfileArchive.d.ts +1 -1
  27. package/dist/templates/GymfileArchive.js +4 -0
  28. package/dist/templates/GymfileSimulator.d.ts +1 -1
  29. package/dist/templates/GymfileSimulator.js +3 -0
  30. package/dist/utils/easCli.d.ts +11 -0
  31. package/dist/utils/easCli.js +57 -0
  32. package/dist/utils/packageManager.d.ts +4 -1
  33. package/dist/utils/packageManager.js +13 -4
  34. package/package.json +4 -4
@@ -0,0 +1,57 @@
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.resolveEasCommandPrefixAndEnvAsync = resolveEasCommandPrefixAndEnvAsync;
7
+ exports.runEasCliCommand = runEasCliCommand;
8
+ const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
9
+ const eas_build_job_1 = require("@expo/eas-build-job");
10
+ const packageManager_1 = require("./packageManager");
11
+ async function probeEasdAsync() {
12
+ try {
13
+ const result = await (0, turtle_spawn_1.default)('easd', ['--help'], {
14
+ stdio: ['ignore', 'pipe', 'pipe'],
15
+ });
16
+ return result.status === 0;
17
+ }
18
+ catch {
19
+ return false;
20
+ }
21
+ }
22
+ async function resolveEasCommandPrefixAndEnvAsync() {
23
+ const npxArgsPrefix = (await (0, packageManager_1.isAtLeastNpm7Async)()) ? ['-y'] : [];
24
+ if (process.env.ENVIRONMENT === 'development') {
25
+ if (await probeEasdAsync()) {
26
+ return { cmd: 'easd', args: [], extraEnv: {} };
27
+ }
28
+ return {
29
+ cmd: 'npx',
30
+ args: [...npxArgsPrefix, `eas-cli@${eas_build_job_1.EasCliNpmTags.STAGING}`],
31
+ extraEnv: {},
32
+ };
33
+ }
34
+ else if (process.env.ENVIRONMENT === 'staging') {
35
+ return {
36
+ cmd: 'npx',
37
+ args: [...npxArgsPrefix, `eas-cli@${eas_build_job_1.EasCliNpmTags.STAGING}`],
38
+ extraEnv: { EXPO_STAGING: '1' },
39
+ };
40
+ }
41
+ else {
42
+ return {
43
+ cmd: 'npx',
44
+ args: [...npxArgsPrefix, `eas-cli@${eas_build_job_1.EasCliNpmTags.PRODUCTION}`],
45
+ extraEnv: {},
46
+ };
47
+ }
48
+ }
49
+ async function runEasCliCommand({ args, options, }) {
50
+ const { logger, ...spawnOptions } = options;
51
+ const { cmd, args: commandPrefixArgs, extraEnv } = await resolveEasCommandPrefixAndEnvAsync();
52
+ return await (0, turtle_spawn_1.default)(cmd, [...commandPrefixArgs, ...args], {
53
+ ...spawnOptions,
54
+ logger,
55
+ env: { ...spawnOptions.env, ...extraEnv },
56
+ });
57
+ }
@@ -1,11 +1,14 @@
1
1
  import { type bunyan } from '@expo/logger';
2
+ import { type BuildStepEnv } from '@expo/steps';
2
3
  export declare enum PackageManager {
3
4
  YARN = "yarn",
4
5
  NPM = "npm",
5
6
  PNPM = "pnpm",
6
7
  BUN = "bun"
7
8
  }
8
- export declare function resolvePackageManager(directory: string): PackageManager;
9
+ export declare function resolvePackageManager(directory: string, { env }: {
10
+ env: BuildStepEnv;
11
+ }): PackageManager;
9
12
  /**
10
13
  * Get the version of a package from the dist-tags.
11
14
  * Returns null if the version cannot be resolved.
@@ -43,6 +43,7 @@ exports.findPackagerRootDir = findPackagerRootDir;
43
43
  exports.isAtLeastNpm7Async = isAtLeastNpm7Async;
44
44
  exports.shouldUseFrozenLockfile = shouldUseFrozenLockfile;
45
45
  exports.getPackageVersionFromPackageJson = getPackageVersionFromPackageJson;
46
+ const eas_build_job_1 = require("@expo/eas-build-job");
46
47
  const PackageManagerUtils = __importStar(require("@expo/package-manager"));
47
48
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
48
49
  const semver_1 = __importDefault(require("semver"));
@@ -54,7 +55,7 @@ var PackageManager;
54
55
  PackageManager["PNPM"] = "pnpm";
55
56
  PackageManager["BUN"] = "bun";
56
57
  })(PackageManager || (exports.PackageManager = PackageManager = {}));
57
- function resolvePackageManager(directory) {
58
+ function resolvePackageManager(directory, { env }) {
58
59
  try {
59
60
  const manager = PackageManagerUtils.resolvePackageManager(directory);
60
61
  if (manager === 'npm') {
@@ -66,13 +67,21 @@ function resolvePackageManager(directory) {
66
67
  else if (manager === 'bun') {
67
68
  return PackageManager.BUN;
68
69
  }
69
- else {
70
+ else if (manager === 'yarn') {
70
71
  return PackageManager.YARN;
71
72
  }
72
73
  }
73
- catch {
74
- return PackageManager.YARN;
74
+ catch { }
75
+ const fallback = env.EAS_FALLBACK_PACKAGE_MANAGER;
76
+ if (fallback) {
77
+ const parsed = zod_1.z.enum(PackageManager).safeParse(fallback);
78
+ if (parsed.success) {
79
+ return parsed.data;
80
+ }
81
+ const allowed = Object.values(PackageManager).join(', ');
82
+ throw new eas_build_job_1.errors.UserError('EAS_INVALID_FALLBACK_PACKAGE_MANAGER', `Invalid EAS_FALLBACK_PACKAGE_MANAGER value "${fallback}" (expected one of: ${allowed}).`);
75
83
  }
84
+ return PackageManager.YARN;
76
85
  }
77
86
  /**
78
87
  * Get the version of a package from the dist-tags.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "18.7.0",
3
+ "version": "18.8.0",
4
4
  "bugs": "https://github.com/expo/eas-cli/issues",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Expo <support@expo.io>",
@@ -38,14 +38,14 @@
38
38
  "@expo/config": "55.0.10",
39
39
  "@expo/config-plugins": "55.0.7",
40
40
  "@expo/downloader": "18.5.0",
41
- "@expo/eas-build-job": "18.6.0",
41
+ "@expo/eas-build-job": "18.8.0",
42
42
  "@expo/env": "^0.4.0",
43
43
  "@expo/logger": "18.5.0",
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.6.0",
48
+ "@expo/steps": "18.8.0",
49
49
  "@expo/template-file": "18.5.0",
50
50
  "@expo/turtle-spawn": "18.5.0",
51
51
  "@expo/xcpretty": "^4.3.1",
@@ -98,5 +98,5 @@
98
98
  "typescript": "^5.5.4",
99
99
  "uuid": "^9.0.1"
100
100
  },
101
- "gitHead": "7f163e3e529c71db2d394db4826ffff41313ae37"
101
+ "gitHead": "7c7fad4a13a8a45bdca698fc0fd4c08b17bb189c"
102
102
  }