eas-cli 21.7.1 → 22.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 (90) hide show
  1. package/README.md +258 -153
  2. package/build/build/android/prepareJob.js +1 -0
  3. package/build/build/ios/prepareJob.js +1 -0
  4. package/build/build/metadata.js +0 -1
  5. package/build/build/runBuildAndSubmit.js +1 -1
  6. package/build/build/utils/formatBuild.js +2 -2
  7. package/build/build/utils/url.js +3 -5
  8. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +10 -3
  9. package/build/commandUtils/new/configs.js +1 -1
  10. package/build/commandUtils/supabase.d.ts +13 -0
  11. package/build/commandUtils/supabase.js +82 -0
  12. package/build/commands/account/view.js +1 -2
  13. package/build/commands/build/cancel.js +3 -3
  14. package/build/commands/build/download.js +1 -1
  15. package/build/commands/go.js +2 -45
  16. package/build/commands/integrations/supabase/connect.d.ts +26 -0
  17. package/build/commands/integrations/supabase/connect.js +404 -0
  18. package/build/commands/integrations/supabase/dashboard.d.ts +14 -0
  19. package/build/commands/integrations/supabase/dashboard.js +69 -0
  20. package/build/commands/integrations/supabase/disconnect.d.ts +15 -0
  21. package/build/commands/integrations/supabase/disconnect.js +87 -0
  22. package/build/commands/project/icon/set.js +4 -40
  23. package/build/commands/project/init.d.ts +1 -0
  24. package/build/commands/project/init.js +13 -0
  25. package/build/commands/submit.d.ts +1 -0
  26. package/build/commands/submit.js +8 -1
  27. package/build/commands/update/index.js +1 -1
  28. package/build/commands/update/revert-update-rollout.js +1 -1
  29. package/build/commands/update/rollback.js +1 -1
  30. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -13
  31. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +14 -2
  32. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +47 -7
  33. package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +3 -1
  34. package/build/credentials/ios/appstore/ensureTestFlightGroup.js +14 -11
  35. package/build/environments/defaults.d.ts +2 -0
  36. package/build/environments/defaults.js +5 -0
  37. package/build/environments/resolve.d.ts +10 -0
  38. package/build/environments/resolve.js +67 -0
  39. package/build/environments/variables.d.ts +18 -0
  40. package/build/environments/variables.js +124 -0
  41. package/build/graphql/client.d.ts +8 -0
  42. package/build/graphql/client.js +15 -0
  43. package/build/graphql/generated.d.ts +824 -948
  44. package/build/graphql/generated.js +12 -2
  45. package/build/graphql/mutations/SupabaseMutation.d.ts +14 -0
  46. package/build/graphql/mutations/SupabaseMutation.js +145 -0
  47. package/build/graphql/queries/ChannelInsightsQuery.js +4 -1
  48. package/build/graphql/queries/SupabaseQuery.d.ts +10 -0
  49. package/build/graphql/queries/SupabaseQuery.js +54 -0
  50. package/build/graphql/types/Account.js +1 -4
  51. package/build/graphql/types/Build.js +13 -8
  52. package/build/graphql/types/Submission.js +0 -1
  53. package/build/graphql/types/SupabaseConnection.d.ts +8 -0
  54. package/build/graphql/types/SupabaseConnection.js +25 -0
  55. package/build/graphql/types/Update.js +4 -1
  56. package/build/integrations/shared/envFile.d.ts +7 -0
  57. package/build/integrations/shared/envFile.js +94 -0
  58. package/build/integrations/shared/sdk.d.ts +24 -0
  59. package/build/integrations/shared/sdk.js +87 -0
  60. package/build/integrations/supabase/env.d.ts +14 -0
  61. package/build/integrations/supabase/env.js +68 -0
  62. package/build/integrations/supabase/provision.d.ts +32 -0
  63. package/build/integrations/supabase/provision.js +245 -0
  64. package/build/project/accountSelection.js +1 -3
  65. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
  66. package/build/project/projectIcon.d.ts +40 -0
  67. package/build/project/projectIcon.js +132 -0
  68. package/build/project/projectNotConfiguredError.d.ts +17 -0
  69. package/build/project/projectNotConfiguredError.js +24 -0
  70. package/build/submit/ArchiveSource.js +3 -3
  71. package/build/submit/context.d.ts +2 -0
  72. package/build/submit/context.js +1 -0
  73. package/build/submit/ios/AppProduce.js +1 -1
  74. package/build/submit/ios/IosSubmitCommand.js +2 -0
  75. package/build/submit/ios/ensureTestFlightSetup.d.ts +7 -0
  76. package/build/submit/ios/ensureTestFlightSetup.js +81 -0
  77. package/build/submit/status.js +1 -1
  78. package/build/submit/utils/formatSubmission.js +2 -2
  79. package/build/update/queries.js +1 -1
  80. package/build/update/republish.js +3 -3
  81. package/build/update/roll-back-to-embedded.js +1 -1
  82. package/build/update/utils.d.ts +2 -1
  83. package/build/update/utils.js +7 -7
  84. package/build/user/User.js +1 -1
  85. package/build/utils/pollForBackgroundJobReceiptAsync.d.ts +2 -0
  86. package/build/utils/pollForBackgroundJobReceiptAsync.js +11 -2
  87. package/build/utils/prompts.d.ts +0 -1
  88. package/build/utils/prompts.js +6 -17
  89. package/oclif.manifest.json +1725 -1411
  90. package/package.json +6 -6
@@ -83,6 +83,7 @@ async function prepareJobAsync(ctx, jobData) {
83
83
  }),
84
84
  experimental: {
85
85
  prebuildCommand: buildProfile.prebuildCommand,
86
+ uploadSourceMaps: buildProfile.uploadSourceMaps,
86
87
  },
87
88
  mode: buildMode,
88
89
  triggeredBy: eas_build_job_1.BuildTrigger.EAS_CLI,
@@ -78,6 +78,7 @@ async function prepareJobAsync(ctx, jobData) {
78
78
  }),
79
79
  experimental: {
80
80
  prebuildCommand: buildProfile.prebuildCommand,
81
+ uploadSourceMaps: buildProfile.uploadSourceMaps,
81
82
  },
82
83
  mode: buildMode,
83
84
  triggeredBy: eas_build_job_1.BuildTrigger.EAS_CLI,
@@ -60,7 +60,6 @@ async function collectMetadataAsync(ctx, runtimeAndFingerprintMetadata) {
60
60
  customWorkflowName: ctx.customBuildConfigMetadata?.workflowName,
61
61
  developmentClient: ctx.developmentClient,
62
62
  requiredPackageManager: ctx.requiredPackageManager ?? undefined,
63
- selectedImage: ctx.buildProfile.image,
64
63
  customNodeVersion: ctx.buildProfile.node,
65
64
  simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
66
65
  };
@@ -369,7 +369,7 @@ function exitWithNonZeroCodeIfSomeBuildsFailed(maybeBuilds) {
369
369
  }
370
370
  async function downloadAndRunAsync(build, simulator) {
371
371
  (0, assert_1.default)(build.artifacts?.applicationArchiveUrl);
372
- const cachedAppPath = (0, run_1.getEasBuildRunCachedAppPath)(build.project.id, build.id, build.platform);
372
+ const cachedAppPath = (0, run_1.getEasBuildRunCachedAppPath)(build.app.id, build.id, build.platform);
373
373
  if (await (0, fs_extra_1.pathExists)(cachedAppPath)) {
374
374
  log_1.default.newLine();
375
375
  log_1.default.log(`Using cached app...`);
@@ -88,7 +88,7 @@ function formatGraphQLBuild(build) {
88
88
  },
89
89
  {
90
90
  label: 'Channel',
91
- value: build.channel,
91
+ value: build.updateChannel?.name,
92
92
  },
93
93
  {
94
94
  label: 'SDK Version',
@@ -96,7 +96,7 @@ function formatGraphQLBuild(build) {
96
96
  },
97
97
  {
98
98
  label: 'Runtime Version',
99
- value: build.runtimeVersion,
99
+ value: build.runtime?.version,
100
100
  },
101
101
  {
102
102
  label: 'Version',
@@ -23,10 +23,8 @@ function getProjectPageUrl(accountName, projectName, page) {
23
23
  return new URL(page ? `${projectPath}/${page}` : projectPath, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
24
24
  }
25
25
  function getBuildLogsUrl(build, hash) {
26
- const { project } = build;
27
- const url = project.__typename !== 'App'
28
- ? `/builds/${build.id}`
29
- : `/accounts/${project.ownerAccount.name}/projects/${project.slug}/builds/${build.id}${hash ? `#${hash}` : ''}`;
26
+ const { app } = build;
27
+ const url = `/accounts/${app.ownerAccount.name}/projects/${app.slug}/builds/${build.id}${hash ? `#${hash}` : ''}`;
30
28
  return new URL(url, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
31
29
  }
32
30
  function getArtifactUrl(artifactId) {
@@ -34,7 +32,7 @@ function getArtifactUrl(artifactId) {
34
32
  }
35
33
  function getInternalDistributionInstallUrl(build) {
36
34
  if (build.platform === generated_1.AppPlatform.Ios) {
37
- return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}/v2/projects/${build.project.id}/builds/${build.id}/manifest.plist`;
35
+ return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}/v2/projects/${build.app.id}/builds/${build.id}/manifest.plist`;
38
36
  }
39
37
  (0, assert_1.default)(build.artifacts?.buildUrl, 'buildUrl is missing');
40
38
  return build.artifacts.buildUrl;
@@ -15,6 +15,7 @@ const ora_1 = require("../../../ora");
15
15
  const accountSelection_1 = require("../../../project/accountSelection");
16
16
  const expoConfig_1 = require("../../../project/expoConfig");
17
17
  const fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1 = require("../../../project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync");
18
+ const projectNotConfiguredError_1 = require("../../../project/projectNotConfiguredError");
18
19
  const prompts_1 = require("../../../prompts");
19
20
  const User_1 = require("../../../user/User");
20
21
  /**
@@ -106,7 +107,9 @@ async function validateOrSetProjectIdAsync({ exp, graphqlClient, actor, options,
106
107
  if (!projectDir) {
107
108
  throw new Error('This command must be run inside a project directory.');
108
109
  }
109
- log_1.default.warn('EAS project not configured.');
110
+ if (!options.nonInteractive) {
111
+ log_1.default.warn('EAS project not configured.');
112
+ }
110
113
  const accountName = await chooseAccountNameForEASProjectAsync(exp, actor, options);
111
114
  const projectId = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync)(graphqlClient, {
112
115
  accountName,
@@ -135,14 +138,18 @@ async function chooseAccountNameForEASProjectAsync(exp, actor, options) {
135
138
  return exp.owner;
136
139
  }
137
140
  if (actor.__typename === 'Robot') {
138
- throw new Error(`Project is not configured. When using a robot access token, run "eas init --account <name> --non-interactive" or set the "owner" field in your app config before managing the project. Accounts this token can create projects in: ${(0, User_1.getCreatableAccountNames)(actor).join(', ')}`);
141
+ throw (0, projectNotConfiguredError_1.getUnconfiguredProjectError)({
142
+ actor,
143
+ reason: 'A robot access token cannot configure it interactively.',
144
+ additionalFix: 'Alternatively, set the "owner" field in your app config.',
145
+ });
139
146
  }
140
147
  const allAccounts = actor.accounts;
141
148
  if (allAccounts.length === 1) {
142
149
  return allAccounts[0].name;
143
150
  }
144
151
  if (options.nonInteractive) {
145
- throw new Error(`Must configure EAS project by running 'eas init' before this command can be run in non-interactive mode.`);
152
+ throw (0, projectNotConfiguredError_1.getUnconfiguredProjectError)({ actor });
146
153
  }
147
154
  const choices = (0, accountSelection_1.getAccountChoices)(actor, (0, accountSelection_1.getAccountNamesWhereUserHasSufficientPermissionsToCreateApp)(actor));
148
155
  return (await (0, prompts_1.promptAsync)({
@@ -55,7 +55,7 @@ async function generateProjectConfigAsync(pathArg, options) {
55
55
  function getAccountPermissionsMap(actor) {
56
56
  const permissionsMap = new Map();
57
57
  for (const account of actor.accounts) {
58
- const hasPermission = account.users.find(it => it.actor.id === actor.id)?.role !== generated_1.Role.ViewOnly;
58
+ const hasPermission = account.viewerUserPermission.role !== generated_1.Role.ViewOnly;
59
59
  permissionsMap.set(account.name, hasPermission);
60
60
  }
61
61
  return permissionsMap;
@@ -0,0 +1,13 @@
1
+ import { SupabaseConnectionData, SupabaseOrganizationData, SupabaseProjectData } from '../graphql/types/SupabaseConnection';
2
+ export declare function getSupabaseProjectDashboardUrl(project: Pick<SupabaseProjectData, 'supabaseProjectRef'>): string;
3
+ /**
4
+ * Accepts whatever a user is likely to have on hand: the bare reference ID, the dashboard URL, or
5
+ * the project API URL. Supabase labels the ref "Reference ID" under Project Settings → General.
6
+ */
7
+ export declare function parseSupabaseProjectRef(input: string): string;
8
+ /** Prefer human-readable org name; Supabase slugs are often opaque ids like `ycjmzsygzfkryaazoitp`. */
9
+ export declare function formatSupabaseOrganization(connection: Pick<SupabaseConnectionData, 'supabaseOrganizationSlug' | 'supabaseOrganizationName'>, organizations?: readonly SupabaseOrganizationData[]): string;
10
+ /** Prefer human-readable project name over the opaque project ref. */
11
+ export declare function formatSupabaseProjectLabel(project: Pick<SupabaseProjectData, 'supabaseProjectRef' | 'supabaseProjectName'>): string;
12
+ export declare function formatSupabaseProject(project: SupabaseProjectData): string;
13
+ export declare function logNoSupabaseProject(projectName: string): void;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSupabaseProjectDashboardUrl = getSupabaseProjectDashboardUrl;
4
+ exports.parseSupabaseProjectRef = parseSupabaseProjectRef;
5
+ exports.formatSupabaseOrganization = formatSupabaseOrganization;
6
+ exports.formatSupabaseProjectLabel = formatSupabaseProjectLabel;
7
+ exports.formatSupabaseProject = formatSupabaseProject;
8
+ exports.logNoSupabaseProject = logNoSupabaseProject;
9
+ const tslib_1 = require("tslib");
10
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
11
+ const log_1 = tslib_1.__importStar(require("../log"));
12
+ function getSupabaseProjectDashboardUrl(project) {
13
+ return `https://supabase.com/dashboard/project/${encodeURIComponent(project.supabaseProjectRef)}`;
14
+ }
15
+ function extractProjectRefFromUrl(value) {
16
+ if (!/^https?:\/\//i.test(value)) {
17
+ return null;
18
+ }
19
+ let url;
20
+ try {
21
+ url = new URL(value);
22
+ }
23
+ catch {
24
+ return null;
25
+ }
26
+ const projectHost = url.hostname.match(/^([a-z0-9]+)\.supabase\./i);
27
+ if (projectHost) {
28
+ return projectHost[1];
29
+ }
30
+ const dashboardPath = url.pathname.match(/\/dashboard\/project\/([^/]+)/);
31
+ if (dashboardPath) {
32
+ return decodeURIComponent(dashboardPath[1]);
33
+ }
34
+ return null;
35
+ }
36
+ /**
37
+ * Accepts whatever a user is likely to have on hand: the bare reference ID, the dashboard URL, or
38
+ * the project API URL. Supabase labels the ref "Reference ID" under Project Settings → General.
39
+ */
40
+ function parseSupabaseProjectRef(input) {
41
+ const value = input.trim();
42
+ if (!value) {
43
+ throw new Error('No Supabase project given. Pass the project reference ID or its dashboard URL, for example --link jfurmbuioogljwsqwnpd.');
44
+ }
45
+ const ref = extractProjectRefFromUrl(value) ?? value;
46
+ if (!/^[a-z0-9]+$/i.test(ref)) {
47
+ throw new Error(`"${input}" is not a Supabase project reference ID. Supabase shows it as "Reference ID" under Project Settings → General; you can also paste the dashboard URL (https://supabase.com/dashboard/project/<ref>). Note that a project name is not a reference ID.`);
48
+ }
49
+ // Refs are lowercase, and the server matches them exactly.
50
+ return ref.toLowerCase();
51
+ }
52
+ /** Prefer human-readable org name; Supabase slugs are often opaque ids like `ycjmzsygzfkryaazoitp`. */
53
+ function formatSupabaseOrganization(connection, organizations = []) {
54
+ const slug = connection.supabaseOrganizationSlug;
55
+ const storedName = connection.supabaseOrganizationName;
56
+ const liveName = organizations.find(organization => organization.slug === slug)?.name;
57
+ const name = storedName || liveName;
58
+ if (name && name !== slug) {
59
+ return `${name} (${slug})`;
60
+ }
61
+ return slug;
62
+ }
63
+ /** Prefer human-readable project name over the opaque project ref. */
64
+ function formatSupabaseProjectLabel(project) {
65
+ const { supabaseProjectRef: ref, supabaseProjectName: name } = project;
66
+ if (name && name !== ref) {
67
+ return `${name} (${ref})`;
68
+ }
69
+ return ref;
70
+ }
71
+ function formatSupabaseProject(project) {
72
+ return [
73
+ `${chalk_1.default.bold('Name')}: ${project.supabaseProjectName}`,
74
+ `${chalk_1.default.bold('Ref')}: ${project.supabaseProjectRef}`,
75
+ `${chalk_1.default.bold('URL')}: ${project.supabaseProjectUrl}`,
76
+ `${chalk_1.default.bold('Region')}: ${project.supabaseRegion}`,
77
+ `${chalk_1.default.bold('Dashboard')}: ${(0, log_1.link)(getSupabaseProjectDashboardUrl(project), { dim: false })}`,
78
+ ].join('\n');
79
+ }
80
+ function logNoSupabaseProject(projectName) {
81
+ log_1.default.warn(`No Supabase project is linked to Expo app ${chalk_1.default.bold(projectName)} on EAS.`);
82
+ }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
5
- const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
6
5
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
7
6
  const generated_1 = require("../../graphql/generated");
8
7
  const log_1 = tslib_1.__importDefault(require("../../log"));
@@ -45,7 +44,7 @@ class AccountView extends EasCommand_1.default {
45
44
  if ('username' in actor && account.name === actor.username) {
46
45
  return generated_1.Role.Owner;
47
46
  }
48
- return (0, nullthrows_1.default)(account.users.find(user => user.actor.id === actor.id)?.role);
47
+ return account.viewerUserPermission.role;
49
48
  }
50
49
  static getLabelForRole(role) {
51
50
  switch (role) {
@@ -18,8 +18,8 @@ async function cancelBuildAsync(graphqlClient, buildId) {
18
18
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
19
19
  .mutation((0, graphql_tag_1.default) `
20
20
  mutation CancelBuildMutation($buildId: ID!) {
21
- build(buildId: $buildId) {
22
- cancel {
21
+ build {
22
+ cancelBuild(buildId: $buildId) {
23
23
  id
24
24
  status
25
25
  }
@@ -27,7 +27,7 @@ async function cancelBuildAsync(graphqlClient, buildId) {
27
27
  }
28
28
  `, { buildId })
29
29
  .toPromise());
30
- return data.build.cancel;
30
+ return data.build.cancelBuild;
31
31
  }
32
32
  async function selectBuildToCancelAsync(graphqlClient, projectId, projectDisplayName, filters) {
33
33
  const spinner = (0, ora_1.ora)().start('Fetching the uncompleted builds…');
@@ -168,7 +168,7 @@ class Download extends EasCommand_1.default {
168
168
  return builds[0];
169
169
  }
170
170
  async getPathToBuildArtifactAsync(build, platform) {
171
- const cachedBuildArtifactPath = (0, run_1.getEasBuildRunCachedAppPath)(build.project.id, build.id, platform);
171
+ const cachedBuildArtifactPath = (0, run_1.getEasBuildRunCachedAppPath)(build.app.id, build.id, platform);
172
172
  if (await fs_extra_1.default.pathExists(cachedBuildArtifactPath)) {
173
173
  log_1.default.newLine();
174
174
  log_1.default.log(`Using cached build...`);
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.detectProjectSdkVersionAsync = detectProjectSdkVersionAsync;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
- const apple_utils_1 = require("@expo/apple-utils");
7
6
  const core_1 = require("@oclif/core");
8
7
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
9
8
  const fs = tslib_1.__importStar(require("fs-extra"));
@@ -17,6 +16,7 @@ const SetUpAscApiKey_1 = require("../credentials/ios/actions/SetUpAscApiKey");
17
16
  const SetUpBuildCredentials_1 = require("../credentials/ios/actions/SetUpBuildCredentials");
18
17
  const SetUpPushKey_1 = require("../credentials/ios/actions/SetUpPushKey");
19
18
  const ensureAppExists_1 = require("../credentials/ios/appstore/ensureAppExists");
19
+ const ensureTestFlightGroup_1 = require("../credentials/ios/appstore/ensureTestFlightGroup");
20
20
  const generated_1 = require("../graphql/generated");
21
21
  const url_1 = require("../build/utils/url");
22
22
  const AppMutation_1 = require("../graphql/mutations/AppMutation");
@@ -49,51 +49,8 @@ async function detectProjectSdkVersionAsync(projectDir) {
49
49
  return;
50
50
  }
51
51
  }
52
- const TESTFLIGHT_GROUP_NAME = 'Team (Expo)';
53
52
  async function setupTestFlightAsync(ascApp) {
54
- let group;
55
- for (let attempt = 0; attempt < 10; attempt++) {
56
- try {
57
- const groups = await ascApp.getBetaGroupsAsync({
58
- query: { includes: ['betaTesters'] },
59
- });
60
- group = groups.find(g => g.attributes.isInternalGroup && g.attributes.name === TESTFLIGHT_GROUP_NAME);
61
- if (!group) {
62
- group = await ascApp.createBetaGroupAsync({
63
- name: TESTFLIGHT_GROUP_NAME,
64
- isInternalGroup: true,
65
- hasAccessToAllBuilds: true,
66
- });
67
- }
68
- break;
69
- }
70
- catch (error) {
71
- // Apple returns this error when the app isn't ready yet
72
- if (error?.data?.errors?.some((e) => e.code === 'ENTITY_ERROR.RELATIONSHIP.INVALID')) {
73
- if (attempt < 9) {
74
- await (0, promise_1.sleepAsync)(10_000);
75
- continue;
76
- }
77
- }
78
- throw error;
79
- }
80
- }
81
- if (!group) {
82
- throw new Error('Failed to create TestFlight group');
83
- }
84
- const users = await apple_utils_1.User.getAsync(ascApp.context);
85
- const admins = users.filter(u => u.attributes.roles?.includes(apple_utils_1.UserRole.ADMIN));
86
- const existingEmails = new Set(group.attributes.betaTesters?.map((t) => t.attributes.email?.toLowerCase()) ?? []);
87
- const newTesters = admins
88
- .filter(u => u.attributes.email && !existingEmails.has(u.attributes.email.toLowerCase()))
89
- .map(u => ({
90
- email: u.attributes.email,
91
- firstName: u.attributes.firstName ?? '',
92
- lastName: u.attributes.lastName ?? '',
93
- }));
94
- if (newTesters.length > 0) {
95
- await group.createBulkBetaTesterAssignmentsAsync(newTesters);
96
- }
53
+ await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(ascApp);
97
54
  }
98
55
  /* eslint-disable no-console */
99
56
  async function withSuppressedOutputAsync(fn) {
@@ -0,0 +1,26 @@
1
+ import EasCommand from '../../../commandUtils/EasCommand';
2
+ export default class IntegrationsSupabaseConnect extends EasCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static contextDefinition: {
6
+ loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
7
+ privateProjectConfig: import("../../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
8
+ };
9
+ static flags: {
10
+ region: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ organization: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ link: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ reauth: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ overwrite: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ runAsync(): Promise<void>;
20
+ private resolveProjectAfterReauthAsync;
21
+ private provisionAndPollPrimaryProjectAsync;
22
+ private runAdditionalEnvironmentSetupAsync;
23
+ private provisionAndPollAdditionalProjectAsync;
24
+ private additionalEnvWriteFailureError;
25
+ private printNextSteps;
26
+ }