@fatecannotbealtered-/jira-cli 1.1.0 → 1.1.1
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/.agent/AGENT.md +59 -0
- package/.agent/AGENT_zh.md +59 -0
- package/.agent/CLI-SPEC.md +691 -0
- package/.agent/CLI-SPEC_zh.md +641 -0
- package/.agent/SEC-SPEC.md +142 -0
- package/.agent/SEC-SPEC_zh.md +126 -0
- package/.agent/SKILL-SPEC.md +199 -0
- package/.agent/SKILL-SPEC_zh.md +195 -0
- package/AGENTS.md +17 -0
- package/CHANGELOG.md +42 -2
- package/CODE_OF_CONDUCT.md +35 -0
- package/CODE_OF_CONDUCT_zh.md +35 -0
- package/CONTRIBUTING.md +24 -4
- package/LICENSE +1 -1
- package/NOTICE.md +10 -0
- package/README.md +95 -448
- package/README_zh.md +130 -0
- package/SECURITY.md +39 -0
- package/docs/COMPATIBILITY.md +28 -0
- package/docs/E2E.md +42 -0
- package/docs/LIVE-SMOKE-EVIDENCE.md +77 -0
- package/docs/OPEN_SOURCE_CHECKLIST.md +37 -0
- package/package.json +24 -18
- package/scripts/run.js +32 -9
- package/skills/jira-cli/SKILL.md +118 -341
- package/skills/jira-cli/test-prompts.json +27 -0
- package/scripts/install.js +0 -136
package/scripts/install.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const crypto = require("crypto");
|
|
7
|
-
const { execFileSync } = require("child_process");
|
|
8
|
-
const os = require("os");
|
|
9
|
-
|
|
10
|
-
const VERSION = require("../package.json").version;
|
|
11
|
-
const REPO = "fatecannotbealtered/jira-cli";
|
|
12
|
-
const NAME = "jira-cli";
|
|
13
|
-
|
|
14
|
-
const PLATFORM_MAP = {
|
|
15
|
-
darwin: "darwin",
|
|
16
|
-
linux: "linux",
|
|
17
|
-
win32: "windows",
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const ARCH_MAP = {
|
|
21
|
-
x64: "amd64",
|
|
22
|
-
arm64: "arm64",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const platform = PLATFORM_MAP[process.platform];
|
|
26
|
-
let arch = ARCH_MAP[process.arch];
|
|
27
|
-
|
|
28
|
-
// Windows ARM64: fall back to amd64 (runs via emulation)
|
|
29
|
-
if (process.platform === "win32" && process.arch === "arm64") {
|
|
30
|
-
console.log("Windows ARM64 detected, falling back to x64 binary (runs via emulation)");
|
|
31
|
-
arch = "amd64";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!platform || !arch) {
|
|
35
|
-
console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
36
|
-
console.error(`\nManually download from:\n https://github.com/${REPO}/releases`);
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const isWindows = process.platform === "win32";
|
|
41
|
-
const ext = isWindows ? ".zip" : ".tar.gz";
|
|
42
|
-
const archiveName = `${NAME}-${VERSION}-${platform}-${arch}${ext}`;
|
|
43
|
-
const GITHUB_URL = `https://github.com/${REPO}/releases/download/v${VERSION}/${archiveName}`;
|
|
44
|
-
|
|
45
|
-
const binDir = path.join(__dirname, "..", "bin");
|
|
46
|
-
const dest = path.join(binDir, NAME + (isWindows ? ".exe" : ""));
|
|
47
|
-
|
|
48
|
-
fs.mkdirSync(binDir, { recursive: true });
|
|
49
|
-
|
|
50
|
-
function download(url, destPath) {
|
|
51
|
-
const args = [
|
|
52
|
-
"--fail", "--location", "--silent", "--show-error",
|
|
53
|
-
"--connect-timeout", "15", "--max-time", "120",
|
|
54
|
-
"--output", destPath, url,
|
|
55
|
-
];
|
|
56
|
-
if (isWindows) {
|
|
57
|
-
args.unshift("--ssl-revoke-best-effort");
|
|
58
|
-
}
|
|
59
|
-
execFileSync("curl", args, { stdio: ["ignore", "ignore", "pipe"] });
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function verifyChecksum(filePath, expectedHash) {
|
|
63
|
-
const fileBuffer = fs.readFileSync(filePath);
|
|
64
|
-
const hash = crypto.createHash("sha256").update(fileBuffer).digest("hex");
|
|
65
|
-
if (hash !== expectedHash) {
|
|
66
|
-
throw new Error(
|
|
67
|
-
`Checksum mismatch!\n Expected: ${expectedHash}\n Actual: ${hash}`
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function install() {
|
|
73
|
-
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "jira-cli-"));
|
|
74
|
-
const archivePath = path.join(tmpDir, archiveName);
|
|
75
|
-
const checksumURL = `https://github.com/${REPO}/releases/download/v${VERSION}/checksums.txt`;
|
|
76
|
-
const checksumPath = path.join(tmpDir, "checksums.txt");
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
console.log(`Downloading ${NAME} v${VERSION} for ${platform}-${arch}...`);
|
|
80
|
-
download(GITHUB_URL, archivePath);
|
|
81
|
-
|
|
82
|
-
// Verify checksum
|
|
83
|
-
try {
|
|
84
|
-
download(checksumURL, checksumPath);
|
|
85
|
-
const checksumContent = fs.readFileSync(checksumPath, "utf8");
|
|
86
|
-
const line = checksumContent
|
|
87
|
-
.split("\n")
|
|
88
|
-
.find((l) => l.includes(archiveName));
|
|
89
|
-
if (line) {
|
|
90
|
-
const expectedHash = line.trim().split(/\s+/)[0];
|
|
91
|
-
verifyChecksum(archivePath, expectedHash);
|
|
92
|
-
console.log("✔ Checksum verified");
|
|
93
|
-
} else {
|
|
94
|
-
console.warn("Warning: archive not found in checksums.txt, skipping verification");
|
|
95
|
-
}
|
|
96
|
-
} catch (checksumErr) {
|
|
97
|
-
if (checksumErr.message.includes("Checksum mismatch")) {
|
|
98
|
-
throw checksumErr;
|
|
99
|
-
}
|
|
100
|
-
console.warn("Warning: could not verify checksum —", checksumErr.message);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Extract binary
|
|
104
|
-
if (isWindows) {
|
|
105
|
-
execFileSync("powershell", [
|
|
106
|
-
"-Command",
|
|
107
|
-
`Expand-Archive -Path '${archivePath}' -DestinationPath '${tmpDir}' -Force`,
|
|
108
|
-
], { stdio: "ignore" });
|
|
109
|
-
} else {
|
|
110
|
-
execFileSync("tar", ["-xzf", archivePath, "-C", tmpDir], {
|
|
111
|
-
stdio: "ignore",
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const binaryName = NAME + (isWindows ? ".exe" : "");
|
|
116
|
-
const extractedBinary = path.join(tmpDir, binaryName);
|
|
117
|
-
|
|
118
|
-
fs.copyFileSync(extractedBinary, dest);
|
|
119
|
-
if (!isWindows) {
|
|
120
|
-
fs.chmodSync(dest, 0o755);
|
|
121
|
-
}
|
|
122
|
-
console.log(`✔ ${NAME} v${VERSION} installed successfully`);
|
|
123
|
-
} finally {
|
|
124
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
install();
|
|
130
|
-
} catch (err) {
|
|
131
|
-
console.error(`Failed to install ${NAME}:`, err.message);
|
|
132
|
-
console.error(
|
|
133
|
-
`\nManually download from:\n https://github.com/${REPO}/releases\n`
|
|
134
|
-
);
|
|
135
|
-
process.exit(1);
|
|
136
|
-
}
|