eas-cli 0.32.0 → 0.34.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 (110) hide show
  1. package/README.md +29 -28
  2. package/build/analytics.js +3 -9
  3. package/build/build/android/UpdatesModule.js +4 -15
  4. package/build/build/android/configure.js +3 -3
  5. package/build/build/android/graphql.js +2 -4
  6. package/build/build/android/prepareJob.js +4 -3
  7. package/build/build/build.js +2 -2
  8. package/build/build/configure.js +26 -13
  9. package/build/build/ios/UpdatesModule.js +6 -18
  10. package/build/build/ios/configure.js +1 -1
  11. package/build/build/ios/graphql.js +2 -23
  12. package/build/build/ios/prepareJob.js +4 -6
  13. package/build/build/metadata.js +5 -10
  14. package/build/build/utils/appJson.d.ts +1 -0
  15. package/build/build/utils/appJson.js +13 -4
  16. package/build/build/utils/devClient.d.ts +4 -4
  17. package/build/build/utils/devClient.js +16 -21
  18. package/build/build/utils/repository.js +10 -7
  19. package/build/build/validate.js +4 -4
  20. package/build/commandUtils/EasCommand.d.ts +1 -0
  21. package/build/commandUtils/EasCommand.js +21 -0
  22. package/build/commands/branch/create.js +3 -2
  23. package/build/commands/branch/delete.js +1 -1
  24. package/build/commands/branch/list.js +1 -1
  25. package/build/commands/branch/publish.js +20 -48
  26. package/build/commands/branch/view.js +1 -1
  27. package/build/commands/build/index.d.ts +1 -1
  28. package/build/commands/build/index.js +64 -49
  29. package/build/commands/channel/edit.js +1 -1
  30. package/build/commands/channel/list.js +1 -1
  31. package/build/commands/channel/view.js +1 -1
  32. package/build/commands/diagnostics.js +2 -2
  33. package/build/commands/project/info.js +1 -1
  34. package/build/commands/submit.js +15 -8
  35. package/build/commands/update/view.js +1 -1
  36. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
  37. package/build/credentials/credentialsJson/update.js +5 -4
  38. package/build/credentials/ios/IosCredentialsProvider.js +1 -1
  39. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  40. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  41. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
  42. package/build/credentials/ios/actions/DistributionCertificateUtils.js +5 -7
  43. package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
  44. package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
  45. package/build/credentials/ios/actions/SetupTargetBuildCredentials.js +1 -1
  46. package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
  47. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
  48. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
  49. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
  50. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
  51. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
  52. package/build/credentials/ios/utils/printCredentials.js +30 -1
  53. package/build/credentials/manager/Actions.d.ts +47 -0
  54. package/build/credentials/manager/Actions.js +48 -0
  55. package/build/credentials/manager/AndroidActions.d.ts +6 -0
  56. package/build/credentials/manager/AndroidActions.js +114 -0
  57. package/build/credentials/manager/IosActions.d.ts +6 -0
  58. package/build/credentials/manager/IosActions.js +110 -0
  59. package/build/credentials/manager/ManageAndroid.d.ts +1 -29
  60. package/build/credentials/manager/ManageAndroid.js +26 -159
  61. package/build/credentials/manager/ManageIos.d.ts +1 -29
  62. package/build/credentials/manager/ManageIos.js +28 -155
  63. package/build/graphql/client.d.ts +8 -2
  64. package/build/graphql/generated.d.ts +131 -143
  65. package/build/graphql/generated.js +44 -28
  66. package/build/graphql/queries/BuildQuery.js +4 -1
  67. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
  68. package/build/graphql/queries/ProjectQuery.js +3 -1
  69. package/build/graphql/queries/PublishQuery.js +4 -1
  70. package/build/graphql/queries/SubmissionQuery.js +5 -2
  71. package/build/graphql/queries/UserQuery.js +4 -1
  72. package/build/graphql/queries/WebhookQuery.js +6 -2
  73. package/build/graphql/types/credentials/AppStoreConnectApiKey.d.ts +1 -0
  74. package/build/graphql/types/credentials/AppStoreConnectApiKey.js +23 -0
  75. package/build/graphql/types/credentials/IosAppCredentials.js +6 -0
  76. package/build/log.d.ts +0 -2
  77. package/build/log.js +2 -12
  78. package/build/project/android/applicationId.d.ts +1 -1
  79. package/build/project/android/applicationId.js +7 -6
  80. package/build/project/ios/bundleIdentifier.d.ts +1 -1
  81. package/build/project/ios/bundleIdentifier.js +7 -6
  82. package/build/project/projectUtils.js +1 -1
  83. package/build/project/publish.js +2 -2
  84. package/build/project/workflow.js +2 -2
  85. package/build/submit/ArchiveSource.js +4 -4
  86. package/build/submit/ios/IosSubmitCommand.js +4 -0
  87. package/build/submit/ios/IosSubmitter.js +1 -1
  88. package/build/user/User.js +1 -0
  89. package/build/utils/easCli.d.ts +1 -0
  90. package/build/utils/easCli.js +5 -0
  91. package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
  92. package/build/utils/{expoCommand.js → expoCli.js} +0 -0
  93. package/build/utils/profiles.d.ts +11 -0
  94. package/build/utils/profiles.js +46 -0
  95. package/build/vcs/clients/git.d.ts +26 -0
  96. package/build/vcs/clients/git.js +184 -0
  97. package/build/vcs/clients/gitNoCommit.d.ts +7 -0
  98. package/build/vcs/clients/gitNoCommit.js +27 -0
  99. package/build/vcs/clients/noVcs.d.ts +6 -0
  100. package/build/vcs/clients/noVcs.js +19 -0
  101. package/build/vcs/git.d.ts +10 -17
  102. package/build/vcs/git.js +7 -175
  103. package/build/vcs/index.d.ts +2 -2
  104. package/build/vcs/index.js +15 -6
  105. package/build/vcs/local.d.ts +18 -5
  106. package/build/vcs/local.js +61 -32
  107. package/build/vcs/vcs.d.ts +2 -1
  108. package/build/vcs/vcs.js +8 -4
  109. package/oclif.manifest.json +1 -1
  110. package/package.json +9 -9
@@ -27,7 +27,9 @@ exports.EnvironmentSecretsQuery = {
27
27
  }
28
28
  }
29
29
  ${(0, graphql_1.print)(EnvironmentSecret_1.EnvironmentSecretFragmentNode)}
30
- `, { accountName })
30
+ `, { accountName }, {
31
+ additionalTypenames: ['EnvironmentSecret'],
32
+ })
31
33
  .toPromise());
32
34
  return data.account.byName.environmentSecrets;
33
35
  },
@@ -47,7 +49,7 @@ exports.EnvironmentSecretsQuery = {
47
49
  }
48
50
  }
49
51
  ${(0, graphql_1.print)(EnvironmentSecret_1.EnvironmentSecretFragmentNode)}
50
- `, { appId })
52
+ `, { appId }, { additionalTypenames: ['EnvironmentSecret'] })
51
53
  .toPromise());
52
54
  return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.environmentSecrets) !== null && _b !== void 0 ? _b : [];
53
55
  },
@@ -15,7 +15,9 @@ exports.ProjectQuery = {
15
15
  }
16
16
  }
17
17
  }
18
- `, { username, slug })
18
+ `, { username, slug }, {
19
+ additionalTypenames: ['App', 'Snack'] /* typenames that use the Project type*/,
20
+ })
19
21
  .toPromise());
20
22
  return data.project.byUsernameAndSlug;
21
23
  },
@@ -18,7 +18,10 @@ exports.PublishQuery = {
18
18
  }
19
19
  `, {
20
20
  storageKeys,
21
- }, { requestPolicy: 'network-only' } // Since we reptitively query this to monitor the asset upload, we need to ensure it is not cached.
21
+ }, {
22
+ requestPolicy: 'network-only',
23
+ additionalTypenames: ['AssetMetadataResult'],
24
+ } // Since we reptitively query this to monitor the asset upload, we need to ensure it is not cached.
22
25
  )
23
26
  .toPromise());
24
27
  return data.asset.metadata;
@@ -19,7 +19,10 @@ exports.SubmissionQuery = {
19
19
  }
20
20
  }
21
21
  ${(0, graphql_1.print)(Submission_1.SubmissionFragmentNode)}
22
- `, { submissionId }, { requestPolicy: useCache ? 'cache-first' : 'network-only' })
22
+ `, { submissionId }, {
23
+ requestPolicy: useCache ? 'cache-first' : 'network-only',
24
+ additionalTypenames: ['Submission'],
25
+ })
23
26
  .toPromise());
24
27
  return data.submissions.byId;
25
28
  },
@@ -49,7 +52,7 @@ exports.SubmissionQuery = {
49
52
  }
50
53
  }
51
54
  ${(0, graphql_1.print)(Submission_1.SubmissionFragmentNode)}
52
- `, { appId, offset, limit, status, platform })
55
+ `, { appId, offset, limit, status, platform }, { additionalTypenames: ['Submission'] })
53
56
  .toPromise());
54
57
  return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.submissions) !== null && _b !== void 0 ? _b : [];
55
58
  },
@@ -25,7 +25,10 @@ exports.UserQuery = {
25
25
  isExpoAdmin
26
26
  }
27
27
  }
28
- `)
28
+ `,
29
+ /* variables */ undefined, {
30
+ additionalTypenames: ['User'],
31
+ })
29
32
  .toPromise());
30
33
  return data.meActor;
31
34
  },
@@ -23,7 +23,9 @@ exports.WebhookQuery = {
23
23
  }
24
24
  }
25
25
  ${(0, graphql_1.print)(Webhook_1.WebhookFragmentNode)}
26
- `, { appId, webhookFilter })
26
+ `, { appId, webhookFilter }, {
27
+ additionalTypenames: ['Webhook'],
28
+ })
27
29
  .toPromise());
28
30
  return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.webhooks) !== null && _b !== void 0 ? _b : [];
29
31
  },
@@ -39,7 +41,9 @@ exports.WebhookQuery = {
39
41
  }
40
42
  }
41
43
  ${(0, graphql_1.print)(Webhook_1.WebhookFragmentNode)}
42
- `, { webhookId })
44
+ `, { webhookId }, {
45
+ additionalTypenames: ['Webhook'],
46
+ })
43
47
  .toPromise());
44
48
  return data.webhook.byId;
45
49
  },
@@ -0,0 +1 @@
1
+ export declare const AppStoreConnectApiKeyFragmentNode: import("graphql").DocumentNode;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppStoreConnectApiKeyFragmentNode = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
6
+ const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
7
+ const AppleTeam_1 = require("./AppleTeam");
8
+ exports.AppStoreConnectApiKeyFragmentNode = (0, graphql_tag_1.default) `
9
+ fragment AppStoreConnectApiKeyFragment on AppStoreConnectApiKey {
10
+ id
11
+ appleTeam {
12
+ id
13
+ ...AppleTeamFragment
14
+ }
15
+ issuerIdentifier
16
+ keyIdentifier
17
+ name
18
+ roles
19
+ createdAt
20
+ updatedAt
21
+ }
22
+ ${(0, graphql_1.print)(AppleTeam_1.AppleTeamFragmentNode)}
23
+ `;
@@ -4,6 +4,7 @@ exports.CommonIosAppCredentialsFragmentNode = exports.CommonIosAppCredentialsWit
4
4
  const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
6
6
  const App_1 = require("../App");
7
+ const AppStoreConnectApiKey_1 = require("./AppStoreConnectApiKey");
7
8
  const AppleAppIdentifier_1 = require("./AppleAppIdentifier");
8
9
  const ApplePushKey_1 = require("./ApplePushKey");
9
10
  const AppleTeam_1 = require("./AppleTeam");
@@ -27,11 +28,16 @@ exports.CommonIosAppCredentialsWithoutBuildCredentialsFragmentNode = (0, graphql
27
28
  id
28
29
  ...ApplePushKeyFragment
29
30
  }
31
+ appStoreConnectApiKeyForSubmissions {
32
+ id
33
+ ...AppStoreConnectApiKeyFragment
34
+ }
30
35
  }
31
36
  ${App_1.AppFragmentNode}
32
37
  ${AppleTeam_1.AppleTeamFragmentNode}
33
38
  ${AppleAppIdentifier_1.AppleAppIdentifierFragmentNode}
34
39
  ${ApplePushKey_1.ApplePushKeyFragmentNode}
40
+ ${AppStoreConnectApiKey_1.AppStoreConnectApiKeyFragmentNode}
35
41
  `;
36
42
  exports.CommonIosAppCredentialsFragmentNode = (0, graphql_tag_1.default) `
37
43
  fragment CommonIosAppCredentialsFragment on IosAppCredentials {
package/build/log.d.ts CHANGED
@@ -11,8 +11,6 @@ export default class Log {
11
11
  static succeed(message: string): void;
12
12
  static withTick(...args: any[]): void;
13
13
  private static consoleLog;
14
- private static consoleWarn;
15
- private static consoleError;
16
14
  private static withTextColor;
17
15
  private static isLastLineNewLine;
18
16
  private static updateIsLastLineNewLine;
package/build/log.js CHANGED
@@ -20,10 +20,10 @@ class Log {
20
20
  }
21
21
  }
22
22
  static error(...args) {
23
- Log.consoleError(...Log.withTextColor(args, chalk_1.default.red));
23
+ Log.consoleLog(...Log.withTextColor(args, chalk_1.default.red));
24
24
  }
25
25
  static warn(...args) {
26
- Log.consoleWarn(...Log.withTextColor(args, chalk_1.default.yellow));
26
+ Log.consoleLog(...Log.withTextColor(args, chalk_1.default.yellow));
27
27
  }
28
28
  static debug(...args) {
29
29
  if (Log.isDebug) {
@@ -47,16 +47,6 @@ class Log {
47
47
  // eslint-disable-next-line no-console
48
48
  console.log(...args);
49
49
  }
50
- static consoleWarn(...args) {
51
- Log.updateIsLastLineNewLine(args);
52
- // eslint-disable-next-line no-console
53
- console.warn(...args);
54
- }
55
- static consoleError(...args) {
56
- Log.updateIsLastLineNewLine(args);
57
- // eslint-disable-next-line no-console
58
- console.error(...args);
59
- }
60
50
  static withTextColor(args, chalkColor) {
61
51
  return args.map(arg => chalkColor(arg));
62
52
  }
@@ -2,4 +2,4 @@ import { ExpoConfig } from '@expo/config';
2
2
  import { GradleBuildContext } from './gradle';
3
3
  export declare function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir: string, exp: ExpoConfig): Promise<string>;
4
4
  export declare function getApplicationIdAsync(projectDir: string, exp: ExpoConfig, gradleContext?: GradleBuildContext): Promise<string>;
5
- export declare function warnIfAndroidPackageDefinedInAppConfigForGenericProject(projectDir: string, exp: ExpoConfig): void;
5
+ export declare function warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir: string, exp: ExpoConfig): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.warnIfAndroidPackageDefinedInAppConfigForGenericProject = exports.getApplicationIdAsync = exports.ensureApplicationIdIsDefinedForManagedProjectAsync = void 0;
3
+ exports.warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject = exports.getApplicationIdAsync = exports.ensureApplicationIdIsDefinedForManagedProjectAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const config_plugins_1 = require("@expo/config-plugins");
@@ -9,6 +9,7 @@ const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
9
9
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
10
10
  const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
11
11
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
12
+ const appJson_1 = require("../../build/utils/appJson");
12
13
  const log_1 = (0, tslib_1.__importStar)(require("../../log"));
13
14
  const projectUtils_1 = require("../../project/projectUtils");
14
15
  const prompts_1 = require("../../prompts");
@@ -32,7 +33,7 @@ exports.ensureApplicationIdIsDefinedForManagedProjectAsync = ensureApplicationId
32
33
  async function getApplicationIdAsync(projectDir, exp, gradleContext) {
33
34
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
34
35
  if (workflow === eas_build_job_1.Workflow.GENERIC) {
35
- warnIfAndroidPackageDefinedInAppConfigForGenericProject(projectDir, exp);
36
+ warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir, exp);
36
37
  const errorMessage = 'Could not read application id from Android project.';
37
38
  if (gradleContext) {
38
39
  const buildGradle = await gradleUtils.getAppBuildGradleAsync(projectDir);
@@ -90,7 +91,7 @@ async function configureApplicationIdAsync(projectDir, exp) {
90
91
  initial: suggestedAndroidApplicationId,
91
92
  validate: value => (isApplicationIdValid(value) ? true : INVALID_APPLICATION_ID_MESSAGE),
92
93
  });
93
- const rawStaticConfig = await fs_extra_1.default.readJSON(paths.staticConfigPath);
94
+ const rawStaticConfig = (0, appJson_1.readAppJson)(paths.staticConfigPath);
94
95
  rawStaticConfig.expo = {
95
96
  ...rawStaticConfig.expo,
96
97
  android: { ...(_a = rawStaticConfig.expo) === null || _a === void 0 ? void 0 : _a.android, package: packageName },
@@ -103,14 +104,14 @@ function isApplicationIdValid(applicationId) {
103
104
  return /^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(applicationId);
104
105
  }
105
106
  let warnPrinted = false;
106
- function warnIfAndroidPackageDefinedInAppConfigForGenericProject(projectDir, exp) {
107
+ function warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir, exp) {
107
108
  if (config_plugins_1.AndroidConfig.Package.getPackage(exp) && !warnPrinted) {
108
- log_1.default.warn(`Specifying "android.package" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is deprecated for generic projects.\n` +
109
+ log_1.default.warn(`Specifying "android.package" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is deprecated for bare workflow projects.\n` +
109
110
  'EAS Build depends only on the value in the native code. Please remove the deprecated configuration.');
110
111
  warnPrinted = true;
111
112
  }
112
113
  }
113
- exports.warnIfAndroidPackageDefinedInAppConfigForGenericProject = warnIfAndroidPackageDefinedInAppConfigForGenericProject;
114
+ exports.warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject = warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject;
114
115
  async function getSuggestedApplicationIdAsync(exp) {
115
116
  // Attempt to use the ios bundle id first since it's convenient to have them aligned.
116
117
  const maybeBundleId = config_plugins_1.IOSConfig.BundleIdentifier.getBundleIdentifier(exp);
@@ -4,5 +4,5 @@ export declare function getBundleIdentifierAsync(projectDir: string, exp: ExpoCo
4
4
  targetName?: string;
5
5
  buildConfiguration?: string;
6
6
  }): Promise<string>;
7
- export declare function warnIfBundleIdentifierDefinedInAppConfigForGenericProject(projectDir: string, exp: ExpoConfig): void;
7
+ export declare function warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir: string, exp: ExpoConfig): void;
8
8
  export declare function isWildcardBundleIdentifier(bundleIdentifier: string): boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isWildcardBundleIdentifier = exports.warnIfBundleIdentifierDefinedInAppConfigForGenericProject = exports.getBundleIdentifierAsync = exports.ensureBundleIdentifierIsDefinedForManagedProjectAsync = void 0;
3
+ exports.isWildcardBundleIdentifier = exports.warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject = exports.getBundleIdentifierAsync = exports.ensureBundleIdentifierIsDefinedForManagedProjectAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const config_plugins_1 = require("@expo/config-plugins");
@@ -8,6 +8,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
8
8
  const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
9
9
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
10
10
  const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
11
+ const appJson_1 = require("../../build/utils/appJson");
11
12
  const log_1 = (0, tslib_1.__importStar)(require("../../log"));
12
13
  const prompts_1 = require("../../prompts");
13
14
  const actions_1 = require("../../user/actions");
@@ -28,7 +29,7 @@ exports.ensureBundleIdentifierIsDefinedForManagedProjectAsync = ensureBundleIden
28
29
  async function getBundleIdentifierAsync(projectDir, exp, { targetName, buildConfiguration } = {}) {
29
30
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
30
31
  if (workflow === eas_build_job_1.Workflow.GENERIC) {
31
- warnIfBundleIdentifierDefinedInAppConfigForGenericProject(projectDir, exp);
32
+ warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir, exp);
32
33
  const bundleIdentifier = config_plugins_1.IOSConfig.BundleIdentifier.getBundleIdentifierFromPbxproj(projectDir, {
33
34
  targetName,
34
35
  buildConfiguration,
@@ -77,7 +78,7 @@ async function configureBundleIdentifierAsync(projectDir, exp) {
77
78
  initial: suggestedBundleIdentifier,
78
79
  validate: value => (isBundleIdentifierValid(value) ? true : INVALID_BUNDLE_IDENTIFIER_MESSAGE),
79
80
  });
80
- const rawStaticConfig = await fs_extra_1.default.readJSON(paths.staticConfigPath);
81
+ const rawStaticConfig = (0, appJson_1.readAppJson)(paths.staticConfigPath);
81
82
  rawStaticConfig.expo = {
82
83
  ...rawStaticConfig.expo,
83
84
  ios: { ...(_a = rawStaticConfig.expo) === null || _a === void 0 ? void 0 : _a.ios, bundleIdentifier },
@@ -90,14 +91,14 @@ function isBundleIdentifierValid(bundleIdentifier) {
90
91
  return /^[a-zA-Z0-9-.]+$/.test(bundleIdentifier);
91
92
  }
92
93
  let warnPrinted = false;
93
- function warnIfBundleIdentifierDefinedInAppConfigForGenericProject(projectDir, exp) {
94
+ function warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir, exp) {
94
95
  if (config_plugins_1.IOSConfig.BundleIdentifier.getBundleIdentifier(exp) && !warnPrinted) {
95
- log_1.default.warn(`Specifying "ios.bundleIdentifier" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is deprecated for generic projects.\n` +
96
+ log_1.default.warn(`Specifying "ios.bundleIdentifier" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is deprecated for bare workflow projects.\n` +
96
97
  'EAS Build depends only on the value in the native code. Please remove the deprecated configuration.');
97
98
  warnPrinted = true;
98
99
  }
99
100
  }
100
- exports.warnIfBundleIdentifierDefinedInAppConfigForGenericProject = warnIfBundleIdentifierDefinedInAppConfigForGenericProject;
101
+ exports.warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject = warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject;
101
102
  function isWildcardBundleIdentifier(bundleIdentifier) {
102
103
  const wildcardRegex = /^[A-Za-z0-9.-]+\*$/;
103
104
  return wildcardRegex.test(bundleIdentifier);
@@ -184,7 +184,7 @@ async function getBranchByNameAsync({ appId, name, }) {
184
184
  `, {
185
185
  appId,
186
186
  name,
187
- })
187
+ }, { additionalTypenames: ['UpdateBranch'] })
188
188
  .toPromise());
189
189
  return data.app.byId.updateBranchByName;
190
190
  }
@@ -13,7 +13,7 @@ const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
13
13
  const PublishQuery_1 = require("../graphql/queries/PublishQuery");
14
14
  const log_1 = (0, tslib_1.__importDefault)(require("../log"));
15
15
  const uploads_1 = require("../uploads");
16
- const expoCommand_1 = require("../utils/expoCommand");
16
+ const expoCli_1 = require("../utils/expoCli");
17
17
  const uniqBy_1 = (0, tslib_1.__importDefault)(require("../utils/expodash/uniqBy"));
18
18
  exports.TIMEOUT_LIMIT = 60000; // 1 minute
19
19
  const fileMetadataJoi = joi_1.default.object({
@@ -108,7 +108,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
108
108
  throw new Error('Could not locate package.json');
109
109
  }
110
110
  log_1.default.withTick(`Building bundle with expo-cli...`);
111
- await (0, expoCommand_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle']);
111
+ await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle']);
112
112
  }
113
113
  exports.buildBundlesAsync = buildBundlesAsync;
114
114
  async function resolveInputDirectoryAsync(customInputDirectory) {
@@ -6,7 +6,7 @@ const config_plugins_1 = require("@expo/config-plugins");
6
6
  const eas_build_job_1 = require("@expo/eas-build-job");
7
7
  const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
8
8
  const path_1 = (0, tslib_1.__importDefault)(require("path"));
9
- const vcs_1 = (0, tslib_1.__importDefault)(require("../vcs"));
9
+ const vcs_1 = require("../vcs");
10
10
  async function resolveWorkflowAsync(projectDir, platform) {
11
11
  let platformWorkflowMarker;
12
12
  try {
@@ -19,7 +19,7 @@ async function resolveWorkflowAsync(projectDir, platform) {
19
19
  return eas_build_job_1.Workflow.MANAGED;
20
20
  }
21
21
  if (await fs_extra_1.default.pathExists(platformWorkflowMarker)) {
22
- return (await vcs_1.default.isFileIgnoredAsync(path_1.default.relative(projectDir, platformWorkflowMarker)))
22
+ return (await (0, vcs_1.getVcsClient)().isFileIgnoredAsync(path_1.default.relative(projectDir, platformWorkflowMarker)))
23
23
  ? eas_build_job_1.Workflow.MANAGED
24
24
  : eas_build_job_1.Workflow.GENERIC;
25
25
  }
@@ -218,16 +218,16 @@ async function handlePromptSourceAsync(source) {
218
218
  message: 'What would you like to submit?',
219
219
  choices: [
220
220
  {
221
- title: 'Selected build from EAS',
221
+ title: 'Select a build from EAS',
222
222
  value: ArchiveSourceType.buildList,
223
223
  },
224
- { title: 'I have a url to the app archive', value: ArchiveSourceType.url },
224
+ { title: 'Provide a URL to the app archive', value: ArchiveSourceType.url },
225
225
  {
226
- title: 'Local app binary file',
226
+ title: 'Provide a path to a local app binary file',
227
227
  value: ArchiveSourceType.path,
228
228
  },
229
229
  {
230
- title: 'A build identified by a build ID',
230
+ title: 'Provide a build ID to identify a build on EAS',
231
231
  value: ArchiveSourceType.buildId,
232
232
  },
233
233
  ],
@@ -141,6 +141,7 @@ class IosSubmitCommand {
141
141
  }
142
142
  }
143
143
  async resolveAppleIdUsernameAsync() {
144
+ var _a;
144
145
  if (this.ctx.profile.appleId) {
145
146
  return (0, results_1.result)(this.ctx.profile.appleId);
146
147
  }
@@ -148,6 +149,9 @@ class IosSubmitCommand {
148
149
  if (envAppleId) {
149
150
  return (0, results_1.result)(envAppleId);
150
151
  }
152
+ if ((_a = this.ctx.credentialsCtx.appStore.authCtx) === null || _a === void 0 ? void 0 : _a.appleId) {
153
+ return (0, results_1.result)(this.ctx.credentialsCtx.appStore.authCtx.appleId);
154
+ }
151
155
  // Get the email address that was last used and set it as
152
156
  // the default value for quicker authentication.
153
157
  const lastAppleId = await UserSettings_1.default.getAsync('appleId', null);
@@ -65,7 +65,7 @@ class IosSubmitter extends BaseSubmitter_1.default {
65
65
  // structuring order affects table rows order
66
66
  return {
67
67
  ascAppIdentifier,
68
- appleIdUsername,
68
+ appleIdUsername: appleIdUsername !== null && appleIdUsername !== void 0 ? appleIdUsername : undefined,
69
69
  projectId,
70
70
  ...(ascApiKeyResult
71
71
  ? { formattedAscApiKey: formatServiceAccountSummary(ascApiKeyResult) }
@@ -61,6 +61,7 @@ async function loginAsync({ username, password, otp, }) {
61
61
  'expo-session': sessionSecret,
62
62
  },
63
63
  },
64
+ additionalTypenames: [] /* UserQuery has immutable fields */,
64
65
  })
65
66
  .toPromise();
66
67
  const { data } = result;
@@ -0,0 +1 @@
1
+ export declare const easCliVersion: string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.easCliVersion = void 0;
4
+ const packageJSON = require('../../package.json');
5
+ exports.easCliVersion = packageJSON.version;
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ import { Platform } from '@expo/eas-build-job';
2
+ export declare type ProfileData<T> = {
3
+ profile: T;
4
+ platform: Platform;
5
+ profileName: string;
6
+ };
7
+ export declare function getProfilesAsync<T>({ platforms, profileName: profileNameArg, readProfileAsync, }: {
8
+ platforms: Platform[];
9
+ profileName?: string | null;
10
+ readProfileAsync: (platform: Platform, profileName: string) => Promise<T>;
11
+ }): Promise<ProfileData<T>[]>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProfilesAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const eas_json_1 = require("@expo/eas-json");
6
+ const log_1 = (0, tslib_1.__importDefault)(require("../log"));
7
+ async function getProfilesAsync({ platforms, profileName: profileNameArg,
8
+ // eslint-disable-next-line async-protect/async-suffix
9
+ readProfileAsync, }) {
10
+ const results = platforms.map(async function (platform) {
11
+ let profile;
12
+ let profileName = profileNameArg;
13
+ if (!profileName) {
14
+ try {
15
+ profile = await readProfileAsync(platform, 'production');
16
+ profileName = 'production';
17
+ }
18
+ catch (errorOuter) {
19
+ if (errorOuter instanceof eas_json_1.errors.InvalidEasJsonError) {
20
+ throw errorOuter;
21
+ }
22
+ try {
23
+ profile = await readProfileAsync(platform, 'release');
24
+ profileName = 'release';
25
+ log_1.default.warn('The default profile changed from "release" to "production". We detected that you still have a "release" build profile, so we are using it. Update eas.json to have a profile named "production" under the `build` key, or specify which profile you\'d like to use with the --profile flag. This fallback behavior will be removed in the next major version of EAS CLI.');
26
+ }
27
+ catch (errorInner) {
28
+ if (errorInner instanceof eas_json_1.errors.InvalidEasJsonError) {
29
+ throw errorInner;
30
+ }
31
+ throw new Error('There is no profile named "production" in eas.json');
32
+ }
33
+ }
34
+ }
35
+ else {
36
+ profile = await readProfileAsync(platform, profileName);
37
+ }
38
+ return {
39
+ profile,
40
+ profileName,
41
+ platform,
42
+ };
43
+ });
44
+ return await Promise.all(results);
45
+ }
46
+ exports.getProfilesAsync = getProfilesAsync;
@@ -0,0 +1,26 @@
1
+ import { Client } from '../vcs';
2
+ export default class GitClient extends Client {
3
+ ensureRepoExistsAsync(): Promise<void>;
4
+ commitAsync({ commitMessage, commitAllFiles, }: {
5
+ commitMessage: string;
6
+ commitAllFiles?: boolean;
7
+ }): Promise<void>;
8
+ isCommitRequiredAsync(): Promise<boolean>;
9
+ hasUncommittedChangesAsync(): Promise<boolean>;
10
+ getRootPathAsync(): Promise<string>;
11
+ makeShallowCopyAsync(destinationPath: string): Promise<void>;
12
+ getCommitHashAsync(): Promise<string | undefined>;
13
+ trackFileAsync(file: string): Promise<void>;
14
+ getBranchNameAsync(): Promise<string | null>;
15
+ getLastCommitMessageAsync(): Promise<string | null>;
16
+ showDiffAsync(): Promise<void>;
17
+ isFileUntrackedAsync(path: string): Promise<boolean>;
18
+ isFileIgnoredAsync(filePath: string): Promise<boolean>;
19
+ }
20
+ /**
21
+ * Checks if git is configured to be case sensitive
22
+ * @returns {boolean | undefined}
23
+ * - boolean - is git case sensitive
24
+ * - undefined - case sensitivity is not configured and git is using default behavior
25
+ */
26
+ export declare function isGitCaseSensitiveAsync(): Promise<boolean | undefined>;