targetprocess-mcp-server 1.0.17 → 1.0.18-a

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/build/index.js +20 -11
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -755,14 +755,23 @@ server.registerTool('get_not_covered_user_stories_in_feature', {
755
755
  const userStoriesPromise = userStoriesIds.map((id) => tp.getUserStory(id));
756
756
  let userStoriesResults = [];
757
757
  try {
758
- userStoriesResults = await Promise.all(userStoriesPromise);
758
+ const results = await Promise.all(userStoriesPromise);
759
+ userStoriesResults = results.map((item) => item).flat();
759
760
  }
760
761
  catch (error) {
761
762
  console.error("Error getting user stories:", error);
762
763
  return {
763
764
  content: [{
764
765
  type: 'text',
765
- text: `Failed to get user stories for feature id: ${id}`,
766
+ text: `Failed to get user stories for feature id: ${id}. Error: ${error}`,
767
+ }],
768
+ };
769
+ }
770
+ if (userStoriesResults.length === 0) {
771
+ return {
772
+ content: [{
773
+ type: 'text',
774
+ text: `No user stories promise found for feature id: ${id}`,
766
775
  }],
767
776
  };
768
777
  }
@@ -779,21 +788,21 @@ server.registerTool('get_not_covered_user_stories_in_feature', {
779
788
  covered,
780
789
  });
781
790
  }
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
- }
790
791
  }
791
792
  catch (error) {
792
793
  console.error("Error getting user stories:", error);
793
794
  return {
794
795
  content: [{
795
796
  type: 'text',
796
- text: `Failed to get user stories array for feature id: ${id}`,
797
+ text: `Failed to get user stories array for feature id: ${id}: Error: ${error}`,
798
+ }],
799
+ };
800
+ }
801
+ if (userStories.length === 0) {
802
+ return {
803
+ content: [{
804
+ type: 'text',
805
+ text: `No user stories unable to convert to TP card found for feature id: ${id}`,
797
806
  }],
798
807
  };
799
808
  }
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "1.0.17",
28
+ "version": "1.0.18a",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [