eas-cli 3.18.3 → 4.0.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 (44) hide show
  1. package/README.md +72 -64
  2. package/build/channel/utils.d.ts +0 -10
  3. package/build/channel/utils.js +1 -60
  4. package/build/commands/channel/rollout.d.ts +14 -2
  5. package/build/commands/channel/rollout.js +106 -270
  6. package/build/commands/update/republish.js +6 -6
  7. package/build/devices/actions/create/action.d.ts +2 -1
  8. package/build/devices/actions/create/action.js +10 -1
  9. package/build/devices/actions/create/currentMachineMethod.d.ts +3 -0
  10. package/build/devices/actions/create/currentMachineMethod.js +100 -0
  11. package/build/devices/actions/create/developerPortalMethod.js +2 -1
  12. package/build/devices/actions/create/inputMethod.d.ts +0 -1
  13. package/build/devices/actions/create/inputMethod.js +6 -64
  14. package/build/devices/actions/create/utils.d.ts +10 -0
  15. package/build/devices/actions/create/utils.js +73 -0
  16. package/build/devices/manager.js +3 -3
  17. package/build/devices/utils/errors.d.ts +3 -0
  18. package/build/devices/utils/errors.js +7 -1
  19. package/build/devices/utils/formatDevice.js +1 -0
  20. package/build/graphql/generated.d.ts +5 -4
  21. package/build/graphql/generated.js +1 -0
  22. package/build/graphql/types/credentials/AppleDevice.js +1 -0
  23. package/build/rollout/actions/CreateRollout.d.ts +2 -0
  24. package/build/rollout/actions/CreateRollout.js +79 -5
  25. package/build/rollout/actions/EditRollout.js +5 -2
  26. package/build/rollout/actions/EndRollout.d.ts +6 -3
  27. package/build/rollout/actions/EndRollout.js +22 -21
  28. package/build/rollout/actions/ManageRollout.d.ts +3 -3
  29. package/build/rollout/actions/ManageRollout.js +1 -1
  30. package/build/rollout/actions/NonInteractiveRollout.d.ts +6 -4
  31. package/build/rollout/actions/NonInteractiveRollout.js +1 -1
  32. package/build/rollout/actions/RolloutMainMenu.d.ts +4 -4
  33. package/build/rollout/actions/RolloutMainMenu.js +14 -5
  34. package/build/rollout/actions/SelectRuntime.d.ts +4 -7
  35. package/build/rollout/actions/SelectRuntime.js +22 -39
  36. package/build/rollout/branch-mapping.js +2 -2
  37. package/build/rollout/utils.d.ts +1 -1
  38. package/build/rollout/utils.js +5 -5
  39. package/build/update/republish.js +6 -6
  40. package/build/utils/relay.js +3 -9
  41. package/oclif.manifest.json +1 -1
  42. package/package.json +3 -3
  43. package/build/commands/channel/rollout-preview.d.ts +0 -32
  44. package/build/commands/channel/rollout-preview.js +0 -140
@@ -1,18 +1,20 @@
1
1
  import { EASUpdateAction, EASUpdateContext } from '../../eas-update/utils';
2
2
  import { UpdateChannelBasicInfoFragment } from '../../graphql/generated';
3
+ import { CodeSigningInfo } from '../../utils/code-signing';
3
4
  import { NonInteractiveOptions as CreateRolloutNonInteractiveOptions } from './CreateRollout';
4
5
  import { NonInteractiveOptions as EditRolloutNonInteractiveOptions } from './EditRollout';
5
- import { NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
6
+ import { GeneralOptions as EndRolloutGeneralOptions, NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
6
7
  import { RolloutActions } from './RolloutMainMenu';
7
8
  /**
8
9
  * Control a rollout in non interactive mode.
9
10
  */
10
11
  export declare class NonInteractiveRollout implements EASUpdateAction<void> {
11
12
  private options;
12
- constructor(options?: {
13
+ constructor(options: {
13
14
  channelName?: string;
15
+ codeSigningInfo?: CodeSigningInfo;
14
16
  action?: RolloutActions;
15
- } & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & Partial<CreateRolloutNonInteractiveOptions>);
17
+ } & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & EndRolloutGeneralOptions & Partial<CreateRolloutNonInteractiveOptions>);
16
18
  runAsync(ctx: EASUpdateContext): Promise<void>;
17
- runActionAsync(ctx: EASUpdateContext, action: RolloutActions, channelInfo: UpdateChannelBasicInfoFragment, options: Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & Partial<CreateRolloutNonInteractiveOptions>): Promise<UpdateChannelBasicInfoFragment>;
19
+ runActionAsync(ctx: EASUpdateContext, action: RolloutActions, channelInfo: UpdateChannelBasicInfoFragment, options: Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & EndRolloutGeneralOptions & Partial<CreateRolloutNonInteractiveOptions>): Promise<UpdateChannelBasicInfoFragment>;
18
20
  }
@@ -11,7 +11,7 @@ const RolloutMainMenu_1 = require("./RolloutMainMenu");
11
11
  * Control a rollout in non interactive mode.
12
12
  */
13
13
  class NonInteractiveRollout {
14
- constructor(options = {}) {
14
+ constructor(options) {
15
15
  this.options = options;
16
16
  }
17
17
  async runAsync(ctx) {
@@ -2,7 +2,7 @@ import { EASUpdateAction, EASUpdateContext } from '../../eas-update/utils';
2
2
  import { UpdateChannelBasicInfoFragment } from '../../graphql/generated';
3
3
  import { NonInteractiveOptions as CreateRolloutNonInteractiveOptions } from './CreateRollout';
4
4
  import { NonInteractiveOptions as EditRolloutNonInteractiveOptions } from './EditRollout';
5
- import { NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
5
+ import { GeneralOptions as EndRolloutGeneralOptions, NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
6
6
  import { ManageRolloutActions } from './ManageRollout';
7
7
  export declare enum MainMenuActions {
8
8
  CREATE_NEW = "Create a new rollout",
@@ -14,14 +14,14 @@ export type RolloutActions = MainMenuActions.CREATE_NEW | ManageRolloutActions.E
14
14
  */
15
15
  export declare class RolloutMainMenu implements EASUpdateAction<void> {
16
16
  private options;
17
- constructor(options?: {
17
+ constructor(options: {
18
18
  channelName?: string;
19
19
  action?: RolloutActions;
20
- } & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & Partial<CreateRolloutNonInteractiveOptions>);
20
+ } & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & EndRolloutGeneralOptions & Partial<CreateRolloutNonInteractiveOptions>);
21
21
  runAsync(ctx: EASUpdateContext): Promise<void>;
22
22
  runActionAsync(ctx: EASUpdateContext, menuAction: MainMenuActions): Promise<null>;
23
23
  selectRolloutAsync(ctx: EASUpdateContext): Promise<UpdateChannelBasicInfoFragment | null>;
24
- selectChannelAsync(ctx: EASUpdateContext, filterPredicate?: (channelInfo: UpdateChannelBasicInfoFragment) => boolean): Promise<UpdateChannelBasicInfoFragment>;
24
+ selectChannelToRolloutAsync(ctx: EASUpdateContext): Promise<UpdateChannelBasicInfoFragment>;
25
25
  resolveChannelNameAsync(ctx: EASUpdateContext, channelName: string): Promise<UpdateChannelBasicInfoFragment>;
26
26
  toMainMenuAction(action: RolloutActions): MainMenuActions;
27
27
  promptMenuActionAsync(): Promise<MainMenuActions>;
@@ -20,7 +20,7 @@ var MainMenuActions;
20
20
  * Manage a rollout for the project.
21
21
  */
22
22
  class RolloutMainMenu {
23
- constructor(options = {}) {
23
+ constructor(options) {
24
24
  this.options = options;
25
25
  }
26
26
  async runAsync(ctx) {
@@ -38,7 +38,7 @@ class RolloutMainMenu {
38
38
  case MainMenuActions.CREATE_NEW: {
39
39
  const channelInfo = channelName
40
40
  ? await this.resolveChannelNameAsync(ctx, channelName)
41
- : await this.selectChannelAsync(ctx, channelInfo => !(0, branch_mapping_1.isRollout)(channelInfo));
41
+ : await this.selectChannelToRolloutAsync(ctx);
42
42
  await new CreateRollout_1.CreateRollout(channelInfo, this.options).runAsync(ctx);
43
43
  return null;
44
44
  }
@@ -67,11 +67,20 @@ class RolloutMainMenu {
67
67
  const channelInfo = await selectRollout.runAsync(ctx);
68
68
  return channelInfo;
69
69
  }
70
- async selectChannelAsync(ctx, filterPredicate) {
71
- const selectChannelAction = new SelectChannel_1.SelectChannel({ filterPredicate });
70
+ async selectChannelToRolloutAsync(ctx) {
71
+ let hasSomeChannel = false;
72
+ const selectChannelAction = new SelectChannel_1.SelectChannel({
73
+ filterPredicate: (channelInfo) => {
74
+ hasSomeChannel = true;
75
+ return !(0, branch_mapping_1.isRollout)(channelInfo);
76
+ },
77
+ });
72
78
  const channelInfo = await selectChannelAction.runAsync(ctx);
73
79
  if (!channelInfo) {
74
- throw new Error(`You dont have any channels. Create one with <TODO>`);
80
+ const error = hasSomeChannel
81
+ ? new Error('All your channels are already part of a rollout.')
82
+ : new Error(`You dont have any channels. Create one with \`eas channel:create\``);
83
+ throw error;
75
84
  }
76
85
  return channelInfo;
77
86
  }
@@ -5,7 +5,7 @@ import { Connection } from '../../utils/relay';
5
5
  /**
6
6
  * Select a runtime from a branch
7
7
  */
8
- export declare class SelectRuntime implements EASUpdateAction<string> {
8
+ export declare class SelectRuntime implements EASUpdateAction<string | null> {
9
9
  private branchInfo;
10
10
  private options;
11
11
  private printedType;
@@ -14,23 +14,20 @@ export declare class SelectRuntime implements EASUpdateAction<string> {
14
14
  });
15
15
  warnNoRuntime(): void;
16
16
  formatCantFindRuntime(): string;
17
- runAsync(ctx: EASUpdateContext): Promise<string>;
17
+ runAsync(ctx: EASUpdateContext): Promise<string | null>;
18
18
  getNewestRuntimeAsync(graphqlClient: ExpoGraphqlClient, { appId, branchName, anotherBranchIdToIntersectRuntimesBy, }: {
19
19
  appId: string;
20
20
  branchName: string;
21
21
  anotherBranchIdToIntersectRuntimesBy?: string;
22
- }): Promise<Connection<RuntimeFragment> | null>;
22
+ }): Promise<Connection<RuntimeFragment>>;
23
23
  displayLatestUpdateGroupAsync({ graphqlClient, appId, branchName, runtime, }: {
24
24
  graphqlClient: ExpoGraphqlClient;
25
25
  appId: string;
26
26
  branchName: string;
27
27
  runtime: RuntimeFragment;
28
28
  }): Promise<string>;
29
- selectRuntimesAsync(graphqlClient: ExpoGraphqlClient, { appId, branchName, anotherBranchIdToIntersectRuntimesBy, batchSize, }: {
29
+ selectRuntimesAsync(graphqlClient: ExpoGraphqlClient, { appId, batchSize, }: {
30
30
  appId: string;
31
- branchName: string;
32
- anotherBranchIdToIntersectRuntimesBy?: string;
33
31
  batchSize?: number;
34
32
  }): Promise<RuntimeFragment | null>;
35
- promptForRuntimeAsync(): Promise<string>;
36
33
  }
@@ -11,12 +11,6 @@ const log_1 = tslib_1.__importStar(require("../../log"));
11
11
  const prompts_1 = require("../../prompts");
12
12
  const relay_1 = require("../../utils/relay");
13
13
  const utils_2 = require("../utils");
14
- function beginSentence(phrase) {
15
- if (typeof phrase !== 'string' || phrase.length === 0) {
16
- return phrase; // Return the input without any modification if it's not a string or empty
17
- }
18
- return phrase.charAt(0).toUpperCase() + phrase.slice(1);
19
- }
20
14
  /**
21
15
  * Select a runtime from a branch
22
16
  */
@@ -32,8 +26,7 @@ class SelectRuntime {
32
26
  if (this.options.anotherBranchToIntersectRuntimesBy) {
33
27
  const intersectBranchName = this.options.anotherBranchToIntersectRuntimesBy.name;
34
28
  log_1.default.warn(`⚠️ Branches ${this.branchInfo.name} and ${intersectBranchName} dont have any updates with the same runtime.`);
35
- // TODO(quin): write a learn more
36
- log_1.default.warn(`Your updates could be misconfigured. ${(0, log_1.learnMore)('https://expo.fyi/todo')}`);
29
+ log_1.default.warn(`Your updates could be misconfigured. ${(0, log_1.learnMore)('https://expo.fyi/eas-update-rollouts')}`);
37
30
  }
38
31
  else {
39
32
  // no runtime on branch means no updates published on branch
@@ -41,10 +34,10 @@ class SelectRuntime {
41
34
  }
42
35
  }
43
36
  formatCantFindRuntime() {
44
- return `🕵️ Not finding the update you were looking for? ${(0, log_1.learnMore)('https://expo.fyi/todo')}`;
37
+ return `🕵️ Not finding the update you were looking for? ${(0, log_1.learnMore)('https://expo.fyi/eas-update-rollouts')}`;
45
38
  }
46
39
  async runAsync(ctx) {
47
- var _a, _b;
40
+ var _a;
48
41
  const { nonInteractive, graphqlClient, app } = ctx;
49
42
  const { projectId } = app;
50
43
  if (nonInteractive) {
@@ -55,14 +48,14 @@ class SelectRuntime {
55
48
  branchName: this.branchInfo.name,
56
49
  anotherBranchIdToIntersectRuntimesBy: (_a = this.options.anotherBranchToIntersectRuntimesBy) === null || _a === void 0 ? void 0 : _a.id,
57
50
  });
58
- if (!newestRuntimeConnection) {
51
+ if (newestRuntimeConnection.edges.length === 0) {
59
52
  log_1.default.addNewLineIfNone();
60
53
  this.warnNoRuntime();
61
- return await this.promptForRuntimeAsync();
54
+ return null;
62
55
  }
63
- const moreThanOneRuntime = newestRuntimeConnection.edges.length > 1;
64
- log_1.default.log(`✅ ${beginSentence(this.printedType)}${moreThanOneRuntime ? 's' : ''} detected`);
65
- if (!moreThanOneRuntime) {
56
+ const onlyOneRuntime = newestRuntimeConnection.edges.length === 1 && !newestRuntimeConnection.pageInfo.hasNextPage;
57
+ log_1.default.log(`✅ ${beginSentence(this.printedType)}${onlyOneRuntime ? '' : 's'} detected`);
58
+ if (onlyOneRuntime) {
66
59
  const runtime = newestRuntimeConnection.edges[0].node;
67
60
  const formattedRuntimeWithGroup = await this.displayLatestUpdateGroupAsync({
68
61
  graphqlClient,
@@ -82,14 +75,12 @@ class SelectRuntime {
82
75
  else {
83
76
  log_1.default.newLine();
84
77
  log_1.default.warn(this.formatCantFindRuntime());
85
- return await this.promptForRuntimeAsync();
78
+ return null;
86
79
  }
87
80
  }
88
81
  log_1.default.log(this.formatCantFindRuntime());
89
82
  const selectedRuntime = await this.selectRuntimesAsync(graphqlClient, {
90
83
  appId: projectId,
91
- branchName: this.branchInfo.name,
92
- anotherBranchIdToIntersectRuntimesBy: (_b = this.options.anotherBranchToIntersectRuntimesBy) === null || _b === void 0 ? void 0 : _b.id,
93
84
  });
94
85
  if (!selectedRuntime) {
95
86
  throw new Error(`No ${this.printedType} selected`);
@@ -97,7 +88,7 @@ class SelectRuntime {
97
88
  return selectedRuntime.version;
98
89
  }
99
90
  async getNewestRuntimeAsync(graphqlClient, { appId, branchName, anotherBranchIdToIntersectRuntimesBy, }) {
100
- const connection = await RuntimeQuery_1.RuntimeQuery.getRuntimesOnBranchAsync(graphqlClient, {
91
+ return await RuntimeQuery_1.RuntimeQuery.getRuntimesOnBranchAsync(graphqlClient, {
101
92
  appId,
102
93
  name: branchName,
103
94
  first: 1,
@@ -105,11 +96,6 @@ class SelectRuntime {
105
96
  branchId: anotherBranchIdToIntersectRuntimesBy,
106
97
  },
107
98
  });
108
- const { edges } = connection;
109
- if (edges.length === 0) {
110
- return null;
111
- }
112
- return connection;
113
99
  }
114
100
  async displayLatestUpdateGroupAsync({ graphqlClient, appId, branchName, runtime, }) {
115
101
  const updateGroups = await UpdateQuery_1.UpdateQuery.viewUpdateGroupsOnBranchAsync(graphqlClient, {
@@ -122,19 +108,20 @@ class SelectRuntime {
122
108
  },
123
109
  });
124
110
  (0, assert_1.default)(updateGroups.length < 2, `Expected at most one update group. Received: ${JSON.stringify(updateGroups)}`);
125
- return (0, utils_2.formatRuntimeWithUpdateGroup)(updateGroups[0], runtime);
111
+ return (0, utils_2.formatRuntimeWithUpdateGroup)(updateGroups[0], runtime, branchName);
126
112
  }
127
- async selectRuntimesAsync(graphqlClient, { appId, branchName, anotherBranchIdToIntersectRuntimesBy, batchSize = 5, }) {
113
+ async selectRuntimesAsync(graphqlClient, { appId, batchSize = 5, }) {
128
114
  const queryAsync = async (queryParams) => {
115
+ var _a;
129
116
  return await RuntimeQuery_1.RuntimeQuery.getRuntimesOnBranchAsync(graphqlClient, {
130
117
  appId,
131
- name: branchName,
118
+ name: this.branchInfo.name,
132
119
  first: queryParams.first,
133
120
  after: queryParams.after,
134
121
  last: queryParams.last,
135
122
  before: queryParams.before,
136
123
  filter: {
137
- branchId: anotherBranchIdToIntersectRuntimesBy,
124
+ branchId: (_a = this.options.anotherBranchToIntersectRuntimesBy) === null || _a === void 0 ? void 0 : _a.id,
138
125
  },
139
126
  });
140
127
  };
@@ -142,7 +129,7 @@ class SelectRuntime {
142
129
  return await this.displayLatestUpdateGroupAsync({
143
130
  graphqlClient,
144
131
  appId,
145
- branchName,
132
+ branchName: this.branchInfo.name,
146
133
  runtime,
147
134
  });
148
135
  };
@@ -153,15 +140,11 @@ class SelectRuntime {
153
140
  pageSize: batchSize,
154
141
  });
155
142
  }
156
- async promptForRuntimeAsync() {
157
- log_1.default.log(`You can input a runtime manually then publish an update later.`);
158
- const { runtimeVersion } = await (0, prompts_1.promptAsync)({
159
- type: 'text',
160
- name: 'runtimeVersion',
161
- message: 'Input a runtime version:',
162
- initial: '1.0.0',
163
- });
164
- return runtimeVersion;
165
- }
166
143
  }
167
144
  exports.SelectRuntime = SelectRuntime;
145
+ function beginSentence(phrase) {
146
+ if (typeof phrase !== 'string' || phrase.length === 0) {
147
+ return phrase; // Return the input without any modification if it's not a string or empty
148
+ }
149
+ return phrase.charAt(0).toUpperCase() + phrase.slice(1);
150
+ }
@@ -41,7 +41,7 @@ function getRolloutInfoFromBranchMapping(branchMapping) {
41
41
  (0, branch_mapping_1.assertNumber)(operand);
42
42
  return {
43
43
  rolledOutBranchId,
44
- percentRolledOut: operand * 100,
44
+ percentRolledOut: Math.round(operand * 100),
45
45
  runtimeVersion,
46
46
  defaultBranchId,
47
47
  };
@@ -53,7 +53,7 @@ function getRolloutInfoFromBranchMapping(branchMapping) {
53
53
  (0, branch_mapping_1.assertNumber)(operand);
54
54
  return {
55
55
  rolledOutBranchId,
56
- percentRolledOut: operand * 100,
56
+ percentRolledOut: Math.round(operand * 100),
57
57
  defaultBranchId,
58
58
  };
59
59
  }
@@ -4,7 +4,7 @@ import { Rollout } from './branch-mapping';
4
4
  export declare function printRollout(channel: UpdateChannelObject): void;
5
5
  export declare function displayRolloutDetails(channelName: string, rollout: Rollout): void;
6
6
  export declare function formatBranchWithUpdateGroup(maybeUpdateGroup: UpdateFragment[] | undefined | null, branch: UpdateBranchObject, percentRolledOut: number): string;
7
- export declare function formatRuntimeWithUpdateGroup(maybeUpdateGroup: UpdateFragment[] | undefined | null, runtime: RuntimeFragment): string;
7
+ export declare function formatRuntimeWithUpdateGroup(maybeUpdateGroup: UpdateFragment[] | undefined | null, runtime: RuntimeFragment, branchName: string): string;
8
8
  export declare function promptForRolloutPercentAsync({ promptMessage, }: {
9
9
  promptMessage: string;
10
10
  }): Promise<number>;
@@ -20,7 +20,7 @@ function displayRolloutDetails(channelName, rollout) {
20
20
  log_1.default.log((0, formatFields_1.default)([
21
21
  { label: 'Channel', value: channelName },
22
22
  ...((0, branch_mapping_1.isConstrainedRollout)(rollout)
23
- ? [{ label: 'Runtime Version', value: rollout.runtimeVersion }]
23
+ ? [{ label: 'Runtime version', value: rollout.runtimeVersion }]
24
24
  : []),
25
25
  {
26
26
  label: 'Branches',
@@ -32,7 +32,7 @@ function displayRolloutDetails(channelName, rollout) {
32
32
  exports.displayRolloutDetails = displayRolloutDetails;
33
33
  function formatBranchWithUpdateGroup(maybeUpdateGroup, branch, percentRolledOut) {
34
34
  const lines = [];
35
- lines.push(chalk_1.default.bold(`🍽️ Served by branch ${chalk_1.default.bold(branch.name)} (${percentRolledOut}%)`));
35
+ lines.push(chalk_1.default.bold(`➡️ 📱 Latest update on the ${chalk_1.default.bold(branch.name)} branch (${percentRolledOut}%)`));
36
36
  if (!maybeUpdateGroup) {
37
37
  lines.push(`No updates for target runtime`);
38
38
  }
@@ -43,9 +43,9 @@ function formatBranchWithUpdateGroup(maybeUpdateGroup, branch, percentRolledOut)
43
43
  return lines.join('\n ');
44
44
  }
45
45
  exports.formatBranchWithUpdateGroup = formatBranchWithUpdateGroup;
46
- function formatRuntimeWithUpdateGroup(maybeUpdateGroup, runtime) {
46
+ function formatRuntimeWithUpdateGroup(maybeUpdateGroup, runtime, branchName) {
47
47
  const lines = [];
48
- lines.push(chalk_1.default.bold(`🍽️ Served by runtime ${chalk_1.default.bold(runtime.version)}:`));
48
+ lines.push(chalk_1.default.bold(`➡️ 📱 Latest update on the ${chalk_1.default.bold(branchName)} branch served to runtime ${chalk_1.default.bold(runtime.version)}:`));
49
49
  if (!maybeUpdateGroup) {
50
50
  lines.push(`No updates published for this runtime`);
51
51
  }
@@ -61,7 +61,7 @@ function formatUpdateGroup(updateGroup) {
61
61
  const lines = [];
62
62
  const formattedLines = (0, formatFields_1.default)([
63
63
  { label: 'Message', value: (_a = updateGroup.message) !== null && _a !== void 0 ? _a : 'N/A' },
64
- { label: 'Runtime Version', value: (_b = updateGroup.runtimeVersion) !== null && _b !== void 0 ? _b : 'N/A' },
64
+ { label: 'Runtime version', value: (_b = updateGroup.runtimeVersion) !== null && _b !== void 0 ? _b : 'N/A' },
65
65
  { label: 'Platforms', value: (_c = updateGroup.platforms) !== null && _c !== void 0 ? _c : 'N/A' },
66
66
  { label: 'Group ID', value: (_d = updateGroup.group) !== null && _d !== void 0 ? _d : 'N/A' },
67
67
  ]).split('\n');
@@ -34,7 +34,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
34
34
  const shouldRepublishWithCodesigning = updatesToPublish.some(update => update.codeSigningInfo);
35
35
  if (shouldRepublishWithCodesigning) {
36
36
  if (!codeSigningInfo) {
37
- throw new Error('Must specify --private-key-path argument to sign republished update for code signing');
37
+ throw new Error('Must specify --private-key-path argument to sign republished update group for code signing');
38
38
  }
39
39
  for (const update of updatesToPublish) {
40
40
  if ((0, nullthrows_1.default)(update.codeSigningInfo).alg !== codeSigningInfo.codeSigningMetadata.alg ||
@@ -42,7 +42,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
42
42
  throw new Error('Republished updates must use the same code signing key and algorithm as original update');
43
43
  }
44
44
  }
45
- log_1.default.withTick(`The republished update will be signed`);
45
+ log_1.default.withTick(`The republished update group will be signed`);
46
46
  }
47
47
  const publishIndicator = (0, ora_1.ora)('Republishing...').start();
48
48
  let updatesRepublished;
@@ -59,7 +59,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
59
59
  },
60
60
  ]);
61
61
  if (codeSigningInfo) {
62
- log_1.default.log('🔒 Signing republished update');
62
+ log_1.default.log('🔒 Signing republished update group');
63
63
  await Promise.all(updatesRepublished.map(async (newUpdate) => {
64
64
  const response = await (0, fetch_1.default)(newUpdate.manifestPermalink, {
65
65
  method: 'GET',
@@ -75,10 +75,10 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
75
75
  });
76
76
  }));
77
77
  }
78
- publishIndicator.succeed('Republished update');
78
+ publishIndicator.succeed('Republished update group');
79
79
  }
80
80
  catch (error) {
81
- publishIndicator.fail('Failed to republish update');
81
+ publishIndicator.fail('Failed to republish update group');
82
82
  throw error;
83
83
  }
84
84
  if (json) {
@@ -92,7 +92,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
92
92
  { label: 'Branch', value: targetBranchName },
93
93
  { label: 'Runtime version', value: arbitraryRepublishedUpdate.runtimeVersion },
94
94
  { label: 'Platform', value: updatesRepublished.map(update => update.platform).join(', ') },
95
- { label: 'Update Group ID', value: arbitraryRepublishedUpdate.group },
95
+ { label: 'Update group ID', value: arbitraryRepublishedUpdate.group },
96
96
  ...(updatesRepublishedByPlatform.android
97
97
  ? [{ label: 'Android update ID', value: updatesRepublishedByPlatform.android.id }]
98
98
  : []),
@@ -137,15 +137,6 @@ class FilterPagination {
137
137
  }
138
138
  exports.FilterPagination = FilterPagination;
139
139
  async function selectPaginatedAsync({ queryAsync, getTitleAsync, printedType, pageSize, }) {
140
- // Dont bother prompting if there are 0 or 1 items
141
- const connectionPreflight = await queryAsync({ first: pageSize });
142
- const { edges } = connectionPreflight;
143
- if (edges.length === 0) {
144
- return null;
145
- }
146
- else if (edges.length === 1) {
147
- return edges[0].node;
148
- }
149
140
  return await selectPaginatedInternalAsync({
150
141
  queryAsync,
151
142
  getTitleAsync,
@@ -168,6 +159,9 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
168
159
  (0, assert_1.default)(limit, 'queryParams must have either first or last');
169
160
  const connection = await queryAsync(queryParams);
170
161
  const { edges, pageInfo } = connection;
162
+ if (edges.length === 0) {
163
+ return null;
164
+ }
171
165
  /*
172
166
  * The Relay spec has a weird definition on hasNextPage and hasPreviousPage:
173
167
  * 'If the client is paginating with last/before, then the server must return true if prior edges