eas-cli 8.0.0 → 9.0.1

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 (78) hide show
  1. package/README.md +62 -60
  2. package/build/build/android/build.js +1 -0
  3. package/build/build/android/graphql.js +0 -1
  4. package/build/build/android/prepareJob.js +0 -2
  5. package/build/build/android/syncProjectConfiguration.d.ts +3 -1
  6. package/build/build/android/syncProjectConfiguration.js +2 -2
  7. package/build/build/createContext.d.ts +2 -1
  8. package/build/build/createContext.js +2 -1
  9. package/build/build/ios/build.js +1 -0
  10. package/build/build/ios/graphql.js +0 -1
  11. package/build/build/ios/prepareJob.js +0 -2
  12. package/build/build/ios/syncProjectConfiguration.d.ts +3 -1
  13. package/build/build/ios/syncProjectConfiguration.js +2 -2
  14. package/build/build/local.js +1 -1
  15. package/build/build/metadata.js +11 -25
  16. package/build/build/runBuildAndSubmit.d.ts +1 -0
  17. package/build/build/runBuildAndSubmit.js +4 -3
  18. package/build/build/utils/formatBuild.js +0 -4
  19. package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +11 -0
  20. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +8 -3
  21. package/build/commands/build/configure.js +8 -2
  22. package/build/commands/build/index.d.ts +1 -0
  23. package/build/commands/build/index.js +5 -0
  24. package/build/commands/build/inspect.js +1 -0
  25. package/build/commands/build/internal.js +1 -0
  26. package/build/commands/credentials/configure-build.js +1 -1
  27. package/build/commands/project/onboarding.d.ts +15 -0
  28. package/build/commands/project/onboarding.js +168 -0
  29. package/build/commands/update/configure.js +1 -0
  30. package/build/commands/update/index.js +2 -0
  31. package/build/commands/update/roll-back-to-embedded.js +2 -0
  32. package/build/credentials/context.d.ts +2 -0
  33. package/build/credentials/context.js +3 -1
  34. package/build/credentials/errors.d.ts +6 -0
  35. package/build/credentials/errors.js +14 -1
  36. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +9 -4
  37. package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +1 -0
  38. package/build/credentials/ios/actions/CreateProvisioningProfile.js +22 -5
  39. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +17 -5
  40. package/build/credentials/manager/SetUpBuildCredentialsCommandAction.d.ts +2 -1
  41. package/build/credentials/manager/SetUpBuildCredentialsCommandAction.js +4 -3
  42. package/build/credentials/manager/SetUpIosBuildCredentials.js +1 -1
  43. package/build/graphql/generated.d.ts +648 -184
  44. package/build/graphql/generated.js +63 -17
  45. package/build/graphql/mutations/UserPreferencesMutation.d.ts +10 -0
  46. package/build/graphql/mutations/UserPreferencesMutation.js +44 -0
  47. package/build/graphql/queries/UserQuery.js +10 -0
  48. package/build/graphql/types/App.js +7 -0
  49. package/build/graphql/types/Build.js +0 -1
  50. package/build/onboarding/git.d.ts +10 -0
  51. package/build/onboarding/git.js +57 -0
  52. package/build/onboarding/installDependencies.d.ts +3 -0
  53. package/build/onboarding/installDependencies.js +20 -0
  54. package/build/onboarding/runCommand.d.ts +7 -0
  55. package/build/onboarding/runCommand.js +49 -0
  56. package/build/project/projectUtils.d.ts +0 -1
  57. package/build/project/projectUtils.js +1 -12
  58. package/build/project/publish.d.ts +3 -2
  59. package/build/project/publish.js +4 -10
  60. package/build/project/resolveRuntimeVersionAsync.d.ts +3 -2
  61. package/build/project/resolveRuntimeVersionAsync.js +2 -9
  62. package/build/rollout/actions/CreateRollout.js +1 -0
  63. package/build/update/android/UpdatesModule.d.ts +7 -3
  64. package/build/update/android/UpdatesModule.js +3 -19
  65. package/build/update/configure.d.ts +3 -2
  66. package/build/update/configure.js +17 -5
  67. package/build/update/ios/UpdatesModule.d.ts +8 -3
  68. package/build/update/ios/UpdatesModule.js +3 -20
  69. package/build/update/utils.d.ts +0 -2
  70. package/build/update/utils.js +2 -22
  71. package/build/utils/expoUpdatesCli.d.ts +4 -1
  72. package/build/utils/expoUpdatesCli.js +5 -2
  73. package/build/vcs/clients/git.d.ts +2 -0
  74. package/build/vcs/clients/git.js +52 -27
  75. package/build/vcs/git.d.ts +6 -4
  76. package/build/vcs/git.js +23 -6
  77. package/oclif.manifest.json +30 -1
  78. package/package.json +5 -5
@@ -171,13 +171,24 @@ function warnEASUpdatesManualConfig({ modifyConfig, workflows, }) {
171
171
  /**
172
172
  * Make sure that the current `app.json` configuration for EAS Updates is set natively.
173
173
  */
174
- async function ensureEASUpdateIsConfiguredNativelyAsync(vcsClient, { exp, projectDir, platform, workflows, }) {
174
+ async function ensureEASUpdateIsConfiguredNativelyAsync(vcsClient, { exp, projectDir, platform, workflows, env, }) {
175
175
  if (['all', 'android'].includes(platform) && workflows.android === eas_build_job_1.Workflow.GENERIC) {
176
- await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, workflows.android);
176
+ await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)({
177
+ projectDir,
178
+ exp,
179
+ workflow: workflows.android,
180
+ env,
181
+ });
177
182
  log_1.default.withTick(`Configured ${chalk_1.default.bold('AndroidManifest.xml')} for EAS Update`);
178
183
  }
179
184
  if (['all', 'ios'].includes(platform) && workflows.ios === eas_build_job_1.Workflow.GENERIC) {
180
- await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(vcsClient, projectDir, exp, workflows.ios);
185
+ await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)({
186
+ vcsClient,
187
+ projectDir,
188
+ exp,
189
+ workflow: workflows.ios,
190
+ env,
191
+ });
181
192
  log_1.default.withTick(`Configured ${chalk_1.default.bold('Expo.plist')} for EAS Update`);
182
193
  }
183
194
  }
@@ -196,7 +207,7 @@ async function ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir) {
196
207
  easJsonAccessor.patch(easJsonRawObject => {
197
208
  const easBuildProfilesWithChannels = Object.keys(easJsonRawObject.build).reduce((acc, profileNameKey) => {
198
209
  const buildProfile = easJsonRawObject.build[profileNameKey];
199
- const isNotAlreadyConfigured = !buildProfile.channel && !buildProfile.releaseChannel;
210
+ const isNotAlreadyConfigured = !buildProfile.channel;
200
211
  if (isNotAlreadyConfigured) {
201
212
  return {
202
213
  ...acc,
@@ -236,7 +247,7 @@ exports.ensureEASUpdateIsConfiguredInEasJsonAsync = ensureEASUpdateIsConfiguredI
236
247
  * - Sets `updates.url` if not set
237
248
  * - Ensure latest changes are reflected in the native config, if any
238
249
  */
239
- async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, }) {
250
+ async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, env, }) {
240
251
  const hasExpoUpdates = (0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, expMaybeWithoutUpdates.sdkVersion);
241
252
  const hasExpoUpdatesInDevDependencies = (0, projectUtils_1.isExpoUpdatesInstalledAsDevDependency)(projectDir);
242
253
  if (!hasExpoUpdates && !hasExpoUpdatesInDevDependencies) {
@@ -265,6 +276,7 @@ async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, p
265
276
  projectDir,
266
277
  platform,
267
278
  workflows,
279
+ env,
268
280
  });
269
281
  }
270
282
  if (projectChanged) {
@@ -1,6 +1,11 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
- import { Workflow } from '@expo/eas-build-job';
2
+ import { Env, Workflow } from '@expo/eas-build-job';
3
3
  import { Client } from '../../vcs/vcs';
4
- export declare function syncUpdatesConfigurationAsync(vcsClient: Client, projectDir: string, exp: ExpoConfig, workflow: Workflow): Promise<void>;
5
- export declare function readReleaseChannelSafelyAsync(projectDir: string): Promise<string | null>;
4
+ export declare function syncUpdatesConfigurationAsync({ vcsClient, projectDir, exp, workflow, env, }: {
5
+ vcsClient: Client;
6
+ projectDir: string;
7
+ exp: ExpoConfig;
8
+ workflow: Workflow;
9
+ env: Env | undefined;
10
+ }): Promise<void>;
6
11
  export declare function readChannelSafelyAsync(projectDir: string): Promise<string | null>;
@@ -1,22 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readChannelSafelyAsync = exports.readReleaseChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = void 0;
3
+ exports.readChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = void 0;
4
4
  const config_plugins_1 = require("@expo/config-plugins");
5
5
  const platform_1 = require("../../platform");
6
6
  const projectUtils_1 = require("../../project/projectUtils");
7
7
  const expoUpdatesCli_1 = require("../../utils/expoUpdatesCli");
8
8
  const plist_1 = require("../../utils/plist");
9
9
  const utils_1 = require("../utils");
10
- async function syncUpdatesConfigurationAsync(vcsClient, projectDir, exp, workflow) {
10
+ async function syncUpdatesConfigurationAsync({ vcsClient, projectDir, exp, workflow, env, }) {
11
11
  (0, utils_1.ensureValidVersions)(exp, platform_1.RequestedPlatform.Ios);
12
12
  if (await (0, projectUtils_1.isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync)(projectDir)) {
13
- await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, [
14
- 'configuration:syncnative',
15
- '--platform',
16
- 'ios',
17
- '--workflow',
18
- workflow,
19
- ]);
13
+ await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, ['configuration:syncnative', '--platform', 'ios', '--workflow', workflow], { env });
20
14
  return;
21
15
  }
22
16
  const expoPlist = await readExpoPlistAsync(projectDir);
@@ -35,17 +29,6 @@ async function writeExpoPlistAsync(vcsClient, projectDir, expoPlist) {
35
29
  await (0, plist_1.writePlistAsync)(expoPlistPath, expoPlist);
36
30
  await vcsClient.trackFileAsync(expoPlistPath);
37
31
  }
38
- async function readReleaseChannelSafelyAsync(projectDir) {
39
- var _a;
40
- try {
41
- const expoPlist = await readExpoPlistAsync(projectDir);
42
- return (_a = expoPlist[config_plugins_1.IOSConfig.Updates.Config.RELEASE_CHANNEL]) !== null && _a !== void 0 ? _a : null;
43
- }
44
- catch {
45
- return null;
46
- }
47
- }
48
- exports.readReleaseChannelSafelyAsync = readReleaseChannelSafelyAsync;
49
32
  async function readChannelSafelyAsync(projectDir) {
50
33
  var _a;
51
34
  try {
@@ -1,7 +1,6 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { Robot, SsoUser, Update, UpdateBranchFragment, UpdateFragment, User } from '../graphql/generated';
3
3
  import { RequestedPlatform } from '../platform';
4
- import { ProfileData } from '../utils/profiles';
5
4
  export type FormatUpdateParameter = Pick<Update, 'id' | 'createdAt' | 'message'> & {
6
5
  actor?: Pick<Robot, '__typename' | 'firstName'> | Pick<User, '__typename' | 'username'> | Pick<SsoUser, '__typename' | 'username'> | null;
7
6
  };
@@ -54,4 +53,3 @@ export declare function getUpdateGroupDescriptions(updateGroups: UpdateFragment[
54
53
  export declare function getUpdateGroupDescriptionsWithBranch(updateGroups: UpdateFragment[][]): FormattedUpdateGroupDescriptionWithBranch[];
55
54
  export declare function getBranchDescription(branch: UpdateBranchFragment): FormattedBranchDescription;
56
55
  export declare function checkEASUpdateURLIsSetAsync(exp: ExpoConfig, projectId: string): Promise<boolean>;
57
- export declare function validateBuildProfileConfigMatchesProjectConfigAsync(exp: ExpoConfig, buildProfile: ProfileData<'build'>, projectId: string, nonInteractive: boolean): Promise<void>;
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateBuildProfileConfigMatchesProjectConfigAsync = exports.checkEASUpdateURLIsSetAsync = exports.getBranchDescription = exports.getUpdateGroupDescriptionsWithBranch = exports.getUpdateGroupDescriptions = exports.getUpdateJsonInfosForUpdates = exports.formatUpdateTitle = exports.ensureValidVersions = exports.formatUpdateMessage = exports.truncateString = exports.formatPlatformForUpdateGroup = exports.getPlatformsForGroup = exports.formatBranch = exports.formatUpdateGroup = exports.UPDATE_COLUMNS_WITH_BRANCH = exports.UPDATE_COLUMNS = void 0;
3
+ exports.checkEASUpdateURLIsSetAsync = exports.getBranchDescription = exports.getUpdateGroupDescriptionsWithBranch = exports.getUpdateGroupDescriptions = exports.getUpdateJsonInfosForUpdates = exports.formatUpdateTitle = exports.ensureValidVersions = exports.formatUpdateMessage = exports.truncateString = exports.formatPlatformForUpdateGroup = exports.getPlatformsForGroup = exports.formatBranch = exports.formatUpdateGroup = exports.UPDATE_COLUMNS_WITH_BRANCH = exports.UPDATE_COLUMNS = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const timeago_js_1 = require("@expo/timeago.js");
6
6
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
8
8
  const api_1 = require("../api");
9
- const log_1 = tslib_1.__importStar(require("../log"));
9
+ const log_1 = require("../log");
10
10
  const platform_1 = require("../platform");
11
- const prompts_1 = require("../prompts");
12
11
  const User_1 = require("../user/User");
13
12
  const groupBy_1 = tslib_1.__importDefault(require("../utils/expodash/groupBy"));
14
13
  const formatFields_1 = tslib_1.__importDefault(require("../utils/formatFields"));
@@ -184,22 +183,3 @@ async function checkEASUpdateURLIsSetAsync(exp, projectId) {
184
183
  return configuredURL === expectedURL;
185
184
  }
186
185
  exports.checkEASUpdateURLIsSetAsync = checkEASUpdateURLIsSetAsync;
187
- async function validateBuildProfileConfigMatchesProjectConfigAsync(exp, buildProfile, projectId, nonInteractive) {
188
- if ((await checkEASUpdateURLIsSetAsync(exp, projectId)) && buildProfile.profile.releaseChannel) {
189
- const warning = `» Your project is configured for EAS Update, but build profile "${buildProfile.profileName}" in ${chalk_1.default.bold('eas.json')} specifies the \`releaseChannel\` property.
190
- For EAS Update, you need to specify the \`channel\` property, or your build will not be able to receive any updates
191
-
192
- ${(0, log_1.learnMore)('https://docs.expo.dev/eas-update/getting-started/#configure-your-project')}`;
193
- log_1.default.warn(warning);
194
- if (!nonInteractive) {
195
- const answer = await (0, prompts_1.confirmAsync)({
196
- message: `Would you like to proceed?`,
197
- });
198
- if (!answer) {
199
- log_1.default.log('Aborting...');
200
- process.exit(1);
201
- }
202
- }
203
- }
204
- }
205
- exports.validateBuildProfileConfigMatchesProjectConfigAsync = validateBuildProfileConfigMatchesProjectConfigAsync;
@@ -1,7 +1,10 @@
1
+ import { Env } from '@expo/eas-build-job';
1
2
  export declare class ExpoUpdatesCLIModuleNotFoundError extends Error {
2
3
  }
3
4
  export declare class ExpoUpdatesCLIInvalidCommandError extends Error {
4
5
  }
5
6
  export declare class ExpoUpdatesCLICommandFailedError extends Error {
6
7
  }
7
- export declare function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string>;
8
+ export declare function expoUpdatesCommandAsync(projectDir: string, args: string[], options: {
9
+ env: Env | undefined;
10
+ }): Promise<string>;
@@ -14,7 +14,7 @@ exports.ExpoUpdatesCLIInvalidCommandError = ExpoUpdatesCLIInvalidCommandError;
14
14
  class ExpoUpdatesCLICommandFailedError extends Error {
15
15
  }
16
16
  exports.ExpoUpdatesCLICommandFailedError = ExpoUpdatesCLICommandFailedError;
17
- async function expoUpdatesCommandAsync(projectDir, args) {
17
+ async function expoUpdatesCommandAsync(projectDir, args, options) {
18
18
  var _a;
19
19
  let expoUpdatesCli;
20
20
  try {
@@ -28,7 +28,10 @@ async function expoUpdatesCommandAsync(projectDir, args) {
28
28
  throw e;
29
29
  }
30
30
  try {
31
- return (await (0, spawn_async_1.default)(expoUpdatesCli, args, { stdio: 'pipe' })).stdout;
31
+ return (await (0, spawn_async_1.default)(expoUpdatesCli, args, {
32
+ stdio: 'pipe',
33
+ env: { ...process.env, ...options.env },
34
+ })).stdout;
32
35
  }
33
36
  catch (e) {
34
37
  if (e.stderr && typeof e.stderr === 'string') {
@@ -1,5 +1,7 @@
1
1
  import { Client } from '../vcs';
2
2
  export default class GitClient extends Client {
3
+ private maybeCwdOverride?;
4
+ constructor(maybeCwdOverride?: string | undefined);
3
5
  ensureRepoExistsAsync(): Promise<void>;
4
6
  commitAsync({ commitMessage, commitAllFiles, nonInteractive, }: {
5
7
  commitMessage: string;
@@ -13,8 +13,12 @@ const prompts_1 = require("../../prompts");
13
13
  const git_1 = require("../git");
14
14
  const vcs_1 = require("../vcs");
15
15
  class GitClient extends vcs_1.Client {
16
+ constructor(maybeCwdOverride) {
17
+ super();
18
+ this.maybeCwdOverride = maybeCwdOverride;
19
+ }
16
20
  async ensureRepoExistsAsync() {
17
- var _a;
21
+ var _a, _b, _c;
18
22
  try {
19
23
  if (!(await (0, git_1.isGitInstalledAsync)())) {
20
24
  log_1.default.error(`${chalk_1.default.bold('git')} command not found. Install it before proceeding or set ${chalk_1.default.bold('EAS_NO_VCS=1')} to use EAS CLI without Git (or any other version control system).`);
@@ -39,12 +43,12 @@ class GitClient extends vcs_1.Client {
39
43
  const cwd = process.cwd();
40
44
  const repoRoot = (_a = PackageManagerUtils.findWorkspaceRoot(cwd)) !== null && _a !== void 0 ? _a : cwd;
41
45
  const confirmInit = await (0, prompts_1.confirmAsync)({
42
- message: `Would you like us to run 'git init' in ${repoRoot} for you?`,
46
+ message: `Would you like us to run 'git init' in ${(_b = this.maybeCwdOverride) !== null && _b !== void 0 ? _b : repoRoot} for you?`,
43
47
  });
44
48
  if (!confirmInit) {
45
49
  throw new Error('A git repository is required for building your project. Initialize it and run this command again.');
46
50
  }
47
- await (0, spawn_async_1.default)('git', ['init'], { cwd: repoRoot });
51
+ await (0, spawn_async_1.default)('git', ['init'], { cwd: (_c = this.maybeCwdOverride) !== null && _c !== void 0 ? _c : repoRoot });
48
52
  log_1.default.log("We're going to make an initial commit for your repository.");
49
53
  const { message } = await (0, prompts_1.promptAsync)({
50
54
  type: 'text',
@@ -59,10 +63,16 @@ class GitClient extends vcs_1.Client {
59
63
  await ensureGitConfiguredAsync({ nonInteractive });
60
64
  try {
61
65
  if (commitAllFiles) {
62
- await (0, spawn_async_1.default)('git', ['add', '-A']);
66
+ await (0, spawn_async_1.default)('git', ['add', '-A'], {
67
+ cwd: this.maybeCwdOverride,
68
+ });
63
69
  }
64
- await (0, spawn_async_1.default)('git', ['add', '-u']);
65
- await (0, spawn_async_1.default)('git', ['commit', '-m', commitMessage]);
70
+ await (0, spawn_async_1.default)('git', ['add', '-u'], {
71
+ cwd: this.maybeCwdOverride,
72
+ });
73
+ await (0, spawn_async_1.default)('git', ['commit', '-m', commitMessage], {
74
+ cwd: this.maybeCwdOverride,
75
+ });
66
76
  }
67
77
  catch (err) {
68
78
  if (err === null || err === void 0 ? void 0 : err.stdout) {
@@ -78,15 +88,20 @@ class GitClient extends vcs_1.Client {
78
88
  return await this.hasUncommittedChangesAsync();
79
89
  }
80
90
  async showChangedFilesAsync() {
81
- const gitStatusOutput = await (0, git_1.gitStatusAsync)({ showUntracked: true });
91
+ const gitStatusOutput = await (0, git_1.gitStatusAsync)({
92
+ showUntracked: true,
93
+ cwd: this.maybeCwdOverride,
94
+ });
82
95
  log_1.default.log(gitStatusOutput);
83
96
  }
84
97
  async hasUncommittedChangesAsync() {
85
- const changes = await (0, git_1.gitStatusAsync)({ showUntracked: true });
98
+ const changes = await (0, git_1.gitStatusAsync)({ showUntracked: true, cwd: this.maybeCwdOverride });
86
99
  return changes.length > 0;
87
100
  }
88
101
  async getRootPathAsync() {
89
- return (await (0, spawn_async_1.default)('git', ['rev-parse', '--show-toplevel'])).stdout.trim();
102
+ return (await (0, spawn_async_1.default)('git', ['rev-parse', '--show-toplevel'], {
103
+ cwd: this.maybeCwdOverride,
104
+ })).stdout.trim();
90
105
  }
91
106
  async makeShallowCopyAsync(destinationPath) {
92
107
  if (await this.hasUncommittedChangesAsync()) {
@@ -111,19 +126,17 @@ class GitClient extends vcs_1.Client {
111
126
  if (await this.hasUncommittedChangesAsync()) {
112
127
  log_1.default.error('Detected inconsistent filename casing between your local filesystem and git.');
113
128
  log_1.default.error('This will likely cause your build to fail. Impacted files:');
114
- await (0, spawn_async_1.default)('git', ['status', '--short'], { stdio: 'inherit' });
129
+ await (0, spawn_async_1.default)('git', ['status', '--short'], {
130
+ stdio: 'inherit',
131
+ cwd: this.maybeCwdOverride,
132
+ });
115
133
  log_1.default.newLine();
116
134
  log_1.default.error(`Error: Resolve filename casing inconsistencies before proceeding. ${(0, log_1.learnMore)('https://expo.fyi/macos-ignorecase')}`);
117
135
  throw new Error('You have some uncommitted changes in your repository.');
118
136
  }
119
- await (0, spawn_async_1.default)('git', [
120
- 'clone',
121
- '--no-hardlinks',
122
- '--depth',
123
- '1',
124
- gitRepoUri,
125
- destinationPath,
126
- ]);
137
+ await (0, spawn_async_1.default)('git', ['clone', '--no-hardlinks', '--depth', '1', gitRepoUri, destinationPath], {
138
+ cwd: this.maybeCwdOverride,
139
+ });
127
140
  }
128
141
  finally {
129
142
  await setGitCaseSensitivityAsync(isCaseSensitive);
@@ -131,18 +144,24 @@ class GitClient extends vcs_1.Client {
131
144
  }
132
145
  async getCommitHashAsync() {
133
146
  try {
134
- return (await (0, spawn_async_1.default)('git', ['rev-parse', 'HEAD'])).stdout.trim();
147
+ return (await (0, spawn_async_1.default)('git', ['rev-parse', 'HEAD'], {
148
+ cwd: this.maybeCwdOverride,
149
+ })).stdout.trim();
135
150
  }
136
151
  catch {
137
152
  return undefined;
138
153
  }
139
154
  }
140
155
  async trackFileAsync(file) {
141
- await (0, spawn_async_1.default)('git', ['add', '--intent-to-add', file]);
156
+ await (0, spawn_async_1.default)('git', ['add', '--intent-to-add', file], {
157
+ cwd: this.maybeCwdOverride,
158
+ });
142
159
  }
143
160
  async getBranchNameAsync() {
144
161
  try {
145
- return (await (0, spawn_async_1.default)('git', ['rev-parse', '--abbrev-ref', 'HEAD'])).stdout.trim();
162
+ return (await (0, spawn_async_1.default)('git', ['rev-parse', '--abbrev-ref', 'HEAD'], {
163
+ cwd: this.maybeCwdOverride,
164
+ })).stdout.trim();
146
165
  }
147
166
  catch {
148
167
  return null;
@@ -150,27 +169,33 @@ class GitClient extends vcs_1.Client {
150
169
  }
151
170
  async getLastCommitMessageAsync() {
152
171
  try {
153
- return (await (0, spawn_async_1.default)('git', ['--no-pager', 'log', '-1', '--pretty=%B'])).stdout.trim();
172
+ return (await (0, spawn_async_1.default)('git', ['--no-pager', 'log', '-1', '--pretty=%B'], {
173
+ cwd: this.maybeCwdOverride,
174
+ })).stdout.trim();
154
175
  }
155
176
  catch {
156
177
  return null;
157
178
  }
158
179
  }
159
180
  async showDiffAsync() {
160
- const outputTooLarge = (await (0, git_1.getGitDiffOutputAsync)()).split(/\r\n|\r|\n/).length > 100;
161
- await (0, git_1.gitDiffAsync)({ withPager: outputTooLarge });
181
+ const outputTooLarge = (await (0, git_1.getGitDiffOutputAsync)(this.maybeCwdOverride)).split(/\r\n|\r|\n/).length > 100;
182
+ await (0, git_1.gitDiffAsync)({ withPager: outputTooLarge, cwd: this.maybeCwdOverride });
162
183
  }
163
184
  async isFileUntrackedAsync(path) {
164
- const withUntrackedFiles = await (0, git_1.gitStatusAsync)({ showUntracked: true });
165
- const trackedFiles = await (0, git_1.gitStatusAsync)({ showUntracked: false });
185
+ const withUntrackedFiles = await (0, git_1.gitStatusAsync)({
186
+ showUntracked: true,
187
+ cwd: this.maybeCwdOverride,
188
+ });
189
+ const trackedFiles = await (0, git_1.gitStatusAsync)({ showUntracked: false, cwd: this.maybeCwdOverride });
166
190
  const pathWithoutLeadingDot = path.replace(/^\.\//, ''); // remove leading './' from path
167
191
  return (withUntrackedFiles.includes(pathWithoutLeadingDot) &&
168
192
  !trackedFiles.includes(pathWithoutLeadingDot));
169
193
  }
170
194
  async isFileIgnoredAsync(filePath) {
195
+ var _a;
171
196
  try {
172
197
  await (0, spawn_async_1.default)('git', ['check-ignore', '-q', filePath], {
173
- cwd: path_1.default.normalize(await this.getRootPathAsync()),
198
+ cwd: (_a = this.maybeCwdOverride) !== null && _a !== void 0 ? _a : path_1.default.normalize(await this.getRootPathAsync()),
174
199
  });
175
200
  return true;
176
201
  }
@@ -1,11 +1,13 @@
1
1
  export declare function isGitInstalledAsync(): Promise<boolean>;
2
2
  export declare function doesGitRepoExistAsync(): Promise<boolean>;
3
3
  interface GitStatusOptions {
4
- showUntracked?: boolean;
4
+ showUntracked: boolean;
5
+ cwd: string | undefined;
5
6
  }
6
- export declare function gitStatusAsync({ showUntracked }?: GitStatusOptions): Promise<string>;
7
- export declare function getGitDiffOutputAsync(): Promise<string>;
8
- export declare function gitDiffAsync({ withPager, }?: {
7
+ export declare function gitStatusAsync({ showUntracked, cwd }: GitStatusOptions): Promise<string>;
8
+ export declare function getGitDiffOutputAsync(cwd: string | undefined): Promise<string>;
9
+ export declare function gitDiffAsync({ withPager, cwd, }: {
9
10
  withPager?: boolean;
11
+ cwd: string | undefined;
10
12
  }): Promise<void>;
11
13
  export {};
package/build/vcs/git.js CHANGED
@@ -26,16 +26,33 @@ async function doesGitRepoExistAsync() {
26
26
  }
27
27
  }
28
28
  exports.doesGitRepoExistAsync = doesGitRepoExistAsync;
29
- async function gitStatusAsync({ showUntracked } = {}) {
30
- return (await (0, spawn_async_1.default)('git', ['status', '-s', showUntracked ? '-uall' : '-uno'])).stdout;
29
+ async function gitStatusAsync({ showUntracked, cwd }) {
30
+ return (await (0, spawn_async_1.default)('git', ['status', '-s', showUntracked ? '-uall' : '-uno'], {
31
+ cwd,
32
+ })).stdout;
31
33
  }
32
34
  exports.gitStatusAsync = gitStatusAsync;
33
- async function getGitDiffOutputAsync() {
34
- return (await (0, spawn_async_1.default)('git', ['--no-pager', 'diff'])).stdout;
35
+ async function getGitDiffOutputAsync(cwd) {
36
+ return (await (0, spawn_async_1.default)('git', ['--no-pager', 'diff'], {
37
+ cwd,
38
+ })).stdout;
35
39
  }
36
40
  exports.getGitDiffOutputAsync = getGitDiffOutputAsync;
37
- async function gitDiffAsync({ withPager = false, } = {}) {
41
+ async function gitDiffAsync({ withPager = false, cwd, }) {
38
42
  const options = withPager ? [] : ['--no-pager'];
39
- await (0, spawn_async_1.default)('git', [...options, 'diff'], { stdio: ['ignore', 'inherit', 'inherit'] });
43
+ try {
44
+ await (0, spawn_async_1.default)('git', [...options, 'diff'], {
45
+ stdio: ['ignore', 'inherit', 'inherit'],
46
+ cwd,
47
+ });
48
+ }
49
+ catch (error) {
50
+ if (typeof error.message === 'string' && error.message.includes('SIGPIPE')) {
51
+ // This error is thrown when the user exits the pager with `q`.
52
+ // do nothing
53
+ return;
54
+ }
55
+ throw error;
56
+ }
40
57
  }
41
58
  exports.gitDiffAsync = gitDiffAsync;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.0.0",
2
+ "version": "9.0.1",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -744,6 +744,12 @@
744
744
  "fatal"
745
745
  ]
746
746
  },
747
+ "freeze-credentials": {
748
+ "name": "freeze-credentials",
749
+ "type": "boolean",
750
+ "description": "Prevent the build from updating credentials in non-interactive mode",
751
+ "allowNo": false
752
+ },
747
753
  "json": {
748
754
  "name": "json",
749
755
  "type": "boolean",
@@ -1925,6 +1931,29 @@
1925
1931
  "projectDir": {}
1926
1932
  }
1927
1933
  },
1934
+ "project:onboarding": {
1935
+ "id": "project:onboarding",
1936
+ "description": "continue onboarding process started on the expo.dev website",
1937
+ "strict": true,
1938
+ "pluginName": "eas-cli",
1939
+ "pluginAlias": "eas-cli",
1940
+ "pluginType": "core",
1941
+ "hidden": true,
1942
+ "aliases": [
1943
+ "init:onboarding",
1944
+ "onboarding"
1945
+ ],
1946
+ "flags": {},
1947
+ "args": {
1948
+ "TARGET_PROJECT_DIRECTORY": {
1949
+ "name": "TARGET_PROJECT_DIRECTORY"
1950
+ }
1951
+ },
1952
+ "contextDefinition": {
1953
+ "loggedIn": {},
1954
+ "analytics": {}
1955
+ }
1956
+ },
1928
1957
  "secret:create": {
1929
1958
  "id": "secret:create",
1930
1959
  "description": "create an environment secret on the current project or owner account",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "8.0.0",
4
+ "version": "9.0.1",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -13,8 +13,8 @@
13
13
  "@expo/config": "8.5.4",
14
14
  "@expo/config-plugins": "7.8.4",
15
15
  "@expo/config-types": "50.0.0",
16
- "@expo/eas-build-job": "1.0.102",
17
- "@expo/eas-json": "8.0.0",
16
+ "@expo/eas-build-job": "1.0.107",
17
+ "@expo/eas-json": "9.0.1",
18
18
  "@expo/json-file": "8.2.37",
19
19
  "@expo/logger": "1.0.57",
20
20
  "@expo/multipart-body-parser": "1.1.0",
@@ -28,7 +28,7 @@
28
28
  "@expo/results": "1.0.0",
29
29
  "@expo/rudder-sdk-node": "1.1.1",
30
30
  "@expo/spawn-async": "1.7.0",
31
- "@expo/steps": "1.0.102",
31
+ "@expo/steps": "1.0.107",
32
32
  "@expo/timeago.js": "1.0.0",
33
33
  "@oclif/core": "^1.26.2",
34
34
  "@oclif/plugin-autocomplete": "^2.3.10",
@@ -223,5 +223,5 @@
223
223
  "node": "20.11.0",
224
224
  "yarn": "1.22.21"
225
225
  },
226
- "gitHead": "b2580d0cc20e218a7ac94f6b07ccd2259213eab9"
226
+ "gitHead": "40c1cbe9f68929870418e2623002eff5049e8aba"
227
227
  }