@nx/react-native 18.2.2 → 18.3.0-beta.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "18.
|
|
40
|
-
"@nx/jest": "18.
|
|
41
|
-
"@nx/js": "18.
|
|
42
|
-
"@nx/eslint": "18.
|
|
43
|
-
"@nx/react": "18.
|
|
44
|
-
"@nx/workspace": "18.
|
|
45
|
-
"@nrwl/react-native": "18.
|
|
39
|
+
"@nx/devkit": "18.3.0-beta.0",
|
|
40
|
+
"@nx/jest": "18.3.0-beta.0",
|
|
41
|
+
"@nx/js": "18.3.0-beta.0",
|
|
42
|
+
"@nx/eslint": "18.3.0-beta.0",
|
|
43
|
+
"@nx/react": "18.3.0-beta.0",
|
|
44
|
+
"@nx/workspace": "18.3.0-beta.0",
|
|
45
|
+
"@nrwl/react-native": "18.3.0-beta.0"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
|
@@ -13,5 +13,8 @@ export interface NormalizedSchema extends Schema {
|
|
|
13
13
|
rootProject: boolean;
|
|
14
14
|
e2eProjectName: string;
|
|
15
15
|
e2eProjectRoot: string;
|
|
16
|
+
e2eWebServerAddress: string;
|
|
17
|
+
e2eWebServerTarget: string;
|
|
18
|
+
e2ePort: number;
|
|
16
19
|
}
|
|
17
20
|
export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
|
|
@@ -20,8 +20,28 @@ async function normalizeOptions(host, options) {
|
|
|
20
20
|
const iosProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'ios');
|
|
21
21
|
const androidProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'android');
|
|
22
22
|
const rootProject = appProjectRoot === '.';
|
|
23
|
+
let e2eWebServerTarget = 'start';
|
|
24
|
+
if (options.addPlugin) {
|
|
25
|
+
if (nxJson.plugins) {
|
|
26
|
+
for (const plugin of nxJson.plugins) {
|
|
27
|
+
if (options.bundler === 'vite' &&
|
|
28
|
+
typeof plugin === 'object' &&
|
|
29
|
+
plugin.plugin === '@nx/react-native/plugin' &&
|
|
30
|
+
plugin.options.startTargetName) {
|
|
31
|
+
e2eWebServerTarget = plugin.options
|
|
32
|
+
.startTargetName;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
let e2ePort = 4200;
|
|
38
|
+
if (nxJson.targetDefaults?.[e2eWebServerTarget] &&
|
|
39
|
+
nxJson.targetDefaults?.[e2eWebServerTarget].options?.port) {
|
|
40
|
+
e2ePort = nxJson.targetDefaults?.[e2eWebServerTarget].options?.port;
|
|
41
|
+
}
|
|
23
42
|
const e2eProjectName = rootProject ? 'e2e' : `${fileName}-e2e`;
|
|
24
43
|
const e2eProjectRoot = rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
|
|
44
|
+
const e2eWebServerAddress = `http://localhost:${e2ePort}`;
|
|
25
45
|
const parsedTags = options.tags
|
|
26
46
|
? options.tags.split(',').map((s) => s.trim())
|
|
27
47
|
: [];
|
|
@@ -42,6 +62,9 @@ async function normalizeOptions(host, options) {
|
|
|
42
62
|
rootProject,
|
|
43
63
|
e2eProjectName,
|
|
44
64
|
e2eProjectRoot,
|
|
65
|
+
e2eWebServerAddress,
|
|
66
|
+
e2eWebServerTarget,
|
|
67
|
+
e2ePort,
|
|
45
68
|
};
|
|
46
69
|
}
|
|
47
70
|
exports.normalizeOptions = normalizeOptions;
|
|
@@ -44,6 +44,9 @@ describe('Normalize Options', () => {
|
|
|
44
44
|
rootProject: false,
|
|
45
45
|
e2eProjectName: 'my-app-e2e',
|
|
46
46
|
e2eProjectRoot: 'my-app-e2e',
|
|
47
|
+
e2ePort: 4200,
|
|
48
|
+
e2eWebServerAddress: 'http://localhost:4200',
|
|
49
|
+
e2eWebServerTarget: 'start',
|
|
47
50
|
});
|
|
48
51
|
});
|
|
49
52
|
|
|
@@ -80,6 +83,9 @@ describe('Normalize Options', () => {
|
|
|
80
83
|
rootProject: false,
|
|
81
84
|
e2eProjectName: 'my-app-e2e',
|
|
82
85
|
e2eProjectRoot: 'myApp-e2e',
|
|
86
|
+
e2ePort: 4200,
|
|
87
|
+
e2eWebServerAddress: 'http://localhost:4200',
|
|
88
|
+
e2eWebServerTarget: 'start',
|
|
83
89
|
});
|
|
84
90
|
});
|
|
85
91
|
|
|
@@ -118,6 +124,9 @@ describe('Normalize Options', () => {
|
|
|
118
124
|
rootProject: false,
|
|
119
125
|
e2eProjectName: 'my-app-e2e',
|
|
120
126
|
e2eProjectRoot: 'directory/my-app-e2e',
|
|
127
|
+
e2ePort: 4200,
|
|
128
|
+
e2eWebServerAddress: 'http://localhost:4200',
|
|
129
|
+
e2eWebServerTarget: 'start',
|
|
121
130
|
});
|
|
122
131
|
});
|
|
123
132
|
|
|
@@ -154,6 +163,9 @@ describe('Normalize Options', () => {
|
|
|
154
163
|
rootProject: false,
|
|
155
164
|
e2eProjectName: 'directory/my-app-e2e',
|
|
156
165
|
e2eProjectRoot: 'directory/my-app-e2e',
|
|
166
|
+
e2ePort: 4200,
|
|
167
|
+
e2eWebServerAddress: 'http://localhost:4200',
|
|
168
|
+
e2eWebServerTarget: 'start',
|
|
157
169
|
});
|
|
158
170
|
});
|
|
159
171
|
|
|
@@ -191,6 +203,9 @@ describe('Normalize Options', () => {
|
|
|
191
203
|
rootProject: false,
|
|
192
204
|
e2eProjectName: 'my-app-e2e',
|
|
193
205
|
e2eProjectRoot: 'my-app-e2e',
|
|
206
|
+
e2ePort: 4200,
|
|
207
|
+
e2eWebServerAddress: 'http://localhost:4200',
|
|
208
|
+
e2eWebServerTarget: 'start',
|
|
194
209
|
});
|
|
195
210
|
});
|
|
196
211
|
});
|