@nx/detox 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 (74) 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/executors.json +14 -0
  6. package/generators.json +35 -0
  7. package/index.d.ts +2 -0
  8. package/index.js +8 -0
  9. package/index.js.map +1 -0
  10. package/migrations.json +212 -0
  11. package/package.json +48 -0
  12. package/project.json +58 -0
  13. package/src/executors/build/build.impl.d.ts +7 -0
  14. package/src/executors/build/build.impl.js +59 -0
  15. package/src/executors/build/build.impl.js.map +1 -0
  16. package/src/executors/build/compat.d.ts +2 -0
  17. package/src/executors/build/compat.js +6 -0
  18. package/src/executors/build/compat.js.map +1 -0
  19. package/src/executors/build/schema.json +23 -0
  20. package/src/executors/test/compat.d.ts +2 -0
  21. package/src/executors/test/compat.js +6 -0
  22. package/src/executors/test/compat.js.map +1 -0
  23. package/src/executors/test/schema.json +149 -0
  24. package/src/executors/test/test.impl.d.ts +6 -0
  25. package/src/executors/test/test.impl.js +74 -0
  26. package/src/executors/test/test.impl.js.map +1 -0
  27. package/src/generators/application/application.d.ts +5 -0
  28. package/src/generators/application/application.js +29 -0
  29. package/src/generators/application/application.js.map +1 -0
  30. package/src/generators/application/files/app/.babelrc.template +11 -0
  31. package/src/generators/application/files/app/.detoxrc.json.template +102 -0
  32. package/src/generators/application/files/app/jest.config.json.template +15 -0
  33. package/src/generators/application/files/app/src/app.spec.ts.template +11 -0
  34. package/src/generators/application/files/app/test-setup.ts.template +5 -0
  35. package/src/generators/application/files/app/tsconfig.e2e.json +10 -0
  36. package/src/generators/application/files/app/tsconfig.json +10 -0
  37. package/src/generators/application/lib/add-git-ignore-entry.d.ts +3 -0
  38. package/src/generators/application/lib/add-git-ignore-entry.js +16 -0
  39. package/src/generators/application/lib/add-git-ignore-entry.js.map +1 -0
  40. package/src/generators/application/lib/add-linting.d.ts +3 -0
  41. package/src/generators/application/lib/add-linting.js +28 -0
  42. package/src/generators/application/lib/add-linting.js.map +1 -0
  43. package/src/generators/application/lib/add-project.d.ts +3 -0
  44. package/src/generators/application/lib/add-project.js +33 -0
  45. package/src/generators/application/lib/add-project.js.map +1 -0
  46. package/src/generators/application/lib/create-files.d.ts +3 -0
  47. package/src/generators/application/lib/create-files.js +14 -0
  48. package/src/generators/application/lib/create-files.js.map +1 -0
  49. package/src/generators/application/lib/get-targets.d.ts +58 -0
  50. package/src/generators/application/lib/get-targets.js +76 -0
  51. package/src/generators/application/lib/get-targets.js.map +1 -0
  52. package/src/generators/application/lib/normalize-options.d.ts +18 -0
  53. package/src/generators/application/lib/normalize-options.js +34 -0
  54. package/src/generators/application/lib/normalize-options.js.map +1 -0
  55. package/src/generators/application/schema.json +66 -0
  56. package/src/generators/init/init.d.ts +6 -0
  57. package/src/generators/init/init.js +37 -0
  58. package/src/generators/init/init.js.map +1 -0
  59. package/src/generators/init/schema.json +21 -0
  60. package/src/migrations/update-13-10-3/add-verbose-jest-config-13-10-3.d.ts +5 -0
  61. package/src/migrations/update-13-10-3/add-verbose-jest-config-13-10-3.js +32 -0
  62. package/src/migrations/update-13-10-3/add-verbose-jest-config-13-10-3.js.map +1 -0
  63. package/src/migrations/update-13-5-0/add-build-target-test-13-5-0.d.ts +5 -0
  64. package/src/migrations/update-13-5-0/add-build-target-test-13-5-0.js +27 -0
  65. package/src/migrations/update-13-5-0/add-build-target-test-13-5-0.js.map +1 -0
  66. package/src/migrations/update-13-8-2/remove-types-detox-13-8-2.d.ts +2 -0
  67. package/src/migrations/update-13-8-2/remove-types-detox-13-8-2.js +25 -0
  68. package/src/migrations/update-13-8-2/remove-types-detox-13-8-2.js.map +1 -0
  69. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  70. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  71. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  72. package/src/utils/versions.d.ts +3 -0
  73. package/src/utils/versions.js +7 -0
  74. package/src/utils/versions.js.map +1 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "../../.eslintrc",
3
+ "rules": {},
4
+ "ignorePatterns": ["!**/*"],
5
+ "overrides": [
6
+ {
7
+ "files": [
8
+ "./package.json",
9
+ "./generators.json",
10
+ "./executors.json",
11
+ "./migrations.json"
12
+ ],
13
+ "parser": "jsonc-eslint-parser",
14
+ "rules": {
15
+ "@nrwl/nx/nx-plugin-checks": "error"
16
+ }
17
+ }
18
+ ]
19
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+
7
+
8
+ **Note:** Version bump only for package @nx/detox
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
2
+
3
+ <div style="text-align: center;">
4
+
5
+ [![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
6
+ [![License](https://img.shields.io/npm/l/@nrwl/workspace.svg?style=flat-square)]()
7
+ [![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nrwl/workspace)
8
+ [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
9
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
+ [![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
11
+ [![Join us @nrwl/community on slack](https://img.shields.io/badge/slack-%40nrwl%2Fcommunity-brightgreen)](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
12
+
13
+ </div>
14
+
15
+
16
+ <hr>
17
+
18
+ # Nx: Smart, Fast and Extensible Build System
19
+
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
21
+
22
+ This package is a [Detox plugin for Nx](https://nx.dev/detox/overview).
23
+
24
+ ## Getting Started
25
+
26
+ ### Creating an Nx Workspace
27
+
28
+ **Using `npx`**
29
+
30
+ ```bash
31
+ npx create-nx-workspace
32
+ ```
33
+
34
+ **Using `npm init`**
35
+
36
+ ```bash
37
+ npm init nx-workspace
38
+ ```
39
+
40
+ **Using `yarn create`**
41
+
42
+ ```bash
43
+ yarn create nx-workspace
44
+ ```
45
+
46
+ ### Adding Nx to an Existing Repository
47
+
48
+ Run:
49
+
50
+ ```bash
51
+ npx nx@latest init
52
+ ```
53
+
54
+ ## Documentation & Resources
55
+
56
+ - [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
57
+ - [Intro to Nx](https://nx.dev/getting-started/intro)
58
+ - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
59
+ - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
60
+
61
+ <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
63
+
package/executors.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "executors": {
3
+ "build": {
4
+ "implementation": "./src/executors/build/build.impl",
5
+ "schema": "./src/executors/build/schema.json",
6
+ "description": "Run the command defined in build property of the specified configuration."
7
+ },
8
+ "test": {
9
+ "implementation": "./src/executors/test/test.impl",
10
+ "schema": "./src/executors/test/schema.json",
11
+ "description": "Initiating your detox test suite."
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "Nx Detox",
3
+ "version": "0.1",
4
+ "extends": ["@nrwl/workspace"],
5
+ "schematics": {
6
+ "init": {
7
+ "factory": "./src/generators/init/init#detoxInitSchematic",
8
+ "schema": "./src/generators/init/schema.json",
9
+ "description": "Initialize the `@nrwl/detox` plugin.",
10
+ "hidden": true
11
+ },
12
+ "application": {
13
+ "factory": "./src/generators/application/application#detoxApplicationSchematic",
14
+ "schema": "./src/generators/application/schema.json",
15
+ "aliases": ["app"],
16
+ "x-type": "application",
17
+ "description": "Create a Detox application."
18
+ }
19
+ },
20
+ "generators": {
21
+ "init": {
22
+ "factory": "./src/generators/init/init#detoxInitGenerator",
23
+ "schema": "./src/generators/init/schema.json",
24
+ "description": "Initialize the `@nrwl/detox` plugin.",
25
+ "hidden": true
26
+ },
27
+ "application": {
28
+ "factory": "./src/generators/application/application#detoxApplicationGenerator",
29
+ "schema": "./src/generators/application/schema.json",
30
+ "aliases": ["app"],
31
+ "x-type": "application",
32
+ "description": "Create a Detox application."
33
+ }
34
+ }
35
+ }
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { detoxInitGenerator } from './src/generators/init/init';
2
+ export { detoxApplicationGenerator } from './src/generators/application/application';
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.detoxApplicationGenerator = exports.detoxInitGenerator = void 0;
4
+ var init_1 = require("./src/generators/init/init");
5
+ Object.defineProperty(exports, "detoxInitGenerator", { enumerable: true, get: function () { return init_1.detoxInitGenerator; } });
6
+ var application_1 = require("./src/generators/application/application");
7
+ Object.defineProperty(exports, "detoxApplicationGenerator", { enumerable: true, get: function () { return application_1.detoxApplicationGenerator; } });
8
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/detox/index.ts"],"names":[],"mappings":";;;AAAA,mDAAgE;AAAvD,0GAAA,kBAAkB,OAAA;AAC3B,wEAAqF;AAA5E,wHAAA,yBAAyB,OAAA"}
@@ -0,0 +1,212 @@
1
+ {
2
+ "generators": {
3
+ "add-build-target-test-13-5-0": {
4
+ "version": "13.5.0-beta.0",
5
+ "cli": "nx",
6
+ "description": "add buildTarget to test-ios and test-android for detox app",
7
+ "factory": "./src/migrations/update-13-5-0/add-build-target-test-13-5-0"
8
+ },
9
+ "remove-types-detox-13-8-2": {
10
+ "version": "13.8.2-beta.0",
11
+ "cli": "nx",
12
+ "description": "remove deprecated @types/detox from package.json",
13
+ "factory": "./src/migrations/update-13-8-2/remove-types-detox-13-8-2"
14
+ },
15
+ "add-verbose-jest-config-13-10-3": {
16
+ "version": "13.10.3-beta.0",
17
+ "cli": "nx",
18
+ "description": "Update jest.config.json under detox project, add key verbsoe: true",
19
+ "factory": "./src/migrations/update-13-10-3/add-verbose-jest-config-13-10-3"
20
+ },
21
+ "update-16-0-0-add-nx-packages": {
22
+ "cli": "nx",
23
+ "version": "16.0.0-beta.1",
24
+ "description": "Replace @nrwl/detox with @nx/detox",
25
+ "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
26
+ }
27
+ },
28
+ "packageJsonUpdates": {
29
+ "12.8.0": {
30
+ "version": "12.8.0-beta.0",
31
+ "packages": {
32
+ "detox": {
33
+ "version": "18.20.2",
34
+ "alwaysAddToPackageJson": false
35
+ }
36
+ }
37
+ },
38
+ "12.10.0-beta.1": {
39
+ "version": "12.10.0-beta.1",
40
+ "packages": {
41
+ "detox": {
42
+ "version": "18.22.1",
43
+ "alwaysAddToPackageJson": false
44
+ }
45
+ }
46
+ },
47
+ "13.0.0": {
48
+ "version": "13.0.0-beta.1",
49
+ "packages": {
50
+ "detox": {
51
+ "version": "18.22.2",
52
+ "alwaysAddToPackageJson": false
53
+ }
54
+ }
55
+ },
56
+ "13.2.0": {
57
+ "version": "13.2.0-beta.0",
58
+ "packages": {
59
+ "detox": {
60
+ "version": "19.0.0",
61
+ "alwaysAddToPackageJson": false
62
+ },
63
+ "@testing-library/jest-dom": {
64
+ "version": "5.15.0",
65
+ "alwaysAddToPackageJson": false
66
+ }
67
+ }
68
+ },
69
+ "13.5.0": {
70
+ "version": "13.5.0-beta.0",
71
+ "packages": {
72
+ "detox": {
73
+ "version": "19.4.1",
74
+ "alwaysAddToPackageJson": false
75
+ },
76
+ "@testing-library/jest-dom": {
77
+ "version": "5.16.1",
78
+ "alwaysAddToPackageJson": false
79
+ }
80
+ }
81
+ },
82
+ "13.8.2": {
83
+ "version": "13.8.2-beta.0",
84
+ "packages": {
85
+ "detox": {
86
+ "version": "19.4.5",
87
+ "alwaysAddToPackageJson": false
88
+ },
89
+ "@testing-library/jest-dom": {
90
+ "version": "5.16.1",
91
+ "alwaysAddToPackageJson": false
92
+ }
93
+ }
94
+ },
95
+ "13.8.6": {
96
+ "version": "13.8.6-beta.0",
97
+ "packages": {
98
+ "detox": {
99
+ "version": "19.5.1",
100
+ "alwaysAddToPackageJson": false
101
+ }
102
+ }
103
+ },
104
+ "13.9.3": {
105
+ "version": "13.9.3-beta.0",
106
+ "packages": {
107
+ "detox": {
108
+ "version": "19.5.7",
109
+ "alwaysAddToPackageJson": false
110
+ }
111
+ }
112
+ },
113
+ "13.10.3": {
114
+ "version": "13.10.3-beta.0",
115
+ "packages": {
116
+ "detox": {
117
+ "version": "19.6.5",
118
+ "alwaysAddToPackageJson": false
119
+ },
120
+ "@testing-library/jest-dom": {
121
+ "version": "5.16.4",
122
+ "alwaysAddToPackageJson": false
123
+ }
124
+ }
125
+ },
126
+ "14.1.8": {
127
+ "version": "14.1.8-beta.0",
128
+ "packages": {
129
+ "detox": {
130
+ "version": "19.6.9",
131
+ "alwaysAddToPackageJson": false
132
+ }
133
+ }
134
+ },
135
+ "14.2.1": {
136
+ "version": "14.2.1-beta.0",
137
+ "packages": {
138
+ "detox": {
139
+ "version": "19.7.1",
140
+ "alwaysAddToPackageJson": false
141
+ }
142
+ }
143
+ },
144
+ "14.5.7": {
145
+ "version": "14.5.7-beta.0",
146
+ "packages": {
147
+ "detox": {
148
+ "version": "19.9.3",
149
+ "alwaysAddToPackageJson": false
150
+ },
151
+ "@testing-library/jest-dom": {
152
+ "version": "5.16.5",
153
+ "alwaysAddToPackageJson": false
154
+ }
155
+ }
156
+ },
157
+ "14.6.1": {
158
+ "version": "14.6.1-beta.0",
159
+ "packages": {
160
+ "detox": {
161
+ "version": "19.10.0",
162
+ "alwaysAddToPackageJson": false
163
+ }
164
+ }
165
+ },
166
+ "14.7.4": {
167
+ "version": "14.7.4-beta.0",
168
+ "packages": {
169
+ "detox": {
170
+ "version": "19.12.1",
171
+ "alwaysAddToPackageJson": false
172
+ }
173
+ }
174
+ },
175
+ "15.0.0": {
176
+ "version": "15.0.0-beta.0",
177
+ "packages": {
178
+ "detox": {
179
+ "version": "19.12.5",
180
+ "alwaysAddToPackageJson": false
181
+ }
182
+ }
183
+ },
184
+ "15.2.2": {
185
+ "version": "15.2.2-beta.0",
186
+ "packages": {
187
+ "detox": {
188
+ "version": "20.0.3",
189
+ "alwaysAddToPackageJson": false
190
+ }
191
+ }
192
+ },
193
+ "15.6.2": {
194
+ "version": "15.6.2-beta.0",
195
+ "packages": {
196
+ "detox": {
197
+ "version": "20.1.1",
198
+ "alwaysAddToPackageJson": false
199
+ }
200
+ }
201
+ },
202
+ "15.8.6": {
203
+ "version": "15.8.6-beta.0",
204
+ "packages": {
205
+ "detox": {
206
+ "version": "~20.5.0",
207
+ "alwaysAddToPackageJson": false
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@nx/detox",
3
+ "version": "16.0.0-beta.1",
4
+ "private": false,
5
+ "description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.",
6
+ "keywords": [
7
+ "Monorepo",
8
+ "React",
9
+ "Web",
10
+ "Native",
11
+ "CLI",
12
+ "Detox"
13
+ ],
14
+ "homepage": "https://nx.dev",
15
+ "bugs": {
16
+ "url": "https://github.com/nrwl/nx/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/nrwl/nx.git",
21
+ "directory": "packages/detox"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Victor Savkin",
25
+ "main": "./index",
26
+ "types": "index.d.ts",
27
+ "dependencies": {
28
+ "@nrwl/detox": "16.0.0-beta.1",
29
+ "@nx/devkit": "16.0.0-beta.1",
30
+ "@nx/jest": "16.0.0-beta.1",
31
+ "@nx/js": "16.0.0-beta.1",
32
+ "@nx/linter": "16.0.0-beta.1",
33
+ "@nx/react": "16.0.0-beta.1"
34
+ },
35
+ "peerDependencies": {
36
+ "detox": "~20.5.0"
37
+ },
38
+ "builders": "./executors.json",
39
+ "ng-update": {
40
+ "requirements": {},
41
+ "migrations": "./migrations.json"
42
+ },
43
+ "schematics": "./generators.json",
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "gitHead": "abf534c265f5aa3aac146e55bb31de598ea281d7"
48
+ }
package/project.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "detox",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/detox/src",
5
+ "projectType": "library",
6
+ "targets": {
7
+ "lint": {},
8
+ "test": {},
9
+ "build-base": {
10
+ "executor": "@nrwl/js:tsc",
11
+ "options": {
12
+ "assets": [
13
+ {
14
+ "input": "packages/detox",
15
+ "glob": "**/files/**",
16
+ "output": "/"
17
+ },
18
+ {
19
+ "input": "packages/detox",
20
+ "glob": "**/files/**/.gitkeep",
21
+ "output": "/"
22
+ },
23
+ {
24
+ "input": "packages/detox",
25
+ "glob": "**/files/**/.babelrc.template",
26
+ "output": "/"
27
+ },
28
+ {
29
+ "input": "packages/detox",
30
+ "glob": "**/files/**/.detoxrc.json.template",
31
+ "output": "/"
32
+ },
33
+ {
34
+ "input": "./packages/detox",
35
+ "glob": "**/*.json",
36
+ "ignore": ["**/tsconfig*.json"],
37
+ "output": "/"
38
+ },
39
+ {
40
+ "input": "",
41
+ "glob": "LICENSE",
42
+ "output": "/"
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "build": {
48
+ "executor": "nx:run-commands",
49
+ "outputs": ["{workspaceRoot}/build/packages/detox"],
50
+ "options": {
51
+ "commands": [
52
+ "node ./scripts/copy-readme.js detox",
53
+ "node ./scripts/add-dependency-to-build.js detox @nrwl/detox"
54
+ ]
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,7 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { DetoxBuildOptions } from './schema';
3
+ export interface DetoxBuildOutput {
4
+ success: boolean;
5
+ }
6
+ export default function detoxBuildExecutor(options: DetoxBuildOptions, context: ExecutorContext): AsyncGenerator<DetoxBuildOutput>;
7
+ export declare function runCliBuild(workspaceRoot: string, projectRoot: string, options: DetoxBuildOptions): Promise<unknown>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runCliBuild = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const path_1 = require("path");
6
+ const child_process_1 = require("child_process");
7
+ let childProcess;
8
+ function detoxBuildExecutor(options, context) {
9
+ return tslib_1.__asyncGenerator(this, arguments, function* detoxBuildExecutor_1() {
10
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
11
+ try {
12
+ yield tslib_1.__await(runCliBuild(context.root, projectRoot, options));
13
+ yield yield tslib_1.__await({ success: true });
14
+ }
15
+ finally {
16
+ if (childProcess) {
17
+ childProcess.kill();
18
+ }
19
+ }
20
+ });
21
+ }
22
+ exports.default = detoxBuildExecutor;
23
+ function runCliBuild(workspaceRoot, projectRoot, options) {
24
+ return new Promise((resolve, reject) => {
25
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/detox/local-cli/cli.js'), ['build', ...createDetoxBuildOptions(options)], {
26
+ cwd: (0, path_1.join)(workspaceRoot, projectRoot),
27
+ });
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
+ exports.runCliBuild = runCliBuild;
45
+ function createDetoxBuildOptions(options) {
46
+ return Object.keys(options).reduce((acc, k) => {
47
+ const v = options[k];
48
+ if (k === 'detoxConfiguration') {
49
+ acc.push('--configuration', v);
50
+ }
51
+ else if (k === 'configPath') {
52
+ acc.push('--config-path', v);
53
+ }
54
+ else
55
+ acc.push(`--${k}`, options[k]);
56
+ return acc;
57
+ }, []);
58
+ }
59
+ //# sourceMappingURL=build.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;;AACA,+BAA4B;AAC5B,iDAAmD;AAQnD,IAAI,YAA0B,CAAC;AAE/B,SAA+B,kBAAkB,CAC/C,OAA0B,EAC1B,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEpE,IAAI;YACF,sBAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAEtD,4BAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAhBD,qCAgBC;AAED,SAAgB,WAAW,CACzB,aAAqB,EACrB,WAAmB,EACnB,OAA0B;IAE1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,YAAY,GAAG,IAAA,oBAAI,EACjB,IAAA,WAAI,EAAC,aAAa,EAAE,uCAAuC,CAAC,EAC5D,CAAC,OAAO,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC,EAC9C;YACE,GAAG,EAAE,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,CAAC;SACtC,CACF,CAAC;QAEF,2DAA2D;QAC3D,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,CAAC,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;AA7BD,kCA6BC;AAED,SAAS,uBAAuB,CAAC,OAAO;IACtC,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,CAAC,KAAK,oBAAoB,EAAE;YAC9B,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;SAChC;aAAM,IAAI,CAAC,KAAK,YAAY,EAAE;YAC7B,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;SAC9B;;YAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,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 build_impl_1 = require("./build.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(build_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/executors/build/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,6CAA8C;AAE9C,kBAAe,IAAA,0BAAiB,EAAC,oBAAkB,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "title": "Run detox build",
5
+ "description": "Run detox build options.",
6
+ "type": "object",
7
+ "cli": "nx",
8
+ "properties": {
9
+ "detoxConfiguration": {
10
+ "type": "string",
11
+ "description": "Select a device configuration from your defined configurations, if not supplied, and there's only one configuration, detox will default to it.",
12
+ "alias": "C"
13
+ },
14
+ "configPath": {
15
+ "type": "string",
16
+ "description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in `package.json`.",
17
+ "alias": "cp",
18
+ "x-completion-type": "file",
19
+ "x-completion-glob": ".detoxrc?(.js)"
20
+ }
21
+ },
22
+ "required": []
23
+ }
@@ -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 test_impl_1 = require("./test.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(test_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/executors/test/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,2CAA4C;AAE5C,kBAAe,IAAA,0BAAiB,EAAC,mBAAiB,CAAC,CAAC"}