@andrii_kremlovskyi/playwright-traces-reader 1.3.1 → 2.0.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.
- package/README.md +42 -2
- package/dist/cli/formatters.d.ts +14 -0
- package/dist/cli/formatters.d.ts.map +1 -0
- package/dist/cli/formatters.js +174 -0
- package/dist/cli/formatters.js.map +1 -0
- package/dist/cli/helpers.d.ts +6 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +84 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/json.d.ts +59 -0
- package/dist/cli/json.d.ts.map +1 -0
- package/dist/cli/json.js +76 -0
- package/dist/cli/json.js.map +1 -0
- package/dist/cli.d.ts +5 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +154 -65
- package/dist/cli.js.map +1 -1
- package/package.json +3 -2
- package/templates/skills/analyze-playwright-traces/SKILL.md +92 -324
package/dist/cli.js
CHANGED
|
@@ -1,72 +1,161 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
4
|
+
exports.runCli = runCli;
|
|
5
|
+
const commander_1 = require("commander");
|
|
6
|
+
const index_1 = require("./index");
|
|
7
|
+
const helpers_1 = require("./cli/helpers");
|
|
8
|
+
const formatters_1 = require("./cli/formatters");
|
|
9
|
+
const json_1 = require("./cli/json");
|
|
10
|
+
const defaultIo = {
|
|
11
|
+
stdout: text => process.stdout.write(text),
|
|
12
|
+
stderr: text => process.stderr.write(text),
|
|
13
|
+
};
|
|
14
|
+
function parseFormat(value) {
|
|
15
|
+
if (value === 'text' || value === 'json')
|
|
16
|
+
return value;
|
|
17
|
+
throw new commander_1.InvalidArgumentError(`Invalid format: ${value}. Expected "text" or "json".`);
|
|
18
|
+
}
|
|
19
|
+
function buildProgram(io) {
|
|
20
|
+
const program = new commander_1.Command();
|
|
21
|
+
program
|
|
22
|
+
.name('playwright-traces-reader')
|
|
23
|
+
.description('CLI for analyzing Playwright reports and traces')
|
|
24
|
+
.showHelpAfterError()
|
|
25
|
+
.configureOutput({
|
|
26
|
+
writeOut: text => io.stdout(text),
|
|
27
|
+
writeErr: text => io.stderr(text),
|
|
28
|
+
})
|
|
29
|
+
.exitOverride();
|
|
30
|
+
program
|
|
31
|
+
.command('init-skills [targetDir]')
|
|
32
|
+
.description('Scaffold the analyze-playwright-traces skill into a target repository')
|
|
33
|
+
.action(async (targetDir) => {
|
|
34
|
+
const destPath = await (0, helpers_1.copySkillTemplate)(targetDir ?? process.cwd());
|
|
35
|
+
io.stdout(`Skill scaffolded at ${destPath}\n`);
|
|
36
|
+
});
|
|
37
|
+
program
|
|
38
|
+
.command('failures <reportPath>')
|
|
39
|
+
.description('Analyze unique failing tests in a Playwright report root or data directory')
|
|
40
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
41
|
+
.option('--exclude-skipped', 'Exclude skipped tests from the result set', false)
|
|
42
|
+
.action(async (reportPath, options) => {
|
|
43
|
+
const reportDataDir = await (0, helpers_1.resolveReportDataDir)(reportPath);
|
|
44
|
+
const summaries = await (0, index_1.getFailedTestSummaries)(reportDataDir, {
|
|
45
|
+
excludeSkipped: options.excludeSkipped,
|
|
46
|
+
});
|
|
47
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createFailuresCommandJson)(summaries), (0, formatters_1.formatFailuresText)(summaries));
|
|
48
|
+
});
|
|
49
|
+
program
|
|
50
|
+
.command('summary <tracePath>')
|
|
51
|
+
.description('Summarize a single trace directory or trace zip')
|
|
52
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
53
|
+
.option('--report <reportPath>', 'Optional report root or data directory used to load report metadata')
|
|
54
|
+
.action(async (tracePath, options) => {
|
|
55
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
56
|
+
const reportMetadata = await (0, helpers_1.loadReportMetadataForTrace)(traceContext, options.report);
|
|
57
|
+
const summary = await (0, index_1.getSummary)(traceContext, { reportMetadata });
|
|
58
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createSummaryCommandJson)(summary), (0, formatters_1.formatSummaryText)(summary));
|
|
59
|
+
});
|
|
60
|
+
program
|
|
61
|
+
.command('slow-steps <tracePath>')
|
|
62
|
+
.description('Show the slowest steps for a single trace')
|
|
63
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
64
|
+
.option('-n, --limit <count>', 'Maximum number of steps to return', helpers_1.parsePositiveInteger, 5)
|
|
65
|
+
.option('--report <reportPath>', 'Optional report root or data directory used to load report metadata')
|
|
66
|
+
.action(async (tracePath, options) => {
|
|
67
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
68
|
+
const reportMetadata = await (0, helpers_1.loadReportMetadataForTrace)(traceContext, options.report);
|
|
69
|
+
const summary = await (0, index_1.getSummary)(traceContext, { reportMetadata });
|
|
70
|
+
const slowestSteps = summary.slowestSteps.slice(0, options.limit);
|
|
71
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createSlowStepsCommandJson)(slowestSteps), (0, formatters_1.formatSlowStepsText)(slowestSteps));
|
|
72
|
+
});
|
|
73
|
+
program
|
|
74
|
+
.command('steps <tracePath>')
|
|
75
|
+
.description('Print the reconstructed test step tree for a single trace')
|
|
76
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
77
|
+
.action(async (tracePath, options) => {
|
|
78
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
79
|
+
const steps = await (0, index_1.getTestSteps)(traceContext);
|
|
80
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createStepsCommandJson)(steps), (0, formatters_1.formatStepsText)(steps));
|
|
81
|
+
});
|
|
82
|
+
program
|
|
83
|
+
.command('network <tracePath>')
|
|
84
|
+
.description('Inspect network traffic for a single trace')
|
|
85
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
86
|
+
.option('--source <source>', 'Filter by source: all, api, or browser', 'all')
|
|
87
|
+
.action(async (tracePath, options) => {
|
|
88
|
+
if (!['all', 'api', 'browser'].includes(options.source)) {
|
|
89
|
+
throw new Error(`Invalid source: ${options.source}. Expected all, api, or browser.`);
|
|
90
|
+
}
|
|
91
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
92
|
+
const networkEntries = await (0, index_1.getNetworkTraffic)(traceContext);
|
|
93
|
+
const filteredEntries = options.source === 'all'
|
|
94
|
+
? networkEntries
|
|
95
|
+
: networkEntries.filter(entry => entry.source === options.source);
|
|
96
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createNetworkCommandJson)(filteredEntries), (0, formatters_1.formatNetworkText)(filteredEntries));
|
|
97
|
+
});
|
|
98
|
+
program
|
|
99
|
+
.command('dom <tracePath>')
|
|
100
|
+
.description('Inspect DOM snapshots for a single trace')
|
|
101
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
102
|
+
.option('--near <near>', 'Return snapshots near a callId, or use "last"')
|
|
103
|
+
.option('--phase <phase>', 'Filter to before, action, or after phase')
|
|
104
|
+
.option('-n, --limit <count>', 'Maximum number of action snapshots to return', helpers_1.parsePositiveInteger)
|
|
105
|
+
.action(async (tracePath, options) => {
|
|
106
|
+
if (options.phase && !['before', 'action', 'after'].includes(options.phase)) {
|
|
107
|
+
throw new Error(`Invalid phase: ${options.phase}. Expected before, action, or after.`);
|
|
108
|
+
}
|
|
109
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
110
|
+
const domOptions = {};
|
|
111
|
+
if (options.near !== undefined)
|
|
112
|
+
domOptions.near = options.near;
|
|
113
|
+
if (options.phase !== undefined)
|
|
114
|
+
domOptions.phase = options.phase;
|
|
115
|
+
if (options.limit !== undefined)
|
|
116
|
+
domOptions.limit = options.limit;
|
|
117
|
+
const domSnapshots = await (0, index_1.getDomSnapshots)(traceContext, domOptions);
|
|
118
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createDomCommandJson)(domSnapshots), (0, formatters_1.formatDomSnapshotsText)(domSnapshots));
|
|
119
|
+
});
|
|
120
|
+
program
|
|
121
|
+
.command('timeline <tracePath>')
|
|
122
|
+
.description('Print a merged chronological timeline for a single trace')
|
|
123
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
124
|
+
.action(async (tracePath, options) => {
|
|
125
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
126
|
+
const timeline = await (0, index_1.getTimeline)(traceContext);
|
|
127
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createTimelineCommandJson)(timeline), (0, formatters_1.formatTimelineText)(timeline));
|
|
128
|
+
});
|
|
129
|
+
program
|
|
130
|
+
.command('screenshots <tracePath>')
|
|
131
|
+
.description('Extract screenshots from a trace to a local output directory')
|
|
132
|
+
.requiredOption('-o, --out-dir <path>', 'Directory to write extracted screenshots into')
|
|
133
|
+
.option('-f, --format <format>', 'Output format: text or json', parseFormat, 'text')
|
|
134
|
+
.action(async (tracePath, options) => {
|
|
135
|
+
const traceContext = await (0, index_1.prepareTraceDir)(tracePath);
|
|
136
|
+
const screenshots = await (0, index_1.extractScreenshots)(traceContext, options.outDir);
|
|
137
|
+
(0, formatters_1.emitOutput)(io, options.format, (0, json_1.createScreenshotsCommandJson)(screenshots), (0, formatters_1.formatScreenshotsText)(screenshots));
|
|
138
|
+
});
|
|
139
|
+
return program;
|
|
52
140
|
}
|
|
53
|
-
async function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
await
|
|
57
|
-
return;
|
|
141
|
+
async function runCli(argv, io = defaultIo) {
|
|
142
|
+
const program = buildProgram(io);
|
|
143
|
+
try {
|
|
144
|
+
await program.parseAsync(argv, { from: 'user' });
|
|
145
|
+
return 0;
|
|
58
146
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (error instanceof commander_1.CommanderError) {
|
|
149
|
+
return error.exitCode;
|
|
150
|
+
}
|
|
151
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
152
|
+
io.stderr(`${message}\n`);
|
|
153
|
+
return 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (require.main === module) {
|
|
157
|
+
runCli(process.argv.slice(2)).then(exitCode => {
|
|
158
|
+
process.exit(exitCode);
|
|
159
|
+
});
|
|
67
160
|
}
|
|
68
|
-
main().catch(err => {
|
|
69
|
-
console.error(err);
|
|
70
|
-
process.exit(1);
|
|
71
|
-
});
|
|
72
161
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAyMA,wBAeC;AAvND,yCAA0E;AAC1E,mCASiB;AACjB,2CAKuB;AACvB,iDAW0B;AAC1B,qCASoB;AAQpB,MAAM,SAAS,GAAU;IACvB,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;CAC3C,CAAC;AAEF,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IACvD,MAAM,IAAI,gCAAoB,CAAC,mBAAmB,KAAK,8BAA8B,CAAC,CAAC;AACzF,CAAC;AAED,SAAS,YAAY,CAAC,EAAS;I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C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAC5C,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrii_kremlovskyi/playwright-traces-reader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Parse Playwright trace files into structured data for AI agents and tooling",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"typescript": "^5.9.3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"adm-zip": "^0.5.16"
|
|
46
|
+
"adm-zip": "^0.5.16",
|
|
47
|
+
"commander": "^13.1.0"
|
|
47
48
|
},
|
|
48
49
|
"jest": {
|
|
49
50
|
"testEnvironment": "node",
|