pabal-resource-mcp 1.6.3 → 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 +47 -18
- 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 = {};
|
|
@@ -604,9 +601,8 @@ function prepareAsoDataForPush(slug, configData) {
|
|
|
604
601
|
const locales = isAppStoreMultilingual(appStoreData) ? appStoreData.locales : { [appStoreData.locale || DEFAULT_LOCALE]: appStoreData };
|
|
605
602
|
const cleanedLocales = {};
|
|
606
603
|
for (const [locale, localeData] of Object.entries(locales)) {
|
|
607
|
-
const { screenshots, ...rest } = localeData;
|
|
608
604
|
cleanedLocales[locale] = {
|
|
609
|
-
...
|
|
605
|
+
...localeData
|
|
610
606
|
};
|
|
611
607
|
}
|
|
612
608
|
const convertedLocales = {};
|
|
@@ -767,6 +763,7 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
767
763
|
"screenshots",
|
|
768
764
|
googlePlayLocale
|
|
769
765
|
);
|
|
766
|
+
const relativePaths = { phone: [], tablet7: [], tablet10: [] };
|
|
770
767
|
const phoneScreenshots = localeData.screenshots?.phone;
|
|
771
768
|
if (phoneScreenshots && phoneScreenshots.length > 0) {
|
|
772
769
|
for (let i = 0; i < phoneScreenshots.length; i++) {
|
|
@@ -775,9 +772,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
775
772
|
const outputPath = path4.join(asoDir, filename);
|
|
776
773
|
if (isLocalAssetPath(url)) {
|
|
777
774
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
778
|
-
|
|
775
|
+
} else {
|
|
776
|
+
await downloadImage(url, outputPath);
|
|
779
777
|
}
|
|
780
|
-
|
|
778
|
+
relativePaths.phone.push(
|
|
779
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
780
|
+
);
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
const tablet7Screenshots = localeData.screenshots?.tablet7;
|
|
@@ -788,9 +788,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
788
788
|
const outputPath = path4.join(asoDir, filename);
|
|
789
789
|
if (isLocalAssetPath(url)) {
|
|
790
790
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
791
|
-
|
|
791
|
+
} else {
|
|
792
|
+
await downloadImage(url, outputPath);
|
|
792
793
|
}
|
|
793
|
-
|
|
794
|
+
relativePaths.tablet7.push(
|
|
795
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
796
|
+
);
|
|
794
797
|
}
|
|
795
798
|
}
|
|
796
799
|
const tablet10Screenshots = localeData.screenshots?.tablet10;
|
|
@@ -801,9 +804,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
801
804
|
const outputPath = path4.join(asoDir, filename);
|
|
802
805
|
if (isLocalAssetPath(url)) {
|
|
803
806
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
804
|
-
|
|
807
|
+
} else {
|
|
808
|
+
await downloadImage(url, outputPath);
|
|
805
809
|
}
|
|
806
|
-
|
|
810
|
+
relativePaths.tablet10.push(
|
|
811
|
+
`google-play/screenshots/${googlePlayLocale}/${filename}`
|
|
812
|
+
);
|
|
807
813
|
}
|
|
808
814
|
}
|
|
809
815
|
const tabletScreenshots = localeData.screenshots?.tablet;
|
|
@@ -814,11 +820,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
814
820
|
const outputPath = path4.join(asoDir, filename);
|
|
815
821
|
if (isLocalAssetPath(url)) {
|
|
816
822
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
817
|
-
|
|
823
|
+
} else {
|
|
824
|
+
await downloadImage(url, outputPath);
|
|
818
825
|
}
|
|
819
|
-
await downloadImage(url, outputPath);
|
|
820
826
|
}
|
|
821
827
|
}
|
|
828
|
+
let featureGraphicPath;
|
|
822
829
|
if (localeData.featureGraphic) {
|
|
823
830
|
const featureGraphicUrl = localeData.featureGraphic;
|
|
824
831
|
const outputPath = path4.join(asoDir, "feature-graphic.png");
|
|
@@ -827,8 +834,18 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
827
834
|
} else {
|
|
828
835
|
await downloadImage(featureGraphicUrl, outputPath);
|
|
829
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;
|
|
830
846
|
}
|
|
831
847
|
}
|
|
848
|
+
asoData.googlePlay = googlePlayData;
|
|
832
849
|
}
|
|
833
850
|
if (asoData.appStore) {
|
|
834
851
|
let appStoreData = asoData.appStore;
|
|
@@ -851,6 +868,7 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
851
868
|
"screenshots",
|
|
852
869
|
appStoreLocale
|
|
853
870
|
);
|
|
871
|
+
const relativePaths = { iphone65: [], ipadPro129: [] };
|
|
854
872
|
const iphone65Screenshots = localeData.screenshots?.iphone65;
|
|
855
873
|
if (iphone65Screenshots && iphone65Screenshots.length > 0) {
|
|
856
874
|
for (let i = 0; i < iphone65Screenshots.length; i++) {
|
|
@@ -859,9 +877,12 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
859
877
|
const outputPath = path4.join(asoDir, filename);
|
|
860
878
|
if (isLocalAssetPath(url)) {
|
|
861
879
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
862
|
-
|
|
880
|
+
} else {
|
|
881
|
+
await downloadImage(url, outputPath);
|
|
863
882
|
}
|
|
864
|
-
|
|
883
|
+
relativePaths.iphone65.push(
|
|
884
|
+
`app-store/screenshots/${appStoreLocale}/${filename}`
|
|
885
|
+
);
|
|
865
886
|
}
|
|
866
887
|
}
|
|
867
888
|
const ipadPro129Screenshots = localeData.screenshots?.ipadPro129;
|
|
@@ -872,12 +893,20 @@ async function downloadScreenshotsToAsoDir(slug, asoData) {
|
|
|
872
893
|
const outputPath = path4.join(asoDir, filename);
|
|
873
894
|
if (isLocalAssetPath(url)) {
|
|
874
895
|
copyLocalAssetToAsoDir(url, outputPath);
|
|
875
|
-
|
|
896
|
+
} else {
|
|
897
|
+
await downloadImage(url, outputPath);
|
|
876
898
|
}
|
|
877
|
-
|
|
899
|
+
relativePaths.ipadPro129.push(
|
|
900
|
+
`app-store/screenshots/${appStoreLocale}/${filename}`
|
|
901
|
+
);
|
|
878
902
|
}
|
|
879
903
|
}
|
|
904
|
+
localeData.screenshots = {
|
|
905
|
+
iphone65: relativePaths.iphone65,
|
|
906
|
+
ipadPro129: relativePaths.ipadPro129
|
|
907
|
+
};
|
|
880
908
|
}
|
|
909
|
+
asoData.appStore = appStoreData;
|
|
881
910
|
}
|
|
882
911
|
}
|
|
883
912
|
var publicToAsoTool = {
|