@playwright-test-runner/core 1.0.1 → 1.0.5

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=daemon-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-cli.d.ts","sourceRoot":"","sources":["../src/daemon-cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ const report_daemon_1 = require("./report-daemon");
38
+ const child_process_1 = require("child_process");
39
+ const path = __importStar(require("path"));
40
+ const args = process.argv.slice(2);
41
+ const command = args[0];
42
+ function parseArgs() {
43
+ const options = {
44
+ port: 9324,
45
+ projectRoot: process.env.INIT_CWD || process.cwd(),
46
+ testsDir: 'tests',
47
+ };
48
+ for (let i = 0; i < args.length; i++) {
49
+ switch (args[i]) {
50
+ case '--port':
51
+ case '-p':
52
+ options.port = Number(args[++i]);
53
+ break;
54
+ case '--project':
55
+ case '-r':
56
+ options.projectRoot = args[++i];
57
+ break;
58
+ case '--tests-dir':
59
+ case '-t':
60
+ options.testsDir = args[++i];
61
+ break;
62
+ case '--help':
63
+ case '-h':
64
+ console.log(`
65
+ Playwright Report Daemon - Server Persistente per Report
66
+
67
+ Usage:
68
+ playwright-daemon [command] [options]
69
+
70
+ Commands:
71
+ start Avvia il daemon (default)
72
+ stop Ferma il daemon
73
+ status Controlla lo stato del daemon
74
+
75
+ Options:
76
+ -p, --port <port> Porta del server (default: 9324)
77
+ -r, --project <path> Root del progetto (default: current directory)
78
+ -t, --tests-dir <dir> Cartella dei test (default: tests)
79
+ -h, --help Mostra questo messaggio
80
+
81
+ Esempi:
82
+ playwright-daemon # Avvia il daemon
83
+ playwright-daemon start --port 9000 # Avvia su porta custom
84
+ playwright-daemon stop # Ferma il daemon
85
+ playwright-daemon status # Controlla stato
86
+
87
+ Controllo Automatico all'Installazione:
88
+ • NODE_ENV=production → Daemon NON avviato
89
+ • CI=true → Daemon NON avviato
90
+ • PLAYWRIGHT_SKIP_DAEMON=true → Skip completamente
91
+ • PLAYWRIGHT_DAEMON_AUTO=false → Avvio manuale richiesto
92
+
93
+ Il server servirà i report su:
94
+ http://localhost:9324 (o la porta specificata)
95
+ `);
96
+ process.exit(0);
97
+ }
98
+ }
99
+ return options;
100
+ }
101
+ async function main() {
102
+ // Gestisci subcomandi
103
+ if (command === 'stop') {
104
+ const stopScript = path.join(__dirname, '../scripts/stop-daemon.js');
105
+ (0, child_process_1.exec)(`node "${stopScript}"`, (error, stdout, stderr) => {
106
+ if (stdout)
107
+ console.log(stdout);
108
+ if (stderr)
109
+ console.error(stderr);
110
+ if (error)
111
+ process.exit(1);
112
+ });
113
+ return;
114
+ }
115
+ if (command === 'status') {
116
+ const statusScript = path.join(__dirname, '../scripts/status-daemon.js');
117
+ (0, child_process_1.exec)(`node "${statusScript}"`, (error, stdout, stderr) => {
118
+ if (stdout)
119
+ console.log(stdout);
120
+ if (stderr)
121
+ console.error(stderr);
122
+ if (error)
123
+ process.exit(1);
124
+ });
125
+ return;
126
+ }
127
+ // Comando start (default)
128
+ const options = parseArgs();
129
+ const daemon = new report_daemon_1.ReportDaemon(options);
130
+ try {
131
+ await daemon.start();
132
+ // Graceful shutdown
133
+ const cleanup = () => {
134
+ console.log('\n\n👋 Arresto server...');
135
+ daemon.stop();
136
+ process.exit(0);
137
+ };
138
+ process.on('SIGINT', cleanup);
139
+ process.on('SIGTERM', cleanup);
140
+ // Mantieni il processo attivo
141
+ process.stdin.resume();
142
+ }
143
+ catch (error) {
144
+ console.error('❌ Errore durante l\'avvio del daemon:', error.message);
145
+ process.exit(1);
146
+ }
147
+ }
148
+ main();
149
+ //# sourceMappingURL=daemon-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-cli.js","sourceRoot":"","sources":["../src/daemon-cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mDAA+C;AAC/C,iDAAqC;AACrC,2CAA6B;AAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAExB,SAAS,SAAS;IAChB,MAAM,OAAO,GAAQ;QACnB,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE;QAClD,QAAQ,EAAE,OA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AI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,11 +2,14 @@ import { PlaywrightServer } from './server';
2
2
  import { PlaywrightTestRunner } from './test-runner';
3
3
  import { runAndShow } from './run-and-show';
4
4
  import { PlaywrightWebUI } from './web-ui';
5
- export { PlaywrightServer, PlaywrightTestRunner, runAndShow, PlaywrightWebUI };
5
+ import { ReportDaemon } from './report-daemon';
6
+ export { PlaywrightServer, PlaywrightTestRunner, runAndShow, PlaywrightWebUI, ReportDaemon };
6
7
  export * from './test-runner';
7
8
  export * from './server';
8
9
  export * from './run-and-show';
9
10
  export * from './web-ui';
11
+ export * from './report-daemon';
10
12
  export declare function createServer(options?: {}): PlaywrightServer;
11
13
  export declare function createTestRunner(options?: {}): PlaywrightTestRunner;
14
+ export declare function createDaemon(options?: {}): ReportDaemon;
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;AAC/E,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AAEzB,wBAAgB,YAAY,CAAC,OAAO,KAAK,oBAExC;AAED,wBAAgB,gBAAgB,CAAC,OAAO,KAAK,wBAE5C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAC7F,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAEhC,wBAAgB,YAAY,CAAC,OAAO,KAAK,oBAExC;AAED,wBAAgB,gBAAgB,CAAC,OAAO,KAAK,wBAE5C;AAED,wBAAgB,YAAY,CAAC,OAAO,KAAK,gBAExC"}
package/dist/index.js CHANGED
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.PlaywrightWebUI = exports.runAndShow = exports.PlaywrightTestRunner = exports.PlaywrightServer = void 0;
17
+ exports.ReportDaemon = exports.PlaywrightWebUI = exports.runAndShow = exports.PlaywrightTestRunner = exports.PlaywrightServer = void 0;
18
18
  exports.createServer = createServer;
19
19
  exports.createTestRunner = createTestRunner;
20
+ exports.createDaemon = createDaemon;
20
21
  const server_1 = require("./server");
21
22
  Object.defineProperty(exports, "PlaywrightServer", { enumerable: true, get: function () { return server_1.PlaywrightServer; } });
22
23
  const test_runner_1 = require("./test-runner");
@@ -25,16 +26,22 @@ const run_and_show_1 = require("./run-and-show");
25
26
  Object.defineProperty(exports, "runAndShow", { enumerable: true, get: function () { return run_and_show_1.runAndShow; } });
26
27
  const web_ui_1 = require("./web-ui");
27
28
  Object.defineProperty(exports, "PlaywrightWebUI", { enumerable: true, get: function () { return web_ui_1.PlaywrightWebUI; } });
29
+ const report_daemon_1 = require("./report-daemon");
30
+ Object.defineProperty(exports, "ReportDaemon", { enumerable: true, get: function () { return report_daemon_1.ReportDaemon; } });
28
31
  __exportStar(require("./test-runner"), exports);
29
32
  __exportStar(require("./server"), exports);
30
33
  __exportStar(require("./run-and-show"), exports);
31
34
  __exportStar(require("./web-ui"), exports);
35
+ __exportStar(require("./report-daemon"), exports);
32
36
  function createServer(options = {}) {
33
37
  return new server_1.PlaywrightServer(options);
34
38
  }
35
39
  function createTestRunner(options = {}) {
36
40
  return new test_runner_1.PlaywrightTestRunner(options);
37
41
  }
42
+ function createDaemon(options = {}) {
43
+ return new report_daemon_1.ReportDaemon(options);
44
+ }
38
45
  if (require.main === module) {
39
46
  const server = new server_1.PlaywrightServer({
40
47
  port: Number(process.env.PORT) || 3000,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAWA,oCAEC;AAED,4CAEC;AAjBD,qCAA4C;AAKnC,iGALA,yBAAgB,OAKA;AAJzB,+CAAqD;AAI1B,qGAJlB,kCAAoB,OAIkB;AAH/C,iDAA4C;AAGK,2FAHxC,yBAAU,OAGwC;AAF3D,qCAA2C;AAEkB,gGAFpD,wBAAe,OAEoD;AAC5E,gDAA8B;AAC9B,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AAEzB,SAAgB,YAAY,CAAC,OAAO,GAAG,EAAE;IACvC,OAAO,IAAI,yBAAgB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAED,SAAgB,gBAAgB,CAAC,OAAO,GAAG,EAAE;IAC3C,OAAO,IAAI,kCAAoB,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,IAAI,OAAO,CAAC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OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI;QACtC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,EAAE;QACtD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO;KAC3C,CAAC,CAAC;IAEH,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC"}
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Report Daemon Server
4
+ * Server persistente che serve i report Playwright su una porta fissa
5
+ */
6
+ export interface ReportDaemonOptions {
7
+ port?: number;
8
+ projectRoot?: string;
9
+ testsDir?: string;
10
+ autoStart?: boolean;
11
+ }
12
+ export declare class ReportDaemon {
13
+ private app;
14
+ private runner;
15
+ private port;
16
+ private projectRoot;
17
+ private testsDir;
18
+ private server;
19
+ constructor(options?: ReportDaemonOptions);
20
+ private setupMiddleware;
21
+ private setupRoutes;
22
+ start(): Promise<void>;
23
+ stop(): void;
24
+ }
25
+ export declare function createDaemon(options?: ReportDaemonOptions): ReportDaemon;
26
+ //# sourceMappingURL=report-daemon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-daemon.d.ts","sourceRoot":"","sources":["../src/report-daemon.ts"],"names":[],"mappings":";AAQA;;;GAGG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAa;gBAEf,OAAO,GAAE,mBAAwB;IAe7C,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,WAAW;IAmSb,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC5B,IAAI,IAAI,IAAI;CAMb;AAGD,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,gBAE7D"}
@@ -0,0 +1,409 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.ReportDaemon = void 0;
41
+ exports.createDaemon = createDaemon;
42
+ const express_1 = __importDefault(require("express"));
43
+ const test_runner_1 = require("./test-runner");
44
+ const path = __importStar(require("path"));
45
+ const fs = __importStar(require("fs/promises"));
46
+ const cors_1 = __importDefault(require("cors"));
47
+ class ReportDaemon {
48
+ app;
49
+ runner;
50
+ port;
51
+ projectRoot;
52
+ testsDir;
53
+ server = null;
54
+ constructor(options = {}) {
55
+ this.port = options.port || 9324; // Porta fissa per il daemon
56
+ this.projectRoot = options.projectRoot || process.env.INIT_CWD || process.cwd();
57
+ this.testsDir = options.testsDir || 'tests';
58
+ this.app = (0, express_1.default)();
59
+ this.runner = new test_runner_1.PlaywrightTestRunner({
60
+ projectRoot: this.projectRoot,
61
+ testsDir: this.testsDir,
62
+ });
63
+ this.setupMiddleware();
64
+ this.setupRoutes();
65
+ }
66
+ setupMiddleware() {
67
+ this.app.use((0, cors_1.default)());
68
+ this.app.use(express_1.default.json());
69
+ this.app.use(express_1.default.static(path.join(__dirname, '../public')));
70
+ }
71
+ setupRoutes() {
72
+ // Health check
73
+ this.app.get('/health', (req, res) => {
74
+ res.json({
75
+ status: 'ok',
76
+ projectRoot: this.projectRoot,
77
+ testsDir: this.testsDir,
78
+ port: this.port,
79
+ });
80
+ });
81
+ // Serve il report direttamente sulla root
82
+ this.app.get('/', async (req, res) => {
83
+ const reportPath = path.join(this.projectRoot, 'playwright-report', 'index.html');
84
+ try {
85
+ await fs.access(reportPath);
86
+ // Serve l'intero folder playwright-report come statico
87
+ express_1.default.static(path.join(this.projectRoot, 'playwright-report'))(req, res, () => {
88
+ res.sendFile(reportPath);
89
+ });
90
+ }
91
+ catch {
92
+ res.status(404).send(`
93
+ <!DOCTYPE html>
94
+ <html>
95
+ <head>
96
+ <title>Playwright Test Reports</title>
97
+ <style>
98
+ body {
99
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
100
+ max-width: 800px;
101
+ margin: 50px auto;
102
+ padding: 20px;
103
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
104
+ color: white;
105
+ }
106
+ .container {
107
+ background: rgba(255, 255, 255, 0.1);
108
+ backdrop-filter: blur(10px);
109
+ border-radius: 20px;
110
+ padding: 40px;
111
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
112
+ }
113
+ h1 { margin-top: 0; }
114
+ .btn {
115
+ display: inline-block;
116
+ background: white;
117
+ color: #667eea;
118
+ padding: 12px 24px;
119
+ border-radius: 8px;
120
+ text-decoration: none;
121
+ font-weight: 600;
122
+ margin: 10px 10px 10px 0;
123
+ transition: transform 0.2s;
124
+ }
125
+ .btn:hover {
126
+ transform: translateY(-2px);
127
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
128
+ }
129
+ .info {
130
+ background: rgba(255, 255, 255, 0.1);
131
+ padding: 20px;
132
+ border-radius: 10px;
133
+ margin: 20px 0;
134
+ }
135
+ code {
136
+ background: rgba(0, 0, 0, 0.3);
137
+ padding: 2px 8px;
138
+ border-radius: 4px;
139
+ font-family: 'Courier New', monospace;
140
+ }
141
+ </style>
142
+ </head>
143
+ <body>
144
+ <div class="container">
145
+ <h1>📊 Playwright Test Reports</h1>
146
+ <p>Nessun report disponibile al momento.</p>
147
+
148
+ <div class="info">
149
+ <h3>Come generare un report:</h3>
150
+ <ol>
151
+ <li>Esegui i test: <code>npx playwright-test</code></li>
152
+ <li>Oppure usa la Web UI: <code>npx playwright-ui</code></li>
153
+ <li>Oppure usa il comando run: <code>npm run test:e2e</code></li>
154
+ </ol>
155
+ </div>
156
+
157
+ <div style="margin-top: 30px;">
158
+ <a href="/api/run" class="btn">🚀 Esegui Test Ora</a>
159
+ <a href="/dashboard" class="btn">📋 Dashboard</a>
160
+ </div>
161
+
162
+ <div style="margin-top: 30px; font-size: 14px; opacity: 0.8;">
163
+ <p><strong>Progetto:</strong> ${this.projectRoot}</p>
164
+ <p><strong>Test Directory:</strong> ${this.testsDir}</p>
165
+ <p><strong>Server attivo su:</strong> http://localhost:${this.port}</p>
166
+ </div>
167
+ </div>
168
+ </body>
169
+ </html>
170
+ `);
171
+ }
172
+ });
173
+ // Serve tutti gli asset del report
174
+ this.app.use('/data', express_1.default.static(path.join(this.projectRoot, 'playwright-report', 'data')));
175
+ this.app.use('/trace', express_1.default.static(path.join(this.projectRoot, 'playwright-report', 'trace')));
176
+ // API per eseguire i test
177
+ this.app.post('/api/run', async (req, res) => {
178
+ try {
179
+ console.log('🚀 Esecuzione test in corso...');
180
+ const result = await this.runner.runTests({
181
+ reporter: 'html',
182
+ headed: false,
183
+ ...req.body,
184
+ });
185
+ res.json({
186
+ success: result.success,
187
+ output: result.output,
188
+ error: result.error,
189
+ reportUrl: `http://localhost:${this.port}`,
190
+ });
191
+ if (result.success) {
192
+ console.log(`✅ Test completati! Report disponibile su http://localhost:${this.port}`);
193
+ }
194
+ }
195
+ catch (error) {
196
+ console.error('❌ Errore durante l\'esecuzione dei test:', error.message);
197
+ res.status(500).json({
198
+ success: false,
199
+ error: error.message,
200
+ });
201
+ }
202
+ });
203
+ // API per ottenere la lista dei test
204
+ this.app.get('/api/tests', async (req, res) => {
205
+ try {
206
+ const files = await this.runner.getTestFiles();
207
+ res.json({
208
+ success: true,
209
+ count: files.length,
210
+ files,
211
+ });
212
+ }
213
+ catch (error) {
214
+ res.status(500).json({
215
+ success: false,
216
+ error: error.message,
217
+ });
218
+ }
219
+ });
220
+ // Dashboard per gestire i test
221
+ this.app.get('/dashboard', (req, res) => {
222
+ res.send(`
223
+ <!DOCTYPE html>
224
+ <html>
225
+ <head>
226
+ <title>Playwright Test Dashboard</title>
227
+ <style>
228
+ body {
229
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
230
+ max-width: 1000px;
231
+ margin: 0 auto;
232
+ padding: 20px;
233
+ background: #f5f5f5;
234
+ }
235
+ .header {
236
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
237
+ color: white;
238
+ padding: 30px;
239
+ border-radius: 10px;
240
+ margin-bottom: 20px;
241
+ }
242
+ .card {
243
+ background: white;
244
+ padding: 20px;
245
+ border-radius: 10px;
246
+ margin-bottom: 20px;
247
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
248
+ }
249
+ .btn {
250
+ background: #667eea;
251
+ color: white;
252
+ border: none;
253
+ padding: 12px 24px;
254
+ border-radius: 6px;
255
+ cursor: pointer;
256
+ font-size: 16px;
257
+ margin-right: 10px;
258
+ }
259
+ .btn:hover { background: #5568d3; }
260
+ .btn-success { background: #48bb78; }
261
+ .btn-success:hover { background: #38a169; }
262
+ #output {
263
+ background: #1a202c;
264
+ color: #e2e8f0;
265
+ padding: 20px;
266
+ border-radius: 6px;
267
+ font-family: 'Courier New', monospace;
268
+ white-space: pre-wrap;
269
+ max-height: 400px;
270
+ overflow-y: auto;
271
+ }
272
+ </style>
273
+ </head>
274
+ <body>
275
+ <div class="header">
276
+ <h1>📊 Playwright Test Dashboard</h1>
277
+ <p>Gestisci e visualizza i tuoi test E2E</p>
278
+ </div>
279
+
280
+ <div class="card">
281
+ <h2>⚡ Azioni Rapide</h2>
282
+ <button class="btn" onclick="runTests()">▶️ Esegui Tutti i Test</button>
283
+ <button class="btn btn-success" onclick="viewReport()">📊 Visualizza Report</button>
284
+ <button class="btn" onclick="getTestList()">📋 Lista Test</button>
285
+ </div>
286
+
287
+ <div class="card">
288
+ <h3>📝 Output</h3>
289
+ <div id="output">Pronto per eseguire i test...</div>
290
+ </div>
291
+
292
+ <div class="card">
293
+ <h3>ℹ️ Informazioni</h3>
294
+ <p><strong>Progetto:</strong> ${this.projectRoot}</p>
295
+ <p><strong>Directory Test:</strong> ${this.testsDir}</p>
296
+ <p><strong>Server:</strong> http://localhost:${this.port}</p>
297
+ </div>
298
+
299
+ <script>
300
+ function log(message) {
301
+ document.getElementById('output').textContent = message;
302
+ }
303
+
304
+ async function runTests() {
305
+ log('🚀 Esecuzione test in corso...\\n\\nAttendi, questo potrebbe richiedere alcuni minuti...');
306
+
307
+ try {
308
+ const response = await fetch('/api/run', {
309
+ method: 'POST',
310
+ headers: { 'Content-Type': 'application/json' },
311
+ body: JSON.stringify({ reporter: 'html', headed: false })
312
+ });
313
+
314
+ const result = await response.json();
315
+
316
+ if (result.success) {
317
+ log('✅ Test completati con successo!\\n\\n' + result.output);
318
+ setTimeout(() => {
319
+ window.location.href = '/';
320
+ }, 2000);
321
+ } else {
322
+ log('❌ Errore durante l\\'esecuzione dei test:\\n\\n' + (result.error || result.output));
323
+ }
324
+ } catch (error) {
325
+ log('❌ Errore di rete: ' + error.message);
326
+ }
327
+ }
328
+
329
+ function viewReport() {
330
+ window.location.href = '/';
331
+ }
332
+
333
+ async function getTestList() {
334
+ log('📋 Caricamento lista test...');
335
+
336
+ try {
337
+ const response = await fetch('/api/tests');
338
+ const result = await response.json();
339
+
340
+ if (result.success) {
341
+ log('✅ Trovati ' + result.count + ' file di test:\\n\\n' +
342
+ result.files.map(f => ' • ' + f).join('\\n'));
343
+ } else {
344
+ log('❌ Errore: ' + result.error);
345
+ }
346
+ } catch (error) {
347
+ log('❌ Errore di rete: ' + error.message);
348
+ }
349
+ }
350
+ </script>
351
+ </body>
352
+ </html>
353
+ `);
354
+ });
355
+ }
356
+ async start() {
357
+ return new Promise((resolve, reject) => {
358
+ this.server = this.app.listen(this.port, () => {
359
+ console.log(`
360
+ ╔════════════════════════════════════════════════════════════╗
361
+ ║ ║
362
+ ║ 🎭 Playwright Report Server ATTIVO ║
363
+ ║ ║
364
+ ║ 📊 Report disponibile su: ║
365
+ ║ → http://localhost:${this.port} ║
366
+ ║ ║
367
+ ║ 📋 Dashboard: ║
368
+ ║ → http://localhost:${this.port}/dashboard ║
369
+ ║ ║
370
+ ║ 📁 Progetto: ${this.projectRoot.slice(-40).padEnd(40)}║
371
+ ║ 📂 Test Dir: ${this.testsDir.padEnd(40)} ║
372
+ ║ ║
373
+ ║ 💡 Il server rimarrà attivo in background ║
374
+ ║ ║
375
+ ╚════════════════════════════════════════════════════════════╝
376
+ `);
377
+ resolve();
378
+ }).on('error', (error) => {
379
+ if (error.code === 'EADDRINUSE') {
380
+ console.log(`
381
+ ⚠️ La porta ${this.port} è già in uso.
382
+
383
+ Il server dei report è probabilmente già attivo.
384
+ Accedi a: http://localhost:${this.port}
385
+
386
+ Per usare una porta diversa:
387
+ npx playwright-daemon --port <numero>
388
+ `);
389
+ resolve(); // Non è un errore fatale
390
+ }
391
+ else {
392
+ reject(error);
393
+ }
394
+ });
395
+ });
396
+ }
397
+ stop() {
398
+ if (this.server) {
399
+ this.server.close();
400
+ console.log('\n👋 Report server fermato\n');
401
+ }
402
+ }
403
+ }
404
+ exports.ReportDaemon = ReportDaemon;
405
+ // Export per uso programmatico
406
+ function createDaemon(options = {}) {
407
+ return new ReportDaemon(options);
408
+ }
409
+ //# sourceMappingURL=report-daemon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-daemon.js","sourceRoot":"","sources":["../src/report-daemon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsYA,oCAEC;AAtYD,sDAA8B;AAC9B,+CAAqD;AACrD,2CAA6B;AAC7B,gDAAkC;AAClC,gDAAwB;AAcxB,MAAa,YAAY;IACf,GAAG,CAAsB;IACzB,MAAM,CAAuB;IAC7B,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,QAAQ,CAAS;IACjB,MAAM,GAAQ,IAAI,CAAC;IAE3B,YAAY,UAA+B,EAAE;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,4BAA4B;QAC9D,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChF,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;QAE5C,IAAI,CAAC,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG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AI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AA/WD,oCA+WC;AAED,+BAA+B;AAC/B,SAAgB,YAAY,CAAC,UAA+B,EAAE;IAC5D,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@playwright-test-runner/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.5",
4
4
  "description": "Libreria agnostica per eseguire test Playwright con server Express e UI report",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
8
  "playwright-runner": "dist/cli.js",
9
9
  "playwright-test": "dist/run-and-show.js",
10
- "playwright-ui": "dist/web-cli.js"
10
+ "playwright-ui": "dist/web-cli.js",
11
+ "playwright-daemon": "dist/daemon-cli.js"
11
12
  },
12
13
  "scripts": {
13
14
  "build": "tsc",
14
15
  "dev": "tsc --watch",
15
16
  "start": "node dist/index.js",
16
- "prepare": "npm run build"
17
+ "prepare": "npm run build",
18
+ "postinstall": "node scripts/postinstall.js",
19
+ "release": "node scripts/release.js"
17
20
  },
18
21
  "keywords": [
19
22
  "playwright",