eas-cli 12.5.0 → 12.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +66 -62
  2. package/build/build/evaluateConfigWithEnvVarsAsync.d.ts +1 -4
  3. package/build/build/evaluateConfigWithEnvVarsAsync.js +3 -6
  4. package/build/build/runBuildAndSubmit.d.ts +0 -2
  5. package/build/build/runBuildAndSubmit.js +0 -1
  6. package/build/commandUtils/flags.d.ts +0 -3
  7. package/build/commandUtils/flags.js +1 -15
  8. package/build/commands/build/index.d.ts +0 -2
  9. package/build/commands/build/index.js +0 -2
  10. package/build/commands/build/resign.d.ts +0 -1
  11. package/build/commands/build/resign.js +0 -2
  12. package/build/commands/build/version/get.d.ts +0 -1
  13. package/build/commands/build/version/get.js +0 -2
  14. package/build/commands/build/version/set.d.ts +0 -1
  15. package/build/commands/build/version/set.js +0 -3
  16. package/build/commands/build/version/sync.d.ts +0 -1
  17. package/build/commands/build/version/sync.js +0 -3
  18. package/build/commands/config.d.ts +0 -1
  19. package/build/commands/config.js +0 -2
  20. package/build/commands/env/exec.d.ts +23 -0
  21. package/build/commands/env/exec.js +124 -0
  22. package/build/commands/update/republish.d.ts +2 -0
  23. package/build/commands/update/republish.js +34 -4
  24. package/build/commands/worker/deploy.js +13 -10
  25. package/build/credentials/manager/Actions.d.ts +4 -2
  26. package/build/credentials/manager/Actions.js +2 -0
  27. package/build/credentials/manager/AndroidActions.js +5 -0
  28. package/build/credentials/manager/IosActions.js +5 -0
  29. package/build/credentials/manager/ManageAndroid.js +3 -0
  30. package/build/credentials/manager/ManageIos.js +3 -0
  31. package/build/graphql/generated.d.ts +16 -7
  32. package/build/graphql/types/Submission.js +1 -1
  33. package/build/project/publish.js +3 -2
  34. package/build/submit/utils/logs.js +16 -17
  35. package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.d.ts +5 -0
  36. package/build/update/{getBranchNameFromChannelNameAsync.js → getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js} +8 -7
  37. package/build/update/republish.js +2 -2
  38. package/build/utils/prompts.js +3 -3
  39. package/build/worker/assets.d.ts +1 -1
  40. package/build/worker/assets.js +4 -2
  41. package/build/worker/deployment.d.ts +10 -0
  42. package/build/worker/deployment.js +33 -22
  43. package/build/worker/upload.js +4 -6
  44. package/build/worker/utils/logs.d.ts +14 -13
  45. package/build/worker/utils/logs.js +18 -18
  46. package/oclif.manifest.json +60 -79
  47. package/package.json +2 -2
  48. package/build/update/getBranchNameFromChannelNameAsync.d.ts +0 -2
@@ -3030,6 +3030,11 @@ export type DeleteWebhookResult = {
3030
3030
  __typename?: 'DeleteWebhookResult';
3031
3031
  id: Scalars['ID']['output'];
3032
3032
  };
3033
+ export type DeleteWorkerDeploymentResult = {
3034
+ __typename?: 'DeleteWorkerDeploymentResult';
3035
+ deploymentIdentifier: Scalars['WorkerDeploymentIdentifier']['output'];
3036
+ id: Scalars['ID']['output'];
3037
+ };
3033
3038
  export type DeployServerlessFunctionResult = {
3034
3039
  __typename?: 'DeployServerlessFunctionResult';
3035
3040
  url: Scalars['String']['output'];
@@ -3145,6 +3150,7 @@ export type DeploymentsMutation = {
3145
3150
  /** Create a signed deployment URL */
3146
3151
  createSignedDeploymentUrl: DeploymentSignedUrlResult;
3147
3152
  deleteAlias: DeleteAliasResult;
3153
+ deleteWorkerDeployment: DeleteWorkerDeploymentResult;
3148
3154
  };
3149
3155
  export type DeploymentsMutationAssignAliasArgs = {
3150
3156
  aliasName?: InputMaybe<Scalars['WorkerDeploymentIdentifier']['input']>;
@@ -3159,6 +3165,9 @@ export type DeploymentsMutationDeleteAliasArgs = {
3159
3165
  aliasName?: InputMaybe<Scalars['WorkerDeploymentIdentifier']['input']>;
3160
3166
  appId: Scalars['ID']['input'];
3161
3167
  };
3168
+ export type DeploymentsMutationDeleteWorkerDeploymentArgs = {
3169
+ workerDeploymentId: Scalars['ID']['input'];
3170
+ };
3162
3171
  export type DiscordUser = {
3163
3172
  __typename?: 'DiscordUser';
3164
3173
  discordIdentifier: Scalars['String']['output'];
@@ -11033,7 +11042,7 @@ export type CreateAndroidSubmissionMutation = {
11033
11042
  id: string;
11034
11043
  status: SubmissionStatus;
11035
11044
  platform: AppPlatform;
11036
- logsUrl?: string | null;
11045
+ logFiles: Array<string>;
11037
11046
  app: {
11038
11047
  __typename?: 'App';
11039
11048
  id: string;
@@ -11083,7 +11092,7 @@ export type CreateIosSubmissionMutation = {
11083
11092
  id: string;
11084
11093
  status: SubmissionStatus;
11085
11094
  platform: AppPlatform;
11086
- logsUrl?: string | null;
11095
+ logFiles: Array<string>;
11087
11096
  app: {
11088
11097
  __typename?: 'App';
11089
11098
  id: string;
@@ -11657,7 +11666,7 @@ export type BuildsWithSubmissionsByIdQuery = {
11657
11666
  id: string;
11658
11667
  status: SubmissionStatus;
11659
11668
  platform: AppPlatform;
11660
- logsUrl?: string | null;
11669
+ logFiles: Array<string>;
11661
11670
  app: {
11662
11671
  __typename?: 'App';
11663
11672
  id: string;
@@ -12241,7 +12250,7 @@ export type SubmissionsByIdQuery = {
12241
12250
  id: string;
12242
12251
  status: SubmissionStatus;
12243
12252
  platform: AppPlatform;
12244
- logsUrl?: string | null;
12253
+ logFiles: Array<string>;
12245
12254
  app: {
12246
12255
  __typename?: 'App';
12247
12256
  id: string;
@@ -12292,7 +12301,7 @@ export type GetAllSubmissionsForAppQuery = {
12292
12301
  id: string;
12293
12302
  status: SubmissionStatus;
12294
12303
  platform: AppPlatform;
12295
- logsUrl?: string | null;
12304
+ logFiles: Array<string>;
12296
12305
  app: {
12297
12306
  __typename?: 'App';
12298
12307
  id: string;
@@ -12892,7 +12901,7 @@ export type BuildWithSubmissionsFragment = {
12892
12901
  id: string;
12893
12902
  status: SubmissionStatus;
12894
12903
  platform: AppPlatform;
12895
- logsUrl?: string | null;
12904
+ logFiles: Array<string>;
12896
12905
  app: {
12897
12906
  __typename?: 'App';
12898
12907
  id: string;
@@ -13006,7 +13015,7 @@ export type SubmissionFragment = {
13006
13015
  id: string;
13007
13016
  status: SubmissionStatus;
13008
13017
  platform: AppPlatform;
13009
- logsUrl?: string | null;
13018
+ logFiles: Array<string>;
13010
13019
  app: {
13011
13020
  __typename?: 'App';
13012
13021
  id: string;
@@ -31,6 +31,6 @@ exports.SubmissionFragmentNode = (0, graphql_tag_1.default) `
31
31
  errorCode
32
32
  message
33
33
  }
34
- logsUrl
34
+ logFiles
35
35
  }
36
36
  `;
@@ -25,7 +25,7 @@ const PublishQuery_1 = require("../graphql/queries/PublishQuery");
25
25
  const log_1 = tslib_1.__importStar(require("../log"));
26
26
  const platform_1 = require("../platform");
27
27
  const prompts_1 = require("../prompts");
28
- const getBranchNameFromChannelNameAsync_1 = require("../update/getBranchNameFromChannelNameAsync");
28
+ const getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync_1 = require("../update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync");
29
29
  const utils_2 = require("../update/utils");
30
30
  const uploads_1 = require("../uploads");
31
31
  const expoCli_1 = require("../utils/expoCli");
@@ -383,7 +383,8 @@ async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelN
383
383
  throw new Error('Cannot specify both --channel and --branch. Specify either --channel, --branch, or --auto.');
384
384
  }
385
385
  if (channelNameArg) {
386
- return await (0, getBranchNameFromChannelNameAsync_1.getBranchNameFromChannelNameAsync)(graphqlClient, projectId, channelNameArg);
386
+ const { branchName } = await (0, getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync_1.getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync)(graphqlClient, projectId, channelNameArg);
387
+ return branchName;
387
388
  }
388
389
  if (branchNameArg) {
389
390
  return branchNameArg;
@@ -22,23 +22,22 @@ async function displayLogsAsync(submission, { verbose = false, moreSubmissions =
22
22
  }
23
23
  exports.displayLogsAsync = displayLogsAsync;
24
24
  async function downloadAndPrintSubmissionLogsAsync(submission) {
25
- if (!submission.logsUrl) {
26
- return;
27
- }
28
- const response = await (0, fetch_1.default)(submission.logsUrl);
29
- const logs = parseLogs(await response.text());
30
- log_1.default.addNewLineIfNone();
31
- const prefix = chalk_1.default.blueBright('[logs] ');
32
- for (const { level, msg } of logs) {
33
- const msgWithPrefix = `${prefix}${msg}`;
34
- if (level === 'error') {
35
- log_1.default.error(msgWithPrefix);
36
- }
37
- else if (level === 'warn') {
38
- log_1.default.warn(msgWithPrefix);
39
- }
40
- else {
41
- log_1.default.log(msgWithPrefix);
25
+ for (const logFile of submission.logFiles) {
26
+ const response = await (0, fetch_1.default)(logFile);
27
+ const logs = parseLogs(await response.text());
28
+ log_1.default.addNewLineIfNone();
29
+ const prefix = chalk_1.default.blueBright('[logs] ');
30
+ for (const { level, msg } of logs) {
31
+ const msgWithPrefix = `${prefix}${msg}`;
32
+ if (level === 'error') {
33
+ log_1.default.error(msgWithPrefix);
34
+ }
35
+ else if (level === 'warn') {
36
+ log_1.default.warn(msgWithPrefix);
37
+ }
38
+ else {
39
+ log_1.default.log(msgWithPrefix);
40
+ }
42
41
  }
43
42
  }
44
43
  }
@@ -0,0 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
+ export declare function getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync(graphqlClient: ExpoGraphqlClient, projectId: string, channelName: string): Promise<{
3
+ branchName: string;
4
+ branchId: string;
5
+ }>;
@@ -1,19 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBranchNameFromChannelNameAsync = void 0;
3
+ exports.getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync = void 0;
4
4
  const queries_1 = require("../branch/queries");
5
5
  const errors_1 = require("../channel/errors");
6
6
  const queries_2 = require("../channel/queries");
7
7
  const ChannelQuery_1 = require("../graphql/queries/ChannelQuery");
8
- async function getBranchNameFromChannelNameAsync(graphqlClient, projectId, channelName) {
9
- let branchName;
8
+ async function getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync(graphqlClient, projectId, channelName) {
9
+ let branchInfo;
10
10
  try {
11
11
  const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
12
12
  appId: projectId,
13
13
  channelName,
14
14
  });
15
15
  if (channel.updateBranches.length === 1) {
16
- branchName = channel.updateBranches[0].name;
16
+ const branch = channel.updateBranches[0];
17
+ branchInfo = { branchId: branch.id, branchName: branch.name };
17
18
  }
18
19
  else if (channel.updateBranches.length === 0) {
19
20
  throw new Error("Channel has no branches associated with it. Run 'eas channel:edit' to map a branch");
@@ -38,8 +39,8 @@ async function getBranchNameFromChannelNameAsync(graphqlClient, projectId, chann
38
39
  if (!newChannel) {
39
40
  throw new Error(`Could not create channel with name ${channelName} on project with id ${projectId}`);
40
41
  }
41
- branchName = channelName;
42
+ branchInfo = { branchId, branchName: channelName };
42
43
  }
43
- return branchName;
44
+ return branchInfo;
44
45
  }
45
- exports.getBranchNameFromChannelNameAsync = getBranchNameFromChannelNameAsync;
46
+ exports.getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync = getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync;
@@ -26,7 +26,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
26
26
  update.branchId === arbitraryUpdate.branchId &&
27
27
  update.branchName === arbitraryUpdate.branchName &&
28
28
  update.runtimeVersion === arbitraryUpdate.runtimeVersion;
29
- (0, assert_1.default)(updatesToPublish.every(isSameGroup), 'All updates must belong to the same update group');
29
+ (0, assert_1.default)(updatesToPublish.every(isSameGroup), 'All updates being republished must belong to the same update group');
30
30
  (0, assert_1.default)(updatesToPublish.every(u => u.isRollBackToEmbedded) ||
31
31
  updatesToPublish.every(u => !u.isRollBackToEmbedded), 'All updates must either be roll back to embedded updates or not');
32
32
  const { runtimeVersion } = arbitraryUpdate;
@@ -44,7 +44,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
44
44
  throw new Error('Republished updates must use the same code signing key and algorithm as original update');
45
45
  }
46
46
  }
47
- log_1.default.withTick(`The republished update group will be signed`);
47
+ log_1.default.withTick(`The republished update group will be signed with the same code signing key and algorithm as the original update`);
48
48
  }
49
49
  const publishIndicator = (0, ora_1.ora)('Republishing...').start();
50
50
  let updatesRepublished;
@@ -10,9 +10,9 @@ async function promptVariableEnvironmentAsync(nonInteractive) {
10
10
  throw new Error('The `--environment` flag must be set when running in `--non-interactive` mode.');
11
11
  }
12
12
  return await (0, prompts_1.selectAsync)('Select environment:', [
13
- { title: 'Development', value: generated_1.EnvironmentVariableEnvironment.Development },
14
- { title: 'Preview', value: generated_1.EnvironmentVariableEnvironment.Preview },
15
- { title: 'Production', value: generated_1.EnvironmentVariableEnvironment.Production },
13
+ { title: 'development', value: generated_1.EnvironmentVariableEnvironment.Development },
14
+ { title: 'preview', value: generated_1.EnvironmentVariableEnvironment.Preview },
15
+ { title: 'production', value: generated_1.EnvironmentVariableEnvironment.Production },
16
16
  ]);
17
17
  }
18
18
  exports.promptVariableEnvironmentAsync = promptVariableEnvironmentAsync;
@@ -10,7 +10,7 @@ interface AssetMapOptions {
10
10
  /** Mapping of normalized file paths to a SHA512 hash */
11
11
  export type AssetMap = Record<string, string>;
12
12
  /** Creates an asset map of a given target path */
13
- declare function createAssetMapAsync(assetPath: string, options?: AssetMapOptions): Promise<AssetMap>;
13
+ declare function createAssetMapAsync(assetPath?: string, options?: AssetMapOptions): Promise<AssetMap>;
14
14
  export interface Manifest {
15
15
  env: Record<string, string | undefined>;
16
16
  }
@@ -65,8 +65,10 @@ function listFilesRecursively(basePath) {
65
65
  /** Creates an asset map of a given target path */
66
66
  async function createAssetMapAsync(assetPath, options) {
67
67
  const map = Object.create(null);
68
- for await (const file of listFilesRecursively(assetPath)) {
69
- map[file.normalizedPath] = await computeSha512HashAsync(file.path, options?.hashOptions);
68
+ if (assetPath) {
69
+ for await (const file of listFilesRecursively(assetPath)) {
70
+ map[file.normalizedPath] = await computeSha512HashAsync(file.path, options?.hashOptions);
71
+ }
70
72
  }
71
73
  return map;
72
74
  }
@@ -10,6 +10,16 @@ export declare function getSignedDeploymentUrlAsync(graphqlClient: ExpoGraphqlCl
10
10
  /** If the terminal is running in non interactive mode or not */
11
11
  nonInteractive?: boolean;
12
12
  }): Promise<string>;
13
+ /**
14
+ * Assign a dev domain name to a project.
15
+ * - When running in interactive mode, it will prompt the user with a suggested domain name.
16
+ * - When running in non interactive mode, it will auto-assign the suggested domain name.
17
+ */
18
+ export declare function assignDevDomainNameAsync({ graphqlClient, appId, nonInteractive, }: {
19
+ graphqlClient: ExpoGraphqlClient;
20
+ appId: string;
21
+ nonInteractive?: boolean;
22
+ }): ReturnType<typeof DeploymentsMutation.assignDevDomainNameAsync>;
13
23
  export declare function assignWorkerDeploymentAliasAsync({ graphqlClient, appId, deploymentId, aliasName, }: {
14
24
  graphqlClient: ExpoGraphqlClient;
15
25
  appId: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.selectWorkerDeploymentOnAppAsync = exports.assignWorkerDeploymentProductionAsync = exports.assignWorkerDeploymentAliasAsync = exports.getSignedDeploymentUrlAsync = void 0;
3
+ exports.selectWorkerDeploymentOnAppAsync = exports.assignWorkerDeploymentProductionAsync = exports.assignWorkerDeploymentAliasAsync = exports.assignDevDomainNameAsync = exports.getSignedDeploymentUrlAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const mutations_1 = require("./mutations");
@@ -19,23 +19,20 @@ async function getSignedDeploymentUrlAsync(graphqlClient, options) {
19
19
  }
20
20
  catch (error) {
21
21
  const isMissingDevDomain = error?.graphQLErrors?.some(e => ['APP_NO_DEV_DOMAIN_NAME'].includes(e?.extensions?.errorCode));
22
+ // Throw unexpected errors eagerly
22
23
  if (!isMissingDevDomain) {
23
24
  throw error;
24
25
  }
25
- if (options.nonInteractive) {
26
- throw new Error('The project URL needs to be set up, but the terminal is running in non-interactive mode.');
27
- }
28
- const suggestedDevDomainName = await queries_1.DeploymentsQuery.getSuggestedDevDomainByAppIdAsync(graphqlClient, { appId: options.appId });
26
+ // Ensure the callback is invoked, containing cleanup logic for possible spinners
29
27
  options.onSetupDevDomain?.();
30
- await chooseDevDomainNameAsync({
28
+ // Assign the dev domain name by prompting the user
29
+ await assignDevDomainNameAsync({
31
30
  graphqlClient,
32
31
  appId: options.appId,
33
- initial: suggestedDevDomainName,
34
- });
35
- return await mutations_1.DeploymentsMutation.createSignedDeploymentUrlAsync(graphqlClient, {
36
- appId: options.appId,
37
- deploymentIdentifier: options.deploymentIdentifier,
32
+ nonInteractive: options.nonInteractive,
38
33
  });
34
+ // Retry creating the signed URL
35
+ return await getSignedDeploymentUrlAsync(graphqlClient, options);
39
36
  }
40
37
  }
41
38
  exports.getSignedDeploymentUrlAsync = getSignedDeploymentUrlAsync;
@@ -55,14 +52,14 @@ function formatDevDomainName(name = '') {
55
52
  .replace(DEV_DOMAIN_INVALID_MULTIPLE_HYPHENS, '-')
56
53
  .trim();
57
54
  }
58
- async function chooseDevDomainNameAsync({ graphqlClient, appId, initial, }) {
55
+ async function promptDevDomainNameAsync(initialDevDomain) {
59
56
  const rootDomain = `.${logs_1.EXPO_BASE_DOMAIN}.app`;
60
57
  const memoizedFormatDevDomainName = (0, memoize_1.memoize)(formatDevDomainName);
61
58
  const { name } = await (0, prompts_1.promptAsync)({
62
59
  type: 'text',
63
60
  name: 'name',
64
61
  message: 'Choose a preview URL for your project:',
65
- initial,
62
+ initial: initialDevDomain,
66
63
  validate: (value) => {
67
64
  if (!value) {
68
65
  return 'You have to choose a preview URL for your project';
@@ -95,29 +92,43 @@ async function chooseDevDomainNameAsync({ graphqlClient, appId, initial, }) {
95
92
  }
96
93
  },
97
94
  });
95
+ // This should never happen due to the validation, if it does its an error
98
96
  if (!name) {
99
97
  throw new Error('No preview URL provided, aborting deployment.');
100
98
  }
99
+ return name;
100
+ }
101
+ /**
102
+ * Assign a dev domain name to a project.
103
+ * - When running in interactive mode, it will prompt the user with a suggested domain name.
104
+ * - When running in non interactive mode, it will auto-assign the suggested domain name.
105
+ */
106
+ async function assignDevDomainNameAsync({ graphqlClient, appId, nonInteractive, }) {
107
+ let devDomainName = await queries_1.DeploymentsQuery.getSuggestedDevDomainByAppIdAsync(graphqlClient, {
108
+ appId,
109
+ });
110
+ if (!nonInteractive) {
111
+ devDomainName = await promptDevDomainNameAsync(devDomainName);
112
+ }
101
113
  try {
102
- const success = await mutations_1.DeploymentsMutation.assignDevDomainNameAsync(graphqlClient, {
114
+ return await mutations_1.DeploymentsMutation.assignDevDomainNameAsync(graphqlClient, {
103
115
  appId,
104
- name,
116
+ name: devDomainName,
105
117
  });
106
- if (!success) {
107
- throw new Error('Failed to assign preview URL');
108
- }
109
118
  }
110
119
  catch (error) {
111
120
  const isChosenNameTaken = error?.graphQLErrors?.some(e => ['DEV_DOMAIN_NAME_TAKEN'].includes(e?.extensions?.errorCode));
112
- if (isChosenNameTaken) {
113
- log_1.default.error(`The preview URL "${name}" is already taken, choose a different URL.`);
114
- await chooseDevDomainNameAsync({ graphqlClient, appId, initial });
115
- }
121
+ // Throw unexpected errors eagerly
116
122
  if (!isChosenNameTaken) {
117
123
  throw error;
118
124
  }
125
+ if (!nonInteractive) {
126
+ log_1.default.error(`The preview URL "${devDomainName}" is already taken, choose a different URL.`);
127
+ }
128
+ return await assignDevDomainNameAsync({ graphqlClient, appId, nonInteractive });
119
129
  }
120
130
  }
131
+ exports.assignDevDomainNameAsync = assignDevDomainNameAsync;
121
132
  async function assignWorkerDeploymentAliasAsync({ graphqlClient, appId, deploymentId, aliasName, }) {
122
133
  return await mutations_1.DeploymentsMutation.assignAliasAsync(graphqlClient, {
123
134
  appId,
@@ -126,16 +126,14 @@ async function* batchUploadAsync(uploads) {
126
126
  }
127
127
  yield await Promise.race(queue);
128
128
  }
129
+ if (queue.size > 0) {
130
+ controller.abort();
131
+ }
129
132
  }
130
133
  catch (error) {
131
- if (typeof error !== 'object' || error.name !== 'AbortError') {
134
+ if (error.name !== 'AbortError') {
132
135
  throw error;
133
136
  }
134
137
  }
135
- finally {
136
- if (queue.size > 0) {
137
- controller.abort();
138
- }
139
- }
140
138
  }
141
139
  exports.batchUploadAsync = batchUploadAsync;
@@ -8,7 +8,7 @@ type WorkerDeploymentData = {
8
8
  /** The actual deployment information */
9
9
  deployment: Pick<WorkerDeploymentFragment, 'deploymentIdentifier' | 'url'>;
10
10
  /** All modified aliases of the deployment, if any */
11
- aliases?: WorkerDeploymentAliasFragment[];
11
+ aliases?: (WorkerDeploymentAliasFragment | null)[];
12
12
  /** The production promoting alias of the deployment, if any */
13
13
  production?: WorkerDeploymentAliasFragment | null;
14
14
  };
@@ -16,19 +16,20 @@ export declare function formatWorkerDeploymentTable(data: WorkerDeploymentData):
16
16
  type WorkerDeploymentOutput = {
17
17
  /** The absolute URL to the dashboard on `expo.dev` */
18
18
  dashboardUrl: string;
19
- /** The deployment information */
20
- deployment: {
21
- identifier: string;
19
+ /** The deployment identifier */
20
+ identifier: string;
21
+ /** The deployment URL */
22
+ url: string;
23
+ /** Custom aliases, if assigned */
24
+ aliases?: {
25
+ id: string;
26
+ url: string;
27
+ name: string;
28
+ }[];
29
+ /** The production alias, if assigned */
30
+ production?: {
31
+ id: string;
22
32
  url: string;
23
- aliases?: {
24
- id: string;
25
- name: string;
26
- url: string;
27
- }[];
28
- production?: {
29
- id: string;
30
- url: string;
31
- };
32
33
  };
33
34
  };
34
35
  export declare function formatWorkerDeploymentJson(data: WorkerDeploymentData): WorkerDeploymentOutput;
@@ -19,7 +19,10 @@ function formatWorkerDeploymentTable(data) {
19
19
  { label: 'Deployment URL', value: data.deployment.url },
20
20
  ];
21
21
  if (data.aliases?.length) {
22
- fields.push({ label: 'Alias URL', value: data.aliases[0].url });
22
+ const alias = data.aliases.filter(Boolean)[0];
23
+ if (alias) {
24
+ fields.push({ label: 'Alias URL', value: alias.url });
25
+ }
23
26
  }
24
27
  if (data.production) {
25
28
  fields.push({ label: 'Production URL', value: data.production.url });
@@ -30,25 +33,22 @@ function formatWorkerDeploymentTable(data) {
30
33
  }
31
34
  exports.formatWorkerDeploymentTable = formatWorkerDeploymentTable;
32
35
  function formatWorkerDeploymentJson(data) {
36
+ const aliases = !data.aliases
37
+ ? []
38
+ : data.aliases.filter(Boolean);
33
39
  return {
34
40
  dashboardUrl: getDashboardUrl(data.projectId),
35
- deployment: {
36
- identifier: data.deployment.deploymentIdentifier,
37
- url: data.deployment.url,
38
- aliases: !data.aliases?.length
39
- ? undefined
40
- : data.aliases.map(alias => ({
41
- id: alias.id,
42
- name: alias.aliasName,
43
- url: alias.url,
44
- })),
45
- production: !data.production
46
- ? undefined
47
- : {
48
- id: data.production.id,
49
- url: data.production.url,
50
- },
51
- },
41
+ identifier: data.deployment.deploymentIdentifier,
42
+ url: data.deployment.url,
43
+ aliases: !aliases.length
44
+ ? undefined
45
+ : aliases.map(alias => ({ id: alias.id, url: alias.url, name: alias.aliasName })),
46
+ production: !data.production
47
+ ? undefined
48
+ : {
49
+ id: data.production.id,
50
+ url: data.production.url,
51
+ },
52
52
  };
53
53
  }
54
54
  exports.formatWorkerDeploymentJson = formatWorkerDeploymentJson;