cuemap-mcp 0.1.1 → 0.1.2

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/index.js CHANGED
@@ -96,8 +96,10 @@ async function main() {
96
96
  try {
97
97
  const pName = args.projectName || path_1.default.basename(args.path);
98
98
  const _projectsRes = await client.listProjects();
99
- const projects = Array.isArray(_projectsRes) ? _projectsRes : _projectsRes.projects || [];
100
- if (!projects.includes(pName)) {
99
+ // Engine returns {projects: [{project_id: "...", ...}, ...]}
100
+ const rawList = Array.isArray(_projectsRes) ? _projectsRes : (_projectsRes?.projects || []);
101
+ const projectIds = rawList.map((p) => typeof p === 'string' ? p : p.project_id);
102
+ if (!projectIds.includes(pName)) {
101
103
  await client.createProject(pName);
102
104
  }
103
105
  await client.setProjectWatchDir(pName, args.path);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cuemap-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for CueMap",
5
5
  "main": "build/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -107,9 +107,11 @@ async function main() {
107
107
  try {
108
108
  const pName = args.projectName || path.basename(args.path);
109
109
 
110
- const _projectsRes = await client.listProjects();
111
- const projects = Array.isArray(_projectsRes) ? _projectsRes : (_projectsRes as any).projects || [];
112
- if (!projects.includes(pName)) {
110
+ const _projectsRes: any = await client.listProjects();
111
+ // Engine returns {projects: [{project_id: "...", ...}, ...]}
112
+ const rawList = Array.isArray(_projectsRes) ? _projectsRes : (_projectsRes?.projects || []);
113
+ const projectIds = rawList.map((p: any) => typeof p === 'string' ? p : p.project_id);
114
+ if (!projectIds.includes(pName)) {
113
115
  await client.createProject(pName);
114
116
  }
115
117