eas-cli 16.19.3 → 16.20.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 (40) hide show
  1. package/README.md +85 -85
  2. package/build/api.d.ts +1 -0
  3. package/build/api.js +5 -1
  4. package/build/build/android/build.js +1 -3
  5. package/build/build/build.d.ts +3 -3
  6. package/build/build/build.js +11 -4
  7. package/build/build/graphql.d.ts +4 -2
  8. package/build/build/graphql.js +3 -14
  9. package/build/build/ios/build.js +1 -3
  10. package/build/build/metadata.d.ts +1 -2
  11. package/build/build/metadata.js +0 -1
  12. package/build/commandUtils/workflow/validation.d.ts +6 -0
  13. package/build/commandUtils/workflow/validation.js +160 -0
  14. package/build/commands/build/configure.js +2 -19
  15. package/build/commands/env/create.js +0 -1
  16. package/build/commands/project/new.d.ts +33 -0
  17. package/build/commands/project/new.js +349 -0
  18. package/build/commands/project/onboarding.js +1 -1
  19. package/build/commands/update/index.js +1 -5
  20. package/build/commands/workflow/run.js +0 -2
  21. package/build/commands/workflow/validate.d.ts +1 -0
  22. package/build/commands/workflow/validate.js +8 -39
  23. package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
  24. package/build/credentials/ios/appstore/capabilityList.js +18 -8
  25. package/build/graphql/generated.d.ts +0 -6
  26. package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +5 -24
  27. package/build/graphql/mutations/FingerprintMutation.d.ts +2 -3
  28. package/build/log.js +2 -1
  29. package/build/onboarding/installDependencies.d.ts +4 -1
  30. package/build/onboarding/installDependencies.js +13 -5
  31. package/build/project/maybeUploadFingerprintAsync.d.ts +2 -2
  32. package/build/project/maybeUploadFingerprintAsync.js +7 -12
  33. package/build/project/publish.d.ts +5 -5
  34. package/build/project/publish.js +1 -1
  35. package/build/utils/prompts.d.ts +4 -0
  36. package/build/utils/prompts.js +25 -1
  37. package/build/utils/workflowFile.d.ts +1 -3
  38. package/build/utils/workflowFile.js +2 -8
  39. package/oclif.manifest.json +23 -1
  40. package/package.json +6 -6
@@ -1,11 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.installDependenciesAsync = void 0;
3
+ exports.installDependenciesAsync = exports.promptForPackageManagerAsync = void 0;
4
4
  const runCommand_1 = require("./runCommand");
5
- async function installDependenciesAsync({ projectDir, }) {
6
- // TODO: add support for other package managers
5
+ const prompts_1 = require("../prompts");
6
+ async function promptForPackageManagerAsync() {
7
+ return await (0, prompts_1.selectAsync)('Which package manager would you like to use?', [
8
+ { title: 'npm', value: 'npm' },
9
+ { title: 'Yarn', value: 'yarn' },
10
+ { title: 'pnpm', value: 'pnpm' },
11
+ ], { initial: 'npm' });
12
+ }
13
+ exports.promptForPackageManagerAsync = promptForPackageManagerAsync;
14
+ async function installDependenciesAsync({ projectDir, packageManager = 'npm', }) {
7
15
  await (0, runCommand_1.runCommandAsync)({
8
- command: 'npm',
16
+ command: packageManager,
9
17
  args: ['install'],
10
18
  cwd: projectDir,
11
19
  shouldShowStderrLine: line => {
@@ -13,7 +21,7 @@ async function installDependenciesAsync({ projectDir, }) {
13
21
  !line.includes('deprecated') &&
14
22
  !line.includes('no longer maintained') &&
15
23
  !line.includes('has been moved') &&
16
- !(line === 'npm'));
24
+ !(line === packageManager));
17
25
  },
18
26
  });
19
27
  }
@@ -1,6 +1,6 @@
1
- import { FingerprintSource } from '@expo/eas-build-job';
2
1
  import { LocalBuildMode } from '../build/local';
3
2
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
3
+ import { FingerprintSourceInput } from '../graphql/generated';
4
4
  export declare function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }: {
5
5
  hash: string;
6
6
  fingerprint: {
@@ -11,5 +11,5 @@ export declare function maybeUploadFingerprintAsync({ hash, fingerprint, graphql
11
11
  localBuildMode?: LocalBuildMode;
12
12
  }): Promise<{
13
13
  hash: string;
14
- fingerprintSource?: FingerprintSource;
14
+ fingerprintSource?: FingerprintSourceInput;
15
15
  }>;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.maybeUploadFingerprintAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const eas_build_job_1 = require("@expo/eas-build-job");
6
5
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
7
6
  const path_1 = tslib_1.__importDefault(require("path"));
8
7
  const uuid_1 = require("uuid");
@@ -12,22 +11,18 @@ const log_1 = tslib_1.__importDefault(require("../log"));
12
11
  const uploads_1 = require("../uploads");
13
12
  const paths_1 = require("../utils/paths");
14
13
  async function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }) {
14
+ if (localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
15
+ // We're not uploading local build fingerprints to EAS
16
+ return {
17
+ hash,
18
+ };
19
+ }
15
20
  await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
16
21
  const fingerprintLocation = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-runtime-fingerprint.json`);
17
22
  await fs_extra_1.default.writeJSON(fingerprintLocation, {
18
23
  hash,
19
24
  sources: fingerprint.fingerprintSources,
20
25
  });
21
- if (localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
22
- return {
23
- hash,
24
- fingerprintSource: {
25
- type: eas_build_job_1.FingerprintSourceType.PATH,
26
- path: fingerprintLocation,
27
- isDebugFingerprint: fingerprint.isDebugFingerprintSource,
28
- },
29
- };
30
- }
31
26
  let fingerprintGCSBucketKey = undefined;
32
27
  try {
33
28
  fingerprintGCSBucketKey = await (0, uploads_1.uploadFileAtPathToGCSAsync)(graphqlClient, generated_1.UploadSessionType.EasUpdateFingerprint, fingerprintLocation);
@@ -48,7 +43,7 @@ async function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, l
48
43
  return {
49
44
  hash,
50
45
  fingerprintSource: {
51
- type: eas_build_job_1.FingerprintSourceType.GCS,
46
+ type: generated_1.FingerprintSourceType.Gcs,
52
47
  bucketKey: fingerprintGCSBucketKey,
53
48
  isDebugFingerprint: fingerprint.isDebugFingerprintSource,
54
49
  },
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { ExpoConfig, Platform as ExpoConfigPlatform } from '@expo/config';
3
- import { Env, FingerprintSource, Platform, Workflow } from '@expo/eas-build-job';
3
+ import { Env, Platform, Workflow } from '@expo/eas-build-job';
4
4
  import Joi from 'joi';
5
5
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
6
6
  import { PaginatedQueryOptions } from '../commandUtils/pagination';
7
- import { AppPlatform, BuildFragment, PartialManifestAsset, UpdateRolloutInfoGroup } from '../graphql/generated';
7
+ import { AppPlatform, BuildFragment, FingerprintSourceInput, PartialManifestAsset, UpdateRolloutInfoGroup } from '../graphql/generated';
8
8
  import { RequestedPlatform } from '../platform';
9
9
  import { UpdateJsonInfo } from '../update/utils';
10
10
  import { Client } from '../vcs/vcs';
@@ -154,7 +154,7 @@ type FingerprintInfoGroup = {
154
154
  };
155
155
  type FingerprintInfo = {
156
156
  fingerprintHash: string;
157
- fingerprintSource: FingerprintSource;
157
+ fingerprintSource: FingerprintSourceInput;
158
158
  };
159
159
  export declare function getRuntimeVersionInfoObjectsAsync({ exp, platforms, workflows, projectDir, env, }: {
160
160
  exp: ExpoConfig;
@@ -177,13 +177,13 @@ export declare function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWit
177
177
  graphqlClient: ExpoGraphqlClient;
178
178
  runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping: (RuntimeVersionInfo & {
179
179
  platforms: UpdatePublishPlatform[];
180
- expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
180
+ expoUpdatesRuntimeFingerprintSource: FingerprintSourceInput | null;
181
181
  })[];
182
182
  workflowsByPlatform: Record<Platform, Workflow>;
183
183
  env: Env | undefined;
184
184
  }): Promise<(RuntimeVersionInfo & {
185
185
  platforms: UpdatePublishPlatform[];
186
- expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
186
+ expoUpdatesRuntimeFingerprintSource: FingerprintSourceInput | null;
187
187
  fingerprintInfoGroup: FingerprintInfoGroup;
188
188
  })[]>;
189
189
  export declare function findCompatibleBuildsAsync(graphqlClient: ExpoGraphqlClient, appId: string, runtimeToPlatformsAndFingerprintInfoMapping: {
@@ -571,7 +571,7 @@ async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoU
571
571
  for (const platform of runtimeInfo.platforms) {
572
572
  const runtimeAndPlatform = `${runtimeInfo.runtimeVersion}-${platform}`;
573
573
  const fingerprint = uploadedFingerprintsByRuntimeAndPlatform.get(runtimeAndPlatform);
574
- if (fingerprint && fingerprint.uploadedSource) {
574
+ if (fingerprint?.uploadedSource) {
575
575
  fingerprintInfoGroup[platform] = {
576
576
  fingerprintHash: fingerprint.hash,
577
577
  fingerprintSource: fingerprint.uploadedSource,
@@ -1,4 +1,5 @@
1
1
  import { EnvironmentSecretType, EnvironmentVariableEnvironment, EnvironmentVariableVisibility } from '../graphql/generated';
2
+ import { RequestedPlatform } from '../platform';
2
3
  export declare function promptVariableTypeAsync(nonInteractive: boolean, initialType?: EnvironmentSecretType): Promise<EnvironmentSecretType>;
3
4
  export declare function parseVisibility(stringVisibility: 'plaintext' | 'sensitive' | 'secret'): EnvironmentVariableVisibility;
4
5
  export declare function promptVariableVisibilityAsync(nonInteractive: boolean, selectedVisibility?: EnvironmentVariableVisibility | null): Promise<EnvironmentVariableVisibility>;
@@ -21,4 +22,7 @@ export declare function promptVariableValueAsync({ nonInteractive, required, hid
21
22
  hidden?: boolean;
22
23
  }): Promise<string>;
23
24
  export declare function promptVariableNameAsync(nonInteractive: boolean, initialValue?: string): Promise<string>;
25
+ export declare function promptPlatformAsync({ message, }: {
26
+ message: string;
27
+ }): Promise<RequestedPlatform>;
24
28
  export {};
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = exports.promptVariableVisibilityAsync = exports.parseVisibility = exports.promptVariableTypeAsync = void 0;
3
+ exports.promptPlatformAsync = exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = exports.promptVariableVisibilityAsync = exports.parseVisibility = exports.promptVariableTypeAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const generated_1 = require("../graphql/generated");
7
+ const platform_1 = require("../platform");
7
8
  const prompts_1 = require("../prompts");
8
9
  async function promptVariableTypeAsync(nonInteractive, initialType) {
9
10
  if (nonInteractive) {
@@ -134,3 +135,26 @@ async function promptVariableNameAsync(nonInteractive, initialValue) {
134
135
  return name;
135
136
  }
136
137
  exports.promptVariableNameAsync = promptVariableNameAsync;
138
+ async function promptPlatformAsync({ message, }) {
139
+ const { platform } = await (0, prompts_1.promptAsync)({
140
+ type: 'select',
141
+ message,
142
+ name: 'platform',
143
+ choices: [
144
+ {
145
+ title: 'All',
146
+ value: platform_1.RequestedPlatform.All,
147
+ },
148
+ {
149
+ title: 'iOS',
150
+ value: platform_1.RequestedPlatform.Ios,
151
+ },
152
+ {
153
+ title: 'Android',
154
+ value: platform_1.RequestedPlatform.Android,
155
+ },
156
+ ],
157
+ });
158
+ return platform;
159
+ }
160
+ exports.promptPlatformAsync = promptPlatformAsync;
@@ -7,10 +7,8 @@ export declare namespace WorkflowFile {
7
7
  yamlConfig: string;
8
8
  filePath: string;
9
9
  }>;
10
- function maybePrintWorkflowFileValidationErrors({ error, accountName, projectName, }: {
10
+ function maybePrintWorkflowFileValidationErrors({ error, }: {
11
11
  error: CombinedError;
12
- accountName: string;
13
- projectName: string;
14
12
  }): void;
15
13
  function validateYamlExtension(fileName: string): void;
16
14
  }
@@ -4,9 +4,8 @@ exports.WorkflowFile = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fs_1 = tslib_1.__importDefault(require("fs"));
6
6
  const path_1 = tslib_1.__importDefault(require("path"));
7
- const url_1 = require("../build/utils/url");
8
7
  const WorkflowRevisionMutation_1 = require("../graphql/mutations/WorkflowRevisionMutation");
9
- const log_1 = tslib_1.__importStar(require("../log"));
8
+ const log_1 = tslib_1.__importDefault(require("../log"));
10
9
  var WorkflowFile;
11
10
  (function (WorkflowFile) {
12
11
  async function readWorkflowFileContentsAsync({ projectDir, filePath, }) {
@@ -32,7 +31,7 @@ var WorkflowFile;
32
31
  throw yamlFromFile.reason;
33
32
  }
34
33
  WorkflowFile.readWorkflowFileContentsAsync = readWorkflowFileContentsAsync;
35
- function maybePrintWorkflowFileValidationErrors({ error, accountName, projectName, }) {
34
+ function maybePrintWorkflowFileValidationErrors({ error, }) {
36
35
  const validationErrors = error.graphQLErrors.flatMap(e => {
37
36
  return WorkflowRevisionMutation_1.WorkflowRevisionMutation.ValidationErrorExtensionZ.safeParse(e.extensions).data ?? [];
38
37
  });
@@ -47,11 +46,6 @@ var WorkflowFile;
47
46
  }
48
47
  }
49
48
  }
50
- const githubNotFoundError = error.graphQLErrors.find(e => e.extensions.errorCode === 'GITHUB_NOT_FOUND_ERROR');
51
- if (githubNotFoundError) {
52
- log_1.default.error(`GitHub repository not found. It is currently required to run workflows.`);
53
- log_1.default.error(`Please check that the repository exists and that you have access to it. ${(0, log_1.link)((0, url_1.getProjectGitHubSettingsUrl)(accountName, projectName))}`);
54
- }
55
49
  }
56
50
  WorkflowFile.maybePrintWorkflowFileValidationErrors = maybePrintWorkflowFileValidationErrors;
57
51
  function validateYamlExtension(fileName) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.19.3",
2
+ "version": "16.20.1",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -3056,6 +3056,27 @@
3056
3056
  "projectDir": {}
3057
3057
  }
3058
3058
  },
3059
+ "project:new": {
3060
+ "id": "project:new",
3061
+ "description": "create a new project set up with Expo's services.",
3062
+ "strict": true,
3063
+ "pluginName": "eas-cli",
3064
+ "pluginAlias": "eas-cli",
3065
+ "pluginType": "core",
3066
+ "hidden": true,
3067
+ "aliases": [
3068
+ "new"
3069
+ ],
3070
+ "flags": {},
3071
+ "args": {
3072
+ "TARGET_PROJECT_DIRECTORY": {
3073
+ "name": "TARGET_PROJECT_DIRECTORY"
3074
+ }
3075
+ },
3076
+ "contextDefinition": {
3077
+ "loggedIn": {}
3078
+ }
3079
+ },
3059
3080
  "project:onboarding": {
3060
3081
  "id": "project:onboarding",
3061
3082
  "description": "continue onboarding process started on the https://expo.new website.",
@@ -4345,6 +4366,7 @@
4345
4366
  "getDynamicPublicProjectConfigAsync": {},
4346
4367
  "getDynamicPrivateProjectConfigAsync": {},
4347
4368
  "projectDir": {},
4369
+ "projectId": {},
4348
4370
  "loggedIn": {}
4349
4371
  }
4350
4372
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "16.19.3",
4
+ "version": "16.20.1",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -12,8 +12,8 @@
12
12
  "@expo/code-signing-certificates": "0.0.5",
13
13
  "@expo/config": "10.0.6",
14
14
  "@expo/config-plugins": "9.0.12",
15
- "@expo/eas-build-job": "1.0.221",
16
- "@expo/eas-json": "16.19.1",
15
+ "@expo/eas-build-job": "1.0.231",
16
+ "@expo/eas-json": "16.20.1",
17
17
  "@expo/env": "^1.0.0",
18
18
  "@expo/json-file": "8.3.3",
19
19
  "@expo/logger": "1.0.221",
@@ -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.221",
31
+ "@expo/steps": "1.0.231",
32
32
  "@expo/timeago.js": "1.0.0",
33
33
  "@oclif/core": "^1.26.2",
34
34
  "@oclif/plugin-autocomplete": "^2.3.10",
@@ -85,6 +85,7 @@
85
85
  "tar": "6.2.1",
86
86
  "tar-stream": "3.1.7",
87
87
  "terminal-link": "2.1.1",
88
+ "ts-deepmerge": "6.2.0",
88
89
  "tslib": "2.6.2",
89
90
  "turndown": "7.1.2",
90
91
  "untildify": "4.0.0",
@@ -126,7 +127,6 @@
126
127
  "mockdate": "3.0.5",
127
128
  "nock": "13.4.0",
128
129
  "rimraf": "3.0.2",
129
- "ts-deepmerge": "6.2.0",
130
130
  "ts-mockito": "2.6.1",
131
131
  "ts-node": "10.9.2",
132
132
  "typescript": "5.3.3"
@@ -241,5 +241,5 @@
241
241
  "node": "20.11.0",
242
242
  "yarn": "1.22.21"
243
243
  },
244
- "gitHead": "6c5c99b5d1ae1087686a2fcbf09a313e615aff67"
244
+ "gitHead": "eb7d3b5ecdc667d4f7cb6311b299cba9f974ecc9"
245
245
  }