@aaronsb/jira-cloud-mcp 0.7.0 → 0.7.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/build/index.js +10 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -22,7 +22,11 @@ import { toolSchemas } from './schemas/tool-schemas.js';
|
|
|
22
22
|
// Jira credentials from environment variables
|
|
23
23
|
const JIRA_EMAIL = process.env.JIRA_EMAIL;
|
|
24
24
|
const JIRA_API_TOKEN = process.env.JIRA_API_TOKEN;
|
|
25
|
-
|
|
25
|
+
// Normalize host: ensure https:// prefix, strip trailing slashes
|
|
26
|
+
const rawHost = process.env.JIRA_HOST?.trim();
|
|
27
|
+
const JIRA_HOST = rawHost
|
|
28
|
+
? (rawHost.startsWith('http') ? rawHost : `https://${rawHost}`).replace(/\/+$/, '')
|
|
29
|
+
: undefined;
|
|
26
30
|
if (!JIRA_EMAIL || !JIRA_API_TOKEN || !JIRA_HOST) {
|
|
27
31
|
const missing = [
|
|
28
32
|
!JIRA_API_TOKEN && 'JIRA_API_TOKEN',
|
|
@@ -34,7 +38,11 @@ if (!JIRA_EMAIL || !JIRA_API_TOKEN || !JIRA_HOST) {
|
|
|
34
38
|
process.exit(1);
|
|
35
39
|
}
|
|
36
40
|
const require = createRequire(import.meta.url);
|
|
37
|
-
|
|
41
|
+
let version = '0.0.0';
|
|
42
|
+
try {
|
|
43
|
+
version = require('../package.json').version;
|
|
44
|
+
}
|
|
45
|
+
catch { /* MCPB bundle — version unavailable */ }
|
|
38
46
|
/** Map manage_jira_issue update args to GraphIssue field patches */
|
|
39
47
|
function extractChangedFields(args) {
|
|
40
48
|
const fields = {};
|
package/package.json
CHANGED