@flemist/mcp-project-tools 4.0.2 → 4.0.4

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/build/cli.js CHANGED
@@ -1,34 +1,39 @@
1
- import { Command as s } from "commander";
2
- import { l as a, A as i, S as n, a as c, b as p, p as l, s as f } from "./startMcpServer-B0YHIlQA.js";
3
- import * as m from "path";
4
- const v = {
5
- title: p,
6
- name: c,
7
- version: n,
1
+ import { Command as a } from "commander";
2
+ import { l as c, A as p, S as l, a as f, b as v, p as g, s as m } from "./startMcpServer--UfKhlmP.js";
3
+ import * as s from "path";
4
+ const E = {
5
+ title: v,
6
+ name: f,
7
+ version: l,
8
8
  port: 8e3,
9
9
  host: "localhost",
10
- authToken: i,
10
+ authToken: p,
11
11
  logDir: "tmp/mcp-project-tools/logs",
12
12
  projects: {}
13
13
  };
14
- async function g(r) {
15
- const t = m.resolve(r || ""), o = await a(t);
16
- return {
17
- ...v,
18
- ...o
14
+ async function u(t) {
15
+ const r = s.resolve(t || ""), e = await c(r), o = {
16
+ ...E,
17
+ ...e
19
18
  };
19
+ for (const n in o.projects)
20
+ o.projects[n] = s.resolve(
21
+ r,
22
+ o.projects[n]
23
+ );
24
+ return o.logDir = s.resolve(r, o.logDir), o;
20
25
  }
21
- const e = new s();
22
- e.name("mcp-project-tools").description("MCP project tools server").version(l.version, "-v, --version", "output the current version");
23
- E(e);
24
- function E(r) {
25
- r.option("-c, --config [path]", "Path to server configuration directory (optional)").action(async (t) => {
26
+ const i = new a();
27
+ i.name("mcp-project-tools").description("MCP project tools server").version(g.version, "-v, --version", "output the current version");
28
+ C(i);
29
+ function C(t) {
30
+ t.option("-c, --config [path]", "Path to server configuration directory (optional)").action(async (r) => {
26
31
  try {
27
- const o = await g(t.config);
28
- await f(o);
29
- } catch (o) {
30
- console.error("Failed to start MCP server:", o), process.exit(1);
32
+ const e = await u(r.config);
33
+ await m(e);
34
+ } catch (e) {
35
+ console.error("Failed to start MCP server:", e), process.exit(1);
31
36
  }
32
37
  });
33
38
  }
34
- e.parse();
39
+ i.parse();
package/build/index.d.ts CHANGED
@@ -75,6 +75,16 @@ declare type ProcessManagerOptions = {
75
75
  /** Working directory for process execution, null uses current directory */
76
76
  workingDir?: string | null;
77
77
  commandLineRules: CommandLineRule[];
78
+ /** Environment variables: string to add/override, null to delete */
79
+ env?: Record<string, string | null> | null;
80
+ /**
81
+ * Cleanup env before applying project env:
82
+ * - "deleteServerPaths" (default): delete variables containing server paths
83
+ * - "replaceServerPaths": replace server paths with project paths
84
+ * - "clear": start with empty env
85
+ * - false: do nothing, inherit server env
86
+ */
87
+ envCleanup?: 'clear' | 'replaceServerPaths' | 'deleteServerPaths' | false;
78
88
  run?: null | boolean;
79
89
  status?: null | boolean;
80
90
  wait?: null | boolean;
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s } from "./startMcpServer-B0YHIlQA.js";
1
+ import { s } from "./startMcpServer--UfKhlmP.js";
2
2
  export {
3
3
  s as startMcpServer
4
4
  };