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 +4 -2
- package/cuemap-mcp-0.1.2.tgz +0 -0
- package/package.json +1 -1
- package/src/index.ts +5 -3
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
|
-
|
|
100
|
-
|
|
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
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
|
-
|
|
112
|
-
|
|
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
|
|