@hasna/project 0.1.8 → 0.1.9
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/mcp/index.js +12 -2
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -37372,7 +37372,9 @@ var coerce = {
|
|
|
37372
37372
|
};
|
|
37373
37373
|
var NEVER = INVALID;
|
|
37374
37374
|
// src/mcp/index.ts
|
|
37375
|
-
import { resolve as resolve3 } from "path";
|
|
37375
|
+
import { resolve as resolve3, dirname as dirname6, join as join10 } from "path";
|
|
37376
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
37377
|
+
import { fileURLToPath } from "url";
|
|
37376
37378
|
|
|
37377
37379
|
// node_modules/nanoid/index.js
|
|
37378
37380
|
import { webcrypto as crypto2 } from "crypto";
|
|
@@ -47545,9 +47547,17 @@ function generateAllWorkdirs(project, options = {}) {
|
|
|
47545
47547
|
}
|
|
47546
47548
|
|
|
47547
47549
|
// src/mcp/index.ts
|
|
47550
|
+
function getPkgVersion() {
|
|
47551
|
+
try {
|
|
47552
|
+
const p2 = join10(dirname6(fileURLToPath(import.meta.url)), "..", "..", "package.json");
|
|
47553
|
+
return JSON.parse(readFileSync7(p2, "utf-8")).version;
|
|
47554
|
+
} catch {
|
|
47555
|
+
return "0.0.0";
|
|
47556
|
+
}
|
|
47557
|
+
}
|
|
47548
47558
|
var server = new McpServer({
|
|
47549
47559
|
name: "project",
|
|
47550
|
-
version:
|
|
47560
|
+
version: getPkgVersion()
|
|
47551
47561
|
});
|
|
47552
47562
|
server.tool("projects_create", "Register a new project. Returns the project with its workingDirectory so AI agents can cd into it.", {
|
|
47553
47563
|
name: exports_external.string().describe("Project name"),
|
package/package.json
CHANGED