targetprocess-mcp-server 1.0.18-a → 1.0.18
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 +11 -20
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -755,23 +755,14 @@ 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
|
-
|
|
759
|
-
userStoriesResults = results.map((item) => item).flat();
|
|
758
|
+
userStoriesResults = await Promise.all(userStoriesPromise);
|
|
760
759
|
}
|
|
761
760
|
catch (error) {
|
|
762
761
|
console.error("Error getting user stories:", error);
|
|
763
762
|
return {
|
|
764
763
|
content: [{
|
|
765
764
|
type: 'text',
|
|
766
|
-
text: `Failed to get user stories for feature id: ${id}
|
|
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}`,
|
|
765
|
+
text: `Failed to get user stories for feature id: ${id}`,
|
|
775
766
|
}],
|
|
776
767
|
};
|
|
777
768
|
}
|
|
@@ -788,21 +779,21 @@ server.registerTool('get_not_covered_user_stories_in_feature', {
|
|
|
788
779
|
covered,
|
|
789
780
|
});
|
|
790
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
|
+
}
|
|
791
790
|
}
|
|
792
791
|
catch (error) {
|
|
793
792
|
console.error("Error getting user stories:", error);
|
|
794
793
|
return {
|
|
795
794
|
content: [{
|
|
796
795
|
type: 'text',
|
|
797
|
-
text: `Failed to get user stories array for feature id: ${id}
|
|
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}`,
|
|
796
|
+
text: `Failed to get user stories array for feature id: ${id}`,
|
|
806
797
|
}],
|
|
807
798
|
};
|
|
808
799
|
}
|