@nrwl/detox 14.8.7 → 14.9.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.
- package/CHANGELOG.md +1 -1
- package/LICENSE +22 -22
- package/README.md +5 -26
- package/migrations.json +36 -0
- package/package.json +9 -9
- package/project.json +5 -35
- package/src/executors/build/build.impl.js +1 -1
- package/src/executors/build/build.impl.js.map +1 -1
- package/src/executors/build/schema.json +2 -0
- package/src/executors/test/schema.json +4 -1
- package/src/executors/test/test.impl.js +2 -2
- package/src/executors/test/test.impl.js.map +1 -1
- package/src/generators/application/application.js +2 -5
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/files/app/.detoxrc.json.template +17 -17
- package/src/generators/application/files/app/jest.config.json.template +15 -0
- package/src/generators/application/files/app/src/app.spec.ts.template +1 -1
- package/src/generators/application/lib/add-git-ignore-entry.js +1 -1
- package/src/generators/application/lib/add-git-ignore-entry.js.map +1 -1
- package/src/generators/application/lib/add-linting.js +5 -10
- package/src/generators/application/lib/add-linting.js.map +1 -1
- package/src/generators/application/lib/add-project.js +8 -8
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/lib/create-files.js +2 -2
- package/src/generators/application/lib/create-files.js.map +1 -1
- package/src/generators/application/lib/get-targets.d.ts +2 -2
- package/src/generators/application/lib/get-targets.js +10 -8
- package/src/generators/application/lib/get-targets.js.map +1 -1
- package/src/generators/application/lib/normalize-options.d.ts +9 -8
- package/src/generators/application/lib/normalize-options.js +20 -17
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/schema.json +17 -8
- package/src/generators/init/init.d.ts +3 -3
- package/src/generators/init/init.js +6 -3
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.json +8 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
- package/src/generators/application/files/app/environment.js.template +0 -24
- package/src/generators/application/files/app/jest.config.json +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/detox
|
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017-
|
|
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.
|
|
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
CHANGED
|
@@ -43,40 +43,19 @@ npm init nx-workspace
|
|
|
43
43
|
yarn create nx-workspace
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
? What to create in the new workspace (Use arrow keys)
|
|
50
|
-
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
51
|
-
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
52
|
-
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
53
|
-
react [a workspace with a single React application]
|
|
54
|
-
angular [a workspace with a single Angular application]
|
|
55
|
-
next.js [a workspace with a single Next.js application]
|
|
56
|
-
nest [a workspace with a single Nest application]
|
|
57
|
-
express [a workspace with a single Express application]
|
|
58
|
-
web components [a workspace with a single app built using web components]
|
|
59
|
-
react-native [a workspace with a single React Native application]
|
|
60
|
-
react-express [a workspace with a full stack application (React + Express)]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Select the preset that works best for you
|
|
64
|
-
|
|
65
|
-
### Adding Nx to an Existing Monorepo
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
66
47
|
|
|
67
48
|
Run:
|
|
68
49
|
|
|
69
50
|
```bash
|
|
70
|
-
npx
|
|
51
|
+
npx nx@latest init
|
|
71
52
|
```
|
|
72
53
|
|
|
73
54
|
## Documentation & Resources
|
|
74
55
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- [Nx
|
|
78
|
-
- [Tutorial: Adding Nx to an Existing Monorepo](/recipe/adding-to-monorepo)
|
|
79
|
-
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
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)
|
|
80
59
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
60
|
|
|
82
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"
|
package/migrations.json
CHANGED
|
@@ -165,6 +165,42 @@
|
|
|
165
165
|
"alwaysAddToPackageJson": false
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
+
},
|
|
169
|
+
"15.0.0": {
|
|
170
|
+
"version": "15.0.0-beta.0",
|
|
171
|
+
"packages": {
|
|
172
|
+
"detox": {
|
|
173
|
+
"version": "19.12.5",
|
|
174
|
+
"alwaysAddToPackageJson": false
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"15.2.2": {
|
|
179
|
+
"version": "15.2.2-beta.0",
|
|
180
|
+
"packages": {
|
|
181
|
+
"detox": {
|
|
182
|
+
"version": "20.0.3",
|
|
183
|
+
"alwaysAddToPackageJson": false
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"15.6.2": {
|
|
188
|
+
"version": "15.6.2-beta.0",
|
|
189
|
+
"packages": {
|
|
190
|
+
"detox": {
|
|
191
|
+
"version": "20.1.1",
|
|
192
|
+
"alwaysAddToPackageJson": false
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"15.8.6": {
|
|
197
|
+
"version": "15.8.6-beta.0",
|
|
198
|
+
"packages": {
|
|
199
|
+
"detox": {
|
|
200
|
+
"version": "~20.5.0",
|
|
201
|
+
"alwaysAddToPackageJson": false
|
|
202
|
+
}
|
|
203
|
+
}
|
|
168
204
|
}
|
|
169
205
|
}
|
|
170
206
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/detox",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.",
|
|
6
6
|
"keywords": [
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"types": "index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nrwl/devkit": "14.
|
|
29
|
-
"@nrwl/jest": "14.
|
|
30
|
-
"@nrwl/
|
|
31
|
-
"@nrwl/
|
|
32
|
-
"@nrwl/
|
|
33
|
-
"
|
|
28
|
+
"@nrwl/devkit": "14.9.0-beta.1",
|
|
29
|
+
"@nrwl/jest": "14.9.0-beta.1",
|
|
30
|
+
"@nrwl/js": "14.9.0-beta.1",
|
|
31
|
+
"@nrwl/linter": "14.9.0-beta.1",
|
|
32
|
+
"@nrwl/react": "14.9.0-beta.1",
|
|
33
|
+
"@nrwl/workspace": "14.9.0-beta.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"detox": "
|
|
36
|
+
"detox": "~20.5.0"
|
|
37
37
|
},
|
|
38
38
|
"builders": "./executors.json",
|
|
39
39
|
"ng-update": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "b2a467bcb2bdc124ed52f3755780bca429a43855"
|
|
48
48
|
}
|
package/project.json
CHANGED
|
@@ -1,43 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "detox",
|
|
2
3
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
3
4
|
"sourceRoot": "packages/detox/src",
|
|
4
5
|
"projectType": "library",
|
|
5
6
|
"targets": {
|
|
6
|
-
"lint": {
|
|
7
|
-
|
|
8
|
-
"options": {
|
|
9
|
-
"lintFilePatterns": [
|
|
10
|
-
"packages/detox/**/*.ts",
|
|
11
|
-
"packages/detox/**/*.spec.ts",
|
|
12
|
-
"packages/detox/**/*.spec.tsx",
|
|
13
|
-
"packages/detox/**/*.spec.js",
|
|
14
|
-
"packages/detox/**/*.spec.jsx",
|
|
15
|
-
"packages/detox/**/*.d.ts",
|
|
16
|
-
"packages/detox/**/executors/**/schema.json",
|
|
17
|
-
"packages/detox/**/generators/**/schema.json",
|
|
18
|
-
"packages/detox/generators.json",
|
|
19
|
-
"packages/detox/executors.json",
|
|
20
|
-
"packages/detox/package.json",
|
|
21
|
-
"packages/detox/migrations.json"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"outputs": ["{options.outputFile}"]
|
|
25
|
-
},
|
|
26
|
-
"test": {
|
|
27
|
-
"executor": "@nrwl/jest:jest",
|
|
28
|
-
"options": {
|
|
29
|
-
"jestConfig": "packages/detox/jest.config.ts",
|
|
30
|
-
"passWithNoTests": true
|
|
31
|
-
},
|
|
32
|
-
"outputs": ["coverage/packages/detox"]
|
|
33
|
-
},
|
|
7
|
+
"lint": {},
|
|
8
|
+
"test": {},
|
|
34
9
|
"build-base": {
|
|
35
10
|
"executor": "@nrwl/js:tsc",
|
|
36
11
|
"options": {
|
|
37
|
-
"outputPath": "build/packages/detox",
|
|
38
|
-
"tsConfig": "packages/detox/tsconfig.lib.json",
|
|
39
|
-
"main": "packages/detox/index.ts",
|
|
40
|
-
"updateBuildableProjectDepsInPackageJson": false,
|
|
41
12
|
"assets": [
|
|
42
13
|
{
|
|
43
14
|
"input": "packages/detox",
|
|
@@ -71,12 +42,11 @@
|
|
|
71
42
|
"output": "/"
|
|
72
43
|
}
|
|
73
44
|
]
|
|
74
|
-
}
|
|
75
|
-
"outputs": ["{options.outputPath}"]
|
|
45
|
+
}
|
|
76
46
|
},
|
|
77
47
|
"build": {
|
|
78
48
|
"executor": "nx:run-commands",
|
|
79
|
-
"outputs": ["build/packages/detox"],
|
|
49
|
+
"outputs": ["{workspaceRoot}/build/packages/detox"],
|
|
80
50
|
"options": {
|
|
81
51
|
"command": "node ./scripts/copy-readme.js detox"
|
|
82
52
|
}
|
|
@@ -7,7 +7,7 @@ const child_process_1 = require("child_process");
|
|
|
7
7
|
let childProcess;
|
|
8
8
|
function detoxBuildExecutor(options, context) {
|
|
9
9
|
return tslib_1.__asyncGenerator(this, arguments, function* detoxBuildExecutor_1() {
|
|
10
|
-
const projectRoot = context.
|
|
10
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
11
11
|
try {
|
|
12
12
|
yield tslib_1.__await(runCliBuild(context.root, projectRoot, options));
|
|
13
13
|
yield yield tslib_1.__await({ success: true });
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
2
4
|
"title": "Run detox test",
|
|
3
5
|
"description": "Run detox test options.",
|
|
4
6
|
"type": "object",
|
|
@@ -30,7 +32,8 @@
|
|
|
30
32
|
"description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in package.json.",
|
|
31
33
|
"alias": "cp",
|
|
32
34
|
"x-completion-type": "file",
|
|
33
|
-
"x-completion-glob": ".detoxrc?(.js)"
|
|
35
|
+
"x-completion-glob": ".detoxrc?(.js)",
|
|
36
|
+
"x-priority": "important"
|
|
34
37
|
},
|
|
35
38
|
"runnerConfig": {
|
|
36
39
|
"type": "string",
|
|
@@ -9,10 +9,10 @@ const build_impl_1 = require("../build/build.impl");
|
|
|
9
9
|
let childProcess;
|
|
10
10
|
function detoxTestExecutor(options, context) {
|
|
11
11
|
return tslib_1.__asyncGenerator(this, arguments, function* detoxTestExecutor_1() {
|
|
12
|
-
const projectRoot = context.
|
|
12
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
13
|
try {
|
|
14
14
|
if (options.buildTarget) {
|
|
15
|
-
const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget);
|
|
15
|
+
const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph);
|
|
16
16
|
const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
|
|
17
17
|
yield tslib_1.__await((0, build_impl_1.runCliBuild)(context.root, projectRoot, Object.assign(Object.assign({}, buildOptions), { detoxConfiguration: options.detoxConfiguration })));
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.impl.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/executors/test/test.impl.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AACtB,yCAAqC;AACrC,+BAA4B;AAC5B,iDAAmD;AAGnD,oDAAkD;AAQlD,IAAI,YAA0B,CAAC;AAE/B,SAA+B,iBAAiB,CAC9C,OAAyB,EACzB,OAAwB;;QAExB,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"test.impl.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/executors/test/test.impl.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.detoxApplicationSchematic = exports.detoxApplicationGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
7
6
|
const init_1 = require("../init/init");
|
|
8
7
|
const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
|
|
9
8
|
const add_linting_1 = require("./lib/add-linting");
|
|
@@ -13,9 +12,7 @@ const normalize_options_1 = require("./lib/normalize-options");
|
|
|
13
12
|
function detoxApplicationGenerator(host, schema) {
|
|
14
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
14
|
const options = (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
16
|
-
const initTask = yield (0, init_1.default)(host, {
|
|
17
|
-
skipFormat: true,
|
|
18
|
-
});
|
|
15
|
+
const initTask = yield (0, init_1.default)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
19
16
|
(0, create_files_1.createFiles)(host, options);
|
|
20
17
|
(0, add_project_1.addProject)(host, options);
|
|
21
18
|
(0, add_git_ignore_entry_1.addGitIgnoreEntry)(host, options);
|
|
@@ -23,7 +20,7 @@ function detoxApplicationGenerator(host, schema) {
|
|
|
23
20
|
if (!options.skipFormat) {
|
|
24
21
|
yield (0, devkit_1.formatFiles)(host);
|
|
25
22
|
}
|
|
26
|
-
return (0,
|
|
23
|
+
return (0, devkit_1.runTasksInSerial)(initTask, lintingTask);
|
|
27
24
|
});
|
|
28
25
|
}
|
|
29
26
|
exports.detoxApplicationGenerator = detoxApplicationGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AAEtB,uCAA8C;AAC9C,qEAA+D;AAC/D,mDAA+C;AAC/C,mDAA+C;AAC/C,qDAAiD;AACjD,+DAA2D;AAG3D,SAAsB,yBAAyB,CAAC,IAAU,EAAE,MAAc;;QACxE,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAkB,EAAC,IAAI,kCACzC,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QACH,IAAA,0BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1B,IAAA,wCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEjC,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEpD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC;CAAA;AAlBD,8DAkBC;AAED,kBAAe,yBAAyB,CAAC;AAC5B,QAAA,yBAAyB,GAAG,IAAA,2BAAkB,EACzD,yBAAyB,CAC1B,CAAC"}
|
|
@@ -4,46 +4,46 @@
|
|
|
4
4
|
"apps": {
|
|
5
5
|
"ios.debug": {
|
|
6
6
|
"type": "ios.app",
|
|
7
|
-
"build": "cd
|
|
8
|
-
"binaryPath": "
|
|
7
|
+
"build": "cd <%= offsetFromRoot %><%= appRoot %>/ios && xcodebuild -workspace <%= appClassName %>.xcworkspace -scheme <%= appClassName %> -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet",
|
|
8
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/ios/build/Build/Products/Debug-iphonesimulator/<%= appClassName %>.app"
|
|
9
9
|
},
|
|
10
10
|
"ios.release": {
|
|
11
11
|
"type": "ios.app",
|
|
12
|
-
"build": "cd
|
|
13
|
-
"binaryPath": "
|
|
12
|
+
"build": "cd <%= offsetFromRoot %><%= appRoot %>/ios && xcodebuild -workspace <%= appClassName %>.xcworkspace -scheme <%= appClassName %> -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet",
|
|
13
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/ios/build/Build/Products/Release-iphonesimulator/<%= appClassName %>.app"
|
|
14
14
|
},
|
|
15
15
|
<% if (framework === 'expo') { %>
|
|
16
16
|
"ios.eas": {
|
|
17
17
|
"type": "ios.app",
|
|
18
|
-
"build": "<%= exec %> nx run <%= appFileName %>:download --platform ios --distribution simulator --output=<%=
|
|
19
|
-
"binaryPath": "
|
|
18
|
+
"build": "<%= exec %> nx run <%= appFileName %>:download --platform ios --distribution simulator --output=<%= appRoot %>/dist/",
|
|
19
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.app"
|
|
20
20
|
},
|
|
21
21
|
"ios.local": {
|
|
22
22
|
"type": "ios.app",
|
|
23
|
-
"build": "<%= exec %> nx run <%= appFileName %>:build --platform ios --profile preview --wait --local --no-interactive --output=<%=
|
|
24
|
-
"binaryPath": "
|
|
23
|
+
"build": "<%= exec %> nx run <%= appFileName %>:build --platform ios --profile preview --wait --local --no-interactive --output=<%= appRoot %>/dist/",
|
|
24
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.app"
|
|
25
25
|
},
|
|
26
26
|
<% } %>
|
|
27
27
|
"android.debug": {
|
|
28
28
|
"type": "android.apk",
|
|
29
|
-
"build": "cd
|
|
30
|
-
"binaryPath": "
|
|
29
|
+
"build": "cd <%= offsetFromRoot %><%= appRoot %>/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug",
|
|
30
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/android/app/build/outputs/apk/debug/app-debug.apk"
|
|
31
31
|
},
|
|
32
32
|
"android.release": {
|
|
33
33
|
"type": "android.apk",
|
|
34
|
-
"build": "cd
|
|
35
|
-
"binaryPath": "
|
|
34
|
+
"build": "cd <%= offsetFromRoot %><%= appRoot %>/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release",
|
|
35
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/android/app/build/outputs/apk/release/app-release.apk"
|
|
36
36
|
},
|
|
37
37
|
<% if (framework === 'expo') { %>
|
|
38
38
|
"android.eas": {
|
|
39
39
|
"type": "ios.app",
|
|
40
|
-
"build": "<%= exec %> nx run <%= appFileName %>:download --platform android --output=<%=
|
|
41
|
-
"binaryPath": "
|
|
40
|
+
"build": "<%= exec %> nx run <%= appFileName %>:download --platform android --output=<%= appRoot %>/dist/",
|
|
41
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.apk"
|
|
42
42
|
},
|
|
43
43
|
"android.local": {
|
|
44
44
|
"type": "ios.app",
|
|
45
|
-
"build": "<%= exec %> nx run <%= appFileName %>:build --platform android --profile preview --wait --local --no-interactive --output=<%=
|
|
46
|
-
"binaryPath": "
|
|
45
|
+
"build": "<%= exec %> nx run <%= appFileName %>:build --platform android --profile preview --wait --local --no-interactive --output=<%= appRoot %>/dist/",
|
|
46
|
+
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.apk"
|
|
47
47
|
},
|
|
48
48
|
<% } %>
|
|
49
49
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"simulator": {
|
|
52
52
|
"type": "ios.simulator",
|
|
53
53
|
"device": {
|
|
54
|
-
"type": "iPhone
|
|
54
|
+
"type": "iPhone 14"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"emulator": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preset": "<%= offsetFromRoot %>jest.preset",
|
|
3
|
+
"testTimeout": 120000,
|
|
4
|
+
"maxWorkers": 1,
|
|
5
|
+
"globalSetup": "detox/runners/jest/globalSetup",
|
|
6
|
+
"globalTeardown": "detox/runners/jest/globalTeardown",
|
|
7
|
+
"reporters": ["detox/runners/jest/reporter"],
|
|
8
|
+
"testEnvironment": "detox/runners/jest/testEnvironment",
|
|
9
|
+
"verbose": true,
|
|
10
|
+
"setupFilesAfterEnv": ["<rootDir>/test-setup.ts"],
|
|
11
|
+
"transform": {
|
|
12
|
+
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest",
|
|
13
|
+
"^.+\\.[tj]sx?$": "babel-jest"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -6,6 +6,6 @@ describe('<%= appClassName %>', () => {
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
it('should display welcome message', async () => {
|
|
9
|
-
await expect(element(by.id('heading'))).toHaveText('Welcome <%=
|
|
9
|
+
await expect(element(by.id('heading'))).toHaveText('Welcome <%= appDisplayName %> 👋');
|
|
10
10
|
});
|
|
11
11
|
});
|
|
@@ -5,7 +5,7 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
5
5
|
function addGitIgnoreEntry(host, options) {
|
|
6
6
|
if (host.exists('.gitignore')) {
|
|
7
7
|
let content = host.read('.gitignore', 'utf-8');
|
|
8
|
-
content = `${content}\n${options.
|
|
8
|
+
content = `${content}\n${options.e2eProjectRoot}/artifacts\n`;
|
|
9
9
|
host.write('.gitignore', content);
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-git-ignore-entry.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-git-ignore-entry.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAG5C,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;QAC7B,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,GAAG,GAAG,OAAO,KAAK,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"add-git-ignore-entry.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-git-ignore-entry.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAG5C,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;QAC7B,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,GAAG,GAAG,OAAO,KAAK,OAAO,CAAC,cAAc,cAAc,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;KACnC;SAAM;QACL,eAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;KACxD;AACH,CAAC;AARD,8CAQC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLinting = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
6
5
|
const linter_1 = require("@nrwl/linter");
|
|
7
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
7
|
const react_1 = require("@nrwl/react");
|
|
@@ -13,20 +12,16 @@ function addLinting(host, options) {
|
|
|
13
12
|
}
|
|
14
13
|
const lintTask = yield (0, linter_1.lintProjectGenerator)(host, {
|
|
15
14
|
linter: options.linter,
|
|
16
|
-
project: options.
|
|
15
|
+
project: options.e2eProjectName,
|
|
17
16
|
tsConfigPaths: [
|
|
18
|
-
(0, devkit_1.joinPathFragments)(options.
|
|
17
|
+
(0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'tsconfig.app.json'),
|
|
19
18
|
],
|
|
20
|
-
eslintFilePatterns: [`${options.
|
|
19
|
+
eslintFilePatterns: [`${options.e2eProjectRoot}/**/*.{ts,tsx,js,jsx}`],
|
|
21
20
|
skipFormat: true,
|
|
22
21
|
});
|
|
23
|
-
|
|
24
|
-
return () => { };
|
|
25
|
-
}
|
|
26
|
-
const reactEslintJson = (0, react_1.createReactEslintJson)(options.projectRoot, options.setParserOptionsProject);
|
|
27
|
-
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), () => reactEslintJson);
|
|
22
|
+
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, '.eslintrc.json'), react_1.extendReactEslintJson);
|
|
28
23
|
const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, react_1.extraEslintDependencies.dependencies, react_1.extraEslintDependencies.devDependencies);
|
|
29
|
-
return (0,
|
|
24
|
+
return (0, devkit_1.runTasksInSerial)(lintTask, installTask);
|
|
30
25
|
});
|
|
31
26
|
}
|
|
32
27
|
exports.addLinting = addLinting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":";;;;AAAA,yCAA4D;AAC5D,yCAMsB;AACtB,uCAA6E;AAG7E,SAAsB,UAAU,CAAC,IAAU,EAAE,OAAyB;;QACpE,IAAI,OAAO,CAAC,MAAM,KAAK,eAAM,CAAC,IAAI,EAAE;YAClC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,6BAAoB,EAAC,IAAI,EAAE;YAChD,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,cAAc;YAC/B,aAAa,EAAE;gBACb,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,mBAAmB,CAAC;aAC/D;YACD,kBAAkB,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,uBAAuB,CAAC;YACtE,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAC3D,6BAAqB,CACtB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,qCAA4B,EAC9C,IAAI,EACJ,+BAAuB,CAAC,YAAY,EACpC,+BAAuB,CAAC,eAAe,CACxC,CAAC;QAEF,OAAO,IAAA,yBAAgB,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC;CAAA;AA5BD,gCA4BC"}
|
|
@@ -4,13 +4,13 @@ exports.addProject = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const get_targets_1 = require("./get-targets");
|
|
6
6
|
function addProject(host, options) {
|
|
7
|
-
(0, devkit_1.addProjectConfiguration)(host, options.
|
|
8
|
-
root: options.
|
|
9
|
-
sourceRoot: `${options.
|
|
7
|
+
(0, devkit_1.addProjectConfiguration)(host, options.e2eProjectName, {
|
|
8
|
+
root: options.e2eProjectRoot,
|
|
9
|
+
sourceRoot: `${options.e2eProjectRoot}/src`,
|
|
10
10
|
projectType: 'application',
|
|
11
11
|
targets: Object.assign({}, getTargets(options)),
|
|
12
12
|
tags: [],
|
|
13
|
-
implicitDependencies:
|
|
13
|
+
implicitDependencies: [options.appProject],
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
exports.addProject = addProject;
|
|
@@ -20,14 +20,14 @@ function getTargets(options) {
|
|
|
20
20
|
? (0, get_targets_1.reactNativeBuildTarget)('ios.sim')
|
|
21
21
|
: (0, get_targets_1.expoBuildTarget)('ios.sim')));
|
|
22
22
|
targets['test-ios'] = Object.assign({ executor: '@nrwl/detox:test' }, (options.framework === 'react-native'
|
|
23
|
-
? (0, get_targets_1.reactNativeTestTarget)('ios.sim', options.
|
|
24
|
-
: (0, get_targets_1.expoTestTarget)('ios.sim', options.
|
|
23
|
+
? (0, get_targets_1.reactNativeTestTarget)('ios.sim', options.e2eName)
|
|
24
|
+
: (0, get_targets_1.expoTestTarget)('ios.sim', options.e2eName)));
|
|
25
25
|
targets['build-android'] = Object.assign({ executor: '@nrwl/detox:build' }, (options.framework === 'react-native'
|
|
26
26
|
? (0, get_targets_1.reactNativeBuildTarget)('android.emu')
|
|
27
27
|
: (0, get_targets_1.expoBuildTarget)('android.emu')));
|
|
28
28
|
targets['test-android'] = Object.assign({ executor: '@nrwl/detox:test' }, (options.framework === 'react-native'
|
|
29
|
-
? (0, get_targets_1.reactNativeTestTarget)('android.emu', options.
|
|
30
|
-
: (0, get_targets_1.expoTestTarget)('android.emu', options.
|
|
29
|
+
? (0, get_targets_1.reactNativeTestTarget)('android.emu', options.e2eName)
|
|
30
|
+
: (0, get_targets_1.expoTestTarget)('android.emu', options.e2eName)));
|
|
31
31
|
return targets;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=add-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AACtB,+CAKuB;AAGvB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AACtB,+CAKuB;AAGvB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE;QACpD,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,MAAM;QAC3C,WAAW,EAAE,aAAa;QAC1B,OAAO,oBAAO,UAAU,CAAC,OAAO,CAAC,CAAE;QACnC,IAAI,EAAE,EAAE;QACR,oBAAoB,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC;AATD,gCASC;AAED,SAAS,UAAU,CAAC,OAAyB;IAC3C,MAAM,OAAO,GAA2C,EAAE,CAAC;IAE3D,OAAO,CAAC,WAAW,CAAC,mBAClB,QAAQ,EAAE,mBAAmB,IAC1B,CAAC,OAAO,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,IAAA,oCAAsB,EAAC,SAAS,CAAC;QACnC,CAAC,CAAC,IAAA,6BAAe,EAAC,SAAS,CAAC,CAAC,CAChC,CAAC;IAEF,OAAO,CAAC,UAAU,CAAC,mBACjB,QAAQ,EAAE,kBAAkB,IACzB,CAAC,OAAO,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,IAAA,mCAAqB,EAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,IAAA,4BAAc,EAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAChD,CAAC;IAEF,OAAO,CAAC,eAAe,CAAC,mBACtB,QAAQ,EAAE,mBAAmB,IAC1B,CAAC,OAAO,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,IAAA,oCAAsB,EAAC,aAAa,CAAC;QACvC,CAAC,CAAC,IAAA,6BAAe,EAAC,aAAa,CAAC,CAAC,CACpC,CAAC;IAEF,OAAO,CAAC,cAAc,CAAC,mBACrB,QAAQ,EAAE,kBAAkB,IACzB,CAAC,OAAO,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,IAAA,mCAAqB,EAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC;QACvD,CAAC,CAAC,IAAA,4BAAc,EAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CACpD,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFiles = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const js_1 = require("@nrwl/js");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
function createFiles(host, options) {
|
|
8
|
-
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.
|
|
8
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.e2eProjectRoot, Object.assign(Object.assign({}, options), { exec: (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(host.root)).exec, offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.e2eProjectRoot), rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(host, options.e2eProjectRoot) }));
|
|
9
9
|
if (options.js) {
|
|
10
10
|
(0, devkit_1.toJS)(host);
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-files.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/create-files.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AACtB,
|
|
1
|
+
{"version":3,"file":"create-files.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/create-files.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AACtB,iCAAyD;AACzD,+BAA4B;AAG5B,SAAgB,WAAW,CAAC,IAAU,EAAE,OAAyB;IAC/D,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,kCACtE,OAAO,KACV,IAAI,EAAE,IAAA,iCAAwB,EAAC,IAAA,6BAAoB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACpE,cAAc,EAAE,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,CAAC,EACtD,gBAAgB,EAAE,IAAA,kCAA6B,EAC7C,IAAI,EACJ,OAAO,CAAC,cAAc,CACvB,IACD,CAAC;IACH,IAAI,OAAO,CAAC,EAAE,EAAE;QACd,IAAA,aAAI,EAAC,IAAI,CAAC,CAAC;KACZ;AACH,CAAC;AAbD,kCAaC"}
|
|
@@ -24,7 +24,7 @@ export declare function expoBuildTarget(platform: 'ios.sim' | 'android.emu'): {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
export declare function reactNativeTestTarget(platform: 'ios.sim' | 'android.emu',
|
|
27
|
+
export declare function reactNativeTestTarget(platform: 'ios.sim' | 'android.emu', e2eName: string): {
|
|
28
28
|
options: {
|
|
29
29
|
detoxConfiguration: string;
|
|
30
30
|
buildTarget: string;
|
|
@@ -36,7 +36,7 @@ export declare function reactNativeTestTarget(platform: 'ios.sim' | 'android.emu
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
export declare function expoTestTarget(platform: 'ios.sim' | 'android.emu',
|
|
39
|
+
export declare function expoTestTarget(platform: 'ios.sim' | 'android.emu', e2eName: string): {
|
|
40
40
|
options: {
|
|
41
41
|
detoxConfiguration: string;
|
|
42
42
|
buildTarget: string;
|
|
@@ -33,39 +33,41 @@ function expoBuildTarget(platform) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
exports.expoBuildTarget = expoBuildTarget;
|
|
36
|
-
function reactNativeTestTarget(platform,
|
|
36
|
+
function reactNativeTestTarget(platform, e2eName) {
|
|
37
|
+
const buildPlatform = platform === 'ios.sim' ? 'ios' : 'android';
|
|
37
38
|
return {
|
|
38
39
|
options: {
|
|
39
40
|
detoxConfiguration: `${platform}.debug`,
|
|
40
|
-
buildTarget: `${
|
|
41
|
+
buildTarget: `${e2eName}:build-${buildPlatform}}`,
|
|
41
42
|
},
|
|
42
43
|
configurations: {
|
|
43
44
|
production: {
|
|
44
45
|
detoxConfiguration: `${platform}.release`,
|
|
45
|
-
buildTarget: `${
|
|
46
|
+
buildTarget: `${e2eName}:build-${buildPlatform}:production`,
|
|
46
47
|
},
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
exports.reactNativeTestTarget = reactNativeTestTarget;
|
|
51
|
-
function expoTestTarget(platform,
|
|
52
|
+
function expoTestTarget(platform, e2eName) {
|
|
53
|
+
const buildPlatform = platform === 'ios.sim' ? 'ios' : 'android';
|
|
52
54
|
return {
|
|
53
55
|
options: {
|
|
54
56
|
detoxConfiguration: `${platform}.eas`,
|
|
55
|
-
buildTarget: `${
|
|
57
|
+
buildTarget: `${e2eName}:build-${buildPlatform}`,
|
|
56
58
|
},
|
|
57
59
|
configurations: {
|
|
58
60
|
local: {
|
|
59
61
|
detoxConfiguration: `${platform}.local`,
|
|
60
|
-
buildTarget: `${
|
|
62
|
+
buildTarget: `${e2eName}:build-${buildPlatform}:local`,
|
|
61
63
|
},
|
|
62
64
|
bare: {
|
|
63
65
|
detoxConfiguration: `${platform}.debug`,
|
|
64
|
-
buildTarget: `${
|
|
66
|
+
buildTarget: `${e2eName}:build-${buildPlatform}:bare`,
|
|
65
67
|
},
|
|
66
68
|
production: {
|
|
67
69
|
detoxConfiguration: `${platform}.release`,
|
|
68
|
-
buildTarget: `${
|
|
70
|
+
buildTarget: `${e2eName}:build-${buildPlatform}:production`,
|
|
69
71
|
},
|
|
70
72
|
},
|
|
71
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-targets.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/get-targets.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB,CAAC,QAAmC;IACxE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;SACxC;QACD,cAAc,EAAE;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;aAC1C;SACF;KACF,CAAC;AACJ,CAAC;AAXD,wDAWC;AAED,SAAgB,eAAe,CAAC,QAAmC;IACjE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;SACxC;QACD,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;aACxC;YACD,IAAI,EAAE;gBACJ,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;aACxC;YACD,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;aAC1C;SACF;KACF,CAAC;AACJ,CAAC;AAjBD,0CAiBC;AAED,SAAgB,qBAAqB,CACnC,QAAmC,EACnC,
|
|
1
|
+
{"version":3,"file":"get-targets.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/get-targets.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB,CAAC,QAAmC;IACxE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;SACxC;QACD,cAAc,EAAE;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;aAC1C;SACF;KACF,CAAC;AACJ,CAAC;AAXD,wDAWC;AAED,SAAgB,eAAe,CAAC,QAAmC;IACjE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;SACxC;QACD,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;aACxC;YACD,IAAI,EAAE;gBACJ,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;aACxC;YACD,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;aAC1C;SACF;KACF,CAAC;AACJ,CAAC;AAjBD,0CAiBC;AAED,SAAgB,qBAAqB,CACnC,QAAmC,EACnC,OAAe;IAEf,MAAM,aAAa,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;YACvC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,GAAG;SAClD;QACD,cAAc,EAAE;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;gBACzC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,aAAa;aAC5D;SACF;KACF,CAAC;AACJ,CAAC;AAlBD,sDAkBC;AAED,SAAgB,cAAc,CAC5B,QAAmC,EACnC,OAAe;IAEf,MAAM,aAAa,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE;YACP,kBAAkB,EAAE,GAAG,QAAQ,MAAM;YACrC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,EAAE;SACjD;QACD,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;gBACvC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,QAAQ;aACvD;YACD,IAAI,EAAE;gBACJ,kBAAkB,EAAE,GAAG,QAAQ,QAAQ;gBACvC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,OAAO;aACtD;YACD,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,UAAU;gBACzC,WAAW,EAAE,GAAG,OAAO,UAAU,aAAa,aAAa;aAC5D;SACF;KACF,CAAC;AACJ,CAAC;AA1BD,wCA0BC"}
|
|
@@ -3,15 +3,16 @@ import { Schema } from '../schema';
|
|
|
3
3
|
export interface NormalizedSchema extends Schema {
|
|
4
4
|
appFileName: string;
|
|
5
5
|
appClassName: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
appExpoName: string;
|
|
7
|
+
appRoot: string;
|
|
8
|
+
e2eProjectName: string;
|
|
9
|
+
e2eProjectDirectory: string;
|
|
10
|
+
e2eProjectRoot: string;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
|
-
* if options.
|
|
13
|
-
*
|
|
14
|
-
* if options.
|
|
15
|
-
*
|
|
13
|
+
* if options.e2eName = 'my-app-e2e' with no options.directory
|
|
14
|
+
* e2eProjectName = 'my-app', e2eProjectRoot = 'apps/my-app'
|
|
15
|
+
* if options.e2eName = 'my-app' with options.e2eDirectory = 'my-dir'
|
|
16
|
+
* e2eProjectName = 'my-dir-my-app', e2eProjectRoot = 'apps/my-dir/my-apps'
|
|
16
17
|
*/
|
|
17
18
|
export declare function normalizeOptions(host: Tree, options: Schema): NormalizedSchema;
|
|
@@ -3,29 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
/**
|
|
6
|
-
* if options.
|
|
7
|
-
*
|
|
8
|
-
* if options.
|
|
9
|
-
*
|
|
6
|
+
* if options.e2eName = 'my-app-e2e' with no options.directory
|
|
7
|
+
* e2eProjectName = 'my-app', e2eProjectRoot = 'apps/my-app'
|
|
8
|
+
* if options.e2eName = 'my-app' with options.e2eDirectory = 'my-dir'
|
|
9
|
+
* e2eProjectName = 'my-dir-my-app', e2eProjectRoot = 'apps/my-dir/my-apps'
|
|
10
10
|
*/
|
|
11
11
|
function normalizeOptions(host, options) {
|
|
12
|
+
var _a;
|
|
12
13
|
const { appsDir } = (0, devkit_1.getWorkspaceLayout)(host);
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
? (0, devkit_1.names)(options.
|
|
14
|
+
const e2eFileName = (0, devkit_1.names)(options.e2eName).fileName;
|
|
15
|
+
const e2eDirectoryFileName = options.e2eDirectory
|
|
16
|
+
? (0, devkit_1.names)(options.e2eDirectory).fileName
|
|
16
17
|
: '';
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const e2eProjectName = (e2eDirectoryFileName
|
|
19
|
+
? `${e2eDirectoryFileName}-${e2eFileName}`
|
|
20
|
+
: e2eFileName).replace(/\//g, '-');
|
|
21
|
+
const e2eProjectDirectory = e2eDirectoryFileName
|
|
22
|
+
? (0, devkit_1.joinPathFragments)(appsDir, e2eDirectoryFileName)
|
|
20
23
|
: appsDir;
|
|
21
|
-
const
|
|
22
|
-
const { fileName: appFileName, className: appClassName } = (0, devkit_1.names)(options.
|
|
24
|
+
const e2eProjectRoot = (0, devkit_1.joinPathFragments)(e2eProjectDirectory, e2eFileName);
|
|
25
|
+
const { fileName: appFileName, className: appClassName } = (0, devkit_1.names)(options.appName || options.appProject);
|
|
26
|
+
const project = (0, devkit_1.getProjects)(host).get(options.appProject);
|
|
27
|
+
const appRoot = (project === null || project === void 0 ? void 0 : project.root) || (0, devkit_1.joinPathFragments)(e2eProjectDirectory, appFileName);
|
|
23
28
|
return Object.assign(Object.assign({}, options), { appFileName,
|
|
24
|
-
appClassName, appDisplayName: options.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
projectDirectory,
|
|
28
|
-
projectRoot });
|
|
29
|
+
appClassName, appDisplayName: options.appDisplayName || appClassName, appExpoName: ((_a = options.appDisplayName) === null || _a === void 0 ? void 0 : _a.replace(/\s/g, '')) || appClassName, appRoot, e2eName: e2eFileName, e2eProjectName,
|
|
30
|
+
e2eProjectDirectory,
|
|
31
|
+
e2eProjectRoot });
|
|
29
32
|
}
|
|
30
33
|
exports.normalizeOptions = normalizeOptions;
|
|
31
34
|
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AAatB;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAe;;IAEf,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,WAAW,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;IACpD,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY;QAC/C,CAAC,CAAC,IAAA,cAAK,EAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ;QACtC,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,cAAc,GAAG,CACrB,oBAAoB;QAClB,CAAC,CAAC,GAAG,oBAAoB,IAAI,WAAW,EAAE;QAC1C,CAAC,CAAC,WAAW,CAChB,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtB,MAAM,mBAAmB,GAAG,oBAAoB;QAC9C,CAAC,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,oBAAoB,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC;IACZ,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IAE3E,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,IAAA,cAAK,EAC9D,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CACtC,CAAC;IACF,MAAM,OAAO,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1D,MAAM,OAAO,GACX,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,KAAI,IAAA,0BAAiB,EAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IAEvE,uCACK,OAAO,KACV,WAAW;QACX,YAAY,EACZ,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,YAAY,EACtD,WAAW,EAAE,CAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAI,YAAY,EACvE,OAAO,EACP,OAAO,EAAE,WAAW,EACpB,cAAc;QACd,mBAAmB;QACnB,cAAc,IACd;AACJ,CAAC;AAtCD,4CAsCC"}
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
"description": "Create Detox Configuration for the workspace.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
7
|
+
"appProject": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "
|
|
9
|
+
"description": "Name of the frontend project to be tested.",
|
|
10
10
|
"$default": {
|
|
11
11
|
"$source": "projectName"
|
|
12
12
|
},
|
|
13
13
|
"x-prompt": "What is the name of the frontend project to test?"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
15
|
+
"e2eName": {
|
|
16
16
|
"type": "string",
|
|
17
17
|
"description": "Name of the E2E Project.",
|
|
18
18
|
"$default": {
|
|
@@ -21,20 +21,28 @@
|
|
|
21
21
|
},
|
|
22
22
|
"x-prompt": "What name would you like to use for the E2E project?"
|
|
23
23
|
},
|
|
24
|
+
"appName": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Name of the app to be tested if different from appProject"
|
|
27
|
+
},
|
|
28
|
+
"appDisplayName": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Display name of the app to be tested if different from appProject"
|
|
31
|
+
},
|
|
24
32
|
"framework": {
|
|
25
33
|
"type": "string",
|
|
26
34
|
"description": "App framework to test",
|
|
27
35
|
"enum": ["react-native", "expo"],
|
|
28
36
|
"x-prompt": "What app framework should detox test?"
|
|
29
37
|
},
|
|
30
|
-
"
|
|
38
|
+
"e2eDirectory": {
|
|
31
39
|
"type": "string",
|
|
32
|
-
"description": "A directory where the project is placed."
|
|
40
|
+
"description": "A directory where the project is placed relative to apps directory."
|
|
33
41
|
},
|
|
34
42
|
"linter": {
|
|
35
43
|
"description": "The tool to use for running lint checks.",
|
|
36
44
|
"type": "string",
|
|
37
|
-
"enum": ["eslint", "
|
|
45
|
+
"enum": ["eslint", "none"],
|
|
38
46
|
"default": "eslint"
|
|
39
47
|
},
|
|
40
48
|
"js": {
|
|
@@ -45,7 +53,8 @@
|
|
|
45
53
|
"skipFormat": {
|
|
46
54
|
"description": "Skip formatting files.",
|
|
47
55
|
"type": "boolean",
|
|
48
|
-
"default": false
|
|
56
|
+
"default": false,
|
|
57
|
+
"x-priority": "internal"
|
|
49
58
|
},
|
|
50
59
|
"setParserOptionsProject": {
|
|
51
60
|
"type": "boolean",
|
|
@@ -53,5 +62,5 @@
|
|
|
53
62
|
"default": false
|
|
54
63
|
}
|
|
55
64
|
},
|
|
56
|
-
"required": ["
|
|
65
|
+
"required": ["e2eName", "appProject", "framework"]
|
|
57
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Tree } from '@nrwl/devkit';
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
|
-
export declare function detoxInitGenerator(host: Tree, schema: Schema): Promise<
|
|
4
|
-
export declare function updateDependencies(host: Tree):
|
|
3
|
+
export declare function detoxInitGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
|
+
export declare function updateDependencies(host: Tree): GeneratorCallback;
|
|
5
5
|
export default detoxInitGenerator;
|
|
6
6
|
export declare const detoxInitSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -4,15 +4,18 @@ exports.detoxInitSchematic = exports.updateDependencies = exports.detoxInitGener
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const versions_1 = require("@nrwl/jest/src/utils/versions");
|
|
7
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
8
7
|
const versions_2 = require("../../utils/versions");
|
|
9
8
|
function detoxInitGenerator(host, schema) {
|
|
10
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
const tasks = [
|
|
10
|
+
const tasks = [];
|
|
11
|
+
if (!schema.skipPackageJson) {
|
|
12
|
+
tasks.push(moveDependency(host));
|
|
13
|
+
tasks.push(updateDependencies(host));
|
|
14
|
+
}
|
|
12
15
|
if (!schema.skipFormat) {
|
|
13
16
|
yield (0, devkit_1.formatFiles)(host);
|
|
14
17
|
}
|
|
15
|
-
return (0,
|
|
18
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
16
19
|
});
|
|
17
20
|
}
|
|
18
21
|
exports.detoxInitGenerator = detoxInitGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/detox/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAQsB;AACtB,4DAA8E;AAG9E,mDAI8B;AAE9B,SAAsB,kBAAkB,CAAC,IAAU,EAAE,MAAc;;QACjE,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;YAC3B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;SACtC;QAED,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AAbD,gDAaC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ,EAAE,EACF;QACE,aAAa,EAAE,oBAAS;QACxB,KAAK,EAAE,uBAAY;QACnB,2BAA2B,EAAE,gCAAqB;QAClD,aAAa,EAAE,2BAAgB;QAC/B,aAAa,EAAE,sBAAW;KAC3B,CACF,CAAC;AACJ,CAAC;AAZD,gDAYC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,kBAAe,kBAAkB,CAAC;AACrB,QAAA,kBAAkB,GAAG,IAAA,2BAAkB,EAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -7,7 +7,14 @@
|
|
|
7
7
|
"skipFormat": {
|
|
8
8
|
"description": "Skip formatting files.",
|
|
9
9
|
"type": "boolean",
|
|
10
|
-
"default": false
|
|
10
|
+
"default": false,
|
|
11
|
+
"x-priority": "internal"
|
|
12
|
+
},
|
|
13
|
+
"skipPackageJson": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": false,
|
|
16
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
17
|
+
"x-priority": "internal"
|
|
11
18
|
}
|
|
12
19
|
},
|
|
13
20
|
"required": []
|
package/src/utils/versions.d.ts
CHANGED
package/src/utils/versions.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.testingLibraryJestDom = exports.detoxVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.detoxVersion = '
|
|
5
|
+
exports.detoxVersion = '~20.5.0';
|
|
6
6
|
exports.testingLibraryJestDom = '5.16.5';
|
|
7
7
|
//# sourceMappingURL=versions.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// setup from https://github.com/wix/Detox/blob/master/docs/Guide.Jest.md#e2eenvironmentjs
|
|
2
|
-
const {
|
|
3
|
-
DetoxCircusEnvironment,
|
|
4
|
-
SpecReporter,
|
|
5
|
-
WorkerAssignReporter,
|
|
6
|
-
} = require('detox/runners/jest-circus');
|
|
7
|
-
|
|
8
|
-
class CustomDetoxEnvironment extends DetoxCircusEnvironment {
|
|
9
|
-
constructor(config, context) {
|
|
10
|
-
super(config, context);
|
|
11
|
-
|
|
12
|
-
// Can be safely removed, if you are content with the default value (=300000ms)
|
|
13
|
-
this.initTimeout = 300000;
|
|
14
|
-
|
|
15
|
-
// This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level.
|
|
16
|
-
// This is strictly optional.
|
|
17
|
-
this.registerListeners({
|
|
18
|
-
SpecReporter,
|
|
19
|
-
WorkerAssignReporter,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = CustomDetoxEnvironment;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"preset": "../../jest.preset",
|
|
3
|
-
"testEnvironment": "./environment",
|
|
4
|
-
"testRunner": "jest-circus/runner",
|
|
5
|
-
"testTimeout": 120000,
|
|
6
|
-
"reporters": ["detox/runners/jest/streamlineReporter"],
|
|
7
|
-
"setupFilesAfterEnv": ["<rootDir>/test-setup.ts"],
|
|
8
|
-
"transform": {
|
|
9
|
-
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest",
|
|
10
|
-
"^.+\\.[tj]sx?$": "babel-jest"
|
|
11
|
-
}
|
|
12
|
-
}
|