@azure/create-microsoft-playwright-testing 1.0.0-beta.1 → 1.0.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 +8 -0
- package/dist/commonjs/bin/init.d.ts.map +1 -0
- package/dist/{bin → commonjs/bin}/init.js +6 -6
- package/dist/commonjs/bin/init.js.map +1 -0
- package/dist/{constants.d.ts → commonjs/constants.d.ts} +1 -1
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/{index.d.ts.map → commonjs/index.d.ts.map} +1 -1
- package/dist/{index.js → commonjs/index.js} +4 -5
- package/dist/commonjs/index.js.map +1 -0
- package/dist/{initialize.d.ts → commonjs/initialize.d.ts} +1 -1
- package/dist/commonjs/initialize.d.ts.map +1 -0
- package/dist/{initialize.js → commonjs/initialize.js} +15 -15
- package/dist/commonjs/initialize.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/{packageManager.d.ts → commonjs/packageManager.d.ts} +1 -1
- package/dist/commonjs/packageManager.d.ts.map +1 -0
- package/dist/{packageManager.js → commonjs/packageManager.js} +4 -4
- package/dist/commonjs/packageManager.js.map +1 -0
- package/dist/commonjs/types.d.ts.map +1 -0
- package/dist/commonjs/types.js.map +1 -0
- package/dist/{utils.d.ts → commonjs/utils.d.ts} +1 -1
- package/dist/commonjs/utils.d.ts.map +1 -0
- package/dist/{utils.js → commonjs/utils.js} +20 -20
- package/dist/commonjs/utils.js.map +1 -0
- package/dist/esm/bin/init.d.ts +2 -0
- package/dist/esm/bin/init.d.ts.map +1 -0
- package/dist/esm/bin/init.js +19 -0
- package/dist/esm/bin/init.js.map +1 -0
- package/dist/esm/constants.d.ts +19 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +20 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/initialize.d.ts +16 -0
- package/dist/esm/initialize.d.ts.map +1 -0
- package/dist/esm/initialize.js +114 -0
- package/dist/esm/initialize.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/packageManager.d.ts +17 -0
- package/dist/esm/packageManager.d.ts.map +1 -0
- package/dist/esm/packageManager.js +49 -0
- package/dist/esm/packageManager.js.map +1 -0
- package/dist/esm/types.d.ts +17 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +4 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.d.ts +8 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +92 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +47 -26
- package/dist/bin/init.d.ts.map +0 -1
- package/dist/bin/init.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initialize.d.ts.map +0 -1
- package/dist/initialize.js.map +0 -1
- package/dist/packageManager.d.ts.map +0 -1
- package/dist/packageManager.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
- /package/dist/{bin → commonjs/bin}/init.d.ts +0 -0
- /package/dist/{constants.js → commonjs/constants.js} +0 -0
- /package/dist/{index.d.ts → commonjs/index.d.ts} +0 -0
- /package/dist/{types.d.ts → commonjs/types.d.ts} +0 -0
- /package/dist/{types.js → commonjs/types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.2 (2024-11-19)
|
|
4
|
+
|
|
5
|
+
This release improves compatibility with modern JavaScript environments by migrating the package to ECMAScript modules and Vitest
|
|
6
|
+
|
|
7
|
+
### Other Changes
|
|
8
|
+
|
|
9
|
+
-Migrated package to ECMAScript modules and vitest.
|
|
10
|
+
|
|
3
11
|
## 1.0.0-beta.1 (2024-09-09)
|
|
4
12
|
|
|
5
13
|
### Features Added
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/bin/init.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAAa,OAAO,CAAC,IAAI,CAkBzC,CAAC"}
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.init = void 0;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const initialize_js_1 = require("../initialize.js");
|
|
7
|
+
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const init = async () => {
|
|
9
|
-
const options = (0,
|
|
9
|
+
const options = (0, utils_js_1.parseCLIArguments)();
|
|
10
10
|
const { config: playwrightConfigFile } = options;
|
|
11
11
|
let playwrightServiceInitConfig;
|
|
12
12
|
if (playwrightConfigFile) {
|
|
13
|
-
playwrightServiceInitConfig = Object.assign({}, (0,
|
|
13
|
+
playwrightServiceInitConfig = Object.assign({}, (0, utils_js_1.getLanguageAndConfigInfoFromConfigurationFile)(playwrightConfigFile));
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
playwrightServiceInitConfig = Object.assign({}, (0,
|
|
16
|
+
playwrightServiceInitConfig = Object.assign({}, (0, utils_js_1.getLanguageAndConfigInfoFromDirectory)());
|
|
17
17
|
}
|
|
18
18
|
console.log("");
|
|
19
|
-
const playwrightServiceInitialize = new
|
|
19
|
+
const playwrightServiceInitialize = new initialize_js_1.PlaywrightServiceInitialize(playwrightServiceInitConfig);
|
|
20
20
|
await playwrightServiceInitialize.addServiceSupportToTestSuite();
|
|
21
21
|
};
|
|
22
22
|
exports.init = init;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/bin/init.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,oDAA+D;AAC/D,0CAIqB;AAEd,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IAC5C,MAAM,OAAO,GAAG,IAAA,4BAAiB,GAAE,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;IACjD,IAAI,2BAAwD,CAAC;IAE7D,IAAI,oBAAoB,EAAE,CAAC;QACzB,2BAA2B,qBACtB,IAAA,wDAA6C,EAAC,oBAAoB,CAAC,CACvE,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,2BAA2B,qBACtB,IAAA,gDAAqC,GAAE,CAC3C,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,2BAA2B,GAAG,IAAI,2CAA2B,CAAC,2BAA2B,CAAC,CAAC;IACjG,MAAM,2BAA2B,CAAC,4BAA4B,EAAE,CAAC;AACnE,CAAC,CAAC;AAlBW,QAAA,IAAI,QAkBf","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PlaywrightServiceInitConfig } from \"../types.js\";\nimport { PlaywrightServiceInitialize } from \"../initialize.js\";\nimport {\n getLanguageAndConfigInfoFromConfigurationFile,\n getLanguageAndConfigInfoFromDirectory,\n parseCLIArguments,\n} from \"../utils.js\";\n\nexport const init = async (): Promise<void> => {\n const options = parseCLIArguments();\n const { config: playwrightConfigFile } = options;\n let playwrightServiceInitConfig: PlaywrightServiceInitConfig;\n\n if (playwrightConfigFile) {\n playwrightServiceInitConfig = {\n ...getLanguageAndConfigInfoFromConfigurationFile(playwrightConfigFile),\n };\n } else {\n playwrightServiceInitConfig = {\n ...getLanguageAndConfigInfoFromDirectory(),\n };\n }\n\n console.log(\"\");\n const playwrightServiceInitialize = new PlaywrightServiceInitialize(playwrightServiceInitConfig);\n await playwrightServiceInitialize.addServiceSupportToTestSuite();\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,SAAS;gBACQ,QAAQ;gBACR,QAAQ;CACrC,CAAC;AAEF,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAIzB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAMpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIrB,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,YAAwB;IACpC,UAAU,EAAE,YAAwB;CACrC,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,2BAA2B,EACzB,2IAA2I;IAC7I,8BAA8B,EAAE,4DAA4D;CAC7F,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,oBAAoB,EAClB,+FAA+F;IACjG,6BAA6B,EAC3B,yJAAyJ;IAC3J,0BAA0B,EAAE,oCAAoC;CACjE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Language } from \"./types.js\";\n\nexport const Languages = {\n TypeScript: \"TypeScript\" as Language,\n JavaScript: \"JavaScript\" as Language,\n};\n\nexport const Extensions = {\n TypeScript: \".ts\",\n JavaScript: \".js\",\n};\n\nexport const ErrorMessages = {\n NO_CONFIGURATION_FILE_FOUND:\n \"Could not find a playwright configuration file in the current directory. Please use --config parameter to specify the configuration file.\",\n UNSUPPORTED_CONFIGURATION_FILE: \"The playwright configuration file passed is not supported.\",\n};\n\nexport const Messages = {\n CAN_OVERRIDE_MESSAGE:\n \"There's already a playwright service configuration file present. Do you want to overwrite it?\",\n CONFIRMATION_FOR_EXIT_MESSAGE:\n \"You won't be able to install and setup up the service without overwriting the existing configuration file. Do you still want to exit the setup process?\",\n SETUP_PROCESS_EXIT_MESSAGE: \"Exiting the service setup process.\",\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"use strict";
|
|
4
3
|
// Copyright (c) Microsoft Corporation.
|
|
5
4
|
// Licensed under the MIT License.
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
6
|
+
const init_js_1 = require("./bin/init.js");
|
|
8
7
|
(async () => {
|
|
9
|
-
await (0,
|
|
8
|
+
await (0, init_js_1.init)();
|
|
10
9
|
})().catch((err) => {
|
|
11
10
|
console.error(err);
|
|
12
11
|
process.exit(1);
|
|
13
12
|
});
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAEA,uCAAuC;AACvC,kCAAkC;;AAElC,2CAAqC;AAErC,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,IAAA,cAAI,GAAE,CAAC;AACf,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { init } from \"./bin/init.js\";\n\n(async () => {\n await init();\n})().catch((err) => {\n console.error(err);\n process.exit(1);\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/initialize.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAmBpB,qBAAa,2BAA2B;IACtC,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,eAAe,CAAiB;gBAE5B,WAAW,EAAE,2BAA2B;IAK7C,4BAA4B,QAAa,OAAO,CAAC,IAAI,CAAC,CAM3D;IAEF,OAAO,CAAC,8BAA8B,CAUpC;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,iCAAiC,CAEvC;IAEF,OAAO,CAAC,4BAA4B,CAkBlC;IAEF,OAAO,CAAC,qBAAqB,CAM3B;IAEF,OAAO,CAAC,mBAAmB,CAKzB;IAEF,OAAO,CAAC,uBAAuB,CA2C7B;IAEF,OAAO,CAAC,wBAAwB,CAE9B;CACH"}
|
|
@@ -5,21 +5,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.PlaywrightServiceInitialize = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const prompts_1 = tslib_1.__importDefault(require("prompts"));
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
9
|
+
const constants_js_1 = require("./constants.js");
|
|
10
|
+
const utils_js_1 = require("./utils.js");
|
|
11
|
+
const packageManager_js_1 = require("./packageManager.js");
|
|
12
12
|
const questions = [
|
|
13
13
|
{
|
|
14
14
|
type: "confirm",
|
|
15
15
|
name: "canOverride",
|
|
16
|
-
message:
|
|
16
|
+
message: constants_js_1.Messages.CAN_OVERRIDE_MESSAGE,
|
|
17
17
|
initial: true,
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
type: (prev) => (prev ? null : "confirm"),
|
|
21
21
|
name: "confirmationForExit",
|
|
22
|
-
message:
|
|
22
|
+
message: constants_js_1.Messages.CONFIRMATION_FOR_EXIT_MESSAGE,
|
|
23
23
|
initial: true,
|
|
24
24
|
},
|
|
25
25
|
];
|
|
@@ -43,15 +43,14 @@ class PlaywrightServiceInitialize {
|
|
|
43
43
|
return true;
|
|
44
44
|
if (!response.confirmationForExit)
|
|
45
45
|
return this.checkIfServiceConfigCanBeAdded();
|
|
46
|
-
console.log(`\n${
|
|
46
|
+
console.log(`\n${constants_js_1.Messages.SETUP_PROCESS_EXIT_MESSAGE}`);
|
|
47
47
|
return false;
|
|
48
48
|
};
|
|
49
49
|
this.promptOnCancel = () => {
|
|
50
|
-
// eslint-disable-next-line n/no-process-exit
|
|
51
50
|
process.exit(0);
|
|
52
51
|
};
|
|
53
52
|
this.isServiceConfigFileAlreadyPresent = () => {
|
|
54
|
-
return
|
|
53
|
+
return node_fs_1.default.existsSync(this.getServiceConfigFileName());
|
|
55
54
|
};
|
|
56
55
|
this.displayAdditionalInformation = () => {
|
|
57
56
|
const runCommandParallelWorkers = this._packageManager.runCommand("playwright", `test -c ${this.getServiceConfigFileName()} --workers=20`);
|
|
@@ -65,16 +64,16 @@ class PlaywrightServiceInitialize {
|
|
|
65
64
|
this.installServicePackage = async () => {
|
|
66
65
|
const command = this._packageManager.installDevDependencyCommand("@azure/microsoft-playwright-testing");
|
|
67
66
|
console.log(`Installing Service package (${command})`);
|
|
68
|
-
await (0,
|
|
67
|
+
await (0, utils_js_1.executeCommand)(command);
|
|
69
68
|
};
|
|
70
69
|
this.createServiceConfig = async () => {
|
|
71
70
|
const serviceConfigFile = this.getServiceConfigFileName();
|
|
72
71
|
const serviceConfigFileContent = this.getServiceConfigContent();
|
|
73
|
-
await
|
|
72
|
+
await node_fs_1.default.promises.writeFile(serviceConfigFile, serviceConfigFileContent);
|
|
74
73
|
console.log(`Success! Created service configuration file - ${serviceConfigFile}`);
|
|
75
74
|
};
|
|
76
75
|
this.getServiceConfigContent = () => {
|
|
77
|
-
const customerConfigFileName = (0,
|
|
76
|
+
const customerConfigFileName = (0, utils_js_1.getFileReferenceForImport)(this._setupConfig.playwrightConfigFile);
|
|
78
77
|
const importCommandTypeScript = `import { defineConfig } from '@playwright/test';
|
|
79
78
|
import { getServiceConfig, ServiceOS } from '@azure/microsoft-playwright-testing';
|
|
80
79
|
import config from '${customerConfigFileName}';
|
|
@@ -83,7 +82,7 @@ import config from '${customerConfigFileName}';
|
|
|
83
82
|
const { getServiceConfig, ServiceOS } = require('@azure/microsoft-playwright-testing');
|
|
84
83
|
const config = require('${customerConfigFileName}');
|
|
85
84
|
`;
|
|
86
|
-
const importCommand = this._setupConfig.projectLanguage ===
|
|
85
|
+
const importCommand = this._setupConfig.projectLanguage === constants_js_1.Languages.TypeScript
|
|
87
86
|
? importCommandTypeScript
|
|
88
87
|
: importCommandJavaScript;
|
|
89
88
|
const content = importCommand +
|
|
@@ -95,6 +94,7 @@ export default defineConfig(
|
|
|
95
94
|
exposeNetwork: '<loopback>',
|
|
96
95
|
timeout: 30000,
|
|
97
96
|
os: ServiceOS.LINUX,
|
|
97
|
+
useCloudHostedBrowsers: true // Set to false if you want to only use reporting and not cloud hosted browsers
|
|
98
98
|
}),
|
|
99
99
|
{
|
|
100
100
|
/*
|
|
@@ -109,10 +109,10 @@ export default defineConfig(
|
|
|
109
109
|
return content;
|
|
110
110
|
};
|
|
111
111
|
this.getServiceConfigFileName = () => {
|
|
112
|
-
return "playwright.service.config" +
|
|
112
|
+
return "playwright.service.config" + constants_js_1.Extensions[this._setupConfig.projectLanguage];
|
|
113
113
|
};
|
|
114
114
|
this._setupConfig = setupConfig;
|
|
115
|
-
this._packageManager = (0,
|
|
115
|
+
this._packageManager = (0, packageManager_js_1.getPackageManager)();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
exports.PlaywrightServiceInitialize = PlaywrightServiceInitialize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.js","sourceRoot":"","sources":["../../src/initialize.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAGlC,8DAA8B;AAC9B,8DAAyB;AACzB,iDAAiE;AAMjE,yCAAuE;AACvE,2DAAwD;AAExD,MAAM,SAAS,GAAmB;IAChC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,uBAAQ,CAAC,oBAAoB;QACtC,OAAO,EAAE,IAAI;KACd;IACD;QACE,IAAI,EAAE,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAClD,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,uBAAQ,CAAC,6BAA6B;QAC/C,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,MAAa,2BAA2B;IAItC,YAAY,WAAwC;QAK7C,iCAA4B,GAAG,KAAK,IAAmB,EAAE;YAC9D,MAAM,mCAAmC,GAAG,MAAM,IAAI,CAAC,8BAA8B,EAAE,CAAC,CAAC,uEAAuE;YAChK,IAAI,CAAC,mCAAmC;gBAAE,OAAO;YACjD,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,2BAA2B;YAC/D,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,6BAA6B;YAC/D,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC,iCAAiC;QACxE,CAAC,CAAC;QAEM,mCAA8B,GAAG,KAAK,IAAsB,EAAE;YACpE,IAAI,CAAC,IAAI,CAAC,iCAAiC,EAAE;gBAAE,OAAO,IAAI,CAAC;YAC3D,MAAM,QAAQ,GAAG,CAAC,MAAM,iBAAO,CAAC,MAAM,CAA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} from \"prompts\";\nimport prompts from \"prompts\";\nimport fs from \"node:fs\";\nimport { Extensions, Languages, Messages } from \"./constants.js\";\nimport type {\n OverridePromptResponse,\n PackageManager,\n PlaywrightServiceInitConfig,\n} from \"./types.js\";\nimport { executeCommand, getFileReferenceForImport } from \"./utils.js\";\nimport { getPackageManager } from \"./packageManager.js\";\n\nconst questions: PromptObject[] = [\n {\n type: \"confirm\",\n name: \"canOverride\",\n message: Messages.CAN_OVERRIDE_MESSAGE,\n initial: true,\n },\n {\n type: (prev: boolean) => (prev ? null : \"confirm\"),\n name: \"confirmationForExit\",\n message: Messages.CONFIRMATION_FOR_EXIT_MESSAGE,\n initial: true,\n },\n];\n\nexport class PlaywrightServiceInitialize {\n private _setupConfig: PlaywrightServiceInitConfig;\n private _packageManager: PackageManager;\n\n constructor(setupConfig: PlaywrightServiceInitConfig) {\n this._setupConfig = setupConfig;\n this._packageManager = getPackageManager();\n }\n\n public addServiceSupportToTestSuite = async (): Promise<void> => {\n const canProceedWithServiceInitialization = await this.checkIfServiceConfigCanBeAdded(); // if service config already present, ask user for overwrite permission\n if (!canProceedWithServiceInitialization) return;\n await this.installServicePackage(); // install service packages\n await this.createServiceConfig(); // create service config file\n this.displayAdditionalInformation(); // display additional information\n };\n\n private checkIfServiceConfigCanBeAdded = async (): Promise<boolean> => {\n if (!this.isServiceConfigFileAlreadyPresent()) return true;\n const response = (await prompts.prompt(questions, {\n onCancel: this.promptOnCancel,\n })) as OverridePromptResponse;\n if (response.canOverride) return true;\n if (!response.confirmationForExit) return this.checkIfServiceConfigCanBeAdded();\n\n console.log(`\\n${Messages.SETUP_PROCESS_EXIT_MESSAGE}`);\n return false;\n };\n\n private promptOnCancel = (): never => {\n process.exit(0);\n };\n\n private isServiceConfigFileAlreadyPresent = (): boolean => {\n return fs.existsSync(this.getServiceConfigFileName());\n };\n\n private displayAdditionalInformation = (): void => {\n const runCommandParallelWorkers = this._packageManager.runCommand(\n \"playwright\",\n `test -c ${this.getServiceConfigFileName()} --workers=20`,\n );\n\n console.log(`\\n\\nTo run playwrights tests using Playwright Service\\n`);\n console.log(`\\t${runCommandParallelWorkers}\\n`);\n\n console.log(\"\\nPlaywright Service Portal - https://playwright.microsoft.com/\");\n console.log(\"Getting Started - https://aka.ms/mpt/quickstart\\n\");\n\n console.log(\n \"If you're already using the Microsoft Playwright Testing service, please review the quickstart guide [https://aka.ms/mpt/quickstart] to ensure your tests continue running smoothly.\",\n );\n console.log(\n \"We've introduced changes related to authentication. You'll need to update the new config file to align with these changes.\",\n );\n };\n\n private installServicePackage = async (): Promise<void> => {\n const command = this._packageManager.installDevDependencyCommand(\n \"@azure/microsoft-playwright-testing\",\n );\n console.log(`Installing Service package (${command})`);\n await executeCommand(command);\n };\n\n private createServiceConfig = async (): Promise<void> => {\n const serviceConfigFile = this.getServiceConfigFileName();\n const serviceConfigFileContent = this.getServiceConfigContent();\n await fs.promises.writeFile(serviceConfigFile, serviceConfigFileContent);\n console.log(`Success! Created service configuration file - ${serviceConfigFile}`);\n };\n\n private getServiceConfigContent = (): string => {\n const customerConfigFileName = getFileReferenceForImport(\n this._setupConfig.playwrightConfigFile,\n );\n\n const importCommandTypeScript = `import { defineConfig } from '@playwright/test';\nimport { getServiceConfig, ServiceOS } from '@azure/microsoft-playwright-testing';\nimport config from '${customerConfigFileName}';\n`;\n\n const importCommandJavaScript = `const { defineConfig } = require('@playwright/test');\nconst { getServiceConfig, ServiceOS } = require('@azure/microsoft-playwright-testing');\nconst config = require('${customerConfigFileName}');\n`;\n\n const importCommand =\n this._setupConfig.projectLanguage === Languages.TypeScript\n ? importCommandTypeScript\n : importCommandJavaScript;\n\n const content =\n importCommand +\n `\n/* Learn more about service configuration at https://aka.ms/mpt/config */\nexport default defineConfig(\n config,\n getServiceConfig(config, {\n exposeNetwork: '<loopback>',\n timeout: 30000,\n os: ServiceOS.LINUX,\n useCloudHostedBrowsers: true // Set to false if you want to only use reporting and not cloud hosted browsers\n }),\n {\n /* \n Playwright Testing service reporter is added by default.\n This will override any reporter options specified in the base playwright config.\n If you are using more reporters, please update your configuration accordingly.\n */\n reporter: [['list'], ['@azure/microsoft-playwright-testing/reporter']],\n }\n);\n`;\n return content;\n };\n\n private getServiceConfigFileName = (): string => {\n return \"playwright.service.config\" + Extensions[this._setupConfig.projectLanguage];\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageManager.d.ts","sourceRoot":"","sources":["../../src/packageManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qBAAa,GAAI,YAAW,cAAc;IACxC,2BAA2B,gBAAiB,MAAM,KAAG,MAAM,CAEzD;IACF,UAAU,YAAa,MAAM,QAAQ,MAAM,KAAG,MAAM,CAElD;CACH;AAED,qBAAa,IAAK,YAAW,cAAc;IACzC,OAAO,CAAC,YAAY,CAAkB;;IAMtC,2BAA2B,gBAAiB,MAAM,KAAG,MAAM,CAEzD;IACF,UAAU,YAAa,MAAM,QAAQ,MAAM,KAAG,MAAM,CAElD;CACH;AAED,qBAAa,IAAK,YAAW,cAAc;IACzC,2BAA2B,gBAAiB,MAAM,KAAG,MAAM,CAEzD;IACF,UAAU,YAAa,MAAM,QAAQ,MAAM,KAAG,MAAM,CAElD;CACH;AAGD,eAAO,MAAM,iBAAiB,QAAO,cAOpC,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.getPackageManager = exports.Yarn = exports.PNPM = exports.NPM = void 0;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_process_1 = require("node:process");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
9
|
class NPM {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.installDevDependencyCommand = (packageName) => {
|
|
@@ -26,7 +26,7 @@ class PNPM {
|
|
|
26
26
|
this.runCommand = (command, args) => {
|
|
27
27
|
return `pnpm ${command} ${args}`;
|
|
28
28
|
};
|
|
29
|
-
this.useWorkspace = (0,
|
|
29
|
+
this.useWorkspace = (0, node_fs_1.existsSync)((0, node_path_1.resolve)((0, node_process_1.cwd)(), "pnpm-workspace.yaml"));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.PNPM = PNPM;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageManager.js","sourceRoot":"","sources":["../../src/packageManager.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,qCAAqC;AAErC,+CAAmC;AACnC,yCAAoC;AAEpC,MAAa,GAAG;IAAhB;QACE,gCAA2B,GAAG,CAAC,WAAmB,EAAU,EAAE;YAC5D,OAAO,0BAA0B,WAAW,EAAE,CAAC;QACjD,CAAC,CAAC;QACF,eAAU,GAAG,CAAC,OAAe,EAAE,IAAY,EAAU,EAAE;YACrD,OAAO,OAAO,OAAO,IAAI,IAAI,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;CAAA;AAPD,kBAOC;AAED,MAAa,IAAI;IAGf;QAFQ,iBAAY,GAAY,KAAK,CAAC;QAMtC,gCAA2B,GAAG,CAAC,WAAmB,EAAU,EAAE;YAC5D,OAAO,uBAAuB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC;QAC/E,CAAC,CAAC;QACF,eAAU,GAAG,CAAC,OAAe,EAAE,IAAY,EAAU,EAAE;YACrD,OAAO,QAAQ,OAAO,IAAI,IAAI,EAAE,CAAC;QACnC,CAAC,CAAC;QARA,IAAI,CAAC,YAAY,GAAG,IAAA,oBAAU,EAAC,IAAA,mBAAO,EAAC,IAAA,kBAAG,GAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxE,CAAC;CAQF;AAbD,oBAaC;AAED,MAAa,IAAI;IAAjB;QACE,gCAA2B,GAAG,CAAC,WAAmB,EAAU,EAAE;YAC5D,OAAO,kBAAkB,WAAW,EAAE,CAAC;QACzC,CAAC,CAAC;QACF,eAAU,GAAG,CAAC,OAAe,EAAE,IAAY,EAAU,EAAE;YACrD,OAAO,QAAQ,OAAO,IAAI,IAAI,EAAE,CAAC;QACnC,CAAC,CAAC;IACJ,CAAC;CAAA;AAPD,oBAOC;AAED,8HAA8H;AACvH,MAAM,iBAAiB,GAAG,GAAmB,EAAE;IACpD,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACvD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,IAAI,EAAE,CAAC;QAClD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,IAAI,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,GAAG,EAAE,CAAC;AACnB,CAAC,CAAC;AAPW,QAAA,iBAAiB,qBAO5B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { existsSync } from \"node:fs\";\nimport type { PackageManager } from \"./types.js\";\nimport { cwd } from \"node:process\";\nimport { resolve } from \"node:path\";\n\nexport class NPM implements PackageManager {\n installDevDependencyCommand = (packageName: string): string => {\n return `npm install --save-dev ${packageName}`;\n };\n runCommand = (command: string, args: string): string => {\n return `npx ${command} ${args}`;\n };\n}\n\nexport class PNPM implements PackageManager {\n private useWorkspace: boolean = false;\n\n constructor() {\n this.useWorkspace = existsSync(resolve(cwd(), \"pnpm-workspace.yaml\"));\n }\n\n installDevDependencyCommand = (packageName: string): string => {\n return `pnpm add --save-dev ${this.useWorkspace ? \"-w \" : \"\"}${packageName}`;\n };\n runCommand = (command: string, args: string): string => {\n return `pnpm ${command} ${args}`;\n };\n}\n\nexport class Yarn implements PackageManager {\n installDevDependencyCommand = (packageName: string): string => {\n return `yarn add --dev ${packageName}`;\n };\n runCommand = (command: string, args: string): string => {\n return `yarn ${command} ${args}`;\n };\n}\n\n// https://stackoverflow.com/questions/68133683/is-there-a-cross-platform-way-to-get-the-name-of-the-parent-process-in-node-js\nexport const getPackageManager = (): PackageManager => {\n if (process.env[\"npm_config_user_agent\"]) {\n const userAgent = process.env[\"npm_config_user_agent\"];\n if (userAgent.includes(\"yarn\")) return new Yarn();\n if (userAgent.includes(\"pnpm\")) return new PNPM();\n }\n return new NPM();\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,YAAY,CAAC;AAEnD,MAAM,MAAM,2BAA2B,GAAG;IACxC,eAAe,EAAE,QAAQ,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,2BAA2B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7D,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type Language = \"TypeScript\" | \"JavaScript\";\n\nexport type PlaywrightServiceInitConfig = {\n projectLanguage: Language;\n playwrightConfigFile: string;\n};\n\nexport type CLIArguments = {\n config: string;\n};\n\nexport type OverridePromptResponse = {\n canOverride: boolean;\n confirmationForExit: boolean;\n};\n\nexport type PackageManager = {\n installDevDependencyCommand: (packageName: string) => string;\n runCommand: (command: string, args: string) => string;\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLIArguments, PlaywrightServiceInitConfig } from "./types";
|
|
1
|
+
import type { CLIArguments, PlaywrightServiceInitConfig } from "./types.js";
|
|
2
2
|
export declare const executeCommand: (command: string) => Promise<string>;
|
|
3
3
|
export declare const getLanguageAndConfigInfoFromDirectory: () => PlaywrightServiceInitConfig;
|
|
4
4
|
export declare const getLanguageAndConfigInfoFromConfigurationFile: (playwrightConfigFile: string) => PlaywrightServiceInitConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAG5E,eAAO,MAAM,cAAc,YAAa,MAAM,KAAG,OAAO,CAAC,MAAM,CAU9D,CAAC;AAEF,eAAO,MAAM,qCAAqC,QAAO,2BAcxD,CAAC;AAEF,eAAO,MAAM,6CAA6C,yBAClC,MAAM,KAC3B,2BAaF,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAAc,MAAM,KAAG,MAW5D,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,MAUjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,YAcpC,CAAC"}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.parseCLIArguments = exports.showHelpForCLI = exports.getFileReferenceForImport = exports.getLanguageAndConfigInfoFromConfigurationFile = exports.getLanguageAndConfigInfoFromDirectory = exports.executeCommand = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
9
|
+
const node_path_1 = tslib_1.__importStar(require("node:path"));
|
|
10
|
+
const constants_js_1 = require("./constants.js");
|
|
11
11
|
const executeCommand = (command) => {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
|
-
(0,
|
|
13
|
+
(0, node_child_process_1.exec)(command, (error, stdout, _) => {
|
|
14
14
|
if (error) {
|
|
15
15
|
reject(error);
|
|
16
16
|
}
|
|
@@ -22,46 +22,46 @@ const executeCommand = (command) => {
|
|
|
22
22
|
};
|
|
23
23
|
exports.executeCommand = executeCommand;
|
|
24
24
|
const getLanguageAndConfigInfoFromDirectory = () => {
|
|
25
|
-
if (
|
|
25
|
+
if (node_fs_1.default.existsSync("playwright.config.js")) {
|
|
26
26
|
return {
|
|
27
27
|
playwrightConfigFile: "playwright.config.js",
|
|
28
|
-
projectLanguage:
|
|
28
|
+
projectLanguage: constants_js_1.Languages.JavaScript,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
else if (
|
|
31
|
+
else if (node_fs_1.default.existsSync("playwright.config.ts")) {
|
|
32
32
|
return {
|
|
33
33
|
playwrightConfigFile: "playwright.config.ts",
|
|
34
|
-
projectLanguage:
|
|
34
|
+
projectLanguage: constants_js_1.Languages.TypeScript,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
throw new Error(
|
|
38
|
+
throw new Error(constants_js_1.ErrorMessages.NO_CONFIGURATION_FILE_FOUND);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
exports.getLanguageAndConfigInfoFromDirectory = getLanguageAndConfigInfoFromDirectory;
|
|
42
42
|
const getLanguageAndConfigInfoFromConfigurationFile = (playwrightConfigFile) => {
|
|
43
|
-
const extension = (0,
|
|
44
|
-
if (extension ===
|
|
43
|
+
const extension = (0, node_path_1.extname)(playwrightConfigFile);
|
|
44
|
+
if (extension === constants_js_1.Extensions.TypeScript) {
|
|
45
45
|
return {
|
|
46
46
|
playwrightConfigFile,
|
|
47
|
-
projectLanguage:
|
|
47
|
+
projectLanguage: constants_js_1.Languages.TypeScript,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
else if (extension ===
|
|
50
|
+
else if (extension === constants_js_1.Extensions.JavaScript) {
|
|
51
51
|
return {
|
|
52
52
|
playwrightConfigFile,
|
|
53
|
-
projectLanguage:
|
|
53
|
+
projectLanguage: constants_js_1.Languages.JavaScript,
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
else
|
|
57
|
-
throw new Error(
|
|
57
|
+
throw new Error(constants_js_1.ErrorMessages.UNSUPPORTED_CONFIGURATION_FILE);
|
|
58
58
|
};
|
|
59
59
|
exports.getLanguageAndConfigInfoFromConfigurationFile = getLanguageAndConfigInfoFromConfigurationFile;
|
|
60
60
|
const getFileReferenceForImport = (filePath) => {
|
|
61
|
-
const normalizedPath = filePath.split(
|
|
62
|
-
const parsedPath =
|
|
63
|
-
const withoutExtension =
|
|
64
|
-
if (
|
|
61
|
+
const normalizedPath = filePath.split(node_path_1.default.sep).join("/");
|
|
62
|
+
const parsedPath = node_path_1.default.parse(normalizedPath);
|
|
63
|
+
const withoutExtension = node_path_1.default.posix.join(parsedPath.dir, parsedPath.name);
|
|
64
|
+
if (node_path_1.default.isAbsolute(filePath)) {
|
|
65
65
|
return withoutExtension;
|
|
66
66
|
}
|
|
67
67
|
if (!withoutExtension.startsWith("./") && !withoutExtension.startsWith("../")) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,2DAA0C;AAC1C,8DAAyB;AACzB,+DAA0C;AAE1C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,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;YAC/C,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,IAAA,sBAAc,GAAE,CAAC,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAdW,QAAA,iBAAiB,qBAc5B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { exec } from \"node:child_process\";\nimport fs from \"node:fs\";\nimport path, { extname } from \"node:path\";\nimport type { CLIArguments, PlaywrightServiceInitConfig } from \"./types.js\";\nimport { ErrorMessages, Extensions, Languages } from \"./constants.js\";\n\nexport const executeCommand = (command: string): Promise<string> => {\n return new Promise<string>((resolve, reject) => {\n exec(command, (error, stdout, _) => {\n if (error) {\n reject(error);\n } else {\n resolve(stdout);\n }\n });\n });\n};\n\nexport const getLanguageAndConfigInfoFromDirectory = (): PlaywrightServiceInitConfig => {\n if (fs.existsSync(\"playwright.config.js\")) {\n return {\n playwrightConfigFile: \"playwright.config.js\",\n projectLanguage: Languages.JavaScript,\n };\n } else if (fs.existsSync(\"playwright.config.ts\")) {\n return {\n playwrightConfigFile: \"playwright.config.ts\",\n projectLanguage: Languages.TypeScript,\n };\n } else {\n throw new Error(ErrorMessages.NO_CONFIGURATION_FILE_FOUND);\n }\n};\n\nexport const getLanguageAndConfigInfoFromConfigurationFile = (\n playwrightConfigFile: string,\n): PlaywrightServiceInitConfig => {\n const extension = extname(playwrightConfigFile);\n if (extension === Extensions.TypeScript) {\n return {\n playwrightConfigFile,\n projectLanguage: Languages.TypeScript,\n };\n } else if (extension === Extensions.JavaScript) {\n return {\n playwrightConfigFile,\n projectLanguage: Languages.JavaScript,\n };\n } else throw new Error(ErrorMessages.UNSUPPORTED_CONFIGURATION_FILE);\n};\n\nexport const getFileReferenceForImport = (filePath: string): string => {\n const normalizedPath = filePath.split(path.sep).join(\"/\");\n const parsedPath = path.parse(normalizedPath);\n const withoutExtension = path.posix.join(parsedPath.dir, parsedPath.name);\n if (path.isAbsolute(filePath)) {\n return withoutExtension;\n }\n if (!withoutExtension.startsWith(\"./\") && !withoutExtension.startsWith(\"../\")) {\n return `./${withoutExtension}`;\n }\n return withoutExtension;\n};\n\nexport const showHelpForCLI = (): string => {\n return `\nUsage: index [options]\n\nplaywright configuration file\n\nOptions:\n -c, --config <config>\n -h, --help display help for command\n`;\n};\n\nexport const parseCLIArguments = (): CLIArguments => {\n const args = process.argv.slice(2);\n const cliArguments: CLIArguments = {\n config: \"\",\n };\n for (let i = 0; i < args.length; i++) {\n if (args[i] === \"-c\" || args[i] === \"--config\") {\n cliArguments.config = args[i + 1];\n } else if (args[i] === \"-h\" || args[i] === \"--help\") {\n console.log(showHelpForCLI());\n process.exit(0);\n }\n }\n return cliArguments;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/bin/init.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAAa,OAAO,CAAC,IAAI,CAkBzC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { PlaywrightServiceInitialize } from "../initialize.js";
|
|
4
|
+
import { getLanguageAndConfigInfoFromConfigurationFile, getLanguageAndConfigInfoFromDirectory, parseCLIArguments, } from "../utils.js";
|
|
5
|
+
export const init = async () => {
|
|
6
|
+
const options = parseCLIArguments();
|
|
7
|
+
const { config: playwrightConfigFile } = options;
|
|
8
|
+
let playwrightServiceInitConfig;
|
|
9
|
+
if (playwrightConfigFile) {
|
|
10
|
+
playwrightServiceInitConfig = Object.assign({}, getLanguageAndConfigInfoFromConfigurationFile(playwrightConfigFile));
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
playwrightServiceInitConfig = Object.assign({}, getLanguageAndConfigInfoFromDirectory());
|
|
14
|
+
}
|
|
15
|
+
console.log("");
|
|
16
|
+
const playwrightServiceInitialize = new PlaywrightServiceInitialize(playwrightServiceInitConfig);
|
|
17
|
+
await playwrightServiceInitialize.addServiceSupportToTestSuite();
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/bin/init.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,6CAA6C,EAC7C,qCAAqC,EACrC,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IAC5C,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;IACjD,IAAI,2BAAwD,CAAC;IAE7D,IAAI,oBAAoB,EAAE,CAAC;QACzB,2BAA2B,qBACtB,6CAA6C,CAAC,oBAAoB,CAAC,CACvE,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,2BAA2B,qBACtB,qCAAqC,EAAE,CAC3C,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,CAAC;IACjG,MAAM,2BAA2B,CAAC,4BAA4B,EAAE,CAAC;AACnE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PlaywrightServiceInitConfig } from \"../types.js\";\nimport { PlaywrightServiceInitialize } from \"../initialize.js\";\nimport {\n getLanguageAndConfigInfoFromConfigurationFile,\n getLanguageAndConfigInfoFromDirectory,\n parseCLIArguments,\n} from \"../utils.js\";\n\nexport const init = async (): Promise<void> => {\n const options = parseCLIArguments();\n const { config: playwrightConfigFile } = options;\n let playwrightServiceInitConfig: PlaywrightServiceInitConfig;\n\n if (playwrightConfigFile) {\n playwrightServiceInitConfig = {\n ...getLanguageAndConfigInfoFromConfigurationFile(playwrightConfigFile),\n };\n } else {\n playwrightServiceInitConfig = {\n ...getLanguageAndConfigInfoFromDirectory(),\n };\n }\n\n console.log(\"\");\n const playwrightServiceInitialize = new PlaywrightServiceInitialize(playwrightServiceInitConfig);\n await playwrightServiceInitialize.addServiceSupportToTestSuite();\n};\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Language } from "./types.js";
|
|
2
|
+
export declare const Languages: {
|
|
3
|
+
TypeScript: Language;
|
|
4
|
+
JavaScript: Language;
|
|
5
|
+
};
|
|
6
|
+
export declare const Extensions: {
|
|
7
|
+
TypeScript: string;
|
|
8
|
+
JavaScript: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const ErrorMessages: {
|
|
11
|
+
NO_CONFIGURATION_FILE_FOUND: string;
|
|
12
|
+
UNSUPPORTED_CONFIGURATION_FILE: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const Messages: {
|
|
15
|
+
CAN_OVERRIDE_MESSAGE: string;
|
|
16
|
+
CONFIRMATION_FOR_EXIT_MESSAGE: string;
|
|
17
|
+
SETUP_PROCESS_EXIT_MESSAGE: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,SAAS;gBACQ,QAAQ;gBACR,QAAQ;CACrC,CAAC;AAEF,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAIzB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAMpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export const Languages = {
|
|
4
|
+
TypeScript: "TypeScript",
|
|
5
|
+
JavaScript: "JavaScript",
|
|
6
|
+
};
|
|
7
|
+
export const Extensions = {
|
|
8
|
+
TypeScript: ".ts",
|
|
9
|
+
JavaScript: ".js",
|
|
10
|
+
};
|
|
11
|
+
export const ErrorMessages = {
|
|
12
|
+
NO_CONFIGURATION_FILE_FOUND: "Could not find a playwright configuration file in the current directory. Please use --config parameter to specify the configuration file.",
|
|
13
|
+
UNSUPPORTED_CONFIGURATION_FILE: "The playwright configuration file passed is not supported.",
|
|
14
|
+
};
|
|
15
|
+
export const Messages = {
|
|
16
|
+
CAN_OVERRIDE_MESSAGE: "There's already a playwright service configuration file present. Do you want to overwrite it?",
|
|
17
|
+
CONFIRMATION_FOR_EXIT_MESSAGE: "You won't be able to install and setup up the service without overwriting the existing configuration file. Do you still want to exit the setup process?",
|
|
18
|
+
SETUP_PROCESS_EXIT_MESSAGE: "Exiting the service setup process.",
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU,EAAE,YAAwB;IACpC,UAAU,EAAE,YAAwB;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,2BAA2B,EACzB,2IAA2I;IAC7I,8BAA8B,EAAE,4DAA4D;CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,oBAAoB,EAClB,+FAA+F;IACjG,6BAA6B,EAC3B,yJAAyJ;IAC3J,0BAA0B,EAAE,oCAAoC;CACjE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Language } from \"./types.js\";\n\nexport const Languages = {\n TypeScript: \"TypeScript\" as Language,\n JavaScript: \"JavaScript\" as Language,\n};\n\nexport const Extensions = {\n TypeScript: \".ts\",\n JavaScript: \".js\",\n};\n\nexport const ErrorMessages = {\n NO_CONFIGURATION_FILE_FOUND:\n \"Could not find a playwright configuration file in the current directory. Please use --config parameter to specify the configuration file.\",\n UNSUPPORTED_CONFIGURATION_FILE: \"The playwright configuration file passed is not supported.\",\n};\n\nexport const Messages = {\n CAN_OVERRIDE_MESSAGE:\n \"There's already a playwright service configuration file present. Do you want to overwrite it?\",\n CONFIRMATION_FOR_EXIT_MESSAGE:\n \"You won't be able to install and setup up the service without overwriting the existing configuration file. Do you still want to exit the setup process?\",\n SETUP_PROCESS_EXIT_MESSAGE: \"Exiting the service setup process.\",\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
import { init } from "./bin/init.js";
|
|
5
|
+
(async () => {
|
|
6
|
+
await init();
|
|
7
|
+
})().catch((err) => {
|
|
8
|
+
console.error(err);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,IAAI,EAAE,CAAC;AACf,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { init } from \"./bin/init.js\";\n\n(async () => {\n await init();\n})().catch((err) => {\n console.error(err);\n process.exit(1);\n});\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PlaywrightServiceInitConfig } from "./types.js";
|
|
2
|
+
export declare class PlaywrightServiceInitialize {
|
|
3
|
+
private _setupConfig;
|
|
4
|
+
private _packageManager;
|
|
5
|
+
constructor(setupConfig: PlaywrightServiceInitConfig);
|
|
6
|
+
addServiceSupportToTestSuite: () => Promise<void>;
|
|
7
|
+
private checkIfServiceConfigCanBeAdded;
|
|
8
|
+
private promptOnCancel;
|
|
9
|
+
private isServiceConfigFileAlreadyPresent;
|
|
10
|
+
private displayAdditionalInformation;
|
|
11
|
+
private installServicePackage;
|
|
12
|
+
private createServiceConfig;
|
|
13
|
+
private getServiceConfigContent;
|
|
14
|
+
private getServiceConfigFileName;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/initialize.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAmBpB,qBAAa,2BAA2B;IACtC,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,eAAe,CAAiB;gBAE5B,WAAW,EAAE,2BAA2B;IAK7C,4BAA4B,QAAa,OAAO,CAAC,IAAI,CAAC,CAM3D;IAEF,OAAO,CAAC,8BAA8B,CAUpC;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,iCAAiC,CAEvC;IAEF,OAAO,CAAC,4BAA4B,CAkBlC;IAEF,OAAO,CAAC,qBAAqB,CAM3B;IAEF,OAAO,CAAC,mBAAmB,CAKzB;IAEF,OAAO,CAAC,uBAAuB,CA2C7B;IAEF,OAAO,CAAC,wBAAwB,CAE9B;CACH"}
|