pabal-resource-mcp 1.6.2 → 1.6.4
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/dist/bin/mcp-server.js +54 -19
- package/package.json +1 -1
package/dist/bin/mcp-server.js
CHANGED
|
@@ -568,11 +568,8 @@ function prepareAsoDataForPush(slug, configData) {
|
|
|
568
568
|
};
|
|
569
569
|
const cleanedLocales = {};
|
|
570
570
|
for (const [locale, localeData] of Object.entries(locales)) {
|
|
571
|
-
const { screenshots, ...rest } = localeData;
|
|
572
571
|
cleanedLocales[locale] = {
|
|
573
|
-
...
|
|
574
|
-
featureGraphic: void 0
|
|
575
|
-
// Images excluded
|
|
572
|
+
...localeData
|
|
576
573
|
};
|
|
577
574
|
}
|
|
578
575
|
const convertedLocales = {};
|
|
@@ -594,8 +591,9 @@ function prepareAsoDataForPush(slug, configData) {
|
|
|
594
591
|
defaultLocale: convertedDefaultLocale,
|
|
595
592
|
// App-level contact information (from multilingual data)
|
|
596
593
|
contactEmail: isGooglePlayMultilingual(googlePlayData) ? googlePlayData.contactEmail : void 0,
|
|
597
|
-
contactWebsite: detailPageUrl
|
|
594
|
+
contactWebsite: detailPageUrl,
|
|
598
595
|
// Set to detail page URL
|
|
596
|
+
youtubeUrl: isGooglePlayMultilingual(googlePlayData) ? googlePlayData.youtubeUrl : googlePlayData.video || void 0
|
|
599
597
|
};
|
|
600
598
|
}
|
|
601
599
|
if (configData.appStore) {
|
|
@@ -603,9 +601,8 @@ function prepareAsoDataForPush(slug, configData) {
|
|
|
603
601
|
const locales = isAppStoreMultilingual(appStoreData) ? appStoreData.locales : { [appStoreData.locale || DEFAULT_LOCALE]: appStoreData };
|
|
604
602
|
const cleanedLocales = {};
|
|
605
603
|
for (const [locale, localeData] of Object.entries(locales)) {
|
|
606
|
-
const { screenshots, ...rest } = localeData;
|
|
607
604
|
cleanedLocales[locale] = {
|
|
608
|
-
...
|
|
605
|
+
...localeData
|
|
609
606
|
};
|
|
610
607
|
}
|
|
611
608
|
const convertedLocales = {};
|
|
@@ -766,6 +763,7 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
766
763
|
"screenshots",
|
|
767
764
|
googlePlayLocale
|
|
768
765
|
);
|
|
766
|
+
const relativePaths = { phone: [], tablet7: [], tablet10: [] };
|
|
769
767
|
const phoneScreenshots = localeData.screenshots?.phone;
|
|
770
768
|
if (phoneScreenshots && phoneScreenshots.length > 0) {
|
|
771
769
|
for (let i = 0; i < phoneScreenshots.length; i++) {
|
|
@@ -774,9 +772,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
774
772
|
const outputPath = path4.join(asoDir, filename);
|
|
775
773
|
if (isLocalAssetPath(url)) {
|
|
776
774
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
777
|
-
|
|
775
|
+
} else {
|
|
776
|
+
await downloadImage(url, outputPath);
|
|
778
777
|
}
|
|
779
|
-
|
|
778
|
+
relativePaths.phone.push(
|
|
779
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
780
|
+
);
|
|
780
781
|
}
|
|
781
782
|
}
|
|
782
783
|
const tablet7Screenshots = localeData.screenshots?.tablet7;
|
|
@@ -787,9 +788,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
787
788
|
const outputPath = path4.join(asoDir, filename);
|
|
788
789
|
if (isLocalAssetPath(url)) {
|
|
789
790
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
790
|
-
|
|
791
|
+
} else {
|
|
792
|
+
await downloadImage(url, outputPath);
|
|
791
793
|
}
|
|
792
|
-
|
|
794
|
+
relativePaths.tablet7.push(
|
|
795
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
796
|
+
);
|
|
793
797
|
}
|
|
794
798
|
}
|
|
795
799
|
const tablet10Screenshots = localeData.screenshots?.tablet10;
|
|
@@ -800,9 +804,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
800
804
|
const outputPath = path4.join(asoDir, filename);
|
|
801
805
|
if (isLocalAssetPath(url)) {
|
|
802
806
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
803
|
-
|
|
807
|
+
} else {
|
|
808
|
+
await downloadImage(url, outputPath);
|
|
804
809
|
}
|
|
805
|
-
|
|
810
|
+
relativePaths.tablet10.push(
|
|
811
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
812
|
+
);
|
|
806
813
|
}
|
|
807
814
|
}
|
|
808
815
|
const tabletScreenshots = localeData.screenshots?.tablet;
|
|
@@ -813,11 +820,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
813
820
|
const outputPath = path4.join(asoDir, filename);
|
|
814
821
|
if (isLocalAssetPath(url)) {
|
|
815
822
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
816
|
-
|
|
823
|
+
} else {
|
|
824
|
+
await downloadImage(url, outputPath);
|
|
817
825
|
}
|
|
818
|
-
await downloadImage(url, outputPath);
|
|
819
826
|
}
|
|
820
827
|
}
|
|
828
|
+
let featureGraphicPath;
|
|
821
829
|
if (localeData.featureGraphic) {
|
|
822
830
|
const featureGraphicUrl = localeData.featureGraphic;
|
|
823
831
|
const outputPath = path4.join(asoDir, "feature-graphic.png");
|
|
@@ -826,8 +834,18 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
826
834
|
} else {
|
|
827
835
|
await downloadImage(featureGraphicUrl, outputPath);
|
|
828
836
|
}
|
|
837
|
+
featureGraphicPath = `google-play/screenshots/${googlePlayLocale}/feature-graphic.png`;
|
|
838
|
+
}
|
|
839
|
+
localeData.screenshots = {
|
|
840
|
+
phone: relativePaths.phone,
|
|
841
|
+
tablet7: relativePaths.tablet7,
|
|
842
|
+
tablet10: relativePaths.tablet10
|
|
843
|
+
};
|
|
844
|
+
if (featureGraphicPath) {
|
|
845
|
+
localeData.featureGraphic = featureGraphicPath;
|
|
829
846
|
}
|
|
830
847
|
}
|
|
848
|
+
asoData.googlePlay = googlePlayData;
|
|
831
849
|
}
|
|
832
850
|
if (asoData.appStore) {
|
|
833
851
|
let appStoreData = asoData.appStore;
|
|
@@ -850,6 +868,7 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
850
868
|
"screenshots",
|
|
851
869
|
appStoreLocale
|
|
852
870
|
);
|
|
871
|
+
const relativePaths = { iphone65: [], ipadPro129: [] };
|
|
853
872
|
const iphone65Screenshots = localeData.screenshots?.iphone65;
|
|
854
873
|
if (iphone65Screenshots && iphone65Screenshots.length > 0) {
|
|
855
874
|
for (let i = 0; i < iphone65Screenshots.length; i++) {
|
|
@@ -858,9 +877,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
858
877
|
const outputPath = path4.join(asoDir, filename);
|
|
859
878
|
if (isLocalAssetPath(url)) {
|
|
860
879
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
861
|
-
|
|
880
|
+
} else {
|
|
881
|
+
await downloadImage(url, outputPath);
|
|
862
882
|
}
|
|
863
|
-
|
|
883
|
+
relativePaths.iphone65.push(
|
|
884
|
+
`app-store/screenshots/${appStoreLocale}/${filename}`
|
|
885
|
+
);
|
|
864
886
|
}
|
|
865
887
|
}
|
|
866
888
|
const ipadPro129Screenshots = localeData.screenshots?.ipadPro129;
|
|
@@ -871,12 +893,20 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
871
893
|
const outputPath = path4.join(asoDir, filename);
|
|
872
894
|
if (isLocalAssetPath(url)) {
|
|
873
895
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
874
|
-
|
|
896
|
+
} else {
|
|
897
|
+
await downloadImage(url, outputPath);
|
|
875
898
|
}
|
|
876
|
-
|
|
899
|
+
relativePaths.ipadPro129.push(
|
|
900
|
+
`app-store/screenshots/${appStoreLocale}/${filename}`
|
|
901
|
+
);
|
|
877
902
|
}
|
|
878
903
|
}
|
|
904
|
+
localeData.screenshots = {
|
|
905
|
+
iphone65: relativePaths.iphone65,
|
|
906
|
+
ipadPro129: relativePaths.ipadPro129
|
|
907
|
+
};
|
|
879
908
|
}
|
|
909
|
+
asoData.appStore = appStoreData;
|
|
880
910
|
}
|
|
881
911
|
}
|
|
882
912
|
var publicToAsoTool = {
|
|
@@ -1033,6 +1063,11 @@ ${validationMessage}`
|
|
|
1033
1063
|
if (localeCounts.googlePlay) {
|
|
1034
1064
|
responseText += `Google Play: ${localeCounts.googlePlay} locale(s)
|
|
1035
1065
|
`;
|
|
1066
|
+
const gpData = storeData.googlePlay;
|
|
1067
|
+
if (gpData && isGooglePlayMultilingual(gpData) && gpData.youtubeUrl) {
|
|
1068
|
+
responseText += `Google Play YouTube URL: ${gpData.youtubeUrl}
|
|
1069
|
+
`;
|
|
1070
|
+
}
|
|
1036
1071
|
}
|
|
1037
1072
|
if (localeCounts.appStore) {
|
|
1038
1073
|
responseText += `App Store: ${localeCounts.appStore} locale(s)
|