mikromcp 1.0.6 → 1.0.8

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/main.js +24 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  [![CI](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml)
14
14
  [![Release](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml)
15
- [![Version](https://img.shields.io/badge/version-v1.0.6-EA580C)](package.json)
15
+ [![Version](https://img.shields.io/badge/version-v1.0.8-EA580C)](package.json)
16
16
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
17
17
  [![Node.js >= 22](https://img.shields.io/badge/node-%3E%3D22-339933)](package.json)
18
18
  [![RouterOS 7.x](https://img.shields.io/badge/RouterOS-7.x-293239)](https://help.mikrotik.com/docs/display/ROS/REST+API)
package/dist/main.js CHANGED
@@ -8614,7 +8614,7 @@ function createServerFactory(config, identityRegistry) {
8614
8614
  const makeServer = () => {
8615
8615
  const server = new McpServer({
8616
8616
  name: "mikromcp",
8617
- version: "1.0.6"
8617
+ version: "1.0.8"
8618
8618
  });
8619
8619
  registerAllTools(server, registry, pool, circuitBreakers, config, identityRegistry);
8620
8620
  return server;
@@ -8937,7 +8937,7 @@ import { existsSync as existsSync3, readFileSync as readFileSync6 } from "fs";
8937
8937
  import { homedir as homedir3 } from "os";
8938
8938
  import * as net from "net";
8939
8939
  import chalk from "chalk";
8940
- var localVersion = "1.0.6";
8940
+ var localVersion = "1.0.8";
8941
8941
  var results = [];
8942
8942
  function ok(msg) {
8943
8943
  console.log(chalk.green("\u2705 ") + msg);
@@ -9218,7 +9218,7 @@ import {
9218
9218
  } from "fs";
9219
9219
  import { homedir as homedir4 } from "os";
9220
9220
  import { join as join4 } from "path";
9221
- import { stringify as yamlStringify, parse as yamlParse } from "yaml";
9221
+ import { parse as yamlParse, Document, visit } from "yaml";
9222
9222
  import bcrypt2 from "bcryptjs";
9223
9223
  import chalk2 from "chalk";
9224
9224
  function mikromcpDir2() {
@@ -9227,6 +9227,20 @@ function mikromcpDir2() {
9227
9227
  function defaultAuditLogPath() {
9228
9228
  return join4(mikromcpDir2(), "audit.ndjson");
9229
9229
  }
9230
+ function toYaml(obj) {
9231
+ const doc = new Document(obj);
9232
+ visit(doc, {
9233
+ Scalar(key, node) {
9234
+ if (key !== "key" && typeof node.value === "string") {
9235
+ node.type = "QUOTE_DOUBLE";
9236
+ }
9237
+ },
9238
+ Seq(_, node) {
9239
+ node.flow = true;
9240
+ }
9241
+ });
9242
+ return doc.toString();
9243
+ }
9230
9244
  function suggestEnvPrefix(routerId) {
9231
9245
  return "ROUTER_" + routerId.toUpperCase().replace(/-/g, "_");
9232
9246
  }
@@ -9256,7 +9270,7 @@ async function collectRouterInfo() {
9256
9270
  });
9257
9271
  const portStr = await input({
9258
9272
  message: "Port:",
9259
- default: "443",
9273
+ default: "80",
9260
9274
  validate: (v) => {
9261
9275
  const n = Number(v);
9262
9276
  return Number.isInteger(n) && n >= 1 && n <= 65535 ? true : "Port must be 1\u201365535";
@@ -9264,11 +9278,11 @@ async function collectRouterInfo() {
9264
9278
  });
9265
9279
  const port = Number(portStr);
9266
9280
  const tlsEnabled = await confirm({ message: "Enable TLS?", default: false });
9267
- let rejectUnauthorized = true;
9281
+ let rejectUnauthorized = false;
9268
9282
  if (tlsEnabled) {
9269
9283
  rejectUnauthorized = await confirm({
9270
9284
  message: "Reject unauthorized TLS certificates (rejectUnauthorized)?",
9271
- default: true
9285
+ default: false
9272
9286
  });
9273
9287
  if (!rejectUnauthorized) {
9274
9288
  console.log(
@@ -9411,7 +9425,7 @@ function writeRoutersYaml(data) {
9411
9425
  }
9412
9426
  parsed.routers[data.routerId] = newEntry;
9413
9427
  mkdirSync3(data.configDir, { recursive: true });
9414
- writeFileSync2(filePath, yamlStringify(parsed, { lineWidth: 0 }));
9428
+ writeFileSync2(filePath, toYaml(parsed));
9415
9429
  return true;
9416
9430
  }
9417
9431
  function writeIdentitiesYaml(data) {
@@ -9430,7 +9444,7 @@ function writeIdentitiesYaml(data) {
9430
9444
  }
9431
9445
  parsed.identities[data.identityId] = newEntry;
9432
9446
  mkdirSync3(data.configDir, { recursive: true });
9433
- writeFileSync2(filePath, yamlStringify(parsed, { lineWidth: 0 }));
9447
+ writeFileSync2(filePath, toYaml(parsed));
9434
9448
  return true;
9435
9449
  }
9436
9450
  function writeDotEnv(data) {
@@ -9575,7 +9589,7 @@ async function runInit() {
9575
9589
  }
9576
9590
 
9577
9591
  // src/cli/index.ts
9578
- var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.0.6");
9592
+ var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.0.8");
9579
9593
  program.command("serve", { isDefault: true }).description("Start the MCP server (default)").action(runServe);
9580
9594
  program.command("doctor").description("Check config, connectivity, and permissions").action(runDoctor);
9581
9595
  program.command("init").description("Interactive setup wizard").action(runInit);
@@ -9585,6 +9599,6 @@ program.command("update").description("Update mikromcp to the latest version via
9585
9599
  });
9586
9600
 
9587
9601
  // src/main.ts
9588
- loadDotenv({ path: join5(homedir5(), ".mikromcp", ".env"), override: false });
9602
+ loadDotenv({ path: join5(homedir5(), ".mikromcp", ".env"), override: false, quiet: true });
9589
9603
  program.parse();
9590
9604
  //# sourceMappingURL=main.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikromcp",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Production-grade MCP server for MikroTik RouterOS",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",