flakiness 0.155.0 → 0.157.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 CHANGED
@@ -1,30 +1,129 @@
1
- # Flakiness SDK
2
-
3
- The package consists of:
4
- - A CLI to interact with flakiness.io service
5
- - A set of reporters for popular test runners to generate & upload Flakiness
6
- report.
7
-
8
- ## Getting Started
9
-
10
- To start using reporter with Playwright Test:
11
-
12
- 1. Install this package:
13
- ```bash
14
- npm i @flakiness/sdk@latest
15
- ```
16
- 2. Add flakiness.io to the `playwright.config.ts` file:
17
- ```ts
18
- import { defineConfig } from '@playwright/test';
19
-
20
- export default defineConfig({
21
- reporter: [
22
- ['list'],
23
- ['@flakiness/sdk/playwright-test', {
24
- endpoint: 'https://flakiness.io', // custom endpoint
25
- token: '...', // Flakiness access token
26
- collectBrowserVersion: true, // collect browser versions
27
- }]
28
- ],
29
- });
30
- ```
1
+ # Flakiness CLI
2
+
3
+ A command-line interface for interacting with [flakiness.io](https://flakiness.io) service.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g flakiness
9
+ ```
10
+
11
+ Or run directly with npx:
12
+
13
+ ```bash
14
+ npx flakiness <command>
15
+ ```
16
+
17
+ ## Commands
18
+
19
+ ### Authentication
20
+
21
+ ```bash
22
+ # Login to flakiness.io (opens browser for authentication)
23
+ flakiness login
24
+
25
+ # Show current logged-in user
26
+ flakiness whoami
27
+
28
+ # Logout from current session
29
+ flakiness logout
30
+ ```
31
+
32
+ ### Project Linking
33
+
34
+ Link your local repository to a flakiness.io project to show local reports in context of their cloud history.
35
+
36
+ ```bash
37
+ # Link using project URL
38
+ flakiness link https://flakiness.io/my-org/my-project
39
+
40
+ # Or using shorthand
41
+ flakiness link flakiness.io/my-org/my-project
42
+
43
+ # Check link status
44
+ flakiness status
45
+
46
+ # Unlink repository
47
+ flakiness unlink
48
+ ```
49
+
50
+ ### Upload Reports
51
+
52
+ Upload Flakiness report files to the service:
53
+
54
+ ```bash
55
+ # Upload using linked project
56
+ flakiness upload ./flakiness-report/report.json
57
+
58
+ # Upload with explicit access token
59
+ flakiness upload ./report.json --access-token <token>
60
+
61
+ # Upload with custom endpoint
62
+ flakiness upload ./report.json --endpoint https://custom.flakiness.io
63
+ ```
64
+
65
+ **Options:**
66
+ - `-t, --access-token <token>` — Read-write access token (env: `FLAKINESS_ACCESS_TOKEN`)
67
+ - `-e, --endpoint <url>` — Service endpoint (env: `FLAKINESS_ENDPOINT`)
68
+ - `--attachments-dir <dir>` — Directory containing attachments (defaults to report directory)
69
+
70
+ ### Download Reports
71
+
72
+ Download reports from a linked project:
73
+
74
+ ```bash
75
+ # Download all reports since a date
76
+ flakiness download --since 2024-01-01
77
+
78
+ # Download a specific run
79
+ flakiness download --run-id 123
80
+
81
+ # Download with parallel jobs
82
+ flakiness download --since 2024-01-01 -j 4
83
+ ```
84
+
85
+ ### View Reports
86
+
87
+ Open a local Flakiness report in the browser:
88
+
89
+ ```bash
90
+ # Show report from default directory (flakiness-report)
91
+ flakiness show
92
+
93
+ # Show report from specific path
94
+ flakiness show ./path/to/report
95
+ ```
96
+
97
+ ### Convert JUnit XML
98
+
99
+ Convert JUnit XML reports to Flakiness format:
100
+
101
+ ```bash
102
+ # Convert a single XML file
103
+ flakiness convert-junit ./junit-report.xml
104
+
105
+ # Convert all XML files in a directory
106
+ flakiness convert-junit ./test-results/
107
+
108
+ # With options
109
+ flakiness convert-junit ./junit.xml \
110
+ --env-name "CI" \
111
+ --commit-id abc123 \
112
+ --output-dir ./flakiness-report
113
+ ```
114
+
115
+ **Options:**
116
+ - `--env-name <name>` — Environment name for the report (default: `junit`)
117
+ - `--commit-id <id>` — Git commit ID (auto-detected if not provided)
118
+ - `--output-dir <dir>` — Output directory (default: `flakiness-report`)
119
+
120
+ ## Environment Variables
121
+
122
+ | Variable | Description |
123
+ |----------|-------------|
124
+ | `FLAKINESS_ACCESS_TOKEN` | Read-write access token for authentication |
125
+ | `FLAKINESS_ENDPOINT` | Custom service endpoint URL |
126
+
127
+ ## License
128
+
129
+ Fair Source 100
package/lib/cli/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // src/cli/cli.ts
4
4
  import { FlakinessProjectConfig as FlakinessProjectConfig4, showReport } from "@flakiness/sdk";
5
5
 
6
- // ../node_modules/vlq/src/index.js
6
+ // ../node_modules/.pnpm/vlq@2.0.4/node_modules/vlq/src/index.js
7
7
  var char_to_integer = {};
8
8
  var integer_to_char = {};
9
9
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(function(char, i) {
@@ -971,16 +971,16 @@ import path7 from "path";
971
971
  // ../package.json
972
972
  var package_default = {
973
973
  name: "flakiness",
974
- version: "0.155.0",
974
+ version: "0.157.0",
975
975
  type: "module",
976
976
  private: true,
977
977
  scripts: {
978
978
  minor: "./version.mjs minor",
979
979
  patch: "./version.mjs patch",
980
- dev: "npx kubik --env-file=.env.dev -w $(find . -name build.mts) ./app.mts ./stripe.mts",
981
- "dev+billing": "npx kubik --env-file=.env.dev+billing -w $(find . -name build.mts) ./app.mts ./stripe.mts",
982
- prod: "npx kubik --env-file=.env.prodlocal -w ./cli/build.mts ./server.mts ./web/build.mts ./experimental/build.mts ./landing/build.mts",
983
- build: "npx kubik $(find . -name build.mts)",
980
+ dev: "pnpm kubik --env-file=.env.dev -w $(find . -name build.mts) ./app.mts ./stripe.mts",
981
+ "dev+billing": "pnpm kubik --env-file=.env.dev+billing -w $(find . -name build.mts) ./app.mts ./stripe.mts",
982
+ prod: "pnpm kubik --env-file=.env.prodlocal -w ./cli/build.mts ./server.mts ./web/build.mts ./experimental/build.mts ./landing/build.mts",
983
+ build: "pnpm kubik $(find . -name build.mts)",
984
984
  perf: "node --max-old-space-size=10240 --enable-source-maps --env-file=.env.prodlocal experimental/lib/perf_filter.js"
985
985
  },
986
986
  engines: {
@@ -988,27 +988,15 @@ var package_default = {
988
988
  },
989
989
  author: "Degu Labs, Inc",
990
990
  license: "Fair Source 100",
991
- workspaces: [
992
- "./cli",
993
- "./docs",
994
- "./landing",
995
- "./legal",
996
- "./devenv",
997
- "./database",
998
- "./server",
999
- "./shared",
1000
- "./experimental",
1001
- "./web"
1002
- ],
1003
991
  devDependencies: {
1004
992
  "@flakiness/playwright": "^0.154.0",
1005
993
  "@playwright/test": "^1.57.0",
1006
- "@types/node": "^22.10.2",
1007
- esbuild: "^0.27.0",
1008
- glob: "^10.3.10",
994
+ "@types/node": "^22.19.3",
995
+ esbuild: "^0.27.2",
996
+ glob: "^10.5.0",
1009
997
  kubik: "^0.24.0",
1010
- tsx: "^4.19.2",
1011
- typescript: "^5.6.2"
998
+ tsx: "^4.21.0",
999
+ typescript: "^5.9.3"
1012
1000
  }
1013
1001
  };
1014
1002
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flakiness",
3
- "version": "0.155.0",
3
+ "version": "0.157.0",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "flakiness": "./lib/cli/cli.js"
@@ -15,21 +15,14 @@
15
15
  "type": "module",
16
16
  "description": "",
17
17
  "types": "./types/index.d.ts",
18
- "scripts": {
19
- "build:all": "npm run build:win && npm run build:linux && npm run build:mac && npm run build:alpine && npm run build:mac_intel",
20
- "build:win": "bun build ./lib/cli/cli.js --compile --minify --target=bun-windows-x64 --outfile dist/flakiness-win-x64.exe",
21
- "build:linux": "bun build ./lib/cli/cli.js --compile --minify --target=bun-linux-x64 --outfile dist/flakiness-linux-x64",
22
- "build:alpine": "bun build ./lib/cli/cli.js --compile --minify --target=bun-linux-x64-musl --outfile dist/flakiness-linux-x64-alpine",
23
- "build:mac": "bun build ./lib/cli/cli.js --compile --minify --target=bun-darwin-arm64 --outfile dist/flakiness-macos-arm64",
24
- "build:mac_intel": "bun build ./lib/cli/cli.js --compile --minify --target=bun-darwin-x64 --outfile dist/flakiness-macos-x64"
25
- },
26
18
  "keywords": [],
27
19
  "author": "Degu Labs, Inc",
28
20
  "license": "Fair Source 100",
29
21
  "devDependencies": {
30
- "@flakiness/server": "0.155.0",
31
- "@flakiness/shared": "0.155.0",
32
- "@playwright/test": "^1.57.0"
22
+ "@playwright/test": "^1.57.0",
23
+ "@types/express": "^4.17.20",
24
+ "@flakiness/server": "0.157.0",
25
+ "@flakiness/shared": "0.157.0"
33
26
  },
34
27
  "dependencies": {
35
28
  "@flakiness/sdk": "^0.154.0",
@@ -39,5 +32,13 @@
39
32
  "debug": "^4.3.7",
40
33
  "open": "^10.2.0",
41
34
  "ora": "^8.2.0"
35
+ },
36
+ "scripts": {
37
+ "build:all": "pnpm build:win && pnpm build:linux && pnpm build:mac && pnpm build:alpine && pnpm build:mac_intel",
38
+ "build:win": "bun build ./lib/cli/cli.js --compile --minify --target=bun-windows-x64 --outfile dist/flakiness-win-x64.exe",
39
+ "build:linux": "bun build ./lib/cli/cli.js --compile --minify --target=bun-linux-x64 --outfile dist/flakiness-linux-x64",
40
+ "build:alpine": "bun build ./lib/cli/cli.js --compile --minify --target=bun-linux-x64-musl --outfile dist/flakiness-linux-x64-alpine",
41
+ "build:mac": "bun build ./lib/cli/cli.js --compile --minify --target=bun-darwin-arm64 --outfile dist/flakiness-macos-arm64",
42
+ "build:mac_intel": "bun build ./lib/cli/cli.js --compile --minify --target=bun-darwin-x64 --outfile dist/flakiness-macos-x64"
42
43
  }
43
- }
44
+ }