eas-cli 9.0.3 → 9.0.5
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 +59 -59
- package/build/analytics/AnalyticsManager.js +4 -5
- package/build/api.js +1 -2
- package/build/branch/actions/SelectBranch.js +2 -3
- package/build/branch/queries.js +3 -5
- package/build/branch/utils.js +1 -1
- package/build/build/android/build.js +3 -5
- package/build/build/android/graphql.js +1 -2
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.js +1 -1
- package/build/build/android/version.js +14 -16
- package/build/build/build.js +8 -10
- package/build/build/createContext.js +7 -8
- package/build/build/ios/build.js +2 -4
- package/build/build/ios/credentials.js +1 -2
- package/build/build/ios/graphql.js +4 -6
- package/build/build/ios/prepareJob.js +5 -6
- package/build/build/ios/syncProjectConfiguration.js +1 -1
- package/build/build/ios/version.js +17 -20
- package/build/build/local.js +2 -3
- package/build/build/metadata.js +9 -10
- package/build/build/queries.js +6 -9
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +19 -13
- package/build/build/utils/appJson.js +1 -2
- package/build/build/utils/formatBuild.js +5 -8
- package/build/build/utils/printBuildInfo.js +1 -2
- package/build/build/utils/resourceClass.js +3 -4
- package/build/build/utils/url.js +1 -2
- package/build/build/validate.js +8 -11
- package/build/channel/actions/SelectChannel.js +2 -3
- package/build/channel/errors.js +1 -1
- package/build/channel/queries.js +6 -10
- package/build/channel/utils.js +1 -1
- package/build/commandUtils/EasCommand.js +7 -6
- package/build/commandUtils/builds.js +3 -3
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/LoggedInContextField.js +1 -2
- package/build/commandUtils/context/MaybeLoggedInContextField.js +2 -3
- package/build/commandUtils/context/VcsClientContextField.js +1 -1
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +4 -6
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +2 -4
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -2
- package/build/commandUtils/pagination.js +3 -4
- package/build/commands/account/view.js +1 -2
- package/build/commands/branch/delete.js +1 -2
- package/build/commands/build/configure.js +1 -2
- package/build/commands/build/index.js +1 -2
- package/build/commands/build/internal.js +1 -2
- package/build/commands/build/resign.js +7 -7
- package/build/commands/build/run.js +2 -3
- package/build/commands/build/version/get.js +3 -4
- package/build/commands/build/version/set.js +5 -6
- package/build/commands/build/version/sync.js +5 -7
- package/build/commands/channel/rollout.js +1 -2
- package/build/commands/config.js +16 -14
- package/build/commands/credentials/configure-build.js +3 -3
- package/build/commands/credentials/index.js +1 -1
- package/build/commands/device/create.js +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/diagnostics.js +6 -2
- package/build/commands/project/init.js +11 -9
- package/build/commands/project/onboarding.js +192 -20
- package/build/commands/secret/delete.js +5 -5
- package/build/commands/update/index.js +5 -6
- package/build/commands/update/republish.js +1 -2
- package/build/commands/update/roll-back-to-embedded.js +3 -4
- package/build/credentials/android/AndroidCredentialsProvider.js +4 -5
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -3
- package/build/credentials/android/actions/DownloadKeystore.js +2 -3
- package/build/credentials/android/actions/RemoveFcm.js +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -5
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +3 -3
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +3 -3
- package/build/credentials/android/api/GraphqlClient.js +4 -8
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +1 -2
- package/build/credentials/android/utils/printCredentials.js +4 -4
- package/build/credentials/context.js +2 -3
- package/build/credentials/credentialsJson/update.js +14 -16
- package/build/credentials/errors.js +7 -5
- package/build/credentials/ios/IosCredentialsProvider.js +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -9
- package/build/credentials/ios/actions/AssignAscApiKey.js +2 -3
- package/build/credentials/ios/actions/AssignPushKey.js +2 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +3 -5
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +3 -4
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +3 -4
- package/build/credentials/ios/actions/SetUpAscApiKey.js +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -4
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +2 -3
- package/build/credentials/ios/api/GraphqlClient.js +11 -15
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +2 -4
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +1 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +1 -2
- package/build/credentials/ios/appstore/ascApiKey.js +6 -8
- package/build/credentials/ios/appstore/authenticate.js +2 -4
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
- package/build/credentials/ios/appstore/contractMessages.js +3 -5
- package/build/credentials/ios/appstore/distributionCertificate.js +2 -3
- package/build/credentials/ios/appstore/ensureAppExists.js +1 -2
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +5 -7
- package/build/credentials/ios/appstore/pushKey.js +2 -3
- package/build/credentials/ios/appstore/resolveCredentials.js +8 -9
- package/build/credentials/ios/errors.js +1 -1
- package/build/credentials/ios/utils/p12Certificate.js +1 -2
- package/build/credentials/ios/utils/provisioningProfile.js +1 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -7
- package/build/credentials/manager/ManageAndroid.js +2 -2
- package/build/credentials/manager/ManageIos.js +3 -4
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -2
- package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -1
- package/build/credentials/manager/SetUpAndroidBuildCredentials.js +2 -2
- package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
- package/build/credentials/utils/promptForCredentials.js +2 -3
- package/build/devices/actions/create/currentMachineMethod.js +4 -5
- package/build/devices/actions/create/developerPortalMethod.js +1 -2
- package/build/devices/actions/create/inputMethod.js +1 -1
- package/build/devices/context.js +1 -1
- package/build/devices/queries.js +3 -6
- package/build/devices/utils/errors.js +2 -2
- package/build/devices/utils/formatDevice.js +4 -6
- package/build/graphql/client.js +5 -8
- package/build/graphql/generated.d.ts +42 -0
- package/build/graphql/mutations/AppMutation.js +1 -2
- package/build/graphql/mutations/AppVersionMutation.js +1 -2
- package/build/graphql/mutations/BuildMutation.js +4 -8
- package/build/graphql/mutations/UserPreferencesMutation.js +2 -3
- package/build/graphql/queries/AppVersionQuery.js +1 -2
- package/build/graphql/queries/BranchQuery.js +1 -2
- package/build/graphql/queries/BuildQuery.js +1 -2
- package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -3
- package/build/graphql/queries/SubmissionQuery.js +1 -2
- package/build/graphql/queries/WebhookQuery.js +1 -2
- package/build/graphql/types/App.js +1 -0
- package/build/log.js +2 -2
- package/build/metadata/apple/config/reader.js +26 -32
- package/build/metadata/apple/config/writer.js +35 -39
- package/build/metadata/apple/rules/infoKeywordLength.js +2 -4
- package/build/metadata/apple/rules/infoRestrictedWords.js +2 -4
- package/build/metadata/apple/tasks/app-review-detail.js +1 -2
- package/build/metadata/apple/tasks/app-version.js +6 -8
- package/build/metadata/auth.js +1 -2
- package/build/metadata/config/resolve.js +2 -3
- package/build/metadata/config/validate.js +2 -4
- package/build/metadata/errors.js +3 -5
- package/build/metadata/upload.js +1 -2
- package/build/metadata/utils/retry.js +1 -2
- package/build/metadata/utils/telemetry.js +8 -11
- package/build/onboarding/runCommand.js +2 -2
- package/build/ora.js +1 -1
- package/build/project/android/applicationId.js +3 -4
- package/build/project/android/gradle.js +3 -4
- package/build/project/android/gradleUtils.js +4 -5
- package/build/project/expoConfig.js +3 -4
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
- package/build/project/ios/bundleIdentifier.js +7 -8
- package/build/project/ios/entitlements.js +1 -2
- package/build/project/ios/scheme.js +7 -6
- package/build/project/ios/target.js +17 -23
- package/build/project/metroConfig.js +1 -2
- package/build/project/projectUtils.js +5 -7
- package/build/project/publish.js +18 -27
- package/build/project/remoteVersionSource.js +6 -7
- package/build/project/resolveRuntimeVersionAsync.d.ts +2 -1
- package/build/project/resolveRuntimeVersionAsync.js +3 -4
- package/build/prompts.js +5 -7
- package/build/rollout/actions/CreateRollout.js +4 -5
- package/build/rollout/actions/EditRollout.js +1 -2
- package/build/rollout/actions/EndRollout.js +2 -4
- package/build/rollout/actions/ManageRollout.js +1 -2
- package/build/rollout/actions/NonInteractiveRollout.js +1 -2
- package/build/rollout/actions/SelectRuntime.js +2 -4
- package/build/rollout/utils.js +4 -5
- package/build/run/android/adb.js +4 -7
- package/build/run/ios/xcode.js +1 -2
- package/build/run/ios/xcrun.js +1 -2
- package/build/run/utils.js +2 -4
- package/build/submit/ArchiveSource.js +1 -1
- package/build/submit/android/AndroidSubmitCommand.js +3 -5
- package/build/submit/android/AndroidSubmitter.js +3 -3
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/ios/AppProduce.js +5 -4
- package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
- package/build/submit/ios/AscApiKeySource.js +5 -3
- package/build/submit/ios/IosSubmitCommand.js +2 -3
- package/build/submit/ios/IosSubmitter.js +1 -1
- package/build/submit/ios/utils/language.js +3 -4
- package/build/submit/submit.js +2 -3
- package/build/submit/utils/errors.js +1 -2
- package/build/submit/utils/wait.js +1 -1
- package/build/update/android/UpdatesModule.js +1 -2
- package/build/update/configure.js +11 -14
- package/build/update/ios/UpdatesModule.js +2 -4
- package/build/update/queries.js +6 -10
- package/build/update/utils.js +28 -39
- package/build/user/SessionManager.js +5 -8
- package/build/user/User.js +2 -2
- package/build/user/expoSsoLauncher.js +1 -2
- package/build/utils/code-signing.js +4 -7
- package/build/utils/expoCli.js +1 -2
- package/build/utils/expoUpdatesCli.d.ts +1 -0
- package/build/utils/expoUpdatesCli.js +3 -2
- package/build/utils/profiles.js +3 -3
- package/build/utils/progress.js +2 -2
- package/build/utils/relay.js +10 -14
- package/build/utils/timer.js +1 -2
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +24 -20
- package/build/vcs/git.d.ts +1 -1
- package/build/vcs/git.js +4 -2
- package/build/vcs/local.js +1 -2
- package/build/webhooks/input.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -7,16 +7,15 @@ const FeatureGateEnvOverrides_1 = tslib_1.__importDefault(require("../gating/Fea
|
|
|
7
7
|
const FeatureGating_1 = tslib_1.__importDefault(require("../gating/FeatureGating"));
|
|
8
8
|
class MaybeLoggedInContextField extends ContextField_1.default {
|
|
9
9
|
async getValueAsync({ sessionManager }) {
|
|
10
|
-
var _a;
|
|
11
10
|
const authenticationInfo = {
|
|
12
11
|
accessToken: sessionManager.getAccessToken(),
|
|
13
12
|
sessionSecret: sessionManager.getSessionSecret(),
|
|
14
13
|
};
|
|
15
14
|
const graphqlClient = (0, createGraphqlClient_1.createGraphqlClient)(authenticationInfo);
|
|
16
15
|
const actor = await sessionManager.getUserAsync();
|
|
17
|
-
const featureGateServerValues =
|
|
16
|
+
const featureGateServerValues = actor?.featureGates ?? {};
|
|
18
17
|
return {
|
|
19
|
-
actor: actor
|
|
18
|
+
actor: actor ?? null,
|
|
20
19
|
featureGating: new FeatureGating_1.default(featureGateServerValues, new FeatureGateEnvOverrides_1.default()),
|
|
21
20
|
graphqlClient,
|
|
22
21
|
};
|
|
@@ -13,7 +13,7 @@ class VcsClientContextField extends ContextField_1.default {
|
|
|
13
13
|
const projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectDirAndVerifyProjectSetupAsync)();
|
|
14
14
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
15
15
|
const config = await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor);
|
|
16
|
-
return (0, vcs_1.resolveVcsClient)(config
|
|
16
|
+
return (0, vcs_1.resolveVcsClient)(config?.requireCommit);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
exports.default = VcsClientContextField;
|
|
@@ -17,7 +17,7 @@ function createGraphqlClient(authInfo) {
|
|
|
17
17
|
retryIf: (err, operation) => {
|
|
18
18
|
return !!(err &&
|
|
19
19
|
!operation.context.noRetry &&
|
|
20
|
-
(err.networkError || err.graphQLErrors.some(e =>
|
|
20
|
+
(err.networkError || err.graphQLErrors.some(e => e?.extensions?.isTransient)));
|
|
21
21
|
},
|
|
22
22
|
}),
|
|
23
23
|
core_1.fetchExchange,
|
|
@@ -15,12 +15,11 @@ const vcs_1 = require("../../../vcs");
|
|
|
15
15
|
async function applyCliConfigAsync(projectDir) {
|
|
16
16
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
17
17
|
const config = await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor);
|
|
18
|
-
if (
|
|
18
|
+
if (config?.version && !semver_1.default.satisfies(easCli_1.easCliVersion, config.version)) {
|
|
19
19
|
throw new Error(`You are on eas-cli@${easCli_1.easCliVersion} which does not satisfy the CLI version constraint defined in eas.json (${config.version}).\n\nThis error probably means that you need update your eas-cli to a newer version.\nRun ${chalk_1.default.bold('npm install -g eas-cli')} to update the eas-cli to the latest version.`);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
|
|
23
|
-
var _a;
|
|
24
23
|
let printCliVersionWarning = false;
|
|
25
24
|
const consoleWarn = (msg) => {
|
|
26
25
|
if (msg) {
|
|
@@ -36,7 +35,7 @@ async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
|
|
|
36
35
|
printCliVersionWarning = true;
|
|
37
36
|
consoleWarn(`Found ${chalk_1.default.bold('eas-cli')} in your project dependencies.`);
|
|
38
37
|
}
|
|
39
|
-
const maybeRepoRoot =
|
|
38
|
+
const maybeRepoRoot = PackageManagerUtils.findWorkspaceRoot(projectDir) ?? projectDir;
|
|
40
39
|
if (maybeRepoRoot !== projectDir && (await isEasCliInDependenciesAsync(maybeRepoRoot))) {
|
|
41
40
|
printCliVersionWarning = true;
|
|
42
41
|
consoleWarn(`Found ${chalk_1.default.bold('eas-cli')} in your monorepo dependencies.`);
|
|
@@ -48,11 +47,10 @@ async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
async function isEasCliInDependenciesAsync(dir) {
|
|
51
|
-
var _a, _b;
|
|
52
50
|
const packageJsonPath = path_1.default.join(dir, 'package.json');
|
|
53
51
|
const packageJson = JSON.parse(await fs_extra_1.default.readFile(packageJsonPath, 'utf8'));
|
|
54
|
-
return (
|
|
55
|
-
|
|
52
|
+
return (packageJson?.dependencies?.['eas-cli'] !== undefined ||
|
|
53
|
+
packageJson?.devDependencies?.['eas-cli'] !== undefined);
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* @returns the project root directory.
|
|
@@ -19,10 +19,9 @@ const User_1 = require("../../../user/User");
|
|
|
19
19
|
* @deprecated Should not be used outside of context functions except in the init command.
|
|
20
20
|
*/
|
|
21
21
|
async function saveProjectIdToAppConfigAsync(projectDir, projectId, options = {}) {
|
|
22
|
-
var _a;
|
|
23
22
|
const exp = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
|
|
24
23
|
const result = await (0, expoConfig_1.createOrModifyExpoConfigAsync)(projectDir, {
|
|
25
|
-
extra: { ...exp.extra, eas: { ...
|
|
24
|
+
extra: { ...exp.extra, eas: { ...exp.extra?.eas, projectId } },
|
|
26
25
|
}, { skipSDKVersionRequirement: true });
|
|
27
26
|
switch (result.type) {
|
|
28
27
|
case 'success':
|
|
@@ -68,8 +67,7 @@ async function getProjectIdAsync(sessionManager, exp, options) {
|
|
|
68
67
|
}
|
|
69
68
|
exports.getProjectIdAsync = getProjectIdAsync;
|
|
70
69
|
async function validateOrSetProjectIdAsync({ exp, graphqlClient, actor, options, }) {
|
|
71
|
-
|
|
72
|
-
const localProjectId = (_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.projectId;
|
|
70
|
+
const localProjectId = exp.extra?.eas?.projectId;
|
|
73
71
|
if (localProjectId) {
|
|
74
72
|
if (typeof localProjectId !== 'string') {
|
|
75
73
|
throw new Error(`Project config: "extra.eas.projectId" must be a string, found ${typeof localProjectId}. If you're not sure how to set it up on your own, remove the property entirely and it will be automatically configured on the next EAS CLI run.`);
|
|
@@ -25,8 +25,7 @@ class FeatureGateEnvOverrides {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
isOverridden(key) {
|
|
28
|
-
|
|
29
|
-
return (_a = this.map.has(key)) !== null && _a !== void 0 ? _a : false;
|
|
28
|
+
return this.map.has(key) ?? false;
|
|
30
29
|
}
|
|
31
30
|
getOverride(key) {
|
|
32
31
|
return (0, nullthrows_1.default)(this.map.get(key));
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EasPaginatedQueryFlags = exports.getLimitFlagWithCustomValues = exports.getPaginatedQueryOptions = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const getPaginatedQueryOptions = (flags) => {
|
|
6
|
-
var _a, _b, _c;
|
|
7
6
|
return {
|
|
8
7
|
...('limit' in flags && { limit: flags.limit }),
|
|
9
|
-
offset:
|
|
10
|
-
nonInteractive:
|
|
11
|
-
json:
|
|
8
|
+
offset: flags.offset ?? 0,
|
|
9
|
+
nonInteractive: flags['non-interactive'] ?? false,
|
|
10
|
+
json: flags.json ?? false,
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
exports.getPaginatedQueryOptions = getPaginatedQueryOptions;
|
|
@@ -31,11 +31,10 @@ class AccountView extends EasCommand_1.default {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
static getRoleOnAccount(actor, account) {
|
|
34
|
-
var _b;
|
|
35
34
|
if ('username' in actor && account.name === actor.username) {
|
|
36
35
|
return generated_1.Role.Owner;
|
|
37
36
|
}
|
|
38
|
-
return (0, nullthrows_1.default)(
|
|
37
|
+
return (0, nullthrows_1.default)(account.users.find(user => user.actor.id === actor.id)?.role);
|
|
39
38
|
}
|
|
40
39
|
static getLabelForRole(role) {
|
|
41
40
|
switch (role) {
|
|
@@ -52,7 +52,6 @@ async function deleteBranchOnAppAsync(graphqlClient, { branchId }) {
|
|
|
52
52
|
}
|
|
53
53
|
class BranchDelete extends EasCommand_1.default {
|
|
54
54
|
async runAsync() {
|
|
55
|
-
var _b, _c;
|
|
56
55
|
let { args: { name: branchName }, flags, } = await this.parse(_a);
|
|
57
56
|
const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
58
57
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
@@ -74,7 +73,7 @@ class BranchDelete extends EasCommand_1.default {
|
|
|
74
73
|
}));
|
|
75
74
|
}
|
|
76
75
|
const data = await getBranchInfoAsync(graphqlClient, { appId: projectId, name: branchName });
|
|
77
|
-
const branchId =
|
|
76
|
+
const branchId = data.app?.byId.updateBranchByName?.id;
|
|
78
77
|
if (!branchId) {
|
|
79
78
|
throw new Error(`Could not find branch ${branchName} on ${projectDisplayName}`);
|
|
80
79
|
}
|
|
@@ -18,7 +18,6 @@ const configure_2 = require("../../update/configure");
|
|
|
18
18
|
const UpdatesModule_2 = require("../../update/ios/UpdatesModule");
|
|
19
19
|
class BuildConfigure extends EasCommand_1.default {
|
|
20
20
|
async runAsync() {
|
|
21
|
-
var _b;
|
|
22
21
|
const { flags } = await this.parse(_a);
|
|
23
22
|
const { privateProjectConfig: { exp, projectId, projectDir }, vcsClient, } = await this.getContextAsync(_a, {
|
|
24
23
|
nonInteractive: false,
|
|
@@ -27,7 +26,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
27
26
|
// BuildConfigure.ContextOptions.Vcs.client.getValueAsync()
|
|
28
27
|
await vcsClient.ensureRepoExistsAsync();
|
|
29
28
|
const expoUpdatesIsInstalled = (0, projectUtils_1.isExpoUpdatesInstalled)(projectDir);
|
|
30
|
-
const platform =
|
|
29
|
+
const platform = flags.platform ?? (await promptForPlatformAsync());
|
|
31
30
|
// clean up old Android configuration
|
|
32
31
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
33
32
|
await (0, syncProjectConfiguration_1.cleanUpOldEasBuildGradleScriptAsync)(projectDir);
|
|
@@ -42,7 +42,6 @@ class Build extends EasCommand_1.default {
|
|
|
42
42
|
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, vcsClient, projectDir, flagsWithPlatform, actor, getDynamicPrivateProjectConfigAsync);
|
|
43
43
|
}
|
|
44
44
|
sanitizeFlags(flags) {
|
|
45
|
-
var _b;
|
|
46
45
|
const nonInteractive = flags['non-interactive'];
|
|
47
46
|
if (!flags.local && flags.output) {
|
|
48
47
|
core_1.Errors.error('--output is allowed only for local builds', { exit: 1 });
|
|
@@ -85,7 +84,7 @@ class Build extends EasCommand_1.default {
|
|
|
85
84
|
clearCache: flags['clear-cache'],
|
|
86
85
|
json: flags['json'],
|
|
87
86
|
autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
|
|
88
|
-
submitProfile:
|
|
87
|
+
submitProfile: flags['auto-submit-with-profile'] ?? profile,
|
|
89
88
|
resourceClass: flags['resource-class'],
|
|
90
89
|
message,
|
|
91
90
|
buildLoggerLevel: flags['build-logger-level'],
|
|
@@ -17,7 +17,6 @@ const gitNoCommit_1 = tslib_1.__importDefault(require("../../vcs/clients/gitNoCo
|
|
|
17
17
|
*/
|
|
18
18
|
class BuildInternal extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
|
-
var _b;
|
|
21
20
|
const { flags } = await this.parse(_a);
|
|
22
21
|
// This command is always run with implicit --non-interactive and --json options
|
|
23
22
|
(0, json_1.enableJsonOutput)();
|
|
@@ -38,7 +37,7 @@ class BuildInternal extends EasCommand_1.default {
|
|
|
38
37
|
localBuildOptions: {
|
|
39
38
|
localBuildMode: local_1.LocalBuildMode.INTERNAL,
|
|
40
39
|
},
|
|
41
|
-
submitProfile:
|
|
40
|
+
submitProfile: flags['auto-submit-with-profile'] ?? flags.profile,
|
|
42
41
|
}, actor, getDynamicPrivateProjectConfigAsync);
|
|
43
42
|
}
|
|
44
43
|
}
|
|
@@ -30,7 +30,6 @@ const json_1 = require("../../utils/json");
|
|
|
30
30
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
31
31
|
class BuildResign extends EasCommand_1.default {
|
|
32
32
|
async runAsync() {
|
|
33
|
-
var _b, _c, _d, _e, _f;
|
|
34
33
|
const { flags: rawFlags } = await this.parse(_a);
|
|
35
34
|
if (rawFlags.json) {
|
|
36
35
|
(0, json_1.enableJsonOutput)();
|
|
@@ -43,15 +42,16 @@ class BuildResign extends EasCommand_1.default {
|
|
|
43
42
|
const maybeBuild = flags.maybeBuildId
|
|
44
43
|
? await this.maybeGetBuildAsync(graphqlClient, flags.maybeBuildId)
|
|
45
44
|
: undefined;
|
|
46
|
-
const platform =
|
|
45
|
+
const platform = maybeBuild?.platform.toLowerCase() ??
|
|
46
|
+
(await (0, platform_1.selectPlatformAsync)(flags.platform));
|
|
47
47
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
48
48
|
throw new Error('Re-signing archives is not supported on Android yet.');
|
|
49
49
|
}
|
|
50
50
|
await (0, _1.handleDeprecatedEasJsonAsync)(projectDir, flags.nonInteractive);
|
|
51
51
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasBuild]);
|
|
52
52
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
53
|
-
const easJsonCliConfig = (
|
|
54
|
-
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform,
|
|
53
|
+
const easJsonCliConfig = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor)) ?? {};
|
|
54
|
+
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.profile ?? 'production');
|
|
55
55
|
const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: buildProfile.env });
|
|
56
56
|
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
57
57
|
const build = await this.ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset }, maybeBuild);
|
|
@@ -83,14 +83,14 @@ class BuildResign extends EasCommand_1.default {
|
|
|
83
83
|
vcsClient,
|
|
84
84
|
});
|
|
85
85
|
const credentialsResult = await (0, credentials_1.ensureIosCredentialsForBuildResignAsync)(credentialsCtx, targets, buildProfile);
|
|
86
|
-
(0, assert_1.default)(
|
|
86
|
+
(0, assert_1.default)(build.artifacts?.applicationArchiveUrl, 'Missing application archive.');
|
|
87
87
|
const jobOverrides = {
|
|
88
88
|
mode: generated_1.BuildMode.Resign,
|
|
89
89
|
type: generated_1.BuildWorkflow.Unknown,
|
|
90
90
|
resign: {
|
|
91
91
|
applicationArchiveSource: {
|
|
92
92
|
type: generated_1.ProjectArchiveSourceType.Url,
|
|
93
|
-
url:
|
|
93
|
+
url: build.artifacts?.applicationArchiveUrl,
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
secrets: (0, prepareJob_1.prepareCredentialsToResign)(credentialsResult.credentials),
|
|
@@ -146,7 +146,7 @@ class BuildResign extends EasCommand_1.default {
|
|
|
146
146
|
title: 'Which build would you like to re-sign with new credentials?',
|
|
147
147
|
paginatedQueryOptions: {
|
|
148
148
|
limit,
|
|
149
|
-
offset: offset
|
|
149
|
+
offset: offset ?? 0,
|
|
150
150
|
nonInteractive,
|
|
151
151
|
json: false,
|
|
152
152
|
},
|
|
@@ -174,7 +174,6 @@ function getEasBuildRunCachedAppPath(projectId, buildId, platform) {
|
|
|
174
174
|
return path_1.default.join((0, paths_1.getEasBuildRunCacheDirectoryPath)(), `${projectId}_${buildId}.${platform === generated_1.AppPlatform.Ios ? 'app' : 'apk'}`);
|
|
175
175
|
}
|
|
176
176
|
async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags, queryOptions) {
|
|
177
|
-
var _b, _c;
|
|
178
177
|
const maybeBuild = await maybeGetBuildAsync(graphqlClient, flags, projectId, queryOptions);
|
|
179
178
|
if (maybeBuild) {
|
|
180
179
|
const cachedAppPath = getEasBuildRunCachedAppPath(projectId, maybeBuild.id, flags.selectedPlatform);
|
|
@@ -183,7 +182,7 @@ async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags,
|
|
|
183
182
|
log_1.default.log(`Using cached app...`);
|
|
184
183
|
return cachedAppPath;
|
|
185
184
|
}
|
|
186
|
-
if (!
|
|
185
|
+
if (!maybeBuild.artifacts?.applicationArchiveUrl) {
|
|
187
186
|
throw new Error('Build does not have an application archive url');
|
|
188
187
|
}
|
|
189
188
|
return await (0, download_1.downloadAndMaybeExtractAppAsync)(maybeBuild.artifacts.applicationArchiveUrl, flags.selectedPlatform, cachedAppPath);
|
|
@@ -191,7 +190,7 @@ async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags,
|
|
|
191
190
|
if (flags.runArchiveFlags.url) {
|
|
192
191
|
return await (0, download_1.downloadAndMaybeExtractAppAsync)(flags.runArchiveFlags.url, flags.selectedPlatform);
|
|
193
192
|
}
|
|
194
|
-
if (
|
|
193
|
+
if (flags.runArchiveFlags.path?.endsWith('.tar.gz')) {
|
|
195
194
|
return await (0, download_1.extractAppFromLocalArchiveAsync)(flags.runArchiveFlags.path, flags.selectedPlatform);
|
|
196
195
|
}
|
|
197
196
|
// this should never fail, due to the validation in sanitizeFlagsAsync
|
|
@@ -17,7 +17,6 @@ const json_1 = require("../../../utils/json");
|
|
|
17
17
|
const profiles_1 = require("../../../utils/profiles");
|
|
18
18
|
class BuildVersionGetView extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
|
-
var _b;
|
|
21
20
|
const { flags } = await this.parse(_a);
|
|
22
21
|
if (flags.json) {
|
|
23
22
|
(0, json_1.enableJsonOutput)();
|
|
@@ -38,7 +37,7 @@ class BuildVersionGetView extends EasCommand_1.default {
|
|
|
38
37
|
type: 'build',
|
|
39
38
|
easJsonAccessor,
|
|
40
39
|
platforms,
|
|
41
|
-
profileName:
|
|
40
|
+
profileName: flags.profile ?? undefined,
|
|
42
41
|
projectDir,
|
|
43
42
|
});
|
|
44
43
|
const results = {};
|
|
@@ -58,8 +57,8 @@ class BuildVersionGetView extends EasCommand_1.default {
|
|
|
58
57
|
nonInteractive: flags['non-interactive'],
|
|
59
58
|
});
|
|
60
59
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
61
|
-
if (remoteVersions
|
|
62
|
-
results[platform] = remoteVersions
|
|
60
|
+
if (remoteVersions?.buildVersion) {
|
|
61
|
+
results[platform] = remoteVersions?.buildVersion;
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
if (flags.json) {
|
|
@@ -21,7 +21,6 @@ const remoteVersionSource_1 = require("../../../project/remoteVersionSource");
|
|
|
21
21
|
const prompts_1 = require("../../../prompts");
|
|
22
22
|
class BuildVersionSetView extends EasCommand_1.default {
|
|
23
23
|
async runAsync() {
|
|
24
|
-
var _b, _c, _d;
|
|
25
24
|
const { flags } = await this.parse(_a);
|
|
26
25
|
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(_a, {
|
|
27
26
|
nonInteractive: false,
|
|
@@ -29,7 +28,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
29
28
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
30
29
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
31
30
|
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor, { nonInteractive: false });
|
|
32
|
-
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform,
|
|
31
|
+
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.profile ?? undefined);
|
|
33
32
|
const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: profile.env });
|
|
34
33
|
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
35
34
|
(0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(exp, platform);
|
|
@@ -44,10 +43,10 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
44
43
|
nonInteractive: false,
|
|
45
44
|
});
|
|
46
45
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
47
|
-
const currentStateMessage =
|
|
46
|
+
const currentStateMessage = remoteVersions?.buildVersion
|
|
48
47
|
? `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" is configured with ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} ${remoteVersions.buildVersion}.`
|
|
49
48
|
: `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" does not have any ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} configured.`;
|
|
50
|
-
const versionPromptMessage =
|
|
49
|
+
const versionPromptMessage = remoteVersions?.buildVersion
|
|
51
50
|
? `What version would you like to set?`
|
|
52
51
|
: `What version would you like to initialize it with?`;
|
|
53
52
|
log_1.default.log(currentStateMessage);
|
|
@@ -63,9 +62,9 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
63
62
|
appId: projectId,
|
|
64
63
|
platform: (0, AppPlatform_1.toAppPlatform)(platform),
|
|
65
64
|
applicationIdentifier,
|
|
66
|
-
storeVersion:
|
|
65
|
+
storeVersion: exp.version ?? '1.0.0',
|
|
67
66
|
buildVersion: String(version),
|
|
68
|
-
runtimeVersion: (
|
|
67
|
+
runtimeVersion: (await (0, Updates_1.getRuntimeVersionNullableAsync)(projectDir, exp, platform)) ?? undefined,
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -24,7 +24,6 @@ const workflow_1 = require("../../../project/workflow");
|
|
|
24
24
|
const profiles_1 = require("../../../utils/profiles");
|
|
25
25
|
class BuildVersionSyncView extends EasCommand_1.default {
|
|
26
26
|
async runAsync() {
|
|
27
|
-
var _b;
|
|
28
27
|
const { flags } = await this.parse(_a);
|
|
29
28
|
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(_a, {
|
|
30
29
|
nonInteractive: true,
|
|
@@ -37,7 +36,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
37
36
|
type: 'build',
|
|
38
37
|
easJsonAccessor,
|
|
39
38
|
platforms,
|
|
40
|
-
profileName:
|
|
39
|
+
profileName: flags.profile ?? undefined,
|
|
41
40
|
projectDir,
|
|
42
41
|
});
|
|
43
42
|
for (const profileInfo of buildProfiles) {
|
|
@@ -58,12 +57,12 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
58
57
|
});
|
|
59
58
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(profileInfo.platform), applicationIdentifier);
|
|
60
59
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, profileInfo.platform, vcsClient);
|
|
61
|
-
if (!
|
|
60
|
+
if (!remoteVersions?.buildVersion) {
|
|
62
61
|
log_1.default.warn(`Skipping versions sync for ${platformDisplayName}. There are no versions configured on Expo servers, use "eas build:version:set" or run a build to initialize it.`);
|
|
63
62
|
continue;
|
|
64
63
|
}
|
|
65
64
|
if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
66
|
-
log_1.default.warn(`The remote value for the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} is ${chalk_1.default.bold(remoteVersions
|
|
65
|
+
log_1.default.warn(`The remote value for the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} is ${chalk_1.default.bold(remoteVersions?.buildVersion)}, but it was not synced to the local project. This command has no effect on projects using managed workflow.`);
|
|
67
66
|
continue;
|
|
68
67
|
}
|
|
69
68
|
if (profileInfo.platform === eas_build_job_1.Platform.ANDROID) {
|
|
@@ -86,7 +85,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
86
85
|
vcsClient,
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
|
-
log_1.default.withTick(`Successfully updated the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} in native code to ${chalk_1.default.bold(remoteVersions
|
|
88
|
+
log_1.default.withTick(`Successfully updated the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} in native code to ${chalk_1.default.bold(remoteVersions?.buildVersion)}.`);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
async syncIosAsync({ workflow, projectDir, exp, profile, buildVersion, vcsClient, }) {
|
|
@@ -110,13 +109,12 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
async syncAndroidAsync({ projectDir, workflow, buildVersion, }) {
|
|
113
|
-
var _b, _c;
|
|
114
112
|
if (!(0, versions_1.isValidVersionCode)(buildVersion)) {
|
|
115
113
|
throw new Error(`Invalid versionCode (${buildVersion}), ${versions_1.VERSION_CODE_REQUIREMENTS}.`);
|
|
116
114
|
}
|
|
117
115
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
118
116
|
const buildGradle = await (0, gradleUtils_1.getAppBuildGradleAsync)(projectDir);
|
|
119
|
-
const isMultiFlavor =
|
|
117
|
+
const isMultiFlavor = buildGradle.android?.productFlavors || buildGradle.android?.flavorDimensions;
|
|
120
118
|
if (isMultiFlavor) {
|
|
121
119
|
throw new Error("Versions in native code can't be automatically synced in multi-flavor Android projects. If you are using EAS Build with app version source set to remote, the correct values will be injected at the build time.");
|
|
122
120
|
}
|
|
@@ -54,7 +54,6 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
sanitizeArgsAndFlags(rawFlags) {
|
|
57
|
-
var _b;
|
|
58
57
|
const action = rawFlags.action;
|
|
59
58
|
return {
|
|
60
59
|
channelName: rawFlags.channel,
|
|
@@ -62,7 +61,7 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
62
61
|
outcome: rawFlags.outcome,
|
|
63
62
|
branchNameToRollout: rawFlags.branch,
|
|
64
63
|
runtimeVersion: rawFlags['runtime-version'],
|
|
65
|
-
privateKeyPath:
|
|
64
|
+
privateKeyPath: rawFlags['private-key-path'] ?? null,
|
|
66
65
|
action: action ? this.getAction(action) : undefined,
|
|
67
66
|
nonInteractive: rawFlags['non-interactive'],
|
|
68
67
|
json: rawFlags.json,
|
package/build/commands/config.js
CHANGED
|
@@ -25,20 +25,22 @@ class Config extends EasCommand_1.default {
|
|
|
25
25
|
nonInteractive: false,
|
|
26
26
|
});
|
|
27
27
|
const accessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
28
|
-
const profileName = maybeProfile
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
const profileName = maybeProfile ??
|
|
29
|
+
(await (0, prompts_1.selectAsync)('Select build profile', (await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(accessor)).map(profileName => ({
|
|
30
|
+
title: profileName,
|
|
31
|
+
value: profileName,
|
|
32
|
+
}))));
|
|
33
|
+
const platform = maybePlatform ??
|
|
34
|
+
(await (0, prompts_1.selectAsync)('Select platform', [
|
|
35
|
+
{
|
|
36
|
+
title: 'Android',
|
|
37
|
+
value: eas_build_job_1.Platform.ANDROID,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: 'iOS',
|
|
41
|
+
value: eas_build_job_1.Platform.IOS,
|
|
42
|
+
},
|
|
43
|
+
]));
|
|
42
44
|
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(accessor, platform, profileName);
|
|
43
45
|
if (flags['eas-json-only']) {
|
|
44
46
|
if (flags.json) {
|
|
@@ -10,14 +10,14 @@ const SetUpBuildCredentialsCommandAction_1 = require("../../credentials/manager/
|
|
|
10
10
|
const platform_1 = require("../../platform");
|
|
11
11
|
class InitializeBuildCredentials extends EasCommand_1.default {
|
|
12
12
|
async runAsync() {
|
|
13
|
-
var _b;
|
|
14
13
|
const { flags } = await this.parse(_a);
|
|
15
14
|
const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
|
|
16
15
|
nonInteractive: false,
|
|
17
16
|
});
|
|
18
17
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
19
|
-
const buildProfile =
|
|
20
|
-
|
|
18
|
+
const buildProfile = flags.profile ??
|
|
19
|
+
(await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(privateProjectConfig.projectDir, eas_build_job_1.Platform.IOS).getProfileNameFromEasConfigAsync());
|
|
20
|
+
await new SetUpBuildCredentialsCommandAction_1.SetUpBuildCredentialsCommandAction(actor, graphqlClient, vcsClient, analytics, privateProjectConfig ?? null, getDynamicPrivateProjectConfigAsync, platform, buildProfile, process.cwd()).runAsync();
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
_a = InitializeBuildCredentials;
|
|
@@ -11,7 +11,7 @@ class Credentials extends EasCommand_1.default {
|
|
|
11
11
|
const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
|
|
12
12
|
nonInteractive: false,
|
|
13
13
|
});
|
|
14
|
-
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig
|
|
14
|
+
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig ?? null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
_a = Credentials;
|
|
@@ -16,7 +16,7 @@ class DeviceCreate extends EasCommand_1.default {
|
|
|
16
16
|
appStore: new AppStoreApi_1.default(),
|
|
17
17
|
user: actor,
|
|
18
18
|
graphqlClient,
|
|
19
|
-
projectId: privateProjectConfig
|
|
19
|
+
projectId: privateProjectConfig?.projectId,
|
|
20
20
|
});
|
|
21
21
|
const manager = new manager_1.default(ctx);
|
|
22
22
|
await manager.createAsync();
|
|
@@ -3,9 +3,11 @@ var _a;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
7
|
const envinfo_1 = tslib_1.__importDefault(require("envinfo"));
|
|
7
8
|
const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
|
|
8
9
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
10
|
+
const ora_1 = require("../ora");
|
|
9
11
|
const workflow_1 = require("../project/workflow");
|
|
10
12
|
const easCli_1 = require("../utils/easCli");
|
|
11
13
|
class Diagnostics extends EasCommand_1.default {
|
|
@@ -13,6 +15,7 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
13
15
|
const { projectDir, vcsClient } = await this.getContextAsync(_a, {
|
|
14
16
|
nonInteractive: true,
|
|
15
17
|
});
|
|
18
|
+
const spinner = (0, ora_1.ora)().start(`Gathering diagnostic information...`);
|
|
16
19
|
const info = await envinfo_1.default.run({
|
|
17
20
|
System: ['OS', 'Shell'],
|
|
18
21
|
Binaries: ['Node', 'Yarn', 'npm'],
|
|
@@ -31,8 +34,9 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
31
34
|
],
|
|
32
35
|
npmGlobalPackages: ['eas-cli', 'expo-cli'],
|
|
33
36
|
}, {
|
|
34
|
-
title: `EAS CLI ${easCli_1.easCliVersion} environment info
|
|
37
|
+
title: chalk_1.default.bold(`EAS CLI ${easCli_1.easCliVersion} environment info`),
|
|
35
38
|
});
|
|
39
|
+
spinner.succeed('All needed information gathered!');
|
|
36
40
|
log_1.default.log(info.trimEnd());
|
|
37
41
|
await this.printWorkflowAsync(projectDir, vcsClient);
|
|
38
42
|
log_1.default.newLine();
|
|
@@ -44,7 +48,7 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
44
48
|
log_1.default.log(` Project workflow: ${androidWorkflow}`);
|
|
45
49
|
}
|
|
46
50
|
else {
|
|
47
|
-
log_1.default.log(` Project
|
|
51
|
+
log_1.default.log(` Project workflow:`);
|
|
48
52
|
log_1.default.log(` Android: ${androidWorkflow}`);
|
|
49
53
|
log_1.default.log(` iOS: ${iosWorkflow}`);
|
|
50
54
|
}
|