@atlassian-dc-mcp/common 0.16.0 → 0.17.0
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/CHANGELOG.md +11 -0
- package/build/__tests__/runtime-config.test.js +65 -14
- package/build/__tests__/runtime-config.test.js.map +1 -1
- package/build/__tests__/setup-cli.test.d.ts +2 -0
- package/build/__tests__/setup-cli.test.d.ts.map +1 -0
- package/build/__tests__/setup-cli.test.js +166 -0
- package/build/__tests__/setup-cli.test.js.map +1 -0
- package/build/config/__tests__/registry.test.d.ts +2 -0
- package/build/config/__tests__/registry.test.d.ts.map +1 -0
- package/build/config/__tests__/registry.test.js +105 -0
- package/build/config/__tests__/registry.test.js.map +1 -0
- package/build/config/__tests__/sources/env-file.test.d.ts +2 -0
- package/build/config/__tests__/sources/env-file.test.d.ts.map +1 -0
- package/build/config/__tests__/sources/env-file.test.js +93 -0
- package/build/config/__tests__/sources/env-file.test.js.map +1 -0
- package/build/config/__tests__/sources/home-file.test.d.ts +2 -0
- package/build/config/__tests__/sources/home-file.test.d.ts.map +1 -0
- package/build/config/__tests__/sources/home-file.test.js +114 -0
- package/build/config/__tests__/sources/home-file.test.js.map +1 -0
- package/build/config/__tests__/sources/macos-keychain.test.d.ts +2 -0
- package/build/config/__tests__/sources/macos-keychain.test.d.ts.map +1 -0
- package/build/config/__tests__/sources/macos-keychain.test.js +109 -0
- package/build/config/__tests__/sources/macos-keychain.test.js.map +1 -0
- package/build/config/__tests__/sources/process-env.test.d.ts +2 -0
- package/build/config/__tests__/sources/process-env.test.d.ts.map +1 -0
- package/build/config/__tests__/sources/process-env.test.js +51 -0
- package/build/config/__tests__/sources/process-env.test.js.map +1 -0
- package/build/config/index.d.ts +8 -0
- package/build/config/index.d.ts.map +1 -0
- package/build/config/index.js +8 -0
- package/build/config/index.js.map +1 -0
- package/build/config/registry.d.ts +26 -0
- package/build/config/registry.d.ts.map +1 -0
- package/build/config/registry.js +51 -0
- package/build/config/registry.js.map +1 -0
- package/build/config/runtime-config.d.ts +14 -0
- package/build/config/runtime-config.d.ts.map +1 -0
- package/build/config/runtime-config.js +41 -0
- package/build/config/runtime-config.js.map +1 -0
- package/build/config/source.d.ts +28 -0
- package/build/config/source.d.ts.map +1 -0
- package/build/config/source.js +11 -0
- package/build/config/source.js.map +1 -0
- package/build/config/sources/dotenv-file-cache.d.ts +12 -0
- package/build/config/sources/dotenv-file-cache.d.ts.map +1 -0
- package/build/config/sources/dotenv-file-cache.js +41 -0
- package/build/config/sources/dotenv-file-cache.js.map +1 -0
- package/build/config/sources/env-file.d.ts +16 -0
- package/build/config/sources/env-file.d.ts.map +1 -0
- package/build/config/sources/env-file.js +48 -0
- package/build/config/sources/env-file.js.map +1 -0
- package/build/config/sources/home-file.d.ts +19 -0
- package/build/config/sources/home-file.d.ts.map +1 -0
- package/build/config/sources/home-file.js +102 -0
- package/build/config/sources/home-file.js.map +1 -0
- package/build/config/sources/macos-keychain.d.ts +26 -0
- package/build/config/sources/macos-keychain.d.ts.map +1 -0
- package/build/config/sources/macos-keychain.js +88 -0
- package/build/config/sources/macos-keychain.js.map +1 -0
- package/build/config/sources/process-env.d.ts +8 -0
- package/build/config/sources/process-env.d.ts.map +1 -0
- package/build/config/sources/process-env.js +12 -0
- package/build/config/sources/process-env.js.map +1 -0
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/setup-cli.d.ts +25 -0
- package/build/setup-cli.d.ts.map +1 -0
- package/build/setup-cli.js +215 -0
- package/build/setup-cli.js.map +1 -0
- package/package.json +5 -4
- package/src/__tests__/runtime-config.test.ts +75 -27
- package/src/__tests__/setup-cli.test.ts +175 -0
- package/src/config/__tests__/registry.test.ts +118 -0
- package/src/config/__tests__/sources/env-file.test.ts +113 -0
- package/src/config/__tests__/sources/home-file.test.ts +129 -0
- package/src/config/__tests__/sources/macos-keychain.test.ts +136 -0
- package/src/config/__tests__/sources/process-env.test.ts +59 -0
- package/src/config/index.ts +7 -0
- package/src/config/registry.ts +79 -0
- package/src/config/runtime-config.ts +60 -0
- package/src/config/source.ts +37 -0
- package/src/config/sources/dotenv-file-cache.ts +54 -0
- package/src/config/sources/env-file.ts +61 -0
- package/src/config/sources/home-file.ts +121 -0
- package/src/config/sources/macos-keychain.ts +117 -0
- package/src/config/sources/process-env.ts +15 -0
- package/src/index.ts +2 -1
- package/src/setup-cli.ts +308 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/runtime-config.d.ts +0 -14
- package/build/runtime-config.d.ts.map +0 -1
- package/build/runtime-config.js +0 -123
- package/build/runtime-config.js.map +0 -1
- package/src/runtime-config.ts +0 -176
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConfigKey, ProductDefinition, ReadableSource, SourceId } from '../source.js';
|
|
2
|
+
export declare const ATLASSIAN_DC_MCP_CONFIG_FILE_ENV_VAR = "ATLASSIAN_DC_MCP_CONFIG_FILE";
|
|
3
|
+
export declare class EnvFileSource implements ReadableSource {
|
|
4
|
+
readonly id: SourceId;
|
|
5
|
+
readonly priority = 80;
|
|
6
|
+
private cwd;
|
|
7
|
+
private cache;
|
|
8
|
+
initialize(options?: {
|
|
9
|
+
cwd?: string;
|
|
10
|
+
}): void;
|
|
11
|
+
read(product: ProductDefinition, key: ConfigKey): string | undefined;
|
|
12
|
+
describe(): string;
|
|
13
|
+
private getExplicitFilePath;
|
|
14
|
+
private loadFile;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=env-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-file.d.ts","sourceRoot":"","sources":["../../../src/config/sources/env-file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQ3F,eAAO,MAAM,oCAAoC,iCAAiC,CAAC;AAEnF,qBAAa,aAAc,YAAW,cAAc;IAClD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAc;IACnC,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,GAAG,CAAyB;IACpC,OAAO,CAAC,KAAK,CAAyB;IAEtC,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAK5C,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAKpE,QAAQ,IAAI,MAAM;IAIlB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,QAAQ;CAiBjB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { getNonEmptyValue } from '../source.js';
|
|
3
|
+
import { DotenvFileCache, DotenvFileNotFoundError, } from './dotenv-file-cache.js';
|
|
4
|
+
export const ATLASSIAN_DC_MCP_CONFIG_FILE_ENV_VAR = 'ATLASSIAN_DC_MCP_CONFIG_FILE';
|
|
5
|
+
export class EnvFileSource {
|
|
6
|
+
id = 'env-file';
|
|
7
|
+
priority = 80;
|
|
8
|
+
cwd = process.cwd();
|
|
9
|
+
cache = new DotenvFileCache();
|
|
10
|
+
initialize(options) {
|
|
11
|
+
this.cwd = options?.cwd ?? process.cwd();
|
|
12
|
+
this.loadFile();
|
|
13
|
+
}
|
|
14
|
+
read(product, key) {
|
|
15
|
+
const values = this.loadFile();
|
|
16
|
+
return getNonEmptyValue(values[product.envVars[key]]);
|
|
17
|
+
}
|
|
18
|
+
describe() {
|
|
19
|
+
return this.cache.filePath ? `env-file (${this.cache.filePath})` : 'env-file';
|
|
20
|
+
}
|
|
21
|
+
getExplicitFilePath() {
|
|
22
|
+
const filePath = getNonEmptyValue(process.env[ATLASSIAN_DC_MCP_CONFIG_FILE_ENV_VAR]);
|
|
23
|
+
if (!filePath) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (!path.isAbsolute(filePath)) {
|
|
27
|
+
throw new Error(`${ATLASSIAN_DC_MCP_CONFIG_FILE_ENV_VAR} must be an absolute path: ${filePath}`);
|
|
28
|
+
}
|
|
29
|
+
return filePath;
|
|
30
|
+
}
|
|
31
|
+
loadFile() {
|
|
32
|
+
const explicitFilePath = this.getExplicitFilePath();
|
|
33
|
+
const filePath = explicitFilePath ?? path.join(this.cwd, '.env');
|
|
34
|
+
try {
|
|
35
|
+
return this.cache.load(filePath);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof DotenvFileNotFoundError) {
|
|
39
|
+
if (explicitFilePath) {
|
|
40
|
+
throw new Error(`${ATLASSIAN_DC_MCP_CONFIG_FILE_ENV_VAR} points to a missing file: ${error.filePath}`);
|
|
41
|
+
}
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=env-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-file.js","sourceRoot":"","sources":["../../../src/config/sources/env-file.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,eAAe,EACf,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,MAAM,oCAAoC,GAAG,8BAA8B,CAAC;AAEnF,MAAM,OAAO,aAAa;IACf,EAAE,GAAa,UAAU,CAAC;IAC1B,QAAQ,GAAG,EAAE,CAAC;IAEf,GAAG,GAAW,OAAO,CAAC,GAAG,EAAE,CAAC;IAC5B,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IAEtC,UAAU,CAAC,OAA0B;QACnC,IAAI,CAAC,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,C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,EAAE,CACtF,CAAC;gBACJ,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ConfigKey, ProductDefinition, SourceId, WritableSource } from '../source.js';
|
|
2
|
+
declare const HOME_DIR_NAME = ".atlassian-dc-mcp";
|
|
3
|
+
declare function getHomeFilePath(product: ProductDefinition | string): string;
|
|
4
|
+
export declare class HomeFileSource implements WritableSource {
|
|
5
|
+
readonly id: SourceId;
|
|
6
|
+
readonly priority = 60;
|
|
7
|
+
private cache;
|
|
8
|
+
isAvailable(): boolean;
|
|
9
|
+
read(product: ProductDefinition, key: ConfigKey): string | undefined;
|
|
10
|
+
describe(): string;
|
|
11
|
+
describeForProduct(product: ProductDefinition): string;
|
|
12
|
+
write(product: ProductDefinition, key: ConfigKey, value: string): void;
|
|
13
|
+
clear(product: ProductDefinition, key: ConfigKey): void;
|
|
14
|
+
private loadFile;
|
|
15
|
+
private readFileIgnoringErrors;
|
|
16
|
+
private persist;
|
|
17
|
+
}
|
|
18
|
+
export { getHomeFilePath, HOME_DIR_NAME };
|
|
19
|
+
//# sourceMappingURL=home-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-file.d.ts","sourceRoot":"","sources":["../../../src/config/sources/home-file.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ3F,QAAA,MAAM,aAAa,sBAAsB,CAAC;AAE1C,iBAAS,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAGpE;AAqBD,qBAAa,cAAe,YAAW,cAAc;IACnD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAe;IACpC,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,KAAK,CAAyB;IAEtC,WAAW,IAAI,OAAO;IAItB,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAKpE,QAAQ,IAAI,MAAM;IAIlB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM;IAItD,KAAK,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAOtE,KAAK,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI;IAUvD,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,OAAO;CAoBhB;AAED,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { getNonEmptyValue } from '../source.js';
|
|
6
|
+
import { DotenvFileCache, DotenvFileNotFoundError, } from './dotenv-file-cache.js';
|
|
7
|
+
const HOME_DIR_NAME = '.atlassian-dc-mcp';
|
|
8
|
+
function getHomeFilePath(product) {
|
|
9
|
+
const id = typeof product === 'string' ? product : product.id;
|
|
10
|
+
return path.join(os.homedir(), HOME_DIR_NAME, `${id}.env`);
|
|
11
|
+
}
|
|
12
|
+
function needsQuoting(value) {
|
|
13
|
+
return /[\s#'"]/.test(value);
|
|
14
|
+
}
|
|
15
|
+
function serializeValue(value) {
|
|
16
|
+
if (!needsQuoting(value)) {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
return `"${value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
20
|
+
}
|
|
21
|
+
function serialize(values) {
|
|
22
|
+
const lines = [];
|
|
23
|
+
for (const [key, raw] of Object.entries(values)) {
|
|
24
|
+
lines.push(`${key}=${serializeValue(raw)}`);
|
|
25
|
+
}
|
|
26
|
+
return lines.length > 0 ? `${lines.join('\n')}\n` : '';
|
|
27
|
+
}
|
|
28
|
+
export class HomeFileSource {
|
|
29
|
+
id = 'home-file';
|
|
30
|
+
priority = 60;
|
|
31
|
+
cache = new DotenvFileCache();
|
|
32
|
+
isAvailable() {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
read(product, key) {
|
|
36
|
+
const values = this.loadFile(product);
|
|
37
|
+
return getNonEmptyValue(values[product.envVars[key]]);
|
|
38
|
+
}
|
|
39
|
+
describe() {
|
|
40
|
+
return `home-file (~/${HOME_DIR_NAME}/<product>.env)`;
|
|
41
|
+
}
|
|
42
|
+
describeForProduct(product) {
|
|
43
|
+
return `home-file (${getHomeFilePath(product)})`;
|
|
44
|
+
}
|
|
45
|
+
write(product, key, value) {
|
|
46
|
+
const envVar = product.envVars[key];
|
|
47
|
+
const existing = this.readFileIgnoringErrors(product);
|
|
48
|
+
existing[envVar] = value;
|
|
49
|
+
this.persist(product, existing);
|
|
50
|
+
}
|
|
51
|
+
clear(product, key) {
|
|
52
|
+
const envVar = product.envVars[key];
|
|
53
|
+
const existing = this.readFileIgnoringErrors(product);
|
|
54
|
+
if (!(envVar in existing)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
delete existing[envVar];
|
|
58
|
+
this.persist(product, existing);
|
|
59
|
+
}
|
|
60
|
+
loadFile(product) {
|
|
61
|
+
const filePath = getHomeFilePath(product);
|
|
62
|
+
try {
|
|
63
|
+
return this.cache.load(filePath);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
if (error instanceof DotenvFileNotFoundError) {
|
|
67
|
+
return {};
|
|
68
|
+
}
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
readFileIgnoringErrors(product) {
|
|
73
|
+
try {
|
|
74
|
+
return { ...this.loadFile(product) };
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
persist(product, values) {
|
|
81
|
+
const filePath = getHomeFilePath(product);
|
|
82
|
+
const dir = path.dirname(filePath);
|
|
83
|
+
fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
84
|
+
const tmpPath = `${filePath}.tmp-${process.pid}-${crypto.randomBytes(4).toString('hex')}`;
|
|
85
|
+
try {
|
|
86
|
+
fs.writeFileSync(tmpPath, serialize(values), { mode: 0o600 });
|
|
87
|
+
fs.renameSync(tmpPath, filePath);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
try {
|
|
91
|
+
fs.unlinkSync(tmpPath);
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
// best-effort cleanup
|
|
95
|
+
}
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
this.cache.invalidate();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export { getHomeFilePath, HOME_DIR_NAME };
|
|
102
|
+
//# sourceMappingURL=home-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-file.js","sourceRoot":"","sources":["../../../src/config/sources/home-file.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,eAAe,EACf,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C,SAAS,eAAe,CAAC,OAAmC;IAC1D,MAAM,EAAE,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAA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s';
|
|
3
|
+
import type { ConfigKey, ProductDefinition, SourceId, WritableSource } from '../source.js';
|
|
4
|
+
export declare const SECURITY_BINARY = "/usr/bin/security";
|
|
5
|
+
export declare const KEYCHAIN_SERVICE = "atlassian-dc-mcp";
|
|
6
|
+
export declare const NOT_FOUND_STATUS = 44;
|
|
7
|
+
export type KeychainDeps = {
|
|
8
|
+
execFileSync: typeof nodeExecFileSync;
|
|
9
|
+
existsSync: typeof nodeExistsSync;
|
|
10
|
+
getPlatform: () => NodeJS.Platform;
|
|
11
|
+
};
|
|
12
|
+
export declare class MacosKeychainSource implements WritableSource {
|
|
13
|
+
readonly id: SourceId;
|
|
14
|
+
readonly priority = 40;
|
|
15
|
+
private cache;
|
|
16
|
+
private cacheWarmed;
|
|
17
|
+
private readonly deps;
|
|
18
|
+
constructor(deps?: Partial<KeychainDeps>);
|
|
19
|
+
isAvailable(): boolean;
|
|
20
|
+
read(product: ProductDefinition, key: ConfigKey): string | undefined;
|
|
21
|
+
describe(): string;
|
|
22
|
+
write(product: ProductDefinition, key: ConfigKey, value: string): void;
|
|
23
|
+
clear(product: ProductDefinition, key: ConfigKey): void;
|
|
24
|
+
private findPassword;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=macos-keychain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macos-keychain.d.ts","sourceRoot":"","sources":["../../../src/config/sources/macos-keychain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAO3F,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,OAAO,gBAAgB,CAAC;IACtC,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,WAAW,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC;CACpC,CAAC;AAYF,qBAAa,mBAAoB,YAAW,cAAc;IACxD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAoB;IACzC,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,KAAK,CAAyC;IACtD,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;gBAExB,IAAI,GAAE,OAAO,CAAC,YAAY,CAAM;IAI5C,WAAW,IAAI,OAAO;IAItB,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAapE,QAAQ,IAAI,MAAM;IAIlB,KAAK,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAsBtE,KAAK,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI;IAiBvD,OAAO,CAAC,YAAY;CAcrB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { execFileSync as nodeExecFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync as nodeExistsSync } from 'node:fs';
|
|
3
|
+
// We pass the token via `-w <value>` on write. `security add-generic-password`
|
|
4
|
+
// has no stdin-password mode, so the token is visible in argv to same-user
|
|
5
|
+
// processes. A same-user attacker already has keychain access via `security`
|
|
6
|
+
// itself; this does not widen the attack surface.
|
|
7
|
+
export const SECURITY_BINARY = '/usr/bin/security';
|
|
8
|
+
export const KEYCHAIN_SERVICE = 'atlassian-dc-mcp';
|
|
9
|
+
const KEYCHAIN_TIMEOUT_MS = 5000;
|
|
10
|
+
export const NOT_FOUND_STATUS = 44;
|
|
11
|
+
function accountFor(product) {
|
|
12
|
+
return `${product.id}-token`;
|
|
13
|
+
}
|
|
14
|
+
const DEFAULT_DEPS = {
|
|
15
|
+
execFileSync: nodeExecFileSync,
|
|
16
|
+
existsSync: nodeExistsSync,
|
|
17
|
+
getPlatform: () => process.platform,
|
|
18
|
+
};
|
|
19
|
+
export class MacosKeychainSource {
|
|
20
|
+
id = 'macos-keychain';
|
|
21
|
+
priority = 40;
|
|
22
|
+
cache = new Map();
|
|
23
|
+
cacheWarmed = new Set();
|
|
24
|
+
deps;
|
|
25
|
+
constructor(deps = {}) {
|
|
26
|
+
this.deps = { ...DEFAULT_DEPS, ...deps };
|
|
27
|
+
}
|
|
28
|
+
isAvailable() {
|
|
29
|
+
return this.deps.getPlatform() === 'darwin' && this.deps.existsSync(SECURITY_BINARY);
|
|
30
|
+
}
|
|
31
|
+
read(product, key) {
|
|
32
|
+
if (key !== 'token' || !this.isAvailable()) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (this.cacheWarmed.has(product.id)) {
|
|
36
|
+
return this.cache.get(product.id);
|
|
37
|
+
}
|
|
38
|
+
const value = this.findPassword(product);
|
|
39
|
+
this.cache.set(product.id, value);
|
|
40
|
+
this.cacheWarmed.add(product.id);
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
describe() {
|
|
44
|
+
return 'macOS Keychain';
|
|
45
|
+
}
|
|
46
|
+
write(product, key, value) {
|
|
47
|
+
if (key !== 'token') {
|
|
48
|
+
throw new Error('macOS Keychain only stores the token key');
|
|
49
|
+
}
|
|
50
|
+
if (!this.isAvailable()) {
|
|
51
|
+
throw new Error('macOS Keychain is not available on this platform');
|
|
52
|
+
}
|
|
53
|
+
this.deps.execFileSync(SECURITY_BINARY, [
|
|
54
|
+
'add-generic-password',
|
|
55
|
+
'-U',
|
|
56
|
+
'-s', KEYCHAIN_SERVICE,
|
|
57
|
+
'-a', accountFor(product),
|
|
58
|
+
'-w', value,
|
|
59
|
+
], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8', timeout: KEYCHAIN_TIMEOUT_MS });
|
|
60
|
+
this.cache.set(product.id, value);
|
|
61
|
+
this.cacheWarmed.add(product.id);
|
|
62
|
+
}
|
|
63
|
+
clear(product, key) {
|
|
64
|
+
if (key !== 'token' || !this.isAvailable()) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
this.deps.execFileSync(SECURITY_BINARY, ['delete-generic-password', '-s', KEYCHAIN_SERVICE, '-a', accountFor(product)], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8', timeout: KEYCHAIN_TIMEOUT_MS });
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// absent / already cleared — non-fatal
|
|
72
|
+
}
|
|
73
|
+
this.cache.set(product.id, undefined);
|
|
74
|
+
this.cacheWarmed.add(product.id);
|
|
75
|
+
}
|
|
76
|
+
findPassword(product) {
|
|
77
|
+
try {
|
|
78
|
+
const stdout = this.deps.execFileSync(SECURITY_BINARY, ['find-generic-password', '-s', KEYCHAIN_SERVICE, '-a', accountFor(product), '-w'], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8', timeout: KEYCHAIN_TIMEOUT_MS });
|
|
79
|
+
return String(stdout).replace(/\n$/, '');
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// exit 44 = not found; any other failure (locked keychain, etc.) is
|
|
83
|
+
// treated as absent so the resolver continues down the chain.
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=macos-keychain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macos-keychain.js","sourceRoot":"","sources":["../../../src/config/sources/macos-keychain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,UAAU,IAA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,EAAE,EAAE,CAAC;YAC3C,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,YAAY,CACpB,eAAe,EACf,CAAC,yBAAyB,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAC9E,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,CACtF,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,uCAAuC;QACzC,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEO,YAAY,CAAC,OAA0B;QAC7C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CACnC,eAAe,EACf,CAAC,uBAAuB,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAClF,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,CACtF,CAAC;YACF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;YACpE,8DAA8D;YAC9D,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ConfigKey, ProductDefinition, ReadableSource, SourceId } from '../source.js';
|
|
2
|
+
export declare class ProcessEnvSource implements ReadableSource {
|
|
3
|
+
readonly id: SourceId;
|
|
4
|
+
readonly priority = 100;
|
|
5
|
+
read(product: ProductDefinition, key: ConfigKey): string | undefined;
|
|
6
|
+
describe(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=process-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-env.d.ts","sourceRoot":"","sources":["../../../src/config/sources/process-env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG3F,qBAAa,gBAAiB,YAAW,cAAc;IACrD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAiB;IACtC,QAAQ,CAAC,QAAQ,OAAO;IAExB,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAIpE,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getNonEmptyValue } from '../source.js';
|
|
2
|
+
export class ProcessEnvSource {
|
|
3
|
+
id = 'process-env';
|
|
4
|
+
priority = 100;
|
|
5
|
+
read(product, key) {
|
|
6
|
+
return getNonEmptyValue(process.env[product.envVars[key]]);
|
|
7
|
+
}
|
|
8
|
+
describe() {
|
|
9
|
+
return 'process env';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=process-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-env.js","sourceRoot":"","sources":["../../../src/config/sources/process-env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,OAAO,gBAAgB;IAClB,EAAE,GAAa,aAAa,CAAC;IAC7B,QAAQ,GAAG,GAAG,CAAC;IAExB,IAAI,CAAC,OAA0B,EAAE,GAAc;QAC7C,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,QAAQ;QACN,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
export * from './api-error-handler.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './config/index.js';
|
|
4
|
+
export { runSetup } from './setup-cli.js';
|
|
4
5
|
export declare const formatToolResponse: (result: unknown) => {
|
|
5
6
|
content: {
|
|
6
7
|
type: "text";
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,cAAc,wBAAwB,CAAA;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO;;;;;CAKhD,CAAC;AAGH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,UAGvC,CAAC;AAGF,wBAAgB,eAAe,CAAC,OAAO,EAAE;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,aAKA;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,SAAS,sBAkCpD"}
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
3
|
export * from './api-error-handler.js';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './config/index.js';
|
|
5
|
+
export { runSetup } from './setup-cli.js';
|
|
5
6
|
// Helper function to format tool responses
|
|
6
7
|
export const formatToolResponse = (result) => ({
|
|
7
8
|
content: [{
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,cAAc,wBAAwB,CAAA;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,2CAA2C;AAC3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,CAAC;IACtD,OAAO,EAAE,CAAC;YACR,IAAI,EAAE,MAAe;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;SAC7B,CAAC;CACH,CAAC,CAAC;AAEH,uBAAuB;AACvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAY,EAAE,EAAE;IAC1C,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,sCAAsC;AACtC,MAAM,UAAU,eAAe,CAAC,OAG/B;IACC,OAAO,IAAI,SAAS,CAAC;QACnB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAiB;IACnD,0DAA0D;IAC1D,yBAAyB;IACzB,iDAAiD;IACjD,EAAE;IACF,wCAAwC;IACxC,0DAA0D;IAC1D,qCAAqC;IACrC,MAAM;IACN,EAAE;IACF,8CAA8C;IAC9C,kDAAkD;IAClD,MAAM;IACN,EAAE;IACF,mDAAmD;IACnD,sCAAsC;IACtC,2CAA2C;IAC3C,kDAAkD;IAClD,2CAA2C;IAC3C,4CAA4C;IAC5C,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,QAAQ;IACR,EAAE;IACF,uDAAuD;IACvD,qBAAqB;IACrB,QAAQ;IACR,MAAM;IAGN,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ConfigRegistry } from './config/registry.js';
|
|
2
|
+
import type { ProductDefinition } from './config/source.js';
|
|
3
|
+
export type SetupPrompts = {
|
|
4
|
+
input: (opts: {
|
|
5
|
+
message: string;
|
|
6
|
+
default?: string;
|
|
7
|
+
validate?: (raw: string) => true | string;
|
|
8
|
+
}) => Promise<string>;
|
|
9
|
+
password: (opts: {
|
|
10
|
+
message: string;
|
|
11
|
+
mask?: string;
|
|
12
|
+
}) => Promise<string>;
|
|
13
|
+
confirm: (opts: {
|
|
14
|
+
message: string;
|
|
15
|
+
default?: boolean;
|
|
16
|
+
}) => Promise<boolean>;
|
|
17
|
+
};
|
|
18
|
+
export type SetupDeps = {
|
|
19
|
+
registry?: ConfigRegistry;
|
|
20
|
+
log?: (message: string) => void;
|
|
21
|
+
exit?: (code: number) => void;
|
|
22
|
+
prompts?: SetupPrompts;
|
|
23
|
+
};
|
|
24
|
+
export declare function runSetup(product: ProductDefinition, deps?: SetupDeps): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=setup-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-cli.d.ts","sourceRoot":"","sources":["../src/setup-cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AAa5B,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnH,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,OAAO,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7E,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAQF,wBAAsB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,GAAE,SAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B9F"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { confirm as inquirerConfirm, input as inquirerInput, password as inquirerPassword } from '@inquirer/prompts';
|
|
2
|
+
import { buildDefaultRegistry } from './config/registry.js';
|
|
3
|
+
import { getProductRuntimeConfig } from './config/runtime-config.js';
|
|
4
|
+
import { HomeFileSource, getHomeFilePath } from './config/sources/home-file.js';
|
|
5
|
+
import { MacosKeychainSource } from './config/sources/macos-keychain.js';
|
|
6
|
+
const FALLBACK_PAGE_SIZE = 25;
|
|
7
|
+
const DEFAULT_PROMPTS = {
|
|
8
|
+
input: (opts) => inquirerInput(opts),
|
|
9
|
+
password: (opts) => inquirerPassword(opts),
|
|
10
|
+
confirm: (opts) => inquirerConfirm(opts),
|
|
11
|
+
};
|
|
12
|
+
export async function runSetup(product, deps = {}) {
|
|
13
|
+
const registry = deps.registry ?? buildDefaultRegistry();
|
|
14
|
+
const log = deps.log ?? ((message) => process.stdout.write(`${message}\n`));
|
|
15
|
+
const exit = deps.exit ?? ((code) => { process.exit(code); });
|
|
16
|
+
const prompts = deps.prompts ?? DEFAULT_PROMPTS;
|
|
17
|
+
registry.initialize();
|
|
18
|
+
log(`Atlassian DC MCP setup — ${product.id}`);
|
|
19
|
+
log('');
|
|
20
|
+
const current = getProductRuntimeConfig(product);
|
|
21
|
+
printCurrent(log, registry, product, current);
|
|
22
|
+
let answers;
|
|
23
|
+
try {
|
|
24
|
+
answers = await promptForValues(prompts, product, current);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (isUserCancel(error)) {
|
|
28
|
+
exit(130);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
const homeFile = requireHomeFile(registry);
|
|
34
|
+
writeNonSecretFields(registry, product, answers, homeFile, log);
|
|
35
|
+
const tokenWriter = await writeToken(registry, product, answers.token, homeFile, log, prompts);
|
|
36
|
+
printSummary(log, product, answers, tokenWriter);
|
|
37
|
+
}
|
|
38
|
+
function requireHomeFile(registry) {
|
|
39
|
+
const homeFile = registry.getWritableSource((s) => s instanceof HomeFileSource);
|
|
40
|
+
if (!homeFile) {
|
|
41
|
+
throw new Error('No writable source available for non-secret fields');
|
|
42
|
+
}
|
|
43
|
+
return homeFile;
|
|
44
|
+
}
|
|
45
|
+
function printCurrent(log, registry, product, current) {
|
|
46
|
+
const keys = ['host', 'apiBasePath', 'token', 'defaultPageSize'];
|
|
47
|
+
for (const key of keys) {
|
|
48
|
+
const primary = registry.locate(product, key)[0];
|
|
49
|
+
const label = displayLabel(key);
|
|
50
|
+
const displayValue = key === 'token' ? maskToken(current.token) : readable(current[key]);
|
|
51
|
+
const origin = primary ? `from ${primary.detail ?? primary.sourceId}` : 'not set';
|
|
52
|
+
log(`Current ${label}: ${displayValue} (${origin})`);
|
|
53
|
+
}
|
|
54
|
+
log('');
|
|
55
|
+
}
|
|
56
|
+
async function promptForValues(prompts, product, current) {
|
|
57
|
+
const host = await prompts.input({
|
|
58
|
+
message: 'Host (e.g. jira.example.com):',
|
|
59
|
+
default: current.host ?? '',
|
|
60
|
+
});
|
|
61
|
+
const apiBasePath = await prompts.input({
|
|
62
|
+
message: 'API base path:',
|
|
63
|
+
default: current.apiBasePath ?? product.defaultApiBasePath ?? '',
|
|
64
|
+
});
|
|
65
|
+
const defaultPageSize = await prompts.input({
|
|
66
|
+
message: 'Default page size:',
|
|
67
|
+
default: String(current.defaultPageSize ?? FALLBACK_PAGE_SIZE),
|
|
68
|
+
validate: (raw) => /^\d+$/.test(raw.trim()) && Number.parseInt(raw.trim(), 10) > 0
|
|
69
|
+
? true
|
|
70
|
+
: 'Enter a positive integer',
|
|
71
|
+
});
|
|
72
|
+
const token = await promptForToken(prompts, current.token);
|
|
73
|
+
return { host: host.trim(), apiBasePath: apiBasePath.trim(), defaultPageSize: defaultPageSize.trim(), token };
|
|
74
|
+
}
|
|
75
|
+
async function promptForToken(prompts, existing) {
|
|
76
|
+
const entered = await prompts.password({ message: 'API token:', mask: '*' });
|
|
77
|
+
const trimmed = entered.trim();
|
|
78
|
+
if (trimmed.length > 0) {
|
|
79
|
+
return trimmed;
|
|
80
|
+
}
|
|
81
|
+
if (!existing) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
await prompts.confirm({ message: 'Keep existing token?', default: true });
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
function writeNonSecretFields(registry, product, answers, homeFile, log) {
|
|
88
|
+
for (const key of ['host', 'apiBasePath', 'defaultPageSize']) {
|
|
89
|
+
warnIfShadowed(registry, product, key, homeFile, log);
|
|
90
|
+
const value = answers[key];
|
|
91
|
+
if (value.length > 0) {
|
|
92
|
+
homeFile.write(product, key, value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function writeToken(registry, product, token, homeFile, log, prompts) {
|
|
97
|
+
if (!token) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const keychain = registry.getWritableSource((s) => s instanceof MacosKeychainSource);
|
|
101
|
+
const candidates = [];
|
|
102
|
+
if (keychain?.isAvailable()) {
|
|
103
|
+
candidates.push(keychain);
|
|
104
|
+
}
|
|
105
|
+
candidates.push(homeFile);
|
|
106
|
+
warnIfShadowed(registry, product, 'token', candidates[0], log);
|
|
107
|
+
for (const writer of candidates) {
|
|
108
|
+
const written = await tryWrite(writer, product, token, log, prompts);
|
|
109
|
+
if (written) {
|
|
110
|
+
if (writer instanceof MacosKeychainSource) {
|
|
111
|
+
homeFile.clear(product, 'token');
|
|
112
|
+
}
|
|
113
|
+
return writer;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
throw new Error('No writable source succeeded for token');
|
|
117
|
+
}
|
|
118
|
+
async function tryWrite(writer, product, token, log, prompts) {
|
|
119
|
+
try {
|
|
120
|
+
writer.write(product, 'token', token);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const stderr = error.stderr?.toString() ?? '';
|
|
125
|
+
log(`Failed to write token to ${writer.describe()}: ${error.message}`);
|
|
126
|
+
if (stderr) {
|
|
127
|
+
log(stderr.trim());
|
|
128
|
+
}
|
|
129
|
+
if (writer instanceof MacosKeychainSource) {
|
|
130
|
+
const fallback = await prompts.confirm({
|
|
131
|
+
message: 'Fall back to plaintext home file with mode 0600?',
|
|
132
|
+
default: false,
|
|
133
|
+
});
|
|
134
|
+
return !fallback;
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function warnIfShadowed(registry, product, key, target, log) {
|
|
140
|
+
const shadowing = registry
|
|
141
|
+
.locate(product, key)
|
|
142
|
+
.filter((loc) => priorityOf(registry, loc.sourceId) > target.priority);
|
|
143
|
+
if (shadowing.length === 0) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const envVar = product.envVars[key];
|
|
147
|
+
for (const loc of shadowing) {
|
|
148
|
+
if (loc.sourceId === 'process-env') {
|
|
149
|
+
log(`Warning: process.env[${envVar}] is set — runtime will prefer it over the value you're saving to ${target.describe()}. Unset it to use the new value.`);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
log(`Warning: ${loc.detail ?? loc.sourceId} provides ${envVar} — runtime will prefer it over the value you're saving to ${target.describe()}.`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function priorityOf(registry, sourceId) {
|
|
157
|
+
const match = registry.sources.find((s) => s.id === sourceId);
|
|
158
|
+
return match?.priority ?? 0;
|
|
159
|
+
}
|
|
160
|
+
function printSummary(log, product, answers, tokenWriter) {
|
|
161
|
+
log('');
|
|
162
|
+
log('Saved configuration:');
|
|
163
|
+
log(` host: ${answers.host || '(unchanged)'}`);
|
|
164
|
+
log(` apiBasePath: ${answers.apiBasePath || '(unchanged)'}`);
|
|
165
|
+
log(` defaultPageSize: ${answers.defaultPageSize || '(unchanged)'}`);
|
|
166
|
+
if (tokenWriter) {
|
|
167
|
+
log(` token: ${maskToken(answers.token)} (stored in ${describeWriter(tokenWriter, product)})`);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
log(' token: (unchanged)');
|
|
171
|
+
}
|
|
172
|
+
log(`Home file: ${getHomeFilePath(product)}`);
|
|
173
|
+
}
|
|
174
|
+
function describeWriter(writer, product) {
|
|
175
|
+
if (writer instanceof MacosKeychainSource) {
|
|
176
|
+
return `macOS Keychain (service atlassian-dc-mcp, account ${product.id}-token)`;
|
|
177
|
+
}
|
|
178
|
+
if (writer instanceof HomeFileSource) {
|
|
179
|
+
return writer.describeForProduct(product);
|
|
180
|
+
}
|
|
181
|
+
return writer.describe();
|
|
182
|
+
}
|
|
183
|
+
function displayLabel(key) {
|
|
184
|
+
switch (key) {
|
|
185
|
+
case 'host':
|
|
186
|
+
return 'host';
|
|
187
|
+
case 'apiBasePath':
|
|
188
|
+
return 'API base path';
|
|
189
|
+
case 'token':
|
|
190
|
+
return 'token';
|
|
191
|
+
case 'defaultPageSize':
|
|
192
|
+
return 'page size';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function readable(value) {
|
|
196
|
+
if (value === undefined || value === '') {
|
|
197
|
+
return '(not set)';
|
|
198
|
+
}
|
|
199
|
+
return String(value);
|
|
200
|
+
}
|
|
201
|
+
function maskToken(token) {
|
|
202
|
+
if (!token) {
|
|
203
|
+
return '(not set)';
|
|
204
|
+
}
|
|
205
|
+
const last4 = token.slice(-4);
|
|
206
|
+
return `••••${last4}`;
|
|
207
|
+
}
|
|
208
|
+
function isUserCancel(error) {
|
|
209
|
+
if (!error || typeof error !== 'object') {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
const err = error;
|
|
213
|
+
return err.name === 'ExitPromptError' || /force closed/i.test(err.message ?? '');
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=setup-cli.js.map
|