eas-cli 0.37.0 → 0.38.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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prepareIosBuildAsync = void 0;
3
+ exports.prepareIosBuildAsync = exports.createIosContextAsync = void 0;
4
4
  const config_plugins_1 = require("@expo/config-plugins");
5
5
  const eas_build_job_1 = require("@expo/eas-build-job");
6
6
  const BuildMutation_1 = require("../../graphql/mutations/BuildMutation");
@@ -14,7 +14,7 @@ const configure_1 = require("./configure");
14
14
  const credentials_1 = require("./credentials");
15
15
  const graphql_2 = require("./graphql");
16
16
  const prepareJob_1 = require("./prepareJob");
17
- async function prepareIosBuildAsync(ctx) {
17
+ async function createIosContextAsync(ctx) {
18
18
  const { buildProfile } = ctx;
19
19
  if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
20
20
  await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
@@ -30,25 +30,36 @@ async function prepareIosBuildAsync(ctx) {
30
30
  projectDir: ctx.projectDir,
31
31
  exp: ctx.exp,
32
32
  }, xcodeBuildContext);
33
- const buildConfiguration = resolveBuildConfiguration(ctx, targets);
33
+ const applicationTarget = (0, target_1.findApplicationTarget)(targets);
34
+ const applicationTargetBuildSettings = resolveBuildSettings(ctx, applicationTarget);
35
+ return {
36
+ bundleIdentifier: applicationTarget.bundleIdentifier,
37
+ applicationTarget,
38
+ applicationTargetBuildSettings,
39
+ targets,
40
+ xcodeBuildContext,
41
+ };
42
+ }
43
+ exports.createIosContextAsync = createIosContextAsync;
44
+ async function prepareIosBuildAsync(ctx) {
34
45
  return await (0, build_1.prepareBuildRequestForPlatformAsync)({
35
46
  ctx,
36
47
  ensureCredentialsAsync: async (ctx) => {
37
- return (0, credentials_1.ensureIosCredentialsAsync)(ctx, targets);
48
+ return (0, credentials_1.ensureIosCredentialsAsync)(ctx, ctx.ios.targets);
38
49
  },
39
50
  ensureProjectConfiguredAsync: async () => {
40
51
  await (0, configure_1.validateAndSyncProjectConfigurationAsync)({
41
52
  projectDir: ctx.projectDir,
42
53
  exp: ctx.exp,
43
- buildProfile,
44
- buildSettings: buildConfiguration.buildSettings,
54
+ buildProfile: ctx.buildProfile,
55
+ buildSettings: ctx.ios.applicationTargetBuildSettings,
45
56
  });
46
57
  },
47
- getMetadataContext: () => {
48
- return buildConfiguration;
49
- },
50
58
  prepareJobAsync: async (ctx, jobData) => {
51
- return await (0, prepareJob_1.prepareJobAsync)(ctx, { ...jobData, buildScheme: xcodeBuildContext.buildScheme });
59
+ return await (0, prepareJob_1.prepareJobAsync)(ctx, {
60
+ ...jobData,
61
+ buildScheme: ctx.ios.xcodeBuildContext.buildScheme,
62
+ });
52
63
  },
53
64
  sendBuildRequestAsync: async (appId, job, metadata) => {
54
65
  const graphqlMetadata = (0, graphql_1.transformMetadata)(metadata);
@@ -62,21 +73,15 @@ async function prepareIosBuildAsync(ctx) {
62
73
  });
63
74
  }
64
75
  exports.prepareIosBuildAsync = prepareIosBuildAsync;
65
- function resolveBuildConfiguration(ctx, targets) {
76
+ function resolveBuildSettings(ctx, applicationTarget) {
66
77
  var _a;
67
78
  if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
68
- return { buildSettings: {} };
79
+ return {};
69
80
  }
70
- const applicationTarget = (0, target_1.findApplicationTarget)(targets);
71
81
  const project = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(ctx.projectDir);
72
82
  const xcBuildConfiguration = config_plugins_1.IOSConfig.Target.getXCBuildConfigurationFromPbxproj(project, {
73
83
  targetName: applicationTarget.targetName,
74
84
  buildConfiguration: applicationTarget.buildConfiguration,
75
85
  });
76
- const buildSettings = (_a = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : xcBuildConfiguration.buildSettings) !== null && _a !== void 0 ? _a : {};
77
- return {
78
- buildSettings,
79
- targetName: applicationTarget.targetName,
80
- buildConfiguration: applicationTarget.buildConfiguration,
81
- };
86
+ return (_a = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : xcBuildConfiguration.buildSettings) !== null && _a !== void 0 ? _a : {};
82
87
  }
@@ -3,16 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runLocalBuildAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"));
6
+ const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
6
7
  const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
7
8
  const PLUGIN_PACKAGE_VERSION = '0.0.50';
8
9
  async function runLocalBuildAsync(job) {
9
- const { command, args } = getCommandAndArgs(job);
10
+ const { command, args } = await getCommandAndArgsAsync(job);
10
11
  await (0, spawn_async_1.default)(command, args, {
11
12
  stdio: 'inherit',
12
13
  });
13
14
  }
14
15
  exports.runLocalBuildAsync = runLocalBuildAsync;
15
- function getCommandAndArgs(job) {
16
+ async function getCommandAndArgsAsync(job) {
16
17
  const jobBase64 = Buffer.from(JSON.stringify({ job })).toString('base64');
17
18
  if (process.env.EAS_LOCAL_BUILD_PLUGIN_PATH) {
18
19
  return {
@@ -21,9 +22,19 @@ function getCommandAndArgs(job) {
21
22
  };
22
23
  }
23
24
  else {
25
+ const args = [`${PLUGIN_PACKAGE_NAME}@${PLUGIN_PACKAGE_VERSION}`, jobBase64];
26
+ if (await isAtLeastNpm7Async()) {
27
+ // npx shipped with npm >= 7.0.0 requires the "-y" flag to run commands without
28
+ // prompting the user to install a package that is used for the first time
29
+ args.unshift('-y');
30
+ }
24
31
  return {
25
32
  command: 'npx',
26
- args: ['-y', `${PLUGIN_PACKAGE_NAME}@${PLUGIN_PACKAGE_VERSION}`, jobBase64],
33
+ args,
27
34
  };
28
35
  }
29
36
  }
37
+ async function isAtLeastNpm7Async() {
38
+ const version = (await (0, spawn_async_1.default)('npm', ['--version'])).stdout.trim();
39
+ return semver_1.default.gte(version, '7.0.0');
40
+ }
@@ -1,14 +1,3 @@
1
1
  import { Metadata, Platform } from '@expo/eas-build-job';
2
- import type { XCBuildConfiguration } from 'xcode';
3
- import { GradleBuildContext } from '../project/android/gradle';
4
2
  import { BuildContext } from './context';
5
- export declare type MetadataContext<T extends Platform> = T extends Platform.ANDROID ? AndroidMetadataContext : IosMetadataContext;
6
- export interface AndroidMetadataContext {
7
- gradleContext?: GradleBuildContext;
8
- }
9
- export interface IosMetadataContext {
10
- buildSettings: XCBuildConfiguration['buildSettings'];
11
- targetName?: string;
12
- buildConfiguration?: string;
13
- }
14
- export declare function collectMetadataAsync<T extends Platform>(ctx: BuildContext<T>, platformContext: MetadataContext<T>): Promise<Metadata>;
3
+ export declare function collectMetadataAsync<T extends Platform>(ctx: BuildContext<T>): Promise<Metadata>;
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectMetadataAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const config_plugins_1 = require("@expo/config-plugins");
4
6
  const eas_build_job_1 = require("@expo/eas-build-job");
5
- const applicationId_1 = require("../project/android/applicationId");
6
- const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
7
+ const log_1 = (0, tslib_1.__importDefault)(require("../log"));
7
8
  const projectUtils_1 = require("../project/projectUtils");
8
9
  const actions_1 = require("../user/actions");
9
10
  const easCli_1 = require("../utils/easCli");
@@ -13,24 +14,34 @@ const version_1 = require("./android/version");
13
14
  const UpdatesModule_2 = require("./ios/UpdatesModule");
14
15
  const version_2 = require("./ios/version");
15
16
  const updates_1 = require("./utils/updates");
16
- async function collectMetadataAsync(ctx, platformContext) {
17
- var _a;
17
+ // TODO(JJ): Replace this with the getRuntimeVersionNullable function in @expo/config-plugins
18
+ function getRuntimeVersionNullable(...[config, platform]) {
19
+ try {
20
+ return config_plugins_1.Updates.getRuntimeVersion(config, platform);
21
+ }
22
+ catch (e) {
23
+ log_1.default.debug(e);
24
+ return null;
25
+ }
26
+ }
27
+ async function collectMetadataAsync(ctx) {
28
+ var _a, _b;
18
29
  const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
19
30
  const distribution = (_a = ('simulator' in ctx.buildProfile && ctx.buildProfile.simulator
20
31
  ? 'simulator'
21
32
  : ctx.buildProfile.distribution)) !== null && _a !== void 0 ? _a : 'store';
22
33
  const metadata = {
23
34
  trackingContext: ctx.trackingCtx,
24
- ...(await maybeResolveVersionsAsync(ctx, platformContext)),
35
+ ...(await maybeResolveVersionsAsync(ctx)),
25
36
  cliVersion: easCli_1.easCliVersion,
26
37
  workflow: ctx.workflow,
27
38
  credentialsSource: ctx.buildProfile.credentialsSource,
28
39
  sdkVersion: ctx.exp.sdkVersion,
29
- runtimeVersion: ctx.exp.runtimeVersion,
40
+ runtimeVersion: (_b = getRuntimeVersionNullable(ctx.exp, ctx.platform)) !== null && _b !== void 0 ? _b : undefined,
30
41
  ...channelOrReleaseChannel,
31
42
  distribution,
32
43
  appName: ctx.exp.name,
33
- appIdentifier: await resolveAppIdentifierAsync(ctx, platformContext),
44
+ appIdentifier: resolveAppIdentifier(ctx),
34
45
  buildProfile: ctx.buildProfileName,
35
46
  gitCommitHash: await (0, vcs_1.getVcsClient)().getCommitHashAsync(),
36
47
  isGitWorkingTreeDirty: await (0, vcs_1.getVcsClient)().hasUncommittedChangesAsync(),
@@ -42,11 +53,10 @@ async function collectMetadataAsync(ctx, platformContext) {
42
53
  return (0, eas_build_job_1.sanitizeMetadata)(metadata);
43
54
  }
44
55
  exports.collectMetadataAsync = collectMetadataAsync;
45
- async function maybeResolveVersionsAsync(ctx, platformContext) {
46
- var _a;
56
+ async function maybeResolveVersionsAsync(ctx) {
47
57
  if (ctx.platform === eas_build_job_1.Platform.IOS) {
48
- const iosContext = platformContext;
49
- return await (0, version_2.maybeResolveVersionsAsync)(ctx.projectDir, ctx.exp, (_a = iosContext === null || iosContext === void 0 ? void 0 : iosContext.buildSettings) !== null && _a !== void 0 ? _a : {});
58
+ const iosContext = ctx;
59
+ return await (0, version_2.maybeResolveVersionsAsync)(ctx.projectDir, ctx.exp, iosContext.ios.applicationTargetBuildSettings);
50
60
  }
51
61
  else if (ctx.platform === eas_build_job_1.Platform.ANDROID) {
52
62
  const androidCtx = ctx;
@@ -56,17 +66,12 @@ async function maybeResolveVersionsAsync(ctx, platformContext) {
56
66
  throw new Error(`Unsupported platform ${ctx.platform}`);
57
67
  }
58
68
  }
59
- async function resolveAppIdentifierAsync(ctx, platformContext) {
69
+ function resolveAppIdentifier(ctx) {
60
70
  if (ctx.platform === eas_build_job_1.Platform.IOS) {
61
- const iosContext = platformContext;
62
- return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(ctx.projectDir, ctx.exp, {
63
- targetName: iosContext.targetName,
64
- buildConfiguration: iosContext.buildConfiguration,
65
- });
71
+ return ctx.ios.bundleIdentifier;
66
72
  }
67
73
  else {
68
- const androidContext = platformContext;
69
- return await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, androidContext.gradleContext);
74
+ return ctx.android.applicationId;
70
75
  }
71
76
  }
72
77
  async function resolveChannelOrReleaseChannelAsync(ctx) {
@@ -1,4 +1,4 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
- import { BuildContext } from './context';
3
- export declare function checkNodeEnvVariable(ctx: BuildContext<Platform>): void;
4
- export declare function checkGoogleServicesFileAsync<T extends Platform>(ctx: BuildContext<T>): Promise<void>;
2
+ import { CommonContext } from './context';
3
+ export declare function checkNodeEnvVariable(ctx: CommonContext<Platform>): void;
4
+ export declare function checkGoogleServicesFileAsync<T extends Platform>(ctx: CommonContext<T>): Promise<void>;
@@ -9,12 +9,14 @@ const log_1 = (0, tslib_1.__importStar)(require("../../log"));
9
9
  const platform_1 = require("../../platform");
10
10
  const projectUtils_1 = require("../../project/projectUtils");
11
11
  const prompts_1 = require("../../prompts");
12
+ const vcs_1 = require("../../vcs");
12
13
  class BuildConfigure extends EasCommand_1.default {
13
14
  async runAsync() {
14
15
  var _a;
15
16
  const { flags } = this.parse(BuildConfigure);
16
17
  log_1.default.log('💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.');
17
18
  log_1.default.newLine();
19
+ await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
18
20
  const platform = (_a = flags.platform) !== null && _a !== void 0 ? _a : (await promptForPlatformAsync());
19
21
  await (0, configure_1.configureAsync)({
20
22
  platform,
@@ -13,7 +13,7 @@ const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
13
13
  const build_1 = require("../../build/android/build");
14
14
  const build_2 = require("../../build/build");
15
15
  const configure_1 = require("../../build/configure");
16
- const context_1 = require("../../build/context");
16
+ const createContext_1 = require("../../build/createContext");
17
17
  const build_3 = require("../../build/ios/build");
18
18
  const devClient_1 = require("../../build/utils/devClient");
19
19
  const printBuildInfo_1 = require("../../build/utils/printBuildInfo");
@@ -26,7 +26,7 @@ const platform_1 = require("../../platform");
26
26
  const metroConfig_1 = require("../../project/metroConfig");
27
27
  const projectUtils_1 = require("../../project/projectUtils");
28
28
  const prompts_1 = require("../../prompts");
29
- const context_2 = require("../../submit/context");
29
+ const context_1 = require("../../submit/context");
30
30
  const submit_1 = require("../../submit/submit");
31
31
  const urls_1 = require("../../submit/utils/urls");
32
32
  const easCli_1 = require("../../utils/easCli");
@@ -40,7 +40,6 @@ class Build extends EasCommand_1.default {
40
40
  this.metroConfigValidated = false;
41
41
  }
42
42
  async runAsync() {
43
- var _a;
44
43
  const { flags: rawFlags } = this.parse(Build);
45
44
  if (rawFlags.json) {
46
45
  (0, json_1.enableJsonOutput)();
@@ -89,7 +88,7 @@ class Build extends EasCommand_1.default {
89
88
  for (const startedBuild of startedBuilds) {
90
89
  const submission = await this.prepareAndStartSubmissionAsync({
91
90
  build: startedBuild.build,
92
- credentialsCtx: (0, nullthrows_1.default)((_a = buildCtxByPlatform[startedBuild.build.platform]) === null || _a === void 0 ? void 0 : _a.credentialsCtx),
91
+ buildCtx: (0, nullthrows_1.default)(buildCtxByPlatform[startedBuild.build.platform]),
93
92
  flags,
94
93
  moreBuilds: startedBuilds.length > 1,
95
94
  projectDir,
@@ -156,7 +155,7 @@ class Build extends EasCommand_1.default {
156
155
  };
157
156
  }
158
157
  async prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, }) {
159
- const buildCtx = await (0, context_1.createBuildContextAsync)({
158
+ const buildCtx = await (0, createContext_1.createBuildContextAsync)({
160
159
  buildProfileName: buildProfile.profileName,
161
160
  clearCache: flags.clearCache,
162
161
  buildProfile: buildProfile.profile,
@@ -191,11 +190,12 @@ class Build extends EasCommand_1.default {
191
190
  }
192
191
  return await sendBuildRequestAsync();
193
192
  }
194
- async prepareAndStartSubmissionAsync({ build, credentialsCtx, flags, moreBuilds, projectDir, buildProfile, }) {
193
+ async prepareAndStartSubmissionAsync({ build, buildCtx, flags, moreBuilds, projectDir, buildProfile, }) {
194
+ var _a, _b, _c;
195
195
  const easJsonReader = new eas_json_1.EasJsonReader(projectDir);
196
196
  const platform = (0, AppPlatform_1.toPlatform)(build.platform);
197
197
  const submitProfile = await easJsonReader.readSubmitProfileAsync(platform, flags.submitProfile);
198
- const submissionCtx = await (0, context_2.createSubmissionContextAsync)({
198
+ const submissionCtx = await (0, context_1.createSubmissionContextAsync)({
199
199
  platform,
200
200
  projectDir,
201
201
  projectId: build.project.id,
@@ -203,7 +203,8 @@ class Build extends EasCommand_1.default {
203
203
  archiveFlags: { id: build.id },
204
204
  nonInteractive: flags.nonInteractive,
205
205
  env: buildProfile.profile.env,
206
- credentialsCtx,
206
+ credentialsCtx: buildCtx.credentialsCtx,
207
+ applicationIdentifier: (_b = (_a = buildCtx.android) === null || _a === void 0 ? void 0 : _a.applicationId) !== null && _b !== void 0 ? _b : (_c = buildCtx.ios) === null || _c === void 0 ? void 0 : _c.bundleIdentifier,
207
208
  });
208
209
  if (moreBuilds) {
209
210
  log_1.default.newLine();
@@ -32,8 +32,7 @@ WebhookCreate.description = 'Create a webhook on the current project.';
32
32
  WebhookCreate.flags = {
33
33
  event: command_1.flags.enum({
34
34
  description: 'Event type that triggers the webhook',
35
- options: [generated_1.WebhookType.Build],
36
- default: generated_1.WebhookType.Build,
35
+ options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
37
36
  }),
38
37
  url: command_1.flags.string({
39
38
  description: 'Webhook URL',
@@ -43,6 +43,6 @@ WebhookList.description = 'List webhooks on the current project.';
43
43
  WebhookList.flags = {
44
44
  event: command_1.flags.enum({
45
45
  description: 'Event type that triggers the webhook',
46
- options: [generated_1.WebhookType.Build],
46
+ options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
47
47
  }),
48
48
  };
@@ -35,8 +35,7 @@ WebhookUpdate.flags = {
35
35
  }),
36
36
  event: command_1.flags.enum({
37
37
  description: 'Event type that triggers the webhook',
38
- options: [generated_1.WebhookType.Build],
39
- default: generated_1.WebhookType.Build,
38
+ options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
40
39
  }),
41
40
  url: command_1.flags.string({
42
41
  description: 'Webhook URL',
@@ -4,6 +4,7 @@ exports.CapabilityMapping = exports.assertValidOptions = exports.syncCapabilitie
4
4
  const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
6
  const getenv_1 = (0, tslib_1.__importDefault)(require("getenv"));
7
+ const util_1 = require("util");
7
8
  const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
8
9
  exports.EXPO_NO_CAPABILITY_SYNC = getenv_1.default.boolish('EXPO_NO_CAPABILITY_SYNC', false);
9
10
  const validateBooleanOptions = (options) => {
@@ -56,7 +57,16 @@ async function syncCapabilitiesForEntitlementsAsync(bundleId, entitlements = {})
56
57
  const { enabledCapabilityNames, request, remainingCapabilities } = getCapabilitiesToEnable(currentCapabilities, entitlements);
57
58
  const { disabledCapabilityNames, request: modifiedRequest } = getCapabilitiesToDisable(bundleId, remainingCapabilities, request);
58
59
  if (modifiedRequest.length) {
59
- await bundleId.updateBundleIdCapabilityAsync(modifiedRequest);
60
+ log_1.default.debug(`Patch Request:`, (0, util_1.inspect)(modifiedRequest, { depth: null, colors: true }));
61
+ try {
62
+ await bundleId.updateBundleIdCapabilityAsync(modifiedRequest);
63
+ }
64
+ catch (error) {
65
+ if (error.message.match(/bundle '[\w\d]+' cannot be deleted. Delete all the Apps/)) {
66
+ log_1.default.error('Failed to patch capabilities:', (0, util_1.inspect)(modifiedRequest, { depth: null, colors: true }));
67
+ throw new Error(`Unexpected error occurred while attempting to update capabilities for app "${bundleId.attributes.identifier}".\nCapabilities can be modified manually in the Apple developer console at https://developer.apple.com/account/resources/identifiers/bundleId/edit/${bundleId.id}.\nAuto capability syncing can be disabled with the environment variable \`EXPO_NO_CAPABILITY_SYNC=1\`.\n${error.message}`);
68
+ }
69
+ }
60
70
  }
61
71
  return { enabled: enabledCapabilityNames, disabled: disabledCapabilityNames };
62
72
  }
@@ -1239,7 +1239,8 @@ export declare type WebhookFilter = {
1239
1239
  event?: Maybe<WebhookType>;
1240
1240
  };
1241
1241
  export declare enum WebhookType {
1242
- Build = "BUILD"
1242
+ Build = "BUILD",
1243
+ Submit = "SUBMIT"
1243
1244
  }
1244
1245
  export declare type Webhook = {
1245
1246
  __typename?: 'Webhook';
@@ -176,6 +176,7 @@ var AndroidKeystoreType;
176
176
  var WebhookType;
177
177
  (function (WebhookType) {
178
178
  WebhookType["Build"] = "BUILD";
179
+ WebhookType["Submit"] = "SUBMIT";
179
180
  })(WebhookType = exports.WebhookType || (exports.WebhookType = {}));
180
181
  var AppsFilter;
181
182
  (function (AppsFilter) {
@@ -88,6 +88,7 @@ class AndroidSubmitCommand {
88
88
  }
89
89
  }
90
90
  async resolveServiceAccountSourceAsync() {
91
+ var _a;
91
92
  const { serviceAccountKeyPath } = this.ctx.profile;
92
93
  if (serviceAccountKeyPath) {
93
94
  return (0, results_1.result)({
@@ -95,7 +96,7 @@ class AndroidSubmitCommand {
95
96
  path: serviceAccountKeyPath,
96
97
  });
97
98
  }
98
- let androidApplicationIdentifier = this.ctx.profile.applicationId;
99
+ let androidApplicationIdentifier = (_a = this.ctx.applicationIdentifierOverride) !== null && _a !== void 0 ? _a : this.ctx.profile.applicationId;
99
100
  if (!androidApplicationIdentifier) {
100
101
  const androidApplicationIdentifierResult = await this.maybeGetAndroidPackageFromCurrentProjectAsync();
101
102
  if (!androidApplicationIdentifierResult.ok) {
@@ -17,6 +17,7 @@ export interface SubmissionContext<T extends Platform> {
17
17
  projectId: string;
18
18
  projectName: string;
19
19
  user: Actor;
20
+ applicationIdentifierOverride?: string;
20
21
  }
21
22
  export interface SubmitArchiveFlags {
22
23
  latest?: boolean;
@@ -33,4 +34,5 @@ export declare function createSubmissionContextAsync<T extends Platform>(params:
33
34
  profile: SubmitProfile<T>;
34
35
  projectDir: string;
35
36
  projectId: string;
37
+ applicationIdentifier?: string;
36
38
  }): Promise<SubmissionContext<T>>;
@@ -10,7 +10,7 @@ const Account_1 = require("../user/Account");
10
10
  const actions_1 = require("../user/actions");
11
11
  async function createSubmissionContextAsync(params) {
12
12
  var _a;
13
- const { projectDir, nonInteractive } = params;
13
+ const { applicationIdentifier, projectDir, nonInteractive } = params;
14
14
  const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: params.env });
15
15
  const { env, ...rest } = params;
16
16
  const user = await (0, actions_1.ensureLoggedInAsync)();
@@ -37,6 +37,7 @@ async function createSubmissionContextAsync(params) {
37
37
  projectName,
38
38
  user,
39
39
  trackingCtx,
40
+ applicationIdentifierOverride: applicationIdentifier,
40
41
  };
41
42
  }
42
43
  exports.createSubmissionContextAsync = createSubmissionContextAsync;
@@ -82,6 +82,7 @@ class IosSubmitCommand {
82
82
  }
83
83
  }
84
84
  async resolveCredentialSubmissionOptionsAsync() {
85
+ var _a;
85
86
  const ascApiKeySource = this.resolveAscApiKeySource();
86
87
  const shouldSkipAscApiKeySource = !ascApiKeySource.ok && ascApiKeySource.enforceError() instanceof errors_1.MissingCredentialsError;
87
88
  if (!shouldSkipAscApiKeySource) {
@@ -93,7 +94,7 @@ class IosSubmitCommand {
93
94
  if (!shouldSkipAppSpecificPasswordSource) {
94
95
  return { appSpecificPasswordSource: this.resolveAppSpecificPasswordSource() };
95
96
  }
96
- let bundleIdentifier = this.ctx.profile.bundleIdentifier;
97
+ let bundleIdentifier = (_a = this.ctx.applicationIdentifierOverride) !== null && _a !== void 0 ? _a : this.ctx.profile.bundleIdentifier;
97
98
  if (!bundleIdentifier) {
98
99
  const bundleIdentifierResult = await this.maybeGetIosBundleIdentifierAsync();
99
100
  if (!bundleIdentifierResult.ok) {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isGitCaseSensitiveAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"));
6
+ const errors_1 = require("@oclif/errors");
6
7
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
8
  const log_1 = (0, tslib_1.__importStar)(require("../../log"));
8
9
  const ora_1 = require("../../ora");
@@ -12,7 +13,9 @@ const vcs_1 = require("../vcs");
12
13
  class GitClient extends vcs_1.Client {
13
14
  async ensureRepoExistsAsync() {
14
15
  if (!(await (0, git_1.isGitInstalledAsync)())) {
15
- throw new Error('git command not found, install it before proceeding');
16
+ 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).`);
17
+ log_1.default.error((0, log_1.learnMore)('https://expo.fyi/eas-vcs-workflow'));
18
+ (0, errors_1.exit)(1);
16
19
  }
17
20
  if (await (0, git_1.doesGitRepoExistAsync)()) {
18
21
  return;
@@ -1,6 +1,6 @@
1
1
  import { WebhookFragment, WebhookInput, WebhookType } from '../graphql/generated';
2
- export declare function prepareInputParamsAsync({ event, url: maybeUrl, secret: maybeSecret, }: {
3
- event: WebhookType;
2
+ export declare function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secret: maybeSecret, }: {
3
+ event?: WebhookType;
4
4
  url?: string;
5
5
  secret?: string;
6
6
  }, existingWebhook?: WebhookFragment): Promise<WebhookInput>;
@@ -4,11 +4,28 @@ exports.validateSecret = exports.validateURL = exports.prepareInputParamsAsync =
4
4
  const tslib_1 = require("tslib");
5
5
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
6
6
  const url_1 = require("url");
7
+ const generated_1 = require("../graphql/generated");
7
8
  const log_1 = (0, tslib_1.__importDefault)(require("../log"));
8
9
  const prompts_1 = require("../prompts");
9
- async function prepareInputParamsAsync({ event, url: maybeUrl, secret: maybeSecret, }, existingWebhook) {
10
+ async function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secret: maybeSecret, }, existingWebhook) {
11
+ let event = maybeEvent;
10
12
  let url = maybeUrl;
11
13
  let secret = maybeSecret;
14
+ if (!event) {
15
+ const choices = [
16
+ { title: 'Build', value: generated_1.WebhookType.Build },
17
+ { title: 'Submit', value: generated_1.WebhookType.Submit },
18
+ ];
19
+ ({ event } = await (0, prompts_1.promptAsync)({
20
+ type: 'select',
21
+ name: 'event',
22
+ message: 'Webhook event type:',
23
+ choices,
24
+ initial: (existingWebhook === null || existingWebhook === void 0 ? void 0 : existingWebhook.event)
25
+ ? choices.findIndex(choice => choice.value === existingWebhook.event)
26
+ : undefined,
27
+ }));
28
+ }
12
29
  if (!url || !validateURL(url)) {
13
30
  const urlValidationMessage = 'The provided webhook URL is invalid and must be an absolute URL, including a scheme.';
14
31
  if (url && !validateURL(url)) {
@@ -35,7 +52,7 @@ async function prepareInputParamsAsync({ event, url: maybeUrl, secret: maybeSecr
35
52
  }));
36
53
  }
37
54
  return {
38
- event,
55
+ event: (0, nullthrows_1.default)(event),
39
56
  url: (0, nullthrows_1.default)(url),
40
57
  secret: (0, nullthrows_1.default)(secret),
41
58
  };