pabal-store-api-mcp 1.3.6 → 1.3.8
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/src/index.js
CHANGED
|
@@ -12,6 +12,17 @@ import { handleAsoCreateVersion } from "./tools/release/create.js";
|
|
|
12
12
|
import { handleAsoPullReleaseNotes } from "./tools/release/pull-notes.js";
|
|
13
13
|
import { handleUpdateNotes } from "./tools/release/update-notes.js";
|
|
14
14
|
import { handleCheckLatestVersions } from "./tools/release/check-versions.js";
|
|
15
|
+
// Redirect console.log and console.info to stderr
|
|
16
|
+
// This prevents third-party libraries (like appstore-connect-sdk) from corrupting
|
|
17
|
+
// the stdout JSON-RPC stream required by strict MCP clients (like Antigravity).
|
|
18
|
+
const originalLog = console.log;
|
|
19
|
+
const originalInfo = console.info;
|
|
20
|
+
console.log = function (...args) {
|
|
21
|
+
console.error(...args);
|
|
22
|
+
};
|
|
23
|
+
console.info = function (...args) {
|
|
24
|
+
console.error(...args);
|
|
25
|
+
};
|
|
15
26
|
// MCP config sets cwd to project root, so we don't need to chdir
|
|
16
27
|
// Just verify we're in the right place
|
|
17
28
|
console.error(`[MCP] 📂 Working directory: ${process.cwd()}`);
|
|
@@ -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 = {};
|