zephyr-enterprise-tools 1.0.4 → 1.0.6
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 +5 -30
- package/cli.js +2 -7
- package/package.json +1 -1
- package/zephyr-enterprise-tools.js +4 -4
package/README.md
CHANGED
|
@@ -46,11 +46,7 @@ Set environment variables:
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
export ZEPHYR_BASE_URL="https://your-zephyr.com/flex/services/rest/latest"
|
|
49
|
-
export
|
|
50
|
-
export ZEPHYR_PASSWORD="your-password"
|
|
51
|
-
|
|
52
|
-
# Or use a bearer token instead:
|
|
53
|
-
export ZEPHYR_TOKEN="your-token"
|
|
49
|
+
export ZEPHYR_TOKEN="your-api-token"
|
|
54
50
|
```
|
|
55
51
|
|
|
56
52
|
---
|
|
@@ -75,8 +71,6 @@ Create or edit `.vscode/mcp.json` in your workspace:
|
|
|
75
71
|
],
|
|
76
72
|
"env": {
|
|
77
73
|
"ZEPHYR_BASE_URL": "${input:zephyr_base_url}",
|
|
78
|
-
"ZEPHYR_USERNAME": "${input:zephyr_username}",
|
|
79
|
-
"ZEPHYR_PASSWORD": "${input:zephyr_password}",
|
|
80
74
|
"ZEPHYR_TOKEN": "${input:zephyr_token}"
|
|
81
75
|
}
|
|
82
76
|
}
|
|
@@ -88,22 +82,10 @@ Create or edit `.vscode/mcp.json` in your workspace:
|
|
|
88
82
|
"description": "Zephyr Enterprise API Base URL (e.g. https://your-zephyr.com/flex/services/rest/latest)",
|
|
89
83
|
"password": false
|
|
90
84
|
},
|
|
91
|
-
{
|
|
92
|
-
"id": "zephyr_username",
|
|
93
|
-
"type": "promptString",
|
|
94
|
-
"description": "Zephyr Enterprise Username (for Basic Auth)",
|
|
95
|
-
"password": false
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"id": "zephyr_password",
|
|
99
|
-
"type": "promptString",
|
|
100
|
-
"description": "Zephyr Enterprise Password (for Basic Auth)",
|
|
101
|
-
"password": true
|
|
102
|
-
},
|
|
103
85
|
{
|
|
104
86
|
"id": "zephyr_token",
|
|
105
87
|
"type": "promptString",
|
|
106
|
-
"description": "Zephyr Enterprise
|
|
88
|
+
"description": "Zephyr Enterprise API Token",
|
|
107
89
|
"password": true
|
|
108
90
|
}
|
|
109
91
|
]
|
|
@@ -125,9 +107,7 @@ Add to your `mcp.json` configuration:
|
|
|
125
107
|
],
|
|
126
108
|
"env": {
|
|
127
109
|
"ZEPHYR_BASE_URL": "https://your-zephyr.com/flex/services/rest/latest",
|
|
128
|
-
"
|
|
129
|
-
"ZEPHYR_PASSWORD": "your-password",
|
|
130
|
-
"ZEPHYR_TOKEN": "your-token"
|
|
110
|
+
"ZEPHYR_TOKEN": "your-api-token"
|
|
131
111
|
}
|
|
132
112
|
}
|
|
133
113
|
}
|
|
@@ -149,17 +129,13 @@ Edit your `claude_desktop_config.json` file:
|
|
|
149
129
|
],
|
|
150
130
|
"env": {
|
|
151
131
|
"ZEPHYR_BASE_URL": "https://your-zephyr.com/flex/services/rest/latest",
|
|
152
|
-
"
|
|
153
|
-
"ZEPHYR_PASSWORD": "your-password",
|
|
154
|
-
"ZEPHYR_TOKEN": "your-token"
|
|
132
|
+
"ZEPHYR_TOKEN": "your-api-token"
|
|
155
133
|
}
|
|
156
134
|
}
|
|
157
135
|
}
|
|
158
136
|
}
|
|
159
137
|
```
|
|
160
138
|
|
|
161
|
-
> **Note:** Use either `ZEPHYR_USERNAME` + `ZEPHYR_PASSWORD` for Basic Auth, or `ZEPHYR_TOKEN` for Bearer token authentication.
|
|
162
|
-
|
|
163
139
|
---
|
|
164
140
|
|
|
165
141
|
## 🖥️ CLI Usage
|
|
@@ -215,8 +191,7 @@ import QualityGates from 'zephyr-quality-gates';
|
|
|
215
191
|
|
|
216
192
|
const tools = new QualityGates({
|
|
217
193
|
baseUrl: 'https://your-zephyr.com/flex/services/rest/latest',
|
|
218
|
-
|
|
219
|
-
password: 'pass',
|
|
194
|
+
token: 'your-api-token',
|
|
220
195
|
});
|
|
221
196
|
|
|
222
197
|
// ── Release Readiness ──────────────────────────────────────
|
package/cli.js
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* export ZEPHYR_BASE_URL="https://your-zephyr.com/flex/services/rest/latest"
|
|
10
|
-
* export
|
|
11
|
-
* export ZEPHYR_PASSWORD="your-password"
|
|
10
|
+
* export ZEPHYR_TOKEN="your-api-token"
|
|
12
11
|
*
|
|
13
12
|
* zephyr-tools --project 364 --release 4312
|
|
14
13
|
* zephyr-tools -p 364 -r 4312 -t project-health
|
|
@@ -133,9 +132,7 @@ AVAILABLE TOOLS:
|
|
|
133
132
|
|
|
134
133
|
ENVIRONMENT VARIABLES:
|
|
135
134
|
ZEPHYR_BASE_URL Zephyr API base URL (required)
|
|
136
|
-
|
|
137
|
-
ZEPHYR_PASSWORD Password for Basic auth
|
|
138
|
-
ZEPHYR_TOKEN Bearer token (alternative to username/password)
|
|
135
|
+
ZEPHYR_TOKEN API token for authentication (required)
|
|
139
136
|
|
|
140
137
|
EXAMPLES:
|
|
141
138
|
# Run all quality gates (release readiness)
|
|
@@ -459,8 +456,6 @@ async function main() {
|
|
|
459
456
|
try {
|
|
460
457
|
const tools = new QualityGates({
|
|
461
458
|
baseUrl: process.env.ZEPHYR_BASE_URL,
|
|
462
|
-
username: process.env.ZEPHYR_USERNAME,
|
|
463
|
-
password: process.env.ZEPHYR_PASSWORD,
|
|
464
459
|
token: process.env.ZEPHYR_TOKEN,
|
|
465
460
|
});
|
|
466
461
|
|
package/package.json
CHANGED
|
@@ -59,20 +59,20 @@ export const LOW_RISK_PRIORITIES = ['low', 'trivial', 'p4', 'p5', '4', '5', 'low
|
|
|
59
59
|
export class QualityGates {
|
|
60
60
|
constructor(config) {
|
|
61
61
|
this.baseUrl = (config.baseUrl || process.env.ZEPHYR_BASE_URL || "").replace(/\/$/, "");
|
|
62
|
-
this.username = config.username || process.env.ZEPHYR_USERNAME || "";
|
|
63
|
-
this.password = config.password || process.env.ZEPHYR_PASSWORD || "";
|
|
64
62
|
this.token = config.token || process.env.ZEPHYR_TOKEN || "";
|
|
65
63
|
|
|
66
64
|
if (!this.baseUrl) {
|
|
67
65
|
throw new Error("ZEPHYR_BASE_URL is required");
|
|
68
66
|
}
|
|
67
|
+
if (!this.token) {
|
|
68
|
+
throw new Error("ZEPHYR_TOKEN is required");
|
|
69
|
+
}
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
// ─── HTTP Helper ────────────────────────────────────────────────────────────
|
|
72
73
|
|
|
73
74
|
authHeader() {
|
|
74
|
-
|
|
75
|
-
return { Authorization: `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}` };
|
|
75
|
+
return { Authorization: `Bearer ${this.token}` };
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
async request(method, path, params = {}) {
|