@nrwl/detox 14.4.3 → 14.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/package.json +7 -7
- package/src/executors/build/build.impl.js +1 -1
- package/src/executors/build/build.impl.js.map +1 -1
- package/src/executors/test/test.impl.js +1 -1
- package/src/executors/test/test.impl.js.map +1 -1
- package/src/generators/application/files/app/.detoxrc.json.template +46 -2
- package/src/generators/application/lib/add-linting.js +1 -1
- package/src/generators/application/lib/add-linting.js.map +1 -1
- package/src/generators/application/lib/add-project.js +15 -50
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/lib/create-files.js +1 -1
- package/src/generators/application/lib/create-files.js.map +1 -1
- package/src/generators/application/lib/get-targets.d.ts +58 -0
- package/src/generators/application/lib/get-targets.js +74 -0
- package/src/generators/application/lib/get-targets.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +2 -0
- package/src/generators/application/lib/normalize-options.js +8 -4
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/schema.json +7 -1
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
|
+
# [14.5.0-beta.2](https://github.com/nrwl/nx/compare/14.4.2...14.5.0-beta.2) (2022-07-18)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/detox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/detox",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0-beta.2",
|
|
4
4
|
"description": "The Nx Plugin for Detox that contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Monorepo",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"types": "index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nrwl/devkit": "14.
|
|
28
|
-
"@nrwl/jest": "14.
|
|
29
|
-
"@nrwl/linter": "14.
|
|
30
|
-
"@nrwl/react": "14.
|
|
31
|
-
"@nrwl/workspace": "14.
|
|
27
|
+
"@nrwl/devkit": "14.5.0-beta.2",
|
|
28
|
+
"@nrwl/jest": "14.5.0-beta.2",
|
|
29
|
+
"@nrwl/linter": "14.5.0-beta.2",
|
|
30
|
+
"@nrwl/react": "14.5.0-beta.2",
|
|
31
|
+
"@nrwl/workspace": "14.5.0-beta.2",
|
|
32
32
|
"chalk": "^4.1.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
},
|
|
42
42
|
"schematics": "./generators.json",
|
|
43
43
|
"typings": "./index.d.ts",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "38a2d95d9d654c89f58ed6700ec7b6cc01ddf74b"
|
|
45
45
|
}
|
|
@@ -23,7 +23,7 @@ exports.default = detoxBuildExecutor;
|
|
|
23
23
|
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
24
24
|
return new Promise((resolve, reject) => {
|
|
25
25
|
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/detox/local-cli/cli.js'), ['build', ...createDetoxBuildOptions(options)], {
|
|
26
|
-
cwd: projectRoot,
|
|
26
|
+
cwd: (0, path_1.join)(workspaceRoot, projectRoot),
|
|
27
27
|
});
|
|
28
28
|
// Ensure the child process is killed when the parent exits
|
|
29
29
|
process.on('exit', () => childProcess.kill());
|
|
@@ -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,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEzE,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;AAfD,qCAeC;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,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,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEzE,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;gBA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AC,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"}
|
|
@@ -30,7 +30,7 @@ exports.default = detoxTestExecutor;
|
|
|
30
30
|
function runCliTest(workspaceRoot, projectRoot, options) {
|
|
31
31
|
return new Promise((resolve, reject) => {
|
|
32
32
|
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/detox/local-cli/cli.js'), ['test', ...createDetoxTestOptions(options)], {
|
|
33
|
-
cwd: projectRoot,
|
|
33
|
+
cwd: (0, path_1.join)(workspaceRoot, projectRoot),
|
|
34
34
|
});
|
|
35
35
|
// Ensure the child process is killed when the parent exits
|
|
36
36
|
process.on('exit', () => childProcess.kill());
|
|
@@ -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,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEzE,IAAI;YACF,IAAI,OAAO,CAAC,WAAW,EAAE;gBACvB,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBAC3D,MAAM,YAAY,GAAG,IAAA,0BAAiB,EACpC,WAAW,EACX,OAAO,CACR,CAAC;gBAEF,sBAAM,IAAA,wBAAW,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,kCACtC,YAAY,KACf,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAC9C,CAAA,CAAC;aACJ;YAED,sBAAM,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAErD,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;AA5BD,oCA4BC;AAED,SAAS,UAAU,CACjB,aAAqB,EACrB,WAAmB,EACnB,OAAyB;IAEzB,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,MAAM,EAAE,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC,EAC5C;YACE,GAAG,EAAE,WAAW;
|
|
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,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEzE,IAAI;YACF,IAAI,OAAO,CAAC,WAAW,EAAE;gBACvB,MAAM,WAAW,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= appClassName %>.xcworkspace -scheme <%= appClassName %> -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13' -derivedDataPath ./build -quiet",
|
|
13
13
|
"binaryPath": "../<%= appFileName %>/ios/build/Build/Products/Release-iphonesimulator/<%= appClassName %>.app"
|
|
14
14
|
},
|
|
15
|
+
<% if (framework === 'expo') { %>
|
|
16
|
+
"ios.eas": {
|
|
17
|
+
"type": "ios.app",
|
|
18
|
+
"build": "<%= exec %> nx run <%= appFileName %>:download --platform ios --distribution simulator --output=<%= projectDirectory %>/<%= appFileName %>/dist/",
|
|
19
|
+
"binaryPath": "../<%= appFileName %>/dist/<%= appDisplayName %>.app"
|
|
20
|
+
},
|
|
21
|
+
"ios.local": {
|
|
22
|
+
"type": "ios.app",
|
|
23
|
+
"build": "<%= exec %> nx run <%= appFileName %>:build --platform ios --profile preview --wait --local --no-interactive --output=<%= projectDirectory %>/<%= appFileName %>/dist/",
|
|
24
|
+
"binaryPath": "../<%= appFileName %>/dist/<%= appDisplayName %>.app"
|
|
25
|
+
},
|
|
26
|
+
<% } %>
|
|
15
27
|
"android.debug": {
|
|
16
28
|
"type": "android.apk",
|
|
17
29
|
"build": "cd ../<%= appFileName %>/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug",
|
|
@@ -21,7 +33,19 @@
|
|
|
21
33
|
"type": "android.apk",
|
|
22
34
|
"build": "cd ../<%= appFileName %>/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release",
|
|
23
35
|
"binaryPath": "../<%= appFileName %>/android/app/build/outputs/apk/release/app-release.apk"
|
|
24
|
-
}
|
|
36
|
+
},
|
|
37
|
+
<% if (framework === 'expo') { %>
|
|
38
|
+
"android.eas": {
|
|
39
|
+
"type": "ios.app",
|
|
40
|
+
"build": "<%= exec %> nx run <%= appFileName %>:download --platform android --output=<%= projectDirectory %>/<%= appFileName %>/dist/",
|
|
41
|
+
"binaryPath": "../<%= appFileName %>/dist/<%= appDisplayName %>.apk"
|
|
42
|
+
},
|
|
43
|
+
"android.local": {
|
|
44
|
+
"type": "ios.app",
|
|
45
|
+
"build": "<%= exec %> nx run <%= appFileName %>:build --platform android --profile preview --wait --local --no-interactive --output=<%= projectDirectory %>/<%= appFileName %>/dist/",
|
|
46
|
+
"binaryPath": "../<%= appFileName %>/dist/<%= appDisplayName %>.apk"
|
|
47
|
+
},
|
|
48
|
+
<% } %>
|
|
25
49
|
},
|
|
26
50
|
"devices": {
|
|
27
51
|
"simulator": {
|
|
@@ -46,6 +70,16 @@
|
|
|
46
70
|
"device": "simulator",
|
|
47
71
|
"app": "ios.debug"
|
|
48
72
|
},
|
|
73
|
+
<% if (framework === 'expo') { %>
|
|
74
|
+
"ios.sim.eas": {
|
|
75
|
+
"device": "simulator",
|
|
76
|
+
"app": "ios.eas"
|
|
77
|
+
},
|
|
78
|
+
"ios.sim.local": {
|
|
79
|
+
"device": "simulator",
|
|
80
|
+
"app": "ios.local"
|
|
81
|
+
},
|
|
82
|
+
<% } %>
|
|
49
83
|
"android.emu.release": {
|
|
50
84
|
"device": "emulator",
|
|
51
85
|
"app": "android.release"
|
|
@@ -53,6 +87,16 @@
|
|
|
53
87
|
"android.emu.debug": {
|
|
54
88
|
"device": "emulator",
|
|
55
89
|
"app": "android.debug"
|
|
56
|
-
}
|
|
90
|
+
},
|
|
91
|
+
<% if (framework === 'expo') { %>
|
|
92
|
+
"android.sim.eas": {
|
|
93
|
+
"device": "simulator",
|
|
94
|
+
"app": "android.eas"
|
|
95
|
+
},
|
|
96
|
+
"android.sim.local": {
|
|
97
|
+
"device": "simulator",
|
|
98
|
+
"app": "android.local"
|
|
99
|
+
},
|
|
100
|
+
<% } %>
|
|
57
101
|
}
|
|
58
102
|
}
|
|
@@ -25,7 +25,7 @@ function addLinting(host, options) {
|
|
|
25
25
|
}
|
|
26
26
|
const reactEslintJson = (0, react_1.createReactEslintJson)(options.projectRoot, options.setParserOptionsProject);
|
|
27
27
|
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), () => reactEslintJson);
|
|
28
|
-
const installTask =
|
|
28
|
+
const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, react_1.extraEslintDependencies.dependencies, react_1.extraEslintDependencies.devDependencies);
|
|
29
29
|
return (0, run_tasks_in_serial_1.runTasksInSerial)(lintTask, installTask);
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":";;;;AAAA,2FAAqF;AACrF,yCAA4D;AAC5D,yCAKsB;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,WAAW;YAC5B,aAAa,EAAE;gBACb,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC;aAC5D;YACD,kBAAkB,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,uBAAuB,CAAC;YACnE,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,KAAK,eAAM,CAAC,MAAM,EAAE;YACpC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,eAAe,GAAG,IAAA,6BAAqB,EAC3C,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,uBAAuB,CAChC,CAAC;QAEF,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,EACxD,GAAG,EAAE,CAAC,eAAe,CACtB,CAAC;QAEF,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":";;;;AAAA,2FAAqF;AACrF,yCAA4D;AAC5D,yCAKsB;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,WAAW;YAC5B,aAAa,EAAE;gBACb,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC;aAC5D;YACD,kBAAkB,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,uBAAuB,CAAC;YACnE,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,KAAK,eAAM,CAAC,MAAM,EAAE;YACpC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,eAAe,GAAG,IAAA,6BAAqB,EAC3C,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,uBAAuB,CAChC,CAAC;QAEF,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,EACxD,GAAG,EAAE,CAAC,eAAe,CACtB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,qCAA4B,EAC9C,IAAI,EACJ,+BAAuB,CAAC,YAAY,EACpC,+BAAuB,CAAC,eAAe,CACxC,CAAC;QAEF,OAAO,IAAA,sCAAgB,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC;CAAA;AArCD,gCAqCC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addProject = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const get_targets_1 = require("./get-targets");
|
|
5
6
|
function addProject(host, options) {
|
|
6
7
|
(0, devkit_1.addProjectConfiguration)(host, options.projectName, {
|
|
7
8
|
root: options.projectRoot,
|
|
@@ -14,55 +15,19 @@ function addProject(host, options) {
|
|
|
14
15
|
}
|
|
15
16
|
exports.addProject = addProject;
|
|
16
17
|
function getTargets(options) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: {
|
|
32
|
-
detoxConfiguration: 'ios.sim.debug',
|
|
33
|
-
buildTarget: `${options.name}:build-ios`,
|
|
34
|
-
},
|
|
35
|
-
configurations: {
|
|
36
|
-
production: {
|
|
37
|
-
detoxConfiguration: 'ios.sim.release',
|
|
38
|
-
buildTarget: `${options.name}:build-ios:prod`,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
architect['build-android'] = {
|
|
43
|
-
executor: '@nrwl/detox:build',
|
|
44
|
-
options: {
|
|
45
|
-
detoxConfiguration: 'android.emu.debug',
|
|
46
|
-
},
|
|
47
|
-
configurations: {
|
|
48
|
-
production: {
|
|
49
|
-
detoxConfiguration: 'android.emu.release',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
architect['test-android'] = {
|
|
54
|
-
executor: '@nrwl/detox:test',
|
|
55
|
-
options: {
|
|
56
|
-
detoxConfiguration: 'android.emu.debug',
|
|
57
|
-
buildTarget: `${options.name}:build-android`,
|
|
58
|
-
},
|
|
59
|
-
configurations: {
|
|
60
|
-
production: {
|
|
61
|
-
detoxConfiguration: 'android.emu.release',
|
|
62
|
-
buildTarget: `${options.name}:build-android:prod`,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
return architect;
|
|
18
|
+
const targets = {};
|
|
19
|
+
targets['build-ios'] = Object.assign({ executor: '@nrwl/detox:build' }, (options.framework === 'react-native'
|
|
20
|
+
? (0, get_targets_1.reactNativeBuildTarget)('ios')
|
|
21
|
+
: (0, get_targets_1.expoBuildTarget)('ios')));
|
|
22
|
+
targets['test-ios'] = Object.assign({ executor: '@nrwl/detox:test' }, (options.framework === 'react-native'
|
|
23
|
+
? (0, get_targets_1.reactNativeTestTarget)('ios', options.name)
|
|
24
|
+
: (0, get_targets_1.expoTestTarget)('ios', options.name)));
|
|
25
|
+
targets['build-android'] = Object.assign({ executor: '@nrwl/detox:build' }, (options.framework === 'react-native'
|
|
26
|
+
? (0, get_targets_1.reactNativeBuildTarget)('android')
|
|
27
|
+
: (0, get_targets_1.expoBuildTarget)('android')));
|
|
28
|
+
targets['test-android'] = Object.assign({ executor: '@nrwl/detox:test' }, (options.framework === 'react-native'
|
|
29
|
+
? (0, get_targets_1.reactNativeTestTarget)('android', options.name)
|
|
30
|
+
: (0, get_targets_1.expoTestTarget)('android', options.name)));
|
|
31
|
+
return targets;
|
|
67
32
|
}
|
|
68
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;
|
|
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,g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,OAAO,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,IAAA,mCAAqB,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC;QAChD,CAAC,CAAC,IAAA,4BAAc,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAC7C,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -5,7 +5,7 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
5
5
|
const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
|
|
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.projectRoot, Object.assign(Object.assign({}, options), { offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.projectRoot), rootTsConfigPath: (0, typescript_1.getRelativePathToRootTsConfig)(host, options.projectRoot) }));
|
|
8
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.projectRoot, Object.assign(Object.assign({}, options), { exec: (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(host.root)).exec, offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.projectRoot), rootTsConfigPath: (0, typescript_1.getRelativePathToRootTsConfig)(host, options.projectRoot) }));
|
|
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,
|
|
1
|
+
{"version":3,"file":"create-files.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/create-files.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AACtB,yEAAyF;AACzF,+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,WAAW,kCACnE,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,WAAW,CAAC,EACnD,gBAAgB,EAAE,IAAA,0CAA6B,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,IAC1E,CAAC;IACH,IAAI,OAAO,CAAC,EAAE,EAAE;QACd,IAAA,aAAI,EAAC,IAAI,CAAC,CAAC;KACZ;AACH,CAAC;AAVD,kCAUC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare function reactNativeBuildTarget(platform: 'ios' | 'android'): {
|
|
2
|
+
options: {
|
|
3
|
+
detoxConfiguration: string;
|
|
4
|
+
};
|
|
5
|
+
configurations: {
|
|
6
|
+
production: {
|
|
7
|
+
detoxConfiguration: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function expoBuildTarget(platform: string): {
|
|
12
|
+
options: {
|
|
13
|
+
detoxConfiguration: string;
|
|
14
|
+
};
|
|
15
|
+
configurations: {
|
|
16
|
+
local: {
|
|
17
|
+
detoxConfiguration: string;
|
|
18
|
+
};
|
|
19
|
+
bare: {
|
|
20
|
+
detoxConfiguration: string;
|
|
21
|
+
};
|
|
22
|
+
production: {
|
|
23
|
+
detoxConfiguration: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare function reactNativeTestTarget(platform: string, name: string): {
|
|
28
|
+
options: {
|
|
29
|
+
detoxConfiguration: string;
|
|
30
|
+
buildTarget: string;
|
|
31
|
+
};
|
|
32
|
+
configurations: {
|
|
33
|
+
production: {
|
|
34
|
+
detoxConfiguration: string;
|
|
35
|
+
buildTarget: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare function expoTestTarget(platform: string, name: string): {
|
|
40
|
+
options: {
|
|
41
|
+
detoxConfiguration: string;
|
|
42
|
+
buildTarget: string;
|
|
43
|
+
};
|
|
44
|
+
configurations: {
|
|
45
|
+
local: {
|
|
46
|
+
detoxConfiguration: string;
|
|
47
|
+
buildTarget: string;
|
|
48
|
+
};
|
|
49
|
+
bare: {
|
|
50
|
+
detoxConfiguration: string;
|
|
51
|
+
buildTarget: string;
|
|
52
|
+
};
|
|
53
|
+
production: {
|
|
54
|
+
detoxConfiguration: string;
|
|
55
|
+
buildTarget: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expoTestTarget = exports.reactNativeTestTarget = exports.expoBuildTarget = exports.reactNativeBuildTarget = void 0;
|
|
4
|
+
function reactNativeBuildTarget(platform) {
|
|
5
|
+
return {
|
|
6
|
+
options: {
|
|
7
|
+
detoxConfiguration: `${platform}.sim.debug`,
|
|
8
|
+
},
|
|
9
|
+
configurations: {
|
|
10
|
+
production: {
|
|
11
|
+
detoxConfiguration: `${platform}.sim.release`,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.reactNativeBuildTarget = reactNativeBuildTarget;
|
|
17
|
+
function expoBuildTarget(platform) {
|
|
18
|
+
return {
|
|
19
|
+
options: {
|
|
20
|
+
detoxConfiguration: `${platform}.sim.debug`,
|
|
21
|
+
},
|
|
22
|
+
configurations: {
|
|
23
|
+
local: {
|
|
24
|
+
detoxConfiguration: `${platform}.sim.local`,
|
|
25
|
+
},
|
|
26
|
+
bare: {
|
|
27
|
+
detoxConfiguration: `${platform}.sim.debug`,
|
|
28
|
+
},
|
|
29
|
+
production: {
|
|
30
|
+
detoxConfiguration: `${platform}.sim.release`,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.expoBuildTarget = expoBuildTarget;
|
|
36
|
+
function reactNativeTestTarget(platform, name) {
|
|
37
|
+
return {
|
|
38
|
+
options: {
|
|
39
|
+
detoxConfiguration: `${platform}.sim.debug`,
|
|
40
|
+
buildTarget: `${name}:build-ios`,
|
|
41
|
+
},
|
|
42
|
+
configurations: {
|
|
43
|
+
production: {
|
|
44
|
+
detoxConfiguration: `${platform}.sim.release`,
|
|
45
|
+
buildTarget: `${name}:build-ios:production`,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.reactNativeTestTarget = reactNativeTestTarget;
|
|
51
|
+
function expoTestTarget(platform, name) {
|
|
52
|
+
return {
|
|
53
|
+
options: {
|
|
54
|
+
detoxConfiguration: `${platform}.sim.eas`,
|
|
55
|
+
buildTarget: `${name}:build-ios`,
|
|
56
|
+
},
|
|
57
|
+
configurations: {
|
|
58
|
+
local: {
|
|
59
|
+
detoxConfiguration: `${platform}.sim.local`,
|
|
60
|
+
buildTarget: `${name}:build-ios:local`,
|
|
61
|
+
},
|
|
62
|
+
bare: {
|
|
63
|
+
detoxConfiguration: `${platform}.sim.debug`,
|
|
64
|
+
buildTarget: `${name}:build-ios:bare`,
|
|
65
|
+
},
|
|
66
|
+
production: {
|
|
67
|
+
detoxConfiguration: `${platform}.sim.release`,
|
|
68
|
+
buildTarget: `${name}:build-ios:production`,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
exports.expoTestTarget = expoTestTarget;
|
|
74
|
+
//# sourceMappingURL=get-targets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-targets.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/get-targets.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sB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C,WAAW,EAAE,GAAG,IAAI,iBAAiB;aACtC;YACD,UAAU,EAAE;gBACV,kBAAkB,EAAE,GAAG,QAAQ,cAAc;gBAC7C,WAAW,EAAE,GAAG,IAAI,uBAAuB;aAC5C;SACF;KACF,CAAC;AACJ,CAAC;AArBD,wCAqBC"}
|
|
@@ -15,12 +15,16 @@ function normalizeOptions(host, options) {
|
|
|
15
15
|
? (0, devkit_1.names)(options.directory).fileName
|
|
16
16
|
: '';
|
|
17
17
|
const projectName = (directoryFileName ? `${directoryFileName}-${fileName}` : fileName).replace(new RegExp('/', 'g'), '-');
|
|
18
|
-
const
|
|
19
|
-
? (0, devkit_1.joinPathFragments)(appsDir, directoryFileName
|
|
20
|
-
:
|
|
18
|
+
const projectDirectory = directoryFileName
|
|
19
|
+
? (0, devkit_1.joinPathFragments)(appsDir, directoryFileName)
|
|
20
|
+
: appsDir;
|
|
21
|
+
const projectRoot = (0, devkit_1.joinPathFragments)(projectDirectory, fileName);
|
|
21
22
|
const { fileName: appFileName, className: appClassName } = (0, devkit_1.names)(options.project);
|
|
22
23
|
return Object.assign(Object.assign({}, options), { appFileName,
|
|
23
|
-
appClassName,
|
|
24
|
+
appClassName, appDisplayName: options.displayName
|
|
25
|
+
? (0, devkit_1.names)(options.displayName).className
|
|
26
|
+
: appClassName, name: fileName, projectName,
|
|
27
|
+
projectDirectory,
|
|
24
28
|
projectRoot });
|
|
25
29
|
}
|
|
26
30
|
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/detox/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAYtB;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV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"framework": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "App framework to test",
|
|
27
|
+
"enum": ["react-native", "expo"],
|
|
28
|
+
"x-prompt": "What app framework should detox test?"
|
|
29
|
+
},
|
|
24
30
|
"directory": {
|
|
25
31
|
"type": "string",
|
|
26
32
|
"description": "A directory where the project is placed."
|
|
@@ -47,5 +53,5 @@
|
|
|
47
53
|
"default": false
|
|
48
54
|
}
|
|
49
55
|
},
|
|
50
|
-
"required": ["name", "project"]
|
|
56
|
+
"required": ["name", "project", "framework"]
|
|
51
57
|
}
|