layermap 0.1.53 → 0.1.55
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/README.md +15 -0
- package/analyzers/project-map-java/java-map.jar +0 -0
- package/dist/cli.mjs +570 -458
- package/dist/launcher.mjs +9 -8
- package/package.json +1 -1
- package/pi/layermap.mjs +1 -1
package/dist/launcher.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Runs one LayerMap version in this process: its MCP server, or, for the layermap command of the
|
|
2
|
-
// Claude Code plugin, its command line with the arguments given. The version is installed once
|
|
3
|
-
//
|
|
4
|
-
//
|
|
2
|
+
// Claude Code plugin, its command line with the arguments given. The version is installed once on
|
|
3
|
+
// this machine, from where every later start runs without npm or a network. The agent starts this
|
|
4
|
+
// in the project, which stays the working directory the server maps; npm runs where it installs,
|
|
5
5
|
// so the project's own npm settings and packages play no part in what gets installed.
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import {
|
|
@@ -20,16 +20,17 @@ import { pathToFileURL } from "node:url";
|
|
|
20
20
|
const VERSION = __VERSION__;
|
|
21
21
|
const ARGUMENTS = __ARGUMENTS__;
|
|
22
22
|
|
|
23
|
-
// The same directory as
|
|
23
|
+
// The same directory as installDirectory in src/agent/environment.ts: the user's cache, unless
|
|
24
|
+
// LAYERMAP_HOME names another. LAYERMAP_CACHE, which names where maps are kept, does not move it.
|
|
24
25
|
const env = process.env;
|
|
25
|
-
const
|
|
26
|
-
? path.resolve(env.
|
|
26
|
+
const directory = env.LAYERMAP_HOME
|
|
27
|
+
? path.resolve(env.LAYERMAP_HOME)
|
|
27
28
|
: process.platform === "darwin"
|
|
28
29
|
? path.join(homedir(), "Library", "Caches", "layermap")
|
|
29
30
|
: process.platform === "win32"
|
|
30
31
|
? path.join(env.LOCALAPPDATA || path.join(homedir(), "AppData", "Local"), "layermap", "Cache")
|
|
31
32
|
: path.join(env.XDG_CACHE_HOME || path.join(homedir(), ".cache"), "layermap");
|
|
32
|
-
const versions = path.join(
|
|
33
|
+
const versions = path.join(directory, "versions");
|
|
33
34
|
const home = path.join(versions, VERSION);
|
|
34
35
|
const installed = path.join(home, "node_modules", "layermap");
|
|
35
36
|
const manifest = path.join(installed, "package.json");
|
|
@@ -94,7 +95,7 @@ async function install() {
|
|
|
94
95
|
|
|
95
96
|
try {
|
|
96
97
|
if (!existsSync(manifest)) await install();
|
|
97
|
-
// LayerMap removes a version
|
|
98
|
+
// LayerMap removes a version once nothing has started it for a week.
|
|
98
99
|
writeFileSync(path.join(home, "last-used"), "");
|
|
99
100
|
const entry = path.join(installed, JSON.parse(readFileSync(manifest, "utf8")).bin.layermap);
|
|
100
101
|
process.argv = [process.argv[0], entry, ...ARGUMENTS];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "layermap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"mcpName": "io.github.coffeecoproject/layermap",
|
|
5
5
|
"description": "A layered map of a codebase for coding agents: directories, modules and call chains across TypeScript, JavaScript, Go, Python and Java.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/pi/layermap.mjs
CHANGED
|
@@ -293,7 +293,7 @@ function layermap(pi) {
|
|
|
293
293
|
if (server && !server.dead) return server;
|
|
294
294
|
starting ??= (async () => {
|
|
295
295
|
const next = new MapServer(cwd);
|
|
296
|
-
const tools = await next.start("0.1.
|
|
296
|
+
const tools = await next.start("0.1.55");
|
|
297
297
|
for (const tool of tools) {
|
|
298
298
|
if (registered.has(tool.name)) continue;
|
|
299
299
|
registered.add(tool.name);
|