pabal-store-api-mcp 1.3.5 → 1.3.7
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.
|
@@ -196,26 +196,18 @@ export class GooglePlayService {
|
|
|
196
196
|
((localeData.screenshots.phone &&
|
|
197
197
|
localeData.screenshots.phone.length > 0) ||
|
|
198
198
|
(localeData.screenshots.tablet &&
|
|
199
|
-
localeData.screenshots.tablet.length > 0)
|
|
200
|
-
(localeData.screenshots.tablet7 &&
|
|
201
|
-
localeData.screenshots.tablet7.length > 0) ||
|
|
202
|
-
(localeData.screenshots.tablet10 &&
|
|
203
|
-
localeData.screenshots.tablet10.length > 0));
|
|
199
|
+
localeData.screenshots.tablet.length > 0));
|
|
204
200
|
let screenshots;
|
|
205
201
|
if (hasScreenshotsInJson) {
|
|
206
202
|
// Use screenshots from aso-data.json (relative paths)
|
|
207
203
|
console.error(`[GooglePlay] 📋 Using screenshots from aso-data.json for ${locale}`);
|
|
208
204
|
const relativePaths = localeData.screenshots;
|
|
209
|
-
//
|
|
210
|
-
|
|
205
|
+
// Google Play upload strategy:
|
|
206
|
+
// - phone array → uploads to both phoneScreenshots AND sevenInchScreenshots
|
|
207
|
+
// - tablet array → uploads to tenInchScreenshots only
|
|
211
208
|
screenshots = {
|
|
212
209
|
phone: (relativePaths.phone || []).map((p) => `${screenshotsBaseDir}/${p}`),
|
|
213
|
-
|
|
214
|
-
? relativePaths.tablet7.map((p) => `${screenshotsBaseDir}/${p}`)
|
|
215
|
-
: genericTablet,
|
|
216
|
-
tablet10: relativePaths.tablet10?.length
|
|
217
|
-
? relativePaths.tablet10.map((p) => `${screenshotsBaseDir}/${p}`)
|
|
218
|
-
: genericTablet,
|
|
210
|
+
tablet: (relativePaths.tablet || []).map((p) => `${screenshotsBaseDir}/${p}`),
|
|
219
211
|
featureGraphic: localeData.featureGraphic
|
|
220
212
|
? `${screenshotsBaseDir}/${localeData.featureGraphic}`
|
|
221
213
|
: null,
|
|
@@ -230,29 +222,33 @@ export class GooglePlayService {
|
|
|
230
222
|
continue;
|
|
231
223
|
}
|
|
232
224
|
console.error(`[GooglePlay] 📂 Parsing screenshots from file system for ${locale}`);
|
|
233
|
-
|
|
225
|
+
const fsScreenshots = parseGooglePlayScreenshots(screenshotsFsDir, locale);
|
|
226
|
+
// File system fallback: use tablet10 as tablet
|
|
227
|
+
screenshots = {
|
|
228
|
+
phone: fsScreenshots.phone,
|
|
229
|
+
tablet: fsScreenshots.tablet10,
|
|
230
|
+
featureGraphic: fsScreenshots.featureGraphic,
|
|
231
|
+
};
|
|
234
232
|
}
|
|
235
233
|
// Google Play requires minimum 2 phone screenshots
|
|
236
|
-
const phoneCount = screenshots.phone.length
|
|
234
|
+
const phoneCount = screenshots.phone.length;
|
|
237
235
|
if (phoneCount < 2) {
|
|
238
|
-
console.error(`[GooglePlay] ⚠️ Skipping ${locale} - needs at least 2 phone
|
|
236
|
+
console.error(`[GooglePlay] ⚠️ Skipping ${locale} - needs at least 2 phone screenshots (found ${phoneCount})`);
|
|
239
237
|
skippedLocales.push(locale);
|
|
240
238
|
continue;
|
|
241
239
|
}
|
|
242
240
|
console.error(`[GooglePlay] 📤 Uploading screenshots for ${locale} (batch mode - will replace existing)...`);
|
|
243
|
-
//
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
...screenshots.phone,
|
|
247
|
-
...screenshots.tablet7,
|
|
248
|
-
];
|
|
241
|
+
// Google Play upload strategy:
|
|
242
|
+
// - phone → uploads to phoneScreenshots AND sevenInchScreenshots (both use same images)
|
|
243
|
+
// - tablet → uploads to tenInchScreenshots only
|
|
249
244
|
const uploadResult = await client.uploadScreenshotsForLocale({
|
|
250
245
|
language: locale,
|
|
251
|
-
phoneScreenshots:
|
|
252
|
-
|
|
246
|
+
phoneScreenshots: screenshots.phone,
|
|
247
|
+
sevenInchScreenshots: screenshots.phone,
|
|
248
|
+
tenInchScreenshots: screenshots.tablet,
|
|
253
249
|
featureGraphic: screenshots.featureGraphic || undefined,
|
|
254
250
|
});
|
|
255
|
-
console.error(`[GooglePlay] ✅ Screenshots uploaded for ${locale}: ${uploadResult.uploaded.phoneScreenshots} phone, ${uploadResult.uploaded.tenInchScreenshots}
|
|
251
|
+
console.error(`[GooglePlay] ✅ Screenshots uploaded for ${locale}: ${uploadResult.uploaded.phoneScreenshots} phone, ${uploadResult.uploaded.sevenInchScreenshots} 7-inch, ${uploadResult.uploaded.tenInchScreenshots} 10-inch`);
|
|
256
252
|
uploadedLocales.push(locale);
|
|
257
253
|
}
|
|
258
254
|
catch (error) {
|
|
@@ -76,14 +76,14 @@ export function saveAsoData(slug, asoData, options) {
|
|
|
76
76
|
ensureDir(googlePlayDir);
|
|
77
77
|
const filePath = join(googlePlayDir, "aso-data.json");
|
|
78
78
|
writeFileSync(filePath, JSON.stringify({ googlePlay: asoData.googlePlay }, null, 2));
|
|
79
|
-
console.
|
|
79
|
+
console.error(`💾 Google Play data saved to ${filePath}`);
|
|
80
80
|
}
|
|
81
81
|
if (asoData.appStore) {
|
|
82
82
|
const appStoreDir = join(productStoreDir, "app-store");
|
|
83
83
|
ensureDir(appStoreDir);
|
|
84
84
|
const filePath = join(appStoreDir, "aso-data.json");
|
|
85
85
|
writeFileSync(filePath, JSON.stringify({ appStore: asoData.appStore }, null, 2));
|
|
86
|
-
console.
|
|
86
|
+
console.error(`💾 App Store data saved to ${filePath}`);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
@@ -167,7 +167,7 @@ export class AppStoreClient {
|
|
|
167
167
|
throw new Error("App Store version not found.");
|
|
168
168
|
const localizationsResponse = await this.listAppStoreVersionLocalizations(version.id);
|
|
169
169
|
const allLocalizations = localizationsResponse.data || [];
|
|
170
|
-
console.
|
|
170
|
+
console.error(`🌍 Found ${allLocalizations.length} App Store localizations: ${allLocalizations
|
|
171
171
|
.map((l) => l.attributes?.locale)
|
|
172
172
|
.join(", ")}`);
|
|
173
173
|
const locales = {};
|
|
@@ -290,11 +290,11 @@ export class AppStoreClient {
|
|
|
290
290
|
});
|
|
291
291
|
const existing = versionsResponse.data?.find((v) => v.attributes?.versionString === versionString);
|
|
292
292
|
if (existing) {
|
|
293
|
-
console.
|
|
293
|
+
console.error(`⚠️ Version ${versionString} already exists.`);
|
|
294
294
|
return existing;
|
|
295
295
|
}
|
|
296
296
|
const createResponse = await this.createAppStoreVersion(appId, versionString, APP_STORE_PLATFORM);
|
|
297
|
-
console.
|
|
297
|
+
console.error(`✅ Created new version: ${versionString}`);
|
|
298
298
|
return createResponse.data;
|
|
299
299
|
}
|
|
300
300
|
async createNewVersionWithAutoIncrement(baseVersion) {
|
|
@@ -306,12 +306,12 @@ export class AppStoreClient {
|
|
|
306
306
|
const latestVersion = await this.getLatestVersion();
|
|
307
307
|
if (!latestVersion) {
|
|
308
308
|
newVersionString = "1.0.0";
|
|
309
|
-
console.
|
|
309
|
+
console.error(`📦 No existing versions. Starting with ${newVersionString}`);
|
|
310
310
|
}
|
|
311
311
|
else {
|
|
312
312
|
const latest = latestVersion.attributes?.versionString ?? "0.0.0";
|
|
313
313
|
newVersionString = this.incrementVersion(latest);
|
|
314
|
-
console.
|
|
314
|
+
console.error(`📦 Latest: ${latest} → New: ${newVersionString}`);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
return this.createNewVersion(newVersionString);
|
|
@@ -330,7 +330,7 @@ export class AppStoreClient {
|
|
|
330
330
|
whatsNew,
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
console.
|
|
333
|
+
console.error(`✅ Updated What's New for ${locale}`);
|
|
334
334
|
}
|
|
335
335
|
async pullReleaseNotes() {
|
|
336
336
|
const appId = await this.findAppId();
|
|
@@ -81,7 +81,7 @@ export class GooglePlayClient {
|
|
|
81
81
|
const appDetails = await this.getAppDetails(session);
|
|
82
82
|
const listingsResponse = await this.listListings(session);
|
|
83
83
|
const allListings = listingsResponse.data.listings || [];
|
|
84
|
-
console.
|
|
84
|
+
console.error(`🌍 Found ${allListings.length} Google Play languages: ${allListings
|
|
85
85
|
.map((l) => l.language)
|
|
86
86
|
.join(", ")}`);
|
|
87
87
|
const locales = {};
|