layermap 0.1.0 → 0.1.1
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 +1 -2
- package/analyzers/project-map-java/java-map.jar +0 -0
- package/dist/cli.mjs +12 -7
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -48,8 +48,7 @@ For any other MCP client, run `npx -y layermap mcp` as a stdio server in the rep
|
|
|
48
48
|
|
|
49
49
|
## Requirements
|
|
50
50
|
|
|
51
|
-
- **Node.js 22.22 or later
|
|
52
|
-
ships, and needs its full-text search (some package managers build Node without it).
|
|
51
|
+
- **Node.js 22.22 or later.**
|
|
53
52
|
- **macOS or Linux** (x64 or arm64).
|
|
54
53
|
- **Git**: LayerMap maps a Git work tree, the one around the directory the agent starts in.
|
|
55
54
|
- **Java projects only:** a JDK 21 or later (found through `LAYERMAP_JAVA_HOME`, `JAVA_HOME`, `PATH`,
|
|
Binary file
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as layermapCreateRequire } from "node:module"; const require = layermapCreateRequire(import.meta.url);
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __export = (target, all) => {
|
|
@@ -24,7 +24,7 @@ import { createHash as createHash4 } from "node:crypto";
|
|
|
24
24
|
import { mkdirSync } from "node:fs";
|
|
25
25
|
import { lstat as lstat2, realpath as realpath2 } from "node:fs/promises";
|
|
26
26
|
import path7 from "node:path";
|
|
27
|
-
import { DatabaseSync } from "
|
|
27
|
+
import { DatabaseSync } from "@photostructure/sqlite";
|
|
28
28
|
|
|
29
29
|
// src/capture-policy.ts
|
|
30
30
|
import path2 from "node:path";
|
|
@@ -21894,7 +21894,7 @@ function openMapDatabase(file2) {
|
|
|
21894
21894
|
database.exec(`PRAGMA user_version = ${SCHEMA_VERSION}; COMMIT;`);
|
|
21895
21895
|
} catch (error51) {
|
|
21896
21896
|
database.exec("ROLLBACK");
|
|
21897
|
-
throw
|
|
21897
|
+
throw error51;
|
|
21898
21898
|
}
|
|
21899
21899
|
} else if (version2 === 1) {
|
|
21900
21900
|
database.exec(
|
|
@@ -21938,7 +21938,9 @@ var LayerMap = class _LayerMap {
|
|
|
21938
21938
|
directory: { canonicalPath: project, device: String(stat2.dev), inode: String(stat2.ino) }
|
|
21939
21939
|
};
|
|
21940
21940
|
const store = new CodeIndexStore(
|
|
21941
|
-
openMapDatabase(
|
|
21941
|
+
openMapDatabase(
|
|
21942
|
+
mapDatabasePath(options.cacheDirectory, project)
|
|
21943
|
+
)
|
|
21942
21944
|
);
|
|
21943
21945
|
const { typescript, go, python, java } = options.analyzers;
|
|
21944
21946
|
const index = new CodeIndex(
|
|
@@ -22260,8 +22262,7 @@ var HINTS = {
|
|
|
22260
22262
|
PROJECT_READ_INPUT_INVALID: "The arguments do not describe a valid selection.",
|
|
22261
22263
|
PROJECT_PATH_INVALID: "Paths are relative to the project root, use / and contain no . or .. parts.",
|
|
22262
22264
|
PROJECT_MAP_REFERENCE_TARGET_UNAVAILABLE: "References are not available for this declaration; use its callers in project_explore_map.",
|
|
22263
|
-
LAYERMAP_NOT_A_GIT_REPOSITORY: "LayerMap maps Git repositories, and the agent was started outside one. Start it in a repository, or run layermap with --project naming one."
|
|
22264
|
-
LAYERMAP_SQLITE_WITHOUT_FTS5: "This Node.js build has SQLite without FTS5 (as some package managers build it). Run LayerMap with the official Node.js 22.22 or later."
|
|
22265
|
+
LAYERMAP_NOT_A_GIT_REPOSITORY: "LayerMap maps Git repositories, and the agent was started outside one. Start it in a repository, or run layermap with --project naming one."
|
|
22265
22266
|
};
|
|
22266
22267
|
var describeMapError = (error51) => error51 instanceof ProjectEvidenceError ? `${error51.code}${HINTS[error51.code] ? `: ${HINTS[error51.code]}` : ""}` : void 0;
|
|
22267
22268
|
async function runMapTool(map2, name, args, signal) {
|
|
@@ -22523,6 +22524,8 @@ async function disallowInClaudeSettings(file2) {
|
|
|
22523
22524
|
const allow = settings?.permissions?.allow;
|
|
22524
22525
|
if (!Array.isArray(allow) || !allow.includes(`mcp__${SERVER}`)) return;
|
|
22525
22526
|
settings.permissions.allow = allow.filter((rule) => rule !== `mcp__${SERVER}`);
|
|
22527
|
+
if (!settings.permissions.allow.length) delete settings.permissions.allow;
|
|
22528
|
+
if (!Object.keys(settings.permissions).length) delete settings.permissions;
|
|
22526
22529
|
await writeFile2(file2, `${JSON.stringify(settings, null, 2)}
|
|
22527
22530
|
`);
|
|
22528
22531
|
}
|
|
@@ -22749,6 +22752,8 @@ async function main(argv) {
|
|
|
22749
22752
|
}
|
|
22750
22753
|
}
|
|
22751
22754
|
process.exitCode = await main(process.argv.slice(2)).catch((error51) => {
|
|
22752
|
-
log(
|
|
22755
|
+
log(
|
|
22756
|
+
`layermap: ${describeMapError(error51) ?? (error51 instanceof Error ? error51.message : String(error51))}`
|
|
22757
|
+
);
|
|
22753
22758
|
return 1;
|
|
22754
22759
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "layermap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A layered map of a codebase for coding agents: directories, modules and call chains across TypeScript, Go, Python and Java.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"linux"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@photostructure/sqlite": "2.6.0",
|
|
25
26
|
"typescript": "7.0.2"
|
|
26
27
|
},
|
|
27
28
|
"homepage": "https://github.com/coffeecoproject/layermap",
|