@playdrop/playdrop-cli 0.14.8 → 0.14.9

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 (176) hide show
  1. package/config/client-meta.json +2 -2
  2. package/node_modules/@playdrop/config/client-meta.json +2 -2
  3. package/node_modules/@playwright/mcp/LICENSE +201 -0
  4. package/node_modules/@playwright/mcp/README.md +1592 -0
  5. package/node_modules/@playwright/mcp/cli.js +32 -0
  6. package/node_modules/@playwright/mcp/config.d.ts +239 -0
  7. package/node_modules/@playwright/mcp/index.d.ts +23 -0
  8. package/node_modules/@playwright/mcp/index.js +19 -0
  9. package/node_modules/@playwright/mcp/node_modules/playwright/LICENSE +202 -0
  10. package/node_modules/@playwright/mcp/node_modules/playwright/NOTICE +5 -0
  11. package/node_modules/@playwright/mcp/node_modules/playwright/README.md +318 -0
  12. package/node_modules/@playwright/mcp/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  13. package/node_modules/@playwright/mcp/node_modules/playwright/cli.js +19 -0
  14. package/node_modules/@playwright/mcp/node_modules/playwright/index.d.ts +17 -0
  15. package/node_modules/@playwright/mcp/node_modules/playwright/index.js +17 -0
  16. package/node_modules/@playwright/mcp/node_modules/playwright/index.mjs +18 -0
  17. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.js +42 -0
  18. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.mjs +21 -0
  19. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/agentParser.js +89 -0
  20. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  21. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  22. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  23. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  24. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  25. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  26. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  27. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  28. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  29. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/reportActions.js +78 -0
  30. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/testActions.js +213 -0
  31. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js +2966 -0
  32. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js.txt +34 -0
  33. package/node_modules/@playwright/mcp/node_modules/playwright/lib/errorContext.js +129 -0
  34. package/node_modules/@playwright/mcp/node_modules/playwright/lib/globals.js +58 -0
  35. package/node_modules/@playwright/mcp/node_modules/playwright/lib/index.js +783 -0
  36. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js +260 -0
  37. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  38. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  39. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  40. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js +13480 -0
  41. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  42. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  43. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/browserBackend.js +125 -0
  44. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  45. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  46. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  47. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  48. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  49. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  50. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  51. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  52. package/node_modules/@playwright/mcp/node_modules/playwright/lib/package.js +47 -0
  53. package/node_modules/@playwright/mcp/node_modules/playwright/lib/program.js +237 -0
  54. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js +8154 -0
  55. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js.txt +59 -0
  56. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js +72275 -0
  57. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  58. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
  59. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js +8060 -0
  60. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  61. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  62. package/node_modules/@playwright/mcp/node_modules/playwright/lib/util.js +373 -0
  63. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js +1850 -0
  64. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  65. package/node_modules/@playwright/mcp/node_modules/playwright/package.json +58 -0
  66. package/node_modules/@playwright/mcp/node_modules/playwright/test.d.ts +18 -0
  67. package/node_modules/@playwright/mcp/node_modules/playwright/test.js +24 -0
  68. package/node_modules/@playwright/mcp/node_modules/playwright/test.mjs +35 -0
  69. package/node_modules/@playwright/mcp/node_modules/playwright/types/test.d.ts +10709 -0
  70. package/node_modules/@playwright/mcp/node_modules/playwright/types/testReporter.d.ts +908 -0
  71. package/node_modules/@playwright/mcp/node_modules/playwright-core/LICENSE +202 -0
  72. package/node_modules/@playwright/mcp/node_modules/playwright-core/NOTICE +5 -0
  73. package/node_modules/@playwright/mcp/node_modules/playwright-core/README.md +3 -0
  74. package/node_modules/@playwright/mcp/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  75. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  76. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  77. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  78. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  79. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  80. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  81. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  82. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  83. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  84. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  85. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  86. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  87. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  88. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  89. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  90. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  91. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  92. package/node_modules/@playwright/mcp/node_modules/playwright-core/browsers.json +81 -0
  93. package/node_modules/@playwright/mcp/node_modules/playwright-core/cli.js +21 -0
  94. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.d.ts +17 -0
  95. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.js +17 -0
  96. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.mjs +28 -0
  97. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/bootstrap.js +88 -0
  98. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/coreBundle.js +74495 -0
  99. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  100. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  101. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  102. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  103. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/package.js +50 -0
  104. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  105. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/electron/loader.js +118 -0
  106. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js +7347 -0
  107. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +354 -0
  108. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  109. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
  110. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/help.json +707 -0
  111. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  112. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/output.js +343 -0
  113. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/program.js +404 -0
  114. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/registry.js +176 -0
  115. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/session.js +258 -0
  116. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md +420 -0
  117. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  118. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  119. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  120. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md +241 -0
  121. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md +225 -0
  122. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  123. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md +433 -0
  124. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md +139 -0
  125. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  126. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  127. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/trace/SKILL.md +171 -0
  128. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/extension.js +78 -0
  129. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  130. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  131. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +2179 -0
  132. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  133. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  134. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  135. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  136. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
  137. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
  138. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  139. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  140. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  141. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  142. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  143. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  144. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  145. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BVGIAA-i.js +32 -0
  146. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  147. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-BQ57a3QC.js +129 -0
  148. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
  149. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  150. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  151. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BSEO6m_i.js +32 -0
  152. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CT5oRh4X.js +181 -0
  153. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  154. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BN2nOuEV.js +7 -0
  155. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  156. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  157. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
  158. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  159. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.DLSGjmWZ.js +1 -0
  160. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  161. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  162. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  163. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  164. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  165. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  166. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
  167. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CZvydVOh.js +5 -0
  168. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  169. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  170. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/xdg-open +1267 -0
  171. package/node_modules/@playwright/mcp/node_modules/playwright-core/package.json +34 -0
  172. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/protocol.d.ts +24842 -0
  173. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/structs.d.ts +45 -0
  174. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/types.d.ts +26088 -0
  175. package/node_modules/@playwright/mcp/package.json +51 -0
  176. package/package.json +3 -1
@@ -0,0 +1,237 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var program_exports = {};
20
+ __export(program_exports, {
21
+ program: () => program
22
+ });
23
+ module.exports = __toCommonJS(program_exports);
24
+ var import_bootstrap = require("playwright-core/lib/bootstrap");
25
+ var import_coreBundle = require("playwright-core/lib/coreBundle");
26
+ var import_common = require("./common");
27
+ var import_testActions = require("./cli/testActions");
28
+ var import_reportActions = require("./cli/reportActions");
29
+ var import_testBackend = require("./mcp/test/testBackend");
30
+ var import_generateAgents = require("./agents/generateAgents");
31
+ var import_package = require("./package");
32
+ const { program } = require("playwright-core/lib/utilsBundle");
33
+ const { setBoxedStackPrefixes } = require("playwright-core/lib/coreBundle").utils;
34
+ const { gracefullyProcessExitDoNotHang } = require("playwright-core/lib/coreBundle").utils;
35
+ setBoxedStackPrefixes([import_package.packageRoot]);
36
+ import_coreBundle.libCli.decorateProgram(program);
37
+ function addTestCommand(program2) {
38
+ const command = program2.command("test [test-filter...]");
39
+ command.description("run tests with Playwright Test");
40
+ const options = testOptions.sort((a, b) => a[0].replace(/-/g, "").localeCompare(b[0].replace(/-/g, "")));
41
+ options.forEach(([name, { description, choices, preset }]) => {
42
+ const option = command.createOption(name, description);
43
+ if (choices)
44
+ option.choices(choices);
45
+ if (preset)
46
+ option.preset(preset);
47
+ command.addOption(option);
48
+ return command;
49
+ });
50
+ command.action(async (args, opts) => {
51
+ const dashDashIndex = process.argv.indexOf("--");
52
+ const postDashCount = dashDashIndex >= 0 ? process.argv.length - 1 - dashDashIndex : 0;
53
+ const testFilters = args.slice(0, args.length - postDashCount);
54
+ try {
55
+ await (0, import_testActions.runTests)(testFilters, opts);
56
+ } catch (e) {
57
+ console.error(e);
58
+ gracefullyProcessExitDoNotHang(1);
59
+ }
60
+ });
61
+ command.addHelpText("afterAll", `
62
+ Arguments [test-filter...]:
63
+ Pass arguments to filter test files. Each argument is treated as a regular expression. Matching is performed against the absolute file paths.
64
+
65
+ Examples:
66
+ $ npx playwright test my.spec.ts
67
+ $ npx playwright test some.spec.ts:42
68
+ $ npx playwright test --headed
69
+ $ npx playwright test --project=webkit`);
70
+ }
71
+ function addClearCacheCommand(program2) {
72
+ const command = program2.command("clear-cache");
73
+ command.description("clears build and test caches");
74
+ command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
75
+ command.action(async (opts) => {
76
+ await (0, import_testActions.clearCache)(opts);
77
+ });
78
+ }
79
+ function addTestServerCommand(program2) {
80
+ const command = program2.command("test-server", { hidden: true });
81
+ command.description("start test server");
82
+ command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
83
+ command.option("--host <host>", "Host to start the server on", "localhost");
84
+ command.option("--port <port>", "Port to start the server on", "0");
85
+ command.action(async (opts) => {
86
+ await (0, import_testActions.runTestServerAction)(opts);
87
+ });
88
+ }
89
+ function addShowReportCommand(program2) {
90
+ const command = program2.command("show-report [report]");
91
+ command.description("show HTML report");
92
+ command.action(async (report, options) => {
93
+ await (0, import_reportActions.showReport)(report, options.host, +options.port);
94
+ });
95
+ command.option("--host <host>", "Host to serve report on", "localhost");
96
+ command.option("--port <port>", "Port to serve report on", "9323");
97
+ command.addHelpText("afterAll", `
98
+ Arguments [report]:
99
+ When specified, opens given report, otherwise opens last generated report.
100
+ Accepts a directory or a .zip archive whose top-level entry is "index.html" (e.g. one downloaded from a CI artifact).
101
+
102
+ Examples:
103
+ $ npx playwright show-report
104
+ $ npx playwright show-report playwright-report
105
+ $ npx playwright show-report playwright-report.zip`);
106
+ }
107
+ function addMergeReportsCommand(program2) {
108
+ const command = program2.command("merge-reports [dir]");
109
+ command.description("merge multiple blob reports (for sharded tests) into a single report");
110
+ command.action(async (dir, options) => {
111
+ try {
112
+ await (0, import_reportActions.mergeReports)(dir, options);
113
+ } catch (e) {
114
+ console.error(e);
115
+ gracefullyProcessExitDoNotHang(1);
116
+ }
117
+ });
118
+ command.option("-c, --config <file>", `Configuration file. Can be used to specify additional configuration for the output report.`);
119
+ command.option("--reporter <reporter>", `Reporter to use, comma-separated, can be ${import_common.builtInReporters.map((name) => `"${name}"`).join(", ")} (default: "${import_common.config.defaultReporter}")`);
120
+ command.addHelpText("afterAll", `
121
+ Arguments [dir]:
122
+ Directory containing blob reports.
123
+
124
+ Examples:
125
+ $ npx playwright merge-reports playwright-report`);
126
+ }
127
+ function addTestMCPServerCommand(program2) {
128
+ const command = program2.command("run-test-mcp-server", { hidden: true });
129
+ command.description("Interact with the test runner over MCP");
130
+ command.option("--headless", "run browser in headless mode, headed by default");
131
+ command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
132
+ command.option("--host <host>", "host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.");
133
+ command.option("--port <port>", "port to listen on for SSE transport.");
134
+ command.action(async (options) => {
135
+ import_coreBundle.tools.setupExitWatchdog();
136
+ const factory = {
137
+ name: "Playwright Test Runner",
138
+ nameInConfig: "playwright-test-runner",
139
+ version: import_package.packageJSON.version,
140
+ toolSchemas: import_testBackend.testServerBackendTools.map((tool) => tool.schema),
141
+ create: async () => new import_testBackend.TestServerBackend(options.config, { muteConsole: options.port === void 0, headless: options.headless }),
142
+ disposed: async () => {
143
+ }
144
+ };
145
+ await import_coreBundle.tools.start(factory, { port: options.port === void 0 ? void 0 : +options.port, host: options.host });
146
+ });
147
+ }
148
+ function addInitAgentsCommand(program2) {
149
+ const command = program2.command("init-agents");
150
+ command.description("Initialize repository agents");
151
+ const option = command.createOption("--loop <loop>", "Agentic loop provider");
152
+ option.choices(["claude", "codex", "copilot", "opencode", "vscode", "vscode-legacy"]);
153
+ command.addOption(option);
154
+ command.option("-c, --config <file>", `Configuration file to find a project to use for seed test`);
155
+ command.option("--project <project>", "Project to use for seed test");
156
+ command.option("--prompts", "Whether to include prompts in the agent initialization");
157
+ command.action(async (opts) => {
158
+ const loadedConfig = await import_common.configLoader.loadConfigFromFile(opts.config);
159
+ if (opts.loop === "opencode") {
160
+ await import_generateAgents.OpencodeGenerator.init(loadedConfig, opts.project, opts.prompts);
161
+ } else if (opts.loop === "vscode-legacy") {
162
+ await import_generateAgents.VSCodeGenerator.init(loadedConfig, opts.project);
163
+ } else if (opts.loop === "claude") {
164
+ await import_generateAgents.ClaudeGenerator.init(loadedConfig, opts.project, opts.prompts);
165
+ } else if (opts.loop === "codex") {
166
+ await import_generateAgents.CodexGenerator.init(loadedConfig, opts.project, opts.prompts);
167
+ } else {
168
+ await import_generateAgents.CopilotGenerator.init(loadedConfig, opts.project, opts.prompts);
169
+ return;
170
+ }
171
+ });
172
+ }
173
+ function addInitSkillsCommand(program2) {
174
+ const command = program2.command("init-skills");
175
+ command.description("Initialize the workspace and install Playwright CLI skills");
176
+ const option = command.createOption("--loop <loop>", "Agentic loop provider");
177
+ option.choices(["claude", "generic"]);
178
+ option.default("generic");
179
+ command.addOption(option);
180
+ command.action(async (opts) => {
181
+ await import_coreBundle.tools.initWorkspace(opts.loop === "claude" ? "claude" : "agents");
182
+ });
183
+ }
184
+ const kTraceModes = ["on", "off", "on-first-retry", "on-all-retries", "retain-on-failure", "retain-on-first-failure", "retain-on-failure-and-retries"];
185
+ const testOptions = [
186
+ /* deprecated */
187
+ ["--browser <browser>", { description: `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")` }],
188
+ ["-c, --config <file>", { description: `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"` }],
189
+ ["--debug [mode]", { description: `Run tests with Playwright Inspector. Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`, choices: ["inspector", "cli"], preset: "inspector" }],
190
+ ["--fail-on-flaky-tests", { description: `Fail if any test is flagged as flaky (default: false)` }],
191
+ ["--forbid-only", { description: `Fail if test.only is called (default: false)` }],
192
+ ["--fully-parallel", { description: `Run all tests in parallel (default: false)` }],
193
+ ["--global-timeout <timeout>", { description: `Maximum time this test suite can run in milliseconds (default: unlimited)` }],
194
+ ["-g, --grep <grep>", { description: `Only run tests matching this regular expression (default: ".*")` }],
195
+ ["-G, --grep-invert <grep>", { description: `Only run tests that do not match this regular expression` }],
196
+ ["--headed", { description: `Run tests in headed browsers (default: headless)` }],
197
+ ["--ignore-snapshots", { description: `Ignore screenshot and snapshot expectations` }],
198
+ ["--last-failed", { description: `Only re-run the failures` }],
199
+ ["--last-failed-file <file>", { description: `Override the default path for the last-run JSON file used with --last-failed (default: <outputDir>/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }],
200
+ ["--list", { description: `Collect all the tests and report them, but do not run` }],
201
+ ["--max-failures <N>", { description: `Stop after the first N failures` }],
202
+ ["--no-deps", { description: `Do not run project dependencies` }],
203
+ ["--output <dir>", { description: `Folder for output artifacts (default: "test-results")` }],
204
+ ["--only-changed [ref]", { description: `Only run test files that have been changed between 'HEAD' and 'ref'. Defaults to running all uncommitted changes. Only supports Git.` }],
205
+ ["--pass-with-no-tests", { description: `Makes test run succeed even if no tests were found` }],
206
+ ["--project <project-name...>", { description: `Only run tests from the specified list of projects, supports '*' wildcard (default: run all projects)` }],
207
+ ["--quiet", { description: `Suppress stdio` }],
208
+ ["--repeat-each <N>", { description: `Run each test N times (default: 1)` }],
209
+ ["--reporter <reporter>", { description: `Reporter to use, comma-separated, can be ${import_common.builtInReporters.map((name) => `"${name}"`).join(", ")} (default: "${import_common.config.defaultReporter}")` }],
210
+ ["--retries <retries>", { description: `Maximum retry count for flaky tests, zero for no retries (default: no retries)` }],
211
+ ["--run-agents <mode>", { description: `Run agents to generate the code for page.perform`, choices: ["missing", "all", "none"], preset: "none" }],
212
+ ["--shard <shard>", { description: `Shard tests and execute only the selected shard, specify in the form "current/all", 1-based, for example "3/5"` }],
213
+ ["--test-list <file>", { description: `Path to a file containing a list of tests to run. See https://playwright.dev/docs/test-cli for more details.` }],
214
+ ["--test-list-invert <file>", { description: `Path to a file containing a list of tests to skip. See https://playwright.dev/docs/test-cli for more details.` }],
215
+ ["--timeout <timeout>", { description: `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${import_common.config.defaultTimeout})` }],
216
+ ["--trace <mode>", { description: `Force tracing mode`, choices: kTraceModes }],
217
+ ["--tsconfig <path>", { description: `Path to a single tsconfig applicable to all imported files (default: look up tsconfig for each imported file separately)` }],
218
+ ["--ui", { description: `Run tests in interactive UI mode` }],
219
+ ["--ui-host <host>", { description: `Host to serve UI on; specifying this option opens UI in a browser tab` }],
220
+ ["--ui-port <port>", { description: `Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab` }],
221
+ ["-u, --update-snapshots [mode]", { description: `Update snapshots with actual results. Running tests without the flag defaults to "missing"`, choices: ["all", "changed", "missing", "none"], preset: "changed" }],
222
+ ["--update-source-method <method>", { description: `Chooses the way source is updated (default: "patch")`, choices: ["overwrite", "3way", "patch"] }],
223
+ ["-j, --workers <workers>", { description: `Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker (default: 50%)` }],
224
+ ["-x", { description: `Stop after the first failure` }]
225
+ ];
226
+ addTestCommand(program);
227
+ addShowReportCommand(program);
228
+ addMergeReportsCommand(program);
229
+ addClearCacheCommand(program);
230
+ addTestMCPServerCommand(program);
231
+ addTestServerCommand(program);
232
+ addInitAgentsCommand(program);
233
+ addInitSkillsCommand(program);
234
+ // Annotate the CommonJS export names for ESM import in node:
235
+ 0 && (module.exports = {
236
+ program
237
+ });