@nx/playwright 20.3.2 → 20.3.4
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/playwright",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"homepage": "https://nx.dev",
|
|
6
6
|
"private": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
38
|
-
"@nx/devkit": "20.3.
|
|
39
|
-
"@nx/eslint": "20.3.
|
|
40
|
-
"@nx/webpack": "20.3.
|
|
41
|
-
"@nx/vite": "20.3.
|
|
42
|
-
"@nx/js": "20.3.
|
|
38
|
+
"@nx/devkit": "20.3.4",
|
|
39
|
+
"@nx/eslint": "20.3.4",
|
|
40
|
+
"@nx/webpack": "20.3.4",
|
|
41
|
+
"@nx/vite": "20.3.4",
|
|
42
|
+
"@nx/js": "20.3.4",
|
|
43
43
|
"tslib": "^2.3.0",
|
|
44
44
|
"minimatch": "9.0.3"
|
|
45
45
|
},
|
|
@@ -4,6 +4,7 @@ exports.configurationGenerator = configurationGenerator;
|
|
|
4
4
|
exports.configurationGeneratorInternal = configurationGeneratorInternal;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
7
|
+
const prompt_1 = require("@nx/devkit/src/generators/prompt");
|
|
7
8
|
const js_1 = require("@nx/js");
|
|
8
9
|
const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
|
|
9
10
|
const package_manager_workspaces_1 = require("@nx/js/src/utils/package-manager-workspaces");
|
|
@@ -141,6 +142,11 @@ async function normalizeOptions(tree, options) {
|
|
|
141
142
|
(process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
142
143
|
nxJson.useInferencePlugins !== false);
|
|
143
144
|
const linter = await (0, generator_prompts_1.normalizeLinterOption)(tree, options.linter);
|
|
145
|
+
if (!options.webServerCommand || !options.webServerAddress) {
|
|
146
|
+
const { webServerCommand, webServerAddress } = await promptForMissingServeData(options.project);
|
|
147
|
+
options.webServerCommand = webServerCommand;
|
|
148
|
+
options.webServerAddress = webServerAddress;
|
|
149
|
+
}
|
|
144
150
|
return {
|
|
145
151
|
...options,
|
|
146
152
|
addPlugin,
|
|
@@ -148,6 +154,29 @@ async function normalizeOptions(tree, options) {
|
|
|
148
154
|
directory: options.directory ?? 'e2e',
|
|
149
155
|
};
|
|
150
156
|
}
|
|
157
|
+
async function promptForMissingServeData(projectName) {
|
|
158
|
+
const { command, port } = await (0, prompt_1.promptWhenInteractive)([
|
|
159
|
+
{
|
|
160
|
+
type: 'input',
|
|
161
|
+
name: 'command',
|
|
162
|
+
message: 'What command should be run to serve the application locally?',
|
|
163
|
+
initial: `npx nx serve ${projectName}`,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'numeral',
|
|
167
|
+
name: 'port',
|
|
168
|
+
message: 'What port will the application be served on?',
|
|
169
|
+
initial: 3000,
|
|
170
|
+
},
|
|
171
|
+
], {
|
|
172
|
+
command: `npx nx serve ${projectName}`,
|
|
173
|
+
port: 3000,
|
|
174
|
+
});
|
|
175
|
+
return {
|
|
176
|
+
webServerCommand: command,
|
|
177
|
+
webServerAddress: `http://localhost:${port}`,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
151
180
|
function getBrowsersInstallTask() {
|
|
152
181
|
return () => {
|
|
153
182
|
devkit_1.output.log({
|