playwright-test-explorer 0.0.8 → 0.0.12

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.
@@ -3,10 +3,8 @@ import path from "path";
3
3
  import { spawn } from "child_process";
4
4
  import WebSocket from "ws";
5
5
  import fs from "fs/promises";
6
-
7
- //#region rolldown:runtime
6
+ //#region \0rolldown/runtime.js
8
7
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
9
-
10
8
  //#endregion
11
9
  //#region src/upstream/teleReceiver.ts
12
10
  var TeleReporterReceiver = class {
@@ -406,7 +404,6 @@ function parseRegexPatterns(patterns) {
406
404
  return new RegExp(p.r.source, p.r.flags);
407
405
  });
408
406
  }
409
-
410
407
  //#endregion
411
408
  //#region src/upstream/events.ts
412
409
  let Disposable;
@@ -444,8 +441,8 @@ var EventEmitter = class {
444
441
  });
445
442
  if (!dispatch) return;
446
443
  for (let index = 0; index < this._deliveryQueue.length; index++) {
447
- const { listener, event: event$1 } = this._deliveryQueue[index];
448
- listener.call(null, event$1);
444
+ const { listener, event } = this._deliveryQueue[index];
445
+ listener.call(null, event);
449
446
  }
450
447
  this._deliveryQueue = void 0;
451
448
  }
@@ -454,7 +451,6 @@ var EventEmitter = class {
454
451
  if (this._deliveryQueue) this._deliveryQueue = [];
455
452
  }
456
453
  };
457
-
458
454
  //#endregion
459
455
  //#region src/upstream/testServerConnection.ts
460
456
  var WebSocketTestServerTransport = class {
@@ -635,10 +631,12 @@ var TestServerConnection = class {
635
631
  } catch {}
636
632
  }
637
633
  };
638
-
639
634
  //#endregion
640
635
  //#region src/utils/pathUtils.ts
641
636
  /**
637
+ * Path utility functions for Playwright test server
638
+ */
639
+ /**
642
640
  * Escape special regex characters in a path
643
641
  * From playwright-vscode: src/utils.ts
644
642
  */
@@ -671,10 +669,12 @@ function findPlaywrightCli(workspaceFolder) {
671
669
  throw new Error("Playwright installation not found. Please install @playwright/test");
672
670
  }
673
671
  }
674
-
675
672
  //#endregion
676
673
  //#region src/utils/processUtils.ts
677
674
  /**
675
+ * Process and environment utilities for spawning Playwright test server
676
+ */
677
+ /**
678
678
  * Add node_modules/.bin to PATH environment variable
679
679
  */
680
680
  function addNpmRunPath(env, cwd) {
@@ -705,7 +705,6 @@ function createTestServerEnv(baseEnv, customEnv, cwd) {
705
705
  FORCE_COLOR: "1"
706
706
  }, cwd);
707
707
  }
708
-
709
708
  //#endregion
710
709
  //#region src/utils/reporterFactory.ts
711
710
  /**
@@ -736,9 +735,14 @@ function createTestListReceiver(reporter) {
736
735
  function processReport(receiver, report) {
737
736
  for (const message of report) receiver.dispatch(message);
738
737
  }
739
-
740
738
  //#endregion
741
739
  //#region src/playwrightTestServer.ts
740
+ /**
741
+ * Standalone Playwright Test Server
742
+ * Based on Microsoft's playwright-vscode implementation
743
+ * Removed all VSCode-specific dependencies and test running functionality
744
+ * Only supports listing tests and files
745
+ */
742
746
  var CancellationToken = class {
743
747
  _isCancelled = false;
744
748
  _onCancelEmitter = new EventEmitter();
@@ -900,7 +904,6 @@ var PlaywrightTestServer = class {
900
904
  this._disposeTestServer();
901
905
  }
902
906
  };
903
-
904
907
  //#endregion
905
908
  //#region src/api.ts
906
909
  async function listTestFile(workspaceFolder = process.cwd(), configFile = "playwright.config.ts", outputFile) {
@@ -1100,6 +1103,5 @@ async function treeStructure(workspaceFolder = process.cwd(), configFile = "play
1100
1103
  testServer.close();
1101
1104
  }
1102
1105
  }
1103
-
1104
1106
  //#endregion
1105
- export { CancellationToken as i, listTestFile as n, treeStructure as r, listTestCase as t };
1107
+ export { CancellationToken as i, listTestFile as n, treeStructure as r, listTestCase as t };
@@ -1,11 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { i as CancellationToken, n as listTestFile, r as treeStructure, t as listTestCase } from "./api-B_yjDCcC.js";
2
+ import { i as CancellationToken, n as listTestFile, r as treeStructure, t as listTestCase } from "./api-Bbd6qGsY.mjs";
3
+ import path from "path";
3
4
  import { program } from "commander";
4
5
  import chalk from "chalk";
5
6
  import ora from "ora";
6
- import path from "path";
7
-
8
7
  //#region src/cli.ts
8
+ /**
9
+ * Playwright Test Explorer CLI
10
+ * Command-line interface for exploring Playwright tests
11
+ */
9
12
  program.name("pw-test-explorer").description("CLI tool for exploring Playwright tests").version("0.1.0");
10
13
  program.command("list-files").description("List all test files in the Playwright project").option("-w, --workspace <path>", "workspace folder path", process.cwd()).option("-c, --config <file>", "config file path (relative to workspace)", "playwright.config.ts").option("-o, --output <file>", "output file path to save JSON results").action(async (options) => {
11
14
  const spinner = ora("Loading test files...").start();
@@ -90,6 +93,5 @@ ${chalk.bold("Examples:")}
90
93
  $ pw-test-explorer tree -w /path/to/project
91
94
  `);
92
95
  program.parse();
93
-
94
96
  //#endregion
95
- export { };
97
+ export {};
@@ -25,7 +25,6 @@ interface Event<T> {
25
25
  }
26
26
  //#endregion
27
27
  //#region src/playwrightTestServer.d.ts
28
-
29
28
  declare class CancellationToken {
30
29
  private _isCancelled;
31
30
  private _onCancelEmitter;
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { n as listTestFile, r as treeStructure, t as listTestCase } from "./api-Bbd6qGsY.mjs";
2
+ export { listTestCase, listTestFile, treeStructure };
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "playwright-test-explorer",
3
- "version": "0.0.8",
3
+ "version": "0.0.12",
4
4
  "description": "A CLI tool and library for exploring Playwright tests",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "homepage": "https://github.com/author/library#readme",
7
+ "homepage": "https://github.com/li-zhixin/playwright-test-explorer#readme",
8
8
  "bugs": {
9
- "url": "https://github.com/author/library/issues"
9
+ "url": "https://github.com/li-zhixin/playwright-test-explorer/issues"
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/author/library.git"
13
+ "url": "git+https://github.com/li-zhixin/playwright-test-explorer.git"
14
14
  },
15
15
  "author": "Author Name <author.name@mail.com>",
16
16
  "files": [
17
17
  "dist"
18
18
  ],
19
- "main": "./dist/index.js",
20
- "module": "./dist/index.js",
21
- "types": "./dist/index.d.ts",
19
+ "main": "./dist/index.mjs",
20
+ "module": "./dist/index.mjs",
21
+ "types": "./dist/index.d.mts",
22
22
  "bin": {
23
- "pw-test-explorer": "./dist/cli.js"
23
+ "pw-test-explorer": "./dist/cli.mjs"
24
24
  },
25
25
  "exports": {
26
- ".": "./dist/index.js",
26
+ ".": "./dist/index.mjs",
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "scripts": {
@@ -34,26 +34,26 @@
34
34
  "test:coverage": "vitest --coverage",
35
35
  "test:legacy": "node test-cli.js",
36
36
  "typecheck": "tsc --noEmit",
37
- "test:example": "node dist/cli.js tree -w example",
38
- "test:list-files": "node dist/cli.js list-files -w example",
39
- "test:list-tests": "node dist/cli.js list-tests -w example -f tests/example.spec.ts",
40
- "test:save-tree": "node dist/cli.js tree -w example -o example-tree.json",
41
- "test:save-files": "node dist/cli.js list-files -w example -o example-files.json"
37
+ "test:example": "node dist/cli.mjs tree -w example",
38
+ "test:list-files": "node dist/cli.mjs list-files -w example",
39
+ "test:list-tests": "node dist/cli.mjs list-tests -w example -f tests/example.spec.ts",
40
+ "test:save-tree": "node dist/cli.mjs tree -w example -o example-tree.json",
41
+ "test:save-files": "node dist/cli.mjs list-files -w example -o example-files.json"
42
42
  },
43
43
  "dependencies": {
44
44
  "chalk": "^5.6.2",
45
- "commander": "^14.0.2",
46
- "ora": "^9.0.0",
47
- "ws": "^8.18.3"
45
+ "commander": "^14.0.3",
46
+ "ora": "^9.3.0",
47
+ "ws": "^8.20.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@playwright/test": "^1.56.1",
51
- "@types/node": "^24.9.2",
50
+ "@playwright/test": "^1.58.2",
51
+ "@types/node": "^25.5.0",
52
52
  "@types/ws": "^8.18.1",
53
- "@vitest/coverage-v8": "4.0.5",
54
- "bumpp": "^10.3.1",
55
- "tsdown": "^0.15.12",
56
- "typescript": "^5.9.3",
57
- "vitest": "^4.0.5"
53
+ "@vitest/coverage-v8": "4.1.2",
54
+ "bumpp": "^11.0.1",
55
+ "tsdown": "^0.21.7",
56
+ "typescript": "^6.0.2",
57
+ "vitest": "^4.1.2"
58
58
  }
59
59
  }
package/dist/index.js DELETED
@@ -1,3 +0,0 @@
1
- import { n as listTestFile, r as treeStructure, t as listTestCase } from "./api-B_yjDCcC.js";
2
-
3
- export { listTestCase, listTestFile, treeStructure };
File without changes