@locofy/mcp 1.0.3 → 1.0.5

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.
@@ -76,9 +76,12 @@ export async function runPullComponentsTool(args) {
76
76
  }
77
77
  }
78
78
  async function fetchDirectoryStructure(componentNames, projectID, personalAccessToken) {
79
- // TODO: change to PROD url
80
79
  const encodedNames = componentNames.map(name => encodeURIComponent(name)).join(',');
81
- const url = 'https://codegen-api.locofy.dev/mcp/generators/' + projectID + '?name=' + encodedNames;
80
+ let baseURL = 'https://codegen-api.locofy.ai/mcp/generators/';
81
+ if (process.env.IS_DEV === 'true') {
82
+ baseURL = 'https://codegen-api.locofy.dev/mcp/generators/';
83
+ }
84
+ const url = baseURL + projectID + '?name=' + encodedNames;
82
85
  const headers = {
83
86
  'Accept': '*/*',
84
87
  'Content-Type': 'application/json',
@@ -487,9 +490,7 @@ function processDirectoryStructure(directoryStructure) {
487
490
  // Then clean the structure
488
491
  cleanNode(directoryStructure);
489
492
  // Get the first child (the actual component data we want)
490
- const result = directoryStructure.children && directoryStructure.children.length > 0
491
- ? directoryStructure.children[0]
492
- : directoryStructure;
493
+ const result = directoryStructure.children;
493
494
  // Add the component lists to the component data
494
495
  result.componentsToUpdate = [...new Set(componentsToUpdate)];
495
496
  result.componentsUnchanged = [...new Set(componentsUnchanged)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locofy/mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Locofy MCP Server with Cursor",
5
5
  "keywords": [
6
6
  "figma",