flakiness 0.256.0 → 0.258.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 +9 -23
- package/lib/cli/cli.js +22 -11
- package/package.json +5 -5
- package/types/tsconfig.tsbuildinfo +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ flakiness upload ./flakiness-report/report.json
|
|
|
44
44
|
flakiness upload ./report.json --endpoint https://custom.flakiness.io
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
The CLI supports **GitHub OIDC** authentication: when running in GitHub Actions with `id-token: write` permission and the report contains a `flakinessProject` field, the CLI automatically authenticates without an access token. Reporters set `flakinessProject` automatically
|
|
47
|
+
The CLI supports **GitHub OIDC** authentication: when running in GitHub Actions with `id-token: write` permission and the report contains a `flakinessProject` field, the CLI automatically authenticates without an access token. Reporters set `flakinessProject` automatically.
|
|
48
48
|
|
|
49
49
|
**Options:**
|
|
50
50
|
- `-t, --access-token <token>` — Read-write access token (env: `FLAKINESS_ACCESS_TOKEN`)
|
|
@@ -79,34 +79,20 @@ flakiness show ./path/to/report
|
|
|
79
79
|
|
|
80
80
|
### Convert JUnit XML
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
flakiness convert-junit ./test-results/
|
|
90
|
-
|
|
91
|
-
# With options
|
|
92
|
-
flakiness convert-junit ./junit.xml \
|
|
93
|
-
--env-name "CI" \
|
|
94
|
-
--commit-id abc123 \
|
|
95
|
-
--output-dir ./flakiness-report
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Options:**
|
|
99
|
-
- `--env-name <name>` — Environment name for the report (default: `junit`)
|
|
100
|
-
- `--commit-id <id>` — Git commit ID (auto-detected if not provided)
|
|
101
|
-
- `--output-dir <dir>` — Output directory (default: `flakiness-report`)
|
|
102
|
-
- `--project <org/project>` — Flakiness.io project slug for OIDC uploads (env: `FLAKINESS_PROJECT`)
|
|
82
|
+
> **Deprecated.** `flakiness convert-junit` is deprecated and will be removed in
|
|
83
|
+
> a future release. Use [`@flakiness/junit-xml`](https://github.com/flakiness/junit-xml)
|
|
84
|
+
> instead — it converts JUnit XML and uploads it to flakiness.io in a single step:
|
|
85
|
+
>
|
|
86
|
+
> ```bash
|
|
87
|
+
> npx @flakiness/junit-xml --flakiness-project myorg/myproject ./test-results
|
|
88
|
+
> ```
|
|
103
89
|
|
|
104
90
|
## Environment Variables
|
|
105
91
|
|
|
106
92
|
| Variable | Description |
|
|
107
93
|
|----------|-------------|
|
|
108
94
|
| `FLAKINESS_ACCESS_TOKEN` | Read-write access token for authentication |
|
|
109
|
-
| `FLAKINESS_PROJECT` | Flakiness.io project in `org/project` format (for OIDC
|
|
95
|
+
| `FLAKINESS_PROJECT` | Flakiness.io project in `org/project` format (for OIDC uploads) |
|
|
110
96
|
| `FLAKINESS_ENDPOINT` | Custom service endpoint URL |
|
|
111
97
|
|
|
112
98
|
## License
|
package/lib/cli/cli.js
CHANGED
|
@@ -1024,7 +1024,7 @@ var WireTypes;
|
|
|
1024
1024
|
})(WireTypes || (WireTypes = {}));
|
|
1025
1025
|
|
|
1026
1026
|
// src/cli/cli.ts
|
|
1027
|
-
import { styleText as
|
|
1027
|
+
import { styleText as styleText6 } from "node:util";
|
|
1028
1028
|
import { Command, Option } from "commander";
|
|
1029
1029
|
import debug2 from "debug";
|
|
1030
1030
|
import fs7 from "fs";
|
|
@@ -1033,7 +1033,7 @@ import path7 from "path";
|
|
|
1033
1033
|
// ../package.json
|
|
1034
1034
|
var package_default = {
|
|
1035
1035
|
name: "@flakiness/monorepo",
|
|
1036
|
-
version: "0.
|
|
1036
|
+
version: "0.258.0",
|
|
1037
1037
|
type: "module",
|
|
1038
1038
|
private: true,
|
|
1039
1039
|
scripts: {
|
|
@@ -1053,12 +1053,12 @@ var package_default = {
|
|
|
1053
1053
|
devDependencies: {
|
|
1054
1054
|
"@flakiness/playwright": "catalog:",
|
|
1055
1055
|
"@playwright/test": "catalog:",
|
|
1056
|
-
"@types/node": "^22.19.
|
|
1056
|
+
"@types/node": "^22.19.19",
|
|
1057
1057
|
esbuild: "^0.27.7",
|
|
1058
1058
|
flakiness: "workspace:*",
|
|
1059
1059
|
kubik: "^0.24.0",
|
|
1060
1060
|
"smee-client": "^5.0.0",
|
|
1061
|
-
tsx: "^4.
|
|
1061
|
+
tsx: "^4.22.2",
|
|
1062
1062
|
typescript: "^5.9.3"
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
@@ -1516,6 +1516,7 @@ async function cmdAuthLogin(endpoint = DEFAULT_FLAKINESS_ENDPOINT) {
|
|
|
1516
1516
|
// src/cli/cmd-convert.ts
|
|
1517
1517
|
import { CIUtils, GitWorktree, ReportUtils as ReportUtils2, writeReport } from "@flakiness/sdk";
|
|
1518
1518
|
import fs3 from "fs/promises";
|
|
1519
|
+
import { styleText as styleText3 } from "node:util";
|
|
1519
1520
|
import path3 from "path";
|
|
1520
1521
|
|
|
1521
1522
|
// src/junit.ts
|
|
@@ -1755,7 +1756,16 @@ async function parseJUnit(xmls, options) {
|
|
|
1755
1756
|
}
|
|
1756
1757
|
|
|
1757
1758
|
// src/cli/cmd-convert.ts
|
|
1759
|
+
var DEPRECATION_WARNING = `[flakiness.io] WARN: \`convert-junit\` is deprecated and will be removed in a future release.
|
|
1760
|
+
|
|
1761
|
+
Migrate to @flakiness/junit-xml \u2014 it converts AND uploads in a single step:
|
|
1762
|
+
|
|
1763
|
+
npx @flakiness/junit-xml --flakiness-project <org/project> <path>
|
|
1764
|
+
|
|
1765
|
+
Docs: https://github.com/flakiness/junit-xml
|
|
1766
|
+
`;
|
|
1758
1767
|
async function cmdConvert(junitPath, options) {
|
|
1768
|
+
console.warn(styleText3("yellow", DEPRECATION_WARNING));
|
|
1759
1769
|
const fullPath = path3.resolve(junitPath);
|
|
1760
1770
|
if (!await fs3.access(fullPath, fs3.constants.F_OK).then(() => true).catch(() => false)) {
|
|
1761
1771
|
console.error(`Error: path ${fullPath} is not accessible`);
|
|
@@ -1802,6 +1812,7 @@ async function cmdConvert(junitPath, options) {
|
|
|
1802
1812
|
category: options.category
|
|
1803
1813
|
});
|
|
1804
1814
|
report.title = options.title ?? CIUtils.runTitle();
|
|
1815
|
+
report.generatedBy = { name: "flakiness CLI", version: package_default.version };
|
|
1805
1816
|
if (options.flakinessProject)
|
|
1806
1817
|
report.flakinessProject = options.flakinessProject;
|
|
1807
1818
|
await writeReport(report, attachments, options.outputDir);
|
|
@@ -2167,7 +2178,7 @@ function asInlineCode(text) {
|
|
|
2167
2178
|
|
|
2168
2179
|
// src/cli/cmd-skills-install.ts
|
|
2169
2180
|
import { execSync } from "child_process";
|
|
2170
|
-
import { styleText as
|
|
2181
|
+
import { styleText as styleText4 } from "node:util";
|
|
2171
2182
|
import fs5 from "fs";
|
|
2172
2183
|
import os3 from "os";
|
|
2173
2184
|
import path5 from "path";
|
|
@@ -2213,19 +2224,19 @@ async function cmdSkillsInstall(options) {
|
|
|
2213
2224
|
await fs5.promises.mkdir(path5.dirname(filePath), { recursive: true });
|
|
2214
2225
|
await fs5.promises.writeFile(filePath, file.content);
|
|
2215
2226
|
}
|
|
2216
|
-
console.log(`${
|
|
2227
|
+
console.log(`${styleText4("green", "\u2713")} Installed ${styleText4("bold", skill.name)} \u2192 ${styleText4("dim", dest)}`);
|
|
2217
2228
|
}
|
|
2218
2229
|
console.log("\nRestart your agent to pick up new skills.");
|
|
2219
2230
|
}
|
|
2220
2231
|
|
|
2221
2232
|
// src/cli/cmd-upload.ts
|
|
2222
2233
|
import { readReport, uploadReport } from "@flakiness/sdk";
|
|
2223
|
-
import { styleText as
|
|
2234
|
+
import { styleText as styleText5 } from "node:util";
|
|
2224
2235
|
import fs6 from "fs/promises";
|
|
2225
2236
|
import ora2 from "ora";
|
|
2226
2237
|
import path6 from "path";
|
|
2227
|
-
var warn = (txt) => console.warn(
|
|
2228
|
-
var err = (txt) => console.error(
|
|
2238
|
+
var warn = (txt) => console.warn(styleText5("yellow", `[flakiness.io] WARN: ${txt}`));
|
|
2239
|
+
var err = (txt) => console.error(styleText5("red", `[flakiness.io] Error: ${txt}`));
|
|
2229
2240
|
async function cmdUpload(relativePaths, options) {
|
|
2230
2241
|
const total = relativePaths.length;
|
|
2231
2242
|
const spinner = options.progress ? ora2("Uploading reports:").start() : void 0;
|
|
@@ -2423,9 +2434,9 @@ var optViewerUrl = new Option("-e, --viewer-url <url>", "A URL where report view
|
|
|
2423
2434
|
program.command("show").description("Show flakiness report").argument("[relative-path]", "Path to the folder that contains `report.json`", "flakiness-report").addOption(optViewerUrl).action(async (arg, options) => runCommand(async () => {
|
|
2424
2435
|
const dir = path7.resolve(arg ?? "flakiness-report");
|
|
2425
2436
|
if (!fs7.existsSync(dir))
|
|
2426
|
-
throw new Error(`Directory ${
|
|
2437
|
+
throw new Error(`Directory ${styleText6("bold", dir)} does not exist`);
|
|
2427
2438
|
if (!fs7.existsSync(path7.join(dir, "report.json")))
|
|
2428
|
-
throw new Error(`The folder ${
|
|
2439
|
+
throw new Error(`The folder ${styleText6("bold", dir)} does not contain report.json - is this a Flakiness report folder?`);
|
|
2429
2440
|
await showReport(dir, {
|
|
2430
2441
|
reportViewerUrl: options.viewerUrl
|
|
2431
2442
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flakiness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.258.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"flakiness": "./lib/cli/cli.js"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"author": "Degu Labs, Inc",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@playwright/test": "^1.
|
|
22
|
+
"@playwright/test": "^1.60.0",
|
|
23
23
|
"@types/debug": "^4.1.13",
|
|
24
24
|
"@types/express": "^4.17.25",
|
|
25
25
|
"gray-matter": "^4.0.3",
|
|
26
|
-
"@flakiness/server": "0.
|
|
27
|
-
"@flakiness/shared": "0.
|
|
26
|
+
"@flakiness/server": "0.258.0",
|
|
27
|
+
"@flakiness/shared": "0.258.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@flakiness/flakiness-report": "^0.
|
|
30
|
+
"@flakiness/flakiness-report": "^0.34.0",
|
|
31
31
|
"@flakiness/sdk": "^2.7.0",
|
|
32
32
|
"@rgrove/parse-xml": "^4.2.0",
|
|
33
33
|
"commander": "^14.0.3",
|