qatools-cli 1.1.8 → 1.1.10
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/package.json +2 -2
- package/qatools.js +33 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qatools-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "CLI for QA Tools — requirements, epics, sprints, sessions, App Context sync, project agenda. The companion to qa-tools.com.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "npm version patch --no-git-tag-version && npm publish",
|
|
7
7
|
"release:minor": "npm version minor --no-git-tag-version && npm publish"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"qatools": "
|
|
10
|
+
"qatools": "qatools.js"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"qatools.js"
|
package/qatools.js
CHANGED
|
@@ -740,6 +740,36 @@ program
|
|
|
740
740
|
process.exit(0);
|
|
741
741
|
});
|
|
742
742
|
|
|
743
|
+
// Non-blocking: warn if a newer qatools-cli is published on npm (sync can't upgrade the tool itself)
|
|
744
|
+
function cmpVersion(a, b) {
|
|
745
|
+
const pa = String(a).split(".").map(Number), pb = String(b).split(".").map(Number);
|
|
746
|
+
for (let i = 0; i < 3; i++) { const d = (pa[i] || 0) - (pb[i] || 0); if (d) return d < 0 ? -1 : 1; }
|
|
747
|
+
return 0;
|
|
748
|
+
}
|
|
749
|
+
function checkCliVersion() {
|
|
750
|
+
return new Promise((resolve) => {
|
|
751
|
+
try {
|
|
752
|
+
const current = require("./package.json").version;
|
|
753
|
+
const req = require("https").get("https://registry.npmjs.org/qatools-cli/latest", { timeout: 3000 }, (res) => {
|
|
754
|
+
let body = "";
|
|
755
|
+
res.on("data", (c) => (body += c));
|
|
756
|
+
res.on("end", () => {
|
|
757
|
+
try {
|
|
758
|
+
const latest = JSON.parse(body).version;
|
|
759
|
+
if (latest && cmpVersion(current, latest) < 0) {
|
|
760
|
+
console.log(`\n⚠ A newer qatools-cli is available: ${current} → ${latest}`);
|
|
761
|
+
console.log(` Upgrade so commands, skills and rules are current: npm i -g qatools-cli@latest\n`);
|
|
762
|
+
}
|
|
763
|
+
} catch { /* malformed response — skip */ }
|
|
764
|
+
resolve();
|
|
765
|
+
});
|
|
766
|
+
});
|
|
767
|
+
req.on("error", () => resolve());
|
|
768
|
+
req.on("timeout", () => { req.destroy(); resolve(); });
|
|
769
|
+
} catch { resolve(); }
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
|
|
743
773
|
program
|
|
744
774
|
.command("sync")
|
|
745
775
|
.description("Sync App Context from qa-tools into a CLAUDE.md block")
|
|
@@ -750,6 +780,7 @@ program
|
|
|
750
780
|
.option("-e, --email <email>", "Login email")
|
|
751
781
|
.option("-p, --password <password>", "Login password")
|
|
752
782
|
.action(async (options) => {
|
|
783
|
+
await checkCliVersion();
|
|
753
784
|
await authenticate(options);
|
|
754
785
|
const creds = getCredentials();
|
|
755
786
|
const projectId = options.project || creds?.projectId;
|
|
@@ -2059,6 +2090,7 @@ qatools backlog
|
|
|
2059
2090
|
qatools backlog-tags # List existing tags (MUST check before tagging)
|
|
2060
2091
|
qatools backlog-create -d "..." -t bug --requirement-key <key> --assigned <email> --developer <email> --sprint <id> --tags tag1,tag2
|
|
2061
2092
|
qatools backlog-update -i <id> --status resolved --sprint <id> --priority 1 --requirement-key <key> --developer <email> --tags tag1,tag2
|
|
2093
|
+
qatools notify --to <email> --subject "..." --message "..." # email a project member directly (e.g. "ready to test"); respects their opt-out
|
|
2062
2094
|
qatools backlog-duplicates --local # Output for local AI analysis (no API key needed)
|
|
2063
2095
|
qatools backlog-duplicates # AI-powered duplicate detection (requires API key)
|
|
2064
2096
|
|
|
@@ -2554,6 +2586,7 @@ export QATOOLS_API_KEY=${apiKey || "<din-nyckel>"}
|
|
|
2554
2586
|
- \`qatools template-upload -f file.json\` — upload test template
|
|
2555
2587
|
- \`qatools backlog-create -d "..." -t bug\` — create backlog item
|
|
2556
2588
|
- \`qatools backlog-update -i <id> --status resolved --evidence "..."\` — mark resolved (evidence required)
|
|
2589
|
+
- \`qatools notify --to <email> --subject "..." --message "..."\` — email a project member directly (respects opt-out)
|
|
2557
2590
|
- \`qatools access show\` — view access model
|
|
2558
2591
|
|
|
2559
2592
|
### Skills
|