eas-cli 0.43.0 → 0.44.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 (39) hide show
  1. package/README.md +825 -0
  2. package/build/build/android/UpdatesModule.d.ts +0 -1
  3. package/build/build/android/UpdatesModule.js +4 -37
  4. package/build/build/android/build.js +3 -3
  5. package/build/build/android/{configure.d.ts → syncProjectConfiguration.d.ts} +2 -3
  6. package/build/build/android/{configure.js → syncProjectConfiguration.js} +22 -23
  7. package/build/build/build.d.ts +1 -1
  8. package/build/build/build.js +6 -8
  9. package/build/build/configure.d.ts +12 -7
  10. package/build/build/configure.js +25 -99
  11. package/build/build/context.d.ts +0 -12
  12. package/build/build/createContext.d.ts +1 -2
  13. package/build/build/createContext.js +1 -2
  14. package/build/build/ios/UpdatesModule.d.ts +0 -1
  15. package/build/build/ios/UpdatesModule.js +8 -39
  16. package/build/build/ios/build.js +3 -3
  17. package/build/build/ios/{configure.d.ts → syncProjectConfiguration.d.ts} +1 -3
  18. package/build/build/ios/{configure.js → syncProjectConfiguration.js} +3 -18
  19. package/build/build/local.d.ts +1 -0
  20. package/build/build/local.js +2 -1
  21. package/build/build/runBuildAndSubmit.d.ts +0 -1
  22. package/build/build/runBuildAndSubmit.js +4 -2
  23. package/build/commands/branch/view.d.ts +0 -2
  24. package/build/commands/branch/view.js +2 -46
  25. package/build/commands/build/configure.js +35 -25
  26. package/build/commands/build/index.d.ts +1 -0
  27. package/build/commands/build/index.js +12 -2
  28. package/build/commands/build/inspect.js +0 -1
  29. package/build/commands/update/index.js +2 -2
  30. package/build/commands/update/list.d.ts +10 -0
  31. package/build/commands/update/list.js +114 -0
  32. package/build/credentials/ios/appstore/bundleIdCapabilities.js +0 -2
  33. package/build/credentials/ios/appstore/ensureAppExists.js +3 -1
  34. package/build/graphql/generated.d.ts +59 -30
  35. package/build/graphql/queries/UpdateQuery.d.ts +7 -0
  36. package/build/graphql/queries/UpdateQuery.js +85 -0
  37. package/build/vcs/local.js +5 -1
  38. package/oclif.manifest.json +1 -1
  39. package/package.json +4 -4
@@ -2,7 +2,6 @@ import { RequestedPlatform } from '../platform';
2
2
  import { LocalBuildOptions } from './local';
3
3
  export interface BuildFlags {
4
4
  requestedPlatform: RequestedPlatform;
5
- skipProjectConfiguration: boolean;
6
5
  profile?: string;
7
6
  nonInteractive: boolean;
8
7
  wait: boolean;
@@ -30,7 +30,10 @@ async function runBuildAndSubmitAsync(projectDir, flags) {
30
30
  var _a;
31
31
  await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
32
32
  await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
33
- await (0, configure_1.ensureProjectConfiguredAsync)(projectDir, flags.requestedPlatform);
33
+ await (0, configure_1.ensureProjectConfiguredAsync)({
34
+ projectDir,
35
+ nonInteractive: flags.nonInteractive,
36
+ });
34
37
  const platforms = (0, platform_1.toPlatforms)(flags.requestedPlatform);
35
38
  const buildProfiles = await (0, profiles_1.getProfilesAsync)({
36
39
  type: 'build',
@@ -111,7 +114,6 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
111
114
  nonInteractive: flags.nonInteractive,
112
115
  platform: buildProfile.platform,
113
116
  projectDir,
114
- skipProjectConfiguration: flags.skipProjectConfiguration,
115
117
  localBuildOptions: flags.localBuildOptions,
116
118
  });
117
119
  if (moreBuilds) {
@@ -1,6 +1,4 @@
1
1
  import EasCommand from '../../commandUtils/EasCommand';
2
- import { ViewBranchQuery, ViewBranchQueryVariables } from '../../graphql/generated';
3
- export declare function viewUpdateBranchAsync({ appId, name, }: Pick<ViewBranchQueryVariables, 'appId' | 'name'>): Promise<ViewBranchQuery>;
4
2
  export default class BranchView extends EasCommand {
5
3
  static description: string;
6
4
  static args: {
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.viewUpdateBranchAsync = void 0;
4
3
  const tslib_1 = require("tslib");
5
4
  const config_1 = require("@expo/config");
6
5
  const core_1 = require("@oclif/core");
7
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
7
  const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
9
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
10
8
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
11
- const client_1 = require("../../graphql/client");
9
+ const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
12
10
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
13
11
  const projectUtils_1 = require("../../project/projectUtils");
14
12
  const prompts_1 = require("../../prompts");
@@ -16,48 +14,6 @@ const utils_1 = require("../../update/utils");
16
14
  const groupBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/groupBy"));
17
15
  const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
18
16
  const json_1 = require("../../utils/json");
19
- const PAGE_LIMIT = 10000;
20
- async function viewUpdateBranchAsync({ appId, name, }) {
21
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
22
- .query((0, graphql_tag_1.default) `
23
- query ViewBranch($appId: String!, $name: String!, $limit: Int!) {
24
- app {
25
- byId(appId: $appId) {
26
- id
27
- updateBranchByName(name: $name) {
28
- id
29
- name
30
- updates(offset: 0, limit: $limit) {
31
- id
32
- group
33
- message
34
- createdAt
35
- runtimeVersion
36
- platform
37
- manifestFragment
38
- actor {
39
- id
40
- ... on User {
41
- username
42
- }
43
- ... on Robot {
44
- firstName
45
- }
46
- }
47
- }
48
- }
49
- }
50
- }
51
- }
52
- `, {
53
- appId,
54
- name,
55
- limit: PAGE_LIMIT,
56
- }, { additionalTypenames: ['UpdateBranch', 'Update'] })
57
- .toPromise());
58
- return data;
59
- }
60
- exports.viewUpdateBranchAsync = viewUpdateBranchAsync;
61
17
  class BranchView extends EasCommand_1.default {
62
18
  async runAsync() {
63
19
  let { args: { name }, flags: { json: jsonFlag }, } = await this.parse(BranchView);
@@ -79,7 +35,7 @@ class BranchView extends EasCommand_1.default {
79
35
  validate: value => (value ? true : validationMessage),
80
36
  }));
81
37
  }
82
- const { app } = await viewUpdateBranchAsync({
38
+ const { app } = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
83
39
  appId: projectId,
84
40
  name,
85
41
  });
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const config_1 = require("@expo/config");
4
5
  const core_1 = require("@oclif/core");
5
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
+ const UpdatesModule_1 = require("../../build/android/UpdatesModule");
8
+ const syncProjectConfiguration_1 = require("../../build/android/syncProjectConfiguration");
6
9
  const configure_1 = require("../../build/configure");
10
+ const UpdatesModule_2 = require("../../build/ios/UpdatesModule");
11
+ const updates_1 = require("../../build/utils/updates");
7
12
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
8
13
  const log_1 = (0, tslib_1.__importStar)(require("../../log"));
9
14
  const platform_1 = require("../../platform");
@@ -15,15 +20,38 @@ class BuildConfigure extends EasCommand_1.default {
15
20
  var _a;
16
21
  const { flags } = await this.parse(BuildConfigure);
17
22
  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.');
18
- log_1.default.newLine();
19
23
  await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
24
+ const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
25
+ const expoUpdatesIsInstalled = (0, updates_1.isExpoUpdatesInstalled)(projectDir);
20
26
  const platform = (_a = flags.platform) !== null && _a !== void 0 ? _a : (await promptForPlatformAsync());
21
- await (0, configure_1.configureAsync)({
22
- platform,
23
- projectDir: await (0, projectUtils_1.findProjectRootAsync)(),
24
- });
27
+ // clean up old Android configuration
28
+ if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
29
+ await (0, syncProjectConfiguration_1.cleanUpOldEasBuildGradleScriptAsync)(projectDir);
30
+ }
31
+ // ensure eas.json exists
25
32
  log_1.default.newLine();
26
- logSuccess(platform);
33
+ await (0, configure_1.ensureProjectConfiguredAsync)({
34
+ projectDir,
35
+ nonInteractive: false,
36
+ });
37
+ // configure expo-updates
38
+ if (expoUpdatesIsInstalled) {
39
+ const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
40
+ if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
41
+ await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
42
+ }
43
+ if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
44
+ await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, exp);
45
+ }
46
+ }
47
+ log_1.default.addNewLineIfNone();
48
+ log_1.default.log(`🎉 Your project is ready to build.
49
+
50
+ - Run ${chalk_1.default.bold('eas build')} when you are ready to create your first build.
51
+ - Once the build is completed, run ${chalk_1.default.bold('eas submit')} to upload the app to app stores.
52
+ - ${(0, log_1.learnMore)('https://docs.expo.dev/build/introduction', {
53
+ learnMoreMessage: 'Learn more about other capabilities of EAS Build',
54
+ })}`);
27
55
  }
28
56
  }
29
57
  exports.default = BuildConfigure;
@@ -35,26 +63,8 @@ BuildConfigure.flags = {
35
63
  options: ['android', 'ios', 'all'],
36
64
  }),
37
65
  };
38
- function logSuccess(platform) {
39
- let platformsText = 'iOS and Android projects are';
40
- let storesText = 'the Apple App Store or Google Play Store';
41
- if (platform === 'android') {
42
- platformsText = 'Android project is';
43
- storesText = 'the Google Play Store';
44
- }
45
- else if (platform === 'ios') {
46
- platformsText = 'iOS project is';
47
- storesText = 'the Apple App Store Connect';
48
- }
49
- log_1.default.log(`🎉 Your ${platformsText} ready to build.
50
-
51
- - Run ${chalk_1.default.bold('eas build')} when you are ready to create your first build.
52
- - Once the build is completed, run ${chalk_1.default.bold('eas submit')} to upload the app to ${storesText}
53
- - ${(0, log_1.learnMore)('https://docs.expo.dev/build/introduction', {
54
- learnMoreMessage: 'Learn more about other capabilities of EAS Build',
55
- })}`);
56
- }
57
66
  async function promptForPlatformAsync() {
67
+ log_1.default.addNewLineIfNone();
58
68
  const { platform } = await (0, prompts_1.promptAsync)({
59
69
  type: 'select',
60
70
  message: 'Which platforms would you like to configure for EAS Build?',
@@ -9,6 +9,7 @@ export default class Build extends EasCommand {
9
9
  profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
10
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
11
  local: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
13
  wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
14
  'clear-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
15
  'auto-submit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -7,6 +7,7 @@ const core_1 = require("@oclif/core");
7
7
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
8
  const figures_1 = (0, tslib_1.__importDefault)(require("figures"));
9
9
  const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
10
+ const path_1 = (0, tslib_1.__importDefault)(require("path"));
10
11
  const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
11
12
  const repository_1 = require("../../build/utils/repository");
12
13
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
@@ -32,6 +33,9 @@ class Build extends EasCommand_1.default {
32
33
  async sanitizeFlagsAsync(flags) {
33
34
  var _a;
34
35
  const nonInteractive = flags['non-interactive'];
36
+ if (!flags.local && flags.output) {
37
+ core_1.Errors.error('--output is allowed only for local builds', { exit: 1 });
38
+ }
35
39
  if (!flags.platform && nonInteractive) {
36
40
  core_1.Errors.error('--platform is required when building in non-interactive mode', { exit: 1 });
37
41
  }
@@ -60,11 +64,14 @@ class Build extends EasCommand_1.default {
60
64
  const profile = flags['profile'];
61
65
  return {
62
66
  requestedPlatform,
63
- skipProjectConfiguration: flags['skip-project-configuration'],
64
67
  profile,
65
68
  nonInteractive,
66
69
  localBuildOptions: flags['local']
67
- ? { enable: true, verbose: true }
70
+ ? {
71
+ enable: true,
72
+ verbose: true,
73
+ artifactPath: flags.output && path_1.default.resolve(process.cwd(), flags.output),
74
+ }
68
75
  : {
69
76
  enable: false,
70
77
  },
@@ -107,6 +114,9 @@ Build.flags = {
107
114
  default: false,
108
115
  description: 'Run build locally [experimental]',
109
116
  }),
117
+ output: core_1.Flags.string({
118
+ description: 'Output path for local build',
119
+ }),
110
120
  wait: core_1.Flags.boolean({
111
121
  default: true,
112
122
  allowNo: true,
@@ -43,7 +43,6 @@ class BuildInspect extends EasCommand_1.default {
43
43
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
44
44
  try {
45
45
  await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, {
46
- skipProjectConfiguration: false,
47
46
  nonInteractive: false,
48
47
  wait: true,
49
48
  clearCache: false,
@@ -14,6 +14,7 @@ const api_1 = require("../../api");
14
14
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
15
15
  const client_1 = require("../../graphql/client");
16
16
  const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
17
+ const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
17
18
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
18
19
  const ora_1 = require("../../ora");
19
20
  const projectUtils_1 = require("../../project/projectUtils");
@@ -27,7 +28,6 @@ const json_1 = require("../../utils/json");
27
28
  const vcs_1 = require("../../vcs");
28
29
  const create_1 = require("../branch/create");
29
30
  const list_1 = require("../branch/list");
30
- const view_1 = require("../branch/view");
31
31
  const create_2 = require("../channel/create");
32
32
  exports.defaultPublishPlatforms = ['android', 'ios'];
33
33
  async function getUpdateGroupAsync({ group, }) {
@@ -68,7 +68,7 @@ async function ensureChannelExistsAsync({ appId, branchId, channelName, }) {
68
68
  }
69
69
  }
70
70
  async function ensureBranchExistsAsync({ appId, name: branchName, }) {
71
- const { app } = await (0, view_1.viewUpdateBranchAsync)({
71
+ const { app } = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
72
72
  appId,
73
73
  name: branchName,
74
74
  });
@@ -0,0 +1,10 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ export default class BranchView extends EasCommand {
3
+ static description: string;
4
+ static flags: {
5
+ branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
6
+ all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ };
9
+ runAsync(): Promise<void>;
10
+ }
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const config_1 = require("@expo/config");
5
+ const core_1 = require("@oclif/core");
6
+ const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
7
+ const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
+ const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
9
+ const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
10
+ const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
11
+ const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
12
+ const projectUtils_1 = require("../../project/projectUtils");
13
+ const prompts_1 = require("../../prompts");
14
+ const utils_1 = require("../../update/utils");
15
+ const groupBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/groupBy"));
16
+ const json_1 = require("../../utils/json");
17
+ const vcs_1 = require("../../vcs");
18
+ class BranchView extends EasCommand_1.default {
19
+ async runAsync() {
20
+ var _a, _b;
21
+ const { flags: { branch: branchFlag, all, json: jsonFlag }, } = await this.parse(BranchView);
22
+ if (jsonFlag) {
23
+ (0, json_1.enableJsonOutput)();
24
+ }
25
+ const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
26
+ const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
27
+ const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
28
+ let updateGroupDescriptions;
29
+ if (all) {
30
+ const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewAllAsync({ appId: projectId });
31
+ updateGroupDescriptions = getUpdateGroupDescriptions(branchesAndUpdates.app.byId.updateBranches);
32
+ }
33
+ else {
34
+ let branchInteractive;
35
+ if (!branchFlag) {
36
+ const validationMessage = 'Branch name may not be empty.';
37
+ if (jsonFlag) {
38
+ throw new Error(validationMessage);
39
+ }
40
+ ({ name: branchInteractive } = await (0, prompts_1.promptAsync)({
41
+ type: 'text',
42
+ name: 'name',
43
+ message: 'Please enter the name of the branch whose updates you wish to view:',
44
+ initial: (_a = (await (0, vcs_1.getVcsClient)().getBranchNameAsync())) !== null && _a !== void 0 ? _a : undefined,
45
+ validate: (value) => (value ? true : validationMessage),
46
+ }));
47
+ }
48
+ const branch = branchFlag !== null && branchFlag !== void 0 ? branchFlag : branchInteractive;
49
+ (0, assert_1.default)(branch, 'Branch name may not be empty.');
50
+ const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
51
+ appId: projectId,
52
+ name: branch,
53
+ });
54
+ const UpdateBranch = (_b = branchesAndUpdates.app) === null || _b === void 0 ? void 0 : _b.byId.updateBranchByName;
55
+ if (!UpdateBranch) {
56
+ throw new Error(`Could not find branch "${branch}"`);
57
+ }
58
+ updateGroupDescriptions = getUpdateGroupDescriptions([UpdateBranch]);
59
+ }
60
+ if (jsonFlag) {
61
+ (0, json_1.printJsonOnlyOutput)(updateGroupDescriptions);
62
+ }
63
+ else {
64
+ logAsTable(updateGroupDescriptions);
65
+ }
66
+ }
67
+ }
68
+ exports.default = BranchView;
69
+ BranchView.description = 'View the recent updates for a branch';
70
+ BranchView.flags = {
71
+ branch: core_1.Flags.string({
72
+ description: 'List all updates on this branch',
73
+ exclusive: ['all'],
74
+ }),
75
+ all: core_1.Flags.boolean({
76
+ description: 'List all updates associated with this project',
77
+ exclusive: ['branch'],
78
+ default: false,
79
+ }),
80
+ json: core_1.Flags.boolean({
81
+ description: `Return a json with all of the recent update groups.`,
82
+ default: false,
83
+ }),
84
+ };
85
+ function getUpdateGroupDescriptions(branchesAndUpdates) {
86
+ const flattenedBranchesAndUpdates = branchesAndUpdates.flatMap(branch => branch.updates.map(update => {
87
+ return { branch: branch.name, ...update };
88
+ }));
89
+ const updateGroupDescriptions = Object.values((0, groupBy_1.default)(flattenedBranchesAndUpdates, update => update.group)).map(updateGroup => {
90
+ const platforms = updateGroup
91
+ .map(update => update.platform)
92
+ .sort()
93
+ .join(', ');
94
+ return { ...updateGroup[0], platforms };
95
+ });
96
+ updateGroupDescriptions.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
97
+ return updateGroupDescriptions;
98
+ }
99
+ function logAsTable(updateGroupDescriptions) {
100
+ const table = new cli_table3_1.default({
101
+ head: ['Branch', ...utils_1.UPDATE_COLUMNS],
102
+ wordWrap: true,
103
+ });
104
+ table.push(...updateGroupDescriptions.map(updateGroupDescription => [
105
+ updateGroupDescription.branch,
106
+ (0, utils_1.formatUpdate)(updateGroupDescription),
107
+ updateGroupDescription.runtimeVersion,
108
+ updateGroupDescription.group,
109
+ updateGroupDescription.platforms,
110
+ ]));
111
+ log_1.default.addNewLineIfNone();
112
+ log_1.default.log(chalk_1.default.bold('Recently published update groups:'));
113
+ log_1.default.log(table.toString());
114
+ }
@@ -126,10 +126,8 @@ function getCapabilitiesToDisable(bundleId, currentCapabilities, request) {
126
126
  // Disable any extras that aren't present, this functionality is kinda unreliable because managed apps
127
127
  // might be enabling capabilities in modifiers.
128
128
  for (const existingCapability of currentCapabilities) {
129
- // Special case APNS because it's always enabled in Expo,
130
129
  // GC and IAP are always enabled in apps by default so we should avoid modifying them.
131
130
  if (existingCapability.isType(apple_utils_1.CapabilityType.IN_APP_PURCHASE) ||
132
- existingCapability.isType(apple_utils_1.CapabilityType.PUSH_NOTIFICATIONS) ||
133
131
  existingCapability.isType(apple_utils_1.CapabilityType.GAME_CENTER)) {
134
132
  continue;
135
133
  }
@@ -41,7 +41,9 @@ async function ensureBundleIdExistsWithNameAsync(authCtx, { name, bundleIdentifi
41
41
  else {
42
42
  spinner.fail(`Failed to register bundle identifier ${chalk_1.default.dim(bundleIdentifier)}`);
43
43
  // Assert contract errors for easier resolution when the user has an expired developer account.
44
- if (err.message.match(/forbidden for security reasons/)) {
44
+ if (err.message.match(/forbidden for security reasons/) ||
45
+ // Unable to process request - PLA Update available - You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.
46
+ err.message.match(/agree/)) {
45
47
  await (0, contractMessages_1.assertContractMessagesAsync)(context);
46
48
  }
47
49
  }
@@ -3094,36 +3094,6 @@ export declare type EditUpdateBranchMutation = ({
3094
3094
  } & Pick<UpdateBranch, 'id' | 'name'>);
3095
3095
  });
3096
3096
  });
3097
- export declare type ViewBranchQueryVariables = Exact<{
3098
- appId: Scalars['String'];
3099
- name: Scalars['String'];
3100
- limit: Scalars['Int'];
3101
- }>;
3102
- export declare type ViewBranchQuery = ({
3103
- __typename?: 'RootQuery';
3104
- } & {
3105
- app: ({
3106
- __typename?: 'AppQuery';
3107
- } & {
3108
- byId: ({
3109
- __typename?: 'App';
3110
- } & Pick<App, 'id'> & {
3111
- updateBranchByName?: Maybe<({
3112
- __typename?: 'UpdateBranch';
3113
- } & Pick<UpdateBranch, 'id' | 'name'> & {
3114
- updates: Array<({
3115
- __typename?: 'Update';
3116
- } & Pick<Update, 'id' | 'group' | 'message' | 'createdAt' | 'runtimeVersion' | 'platform' | 'manifestFragment'> & {
3117
- actor?: Maybe<({
3118
- __typename?: 'User';
3119
- } & Pick<User, 'username' | 'id'>) | ({
3120
- __typename?: 'Robot';
3121
- } & Pick<Robot, 'firstName' | 'id'>)>;
3122
- })>;
3123
- })>;
3124
- });
3125
- });
3126
- });
3127
3097
  export declare type CancelBuildMutationVariables = Exact<{
3128
3098
  buildId: Scalars['ID'];
3129
3099
  }>;
@@ -4550,6 +4520,65 @@ export declare type GetAllSubmissionsForAppQuery = ({
4550
4520
  });
4551
4521
  });
4552
4522
  });
4523
+ export declare type ViewAllUpdatesQueryVariables = Exact<{
4524
+ appId: Scalars['String'];
4525
+ limit: Scalars['Int'];
4526
+ }>;
4527
+ export declare type ViewAllUpdatesQuery = ({
4528
+ __typename?: 'RootQuery';
4529
+ } & {
4530
+ app: ({
4531
+ __typename?: 'AppQuery';
4532
+ } & {
4533
+ byId: ({
4534
+ __typename?: 'App';
4535
+ } & Pick<App, 'id'> & {
4536
+ updateBranches: Array<({
4537
+ __typename?: 'UpdateBranch';
4538
+ } & Pick<UpdateBranch, 'id' | 'name'> & {
4539
+ updates: Array<({
4540
+ __typename?: 'Update';
4541
+ } & Pick<Update, 'id' | 'group' | 'message' | 'createdAt' | 'runtimeVersion' | 'platform'> & {
4542
+ actor?: Maybe<({
4543
+ __typename?: 'User';
4544
+ } & Pick<User, 'username' | 'id'>) | ({
4545
+ __typename?: 'Robot';
4546
+ } & Pick<Robot, 'firstName' | 'id'>)>;
4547
+ })>;
4548
+ })>;
4549
+ });
4550
+ });
4551
+ });
4552
+ export declare type ViewBranchUpdatesQueryVariables = Exact<{
4553
+ appId: Scalars['String'];
4554
+ name: Scalars['String'];
4555
+ limit: Scalars['Int'];
4556
+ }>;
4557
+ export declare type ViewBranchUpdatesQuery = ({
4558
+ __typename?: 'RootQuery';
4559
+ } & {
4560
+ app: ({
4561
+ __typename?: 'AppQuery';
4562
+ } & {
4563
+ byId: ({
4564
+ __typename?: 'App';
4565
+ } & Pick<App, 'id'> & {
4566
+ updateBranchByName?: Maybe<({
4567
+ __typename?: 'UpdateBranch';
4568
+ } & Pick<UpdateBranch, 'id' | 'name'> & {
4569
+ updates: Array<({
4570
+ __typename?: 'Update';
4571
+ } & Pick<Update, 'id' | 'group' | 'message' | 'createdAt' | 'runtimeVersion' | 'platform' | 'manifestFragment'> & {
4572
+ actor?: Maybe<({
4573
+ __typename?: 'User';
4574
+ } & Pick<User, 'username' | 'id'>) | ({
4575
+ __typename?: 'Robot';
4576
+ } & Pick<Robot, 'firstName' | 'id'>)>;
4577
+ })>;
4578
+ })>;
4579
+ });
4580
+ });
4581
+ });
4553
4582
  export declare type CurrentUserQueryVariables = Exact<{
4554
4583
  [key: string]: never;
4555
4584
  }>;
@@ -0,0 +1,7 @@
1
+ import { ViewAllUpdatesQuery, ViewBranchUpdatesQuery, ViewBranchUpdatesQueryVariables } from '../generated';
2
+ export declare const UpdateQuery: {
3
+ viewAllAsync({ appId }: {
4
+ appId: string;
5
+ }): Promise<ViewAllUpdatesQuery>;
6
+ viewBranchAsync({ appId, name }: Pick<ViewBranchUpdatesQueryVariables, 'appId' | 'name'>): Promise<ViewBranchUpdatesQuery>;
7
+ };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
6
+ const client_1 = require("../client");
7
+ const PAGE_LIMIT = 10000;
8
+ exports.UpdateQuery = {
9
+ async viewAllAsync({ appId }) {
10
+ return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ .query((0, graphql_tag_1.default) `
12
+ query ViewAllUpdates($appId: String!, $limit: Int!) {
13
+ app {
14
+ byId(appId: $appId) {
15
+ id
16
+ updateBranches(offset: 0, limit: $limit) {
17
+ id
18
+ name
19
+ updates(offset: 0, limit: $limit) {
20
+ id
21
+ group
22
+ message
23
+ createdAt
24
+ runtimeVersion
25
+ platform
26
+ actor {
27
+ id
28
+ ... on User {
29
+ username
30
+ }
31
+ ... on Robot {
32
+ firstName
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `, {
41
+ appId,
42
+ limit: PAGE_LIMIT,
43
+ }, { additionalTypenames: ['UpdateBranch', 'Update'] })
44
+ .toPromise());
45
+ },
46
+ async viewBranchAsync({ appId, name }) {
47
+ return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
48
+ .query((0, graphql_tag_1.default) `
49
+ query ViewBranchUpdates($appId: String!, $name: String!, $limit: Int!) {
50
+ app {
51
+ byId(appId: $appId) {
52
+ id
53
+ updateBranchByName(name: $name) {
54
+ id
55
+ name
56
+ updates(offset: 0, limit: $limit) {
57
+ id
58
+ group
59
+ message
60
+ createdAt
61
+ runtimeVersion
62
+ platform
63
+ manifestFragment
64
+ actor {
65
+ id
66
+ ... on User {
67
+ username
68
+ }
69
+ ... on Robot {
70
+ firstName
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ `, {
79
+ appId,
80
+ name,
81
+ limit: PAGE_LIMIT,
82
+ }, { additionalTypenames: ['UpdateBranch', 'Update'] })
83
+ .toPromise());
84
+ },
85
+ };
@@ -45,7 +45,11 @@ class Ignore {
45
45
  ];
46
46
  return;
47
47
  }
48
- const ignoreFilePaths = (await (0, fast_glob_1.default)(`**/${GITIGNORE_FILENAME}`, { cwd: this.rootDir, ignore: ['node_modules'] }))
48
+ const ignoreFilePaths = (await (0, fast_glob_1.default)(`**/${GITIGNORE_FILENAME}`, {
49
+ cwd: this.rootDir,
50
+ ignore: ['node_modules'],
51
+ followSymbolicLinks: false,
52
+ }))
49
53
  // ensure that parent dir is before child directories
50
54
  .sort((a, b) => a.length - b.length && a.localeCompare(b));
51
55
  const ignoreMapping = await Promise.all(ignoreFilePaths.map(async (filePath) => {