zephyr-enterprise-tools 1.0.3 → 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.
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 ZEPHYR_USERNAME="your-username"
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
- ZEPHYR_USERNAME Username for Basic auth
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-enterprise-tools",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Comprehensive Zephyr Enterprise Tools - Release Readiness, Project Health, Test Analytics & More",
5
5
  "main": "zephyr-enterprise-tools.js",
6
6
  "exports": {
@@ -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
- if (this.token) return { Authorization: `Bearer ${this.token}` };
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 = {}) {
@@ -936,7 +936,7 @@ export class QualityGates {
936
936
  isascorder: true,
937
937
  is_cfield: false,
938
938
  releaseid: String(releaseId),
939
- projectid: "",
939
+ projectid: String(projectId),
940
940
  word: `executedOn > "${startDateStr}"`,
941
941
  zql: true,
942
942
  isOld: false