eas-cli 16.23.0 → 16.24.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 (34) hide show
  1. package/README.md +87 -87
  2. package/build/commandUtils/new/commands.d.ts +4 -0
  3. package/build/commandUtils/new/commands.js +61 -0
  4. package/build/commandUtils/new/configs.d.ts +25 -0
  5. package/build/commandUtils/new/configs.js +136 -0
  6. package/build/commandUtils/new/projectFiles.d.ts +8 -0
  7. package/build/commandUtils/new/projectFiles.js +167 -0
  8. package/build/commandUtils/new/templates/.eas/workflows/create-development-builds.yml +21 -0
  9. package/build/commandUtils/new/templates/.eas/workflows/deploy-to-production.yml +68 -0
  10. package/build/commandUtils/new/templates/.eas/workflows/publish-preview-update.yml +12 -0
  11. package/build/commandUtils/new/templates/readme-additions.md +36 -0
  12. package/build/commandUtils/workflow/fetchLogs.d.ts +5 -1
  13. package/build/commandUtils/workflow/fetchLogs.js +23 -3
  14. package/build/commandUtils/workflow/inputs.d.ts +40 -0
  15. package/build/commandUtils/workflow/inputs.js +165 -0
  16. package/build/commandUtils/workflow/stateMachine.js +1 -1
  17. package/build/commandUtils/workflow/types.d.ts +1 -0
  18. package/build/commandUtils/workflow/types.js +1 -1
  19. package/build/commandUtils/workflow/utils.d.ts +15 -4
  20. package/build/commandUtils/workflow/utils.js +148 -10
  21. package/build/commands/project/new.d.ts +21 -17
  22. package/build/commands/project/new.js +62 -291
  23. package/build/commands/workflow/run.d.ts +0 -25
  24. package/build/commands/workflow/run.js +32 -230
  25. package/build/credentials/ios/types.d.ts +3 -0
  26. package/build/credentials/ios/types.js +35 -0
  27. package/build/graphql/generated.d.ts +80 -2
  28. package/build/graphql/types/Build.js +1 -0
  29. package/build/onboarding/installDependencies.d.ts +4 -2
  30. package/build/onboarding/installDependencies.js +5 -7
  31. package/build/onboarding/runCommand.d.ts +2 -1
  32. package/build/onboarding/runCommand.js +24 -22
  33. package/oclif.manifest.json +24 -6
  34. package/package.json +7 -6
@@ -1,6 +1,8 @@
1
- export type PackageManager = 'npm' | 'yarn' | 'pnpm';
1
+ export declare const PACKAGE_MANAGERS: readonly ["bun", "npm", "pnpm", "yarn"];
2
+ export type PackageManager = (typeof PACKAGE_MANAGERS)[number];
2
3
  export declare function promptForPackageManagerAsync(): Promise<PackageManager>;
3
- export declare function installDependenciesAsync({ projectDir, packageManager, }: {
4
+ export declare function installDependenciesAsync({ outputLevel, projectDir, packageManager, }: {
5
+ outputLevel?: 'default' | 'none';
4
6
  projectDir: string;
5
7
  packageManager?: PackageManager;
6
8
  }): Promise<void>;
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.installDependenciesAsync = exports.promptForPackageManagerAsync = void 0;
3
+ exports.installDependenciesAsync = exports.promptForPackageManagerAsync = exports.PACKAGE_MANAGERS = void 0;
4
4
  const runCommand_1 = require("./runCommand");
5
5
  const prompts_1 = require("../prompts");
6
+ exports.PACKAGE_MANAGERS = ['bun', 'npm', 'pnpm', 'yarn'];
6
7
  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' });
8
+ return await (0, prompts_1.selectAsync)('Which package manager would you like to use?', ['bun', 'npm', 'pnpm', 'yarn'].map(manager => ({ title: manager, value: manager })), { initial: 'npm' });
12
9
  }
13
10
  exports.promptForPackageManagerAsync = promptForPackageManagerAsync;
14
- async function installDependenciesAsync({ projectDir, packageManager = 'npm', }) {
11
+ async function installDependenciesAsync({ outputLevel = 'default', projectDir, packageManager = 'npm', }) {
15
12
  await (0, runCommand_1.runCommandAsync)({
16
13
  command: packageManager,
17
14
  args: ['install'],
@@ -23,6 +20,7 @@ async function installDependenciesAsync({ projectDir, packageManager = 'npm', })
23
20
  !line.includes('has been moved') &&
24
21
  !(line === packageManager));
25
22
  },
23
+ showOutput: outputLevel !== 'none',
26
24
  });
27
25
  }
28
26
  exports.installDependenciesAsync = installDependenciesAsync;
@@ -1,8 +1,9 @@
1
- export declare function runCommandAsync({ cwd, args, command, shouldShowStderrLine, shouldPrintStderrLineAsStdout, showSpinner, }: {
1
+ export declare function runCommandAsync({ cwd, args, command, shouldShowStderrLine, shouldPrintStderrLineAsStdout, showSpinner, showOutput, }: {
2
2
  cwd?: string;
3
3
  args: string[];
4
4
  command: string;
5
5
  shouldShowStderrLine?: (line: string) => boolean;
6
6
  shouldPrintStderrLineAsStdout?: (line: string) => boolean;
7
7
  showSpinner?: boolean;
8
+ showOutput?: boolean;
8
9
  }): Promise<void>;
@@ -6,39 +6,41 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
6
6
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  const log_1 = tslib_1.__importDefault(require("../log"));
8
8
  const ora_1 = require("../ora");
9
- async function runCommandAsync({ cwd, args, command, shouldShowStderrLine, shouldPrintStderrLineAsStdout, showSpinner = true, }) {
9
+ async function runCommandAsync({ cwd, args, command, shouldShowStderrLine, shouldPrintStderrLineAsStdout, showSpinner = true, showOutput = true, }) {
10
10
  log_1.default.log(`🏗️ Running ${chalk_1.default.bold(`${command} ${args.join(' ')}`)}...`);
11
11
  let spinner;
12
12
  if (showSpinner) {
13
13
  spinner = (0, ora_1.ora)(`${chalk_1.default.bold(`${command} ${args.join(' ')}`)}`).start();
14
14
  }
15
15
  const spawnPromise = (0, spawn_async_1.default)(command, args, {
16
- stdio: ['inherit', 'pipe', 'pipe'],
16
+ stdio: showOutput ? ['inherit', 'pipe', 'pipe'] : 'ignore',
17
17
  cwd,
18
18
  });
19
- const { child: { stdout, stderr }, } = spawnPromise;
20
- if (!stdout || !stderr) {
21
- throw new Error(`Failed to spawn ${command}`);
22
- }
23
- stdout.on('data', data => {
24
- for (const line of data.toString().trim().split('\n')) {
25
- log_1.default.log(`${chalk_1.default.gray(`[${command}]`)} ${line}`);
19
+ if (showOutput) {
20
+ const { child: { stdout, stderr }, } = spawnPromise;
21
+ if (!stdout || !stderr) {
22
+ throw new Error(`Failed to spawn ${command}`);
26
23
  }
27
- });
28
- stderr.on('data', data => {
29
- for (const line of data.toString().trim().split('\n')) {
30
- if (shouldShowStderrLine && !shouldShowStderrLine(line)) {
31
- continue;
32
- }
33
- const log = `${chalk_1.default.gray(`[${command}]`)} ${line}`;
34
- if (shouldPrintStderrLineAsStdout?.(line)) {
35
- log_1.default.log(log);
24
+ stdout.on('data', data => {
25
+ for (const line of data.toString().trim().split('\n')) {
26
+ log_1.default.log(`${chalk_1.default.gray(`[${command}]`)} ${line}`);
36
27
  }
37
- else {
38
- log_1.default.warn(`${chalk_1.default.gray(`[${command}]`)} ${line}`);
28
+ });
29
+ stderr.on('data', data => {
30
+ for (const line of data.toString().trim().split('\n')) {
31
+ if (shouldShowStderrLine && !shouldShowStderrLine(line)) {
32
+ continue;
33
+ }
34
+ const log = `${chalk_1.default.gray(`[${command}]`)} ${line}`;
35
+ if (shouldPrintStderrLineAsStdout?.(line)) {
36
+ log_1.default.log(log);
37
+ }
38
+ else {
39
+ log_1.default.warn(`${chalk_1.default.gray(`[${command}]`)} ${line}`);
40
+ }
39
41
  }
40
- }
41
- });
42
+ });
43
+ }
42
44
  try {
43
45
  await spawnPromise;
44
46
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.23.0",
2
+ "version": "16.24.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -2998,7 +2998,7 @@
2998
2998
  },
2999
2999
  "project:new": {
3000
3000
  "id": "project:new",
3001
- "description": "create a new project set up with Expo's services.",
3001
+ "description": "Create a new project configured with Expo Application Services (EAS)",
3002
3002
  "strict": true,
3003
3003
  "pluginName": "eas-cli",
3004
3004
  "pluginAlias": "eas-cli",
@@ -3007,10 +3007,28 @@
3007
3007
  "aliases": [
3008
3008
  "new"
3009
3009
  ],
3010
- "flags": {},
3010
+ "flags": {
3011
+ "package-manager": {
3012
+ "name": "package-manager",
3013
+ "type": "option",
3014
+ "char": "p",
3015
+ "description": "Package manager to use for installing dependencies",
3016
+ "helpValue": "(bun|npm|pnpm|yarn)",
3017
+ "multiple": false,
3018
+ "options": [
3019
+ "bun",
3020
+ "npm",
3021
+ "pnpm",
3022
+ "yarn"
3023
+ ],
3024
+ "default": "npm"
3025
+ }
3026
+ },
3011
3027
  "args": {
3012
- "TARGET_PROJECT_DIRECTORY": {
3013
- "name": "TARGET_PROJECT_DIRECTORY"
3028
+ "path": {
3029
+ "name": "path",
3030
+ "description": "Path to create the project (defaults to current directory)",
3031
+ "required": false
3014
3032
  }
3015
3033
  },
3016
3034
  "contextDefinition": {
@@ -4180,7 +4198,7 @@
4180
4198
  "wait": {
4181
4199
  "name": "wait",
4182
4200
  "type": "boolean",
4183
- "summary": "Wait for workflow run to complete",
4201
+ "summary": "Wait for workflow run to complete. Defaults to false. Cannot be used with the --json flag.",
4184
4202
  "description": "Exit codes: 0 = success, 11 = failure, 12 = canceled, 13 = wait aborted.",
4185
4203
  "allowNo": true
4186
4204
  },
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.23.0",
4
+ "version": "16.24.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -12,7 +12,7 @@
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.237",
15
+ "@expo/eas-build-job": "1.0.239",
16
16
  "@expo/eas-json": "16.23.0",
17
17
  "@expo/env": "^1.0.0",
18
18
  "@expo/json-file": "8.3.3",
@@ -71,7 +71,7 @@
71
71
  "node-forge": "1.3.1",
72
72
  "node-stream-zip": "1.15.0",
73
73
  "nullthrows": "1.1.1",
74
- "ora": "5.1.0",
74
+ "ora": "9.0.0",
75
75
  "pkg-dir": "4.2.0",
76
76
  "pngjs": "7.0.0",
77
77
  "promise-limit": "2.7.0",
@@ -226,7 +226,7 @@
226
226
  "prepack": "yarn rebuild && node ./scripts/prepack.js",
227
227
  "rebuild": "rimraf build && yarn build",
228
228
  "pretarball-ci": "./scripts/pretarball-ci.sh",
229
- "build": "tsc --project tsconfig.build.json",
229
+ "build": "tsc --project tsconfig.build.json && yarn copy-new-templates",
230
230
  "build-allow-unused": "tsc --project tsconfig.allowUnused.json",
231
231
  "watch": "yarn build --watch --preserveWatchOutput",
232
232
  "watch-allow-unused": "yarn build-allow-unused --watch --preserveWatchOutput",
@@ -235,11 +235,12 @@
235
235
  "version": "yarn oclif readme && node scripts/patch-readme && git add README.md",
236
236
  "generate-graphql-code": "graphql-codegen --config graphql-codegen.yml",
237
237
  "verify-graphql-code": "./scripts/verify-graphql.sh",
238
- "clean": "rimraf dist build tmp node_modules yarn-error.log"
238
+ "clean": "rimraf dist build tmp node_modules yarn-error.log",
239
+ "copy-new-templates": "rimraf build/commandUtils/new/templates && mkdir -p build/commandUtils/new && cp -r src/commandUtils/new/templates build/commandUtils/new"
239
240
  },
240
241
  "volta": {
241
242
  "node": "20.11.0",
242
243
  "yarn": "1.22.21"
243
244
  },
244
- "gitHead": "10ec54345a292a2f4612e8100005b93ff5eb6a64"
245
+ "gitHead": "184616e874a6d91546c0874ce8319fdc6fdea4bf"
245
246
  }