@nx/expo 16.0.0-beta.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 (243) hide show
  1. package/.eslintrc.json +19 -0
  2. package/CHANGELOG.md +8 -0
  3. package/LICENSE +22 -0
  4. package/README.md +63 -0
  5. package/collection.json +0 -0
  6. package/docs/build-list-examples.md +71 -0
  7. package/docs/prebuild-examples.md +70 -0
  8. package/docs/run-examples.md +91 -0
  9. package/docs/start-examples.md +98 -0
  10. package/executors.json +116 -0
  11. package/generators.json +61 -0
  12. package/index.d.ts +4 -0
  13. package/index.js +12 -0
  14. package/index.js.map +1 -0
  15. package/migrations.json +734 -0
  16. package/package.json +59 -0
  17. package/plugins/jest/svg-mock.d.ts +0 -0
  18. package/plugins/jest/svg-mock.js +4 -0
  19. package/plugins/jest/svg-mock.js.map +1 -0
  20. package/plugins/metro-resolver.d.ts +1 -0
  21. package/plugins/metro-resolver.js +135 -0
  22. package/plugins/metro-resolver.js.map +1 -0
  23. package/plugins/with-nx-metro.d.ts +8 -0
  24. package/plugins/with-nx-metro.js +31 -0
  25. package/plugins/with-nx-metro.js.map +1 -0
  26. package/plugins/with-nx-webpack.d.ts +5 -0
  27. package/plugins/with-nx-webpack.js +52 -0
  28. package/plugins/with-nx-webpack.js.map +1 -0
  29. package/project.json +61 -0
  30. package/src/executors/build/build.impl.d.ts +6 -0
  31. package/src/executors/build/build.impl.js +62 -0
  32. package/src/executors/build/build.impl.js.map +1 -0
  33. package/src/executors/build/compat.d.ts +2 -0
  34. package/src/executors/build/compat.js +6 -0
  35. package/src/executors/build/compat.js.map +1 -0
  36. package/src/executors/build/schema.d.ts +14 -0
  37. package/src/executors/build/schema.json +60 -0
  38. package/src/executors/build-list/build-fragment.d.ts +54 -0
  39. package/src/executors/build-list/build-list.impl.d.ts +7 -0
  40. package/src/executors/build-list/build-list.impl.js +86 -0
  41. package/src/executors/build-list/build-list.impl.js.map +1 -0
  42. package/src/executors/build-list/compat.d.ts +2 -0
  43. package/src/executors/build-list/compat.js +6 -0
  44. package/src/executors/build-list/compat.js.map +1 -0
  45. package/src/executors/build-list/schema.d.ts +25 -0
  46. package/src/executors/build-list/schema.json +79 -0
  47. package/src/executors/download/compat.d.ts +2 -0
  48. package/src/executors/download/compat.js +6 -0
  49. package/src/executors/download/compat.js.map +1 -0
  50. package/src/executors/download/download.impl.d.ts +15 -0
  51. package/src/executors/download/download.impl.js +101 -0
  52. package/src/executors/download/download.impl.js.map +1 -0
  53. package/src/executors/download/schema.d.ts +3 -0
  54. package/src/executors/download/schema.json +59 -0
  55. package/src/executors/ensure-symlink/compat.d.ts +2 -0
  56. package/src/executors/ensure-symlink/compat.js +6 -0
  57. package/src/executors/ensure-symlink/compat.js.map +1 -0
  58. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
  59. package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
  60. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
  61. package/src/executors/ensure-symlink/schema.json +11 -0
  62. package/src/executors/export/compat.d.ts +2 -0
  63. package/src/executors/export/compat.js +6 -0
  64. package/src/executors/export/compat.js.map +1 -0
  65. package/src/executors/export/export.impl.d.ts +6 -0
  66. package/src/executors/export/export.impl.js +69 -0
  67. package/src/executors/export/export.impl.js.map +1 -0
  68. package/src/executors/export/schema.d.ts +11 -0
  69. package/src/executors/export/schema.json +48 -0
  70. package/src/executors/install/compat.d.ts +2 -0
  71. package/src/executors/install/compat.js +6 -0
  72. package/src/executors/install/compat.js.map +1 -0
  73. package/src/executors/install/install.impl.d.ts +7 -0
  74. package/src/executors/install/install.impl.js +70 -0
  75. package/src/executors/install/install.impl.js.map +1 -0
  76. package/src/executors/install/schema.d.ts +7 -0
  77. package/src/executors/install/schema.json +34 -0
  78. package/src/executors/prebuild/compat.d.ts +2 -0
  79. package/src/executors/prebuild/compat.js +6 -0
  80. package/src/executors/prebuild/compat.js.map +1 -0
  81. package/src/executors/prebuild/prebuild.impl.d.ts +7 -0
  82. package/src/executors/prebuild/prebuild.impl.js +70 -0
  83. package/src/executors/prebuild/prebuild.impl.js.map +1 -0
  84. package/src/executors/prebuild/schema.d.ts +7 -0
  85. package/src/executors/prebuild/schema.json +35 -0
  86. package/src/executors/run/compat.d.ts +2 -0
  87. package/src/executors/run/compat.js +6 -0
  88. package/src/executors/run/compat.js.map +1 -0
  89. package/src/executors/run/run.impl.d.ts +6 -0
  90. package/src/executors/run/run.impl.js +112 -0
  91. package/src/executors/run/run.impl.js.map +1 -0
  92. package/src/executors/run/schema.d.ts +25 -0
  93. package/src/executors/run/schema.json +71 -0
  94. package/src/executors/start/compat.d.ts +2 -0
  95. package/src/executors/start/compat.js +6 -0
  96. package/src/executors/start/compat.js.map +1 -0
  97. package/src/executors/start/schema.d.ts +22 -0
  98. package/src/executors/start/schema.json +93 -0
  99. package/src/executors/start/start.impl.d.ts +7 -0
  100. package/src/executors/start/start.impl.js +73 -0
  101. package/src/executors/start/start.impl.js.map +1 -0
  102. package/src/executors/sync-deps/compat.d.ts +2 -0
  103. package/src/executors/sync-deps/compat.js +6 -0
  104. package/src/executors/sync-deps/compat.js.map +1 -0
  105. package/src/executors/sync-deps/schema.d.ts +4 -0
  106. package/src/executors/sync-deps/schema.json +28 -0
  107. package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
  108. package/src/executors/sync-deps/sync-deps.impl.js +62 -0
  109. package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
  110. package/src/executors/update/compat.d.ts +2 -0
  111. package/src/executors/update/compat.js +6 -0
  112. package/src/executors/update/compat.js.map +1 -0
  113. package/src/executors/update/schema.d.ts +15 -0
  114. package/src/executors/update/schema.json +65 -0
  115. package/src/executors/update/update.impl.d.ts +6 -0
  116. package/src/executors/update/update.impl.js +59 -0
  117. package/src/executors/update/update.impl.js.map +1 -0
  118. package/src/generators/application/application.d.ts +5 -0
  119. package/src/generators/application/application.js +33 -0
  120. package/src/generators/application/application.js.map +1 -0
  121. package/src/generators/application/files/app.json.template +33 -0
  122. package/src/generators/application/files/assets/adaptive-icon.png +0 -0
  123. package/src/generators/application/files/assets/favicon.png +0 -0
  124. package/src/generators/application/files/assets/icon.png +0 -0
  125. package/src/generators/application/files/assets/splash.png +0 -0
  126. package/src/generators/application/files/babel.config.js.template +6 -0
  127. package/src/generators/application/files/eas.json.template +28 -0
  128. package/src/generators/application/files/index.js.template +8 -0
  129. package/src/generators/application/files/metro.config.js.template +25 -0
  130. package/src/generators/application/files/package.json.template +17 -0
  131. package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
  132. package/src/generators/application/files/src/app/App.tsx.template +694 -0
  133. package/src/generators/application/files/test-setup.ts.template +1 -0
  134. package/src/generators/application/files/tsconfig.app.json.template +9 -0
  135. package/src/generators/application/files/tsconfig.json.template +26 -0
  136. package/src/generators/application/lib/add-detox.d.ts +3 -0
  137. package/src/generators/application/lib/add-detox.js +16 -0
  138. package/src/generators/application/lib/add-detox.js.map +1 -0
  139. package/src/generators/application/lib/add-project.d.ts +3 -0
  140. package/src/generators/application/lib/add-project.js +91 -0
  141. package/src/generators/application/lib/add-project.js.map +1 -0
  142. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  143. package/src/generators/application/lib/create-application-files.js +24 -0
  144. package/src/generators/application/lib/create-application-files.js.map +1 -0
  145. package/src/generators/application/lib/normalize-options.d.ts +10 -0
  146. package/src/generators/application/lib/normalize-options.js +30 -0
  147. package/src/generators/application/lib/normalize-options.js.map +1 -0
  148. package/src/generators/application/schema.d.ts +19 -0
  149. package/src/generators/application/schema.json +88 -0
  150. package/src/generators/component/component.d.ts +5 -0
  151. package/src/generators/component/component.js +51 -0
  152. package/src/generators/component/component.js.map +1 -0
  153. package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
  154. package/src/generators/component/files/__fileName__.tsx.template +32 -0
  155. package/src/generators/component/lib/add-import.d.ts +3 -0
  156. package/src/generators/component/lib/add-import.js +30 -0
  157. package/src/generators/component/lib/add-import.js.map +1 -0
  158. package/src/generators/component/lib/normalize-options.d.ts +8 -0
  159. package/src/generators/component/lib/normalize-options.js +58 -0
  160. package/src/generators/component/lib/normalize-options.js.map +1 -0
  161. package/src/generators/component/schema.d.ts +15 -0
  162. package/src/generators/component/schema.json +83 -0
  163. package/src/generators/init/init.d.ts +6 -0
  164. package/src/generators/init/init.js +69 -0
  165. package/src/generators/init/init.js.map +1 -0
  166. package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
  167. package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
  168. package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
  169. package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
  170. package/src/generators/init/lib/gitignore-entries.js +20 -0
  171. package/src/generators/init/lib/gitignore-entries.js.map +1 -0
  172. package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
  173. package/src/generators/init/lib/init-root-babel-config.js +14 -0
  174. package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
  175. package/src/generators/init/schema.d.ts +7 -0
  176. package/src/generators/init/schema.json +38 -0
  177. package/src/generators/library/files/lib/README.md +7 -0
  178. package/src/generators/library/files/lib/babel.config.json +17 -0
  179. package/src/generators/library/files/lib/package.json.template +5 -0
  180. package/src/generators/library/files/lib/src/index.ts.template +0 -0
  181. package/src/generators/library/files/lib/test-setup.ts.template +1 -0
  182. package/src/generators/library/files/lib/tsconfig.json.template +16 -0
  183. package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
  184. package/src/generators/library/lib/normalize-options.d.ts +12 -0
  185. package/src/generators/library/lib/normalize-options.js +27 -0
  186. package/src/generators/library/lib/normalize-options.js.map +1 -0
  187. package/src/generators/library/library.d.ts +5 -0
  188. package/src/generators/library/library.js +101 -0
  189. package/src/generators/library/library.js.map +1 -0
  190. package/src/generators/library/schema.d.ts +22 -0
  191. package/src/generators/library/schema.json +99 -0
  192. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
  193. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +35 -0
  194. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
  195. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.d.ts +5 -0
  196. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +25 -0
  197. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +1 -0
  198. package/src/migrations/update-14-4-3/add-eas-build-target.d.ts +5 -0
  199. package/src/migrations/update-14-4-3/add-eas-build-target.js +42 -0
  200. package/src/migrations/update-14-4-3/add-eas-build-target.js.map +1 -0
  201. package/src/migrations/update-14-5-1/add-eas-update-target.d.ts +5 -0
  202. package/src/migrations/update-14-5-1/add-eas-update-target.js +27 -0
  203. package/src/migrations/update-14-5-1/add-eas-update-target.js.map +1 -0
  204. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.d.ts +9 -0
  205. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +66 -0
  206. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +1 -0
  207. package/src/migrations/update-15-0-3/change-jest-preset.d.ts +8 -0
  208. package/src/migrations/update-15-0-3/change-jest-preset.js +74 -0
  209. package/src/migrations/update-15-0-3/change-jest-preset.js.map +1 -0
  210. package/src/migrations/update-15-8-3/change-webpack-to-metro.d.ts +8 -0
  211. package/src/migrations/update-15-8-3/change-webpack-to-metro.js +37 -0
  212. package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +1 -0
  213. package/src/migrations/update-16-0-0/remove-deprecated-targets.d.ts +5 -0
  214. package/src/migrations/update-16-0-0/remove-deprecated-targets.js +36 -0
  215. package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +1 -0
  216. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  217. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  218. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  219. package/src/utils/add-jest.d.ts +2 -0
  220. package/src/utils/add-jest.js +39 -0
  221. package/src/utils/add-jest.js.map +1 -0
  222. package/src/utils/add-linting.d.ts +3 -0
  223. package/src/utils/add-linting.js +37 -0
  224. package/src/utils/add-linting.js.map +1 -0
  225. package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
  226. package/src/utils/ensure-node-modules-symlink.js +29 -0
  227. package/src/utils/ensure-node-modules-symlink.js.map +1 -0
  228. package/src/utils/find-all-npm-dependencies.d.ts +2 -0
  229. package/src/utils/find-all-npm-dependencies.js +26 -0
  230. package/src/utils/find-all-npm-dependencies.js.map +1 -0
  231. package/src/utils/pod-install-task.d.ts +8 -0
  232. package/src/utils/pod-install-task.js +53 -0
  233. package/src/utils/pod-install-task.js.map +1 -0
  234. package/src/utils/symlink-task.d.ts +2 -0
  235. package/src/utils/symlink-task.js +19 -0
  236. package/src/utils/symlink-task.js.map +1 -0
  237. package/src/utils/versions.d.ts +20 -0
  238. package/src/utils/versions.js +24 -0
  239. package/src/utils/versions.js.map +1 -0
  240. package/tsconfig.json +13 -0
  241. package/tsconfig.lib.json +11 -0
  242. package/tsconfig.spec.json +20 -0
  243. package/typings/svg.d.ts +6 -0
@@ -0,0 +1,93 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "cli": "nx",
5
+ "$id": "NxExpoStart",
6
+ "$schema": "http://json-schema.org/schema",
7
+ "title": "Packager Server for Expo",
8
+ "description": "Packager Server target options.",
9
+ "type": "object",
10
+ "properties": {
11
+ "forceManifestType": {
12
+ "type": "string",
13
+ "description": "Override auto detection of manifest type.",
14
+ "enum": ["expo-updates", "classic"]
15
+ },
16
+ "privateKeyPath": {
17
+ "type": "string",
18
+ "description": "Path to private key for code signing. Default: 'private-key.pem' in the same directory as the certificate specified by the expo-updates configuration in app.json."
19
+ },
20
+ "port": {
21
+ "type": "number",
22
+ "description": "Port to start the native Metro bundler on (does not apply to web or tunnel)",
23
+ "default": 19000,
24
+ "alias": "p"
25
+ },
26
+ "clear": {
27
+ "type": "boolean",
28
+ "description": "Clear the Metro bundler cache",
29
+ "alias": "c"
30
+ },
31
+ "maxWorkers": {
32
+ "type": "number",
33
+ "description": "Maximum number of tasks to allow Metro to spawn"
34
+ },
35
+ "dev": {
36
+ "type": "boolean",
37
+ "description": "Turn development mode on or off"
38
+ },
39
+ "devClient": {
40
+ "type": "boolean",
41
+ "description": "Experimental: Starts the bundler for use with the expo-development-client"
42
+ },
43
+ "minify": {
44
+ "type": "boolean",
45
+ "description": "Whether or not to minify code"
46
+ },
47
+ "https": {
48
+ "type": "boolean",
49
+ "description": "To start webpack with https or http protocol"
50
+ },
51
+ "scheme": {
52
+ "type": "string",
53
+ "description": "Custom URI protocol to use with a development build"
54
+ },
55
+ "android": {
56
+ "type": "boolean",
57
+ "description": "Opens your app in Expo Go on a connected Android device",
58
+ "alias": "a"
59
+ },
60
+ "ios": {
61
+ "type": "boolean",
62
+ "description": "Opens your app in Expo Go in a currently running iOS simulator on your computer",
63
+ "alias": "i"
64
+ },
65
+ "web": {
66
+ "type": "boolean",
67
+ "description": " Opens your app in a web browser",
68
+ "alias": "w"
69
+ },
70
+ "host": {
71
+ "type": "string",
72
+ "description": "lan (default), tunnel, localhost. Type of host to use. lan uses the local network; tunnel ues any network by tunnel through ngrok; localhost connects to the dev server over localhost.",
73
+ "enum": ["localhost", "lan", "tunnel"]
74
+ },
75
+ "tunnel": {
76
+ "type": "boolean",
77
+ "description": "Same as --host tunnel"
78
+ },
79
+ "lan": {
80
+ "type": "boolean",
81
+ "description": "Same as --host lan"
82
+ },
83
+ "localhost": {
84
+ "type": "boolean",
85
+ "description": "Same as --host localhost"
86
+ },
87
+ "offline": {
88
+ "type": "boolean",
89
+ "description": "Allows this command to run while offline"
90
+ }
91
+ },
92
+ "examplesFile": "../../../docs/start-examples.md"
93
+ }
@@ -0,0 +1,7 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { ExpoStartOptions } from './schema';
3
+ export interface ExpoStartOutput {
4
+ baseUrl?: string;
5
+ success: boolean;
6
+ }
7
+ export default function startExecutor(options: ExpoStartOptions, context: ExecutorContext): AsyncGenerator<ExpoStartOutput>;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const chalk = require("chalk");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const child_process_1 = require("child_process");
7
+ const path_1 = require("path");
8
+ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
+ let childProcess;
10
+ function startExecutor(options, context) {
11
+ return tslib_1.__asyncGenerator(this, arguments, function* startExecutor_1() {
12
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
14
+ try {
15
+ const baseUrl = `http://localhost:${options.port}`;
16
+ devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
17
+ yield tslib_1.__await(startAsync(context.root, projectRoot, options));
18
+ yield yield tslib_1.__await({
19
+ baseUrl,
20
+ success: true,
21
+ });
22
+ }
23
+ finally {
24
+ if (childProcess) {
25
+ childProcess.kill();
26
+ }
27
+ }
28
+ });
29
+ }
30
+ exports.default = startExecutor;
31
+ function startAsync(workspaceRoot, projectRoot, options) {
32
+ return new Promise((resolve, reject) => {
33
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/@expo/cli/build/bin/cli'), ['start', ...createStartOptions(options)], { cwd: (0, path_1.join)(workspaceRoot, projectRoot), env: process.env });
34
+ // Ensure the child process is killed when the parent exits
35
+ process.on('exit', () => childProcess.kill());
36
+ process.on('SIGTERM', () => childProcess.kill());
37
+ childProcess.on('error', (err) => {
38
+ reject(err);
39
+ });
40
+ childProcess.on('exit', (code) => {
41
+ if (code === 0) {
42
+ resolve(code);
43
+ }
44
+ else {
45
+ reject(code);
46
+ }
47
+ });
48
+ });
49
+ }
50
+ // options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/index.ts
51
+ function createStartOptions(options) {
52
+ return Object.keys(options).reduce((acc, k) => {
53
+ const v = options[k];
54
+ if (k === 'dev') {
55
+ if (v === false) {
56
+ acc.push(`--no-dev`);
57
+ }
58
+ }
59
+ else {
60
+ if (typeof v === 'boolean') {
61
+ if (v === true) {
62
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
63
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
64
+ }
65
+ }
66
+ else {
67
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
68
+ }
69
+ }
70
+ return acc;
71
+ }, []);
72
+ }
73
+ //# sourceMappingURL=start.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/start/start.impl.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uCAA4D;AAC5D,iDAAmD;AACnD,+BAA4B;AAE5B,yFAAmF;AAQnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,aAAa,CAC1C,OAAyB,EACzB,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,MAAM,OAAO,GAAG,oBAAoB,OAAO,CAAC,IAAI,EAAE,CAAC;YACnD,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;YAE3D,sBAAM,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAErD,4BAAM;gBACJ,OAAO;gBACP,OAAO,EAAE,IAAI;aACd,CAAA,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AC,EAAE,EAAE;QAC5C,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,KAAK,EAAE;YACf,IAAI,CAAC,KAAK,KAAK,EAAE;gBACf,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACtB;SACF;aAAM;YACL,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE;gBAC1B,IAAI,CAAC,KAAK,IAAI,EAAE;oBACd,4FAA4F;oBAC5F,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACpC;aACF;iBAAM;gBACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACvC;SACF;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const sync_deps_impl_1 = require("./sync-deps.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(sync_deps_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/sync-deps/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,qDAAgD;AAEhD,kBAAe,IAAA,0BAAiB,EAAC,wBAAgB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface ExpoSyncDepsOptions {
2
+ include: string[] | string; // default is an empty array []
3
+ exclude: string[] | string; // default is an empty array []
4
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "cli": "nx",
5
+ "$id": "NxExpoSyncDeps",
6
+ "$schema": "http://json-schema.org/schema",
7
+ "title": "Sync Deps for Expo",
8
+ "description": "Updates package.json with project dependencies.",
9
+ "type": "object",
10
+ "properties": {
11
+ "include": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "default": [],
17
+ "description": "An array of additional npm packages to include."
18
+ },
19
+ "exclude": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string"
23
+ },
24
+ "default": [],
25
+ "description": "An array of npm packages to exclude."
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ import { ExecutorContext, ProjectGraph } from '@nx/devkit';
2
+ import { ExpoSyncDepsOptions } from './schema';
3
+ export interface ExpoSyncDepsOutput {
4
+ success: boolean;
5
+ }
6
+ export default function syncDepsExecutor(options: ExpoSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ExpoSyncDepsOutput>;
7
+ export declare function syncDeps(projectName: string, projectRoot: string, workspaceRoot: string, projectGraph: ProjectGraph, include?: string[], exclude?: string[]): Promise<string[]>;
8
+ export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.displayNewlyAddedDepsMessage = exports.syncDeps = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const path_1 = require("path");
6
+ const chalk = require("chalk");
7
+ const devkit_1 = require("@nx/devkit");
8
+ const find_all_npm_dependencies_1 = require("../../utils/find-all-npm-dependencies");
9
+ function syncDepsExecutor(options, context) {
10
+ return tslib_1.__asyncGenerator(this, arguments, function* syncDepsExecutor_1() {
11
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
12
+ displayNewlyAddedDepsMessage(context.projectName, yield tslib_1.__await(syncDeps(context.projectName, projectRoot, context.root, context.projectGraph, typeof options.include === 'string'
13
+ ? options.include.split(',')
14
+ : options.include, typeof options.exclude === 'string'
15
+ ? options.exclude.split(',')
16
+ : options.exclude)));
17
+ yield yield tslib_1.__await({ success: true });
18
+ });
19
+ }
20
+ exports.default = syncDepsExecutor;
21
+ function syncDeps(projectName, projectRoot, workspaceRoot, projectGraph, include = [], exclude = []) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ let npmDeps = (0, find_all_npm_dependencies_1.findAllNpmDependencies)(projectGraph, projectName);
24
+ const packageJsonPath = (0, path_1.join)(workspaceRoot, projectRoot, 'package.json');
25
+ const packageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
26
+ const newDeps = [];
27
+ let updated = false;
28
+ if (!packageJson.dependencies) {
29
+ packageJson.dependencies = {};
30
+ updated = true;
31
+ }
32
+ if (include && include.length) {
33
+ npmDeps.push(...include);
34
+ }
35
+ if (exclude && exclude.length) {
36
+ npmDeps = npmDeps.filter((dep) => !exclude.includes(dep));
37
+ }
38
+ npmDeps.forEach((dep) => {
39
+ if (!packageJson.dependencies[dep]) {
40
+ packageJson.dependencies[dep] = '*';
41
+ newDeps.push(dep);
42
+ updated = true;
43
+ }
44
+ });
45
+ if (updated) {
46
+ (0, devkit_1.writeJsonFile)(packageJsonPath, packageJson);
47
+ }
48
+ return newDeps;
49
+ });
50
+ }
51
+ exports.syncDeps = syncDeps;
52
+ function displayNewlyAddedDepsMessage(projectName, deps) {
53
+ if (deps.length > 0) {
54
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Added entries to 'package.json' for '${projectName}' (for autolink):
55
+ ${deps.map((d) => chalk.bold.cyan(`"${d}": "*"`)).join('\n ')}`);
56
+ }
57
+ else {
58
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Dependencies for '${projectName}' are up to date! No changes made.`);
59
+ }
60
+ }
61
+ exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
62
+ //# sourceMappingURL=sync-deps.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-deps.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors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,CACT,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAChB,MAAM,CACP,sBAAsB,WAAW,oCAAoC,CACvE,CAAC;KACH;AACH,CAAC;AAhBD,oEAgBC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const update_impl_1 = require("./update.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(update_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/update/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,+CAA0C;AAE1C,kBAAe,IAAA,0BAAiB,EAAC,qBAAa,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // command to run https://github.com/expo/eas-cli/tree/main#eas-update
2
+ // options from github.com/expo/eas-cli/blob/main/packages/eas-cli/src/commands/update/index.ts
3
+ export interface ExpoEasUpdateOptions {
4
+ branch?: string;
5
+ message?: string;
6
+ republish: boolean; // default is false
7
+ group?: string;
8
+ inputDir: string; // default is "dist"
9
+ skipBundler: boolean; // default is false
10
+ platform: 'ios' | 'android' | 'all'; // default is "all"
11
+ json: boolean; // default is false
12
+ auto: boolean; // default is false
13
+ privateKeyPath?: string;
14
+ nonInteractive: boolean; // default is false
15
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "$id": "NxExpoEasUpdate",
6
+ "cli": "nx",
7
+ "title": "Expo EAS Update executor",
8
+ "description": "Start an EAS update for your expo project.",
9
+ "type": "object",
10
+ "properties": {
11
+ "branch": {
12
+ "type": "string",
13
+ "description": "Branch to publish the update group on"
14
+ },
15
+ "message": {
16
+ "type": "string",
17
+ "description": "A short message describing the update"
18
+ },
19
+ "republish": {
20
+ "type": "boolean",
21
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr",
22
+ "default": false
23
+ },
24
+ "group": {
25
+ "type": "string",
26
+ "description": "Update group to republish"
27
+ },
28
+ "inputDir": {
29
+ "type": "string",
30
+ "description": "Location of the bundle"
31
+ },
32
+ "skipBundler": {
33
+ "type": "boolean",
34
+ "description": "Skip running Expo CLI to bundle the app before publishing",
35
+ "default": false
36
+ },
37
+ "platform": {
38
+ "enum": ["ios", "android", "all"],
39
+ "alias": "p",
40
+ "description": "The platform to build the app, example values: ios, android, all.",
41
+ "default": "all",
42
+ "x-priority": "important"
43
+ },
44
+ "json": {
45
+ "type": "boolean",
46
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr",
47
+ "default": false
48
+ },
49
+ "auto": {
50
+ "type": "boolean",
51
+ "description": "Use the current git branch and commit message for the EAS branch and update message",
52
+ "default": false
53
+ },
54
+ "privateKeyPath": {
55
+ "type": "string",
56
+ "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
+ },
58
+ "nonInteractive": {
59
+ "type": "boolean",
60
+ "description": "Run command in non-interactive mode",
61
+ "default": false
62
+ }
63
+ },
64
+ "required": []
65
+ }
@@ -0,0 +1,6 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { ExpoEasUpdateOptions } from './schema';
3
+ export interface ReactNativeUpdateOutput {
4
+ success: boolean;
5
+ }
6
+ export default function buildExecutor(options: ExpoEasUpdateOptions, context: ExecutorContext): AsyncGenerator<ReactNativeUpdateOutput>;
@@ -0,0 +1,59 @@
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 buildExecutor(options, context) {
10
+ return tslib_1.__asyncGenerator(this, arguments, function* buildExecutor_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(runCliUpdate(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 = buildExecutor;
25
+ function runCliUpdate(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'), ['update', ...createUpdateOptions(options)], { cwd: (0, path_1.join)(workspaceRoot, projectRoot), env: process.env });
28
+ // Ensure the child process is killed when the parent exits
29
+ process.on('exit', () => childProcess.kill());
30
+ process.on('SIGTERM', () => childProcess.kill());
31
+ childProcess.on('error', (err) => {
32
+ reject(err);
33
+ });
34
+ childProcess.on('exit', (code) => {
35
+ if (code === 0) {
36
+ resolve(code);
37
+ }
38
+ else {
39
+ reject(code);
40
+ }
41
+ });
42
+ });
43
+ }
44
+ function createUpdateOptions(options) {
45
+ return Object.keys(options).reduce((acc, k) => {
46
+ const v = options[k];
47
+ if (typeof v === 'boolean') {
48
+ if (v === true) {
49
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
50
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
51
+ }
52
+ }
53
+ else {
54
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
55
+ }
56
+ return acc;
57
+ }, []);
58
+ }
59
+ //# sourceMappingURL=update.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/update/update.impl.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,+BAA4B;AAC5B,iDAAmD;AA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,CAAC;QACd,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/B,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,CAAC;aACf;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,mBAAmB,CAAC,OAA6B;IACxD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,KAAK,IAAI,EAAE;gBACd,4FAA4F;gBAC5F,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;aACpC;SACF;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { GeneratorCallback, Tree } from '@nx/devkit';
2
+ import { Schema } from './schema';
3
+ export declare function expoApplicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
4
+ export default expoApplicationGenerator;
5
+ export declare const expoApplicationSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.expoApplicationSchematic = exports.expoApplicationGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const add_linting_1 = require("../../utils/add-linting");
7
+ const add_jest_1 = require("../../utils/add-jest");
8
+ const symlink_task_1 = require("../../utils/symlink-task");
9
+ const normalize_options_1 = require("./lib/normalize-options");
10
+ const init_1 = require("../init/init");
11
+ const add_project_1 = require("./lib/add-project");
12
+ const add_detox_1 = require("./lib/add-detox");
13
+ const create_application_files_1 = require("./lib/create-application-files");
14
+ function expoApplicationGenerator(host, schema) {
15
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ const options = (0, normalize_options_1.normalizeOptions)(host, schema);
17
+ (0, create_application_files_1.createApplicationFiles)(host, options);
18
+ (0, add_project_1.addProject)(host, options);
19
+ const initTask = yield (0, init_1.default)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
20
+ const lintTask = yield (0, add_linting_1.addLinting)(host, options.projectName, options.appProjectRoot, [(0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json')], options.linter, options.setParserOptionsProject);
21
+ const jestTask = yield (0, add_jest_1.addJest)(host, options.unitTestRunner, options.projectName, options.appProjectRoot, options.js);
22
+ const detoxTask = yield (0, add_detox_1.addDetox)(host, options);
23
+ const symlinkTask = (0, symlink_task_1.runSymlink)(host.root, options.appProjectRoot);
24
+ if (!options.skipFormat) {
25
+ yield (0, devkit_1.formatFiles)(host);
26
+ }
27
+ return (0, devkit_1.runTasksInSerial)(initTask, lintTask, jestTask, detoxTask, symlinkTask);
28
+ });
29
+ }
30
+ exports.expoApplicationGenerator = expoApplicationGenerator;
31
+ exports.default = expoApplicationGenerator;
32
+ exports.expoApplicationSchematic = (0, devkit_1.convertNxGenerator)(expoApplicationGenerator);
33
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,uCAOoB;AAEpB,yDAAqD;AACrD,mDAA+C;AAC/C,2DAAsD;AAEtD,+DAA2D;AAC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AAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
@@ -0,0 +1,33 @@
1
+ {
2
+ "expo": {
3
+ "name": "<%= displayName %>",
4
+ "slug": "<%= projectName %>",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/icon.png",
8
+ "splash": {
9
+ "image": "./assets/splash.png",
10
+ "resizeMode": "contain",
11
+ "backgroundColor": "#ffffff"
12
+ },
13
+ "updates": {
14
+ "fallbackToCacheTimeout": 0
15
+ },
16
+ "assetBundlePatterns": [
17
+ "**/*"
18
+ ],
19
+ "ios": {
20
+ "supportsTablet": true
21
+ },
22
+ "android": {
23
+ "adaptiveIcon": {
24
+ "foregroundImage": "./assets/adaptive-icon.png",
25
+ "backgroundColor": "#FFFFFF"
26
+ }
27
+ },
28
+ "web": {
29
+ "favicon": "./assets/favicon.png",
30
+ "bundler": "metro"
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ return {
4
+ presets: ['babel-preset-expo']
5
+ };
6
+ };
@@ -0,0 +1,28 @@
1
+ {
2
+ "build": {
3
+ "production": {
4
+ "android": {
5
+ "buildType": "app-bundle"
6
+ }
7
+ },
8
+ "development": {
9
+ "developmentClient": true,
10
+ "distribution": "internal"
11
+ },
12
+ "preview": {
13
+ "distribution": "internal",
14
+ "ios": {
15
+ "simulator": true
16
+ },
17
+ "android": {
18
+ "buildType": "apk"
19
+ }
20
+ }
21
+ },
22
+ "submit": {
23
+ "production": {}
24
+ },
25
+ "cli": {
26
+ "version": ">= 0.55.1"
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ import { registerRootComponent } from 'expo';
2
+
3
+ import App from './src/app/App';
4
+
5
+ // registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6
+ // It also ensures that whether you load the app in Expo Go or in a native build,
7
+ // the environment is set up appropriately
8
+ registerRootComponent(App);
@@ -0,0 +1,25 @@
1
+ const { withNxMetro } = require('@nrwl/expo');
2
+ const { getDefaultConfig } = require('@expo/metro-config');
3
+
4
+ const defaultConfig = getDefaultConfig(__dirname);
5
+
6
+ module.exports = (async () => {
7
+ defaultConfig.transformer.babelTransformerPath = require.resolve(
8
+ 'react-native-svg-transformer'
9
+ );
10
+ defaultConfig.resolver.assetExts = defaultConfig.resolver.assetExts.filter(
11
+ (ext) => ext !== 'svg'
12
+ );
13
+ defaultConfig.resolver.sourceExts.push('svg');
14
+ return withNxMetro(defaultConfig, {
15
+ // Change this to true to see debugging info.
16
+ // Useful if you have issues resolving modules
17
+ debug: false,
18
+ // all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
19
+ extensions: [],
20
+ // the project root to start the metro server
21
+ projectRoot: __dirname,
22
+ // Specify any additional (to projectRoot) watch folders, this is used to know which files to watch
23
+ watchFolders: []
24
+ });
25
+ })();