@abertnguyen/abert-test-mcp 1.0.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.
Files changed (72) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +154 -0
  3. package/bin/cli.js +14 -0
  4. package/dist/__tests__/services/configService.test.d.ts +2 -0
  5. package/dist/__tests__/services/configService.test.d.ts.map +1 -0
  6. package/dist/__tests__/services/configService.test.js +257 -0
  7. package/dist/__tests__/services/configService.test.js.map +1 -0
  8. package/dist/__tests__/utils/fileUtils.test.d.ts +2 -0
  9. package/dist/__tests__/utils/fileUtils.test.d.ts.map +1 -0
  10. package/dist/__tests__/utils/fileUtils.test.js +86 -0
  11. package/dist/__tests__/utils/fileUtils.test.js.map +1 -0
  12. package/dist/__tests__/utils/httpUtils.test.d.ts +2 -0
  13. package/dist/__tests__/utils/httpUtils.test.d.ts.map +1 -0
  14. package/dist/__tests__/utils/httpUtils.test.js +62 -0
  15. package/dist/__tests__/utils/httpUtils.test.js.map +1 -0
  16. package/dist/__tests__/utils/processUtils.test.d.ts +2 -0
  17. package/dist/__tests__/utils/processUtils.test.d.ts.map +1 -0
  18. package/dist/__tests__/utils/processUtils.test.js +209 -0
  19. package/dist/__tests__/utils/processUtils.test.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +110 -0
  23. package/dist/cli.js.map +1 -0
  24. package/dist/constants.d.ts +2 -0
  25. package/dist/constants.d.ts.map +1 -0
  26. package/dist/constants.js +6 -0
  27. package/dist/constants.js.map +1 -0
  28. package/dist/installer.d.ts +24 -0
  29. package/dist/installer.d.ts.map +1 -0
  30. package/dist/installer.js +394 -0
  31. package/dist/installer.js.map +1 -0
  32. package/dist/services/configService.d.ts +30 -0
  33. package/dist/services/configService.d.ts.map +1 -0
  34. package/dist/services/configService.js +347 -0
  35. package/dist/services/configService.js.map +1 -0
  36. package/dist/services/downloadService.d.ts +18 -0
  37. package/dist/services/downloadService.d.ts.map +1 -0
  38. package/dist/services/downloadService.js +200 -0
  39. package/dist/services/downloadService.js.map +1 -0
  40. package/dist/services/installService.d.ts +18 -0
  41. package/dist/services/installService.d.ts.map +1 -0
  42. package/dist/services/installService.js +181 -0
  43. package/dist/services/installService.js.map +1 -0
  44. package/dist/services/versionService.d.ts +18 -0
  45. package/dist/services/versionService.d.ts.map +1 -0
  46. package/dist/services/versionService.js +170 -0
  47. package/dist/services/versionService.js.map +1 -0
  48. package/dist/types/index.d.ts +63 -0
  49. package/dist/types/index.d.ts.map +1 -0
  50. package/dist/types/index.js +3 -0
  51. package/dist/types/index.js.map +1 -0
  52. package/dist/utils/fileUtils.d.ts +15 -0
  53. package/dist/utils/fileUtils.d.ts.map +1 -0
  54. package/dist/utils/fileUtils.js +89 -0
  55. package/dist/utils/fileUtils.js.map +1 -0
  56. package/dist/utils/httpUtils.d.ts +20 -0
  57. package/dist/utils/httpUtils.d.ts.map +1 -0
  58. package/dist/utils/httpUtils.js +148 -0
  59. package/dist/utils/httpUtils.js.map +1 -0
  60. package/dist/utils/logger.d.ts +15 -0
  61. package/dist/utils/logger.d.ts.map +1 -0
  62. package/dist/utils/logger.js +55 -0
  63. package/dist/utils/logger.js.map +1 -0
  64. package/dist/utils/pathUtils.d.ts +8 -0
  65. package/dist/utils/pathUtils.d.ts.map +1 -0
  66. package/dist/utils/pathUtils.js +35 -0
  67. package/dist/utils/pathUtils.js.map +1 -0
  68. package/dist/utils/processUtils.d.ts +25 -0
  69. package/dist/utils/processUtils.d.ts.map +1 -0
  70. package/dist/utils/processUtils.js +139 -0
  71. package/dist/utils/processUtils.js.map +1 -0
  72. package/package.json +64 -0
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HttpUtils = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ const https_1 = __importDefault(require("https"));
10
+ class HttpUtils {
11
+ logger;
12
+ defaultRetryOptions = {
13
+ retries: 3,
14
+ retryDelay: 1000,
15
+ timeout: 30000,
16
+ };
17
+ constructor(logger) {
18
+ this.logger = logger;
19
+ }
20
+ getHttpsAgent() {
21
+ // For development environments, we may need to handle self-signed certificates
22
+ // In production, this should be more restrictive
23
+ const isDevelopment = process.env.NODE_ENV === 'development' ||
24
+ process.env.PAYMENTS_MCP_ALLOW_INSECURE_TLS === 'true';
25
+ if (isDevelopment) {
26
+ this.logger.debug('Using relaxed SSL verification for development environment');
27
+ return new https_1.default.Agent({
28
+ rejectUnauthorized: false, // Allow self-signed certificates in dev
29
+ });
30
+ }
31
+ return new https_1.default.Agent({
32
+ rejectUnauthorized: true, // Strict SSL verification in production
33
+ });
34
+ }
35
+ async sleep(ms) {
36
+ return new Promise((resolve) => setTimeout(resolve, ms));
37
+ }
38
+ async executeWithRetry(operation, options = {}) {
39
+ const opts = { ...this.defaultRetryOptions, ...options };
40
+ let lastError;
41
+ for (let attempt = 1; attempt <= opts.retries; attempt++) {
42
+ try {
43
+ return await operation();
44
+ }
45
+ catch (error) {
46
+ lastError = error;
47
+ if (attempt === opts.retries) {
48
+ throw lastError;
49
+ }
50
+ const delay = opts.retryDelay * Math.pow(2, attempt - 1);
51
+ this.logger.debug(`Request failed (attempt ${attempt}/${opts.retries}), retrying in ${delay}ms...`);
52
+ await this.sleep(delay);
53
+ }
54
+ }
55
+ throw lastError;
56
+ }
57
+ async get(url, options = {}) {
58
+ return this.executeWithRetry(async () => {
59
+ const config = {
60
+ timeout: options.timeout || this.defaultRetryOptions.timeout,
61
+ headers: {
62
+ 'User-Agent': 'install-abert-test-mcp/1.0.0',
63
+ },
64
+ httpsAgent: this.getHttpsAgent(),
65
+ };
66
+ this.logger.debug(`GET ${url}`);
67
+ return await axios_1.default.get(url, config);
68
+ }, options);
69
+ }
70
+ async downloadFile(url, filePath, onProgress, options = {}) {
71
+ return this.executeWithRetry(async () => {
72
+ const config = {
73
+ timeout: options.timeout || this.defaultRetryOptions.timeout,
74
+ responseType: 'stream',
75
+ headers: {
76
+ 'User-Agent': 'install-abert-test-mcp/1.0.0',
77
+ },
78
+ httpsAgent: this.getHttpsAgent(),
79
+ };
80
+ this.logger.debug(`Downloading ${url} to ${filePath}`);
81
+ const response = await axios_1.default.get(url, config);
82
+ const totalLength = parseInt(response.headers['content-length'] || '0', 10);
83
+ let transferredLength = 0;
84
+ const writeStream = fs_extra_1.default.createWriteStream(filePath);
85
+ return new Promise((resolve, reject) => {
86
+ response.data.on('data', (chunk) => {
87
+ transferredLength += chunk.length;
88
+ if (onProgress && totalLength > 0) {
89
+ const percent = Math.round((transferredLength / totalLength) * 100);
90
+ onProgress({
91
+ transferred: transferredLength,
92
+ total: totalLength,
93
+ percent,
94
+ });
95
+ }
96
+ });
97
+ response.data.on('error', (error) => {
98
+ writeStream.destroy();
99
+ fs_extra_1.default.unlink(filePath).catch(() => { });
100
+ reject(error);
101
+ });
102
+ writeStream.on('error', (error) => {
103
+ fs_extra_1.default.unlink(filePath).catch(() => { });
104
+ reject(error);
105
+ });
106
+ writeStream.on('finish', () => {
107
+ resolve();
108
+ });
109
+ response.data.pipe(writeStream);
110
+ });
111
+ }, options);
112
+ }
113
+ async head(url, options = {}) {
114
+ return this.executeWithRetry(async () => {
115
+ const config = {
116
+ timeout: options.timeout || this.defaultRetryOptions.timeout,
117
+ headers: {
118
+ 'User-Agent': 'install-abert-test-mcp/1.0.0',
119
+ },
120
+ httpsAgent: this.getHttpsAgent(),
121
+ };
122
+ this.logger.debug(`HEAD ${url}`);
123
+ return await axios_1.default.head(url, config);
124
+ }, options);
125
+ }
126
+ getErrorMessage(error) {
127
+ const err = error;
128
+ if (err.response) {
129
+ return `HTTP ${err.response.status}: ${err.response.statusText || 'Unknown Error'}`;
130
+ }
131
+ // Handle SSL/TLS certificate errors
132
+ if (err.code === 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY') {
133
+ return 'SSL certificate verification failed. For development servers, set PAYMENTS_MCP_ALLOW_INSECURE_TLS=true';
134
+ }
135
+ if (err.code === 'SELF_SIGNED_CERT_IN_CHAIN') {
136
+ return 'Self-signed certificate detected. For development servers, set PAYMENTS_MCP_ALLOW_INSECURE_TLS=true';
137
+ }
138
+ if (err.code === 'CERT_HAS_EXPIRED') {
139
+ return 'SSL certificate has expired. Please contact the server administrator';
140
+ }
141
+ if (err.request) {
142
+ return 'Network request failed - please check your internet connection';
143
+ }
144
+ return err.message || 'Unknown error occurred';
145
+ }
146
+ }
147
+ exports.HttpUtils = HttpUtils;
148
+ //# sourceMappingURL=httpUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpUtils.js","sourceRoot":"","sources":["../../src/utils/httpUtils.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiE;AACjE,wDAA0B;AAC1B,kDAA0B;AAI1B,MAAa,SAAS;IACZ,MAAM,CAAS;IACf,mBAAmB,GAAqB;QAC9C,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,aAAa;QACnB,+EAA+E;QAC/E,iDAAiD;QACjD,MAAM,aAAa,GACjB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;YACtC,OAAO,CAAC,GAAG,CAAC,+BAA+B,KAAK,MAAM,CAAC;QAEzD,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,4DAA4D,CAC7D,CAAC;YACF,OAAO,IAAI,eAAK,CAAC,KAAK,CAAC;gBACrB,kBAAkB,EAAE,KAAK,EAAE,wCAAwC;aACpE,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,eAAK,CAAC,KAAK,CAAC;YAC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AAE;YACtC,MAAM,MAAM,GAAuB;gBACjC,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAC,OAAO;gBAC5D,OAAO,EAAE;oBACP,YAAY,EAAE,8BAA8B;iBAC7C;gBACD,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;aACjC,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;YACjC,OAAO,MAAM,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;IAED,eAAe,CAAC,KAAc;QAC5B,MAAM,GAAG,GAAG,KAKX,CAAC;QACF,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACjB,OAAO,QAAQ,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,UAAU,IAAI,eAAe,EAAE,CAAC;QACtF,CAAC;QAED,oCAAoC;QACpC,IAAI,GAAG,CAAC,IAAI,KAAK,mCAAmC,EAAE,CAAC;YACrD,OAAO,wGAAwG,CAAC;QAClH,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,2BAA2B,EAAE,CAAC;YAC7C,OAAO,qGAAqG,CAAC;QAC/G,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;YACpC,OAAO,sEAAsE,CAAC;QAChF,CAAC;QAED,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YAChB,OAAO,gEAAgE,CAAC;QAC1E,CAAC;QACD,OAAO,GAAG,CAAC,OAAO,IAAI,wBAAwB,CAAC;IACjD,CAAC;CACF;AAhMD,8BAgMC"}
@@ -0,0 +1,15 @@
1
+ export declare class Logger {
2
+ private verbose;
3
+ constructor(verbose?: boolean);
4
+ info(message: string): void;
5
+ success(message: string): void;
6
+ warn(message: string): void;
7
+ error(message: string, error?: Error): void;
8
+ debug(message: string): void;
9
+ progress(message: string): void;
10
+ progressUpdate(message: string): void;
11
+ progressEnd(success?: boolean): void;
12
+ newline(): void;
13
+ separator(): void;
14
+ }
15
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IACjB,OAAO,CAAC,OAAO,CAAU;gBAEb,OAAO,GAAE,OAAe;IAIpC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI;IAO3C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM5B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI/B,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIrC,WAAW,CAAC,OAAO,GAAE,OAAc,GAAG,IAAI;IAQ1C,OAAO,IAAI,IAAI;IAIf,SAAS,IAAI,IAAI;CAGlB"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Logger = void 0;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ class Logger {
9
+ verbose;
10
+ constructor(verbose = false) {
11
+ this.verbose = verbose;
12
+ }
13
+ info(message) {
14
+ console.log(chalk_1.default.blue('ℹ'), message);
15
+ }
16
+ success(message) {
17
+ console.log(chalk_1.default.green('✓'), message);
18
+ }
19
+ warn(message) {
20
+ console.log(chalk_1.default.yellow('⚠'), message);
21
+ }
22
+ error(message, error) {
23
+ console.error(chalk_1.default.red('✗'), message);
24
+ if (error && this.verbose) {
25
+ console.error(chalk_1.default.gray(error.stack || error.message));
26
+ }
27
+ }
28
+ debug(message) {
29
+ if (this.verbose) {
30
+ console.log(chalk_1.default.gray('▶'), message);
31
+ }
32
+ }
33
+ progress(message) {
34
+ process.stdout.write(chalk_1.default.cyan('⏳') + ' ' + message + ' ');
35
+ }
36
+ progressUpdate(message) {
37
+ process.stdout.write(chalk_1.default.cyan(message));
38
+ }
39
+ progressEnd(success = true) {
40
+ if (success) {
41
+ console.log(chalk_1.default.green('✓'));
42
+ }
43
+ else {
44
+ console.log(chalk_1.default.red('✗'));
45
+ }
46
+ }
47
+ newline() {
48
+ console.log();
49
+ }
50
+ separator() {
51
+ console.log(chalk_1.default.gray('─'.repeat(50)));
52
+ }
53
+ }
54
+ exports.Logger = Logger;
55
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAa,MAAM;IACT,OAAO,CAAU;IAEzB,YAAY,UAAmB,KAAK;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,CAAC,OAAe;QACrB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,KAAa;QAClC,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GA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export declare class PathUtils {
3
+ static getTempDir(): string;
4
+ static getInstallationPaths(): InstallationPaths;
5
+ static getNodeExecutable(): string;
6
+ static getNpmExecutable(): string;
7
+ }
8
+ //# sourceMappingURL=pathUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathUtils.d.ts","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,SAAS;IACpB,MAAM,CAAC,UAAU,IAAI,MAAM;IAI3B,MAAM,CAAC,oBAAoB,IAAI,iBAAiB;IAgBhD,MAAM,CAAC,iBAAiB,IAAI,MAAM;IAIlC,MAAM,CAAC,gBAAgB,IAAI,MAAM;CAGlC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PathUtils = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const os_1 = __importDefault(require("os"));
9
+ class PathUtils {
10
+ static getTempDir() {
11
+ return os_1.default.tmpdir();
12
+ }
13
+ static getInstallationPaths() {
14
+ const homeDir = os_1.default.homedir();
15
+ const installDir = path_1.default.join(homeDir, '.abert-test-mcp');
16
+ const packageJsonPath = path_1.default.join(installDir, 'package.json');
17
+ // const electronDir = path.join(installDir, 'node_modules', 'electron');
18
+ // const installerScript = path.join(electronDir, 'install.js');
19
+ return {
20
+ tempDir: this.getTempDir(), // Keep temp dir for temporary files during download
21
+ installDir,
22
+ packageJsonPath,
23
+ // electronDir,
24
+ // installerScript,
25
+ };
26
+ }
27
+ static getNodeExecutable() {
28
+ return process.execPath;
29
+ }
30
+ static getNpmExecutable() {
31
+ return process.platform === 'win32' ? 'npm.cmd' : 'npm';
32
+ }
33
+ }
34
+ exports.PathUtils = PathUtils;
35
+ //# sourceMappingURL=pathUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathUtils.js","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,4CAAoB;AAGpB,MAAa,SAAS;IACpB,MAAM,CAAC,UAAU;QACf,OAAO,YAAE,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,oBAAoB;QACzB,MAAM,OAAO,GAAG,YAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACzD,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,yEAAyE;QACzE,gEAAgE;QAEhE,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,oDAAoD;YAChF,UAAU;YACV,eAAe;YACf,eAAe;YACf,mBAAmB;SACpB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,iBAAiB;QACtB,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACrB,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,CAAC;CACF;AA5BD,8BA4BC"}
@@ -0,0 +1,25 @@
1
+ import { Logger } from './logger';
2
+ export declare class ProcessUtils {
3
+ private logger;
4
+ private readonly processName;
5
+ constructor(logger: Logger);
6
+ /**
7
+ * Check if the abert-test-mcp-server process is currently running
8
+ * Returns true if running, false otherwise
9
+ */
10
+ isPaymentsMCPRunning(): Promise<boolean>;
11
+ /**
12
+ * Get list of common MCP client process names based on platform
13
+ */
14
+ getMCPClientProcessNames(): string[];
15
+ /**
16
+ * Check if any MCP client applications are running
17
+ * Returns array of running client names
18
+ */
19
+ getRunningMCPClients(): Promise<string[]>;
20
+ /**
21
+ * Get a formatted list of running MCP clients for display
22
+ */
23
+ getRunningMCPClientsFormatted(): Promise<string | null>;
24
+ }
25
+ //# sourceMappingURL=processUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processUtils.d.ts","sourceRoot":"","sources":["../../src/utils/processUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;gBAE3C,MAAM,EAAE,MAAM;IAI1B;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;IAwD9C;;OAEG;IACH,wBAAwB,IAAI,MAAM,EAAE;IAWpC;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA4C/C;;OAEG;IACG,6BAA6B,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAc9D"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessUtils = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const util_1 = require("util");
6
+ const execAsync = (0, util_1.promisify)(child_process_1.exec);
7
+ class ProcessUtils {
8
+ logger;
9
+ processName = 'abert-test-mcp-server';
10
+ constructor(logger) {
11
+ this.logger = logger;
12
+ }
13
+ /**
14
+ * Check if the abert-test-mcp-server process is currently running
15
+ * Returns true if running, false otherwise
16
+ */
17
+ async isPaymentsMCPRunning() {
18
+ try {
19
+ let command;
20
+ if (process.platform === 'win32') {
21
+ // Windows: use tasklist to find the process
22
+ command = `tasklist /FI "IMAGENAME eq ${this.processName}.exe" /NH`;
23
+ }
24
+ else {
25
+ // macOS/Linux: use pgrep for more reliable process name matching
26
+ command = `pgrep -f "${this.processName}"`;
27
+ }
28
+ const { stdout } = await execAsync(command);
29
+ // Check if we got any results
30
+ if (process.platform === 'win32') {
31
+ // On Windows, tasklist returns "INFO: No tasks..." when not found
32
+ const isRunning = !!stdout.trim() &&
33
+ !stdout.toLowerCase().includes('no tasks') &&
34
+ stdout.toLowerCase().includes(this.processName);
35
+ if (isRunning) {
36
+ this.logger.debug(`Found running ${this.processName} process on Windows`);
37
+ }
38
+ return isRunning;
39
+ }
40
+ else {
41
+ // On Unix systems, pgrep returns PIDs if found
42
+ const pids = stdout
43
+ .trim()
44
+ .split('\n')
45
+ .filter((line) => line.trim());
46
+ const isRunning = pids.length > 0;
47
+ if (isRunning) {
48
+ this.logger.debug(`Found ${pids.length} running ${this.processName} process(es): ${pids.join(', ')}`);
49
+ }
50
+ return isRunning;
51
+ }
52
+ }
53
+ catch (error) {
54
+ // pgrep returns exit code 1 when no processes found
55
+ // This is expected behavior, not an error
56
+ const err = error;
57
+ if (err.code === 1) {
58
+ this.logger.debug(`No ${this.processName} processes found`);
59
+ return false;
60
+ }
61
+ // Other errors should be logged but return false
62
+ this.logger.debug(`Process check error: ${err.message}`);
63
+ return false;
64
+ }
65
+ }
66
+ /**
67
+ * Get list of common MCP client process names based on platform
68
+ */
69
+ getMCPClientProcessNames() {
70
+ if (process.platform === 'darwin') {
71
+ return ['Claude', 'Cherry Studio', 'Goose', 'Codex'];
72
+ }
73
+ else if (process.platform === 'win32') {
74
+ return ['Claude.exe', 'Cherry Studio.exe', 'Goose.exe', 'Codex.exe'];
75
+ }
76
+ else {
77
+ // Linux
78
+ return ['claude', 'cherry-studio', 'goose', 'codex'];
79
+ }
80
+ }
81
+ /**
82
+ * Check if any MCP client applications are running
83
+ * Returns array of running client names
84
+ */
85
+ async getRunningMCPClients() {
86
+ const runningClients = [];
87
+ const clientNames = this.getMCPClientProcessNames();
88
+ for (const clientName of clientNames) {
89
+ try {
90
+ let command;
91
+ if (process.platform === 'win32') {
92
+ command = `tasklist /FI "IMAGENAME eq ${clientName}" /NH`;
93
+ }
94
+ else if (process.platform === 'darwin') {
95
+ // On macOS, use pgrep with case-insensitive match
96
+ command = `pgrep -i "${clientName}"`;
97
+ }
98
+ else {
99
+ // On Linux, use pgrep
100
+ command = `pgrep "${clientName.toLowerCase()}"`;
101
+ }
102
+ const { stdout } = await execAsync(command);
103
+ if (process.platform === 'win32') {
104
+ if (stdout.trim() &&
105
+ !stdout.toLowerCase().includes('no tasks') &&
106
+ stdout.toLowerCase().includes(clientName.toLowerCase())) {
107
+ runningClients.push(clientName);
108
+ }
109
+ }
110
+ else {
111
+ // Unix systems - pgrep returns PIDs if found
112
+ if (stdout.trim()) {
113
+ runningClients.push(clientName);
114
+ }
115
+ }
116
+ }
117
+ catch (error) {
118
+ // Process not running or error checking - continue to next client
119
+ this.logger.debug(`Client ${clientName} not detected`);
120
+ continue;
121
+ }
122
+ }
123
+ return runningClients;
124
+ }
125
+ /**
126
+ * Get a formatted list of running MCP clients for display
127
+ */
128
+ async getRunningMCPClientsFormatted() {
129
+ const runningClients = await this.getRunningMCPClients();
130
+ if (runningClients.length === 0) {
131
+ return null;
132
+ }
133
+ // Remove .exe extension for cleaner display
134
+ const cleanNames = runningClients.map((name) => name.replace(/\.exe$/i, ''));
135
+ return cleanNames.join(', ');
136
+ }
137
+ }
138
+ exports.ProcessUtils = ProcessUtils;
139
+ //# sourceMappingURL=processUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processUtils.js","sourceRoot":"","sources":["../../src/utils/processUtils.ts"],"names":[],"mappings":";;;AAAA,iDAAqC;AACrC,+BAAiC;AAGjC,MAAM,SAAS,GAAG,IAAA,gBAAS,EAAC,oBAAI,CAAC,CAAC;AAElC,MAAa,YAAY;IACf,MAAM,CAAS;IACN,WAAW,GAAG,uBAAuB,CAAC;IAEvD,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,oBAAoB;QACxB,IAAI,CAAC;YACH,IAAI,OAAe,CAAC;YAEpB,IAAI,OAAO,CAAC,QAAQ,KAAK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IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAC5B,CAAC;QAEF,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAnJD,oCAmJC"}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@abertnguyen/abert-test-mcp",
3
+ "version": "1.0.0",
4
+ "description": "NPX installer for Travala MCP",
5
+ "main": "dist/cli.js",
6
+ "bin": {
7
+ "abert-test-mcp": "bin/cli.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "dev": "ts-node src/cli.ts",
12
+ "prepublishOnly": "npm run build",
13
+ "test": "jest",
14
+ "lint": "eslint src/**/*.ts",
15
+ "format": "prettier --write src/**/*.ts"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "x402",
20
+ "payments",
21
+ "travala",
22
+ "travel",
23
+ "installer"
24
+ ],
25
+ "author": "Travala",
26
+ "license": "Apache-2.0",
27
+ "dependencies": {
28
+ "axios": "^1.6.0",
29
+ "chalk": "^4.1.2",
30
+ "cli-progress": "^3.12.0",
31
+ "commander": "^11.1.0",
32
+ "fs-extra": "^11.1.1",
33
+ "inquirer": "^8.2.5",
34
+ "semver": "^7.5.4",
35
+ "yauzl": "^2.10.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/fs-extra": "^11.0.4",
39
+ "@types/inquirer": "^8.2.5",
40
+ "@types/jest": "^29.5.12",
41
+ "@types/node": "^20.10.0",
42
+ "@types/semver": "^7.5.6",
43
+ "@types/yauzl": "^2.10.3",
44
+ "@typescript-eslint/eslint-plugin": "^6.13.0",
45
+ "@typescript-eslint/parser": "^6.13.0",
46
+ "eslint": "^8.55.0",
47
+ "jest": "^29.7.0",
48
+ "prettier": "^3.1.0",
49
+ "ts-jest": "^29.1.1",
50
+ "ts-node": "^10.9.0",
51
+ "typescript": "^5.3.0"
52
+ },
53
+ "files": [
54
+ "dist/**/*",
55
+ "bin/**/*",
56
+ "README.md"
57
+ ],
58
+ "prettier": {
59
+ "singleQuote": true
60
+ },
61
+ "engines": {
62
+ "node": ">=22.0.0"
63
+ }
64
+ }