eas-cli 14.5.0 → 14.6.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 (43) hide show
  1. package/README.md +126 -72
  2. package/build/build/android/graphql.js +2 -0
  3. package/build/build/android/prepareJob.js +1 -0
  4. package/build/build/android/version.d.ts +1 -0
  5. package/build/build/android/version.js +5 -1
  6. package/build/build/configure.d.ts +11 -0
  7. package/build/build/configure.js +46 -1
  8. package/build/build/evaluateConfigWithEnvVarsAsync.js +2 -4
  9. package/build/build/ios/build.js +2 -0
  10. package/build/build/ios/graphql.js +2 -0
  11. package/build/build/ios/prepareJob.js +1 -0
  12. package/build/build/ios/version.js +4 -1
  13. package/build/build/local.js +1 -1
  14. package/build/build/metadata.js +0 -1
  15. package/build/build/runBuildAndSubmit.d.ts +12 -1
  16. package/build/build/runBuildAndSubmit.js +16 -13
  17. package/build/build/utils/environment.d.ts +4 -0
  18. package/build/build/utils/environment.js +20 -0
  19. package/build/commands/build/dev.d.ts +23 -0
  20. package/build/commands/build/dev.js +225 -0
  21. package/build/commands/build/index.js +9 -1
  22. package/build/commands/build/inspect.js +26 -18
  23. package/build/commands/build/internal.js +22 -14
  24. package/build/commands/fingerprint/compare.d.ts +14 -1
  25. package/build/commands/fingerprint/compare.js +192 -53
  26. package/build/commands/project/onboarding.js +23 -14
  27. package/build/credentials/ios/appstore/ensureAppExists.d.ts +22 -1
  28. package/build/credentials/ios/appstore/ensureAppExists.js +73 -2
  29. package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +7 -0
  30. package/build/credentials/ios/appstore/ensureTestFlightGroup.js +158 -0
  31. package/build/credentials/ios/appstore/provisioningProfile.js +1 -0
  32. package/build/graphql/generated.d.ts +193 -3
  33. package/build/graphql/generated.js +11 -2
  34. package/build/graphql/queries/FingerprintQuery.d.ts +16 -0
  35. package/build/graphql/queries/FingerprintQuery.js +61 -0
  36. package/build/graphql/types/Fingerprint.js +18 -0
  37. package/build/project/ios/exemptEncryption.d.ts +7 -0
  38. package/build/project/ios/exemptEncryption.js +80 -0
  39. package/build/submit/ios/AppProduce.js +12 -23
  40. package/build/utils/fingerprintCli.d.ts +2 -1
  41. package/build/utils/fingerprintCli.js +11 -3
  42. package/oclif.manifest.json +60 -4
  43. package/package.json +4 -4
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensureNonExemptEncryptionIsDefinedForManagedProjectAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const config_1 = require("@expo/config");
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const log_1 = tslib_1.__importStar(require("../../log"));
8
+ const prompts_1 = require("../../prompts");
9
+ /** Non-exempt encryption must be set on every build in App Store Connect, we move it to before the build process to attempt only setting it once for the entire life-cycle of the project. */
10
+ async function ensureNonExemptEncryptionIsDefinedForManagedProjectAsync({ projectDir, exp, nonInteractive, }) {
11
+ // TODO: We could add bare workflow support in the future.
12
+ // TODO: We could add wizard support for non-exempt encryption in the future.
13
+ if (exp.ios?.infoPlist?.ITSAppUsesNonExemptEncryption == null) {
14
+ await configureNonExemptEncryptionAsync({
15
+ projectDir,
16
+ exp,
17
+ nonInteractive,
18
+ });
19
+ }
20
+ else {
21
+ log_1.default.debug(`ITSAppUsesNonExemptEncryption is defined in the app config.`);
22
+ }
23
+ }
24
+ exports.ensureNonExemptEncryptionIsDefinedForManagedProjectAsync = ensureNonExemptEncryptionIsDefinedForManagedProjectAsync;
25
+ async function configureNonExemptEncryptionAsync({ projectDir, exp, nonInteractive, }) {
26
+ const description = (0, config_1.getProjectConfigDescription)(projectDir);
27
+ if (nonInteractive) {
28
+ log_1.default.warn((0, chalk_1.default) `${description} is missing {bold ios.infoPlist.ITSAppUsesNonExemptEncryption} boolean. Manual configuration is required in App Store Connect before the app can be tested.`);
29
+ }
30
+ let onlyExemptEncryption = await (0, prompts_1.confirmAsync)({
31
+ message: `iOS app only uses standard/exempt encryption? ${chalk_1.default.dim((0, log_1.learnMore)('https://developer.apple.com/documentation/Security/complying-with-encryption-export-regulations'))}`,
32
+ initial: true,
33
+ });
34
+ if (!onlyExemptEncryption) {
35
+ const confirm = await (0, prompts_1.confirmAsync)({
36
+ message: `Are you sure your app uses non-exempt encryption? Selecting 'Yes' will require annual self-classification reports for the US government.`,
37
+ initial: true,
38
+ });
39
+ if (!confirm) {
40
+ log_1.default.warn((0, chalk_1.default) `Set {bold ios.infoPlist.ITSAppUsesNonExemptEncryption} in ${description} to release Apple builds faster.`);
41
+ onlyExemptEncryption = true;
42
+ }
43
+ }
44
+ const ITSAppUsesNonExemptEncryption = !onlyExemptEncryption;
45
+ // Only set this value if the answer is no, this enables developers to see the more in-depth prompt in App Store Connect. They can set the value manually in the app.json to avoid the EAS prompt in subsequent builds.
46
+ if (ITSAppUsesNonExemptEncryption) {
47
+ log_1.default.warn(`You'll need to manually configure the encryption status in App Store Connect before your build can be tested.`);
48
+ return;
49
+ }
50
+ // NOTE: Is is it possible to assert that the config needs to be modifiable before building the app?
51
+ const modification = await (0, config_1.modifyConfigAsync)(projectDir, {
52
+ ios: {
53
+ ...(exp.ios ?? {}),
54
+ infoPlist: {
55
+ ...(exp.ios?.infoPlist ?? {}),
56
+ ITSAppUsesNonExemptEncryption,
57
+ },
58
+ },
59
+ }, {
60
+ skipSDKVersionRequirement: true,
61
+ });
62
+ if (modification.type !== 'success') {
63
+ log_1.default.log();
64
+ if (modification.type === 'warn') {
65
+ // The project is using a dynamic config, give the user a helpful log and bail out.
66
+ log_1.default.log(chalk_1.default.yellow(modification.message));
67
+ }
68
+ const edits = {
69
+ ios: {
70
+ infoPlist: {
71
+ ITSAppUsesNonExemptEncryption,
72
+ },
73
+ },
74
+ };
75
+ log_1.default.log(chalk_1.default.cyan(`Add the following to ${description}:`));
76
+ log_1.default.log();
77
+ log_1.default.log(JSON.stringify(edits, null, 2));
78
+ log_1.default.log();
79
+ }
80
+ }
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureAppStoreConnectAppExistsAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
6
  const language_1 = require("./utils/language");
8
7
  const authenticate_1 = require("../../credentials/ios/appstore/authenticate");
9
8
  const ensureAppExists_1 = require("../../credentials/ios/appstore/ensureAppExists");
9
+ const ensureTestFlightGroup_1 = require("../../credentials/ios/appstore/ensureTestFlightGroup");
10
10
  const log_1 = tslib_1.__importDefault(require("../../log"));
11
11
  const bundleIdentifier_1 = require("../../project/ios/bundleIdentifier");
12
12
  const prompts_1 = require("../../prompts");
@@ -48,31 +48,20 @@ async function createAppStoreConnectAppAsync(ctx, options) {
48
48
  else {
49
49
  log_1.default.warn(`Provisioning is not available for Apple User: ${userAuthCtx.appleId}, skipping bundle identifier check.`);
50
50
  }
51
- let app = null;
51
+ const app = await (0, ensureAppExists_1.ensureAppExistsAsync)(userAuthCtx, {
52
+ name: appName,
53
+ language,
54
+ companyName,
55
+ bundleIdentifier: bundleId,
56
+ sku,
57
+ });
52
58
  try {
53
- app = await (0, ensureAppExists_1.ensureAppExistsAsync)(userAuthCtx, {
54
- name: appName,
55
- language,
56
- companyName,
57
- bundleIdentifier: bundleId,
58
- sku,
59
- });
59
+ await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(app);
60
60
  }
61
61
  catch (error) {
62
- if (
63
- // Name is invalid
64
- error.message.match(/App Name contains certain Unicode(.*)characters that are not permitted/) ||
65
- // UnexpectedAppleResponse: An attribute value has invalid characters. - App Name contains certain Unicode symbols, emoticons, diacritics, special characters, or private use characters that are not permitted.
66
- // Name is taken
67
- error.message.match(/The App Name you entered is already being used/)
68
- // UnexpectedAppleResponse: The provided entity includes an attribute with a value that has already been used on a different account. - The App Name you entered is already being used. If you have trademark rights to
69
- // this name and would like it released for your use, submit a claim.
70
- ) {
71
- log_1.default.addNewLineIfNone();
72
- log_1.default.warn(`Change the name in your app config, or use a custom name with the ${chalk_1.default.bold('--app-name')} flag`);
73
- log_1.default.newLine();
74
- }
75
- throw error;
62
+ // This process is not critical to the app submission so we shouldn't let it fail the entire process.
63
+ log_1.default.error('Failed to create an internal TestFlight group. This can be done manually in the App Store Connect website.');
64
+ log_1.default.error(error);
76
65
  }
77
66
  return {
78
67
  ascAppIdentifier: app.id,
@@ -1,11 +1,12 @@
1
1
  import { Env, Workflow } from '@expo/eas-build-job';
2
2
  import { Fingerprint, FingerprintDiffItem } from './fingerprint';
3
3
  export type FingerprintOptions = {
4
- workflow: Workflow;
4
+ workflow?: Workflow;
5
5
  platforms: string[];
6
6
  debug?: boolean;
7
7
  env: Env | undefined;
8
8
  cwd?: string;
9
+ ignorePaths?: string[];
9
10
  };
10
11
  export declare function diffFingerprint(projectDir: string, fingerprint1: Fingerprint, fingerprint2: Fingerprint): FingerprintDiffItem[] | null;
11
12
  export declare function createFingerprintAsync(projectDir: string, options: FingerprintOptions): Promise<(Fingerprint & {
@@ -52,12 +52,20 @@ exports.createFingerprintAsync = createFingerprintAsync;
52
52
  async function createFingerprintWithoutLoggingAsync(projectDir, fingerprintPath, options) {
53
53
  const Fingerprint = require(fingerprintPath);
54
54
  const fingerprintOptions = {};
55
+ const ignorePaths = [];
56
+ if (options.workflow === eas_build_job_1.Workflow.MANAGED) {
57
+ ignorePaths.push('android/**/*');
58
+ ignorePaths.push('ios/**/*');
59
+ }
60
+ if (options.ignorePaths) {
61
+ ignorePaths.push(...options.ignorePaths);
62
+ }
63
+ if (ignorePaths.length > 0) {
64
+ fingerprintOptions.ignorePaths = ignorePaths;
65
+ }
55
66
  if (options.platforms) {
56
67
  fingerprintOptions.platforms = [...options.platforms];
57
68
  }
58
- if (options.workflow === eas_build_job_1.Workflow.MANAGED) {
59
- fingerprintOptions.ignorePaths = ['android/**/*', 'ios/**/*'];
60
- }
61
69
  if (options.debug) {
62
70
  fingerprintOptions.debug = true;
63
71
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "14.5.0",
2
+ "version": "14.6.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -621,6 +621,46 @@
621
621
  "vcsClient": {}
622
622
  }
623
623
  },
624
+ "build:dev": {
625
+ "id": "build:dev",
626
+ "description": "run dev client simulator/emulator build with matching fingerprint or create a new one",
627
+ "strict": true,
628
+ "pluginName": "eas-cli",
629
+ "pluginAlias": "eas-cli",
630
+ "pluginType": "core",
631
+ "aliases": [],
632
+ "flags": {
633
+ "platform": {
634
+ "name": "platform",
635
+ "type": "option",
636
+ "char": "p",
637
+ "helpValue": "(ios|android)",
638
+ "multiple": false,
639
+ "options": [
640
+ "ios",
641
+ "android"
642
+ ]
643
+ },
644
+ "profile": {
645
+ "name": "profile",
646
+ "type": "option",
647
+ "char": "e",
648
+ "description": "Name of the build profile from eas.json. It must be a profile allowing to create emulator/simulator internal distribution dev client builds. The \"development-simulator\" build profile will be selected by default.",
649
+ "helpValue": "PROFILE_NAME",
650
+ "multiple": false
651
+ }
652
+ },
653
+ "args": {},
654
+ "contextDefinition": {
655
+ "loggedIn": {},
656
+ "getDynamicPublicProjectConfigAsync": {},
657
+ "getDynamicPrivateProjectConfigAsync": {},
658
+ "projectDir": {},
659
+ "vcsClient": {},
660
+ "analytics": {},
661
+ "projectId": {}
662
+ }
663
+ },
624
664
  "build": {
625
665
  "id": "build",
626
666
  "description": "start a build",
@@ -2727,12 +2767,17 @@
2727
2767
  "fingerprint:compare": {
2728
2768
  "id": "fingerprint:compare",
2729
2769
  "description": "compare fingerprints of the current project, builds and updates",
2730
- "strict": true,
2770
+ "strict": false,
2731
2771
  "pluginName": "eas-cli",
2732
2772
  "pluginAlias": "eas-cli",
2733
2773
  "pluginType": "core",
2734
- "hidden": true,
2735
2774
  "aliases": [],
2775
+ "examples": [
2776
+ "$ eas fingerprint:compare \t # Compare fingerprints in interactive mode",
2777
+ "$ eas fingerprint:compare c71a7d475aa6f75291bc93cd74aef395c3c94eee \t # Compare fingerprint against local directory",
2778
+ "$ eas fingerprint:compare c71a7d475aa6f75291bc93cd74aef395c3c94eee f0d6a916e73f401d428e6e006e07b12453317ba2 \t # Compare provided fingerprints",
2779
+ "$ eas fingerprint:compare --build-id 82bc6456-611a-48cb-8db4-5f9eb2ca1003 \t # Compare fingerprint from build against local directory"
2780
+ ],
2736
2781
  "flags": {
2737
2782
  "build-id": {
2738
2783
  "name": "build-id",
@@ -2759,7 +2804,18 @@
2759
2804
  "allowNo": false
2760
2805
  }
2761
2806
  },
2762
- "args": {},
2807
+ "args": {
2808
+ "hash1": {
2809
+ "name": "hash1",
2810
+ "description": "If provided alone, HASH1 is compared against the current project's fingerprint.",
2811
+ "required": false
2812
+ },
2813
+ "hash2": {
2814
+ "name": "hash2",
2815
+ "description": "If two hashes are provided, HASH1 is compared against HASH2.",
2816
+ "required": false
2817
+ }
2818
+ },
2763
2819
  "contextDefinition": {
2764
2820
  "projectId": {},
2765
2821
  "loggedIn": {},
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "14.5.0",
4
+ "version": "14.6.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
8
8
  },
9
9
  "bugs": "https://github.com/expo/eas-cli/issues",
10
10
  "dependencies": {
11
- "@expo/apple-utils": "2.1.5",
11
+ "@expo/apple-utils": "2.1.6",
12
12
  "@expo/code-signing-certificates": "0.0.5",
13
13
  "@expo/config": "10.0.6",
14
14
  "@expo/config-plugins": "9.0.12",
@@ -28,7 +28,7 @@
28
28
  "@expo/results": "1.0.0",
29
29
  "@expo/rudder-sdk-node": "1.1.1",
30
30
  "@expo/spawn-async": "1.7.2",
31
- "@expo/steps": "1.0.165",
31
+ "@expo/steps": "1.0.166",
32
32
  "@expo/timeago.js": "1.0.0",
33
33
  "@oclif/core": "^1.26.2",
34
34
  "@oclif/plugin-autocomplete": "^2.3.10",
@@ -237,5 +237,5 @@
237
237
  "node": "20.11.0",
238
238
  "yarn": "1.22.21"
239
239
  },
240
- "gitHead": "f75ef221542900d492737f83ce24b81bbafdc290"
240
+ "gitHead": "58917ecbb44a5006adeac57c3ab023f25d7bff26"
241
241
  }