eas-cli 16.6.1 → 16.7.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.
@@ -24,7 +24,7 @@ export declare function ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir: st
24
24
  * - Sets `updates.url` if not set
25
25
  * - Ensure latest changes are reflected in the native config, if any
26
26
  */
27
- export declare function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, env, forceNativeConfigSync, }: {
27
+ export declare function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, env, forceNativeConfigSync, manifestHostOverride, }: {
28
28
  exp: ExpoConfig;
29
29
  projectId: string;
30
30
  projectDir: string;
@@ -32,4 +32,5 @@ export declare function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutU
32
32
  platform: RequestedPlatform | null;
33
33
  env: Env | undefined;
34
34
  forceNativeConfigSync?: boolean;
35
+ manifestHostOverride: string | null;
35
36
  }): Promise<void>;
@@ -78,10 +78,10 @@ function mergeExpoConfig(exp, modifyExp) {
78
78
  * - Ensure runtimeVersion is defined for both or individual platforms
79
79
  * - Output the changes made, or the changes required to make manually
80
80
  */
81
- async function ensureEASUpdatesIsConfiguredInExpoConfigAsync({ exp, projectId, projectDir, platform, workflows, }) {
81
+ async function ensureEASUpdatesIsConfiguredInExpoConfigAsync({ exp, projectId, projectDir, platform, workflows, manifestHostOverride, }) {
82
82
  const modifyConfig = {};
83
- if (exp.updates?.url !== (0, api_1.getEASUpdateURL)(projectId)) {
84
- modifyConfig.updates = { url: (0, api_1.getEASUpdateURL)(projectId) };
83
+ if (exp.updates?.url !== (0, api_1.getEASUpdateURL)(projectId, manifestHostOverride)) {
84
+ modifyConfig.updates = { url: (0, api_1.getEASUpdateURL)(projectId, manifestHostOverride) };
85
85
  }
86
86
  let androidRuntimeVersion = exp.android?.runtimeVersion ?? exp.runtimeVersion;
87
87
  let iosRuntimeVersion = exp.ios?.runtimeVersion ?? exp.runtimeVersion;
@@ -245,7 +245,7 @@ exports.ensureEASUpdateIsConfiguredInEasJsonAsync = ensureEASUpdateIsConfiguredI
245
245
  * - Sets `updates.url` if not set
246
246
  * - Ensure latest changes are reflected in the native config, if any
247
247
  */
248
- async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, env, forceNativeConfigSync, }) {
248
+ async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, projectId, projectDir, vcsClient, platform, env, forceNativeConfigSync, manifestHostOverride, }) {
249
249
  const hasExpoUpdates = (0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, expMaybeWithoutUpdates.sdkVersion);
250
250
  const hasExpoUpdatesInDevDependencies = (0, projectUtils_1.isExpoUpdatesInstalledAsDevDependency)(projectDir);
251
251
  if (!hasExpoUpdates && !hasExpoUpdatesInDevDependencies) {
@@ -267,6 +267,7 @@ async function ensureEASUpdateIsConfiguredAsync({ exp: expMaybeWithoutUpdates, p
267
267
  projectId,
268
268
  platform,
269
269
  workflows,
270
+ manifestHostOverride,
270
271
  });
271
272
  if (forceNativeConfigSync || projectChanged || !hasExpoUpdates) {
272
273
  await ensureEASUpdateIsConfiguredNativelyAsync(vcsClient, {
@@ -11,7 +11,7 @@ export type UpdateToRepublish = {
11
11
  * @param updatesToPublish The update group to republish
12
12
  * @param targetBranch The branch to repubish the update group on
13
13
  */
14
- export declare function republishAsync({ graphqlClient, app, updatesToPublish, targetBranch, updateMessage, codeSigningInfo, json, }: {
14
+ export declare function republishAsync({ graphqlClient, app, updatesToPublish, targetBranch, updateMessage, codeSigningInfo, json, rolloutPercentage, }: {
15
15
  graphqlClient: ExpoGraphqlClient;
16
16
  app: {
17
17
  exp: ExpoConfig;
@@ -25,4 +25,5 @@ export declare function republishAsync({ graphqlClient, app, updatesToPublish, t
25
25
  updateMessage: string;
26
26
  codeSigningInfo?: CodeSigningInfo;
27
27
  json?: boolean;
28
+ rolloutPercentage?: number;
28
29
  }): Promise<void>;
@@ -10,6 +10,7 @@ const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
10
10
  const log_1 = tslib_1.__importStar(require("../log"));
11
11
  const ora_1 = require("../ora");
12
12
  const projectUtils_1 = require("../project/projectUtils");
13
+ const publish_1 = require("../project/publish");
13
14
  const code_signing_1 = require("../utils/code-signing");
14
15
  const formatFields_1 = tslib_1.__importDefault(require("../utils/formatFields"));
15
16
  const json_1 = require("../utils/json");
@@ -17,7 +18,7 @@ const json_1 = require("../utils/json");
17
18
  * @param updatesToPublish The update group to republish
18
19
  * @param targetBranch The branch to repubish the update group on
19
20
  */
20
- async function republishAsync({ graphqlClient, app, updatesToPublish, targetBranch, updateMessage, codeSigningInfo, json, }) {
21
+ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBranch, updateMessage, codeSigningInfo, json, rolloutPercentage, }) {
21
22
  const { branchName: targetBranchName, branchId: targetBranchId } = targetBranch;
22
23
  // The update group properties are the same for all updates
23
24
  (0, assert_1.default)(updatesToPublish.length > 0, 'Updates to republish must be provided');
@@ -25,7 +26,9 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
25
26
  const isSameGroup = (update) => update.groupId === arbitraryUpdate.groupId &&
26
27
  update.branchId === arbitraryUpdate.branchId &&
27
28
  update.branchName === arbitraryUpdate.branchName &&
28
- update.runtimeVersion === arbitraryUpdate.runtimeVersion;
29
+ update.runtimeVersion === arbitraryUpdate.runtimeVersion &&
30
+ update.manifestHostOverride === arbitraryUpdate.manifestHostOverride &&
31
+ update.assetHostOverride === arbitraryUpdate.assetHostOverride;
29
32
  (0, assert_1.default)(updatesToPublish.every(isSameGroup), 'All updates being republished must belong to the same update group');
30
33
  (0, assert_1.default)(updatesToPublish.every(u => u.isRollBackToEmbedded) ||
31
34
  updatesToPublish.every(u => !u.isRollBackToEmbedded), 'All updates must either be roll back to embedded updates or not');
@@ -76,6 +79,15 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
76
79
  },
77
80
  ];
78
81
  })),
82
+ rolloutInfoGroup: rolloutPercentage
83
+ ? await (0, publish_1.getUpdateRolloutInfoGroupAsync)(graphqlClient, {
84
+ appId: app.projectId,
85
+ branchName: targetBranchName,
86
+ runtimeVersion,
87
+ rolloutPercentage,
88
+ platforms: updatesToPublish.map(update => update.platform),
89
+ })
90
+ : null,
79
91
  };
80
92
  updatesRepublished = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(graphqlClient, [
81
93
  {
@@ -85,6 +97,8 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
85
97
  ...objectToMergeIn,
86
98
  gitCommitHash: updatesToPublish[0].gitCommitHash,
87
99
  awaitingCodeSigningInfo: !!codeSigningInfo,
100
+ manifestHostOverride: updatesToPublish[0].manifestHostOverride,
101
+ assetHostOverride: updatesToPublish[0].assetHostOverride,
88
102
  },
89
103
  ]);
90
104
  if (codeSigningInfo) {
@@ -137,6 +151,22 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
137
151
  ...(updatesRepublishedByPlatform.ios
138
152
  ? [{ label: 'iOS update ID', value: updatesRepublishedByPlatform.ios.id }]
139
153
  : []),
154
+ ...(updatesRepublishedByPlatform.android?.rolloutControlUpdate
155
+ ? [
156
+ {
157
+ label: 'Android Rollout',
158
+ value: `${updatesRepublishedByPlatform.android?.rolloutPercentage}% (Base update ID: ${updatesRepublishedByPlatform.android?.rolloutControlUpdate.id})`,
159
+ },
160
+ ]
161
+ : []),
162
+ ...(updatesRepublishedByPlatform.ios?.rolloutControlUpdate
163
+ ? [
164
+ {
165
+ label: 'iOS Rollout',
166
+ value: `${updatesRepublishedByPlatform.ios?.rolloutPercentage}% (Base update ID: ${updatesRepublishedByPlatform.ios?.rolloutControlUpdate.id})`,
167
+ },
168
+ ]
169
+ : []),
140
170
  { label: 'Message', value: updateMessage },
141
171
  { label: 'EAS Dashboard', value: (0, log_1.link)(updateGroupUrl, { dim: false }) },
142
172
  ]));
@@ -53,4 +53,3 @@ export declare function getUpdateJsonInfosForUpdates(updates: UpdateFragment[]):
53
53
  export declare function getUpdateGroupDescriptions(updateGroups: UpdateFragment[][]): FormattedUpdateGroupDescription[];
54
54
  export declare function getUpdateGroupDescriptionsWithBranch(updateGroups: UpdateFragment[][]): FormattedUpdateGroupDescriptionWithBranch[];
55
55
  export declare function getBranchDescription(branch: UpdateBranchFragment): FormattedBranchDescription;
56
- export declare function checkEASUpdateURLIsSetAsync(exp: ExpoConfig, projectId: string): Promise<boolean>;
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ 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
- const api_1 = require("../api");
9
8
  const log_1 = require("../log");
10
9
  const platform_1 = require("../platform");
11
10
  const User_1 = require("../user/User");
@@ -173,9 +172,3 @@ function getBranchDescription(branch) {
173
172
  };
174
173
  }
175
174
  exports.getBranchDescription = getBranchDescription;
176
- async function checkEASUpdateURLIsSetAsync(exp, projectId) {
177
- const configuredURL = exp.updates?.url;
178
- const expectedURL = (0, api_1.getEASUpdateURL)(projectId);
179
- return configuredURL === expectedURL;
180
- }
181
- exports.checkEASUpdateURLIsSetAsync = checkEASUpdateURLIsSetAsync;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.6.1",
2
+ "version": "16.7.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -3815,6 +3815,13 @@
3815
3815
  "required": false,
3816
3816
  "multiple": false
3817
3817
  },
3818
+ "rollout-percentage": {
3819
+ "name": "rollout-percentage",
3820
+ "type": "option",
3821
+ "description": "Percentage of users this update should be immediately available to. Users not in the rollout will be served the previous latest update on the branch, even if that update is itself being rolled out. The specified number must be an integer between 1 and 100. When not specified, this defaults to 100.",
3822
+ "required": false,
3823
+ "multiple": false
3824
+ },
3818
3825
  "json": {
3819
3826
  "name": "json",
3820
3827
  "type": "boolean",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "16.6.1",
4
+ "version": "16.7.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -13,7 +13,7 @@
13
13
  "@expo/config": "10.0.6",
14
14
  "@expo/config-plugins": "9.0.12",
15
15
  "@expo/eas-build-job": "1.0.173",
16
- "@expo/eas-json": "16.4.0",
16
+ "@expo/eas-json": "16.7.0",
17
17
  "@expo/env": "^1.0.0",
18
18
  "@expo/json-file": "8.3.3",
19
19
  "@expo/logger": "1.0.117",
@@ -240,5 +240,5 @@
240
240
  "node": "20.11.0",
241
241
  "yarn": "1.22.21"
242
242
  },
243
- "gitHead": "3ec7bb733473f694813dd769a1c190c93074c330"
243
+ "gitHead": "24b725438ec22989f902a668c76d11ef457695b0"
244
244
  }