eas-cli 24.7.0 → 24.8.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.
- package/README.md +453 -244
- package/build/build/createContext.js +1 -2
- package/build/build/runBuildAndSubmit.js +4 -1
- package/build/commandUtils/supabase.d.ts +6 -1
- package/build/commandUtils/supabase.js +53 -0
- package/build/commandUtils/workflow/validation.d.ts +1 -0
- package/build/commandUtils/workflow/validation.js +8 -3
- package/build/commands/account/view.js +12 -0
- package/build/commands/integrations/asc/connect.js +3 -0
- package/build/commands/integrations/supabase/advisors.d.ts +16 -0
- package/build/commands/integrations/supabase/advisors.js +153 -0
- package/build/commands/simulator/availability.d.ts +0 -1
- package/build/commands/simulator/availability.js +0 -1
- package/build/commands/simulator/egress.d.ts +0 -1
- package/build/commands/simulator/egress.js +0 -1
- package/build/commands/simulator/events.d.ts +0 -1
- package/build/commands/simulator/events.js +0 -1
- package/build/commands/simulator/exec.d.ts +0 -1
- package/build/commands/simulator/exec.js +0 -1
- package/build/commands/simulator/get.d.ts +0 -1
- package/build/commands/simulator/get.js +0 -1
- package/build/commands/simulator/index.d.ts +2 -1
- package/build/commands/simulator/index.js +29 -11
- package/build/commands/simulator/list.d.ts +0 -1
- package/build/commands/simulator/list.js +0 -1
- package/build/commands/simulator/stop.d.ts +0 -1
- package/build/commands/simulator/stop.js +0 -1
- package/build/commands/submit/internal.d.ts +6 -0
- package/build/commands/submit/internal.js +6 -2
- package/build/credentials/context.js +7 -0
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +2 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +43 -4
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +5 -0
- package/build/credentials/ios/appstore/AppStoreApi.js +18 -9
- package/build/credentials/ios/appstore/authenticate.d.ts +6 -0
- package/build/credentials/ios/appstore/authenticate.js +22 -1
- package/build/credentials/ios/appstore/resolveCredentials.js +16 -4
- package/build/devices/actions/create/developerPortalMethod.js +1 -1
- package/build/env.d.ts +4 -0
- package/build/env.js +4 -0
- package/build/fetch.js +2 -2
- package/build/graphql/generated.d.ts +167 -7
- package/build/graphql/generated.js +14 -2
- package/build/graphql/queries/SupabaseQuery.d.ts +2 -1
- package/build/graphql/queries/SupabaseQuery.js +42 -0
- package/build/graphql/queries/WorkflowJobSshQuery.d.ts +1 -0
- package/build/graphql/queries/WorkflowJobSshQuery.js +43 -0
- package/build/graphql/types/SupabaseConnection.d.ts +9 -2
- package/build/graphql/types/SupabaseConnection.js +16 -1
- package/build/integrations/asc/ascApiKey.js +2 -1
- package/build/integrations/shared/envFile.js +5 -3
- package/build/integrations/supabase/provision.d.ts +2 -2
- package/build/integrations/supabase/provision.js +6 -4
- package/build/metadata/auth.js +4 -4
- package/build/submit/ios/AscApiKeySource.js +1 -1
- package/build/submit/ios/IosSubmitCommand.js +2 -2
- package/build/submit/ios/ensureTestFlightSetup.js +1 -4
- package/build/worker/upload.js +2 -2
- package/oclif.manifest.json +986 -882
- package/package.json +9 -8
- package/build/commandUtils/new/templates/CLAUDE.md +0 -1
|
@@ -101,7 +101,7 @@ async function pollProvisionReceiptAsync(graphqlClient, receipt, { startMessage,
|
|
|
101
101
|
throw toProvisionPollError(error, { hint: failureHint });
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive) {
|
|
104
|
+
async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive, previousUpdatedAt) {
|
|
105
105
|
if (nonInteractive) {
|
|
106
106
|
throw new Error(`Connecting Supabase requires approving access in a browser, which isn't possible in non-interactive mode. Re-run \`eas integrations:supabase:connect\` interactively.`);
|
|
107
107
|
}
|
|
@@ -114,7 +114,7 @@ async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive)
|
|
|
114
114
|
void (0, better_opn_1.default)(url).catch(() => false);
|
|
115
115
|
const spinner = (0, ora_1.ora)('Waiting for you to authorize in Supabase (up to 15 minutes; press Ctrl-C to cancel)').start();
|
|
116
116
|
try {
|
|
117
|
-
const connection = await pollForConnectionAsync(graphqlClient, account.id);
|
|
117
|
+
const connection = await pollForConnectionAsync(graphqlClient, account.id, previousUpdatedAt);
|
|
118
118
|
const organizations = await loadOrganizationsBestEffortAsync(graphqlClient, account.id);
|
|
119
119
|
spinner.succeed(`Connected Supabase organization ${chalk_1.default.bold((0, supabase_1.formatSupabaseOrganization)(connection, organizations ?? undefined))}`);
|
|
120
120
|
return connection;
|
|
@@ -132,7 +132,7 @@ async function loadOrganizationsBestEffortAsync(graphqlClient, accountId) {
|
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
async function pollForConnectionAsync(graphqlClient, accountId) {
|
|
135
|
+
async function pollForConnectionAsync(graphqlClient, accountId, previousUpdatedAt) {
|
|
136
136
|
const deadline = Date.now() + CONNECTION_POLL_TIMEOUT_MS;
|
|
137
137
|
let consecutiveErrors = 0;
|
|
138
138
|
for (;;) {
|
|
@@ -150,7 +150,9 @@ async function pollForConnectionAsync(graphqlClient, accountId) {
|
|
|
150
150
|
throw error;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
// Reauthorization updates the existing connection; its presence alone is not completion.
|
|
154
|
+
if (connection &&
|
|
155
|
+
(previousUpdatedAt === undefined || connection.updatedAt !== previousUpdatedAt)) {
|
|
154
156
|
return connection;
|
|
155
157
|
}
|
|
156
158
|
if (Date.now() >= deadline) {
|
package/build/metadata/auth.js
CHANGED
|
@@ -28,9 +28,9 @@ async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, vc
|
|
|
28
28
|
*/
|
|
29
29
|
async function tryResolveAscApiKeyAsync({ profile, graphqlClient, projectId, exp, bundleId, }) {
|
|
30
30
|
// 1. Check submit profile for ASC API key fields
|
|
31
|
-
if ('ascApiKeyPath' in profile && '
|
|
31
|
+
if ('ascApiKeyPath' in profile && 'ascApiKeyId' in profile) {
|
|
32
32
|
const { ascApiKeyPath, ascApiKeyIssuerId, ascApiKeyId } = profile;
|
|
33
|
-
if (ascApiKeyPath &&
|
|
33
|
+
if (ascApiKeyPath && ascApiKeyId) {
|
|
34
34
|
const keyP8 = await fs_1.default.promises.readFile(ascApiKeyPath, 'utf-8');
|
|
35
35
|
// Also try to get teamId from the profile if available
|
|
36
36
|
const teamId = 'appleTeamId' in profile ? profile.appleTeamId : undefined;
|
|
@@ -112,8 +112,8 @@ async function getAppStoreAuthAsync({ projectDir, profile, exp, credentialsCtx,
|
|
|
112
112
|
}
|
|
113
113
|
if (nonInteractive) {
|
|
114
114
|
throw new Error('No App Store Connect API Key found. In non-interactive mode, provide one via:\n' +
|
|
115
|
-
' - Environment variables: EXPO_ASC_API_KEY_PATH, EXPO_ASC_KEY_ID, EXPO_ASC_ISSUER_ID\n' +
|
|
116
|
-
' - eas.json submit profile: ascApiKeyPath, ascApiKeyId, ascApiKeyIssuerId\n' +
|
|
115
|
+
' - Environment variables: EXPO_ASC_API_KEY_PATH, EXPO_ASC_KEY_ID, EXPO_ASC_ISSUER_ID (omit the issuer ID for individual API keys)\n' +
|
|
116
|
+
' - eas.json submit profile: ascApiKeyPath, ascApiKeyId, ascApiKeyIssuerId (omit the issuer ID for individual API keys)\n' +
|
|
117
117
|
' - EAS credentials service: run `eas credentials` to set up an API key');
|
|
118
118
|
}
|
|
119
119
|
// Fall back to interactive cookie auth
|
|
@@ -107,7 +107,7 @@ async function handlePathSourceAsync(ctx, source) {
|
|
|
107
107
|
return source.path;
|
|
108
108
|
}
|
|
109
109
|
async function handlePromptSourceAsync(ctx, _source) {
|
|
110
|
-
const ascApiKeyPath = await (0, AscApiKeyUtils_1.promptForAscApiKeyPathAsync)(ctx.credentialsCtx);
|
|
110
|
+
const ascApiKeyPath = await (0, AscApiKeyUtils_1.promptForAscApiKeyPathAsync)(ctx.credentialsCtx, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
|
|
111
111
|
return await getAscApiKeyPathAsync(ctx, {
|
|
112
112
|
sourceType: AscApiKeySourceType.path,
|
|
113
113
|
path: ascApiKeyPath,
|
|
@@ -101,7 +101,7 @@ class IosSubmitCommand {
|
|
|
101
101
|
}
|
|
102
102
|
resolveAscApiKeySource() {
|
|
103
103
|
const { ascApiKeyPath, ascApiKeyIssuerId, ascApiKeyId } = this.ctx.profile;
|
|
104
|
-
if (ascApiKeyPath &&
|
|
104
|
+
if (ascApiKeyPath && ascApiKeyId) {
|
|
105
105
|
return (0, results_1.result)({
|
|
106
106
|
sourceType: AscApiKeySource_1.AscApiKeySourceType.path,
|
|
107
107
|
path: {
|
|
@@ -113,7 +113,7 @@ class IosSubmitCommand {
|
|
|
113
113
|
}
|
|
114
114
|
// interpret this to mean the user had some intention of passing in ASC Api key
|
|
115
115
|
if (ascApiKeyPath || ascApiKeyIssuerId || ascApiKeyId) {
|
|
116
|
-
const message = `ascApiKeyPath
|
|
116
|
+
const message = `ascApiKeyPath and ascApiKeyId must both be defined in eas.json (ascApiKeyIssuerId is also required unless the key is an individual API key)`;
|
|
117
117
|
// in non-interactive mode, we should fail
|
|
118
118
|
if (this.ctx.nonInteractive) {
|
|
119
119
|
throw new Error(message);
|
|
@@ -32,10 +32,7 @@ async function ensureTestFlightSetupForExistingAppAsync(ctx, ascAppIdentifier) {
|
|
|
32
32
|
const teamType = (0, resolveCredentials_1.resolveAppleTeamTypeFromEnvironment)() ?? authenticateTypes_1.AppleTeamType.COMPANY_OR_ORGANIZATION;
|
|
33
33
|
if ((0, resolveCredentials_1.hasAscEnvVars)()) {
|
|
34
34
|
const teamId = process.env.EXPO_APPLE_TEAM_ID;
|
|
35
|
-
if (!process.env.EXPO_ASC_API_KEY_PATH ||
|
|
36
|
-
!process.env.EXPO_ASC_KEY_ID ||
|
|
37
|
-
!process.env.EXPO_ASC_ISSUER_ID ||
|
|
38
|
-
!teamId) {
|
|
35
|
+
if (!process.env.EXPO_ASC_API_KEY_PATH || !process.env.EXPO_ASC_KEY_ID || !teamId) {
|
|
39
36
|
log_1.default.log('App Store Connect credentials are incomplete, skipping TestFlight setup');
|
|
40
37
|
return;
|
|
41
38
|
}
|
package/build/worker/upload.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.createProgressBar = createProgressBar;
|
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const cli_progress_1 = tslib_1.__importDefault(require("cli-progress"));
|
|
9
9
|
const https = tslib_1.__importStar(require("https"));
|
|
10
|
-
const https_proxy_agent_1 =
|
|
10
|
+
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
11
11
|
const node_fetch_1 = tslib_1.__importStar(require("node-fetch"));
|
|
12
12
|
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
13
13
|
const node_os_1 = tslib_1.__importDefault(require("node:os"));
|
|
@@ -47,7 +47,7 @@ const getAgent = () => {
|
|
|
47
47
|
return sharedAgent;
|
|
48
48
|
}
|
|
49
49
|
else if (process.env.https_proxy) {
|
|
50
|
-
return (sharedAgent =
|
|
50
|
+
return (sharedAgent = new https_proxy_agent_1.HttpsProxyAgent(process.env.https_proxy));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
return (sharedAgent = new https.Agent({
|