@imenam/xls-reader 2.4.4 → 2.4.6

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/dist/index.js CHANGED
@@ -8,13 +8,14 @@ import { z } from "zod";
8
8
  import { setupLogging } from "./logger.js";
9
9
  import { listSheets, readSheet, readWorkbook } from "./excel.js";
10
10
  import { deliverFile, RELAY_SHAPE_DESCRIPTIONS } from "./relay.js";
11
+ import { APP_VERSION } from "./version.js";
11
12
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
13
  const rootDir = path.resolve(__dirname, "..");
13
14
  dotenv.config({ path: path.join(rootDir, ".env"), override: true, quiet: true });
14
15
  setupLogging("MASTER");
15
16
  const server = new McpServer({
16
17
  name: "xls-reader",
17
- version: "1.0.0",
18
+ version: APP_VERSION,
18
19
  });
19
20
  // ─── Workbook source (path on this server, or inline content) ─────────────────
20
21
  const sourceShape = {
@@ -0,0 +1,16 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ // Lit la version dans le premier package.json trouvé en remontant depuis ce module.
5
+ function readPackageVersion() {
6
+ let dir = path.dirname(fileURLToPath(import.meta.url));
7
+ while (!existsSync(path.join(dir, "package.json"))) {
8
+ const parent = path.dirname(dir);
9
+ if (parent === dir)
10
+ throw new Error("package.json introuvable");
11
+ dir = parent;
12
+ }
13
+ const pkg = JSON.parse(readFileSync(path.join(dir, "package.json"), "utf8"));
14
+ return pkg.version;
15
+ }
16
+ export const APP_VERSION = readPackageVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imenam/xls-reader",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "MCP server that lets AI agents read Excel files: list sheets and render any sheet as a Markdown table.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@modelcontextprotocol/sdk": "^1.28.0",
43
43
  "dotenv": "^17.3.1",
44
- "xlsx": "^0.18.5",
44
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
45
45
  "zod": "^4.3.6"
46
46
  },
47
47
  "devDependencies": {