@aashari/boilerplate-mcp-server 1.5.4 → 1.5.5

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.5.5](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.4...v1.5.5) (2025-05-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Revert back the index.ts and package.json ([74c6e08](https://github.com/aashari/boilerplate-mcp-server/commit/74c6e08c058d09f6e885134197cbf90d47e0ccc7))
7
+
1
8
  ## [1.5.4](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.3...v1.5.4) (2025-05-05)
2
9
 
3
10
 
package/dist/index.js CHANGED
@@ -26,7 +26,6 @@ const ipaddress_resource_js_1 = __importDefault(require("./resources/ipaddress.r
26
26
  const indexLogger = logger_util_js_1.Logger.forContext('index.ts');
27
27
  // Log initialization at debug level
28
28
  indexLogger.debug('Boilerplate MCP server module loaded');
29
- indexLogger.info(`Initializing ${constants_util_js_1.PACKAGE_NAME} v${constants_util_js_1.VERSION}`);
30
29
  let serverInstance = null;
31
30
  let transportInstance = null;
32
31
  /**
@@ -93,34 +92,6 @@ async function main() {
93
92
  mainLogger.debug(`DEBUG environment variable: ${process.env.DEBUG}`);
94
93
  mainLogger.debug(`IPAPI_API_TOKEN value exists: ${Boolean(process.env.IPAPI_API_TOKEN)}`);
95
94
  mainLogger.debug(`Config DEBUG value: ${config_util_js_1.config.get('DEBUG')}`);
96
- // Track whether we're in server mode
97
- let isServerMode = false;
98
- // --- Start: Add Graceful Shutdown ---
99
- const shutdown = async (signal) => {
100
- mainLogger.info(`Received ${signal}. Shutting down gracefully...`);
101
- // If we're in server mode and we have an active server instance,
102
- // attempt to disconnect properly
103
- if (isServerMode && serverInstance) {
104
- try {
105
- mainLogger.info('Disconnecting server instance...');
106
- // Allow time for ongoing operations to complete
107
- setTimeout(() => {
108
- process.exit(0);
109
- }, 500);
110
- }
111
- catch (err) {
112
- mainLogger.error('Error during graceful shutdown', err);
113
- process.exit(1);
114
- }
115
- }
116
- else {
117
- // Not in server mode, so safe to exit immediately
118
- process.exit(0);
119
- }
120
- };
121
- process.on('SIGINT', () => shutdown('SIGINT')); // Ctrl+C
122
- process.on('SIGTERM', () => shutdown('SIGTERM')); // kill command
123
- // --- End: Add Graceful Shutdown ---
124
95
  // Check if arguments are provided (CLI mode)
125
96
  if (process.argv.length > 2) {
126
97
  // CLI mode: Pass arguments to CLI runner
@@ -131,18 +102,15 @@ async function main() {
131
102
  else {
132
103
  // MCP Server mode: Start server with default STDIO
133
104
  mainLogger.info('Starting in server mode');
134
- isServerMode = true;
135
105
  await startServer();
136
106
  mainLogger.info('Server is now running');
137
107
  }
138
108
  }
139
109
  // If this file is being executed directly (not imported), run the main function
140
- // Use a check suitable for both CommonJS and ESM contexts
141
- const isMainModule = process.argv[1] && process.argv[1].endsWith('index.js');
142
- if (isMainModule) {
110
+ if (require.main === module) {
143
111
  main().catch((err) => {
144
112
  const indexLogger = logger_util_js_1.Logger.forContext('index.ts'); // Re-create logger for catch
145
113
  indexLogger.error('Unhandled error in main process', err);
146
114
  process.exit(1);
147
115
  });
148
- } // End of main module execution check
116
+ }
@@ -8,7 +8,7 @@
8
8
  * Current application version
9
9
  * This should match the version in package.json
10
10
  */
11
- export declare const VERSION = "1.5.4";
11
+ export declare const VERSION = "1.5.5";
12
12
  /**
13
13
  * Package name with scope
14
14
  * Used for initialization and identification
@@ -11,7 +11,7 @@ exports.CLI_NAME = exports.PACKAGE_NAME = exports.VERSION = void 0;
11
11
  * Current application version
12
12
  * This should match the version in package.json
13
13
  */
14
- exports.VERSION = '1.5.4';
14
+ exports.VERSION = '1.5.5';
15
15
  /**
16
16
  * Package name with scope
17
17
  * Used for initialization and identification
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * Application constants
4
+ *
5
+ * This file contains constants used throughout the application.
6
+ * Centralizing these values makes them easier to maintain and update.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CLI_NAME = exports.PACKAGE_NAME = exports.VERSION = void 0;
10
+ /**
11
+ * Current application version
12
+ * This should match the version in package.json
13
+ */
14
+ exports.VERSION = '1.5.4';
15
+ /**
16
+ * Package name with scope
17
+ * Used for initialization and identification
18
+ */
19
+ exports.PACKAGE_NAME = '@aashari/boilerplate-mcp-server';
20
+ /**
21
+ * CLI command name
22
+ * Used for binary name and CLI help text
23
+ */
24
+ exports.CLI_NAME = 'mcp-boilerplate';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aashari/boilerplate-mcp-server",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,15 +11,14 @@
11
11
  "url": "https://github.com/aashari/boilerplate-mcp-server.git"
12
12
  },
13
13
  "bin": {
14
- "mcp-boilerplate": "./dist/index.js"
14
+ "mcp-server": "./dist/index.js"
15
15
  },
16
16
  "scripts": {
17
- "build": "rimraf dist && tsc",
17
+ "build": "tsc",
18
18
  "prepare": "npm run build && chmod +x dist/index.js",
19
- "postinstall": "node scripts/ensure-executable.js || true",
19
+ "postinstall": "chmod +x dist/index.js || true",
20
20
  "test": "jest",
21
21
  "test:coverage": "jest --coverage",
22
- "test:cli": "jest src/cli/.*\\.cli\\.test\\.ts --runInBand --testTimeout=60000",
23
22
  "lint": "eslint src --ext .ts --config eslint.config.mjs",
24
23
  "format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
25
24
  "publish:npm": "npm publish",
@@ -71,7 +70,6 @@
71
70
  "nodemon": "^3.1.10",
72
71
  "npm-check-updates": "^18.0.1",
73
72
  "prettier": "^3.5.3",
74
- "rimraf": "^6.0.1",
75
73
  "semantic-release": "^24.2.3",
76
74
  "ts-jest": "^29.3.2",
77
75
  "ts-node": "^10.9.2",
package/package.json.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aashari/boilerplate-mcp-server",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,15 +11,14 @@
11
11
  "url": "https://github.com/aashari/boilerplate-mcp-server.git"
12
12
  },
13
13
  "bin": {
14
- "mcp-boilerplate": "./dist/index.js"
14
+ "mcp-server": "./dist/index.js"
15
15
  },
16
16
  "scripts": {
17
- "build": "rimraf dist && tsc",
17
+ "build": "tsc",
18
18
  "prepare": "npm run build && chmod +x dist/index.js",
19
- "postinstall": "node scripts/ensure-executable.js || true",
19
+ "postinstall": "chmod +x dist/index.js || true",
20
20
  "test": "jest",
21
21
  "test:coverage": "jest --coverage",
22
- "test:cli": "jest src/cli/.*\\.cli\\.test\\.ts --runInBand --testTimeout=60000",
23
22
  "lint": "eslint src --ext .ts --config eslint.config.mjs",
24
23
  "format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
25
24
  "publish:npm": "npm publish",
@@ -71,7 +70,6 @@
71
70
  "nodemon": "^3.1.10",
72
71
  "npm-check-updates": "^18.0.1",
73
72
  "prettier": "^3.5.3",
74
- "rimraf": "^6.0.1",
75
73
  "semantic-release": "^24.2.3",
76
74
  "ts-jest": "^29.3.2",
77
75
  "ts-node": "^10.9.2",