@codemap-ai/mcp 0.2.0 → 1.1.0

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -232356,6 +232356,17 @@ import { execFile } from "child_process";
232356
232356
  import path5 from "path";
232357
232357
  import { promisify } from "util";
232358
232358
  var execFileAsync = promisify(execFile);
232359
+ function normalizeRemoteUrl(url) {
232360
+ const sshMatch = /^git@([^:]+):(.+?)(?:\.git)?$/i.exec(url);
232361
+ if (sshMatch) {
232362
+ return `https://${sshMatch[1]}/${sshMatch[2].replace(/\.git$/i, "")}`;
232363
+ }
232364
+ const sshProtoMatch = /^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/i.exec(url);
232365
+ if (sshProtoMatch) {
232366
+ return `https://${sshProtoMatch[1]}/${sshProtoMatch[2].replace(/\.git$/i, "")}`;
232367
+ }
232368
+ return url;
232369
+ }
232359
232370
  async function runGitCommand(cwd, args) {
232360
232371
  const { stdout } = await execFileAsync("git", args, {
232361
232372
  cwd,
@@ -232400,7 +232411,7 @@ async function getCurrentWorkspaceInfo(cwd = process.cwd()) {
232400
232411
  repoName: path5.basename(repoRootPath),
232401
232412
  branch,
232402
232413
  commitSha,
232403
- remoteUrl: remoteUrl || null
232414
+ remoteUrl: remoteUrl ? normalizeRemoteUrl(remoteUrl) : null
232404
232415
  };
232405
232416
  }
232406
232417
 
@@ -233665,6 +233676,10 @@ function getPackageRoot(callerImportMetaUrl) {
233665
233676
  if (srcIdx !== -1) {
233666
233677
  return path11.resolve(callerDir.slice(0, srcIdx));
233667
233678
  }
233679
+ const distIdx = callerDir.lastIndexOf(`${path11.sep}dist${path11.sep}`);
233680
+ if (distIdx !== -1) {
233681
+ return path11.resolve(callerDir.slice(0, distIdx));
233682
+ }
233668
233683
  return path11.resolve(callerDir, "..");
233669
233684
  }
233670
233685
 
@@ -233709,7 +233724,7 @@ function skillResourceUri(skillName) {
233709
233724
  return `codemap://skills/${skillName}`;
233710
233725
  }
233711
233726
  function getAgentPackRoot() {
233712
- return path12.join(getPackageRoot(import.meta.url), "agent-pack");
233727
+ return path12.join(getPackageRoot(import.meta.url), "..", "cli", "agent-pack");
233713
233728
  }
233714
233729
  function getPluginRoot() {
233715
233730
  return getPackageRoot(import.meta.url);
@@ -234643,8 +234658,7 @@ async function createProjectFromGithub(client, params) {
234643
234658
  externalRepoId: external_repo_id,
234644
234659
  defaultBranch: default_branch,
234645
234660
  branch,
234646
- workspaceId: workspace_id,
234647
- isPrivate: is_private
234661
+ workspaceId: workspace_id
234648
234662
  },
234649
234663
  authRequired: true
234650
234664
  }
@@ -235076,12 +235090,12 @@ function sshToHttpsUrl(url) {
235076
235090
  if (match) return `https://${match[1]}/${match[2]}`;
235077
235091
  return url;
235078
235092
  }
235079
- function normalizeRemoteUrl(url) {
235093
+ function normalizeRemoteUrl2(url) {
235080
235094
  return url.trim().replace(/\/+$/, "").replace(/\.git$/, "").toLowerCase();
235081
235095
  }
235082
235096
  function remoteUrlsMatch(a, b) {
235083
235097
  if (!a || !b) return false;
235084
- return normalizeRemoteUrl(a) === normalizeRemoteUrl(b);
235098
+ return normalizeRemoteUrl2(a) === normalizeRemoteUrl2(b);
235085
235099
  }
235086
235100
  function formatProjectList(projects) {
235087
235101
  return projects.map((p, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemap-ai/mcp",
3
- "version": "0.2.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "CodeMap MCP server for IDE integrations",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "tsup": "^8.5.1",
23
23
  "tsx": "^4.21.0",
24
24
  "typescript": "~5.9.2",
25
- "@codemap-ai/core": "0.2.0"
25
+ "@codemap-ai/core": "1.1.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"