@nx/expo 16.4.0-beta.0 → 16.4.0-beta.2

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 (144) hide show
  1. package/executors.json +10 -0
  2. package/index.js +0 -1
  3. package/migrations.json +21 -0
  4. package/package.json +11 -11
  5. package/plugins/jest/svg-mock.js +0 -1
  6. package/plugins/metro-resolver.js +0 -1
  7. package/plugins/with-nx-metro.js +0 -1
  8. package/plugins/with-nx-webpack.js +0 -1
  9. package/src/executors/build/build.impl.js +5 -1
  10. package/src/executors/build/compat.js +0 -1
  11. package/src/executors/build/schema.d.ts +1 -1
  12. package/src/executors/build/schema.json +21 -3
  13. package/src/executors/build-list/build-list.impl.js +0 -1
  14. package/src/executors/build-list/compat.js +0 -1
  15. package/src/executors/download/compat.js +0 -1
  16. package/src/executors/download/download.impl.js +0 -1
  17. package/src/executors/ensure-symlink/compat.js +0 -1
  18. package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -1
  19. package/src/executors/export/compat.js +0 -1
  20. package/src/executors/export/export.impl.js +0 -1
  21. package/src/executors/install/compat.js +0 -1
  22. package/src/executors/install/install.impl.js +0 -1
  23. package/src/executors/prebuild/compat.js +0 -1
  24. package/src/executors/prebuild/prebuild.impl.js +1 -5
  25. package/src/executors/prebuild/schema.json +1 -1
  26. package/src/executors/run/compat.js +0 -1
  27. package/src/executors/run/run.impl.js +1 -9
  28. package/src/executors/run/schema.json +1 -1
  29. package/src/executors/start/compat.js +0 -1
  30. package/src/executors/start/schema.d.ts +3 -0
  31. package/src/executors/start/schema.json +5 -0
  32. package/src/executors/start/start.impl.js +9 -2
  33. package/src/executors/submit/compat.d.ts +2 -0
  34. package/src/executors/submit/compat.js +5 -0
  35. package/src/executors/submit/schema.d.ts +12 -0
  36. package/src/executors/submit/schema.json +57 -0
  37. package/src/executors/submit/submit.impl.d.ts +6 -0
  38. package/src/executors/submit/submit.impl.js +74 -0
  39. package/src/executors/sync-deps/compat.js +0 -1
  40. package/src/executors/sync-deps/sync-deps.impl.js +0 -1
  41. package/src/executors/update/compat.js +0 -1
  42. package/src/executors/update/schema.d.ts +1 -1
  43. package/src/executors/update/schema.json +13 -3
  44. package/src/executors/update/update.impl.js +10 -2
  45. package/src/generators/application/application.js +0 -1
  46. package/src/generators/application/lib/add-detox.js +0 -1
  47. package/src/generators/application/lib/add-eas-scripts.js +0 -1
  48. package/src/generators/application/lib/add-project.js +4 -1
  49. package/src/generators/application/lib/create-application-files.js +0 -1
  50. package/src/generators/application/lib/normalize-options.js +0 -1
  51. package/src/generators/component/component.js +0 -1
  52. package/src/generators/component/lib/add-import.js +0 -1
  53. package/src/generators/component/lib/normalize-options.js +0 -1
  54. package/src/generators/init/init.js +0 -1
  55. package/src/generators/init/lib/add-git-ignore-entry.js +0 -1
  56. package/src/generators/init/lib/gitignore-entries.js +0 -1
  57. package/src/generators/init/lib/init-root-babel-config.js +0 -1
  58. package/src/generators/library/files/lib/tsconfig.json.template +1 -1
  59. package/src/generators/library/lib/normalize-options.js +0 -1
  60. package/src/generators/library/library.js +0 -1
  61. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -1
  62. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +0 -1
  63. package/src/migrations/update-14-4-3/add-eas-build-target.js +0 -1
  64. package/src/migrations/update-14-5-1/add-eas-update-target.js +0 -1
  65. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +0 -1
  66. package/src/migrations/update-15-0-3/change-jest-preset.js +0 -1
  67. package/src/migrations/update-15-8-3/change-webpack-to-metro.js +0 -1
  68. package/src/migrations/update-16-0-0/add-jest-expo.js +5 -5
  69. package/src/migrations/update-16-0-0/remove-deprecated-targets.js +4 -4
  70. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -1
  71. package/src/migrations/update-16-1-4/add-detox-app-json.js +3 -3
  72. package/src/migrations/update-16-1-4/update-eas-scripts.js +4 -4
  73. package/src/migrations/update-16-2-2/add-submit-target.d.ts +5 -0
  74. package/src/migrations/update-16-2-2/add-submit-target.js +26 -0
  75. package/src/utils/add-jest.js +0 -1
  76. package/src/utils/add-linting.js +0 -1
  77. package/src/utils/ensure-node-modules-symlink.js +0 -1
  78. package/src/utils/find-all-npm-dependencies.js +0 -1
  79. package/src/utils/pod-install-task.d.ts +1 -1
  80. package/src/utils/pod-install-task.js +9 -21
  81. package/src/utils/symlink-task.js +0 -1
  82. package/src/utils/versions.d.ts +5 -4
  83. package/src/utils/versions.js +6 -6
  84. package/index.js.map +0 -1
  85. package/plugins/jest/svg-mock.js.map +0 -1
  86. package/plugins/metro-resolver.js.map +0 -1
  87. package/plugins/with-nx-metro.js.map +0 -1
  88. package/plugins/with-nx-webpack.js.map +0 -1
  89. package/src/executors/build/build.impl.js.map +0 -1
  90. package/src/executors/build/compat.js.map +0 -1
  91. package/src/executors/build-list/build-list.impl.js.map +0 -1
  92. package/src/executors/build-list/compat.js.map +0 -1
  93. package/src/executors/download/compat.js.map +0 -1
  94. package/src/executors/download/download.impl.js.map +0 -1
  95. package/src/executors/ensure-symlink/compat.js.map +0 -1
  96. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
  97. package/src/executors/export/compat.js.map +0 -1
  98. package/src/executors/export/export.impl.js.map +0 -1
  99. package/src/executors/install/compat.js.map +0 -1
  100. package/src/executors/install/install.impl.js.map +0 -1
  101. package/src/executors/prebuild/compat.js.map +0 -1
  102. package/src/executors/prebuild/prebuild.impl.js.map +0 -1
  103. package/src/executors/run/compat.js.map +0 -1
  104. package/src/executors/run/run.impl.js.map +0 -1
  105. package/src/executors/start/compat.js.map +0 -1
  106. package/src/executors/start/start.impl.js.map +0 -1
  107. package/src/executors/sync-deps/compat.js.map +0 -1
  108. package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
  109. package/src/executors/update/compat.js.map +0 -1
  110. package/src/executors/update/update.impl.js.map +0 -1
  111. package/src/generators/application/application.js.map +0 -1
  112. package/src/generators/application/lib/add-detox.js.map +0 -1
  113. package/src/generators/application/lib/add-eas-scripts.js.map +0 -1
  114. package/src/generators/application/lib/add-project.js.map +0 -1
  115. package/src/generators/application/lib/create-application-files.js.map +0 -1
  116. package/src/generators/application/lib/normalize-options.js.map +0 -1
  117. package/src/generators/component/component.js.map +0 -1
  118. package/src/generators/component/lib/add-import.js.map +0 -1
  119. package/src/generators/component/lib/normalize-options.js.map +0 -1
  120. package/src/generators/init/init.js.map +0 -1
  121. package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
  122. package/src/generators/init/lib/gitignore-entries.js.map +0 -1
  123. package/src/generators/init/lib/init-root-babel-config.js.map +0 -1
  124. package/src/generators/library/lib/normalize-options.js.map +0 -1
  125. package/src/generators/library/library.js.map +0 -1
  126. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
  127. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +0 -1
  128. package/src/migrations/update-14-4-3/add-eas-build-target.js.map +0 -1
  129. package/src/migrations/update-14-5-1/add-eas-update-target.js.map +0 -1
  130. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +0 -1
  131. package/src/migrations/update-15-0-3/change-jest-preset.js.map +0 -1
  132. package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +0 -1
  133. package/src/migrations/update-16-0-0/add-jest-expo.js.map +0 -1
  134. package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +0 -1
  135. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +0 -1
  136. package/src/migrations/update-16-1-4/add-detox-app-json.js.map +0 -1
  137. package/src/migrations/update-16-1-4/update-eas-scripts.js.map +0 -1
  138. package/src/utils/add-jest.js.map +0 -1
  139. package/src/utils/add-linting.js.map +0 -1
  140. package/src/utils/ensure-node-modules-symlink.js.map +0 -1
  141. package/src/utils/find-all-npm-dependencies.js.map +0 -1
  142. package/src/utils/pod-install-task.js.map +0 -1
  143. package/src/utils/symlink-task.js.map +0 -1
  144. package/src/utils/versions.js.map +0 -1
package/executors.json CHANGED
@@ -54,6 +54,11 @@
54
54
  "implementation": "./src/executors/export/export.impl",
55
55
  "schema": "./src/executors/export/schema.json",
56
56
  "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
57
+ },
58
+ "submit": {
59
+ "implementation": "./src/executors/submit/submit.impl",
60
+ "schema": "./src/executors/submit/schema.json",
61
+ "description": "Submit app binary to App Store and/or Play Store"
57
62
  }
58
63
  },
59
64
  "builders": {
@@ -111,6 +116,11 @@
111
116
  "implementation": "./src/executors/export/compat",
112
117
  "schema": "./src/executors/export/schema.json",
113
118
  "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
119
+ },
120
+ "submit": {
121
+ "implementation": "./src/executors/submit/compat",
122
+ "schema": "./src/executors/submit/schema.json",
123
+ "description": "Submit app binary to App Store and/or Play Store"
114
124
  }
115
125
  }
116
126
  }
package/index.js CHANGED
@@ -9,4 +9,3 @@ var with_nx_metro_1 = require("./plugins/with-nx-metro");
9
9
  Object.defineProperty(exports, "withNxMetro", { enumerable: true, get: function () { return with_nx_metro_1.withNxMetro; } });
10
10
  var with_nx_webpack_1 = require("./plugins/with-nx-webpack");
11
11
  Object.defineProperty(exports, "withNxWebpack", { enumerable: true, get: function () { return with_nx_webpack_1.withNxWebpack; } });
12
- //# sourceMappingURL=index.js.map
package/migrations.json CHANGED
@@ -817,6 +817,27 @@
817
817
  "alwaysAddToPackageJson": false
818
818
  }
819
819
  }
820
+ },
821
+ "16.2.2": {
822
+ "version": "16.2.2-beta.0",
823
+ "packages": {
824
+ "expo": {
825
+ "version": "^48.0.17",
826
+ "alwaysAddToPackageJson": false
827
+ },
828
+ "eas-cli": {
829
+ "version": "~3.13.2",
830
+ "alwaysAddToPackageJson": false
831
+ },
832
+ "react-native": {
833
+ "version": "0.71.8",
834
+ "alwaysAddToPackageJson": false
835
+ },
836
+ "@types/react-native": {
837
+ "version": "0.71.7",
838
+ "alwaysAddToPackageJson": false
839
+ }
840
+ }
820
841
  }
821
842
  }
822
843
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "16.4.0-beta.0",
3
+ "version": "16.4.0-beta.2",
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",
27
27
  "types": "index.d.ts",
28
28
  "dependencies": {
29
- "@nrwl/expo": "16.4.0-beta.0",
30
- "@nx/detox": "16.4.0-beta.0",
31
- "@nx/devkit": "16.4.0-beta.0",
32
- "@nx/jest": "16.4.0-beta.0",
33
- "@nx/js": "16.4.0-beta.0",
34
- "@nx/linter": "16.4.0-beta.0",
35
- "@nx/react": "16.4.0-beta.0",
36
- "@nx/webpack": "16.4.0-beta.0",
29
+ "@nrwl/expo": "16.4.0-beta.2",
30
+ "@nx/detox": "16.4.0-beta.2",
31
+ "@nx/devkit": "16.4.0-beta.2",
32
+ "@nx/jest": "16.4.0-beta.2",
33
+ "@nx/js": "16.4.0-beta.2",
34
+ "@nx/linter": "16.4.0-beta.2",
35
+ "@nx/react": "16.4.0-beta.2",
36
+ "@nx/webpack": "16.4.0-beta.2",
37
37
  "chalk": "^4.1.0",
38
38
  "enhanced-resolve": "^5.8.3",
39
39
  "fs-extra": "^11.1.0",
@@ -44,7 +44,7 @@
44
44
  "tsconfig-paths-webpack-plugin": "^4.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "expo": "^48.0.16"
47
+ "expo": "^48.0.17"
48
48
  },
49
49
  "builders": "./executors.json",
50
50
  "ng-update": {
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "c2112a07278e9c78cd6f6c194eb4a75115a7d179"
58
+ "gitHead": "abb2678056668cc8beaaf9c5ebc2a2e6ad487173"
59
59
  }
@@ -1,4 +1,3 @@
1
1
  // From https://github.com/kristerkari/react-native-svg-transformer#usage-with-jest
2
2
  module.exports = 'SvgMock';
3
3
  module.exports.ReactComponent = 'SvgMock';
4
- //# sourceMappingURL=svg-mock.js.map
@@ -132,4 +132,3 @@ function getPnpmResolver(extensions) {
132
132
  }
133
133
  return resolver;
134
134
  }
135
- //# sourceMappingURL=metro-resolver.js.map
@@ -29,4 +29,3 @@ function withNxMetro(config, opts = {}) {
29
29
  return config;
30
30
  }
31
31
  exports.withNxMetro = withNxMetro;
32
- //# sourceMappingURL=with-nx-metro.js.map
@@ -49,4 +49,3 @@ function withNxWebpack(config) {
49
49
  });
50
50
  }
51
51
  exports.withNxWebpack = withNxWebpack;
52
- //# sourceMappingURL=with-nx-webpack.js.map
@@ -61,6 +61,11 @@ function createBuildOptions(options) {
61
61
  return Object.keys(options).reduce((acc, k) => {
62
62
  const v = options[k];
63
63
  if (typeof v === 'boolean') {
64
+ if (k === 'interactive') {
65
+ if (v === false) {
66
+ acc.push('--non-interactive'); // when is false, the flag is --non-interactive
67
+ }
68
+ }
64
69
  if (v === true) {
65
70
  // when true, does not need to pass the value true, just need to pass the flag in kebob case
66
71
  acc.push(`--${(0, devkit_1.names)(k).fileName}`);
@@ -75,4 +80,3 @@ function createBuildOptions(options) {
75
80
  return acc;
76
81
  }, []);
77
82
  }
78
- //# sourceMappingURL=build.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const build_impl_1 = require("./build.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(build_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -3,7 +3,7 @@
3
3
  export interface ExpoEasBuildOptions {
4
4
  platform: 'ios' | 'android' | 'all';
5
5
  profile?: string;
6
- nonInteractive: boolean; // default is false
6
+ interactive: boolean; // default is true
7
7
  local: boolean; // default is false
8
8
  output?: string;
9
9
  wait: boolean; // default is true
@@ -7,6 +7,24 @@
7
7
  "title": "Expo EAS Build executor",
8
8
  "description": "Start an EAS build for your expo project.",
9
9
  "type": "object",
10
+ "presets": [
11
+ {
12
+ "name": "Build for a specific platform",
13
+ "keys": ["platform"]
14
+ },
15
+ {
16
+ "name": "Build using a specific profile",
17
+ "keys": ["profile"]
18
+ },
19
+ {
20
+ "name": "Run build locally",
21
+ "keys": ["local"]
22
+ },
23
+ {
24
+ "name": "Clear cache before the build",
25
+ "keys": ["clearCache"]
26
+ }
27
+ ],
10
28
  "properties": {
11
29
  "platform": {
12
30
  "enum": ["ios", "android", "all"],
@@ -25,10 +43,10 @@
25
43
  "examples": ["production", "development", "preview"],
26
44
  "x-priority": "important"
27
45
  },
28
- "nonInteractive": {
46
+ "interactive": {
29
47
  "type": "boolean",
30
- "description": "Run command in non-interactive mode",
31
- "default": false
48
+ "description": "Run command in interactive mode",
49
+ "default": true
32
50
  },
33
51
  "local": {
34
52
  "type": "boolean",
@@ -83,4 +83,3 @@ function createBuildListOptions(options) {
83
83
  return acc;
84
84
  }, []);
85
85
  }
86
- //# sourceMappingURL=build-list.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const build_list_impl_1 = require("./build-list.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(build_list_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const download_impl_1 = require("./download.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(download_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -101,4 +101,3 @@ function copyBuildFile(downloadFilePath, outputFilePath) {
101
101
  });
102
102
  }
103
103
  exports.copyBuildFile = copyBuildFile;
104
- //# sourceMappingURL=download.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const ensure_symlink_impl_1 = require("./ensure-symlink.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(ensure_symlink_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -10,4 +10,3 @@ function ensureSymlinkExecutor(_, context) {
10
10
  });
11
11
  }
12
12
  exports.default = ensureSymlinkExecutor;
13
- //# sourceMappingURL=ensure-symlink.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const export_impl_1 = require("./export.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(export_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -66,4 +66,3 @@ function createExportOptions(options) {
66
66
  return acc;
67
67
  }, []);
68
68
  }
69
- //# sourceMappingURL=export.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const install_impl_1 = require("./install.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(install_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -67,4 +67,3 @@ function createInstallOptions(options) {
67
67
  return acc;
68
68
  }, []);
69
69
  }
70
- //# sourceMappingURL=install.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const prebuild_impl_1 = require("./prebuild.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(prebuild_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -16,14 +16,11 @@ function prebuildExecutor(options, context) {
16
16
  try {
17
17
  yield tslib_1.__await(prebuildAsync(context.root, projectRoot, options));
18
18
  if (options.install) {
19
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, { fix: true }));
19
+ yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
20
20
  if (options.platform === 'ios') {
21
21
  yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
22
22
  }
23
23
  }
24
- else {
25
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
26
- }
27
24
  yield yield tslib_1.__await({
28
25
  success: true,
29
26
  });
@@ -67,4 +64,3 @@ function createPrebuildOptions(options) {
67
64
  return acc;
68
65
  }, []);
69
66
  }
70
- //# sourceMappingURL=prebuild.impl.js.map
@@ -16,7 +16,7 @@
16
16
  "install": {
17
17
  "type": "boolean",
18
18
  "description": "Installing npm packages and CocoaPods.",
19
- "default": false,
19
+ "default": true,
20
20
  "x-priority": "internal"
21
21
  },
22
22
  "platform": {
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const run_impl_1 = require("./run.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(run_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -30,18 +30,11 @@ function runExecutor(options, context) {
30
30
  }));
31
31
  }
32
32
  if (options.install) {
33
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
34
- fix: true,
35
- }));
33
+ yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
36
34
  if (options.platform === 'ios') {
37
35
  yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
38
36
  }
39
37
  }
40
- else {
41
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
42
- check: true,
43
- }));
44
- }
45
38
  try {
46
39
  yield tslib_1.__await(runCliRun(context.root, projectRoot, options));
47
40
  yield yield tslib_1.__await({ success: true });
@@ -109,4 +102,3 @@ function createRunOptions(options) {
109
102
  return acc;
110
103
  }, []);
111
104
  }
112
- //# sourceMappingURL=run.impl.js.map
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "install": {
55
55
  "type": "boolean",
56
- "description": "Should install missing dependencies before building.",
56
+ "description": "Installing npm packages and CocoaPods before building.",
57
57
  "default": true
58
58
  },
59
59
  "buildCache": {
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const start_impl_1 = require("./start.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(start_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -19,4 +19,7 @@ export interface ExpoStartOptions {
19
19
  localhost?: boolean;
20
20
  tunnel?: boolean;
21
21
  offline?: boolean;
22
+
23
+ // nx options
24
+ sync?: boolean; // default is true
22
25
  }
@@ -87,6 +87,11 @@
87
87
  "offline": {
88
88
  "type": "boolean",
89
89
  "description": "Allows this command to run while offline"
90
+ },
91
+ "sync": {
92
+ "type": "boolean",
93
+ "description": "Syncs npm dependencies to package.json (for React Native autolink).",
94
+ "default": true
90
95
  }
91
96
  },
92
97
  "examplesFile": "../../../docs/start-examples.md"
@@ -6,11 +6,15 @@ const devkit_1 = require("@nx/devkit");
6
6
  const child_process_1 = require("child_process");
7
7
  const path_1 = require("path");
8
8
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
+ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
9
10
  let childProcess;
10
11
  function startExecutor(options, context) {
11
12
  return tslib_1.__asyncGenerator(this, arguments, function* startExecutor_1() {
12
13
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
14
  (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
15
+ if (options.sync) {
16
+ (0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
17
+ }
14
18
  try {
15
19
  const baseUrl = `http://localhost:${options.port}`;
16
20
  devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
@@ -48,12 +52,16 @@ function startAsync(workspaceRoot, projectRoot, options) {
48
52
  });
49
53
  }
50
54
  // options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/index.ts
55
+ const nxOptions = ['sync'];
51
56
  function createStartOptions(options) {
52
57
  return Object.keys(options).reduce((acc, k) => {
58
+ if (nxOptions.includes(k)) {
59
+ return acc;
60
+ }
53
61
  const v = options[k];
54
62
  if (k === 'dev') {
55
63
  if (v === false) {
56
- acc.push(`--no-dev`);
64
+ acc.push(`--no-dev`); // only no-dev flag is supported
57
65
  }
58
66
  }
59
67
  else {
@@ -70,4 +78,3 @@ function createStartOptions(options) {
70
78
  return acc;
71
79
  }, []);
72
80
  }
73
- //# sourceMappingURL=start.impl.js.map
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const submit_impl_1 = require("./submit.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(submit_impl_1.default);
@@ -0,0 +1,12 @@
1
+ // command to run https://github.com/expo/eas-cli/tree/main#eas-submit
2
+ // options from https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/commands/submit.ts
3
+ export interface SubmitExecutorSchema {
4
+ profile?: string;
5
+ platform?: 'ios' | 'android' | 'all';
6
+ id?: string;
7
+ latest?: boolean;
8
+ interactive: boolean; // default is true
9
+ path?: string;
10
+ url?: string;
11
+ wait: boolean; // default is true
12
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "EXPO EAS Submit Executor",
5
+ "description": "Submit app binary to App Store and/or Play Store.",
6
+ "type": "object",
7
+ "presets": [
8
+ {
9
+ "name": "Submit for a specific platform",
10
+ "keys": ["platform"]
11
+ },
12
+ {
13
+ "name": "Submit using a specific profile",
14
+ "keys": ["profile"]
15
+ }
16
+ ],
17
+ "properties": {
18
+ "profile": {
19
+ "type": "string",
20
+ "description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.",
21
+ "examples": ["production", "development", "preview"],
22
+ "x-priority": "important"
23
+ },
24
+ "platform": {
25
+ "enum": ["ios", "android", "all"],
26
+ "alias": "p",
27
+ "description": "The platform to build the app, example values: ios, android, all.",
28
+ "x-priority": "important"
29
+ },
30
+ "id": {
31
+ "type": "string",
32
+ "description": "Build ID to submit"
33
+ },
34
+ "path": {
35
+ "type": "string",
36
+ "description": "Path to the .apk/.aab/.ipa file"
37
+ },
38
+ "url": {
39
+ "type": "string",
40
+ "description": "URL to the .apk/.aab/.ipa file, app archive url"
41
+ },
42
+ "latest": {
43
+ "type": "boolean",
44
+ "description": "Submit the latest build for specified platform"
45
+ },
46
+ "interactive": {
47
+ "type": "boolean",
48
+ "description": "Run command in interactive mode",
49
+ "default": true
50
+ },
51
+ "wait": {
52
+ "type": "boolean",
53
+ "description": "Wait for build(s) to complete",
54
+ "default": true
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,6 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { SubmitExecutorSchema } from './schema';
3
+ export interface ReactNativeSubmitOutput {
4
+ success: boolean;
5
+ }
6
+ export default function submitExecutor(options: SubmitExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeSubmitOutput>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path_1 = require("path");
6
+ const child_process_1 = require("child_process");
7
+ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
8
+ let childProcess;
9
+ function submitExecutor(options, context) {
10
+ return tslib_1.__asyncGenerator(this, arguments, function* submitExecutor_1() {
11
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
12
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
13
+ try {
14
+ yield tslib_1.__await(runCliSubmit(context.root, projectRoot, options));
15
+ yield yield tslib_1.__await({ success: true });
16
+ }
17
+ finally {
18
+ if (childProcess) {
19
+ childProcess.kill();
20
+ }
21
+ }
22
+ });
23
+ }
24
+ exports.default = submitExecutor;
25
+ function runCliSubmit(workspaceRoot, projectRoot, options) {
26
+ return new Promise((resolve, reject) => {
27
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/eas-cli/bin/run'), ['submit', ...createSubmitOptions(options)], {
28
+ cwd: (0, path_1.join)(workspaceRoot, projectRoot),
29
+ env: process.env,
30
+ });
31
+ // Ensure the child process is killed when the parent exits
32
+ process.on('exit', () => childProcess.kill());
33
+ process.on('SIGTERM', () => childProcess.kill());
34
+ childProcess.on('error', (err) => {
35
+ reject(err);
36
+ });
37
+ childProcess.on('exit', (code) => {
38
+ if (code === 0) {
39
+ resolve(code);
40
+ }
41
+ else {
42
+ reject(code);
43
+ }
44
+ });
45
+ });
46
+ }
47
+ function createSubmitOptions(options) {
48
+ return Object.keys(options).reduce((acc, k) => {
49
+ const v = options[k];
50
+ if (typeof v === 'boolean') {
51
+ if (k === 'interactive') {
52
+ if (v === false) {
53
+ acc.push('--non-interactive'); // when is false, the flag is --non-interactive
54
+ }
55
+ }
56
+ else if (k === 'wait') {
57
+ if (v === false) {
58
+ acc.push('--no-wait'); // when is false, the flag is --no-wait
59
+ }
60
+ else {
61
+ acc.push('--wait');
62
+ }
63
+ }
64
+ else if (v === true) {
65
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
66
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
67
+ }
68
+ }
69
+ else {
70
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
71
+ }
72
+ return acc;
73
+ }, []);
74
+ }
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const sync_deps_impl_1 = require("./sync-deps.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(sync_deps_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -59,4 +59,3 @@ function displayNewlyAddedDepsMessage(projectName, deps) {
59
59
  }
60
60
  }
61
61
  exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
62
- //# sourceMappingURL=sync-deps.impl.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const devkit_1 = require("@nx/devkit");
4
4
  const update_impl_1 = require("./update.impl");
5
5
  exports.default = (0, devkit_1.convertNxExecutor)(update_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -11,5 +11,5 @@ export interface ExpoEasUpdateOptions {
11
11
  json: boolean; // default is false
12
12
  auto: boolean; // default is false
13
13
  privateKeyPath?: string;
14
- nonInteractive: boolean; // default is false
14
+ interactive: boolean; // default is false
15
15
  }
@@ -7,6 +7,16 @@
7
7
  "title": "Expo EAS Update executor",
8
8
  "description": "Start an EAS update for your expo project.",
9
9
  "type": "object",
10
+ "presets": [
11
+ {
12
+ "name": "Update for a specific platform",
13
+ "keys": ["platform"]
14
+ },
15
+ {
16
+ "name": "Update from a specific branch",
17
+ "keys": ["branch"]
18
+ }
19
+ ],
10
20
  "properties": {
11
21
  "branch": {
12
22
  "type": "string",
@@ -55,10 +65,10 @@
55
65
  "type": "string",
56
66
  "description": "File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named \"private-key.pem\" in the certificate's directory."
57
67
  },
58
- "nonInteractive": {
68
+ "interactive": {
59
69
  "type": "boolean",
60
- "description": "Run command in non-interactive mode",
61
- "default": false
70
+ "description": "Run command in interactive mode",
71
+ "default": true
62
72
  }
63
73
  },
64
74
  "required": []