targetprocess-mcp-server 1.0.16 → 1.0.17

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
@@ -767,26 +767,33 @@ server.registerTool('get_not_covered_user_stories_in_feature', {
767
767
  };
768
768
  }
769
769
  let userStories = [];
770
- for (const userStory of userStoriesResults) {
771
- const userStoryId = userStory.Id;
772
- const feature = userStory.Feature;
773
- const featureId = feature.Id;
774
- const featureName = feature.Name;
775
- const covered = userStory.CustomFields.find((field) => field.Name === "Test Automation")?.Value === "Done";
776
- userStories.push({
777
- id: userStoryId,
778
- name: userStory.Name,
779
- description: userStory.Description,
780
- featureId,
781
- featureName,
782
- covered,
783
- });
770
+ try {
771
+ for (const userStory of userStoriesResults) {
772
+ const covered = userStory.CustomFields.find((field) => field.Name === "Test Automation")?.Value === "Done";
773
+ userStories.push({
774
+ id: userStory.Id,
775
+ name: userStory.Name,
776
+ description: userStory.Description,
777
+ featureId: userStory.Feature.Id,
778
+ featureName: userStory.Feature.Name,
779
+ covered,
780
+ });
781
+ }
782
+ if (userStories.length === 0) {
783
+ return {
784
+ content: [{
785
+ type: 'text',
786
+ text: `No user stories unable to convert to TP card found for feature id: ${id}`,
787
+ }],
788
+ };
789
+ }
784
790
  }
785
- if (userStories.length === 0) {
791
+ catch (error) {
792
+ console.error("Error getting user stories:", error);
786
793
  return {
787
794
  content: [{
788
795
  type: 'text',
789
- text: `No user stories unable to convert to TP card found for feature id: ${id}`,
796
+ text: `Failed to get user stories array for feature id: ${id}`,
790
797
  }],
791
798
  };
792
799
  }
package/build/tp.js CHANGED
@@ -80,12 +80,8 @@ export class TpClient {
80
80
  }
81
81
  async getUserStory(userStoryId) {
82
82
  const response = await this.get({
83
- pathParam: {
84
- "userStories": userStoryId,
85
- },
86
- param: {
87
- "format": "json",
88
- },
83
+ pathParam: { "userStories": userStoryId },
84
+ param: { "format": "json" },
89
85
  });
90
86
  return response;
91
87
  }
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "1.0.16",
28
+ "version": "1.0.17",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [