@nx/expo 16.8.0-beta.4 → 16.8.0-beta.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.
Files changed (46) hide show
  1. package/package.json +10 -10
  2. package/plugins/metro-resolver.js +4 -5
  3. package/plugins/with-nx-metro.js +23 -27
  4. package/plugins/with-nx-webpack.js +34 -38
  5. package/src/executors/build/build.impl.js +21 -24
  6. package/src/executors/build-list/build-list.impl.js +14 -17
  7. package/src/executors/download/download.impl.js +46 -48
  8. package/src/executors/ensure-symlink/ensure-symlink.impl.js +4 -7
  9. package/src/executors/export/export.impl.js +12 -15
  10. package/src/executors/install/install.impl.js +13 -16
  11. package/src/executors/prebuild/prebuild.impl.js +17 -20
  12. package/src/executors/run/run.impl.js +25 -28
  13. package/src/executors/start/start.impl.js +15 -18
  14. package/src/executors/submit/submit.impl.js +10 -13
  15. package/src/executors/sync-deps/sync-deps.impl.js +32 -37
  16. package/src/executors/update/update.impl.js +13 -16
  17. package/src/generators/application/application.js +23 -21
  18. package/src/generators/application/lib/add-detox.js +16 -7
  19. package/src/generators/application/lib/add-project.js +1 -1
  20. package/src/generators/application/lib/create-application-files.js +6 -2
  21. package/src/generators/application/lib/normalize-options.js +24 -17
  22. package/src/generators/component/component.js +11 -11
  23. package/src/generators/component/lib/normalize-options.js +36 -37
  24. package/src/generators/init/init.js +27 -24
  25. package/src/generators/init/lib/add-git-ignore-entry.js +1 -2
  26. package/src/generators/library/lib/normalize-options.js +23 -20
  27. package/src/generators/library/library.js +95 -79
  28. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +18 -22
  29. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +11 -15
  30. package/src/migrations/update-14-4-3/add-eas-build-target.js +26 -30
  31. package/src/migrations/update-14-5-1/add-eas-update-target.js +12 -16
  32. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +44 -48
  33. package/src/migrations/update-15-0-3/change-jest-preset.js +17 -21
  34. package/src/migrations/update-15-8-3/change-webpack-to-metro.js +18 -23
  35. package/src/migrations/update-16-0-0/add-jest-expo.js +15 -19
  36. package/src/migrations/update-16-0-0/remove-deprecated-targets.js +23 -27
  37. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +3 -6
  38. package/src/migrations/update-16-1-4/add-detox-app-json.js +20 -24
  39. package/src/migrations/update-16-1-4/update-eas-scripts.js +9 -7
  40. package/src/migrations/update-16-2-2/add-submit-target.js +12 -16
  41. package/src/migrations/update-16-6-0/add-depends-on.js +11 -15
  42. package/src/migrations/update-16-6-0/update-metro-config.js +11 -15
  43. package/src/utils/add-jest.js +19 -22
  44. package/src/utils/add-linting.js +27 -30
  45. package/src/utils/find-all-npm-dependencies.js +1 -2
  46. package/src/utils/symlink-task.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "16.8.0-beta.4",
3
+ "version": "16.8.0-beta.5",
4
4
  "private": false,
5
5
  "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
6
6
  "keywords": [
@@ -26,14 +26,14 @@
26
26
  "main": "./index.js",
27
27
  "types": "index.d.ts",
28
28
  "dependencies": {
29
- "@nrwl/expo": "16.8.0-beta.4",
30
- "@nx/detox": "16.8.0-beta.4",
31
- "@nx/devkit": "16.8.0-beta.4",
32
- "@nx/jest": "16.8.0-beta.4",
33
- "@nx/js": "16.8.0-beta.4",
34
- "@nx/linter": "16.8.0-beta.4",
35
- "@nx/react": "16.8.0-beta.4",
36
- "@nx/webpack": "16.8.0-beta.4",
29
+ "@nrwl/expo": "16.8.0-beta.5",
30
+ "@nx/detox": "16.8.0-beta.5",
31
+ "@nx/devkit": "16.8.0-beta.5",
32
+ "@nx/jest": "16.8.0-beta.5",
33
+ "@nx/js": "16.8.0-beta.5",
34
+ "@nx/linter": "16.8.0-beta.5",
35
+ "@nx/react": "16.8.0-beta.5",
36
+ "@nx/webpack": "16.8.0-beta.5",
37
37
  "chalk": "^4.1.0",
38
38
  "enhanced-resolve": "^5.8.3",
39
39
  "fs-extra": "^11.1.0",
@@ -60,5 +60,5 @@
60
60
  "access": "public"
61
61
  },
62
62
  "type": "commonjs",
63
- "gitHead": "c9aad2dc8c2b34531cf61549bff872e68c481e4e"
63
+ "gitHead": "ad2d1e8a55b2d1b358bb5e7483343d9757ff2c53"
64
64
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getResolveRequest = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const metroResolver = require("metro-resolver");
6
5
  const tsconfig_paths_1 = require("tsconfig-paths");
7
6
  const chalk = require("chalk");
@@ -20,7 +19,7 @@ function getResolveRequest(extensions) {
20
19
  const debug = process.env.NX_REACT_NATIVE_DEBUG === 'true';
21
20
  if (debug)
22
21
  console.log(chalk.cyan(`[Nx] Resolving: ${realModuleName}`));
23
- const { resolveRequest } = _context, context = tslib_1.__rest(_context, ["resolveRequest"]);
22
+ const { resolveRequest, ...context } = _context;
24
23
  const resolvedPath = resolveRequestFromContext(resolveRequest, _context, realModuleName, platform, debug) ||
25
24
  defaultMetroResolver(context, realModuleName, platform, debug) ||
26
25
  tsconfigPathsResolver(context, extensions, realModuleName, platform, debug) ||
@@ -36,7 +35,7 @@ function resolveRequestFromContext(resolveRequest, context, realModuleName, plat
36
35
  try {
37
36
  return resolveRequest(context, realModuleName, platform);
38
37
  }
39
- catch (_a) {
38
+ catch {
40
39
  if (debug)
41
40
  console.log(chalk.cyan(`[Nx] Unable to resolve with default resolveRequest: ${realModuleName}`));
42
41
  }
@@ -49,7 +48,7 @@ function defaultMetroResolver(context, realModuleName, platform, debug) {
49
48
  try {
50
49
  return metroResolver.resolve(context, realModuleName, platform);
51
50
  }
52
- catch (_a) {
51
+ catch {
53
52
  if (debug)
54
53
  console.log(chalk.cyan(`[Nx] Unable to resolve with default Metro resolver: ${realModuleName}`));
55
54
  }
@@ -68,7 +67,7 @@ function pnpmResolver(extensions, context, realModuleName, debug) {
68
67
  return { type: 'sourceFile', filePath };
69
68
  }
70
69
  }
71
- catch (_a) {
70
+ catch {
72
71
  if (debug)
73
72
  console.log(chalk.cyan(`[Nx] Unable to resolve with default PNPM resolver: ${realModuleName}`));
74
73
  }
@@ -1,37 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withNxMetro = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const metro_config_1 = require("metro-config");
7
6
  const path_1 = require("path");
8
7
  const fs_extra_1 = require("fs-extra");
9
8
  const metro_resolver_1 = require("./metro-resolver");
10
- function withNxMetro(userConfig, opts = {}) {
11
- var _a;
12
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
- const extensions = ['', 'ts', 'tsx', 'js', 'jsx', 'json'];
14
- if (opts.debug)
15
- process.env.NX_REACT_NATIVE_DEBUG = 'true';
16
- if (opts.extensions)
17
- extensions.push(...opts.extensions);
18
- let watchFolders = [
19
- (0, path_1.join)(devkit_1.workspaceRoot, 'node_modules'),
20
- (0, path_1.join)(devkit_1.workspaceRoot, (0, devkit_1.workspaceLayout)().libsDir),
21
- (0, path_1.join)(devkit_1.workspaceRoot, 'packages'),
22
- (0, path_1.join)(devkit_1.workspaceRoot, '.storybook'),
23
- ];
24
- if ((_a = opts.watchFolders) === null || _a === void 0 ? void 0 : _a.length) {
25
- watchFolders = watchFolders.concat(opts.watchFolders);
26
- }
27
- watchFolders = watchFolders.filter((folder) => (0, fs_extra_1.existsSync)(folder));
28
- const nxConfig = {
29
- resolver: {
30
- resolveRequest: (0, metro_resolver_1.getResolveRequest)(extensions),
31
- },
32
- watchFolders,
33
- };
34
- return (0, metro_config_1.mergeConfig)(userConfig, nxConfig);
35
- });
9
+ async function withNxMetro(userConfig, opts = {}) {
10
+ const extensions = ['', 'ts', 'tsx', 'js', 'jsx', 'json'];
11
+ if (opts.debug)
12
+ process.env.NX_REACT_NATIVE_DEBUG = 'true';
13
+ if (opts.extensions)
14
+ extensions.push(...opts.extensions);
15
+ let watchFolders = [
16
+ (0, path_1.join)(devkit_1.workspaceRoot, 'node_modules'),
17
+ (0, path_1.join)(devkit_1.workspaceRoot, (0, devkit_1.workspaceLayout)().libsDir),
18
+ (0, path_1.join)(devkit_1.workspaceRoot, 'packages'),
19
+ (0, path_1.join)(devkit_1.workspaceRoot, '.storybook'),
20
+ ];
21
+ if (opts.watchFolders?.length) {
22
+ watchFolders = watchFolders.concat(opts.watchFolders);
23
+ }
24
+ watchFolders = watchFolders.filter((folder) => (0, fs_extra_1.existsSync)(folder));
25
+ const nxConfig = {
26
+ resolver: {
27
+ resolveRequest: (0, metro_resolver_1.getResolveRequest)(extensions),
28
+ },
29
+ watchFolders,
30
+ };
31
+ return (0, metro_config_1.mergeConfig)(userConfig, nxConfig);
36
32
  }
37
33
  exports.withNxMetro = withNxMetro;
@@ -1,51 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withNxWebpack = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
6
5
  const path_1 = require("path");
7
6
  /**
8
7
  * @deprecated TODO(v17) use bundler: 'metro' instead, will be removed in 16.0.0
9
8
  * This function add additional rules to expo's webpack config to make expo web working
10
9
  */
11
- function withNxWebpack(config) {
12
- var _a;
13
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
- // add additional rule to load files under libs
15
- const rules = (_a = config.module.rules[1]) === null || _a === void 0 ? void 0 : _a.oneOf;
16
- if (rules) {
17
- rules.push({
18
- test: /\.(mjs|[jt]sx?)$/,
19
- exclude: /node_modules/,
20
- use: {
21
- loader: require.resolve('@nx/webpack/src/utils/web-babel-loader.js'),
22
- options: {
23
- presets: [
24
- [
25
- '@nx/react/babel',
26
- {
27
- runtime: 'automatic',
28
- },
29
- ],
10
+ async function withNxWebpack(config) {
11
+ // add additional rule to load files under libs
12
+ const rules = config.module.rules[1]?.oneOf;
13
+ if (rules) {
14
+ rules.push({
15
+ test: /\.(mjs|[jt]sx?)$/,
16
+ exclude: /node_modules/,
17
+ use: {
18
+ loader: require.resolve('@nx/webpack/src/utils/web-babel-loader.js'),
19
+ options: {
20
+ presets: [
21
+ [
22
+ '@nx/react/babel',
23
+ {
24
+ runtime: 'automatic',
25
+ },
30
26
  ],
31
- },
27
+ ],
32
28
  },
33
- });
34
- }
35
- if (!config.resolve) {
36
- config.resolve = {};
37
- }
38
- if (!config.resolve.plugins) {
39
- config.resolve.plugins = [];
40
- }
41
- const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
42
- const tsConfigPath = (0, path_1.resolve)('tsconfig.json');
43
- config.resolve.plugins.push(new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({
44
- configFile: tsConfigPath,
45
- extensions,
46
- }));
47
- config.resolve.symlinks = true;
48
- return config;
49
- });
29
+ },
30
+ });
31
+ }
32
+ if (!config.resolve) {
33
+ config.resolve = {};
34
+ }
35
+ if (!config.resolve.plugins) {
36
+ config.resolve.plugins = [];
37
+ }
38
+ const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
39
+ const tsConfigPath = (0, path_1.resolve)('tsconfig.json');
40
+ config.resolve.plugins.push(new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({
41
+ configFile: tsConfigPath,
42
+ extensions,
43
+ }));
44
+ config.resolve.symlinks = true;
45
+ return config;
50
46
  }
51
47
  exports.withNxWebpack = withNxWebpack;
@@ -1,38 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const devkit_1 = require("@nx/devkit");
5
4
  const path_1 = require("path");
6
5
  const child_process_1 = require("child_process");
7
6
  const download_impl_1 = require("../download/download.impl");
8
7
  const fs_extra_1 = require("fs-extra");
9
8
  let childProcess;
10
- function buildExecutor(options, context) {
11
- return tslib_1.__asyncGenerator(this, arguments, function* buildExecutor_1() {
12
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
- try {
14
- // remove the output app if it already existed
15
- if (options.local && options.output) {
16
- (0, fs_extra_1.removeSync)(options.output);
17
- if (options.output.endsWith('.tar.gz')) {
18
- // remove unzipped app if it already existed
19
- (0, fs_extra_1.removeSync)(options.output.replace('.tar.gz', '.app'));
20
- }
21
- }
22
- yield tslib_1.__await(runCliBuild(context.root, projectRoot, options));
23
- // unzip the build if it's a tar.gz
24
- if (options.local && options.output && options.output.endsWith('.tar.gz')) {
25
- const outputDirectory = (0, path_1.dirname)(options.output);
26
- yield tslib_1.__await((0, download_impl_1.unzipBuild)(options.output, outputDirectory));
9
+ async function* buildExecutor(options, context) {
10
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
11
+ try {
12
+ // remove the output app if it already existed
13
+ if (options.local && options.output) {
14
+ (0, fs_extra_1.removeSync)(options.output);
15
+ if (options.output.endsWith('.tar.gz')) {
16
+ // remove unzipped app if it already existed
17
+ (0, fs_extra_1.removeSync)(options.output.replace('.tar.gz', '.app'));
27
18
  }
28
- yield yield tslib_1.__await({ success: true });
29
19
  }
30
- finally {
31
- if (childProcess) {
32
- childProcess.kill();
33
- }
20
+ await runCliBuild(context.root, projectRoot, options);
21
+ // unzip the build if it's a tar.gz
22
+ if (options.local && options.output && options.output.endsWith('.tar.gz')) {
23
+ const outputDirectory = (0, path_1.dirname)(options.output);
24
+ await (0, download_impl_1.unzipBuild)(options.output, outputDirectory);
34
25
  }
35
- });
26
+ yield { success: true };
27
+ }
28
+ finally {
29
+ if (childProcess) {
30
+ childProcess.kill();
31
+ }
32
+ }
36
33
  }
37
34
  exports.default = buildExecutor;
38
35
  function runCliBuild(workspaceRoot, projectRoot, options) {
@@ -1,30 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runCliBuildList = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const path_1 = require("path");
7
6
  const child_process_1 = require("child_process");
8
7
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
8
  let childProcess;
10
- function buildListExecutor(options, context) {
11
- return tslib_1.__asyncGenerator(this, arguments, function* buildListExecutor_1() {
12
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
- (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
14
- try {
15
- if (options.json) {
16
- // when json is true, interactive has to be false
17
- options.interactive = false;
18
- }
19
- yield tslib_1.__await(runCliBuildList(context.root, projectRoot, options));
20
- yield yield tslib_1.__await({ success: true });
9
+ async function* buildListExecutor(options, context) {
10
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
11
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
12
+ try {
13
+ if (options.json) {
14
+ // when json is true, interactive has to be false
15
+ options.interactive = false;
21
16
  }
22
- finally {
23
- if (childProcess) {
24
- childProcess.kill();
25
- }
17
+ await runCliBuildList(context.root, projectRoot, options);
18
+ yield { success: true };
19
+ }
20
+ finally {
21
+ if (childProcess) {
22
+ childProcess.kill();
26
23
  }
27
- });
24
+ }
28
25
  }
29
26
  exports.default = buildListExecutor;
30
27
  function runCliBuildList(workspaceRoot, projectRoot, options) {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.copyBuildFile = exports.unzipBuild = exports.getAppExtension = exports.getBuild = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const fs_extra_1 = require("fs-extra");
7
6
  const node_fetch_1 = require("node-fetch");
@@ -19,57 +18,56 @@ const streamPipeline = (0, util_1.promisify)(stream_1.pipeline);
19
18
  * This executor downloads the latest EAS build.
20
19
  * It calls the build list executor to list EAS builds with options passed in.
21
20
  */
22
- function downloadExecutor(options, context) {
23
- var _a, _b;
24
- return tslib_1.__asyncGenerator(this, arguments, function* downloadExecutor_1() {
25
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
26
- (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
27
- const build = yield tslib_1.__await(getBuild(context.root, projectRoot, options));
28
- const buildUrl = (_a = build === null || build === void 0 ? void 0 : build.artifacts) === null || _a === void 0 ? void 0 : _a.buildUrl;
29
- if (!buildUrl) {
30
- throw new Error(`No build URL found.`);
31
- }
32
- if (!(0, fs_extra_1.existsSync)(options.output)) {
33
- (0, fs_extra_1.mkdirSync)(options.output, { recursive: true });
34
- }
35
- const downloadFileName = buildUrl.split('/').pop();
36
- const downloadFilePath = (0, path_1.join)(options.output, downloadFileName);
37
- yield tslib_1.__await(downloadBuild(buildUrl, downloadFilePath));
38
- const appExtension = getAppExtension(build.platform, downloadFileName);
39
- const appName = `${(0, devkit_1.names)((_b = build.project) === null || _b === void 0 ? void 0 : _b.name).className}${appExtension}`;
40
- const outputFilePath = (0, path_1.join)(options.output, appName);
41
- if ((0, fs_extra_1.existsSync)(outputFilePath)) {
42
- (0, fs_extra_1.removeSync)(outputFilePath);
43
- }
44
- if (downloadFileName.endsWith('.tar.gz')) {
45
- yield tslib_1.__await(unzipBuild(downloadFilePath, options.output));
46
- }
47
- else {
48
- yield tslib_1.__await(copyBuildFile(downloadFilePath, outputFilePath));
49
- }
50
- devkit_1.logger.info(`Successfully download the build to ${outputFilePath}`);
51
- yield yield tslib_1.__await({ success: true });
52
- });
21
+ async function* downloadExecutor(options, context) {
22
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
23
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
24
+ const build = await getBuild(context.root, projectRoot, options);
25
+ const buildUrl = build?.artifacts?.buildUrl;
26
+ if (!buildUrl) {
27
+ throw new Error(`No build URL found.`);
28
+ }
29
+ if (!(0, fs_extra_1.existsSync)(options.output)) {
30
+ (0, fs_extra_1.mkdirSync)(options.output, { recursive: true });
31
+ }
32
+ const downloadFileName = buildUrl.split('/').pop();
33
+ const downloadFilePath = (0, path_1.join)(options.output, downloadFileName);
34
+ await downloadBuild(buildUrl, downloadFilePath);
35
+ const appExtension = getAppExtension(build.platform, downloadFileName);
36
+ const appName = `${(0, devkit_1.names)(build.project?.name).className}${appExtension}`;
37
+ const outputFilePath = (0, path_1.join)(options.output, appName);
38
+ if ((0, fs_extra_1.existsSync)(outputFilePath)) {
39
+ (0, fs_extra_1.removeSync)(outputFilePath);
40
+ }
41
+ if (downloadFileName.endsWith('.tar.gz')) {
42
+ await unzipBuild(downloadFilePath, options.output);
43
+ }
44
+ else {
45
+ await copyBuildFile(downloadFilePath, outputFilePath);
46
+ }
47
+ devkit_1.logger.info(`Successfully download the build to ${outputFilePath}`);
48
+ yield { success: true };
53
49
  }
54
50
  exports.default = downloadExecutor;
55
- function downloadBuild(buildUrl, output) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- const response = yield (0, node_fetch_1.default)(buildUrl);
58
- if (!response.ok)
59
- throw new Error(`Unable to download the build ${buildUrl}. Error: ${response.statusText}`);
60
- return streamPipeline(response.body, (0, fs_extra_1.createWriteStream)(output));
61
- });
51
+ async function downloadBuild(buildUrl, output) {
52
+ const response = await (0, node_fetch_1.default)(buildUrl);
53
+ if (!response.ok)
54
+ throw new Error(`Unable to download the build ${buildUrl}. Error: ${response.statusText}`);
55
+ return streamPipeline(response.body, (0, fs_extra_1.createWriteStream)(output));
62
56
  }
63
- function getBuild(workspaceRoot, projectRoot, options) {
64
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
- const buildList = yield (0, build_list_impl_1.runCliBuildList)(workspaceRoot, projectRoot, Object.assign(Object.assign({}, options), { interactive: false, json: true, status: 'finished', limit: 1 }));
66
- const builds = JSON.parse(buildList);
67
- if (!builds.length) {
68
- throw new Error(`No EAS build found. Please check expo.dev to make sure your build is finished.`);
69
- }
70
- devkit_1.logger.info(`${chalk.bold.cyan('info')} Found build: ${buildList}`);
71
- return builds[0];
57
+ async function getBuild(workspaceRoot, projectRoot, options) {
58
+ const buildList = await (0, build_list_impl_1.runCliBuildList)(workspaceRoot, projectRoot, {
59
+ ...options,
60
+ interactive: false,
61
+ json: true,
62
+ status: 'finished',
63
+ limit: 1,
72
64
  });
65
+ const builds = JSON.parse(buildList);
66
+ if (!builds.length) {
67
+ throw new Error(`No EAS build found. Please check expo.dev to make sure your build is finished.`);
68
+ }
69
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Found build: ${buildList}`);
70
+ return builds[0];
73
71
  }
74
72
  exports.getBuild = getBuild;
75
73
  function getAppExtension(platform, downloadFileName) {
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
5
- function ensureSymlinkExecutor(_, context) {
6
- return tslib_1.__asyncGenerator(this, arguments, function* ensureSymlinkExecutor_1() {
7
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
8
- (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
9
- yield yield tslib_1.__await({ success: true });
10
- });
4
+ async function* ensureSymlinkExecutor(_, context) {
5
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
6
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
7
+ yield { success: true };
11
8
  }
12
9
  exports.default = ensureSymlinkExecutor;
@@ -1,25 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const devkit_1 = require("@nx/devkit");
5
4
  const child_process_1 = require("child_process");
6
5
  const path_1 = require("path");
7
6
  let childProcess;
8
- function exportExecutor(options, context) {
9
- return tslib_1.__asyncGenerator(this, arguments, function* exportExecutor_1() {
10
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
11
- try {
12
- yield tslib_1.__await(exportAsync(context.root, projectRoot, options));
13
- yield yield tslib_1.__await({
14
- success: true,
15
- });
7
+ async function* exportExecutor(options, context) {
8
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
9
+ try {
10
+ await exportAsync(context.root, projectRoot, options);
11
+ yield {
12
+ success: true,
13
+ };
14
+ }
15
+ finally {
16
+ if (childProcess) {
17
+ childProcess.kill();
16
18
  }
17
- finally {
18
- if (childProcess) {
19
- childProcess.kill();
20
- }
21
- }
22
- });
19
+ }
23
20
  }
24
21
  exports.default = exportExecutor;
25
22
  function exportAsync(workspaceRoot, projectRoot, options) {
@@ -1,27 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.installAsync = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const child_process_1 = require("child_process");
7
6
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
8
7
  let childProcess;
9
- function installExecutor(options, context) {
10
- return tslib_1.__asyncGenerator(this, arguments, function* installExecutor_1() {
11
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
12
- try {
13
- yield tslib_1.__await(installAsync(context.root, options));
14
- (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
15
- yield yield tslib_1.__await({
16
- success: true,
17
- });
8
+ async function* installExecutor(options, context) {
9
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
10
+ try {
11
+ await installAsync(context.root, options);
12
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
13
+ yield {
14
+ success: true,
15
+ };
16
+ }
17
+ finally {
18
+ if (childProcess) {
19
+ childProcess.kill();
18
20
  }
19
- finally {
20
- if (childProcess) {
21
- childProcess.kill();
22
- }
23
- }
24
- });
21
+ }
25
22
  }
26
23
  exports.default = installExecutor;
27
24
  function installAsync(workspaceRoot, options) {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prebuildAsync = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const child_process_1 = require("child_process");
7
6
  const path_1 = require("path");
@@ -9,28 +8,26 @@ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-s
9
8
  const pod_install_task_1 = require("../../utils/pod-install-task");
10
9
  const install_impl_1 = require("../install/install.impl");
11
10
  let childProcess;
12
- function prebuildExecutor(options, context) {
13
- return tslib_1.__asyncGenerator(this, arguments, function* prebuildExecutor_1() {
14
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
15
- (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
16
- try {
17
- yield tslib_1.__await(prebuildAsync(context.root, projectRoot, options));
18
- if (options.install) {
19
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
20
- if (options.platform === 'ios') {
21
- (0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios'));
22
- }
11
+ async function* prebuildExecutor(options, context) {
12
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
14
+ try {
15
+ await prebuildAsync(context.root, projectRoot, options);
16
+ if (options.install) {
17
+ await (0, install_impl_1.installAsync)(context.root, {});
18
+ if (options.platform === 'ios') {
19
+ (0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios'));
23
20
  }
24
- yield yield tslib_1.__await({
25
- success: true,
26
- });
27
21
  }
28
- finally {
29
- if (childProcess) {
30
- childProcess.kill();
31
- }
22
+ yield {
23
+ success: true,
24
+ };
25
+ }
26
+ finally {
27
+ if (childProcess) {
28
+ childProcess.kill();
32
29
  }
33
- });
30
+ }
34
31
  }
35
32
  exports.default = prebuildExecutor;
36
33
  function prebuildAsync(workspaceRoot, projectRoot, options) {