@playdrop/playdrop-cli 0.14.8 → 0.15.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.
Files changed (186) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/commands/agents.js +1 -1
  3. package/dist/commands/worker.js +2 -2
  4. package/node_modules/@playdrop/api-client/dist/client.d.ts +3 -1
  5. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  6. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +3 -1
  7. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  8. package/node_modules/@playdrop/api-client/dist/domains/admin.js +46 -2
  9. package/node_modules/@playdrop/config/client-meta.json +2 -2
  10. package/node_modules/@playdrop/types/dist/api.d.ts +96 -1
  11. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  12. package/node_modules/@playdrop/types/dist/api.js +17 -0
  13. package/node_modules/@playwright/mcp/LICENSE +201 -0
  14. package/node_modules/@playwright/mcp/README.md +1592 -0
  15. package/node_modules/@playwright/mcp/cli.js +32 -0
  16. package/node_modules/@playwright/mcp/config.d.ts +239 -0
  17. package/node_modules/@playwright/mcp/index.d.ts +23 -0
  18. package/node_modules/@playwright/mcp/index.js +19 -0
  19. package/node_modules/@playwright/mcp/node_modules/playwright/LICENSE +202 -0
  20. package/node_modules/@playwright/mcp/node_modules/playwright/NOTICE +5 -0
  21. package/node_modules/@playwright/mcp/node_modules/playwright/README.md +318 -0
  22. package/node_modules/@playwright/mcp/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  23. package/node_modules/@playwright/mcp/node_modules/playwright/cli.js +19 -0
  24. package/node_modules/@playwright/mcp/node_modules/playwright/index.d.ts +17 -0
  25. package/node_modules/@playwright/mcp/node_modules/playwright/index.js +17 -0
  26. package/node_modules/@playwright/mcp/node_modules/playwright/index.mjs +18 -0
  27. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.js +42 -0
  28. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.mjs +21 -0
  29. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/agentParser.js +89 -0
  30. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  31. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  32. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  33. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  34. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  35. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  36. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  37. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  38. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  39. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/reportActions.js +78 -0
  40. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/testActions.js +213 -0
  41. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js +2966 -0
  42. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js.txt +34 -0
  43. package/node_modules/@playwright/mcp/node_modules/playwright/lib/errorContext.js +129 -0
  44. package/node_modules/@playwright/mcp/node_modules/playwright/lib/globals.js +58 -0
  45. package/node_modules/@playwright/mcp/node_modules/playwright/lib/index.js +783 -0
  46. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js +260 -0
  47. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  48. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  49. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  50. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js +13480 -0
  51. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  52. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  53. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/browserBackend.js +125 -0
  54. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  55. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  56. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  57. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  58. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  59. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  60. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  61. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  62. package/node_modules/@playwright/mcp/node_modules/playwright/lib/package.js +47 -0
  63. package/node_modules/@playwright/mcp/node_modules/playwright/lib/program.js +237 -0
  64. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js +8154 -0
  65. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js.txt +59 -0
  66. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js +72275 -0
  67. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  68. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
  69. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js +8060 -0
  70. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  71. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  72. package/node_modules/@playwright/mcp/node_modules/playwright/lib/util.js +373 -0
  73. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js +1850 -0
  74. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  75. package/node_modules/@playwright/mcp/node_modules/playwright/package.json +58 -0
  76. package/node_modules/@playwright/mcp/node_modules/playwright/test.d.ts +18 -0
  77. package/node_modules/@playwright/mcp/node_modules/playwright/test.js +24 -0
  78. package/node_modules/@playwright/mcp/node_modules/playwright/test.mjs +35 -0
  79. package/node_modules/@playwright/mcp/node_modules/playwright/types/test.d.ts +10709 -0
  80. package/node_modules/@playwright/mcp/node_modules/playwright/types/testReporter.d.ts +908 -0
  81. package/node_modules/@playwright/mcp/node_modules/playwright-core/LICENSE +202 -0
  82. package/node_modules/@playwright/mcp/node_modules/playwright-core/NOTICE +5 -0
  83. package/node_modules/@playwright/mcp/node_modules/playwright-core/README.md +3 -0
  84. package/node_modules/@playwright/mcp/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  85. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  86. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  87. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  88. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  89. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  90. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  91. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  92. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  93. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  94. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  95. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  96. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  97. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  98. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  99. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  100. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  101. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  102. package/node_modules/@playwright/mcp/node_modules/playwright-core/browsers.json +81 -0
  103. package/node_modules/@playwright/mcp/node_modules/playwright-core/cli.js +21 -0
  104. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.d.ts +17 -0
  105. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.js +17 -0
  106. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.mjs +28 -0
  107. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/bootstrap.js +88 -0
  108. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/coreBundle.js +74495 -0
  109. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  110. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  111. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  112. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  113. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/package.js +50 -0
  114. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  115. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/electron/loader.js +118 -0
  116. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js +7347 -0
  117. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +354 -0
  118. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  119. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
  120. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/help.json +707 -0
  121. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  122. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/output.js +343 -0
  123. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/program.js +404 -0
  124. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/registry.js +176 -0
  125. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/session.js +258 -0
  126. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md +420 -0
  127. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  128. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  129. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  130. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md +241 -0
  131. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md +225 -0
  132. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  133. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md +433 -0
  134. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md +139 -0
  135. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  136. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  137. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/trace/SKILL.md +171 -0
  138. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/extension.js +78 -0
  139. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  140. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  141. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +2179 -0
  142. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  143. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  144. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  145. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  146. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
  147. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
  148. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  149. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  150. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  151. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  152. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  153. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  154. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  155. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BVGIAA-i.js +32 -0
  156. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  157. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-BQ57a3QC.js +129 -0
  158. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
  159. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  160. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  161. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BSEO6m_i.js +32 -0
  162. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CT5oRh4X.js +181 -0
  163. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  164. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BN2nOuEV.js +7 -0
  165. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  166. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  167. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
  168. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  169. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.DLSGjmWZ.js +1 -0
  170. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  171. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  172. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  173. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  174. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  175. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  176. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
  177. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CZvydVOh.js +5 -0
  178. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  179. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  180. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/xdg-open +1267 -0
  181. package/node_modules/@playwright/mcp/node_modules/playwright-core/package.json +34 -0
  182. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/protocol.d.ts +24842 -0
  183. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/structs.d.ts +45 -0
  184. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/types.d.ts +26088 -0
  185. package/node_modules/@playwright/mcp/package.json +51 -0
  186. package/package.json +3 -1
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var reportActions_exports = {};
30
+ __export(reportActions_exports, {
31
+ mergeReports: () => mergeReports,
32
+ showReport: () => showReport
33
+ });
34
+ module.exports = __toCommonJS(reportActions_exports);
35
+ var import_fs = __toESM(require("fs"));
36
+ var import_path = __toESM(require("path"));
37
+ var import_common = require("../common");
38
+ var import_runner = require("../runner");
39
+ const { gracefullyProcessExitDoNotHang } = require("playwright-core/lib/coreBundle").utils;
40
+ async function showReport(report, host, port) {
41
+ await import_runner.html.showHTMLReport(report, host, port);
42
+ }
43
+ async function mergeReports(reportDir, opts) {
44
+ const configFile = opts.config;
45
+ const config = configFile ? await import_common.configLoader.loadConfigFromFile(configFile) : await import_common.configLoader.loadEmptyConfigForMergeReports();
46
+ const dir = import_path.default.resolve(process.cwd(), reportDir || "");
47
+ const dirStat = await import_fs.default.promises.stat(dir).catch((e) => null);
48
+ if (!dirStat)
49
+ throw new Error("Directory does not exist: " + dir);
50
+ if (!dirStat.isDirectory())
51
+ throw new Error(`"${dir}" is not a directory`);
52
+ let reporterDescriptions = resolveReporterOption(opts.reporter);
53
+ if (!reporterDescriptions && configFile)
54
+ reporterDescriptions = config.config.reporter;
55
+ if (!reporterDescriptions)
56
+ reporterDescriptions = [[import_common.config.defaultReporter]];
57
+ const rootDirOverride = configFile ? config.config.rootDir : void 0;
58
+ const result = await import_runner.merge.createMergedReport(config, dir, reporterDescriptions, rootDirOverride);
59
+ gracefullyProcessExitDoNotHang(result === "failed" ? 1 : 0);
60
+ }
61
+ function resolveReporterOption(reporter) {
62
+ if (!reporter || !reporter.length)
63
+ return void 0;
64
+ return reporter.split(",").map((r) => [resolveReporter(r)]);
65
+ }
66
+ function resolveReporter(id) {
67
+ if (import_common.builtInReporters.includes(id))
68
+ return id;
69
+ const localPath = import_path.default.resolve(process.cwd(), id);
70
+ if (import_fs.default.existsSync(localPath))
71
+ return localPath;
72
+ return require.resolve(id, { paths: [process.cwd()] });
73
+ }
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ mergeReports,
77
+ showReport
78
+ });
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var testActions_exports = {};
30
+ __export(testActions_exports, {
31
+ clearCache: () => clearCache,
32
+ runTestServerAction: () => runTestServerAction,
33
+ runTests: () => runTests
34
+ });
35
+ module.exports = __toCommonJS(testActions_exports);
36
+ var import_fs = __toESM(require("fs"));
37
+ var import_path = __toESM(require("path"));
38
+ var import_common = require("../common");
39
+ var import_runner = require("../runner");
40
+ const { gracefullyProcessExitDoNotHang } = require("playwright-core/lib/coreBundle").utils;
41
+ const { startProfiling, stopProfiling } = require("playwright-core/lib/coreBundle").utils;
42
+ async function runTests(args, opts) {
43
+ await startProfiling();
44
+ const cliOverrides = overridesFromOptions(opts);
45
+ cliOverrides.argv = process.argv;
46
+ const config = await import_common.configLoader.loadConfigFromFile(opts.config, cliOverrides, opts.deps === false);
47
+ const options = {
48
+ locations: args.length ? args : void 0,
49
+ grep: opts.grep,
50
+ grepInvert: opts.grepInvert,
51
+ onlyChanged: opts.onlyChanged === true ? "HEAD" : opts.onlyChanged,
52
+ listMode: !!opts.list,
53
+ projectFilter: opts.project || void 0,
54
+ passWithNoTests: !!opts.passWithNoTests,
55
+ lastFailed: !!opts.lastFailed,
56
+ lastFailedFile: opts.lastFailedFile,
57
+ testList: opts.testList ? import_path.default.resolve(process.cwd(), opts.testList) : void 0,
58
+ testListInvert: opts.testListInvert ? import_path.default.resolve(process.cwd(), opts.testListInvert) : void 0,
59
+ shardWeights: resolveShardWeightsOption()
60
+ };
61
+ import_runner.projectUtils.filterProjects(config.projects, options.projectFilter);
62
+ if (opts.ui || opts.uiHost || opts.uiPort) {
63
+ if (opts.onlyChanged)
64
+ throw new Error(`--only-changed is not supported in UI mode. If you'd like that to change, see https://github.com/microsoft/playwright/issues/15075 for more details.`);
65
+ const status2 = await import_runner.testServer.runUIMode(opts.config, cliOverrides, {
66
+ host: opts.uiHost,
67
+ port: opts.uiPort ? +opts.uiPort : void 0,
68
+ args,
69
+ grep: opts.grep,
70
+ grepInvert: opts.grepInvert,
71
+ project: opts.project || void 0,
72
+ reporter: Array.isArray(opts.reporter) ? opts.reporter : opts.reporter ? [opts.reporter] : void 0
73
+ });
74
+ await stopProfiling("runner");
75
+ const exitCode2 = status2 === "interrupted" ? 130 : status2 === "passed" ? 0 : 1;
76
+ gracefullyProcessExitDoNotHang(exitCode2);
77
+ return;
78
+ }
79
+ if (process.env.PWTEST_WATCH) {
80
+ if (opts.onlyChanged)
81
+ throw new Error(`--only-changed is not supported in watch mode. If you'd like that to change, file an issue and let us know about your usecase for it.`);
82
+ const status2 = await import_runner.watchMode.runWatchModeLoop(
83
+ import_common.configLoader.resolveConfigLocation(opts.config),
84
+ {
85
+ projects: opts.project,
86
+ files: args,
87
+ grep: opts.grep
88
+ }
89
+ );
90
+ await stopProfiling("runner");
91
+ const exitCode2 = status2 === "interrupted" ? 130 : status2 === "passed" ? 0 : 1;
92
+ gracefullyProcessExitDoNotHang(exitCode2);
93
+ return;
94
+ }
95
+ const status = await import_runner.testRunner.runAllTestsWithConfig(config, options);
96
+ await stopProfiling("runner");
97
+ const exitCode = status === "interrupted" ? 130 : status === "passed" ? 0 : 1;
98
+ gracefullyProcessExitDoNotHang(exitCode);
99
+ }
100
+ async function runTestServerAction(opts) {
101
+ const host = opts.host;
102
+ const port = opts.port ? +opts.port : void 0;
103
+ const status = await import_runner.testServer.runTestServer(opts.config, {}, { host, port });
104
+ const exitCode = status === "interrupted" ? 130 : status === "passed" ? 0 : 1;
105
+ gracefullyProcessExitDoNotHang(exitCode);
106
+ }
107
+ async function clearCache(opts) {
108
+ const runner = new import_runner.testRunner.TestRunner(import_common.configLoader.resolveConfigLocation(opts.config), {});
109
+ const { status } = await runner.clearCache(import_runner.runnerReporters.createErrorCollectingReporter(import_runner.base.terminalScreen));
110
+ const exitCode = status === "interrupted" ? 130 : status === "passed" ? 0 : 1;
111
+ gracefullyProcessExitDoNotHang(exitCode);
112
+ }
113
+ function overridesFromOptions(options) {
114
+ if (options.ui) {
115
+ options.debug = void 0;
116
+ options.trace = void 0;
117
+ }
118
+ const overrides = {
119
+ debug: options.debug,
120
+ failOnFlakyTests: options.failOnFlakyTests ? true : void 0,
121
+ forbidOnly: options.forbidOnly ? true : void 0,
122
+ fullyParallel: options.fullyParallel ? true : void 0,
123
+ globalTimeout: options.globalTimeout ? parseInt(options.globalTimeout, 10) : void 0,
124
+ maxFailures: options.x ? 1 : options.maxFailures ? parseInt(options.maxFailures, 10) : void 0,
125
+ outputDir: options.output ? import_path.default.resolve(process.cwd(), options.output) : void 0,
126
+ pause: !!process.env.PWPAUSE,
127
+ quiet: options.quiet ? options.quiet : void 0,
128
+ repeatEach: options.repeatEach ? parseInt(options.repeatEach, 10) : void 0,
129
+ retries: options.retries ? parseInt(options.retries, 10) : void 0,
130
+ reporter: resolveReporterOption(options.reporter),
131
+ shard: resolveShardOption(options.shard),
132
+ timeout: options.timeout ? parseInt(options.timeout, 10) : void 0,
133
+ tsconfig: options.tsconfig ? import_path.default.resolve(process.cwd(), options.tsconfig) : void 0,
134
+ ignoreSnapshots: options.ignoreSnapshots ? !!options.ignoreSnapshots : void 0,
135
+ updateSnapshots: options.updateSnapshots,
136
+ updateSourceMethod: options.updateSourceMethod,
137
+ use: {
138
+ trace: options.trace
139
+ },
140
+ workers: options.workers
141
+ };
142
+ if (options.browser) {
143
+ const browserOpt = options.browser.toLowerCase();
144
+ if (!["all", "chromium", "firefox", "webkit"].includes(browserOpt))
145
+ throw new Error(`Unsupported browser "${options.browser}", must be one of "all", "chromium", "firefox" or "webkit"`);
146
+ const browserNames = browserOpt === "all" ? ["chromium", "firefox", "webkit"] : [browserOpt];
147
+ overrides.projects = browserNames.map((browserName) => {
148
+ return {
149
+ name: browserName,
150
+ use: { browserName }
151
+ };
152
+ });
153
+ }
154
+ if (options.headed)
155
+ overrides.use.headless = false;
156
+ if (options.debug === "inspector") {
157
+ overrides.use.headless = false;
158
+ process.env.PWDEBUG = "1";
159
+ }
160
+ if (overrides.tsconfig && !import_fs.default.existsSync(overrides.tsconfig))
161
+ throw new Error(`--tsconfig "${options.tsconfig}" does not exist`);
162
+ return overrides;
163
+ }
164
+ function resolveReporterOption(reporter) {
165
+ if (!reporter || !reporter.length)
166
+ return void 0;
167
+ return reporter.split(",").map((r) => [resolveReporter(r)]);
168
+ }
169
+ function resolveShardOption(shard) {
170
+ if (!shard)
171
+ return void 0;
172
+ const shardPair = shard.split("/");
173
+ if (shardPair.length !== 2) {
174
+ throw new Error(
175
+ `--shard "${shard}", expected format is "current/all", 1-based, for example "3/5".`
176
+ );
177
+ }
178
+ const current = parseInt(shardPair[0], 10);
179
+ const total = parseInt(shardPair[1], 10);
180
+ if (isNaN(total) || total < 1)
181
+ throw new Error(`--shard "${shard}" total must be a positive number`);
182
+ if (isNaN(current) || current < 1 || current > total) {
183
+ throw new Error(
184
+ `--shard "${shard}" current must be a positive number, not greater than shard total`
185
+ );
186
+ }
187
+ return { current, total };
188
+ }
189
+ function resolveShardWeightsOption() {
190
+ const shardWeights = process.env.PWTEST_SHARD_WEIGHTS;
191
+ if (!shardWeights)
192
+ return void 0;
193
+ return shardWeights.split(":").map((w) => {
194
+ const weight = parseInt(w, 10);
195
+ if (isNaN(weight) || weight < 0)
196
+ throw new Error(`PWTEST_SHARD_WEIGHTS="${shardWeights}" weights must be non-negative numbers`);
197
+ return weight;
198
+ });
199
+ }
200
+ function resolveReporter(id) {
201
+ if (import_common.builtInReporters.includes(id))
202
+ return id;
203
+ const localPath = import_path.default.resolve(process.cwd(), id);
204
+ if (import_fs.default.existsSync(localPath))
205
+ return localPath;
206
+ return require.resolve(id, { paths: [process.cwd()] });
207
+ }
208
+ // Annotate the CommonJS export names for ESM import in node:
209
+ 0 && (module.exports = {
210
+ clearCache,
211
+ runTestServerAction,
212
+ runTests
213
+ });