pabal-web-mcp 1.1.0 → 1.1.1

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.
@@ -199,7 +199,6 @@ var asoToPublicInputSchema = z.object({
199
199
  });
200
200
  var jsonSchema = toJsonSchema(asoToPublicInputSchema, {
201
201
  name: "AsoToPublicInput",
202
- target: "openApi3",
203
202
  $refStrategy: "none"
204
203
  });
205
204
  var inputSchema = jsonSchema.definitions?.AsoToPublicInput || jsonSchema;
@@ -304,9 +303,11 @@ async function handleAsoToPublic(input) {
304
303
  prompt
305
304
  });
306
305
  const sourcesText = sources.join(" + ");
307
- conversionPrompts.push(`
306
+ conversionPrompts.push(
307
+ `
308
308
  --- ${unifiedLocale} (${sourcesText}) ---
309
- ${prompt}`);
309
+ ${prompt}`
310
+ );
310
311
  }
311
312
  const pullDataDir = getPullDataDir();
312
313
  let responseText = `Converting ASO data from pullData to public/products/${slug}/ structure.
@@ -517,7 +518,6 @@ var publicToAsoInputSchema = z2.object({
517
518
  });
518
519
  var jsonSchema2 = toJsonSchema2(publicToAsoInputSchema, {
519
520
  name: "PublicToAsoInput",
520
- target: "openApi3",
521
521
  $refStrategy: "none"
522
522
  });
523
523
  var inputSchema2 = jsonSchema2.definitions?.PublicToAsoInput || jsonSchema2;
@@ -1610,7 +1610,6 @@ var improvePublicInputSchema = z3.object({
1610
1610
  });
1611
1611
  var jsonSchema3 = toJsonSchema3(improvePublicInputSchema, {
1612
1612
  name: "ImprovePublicInput",
1613
- target: "openApi3",
1614
1613
  $refStrategy: "none"
1615
1614
  });
1616
1615
  var inputSchema3 = jsonSchema3.definitions?.ImprovePublicInput || jsonSchema3;
@@ -1796,7 +1795,6 @@ var initProjectInputSchema = z4.object({
1796
1795
  });
1797
1796
  var jsonSchema4 = zodToJsonSchema4(initProjectInputSchema, {
1798
1797
  name: "InitProjectInput",
1799
- target: "openApi3",
1800
1798
  $refStrategy: "none"
1801
1799
  });
1802
1800
  var inputSchema4 = jsonSchema4.definitions?.InitProjectInput || jsonSchema4;
@@ -1981,7 +1979,13 @@ ${serialized}
1981
1979
  -->`;
1982
1980
  }
1983
1981
  function renderEnglishBody(args) {
1984
- const { meta, topic, appSlug, includeRelativeImageExample, relativeImagePath } = args;
1982
+ const {
1983
+ meta,
1984
+ topic,
1985
+ appSlug,
1986
+ includeRelativeImageExample,
1987
+ relativeImagePath
1988
+ } = args;
1985
1989
  const lines = [];
1986
1990
  lines.push(`<h1>${meta.title}</h1>`);
1987
1991
  lines.push(
@@ -2030,7 +2034,13 @@ function renderEnglishBody(args) {
2030
2034
  return lines.join("\n\n");
2031
2035
  }
2032
2036
  function renderKoreanBody(args) {
2033
- const { meta, topic, appSlug, includeRelativeImageExample, relativeImagePath } = args;
2037
+ const {
2038
+ meta,
2039
+ topic,
2040
+ appSlug,
2041
+ includeRelativeImageExample,
2042
+ relativeImagePath
2043
+ } = args;
2034
2044
  const lines = [];
2035
2045
  lines.push(`<h1>${meta.title}</h1>`);
2036
2046
  lines.push(
@@ -2125,28 +2135,33 @@ var createBlogHtmlInputSchema = z5.object({
2125
2135
  "English title used for slug (kebab-case). Falls back to topic when omitted."
2126
2136
  ),
2127
2137
  topic: z5.string().trim().min(1, "topic is required").describe("Topic/angle to write about in the blog body"),
2128
- locale: z5.string().trim().optional().default("en-US").describe("Primary locale (default en-US). Ignored when locales[] is set."),
2138
+ locale: z5.string().trim().optional().default("en-US").describe(
2139
+ "Primary locale (default en-US). Ignored when locales[] is set."
2140
+ ),
2129
2141
  locales: z5.array(z5.string().trim().min(1)).optional().describe(
2130
2142
  "Optional list of locales to generate. Each locale gets its own HTML file."
2131
2143
  ),
2132
2144
  description: z5.string().trim().optional().describe(
2133
2145
  "Meta description override. If omitted, the tool generates one from appSlug/topic per locale."
2134
2146
  ),
2135
- tags: z5.array(z5.string().trim().min(1)).optional().describe("Optional tags for BLOG_META. Defaults to tags derived from topic."),
2147
+ tags: z5.array(z5.string().trim().min(1)).optional().describe(
2148
+ "Optional tags for BLOG_META. Defaults to tags derived from topic."
2149
+ ),
2136
2150
  coverImage: z5.string().trim().optional().describe(
2137
2151
  "Cover image path. Relative paths rewrite to /blogs/<app>/<slug>/..., default is /products/<appSlug>/og-image.png."
2138
2152
  ),
2139
2153
  includeRelativeImageExample: z5.boolean().optional().default(false).describe(
2140
2154
  "Inject a relative image example (./images/hero.png) into the body to demonstrate path rewriting."
2141
2155
  ),
2142
- relativeImagePath: z5.string().trim().optional().describe("Override the relative image path (default ./images/hero.png)."),
2156
+ relativeImagePath: z5.string().trim().optional().describe(
2157
+ "Override the relative image path (default ./images/hero.png)."
2158
+ ),
2143
2159
  publishedAt: z5.string().trim().regex(DATE_REGEX2, "publishedAt must use YYYY-MM-DD").optional().describe("Publish date (YYYY-MM-DD). Defaults to today."),
2144
2160
  modifiedAt: z5.string().trim().regex(DATE_REGEX2, "modifiedAt must use YYYY-MM-DD").optional().describe("Last modified date (YYYY-MM-DD). Defaults to publishedAt."),
2145
2161
  overwrite: z5.boolean().optional().default(false).describe("Overwrite existing files when true (default: false).")
2146
2162
  }).describe("Generate static HTML blog posts with BLOG_META headers.");
2147
2163
  var jsonSchema5 = toJsonSchema4(createBlogHtmlInputSchema, {
2148
2164
  name: "CreateBlogHtmlInput",
2149
- target: "openApi3",
2150
2165
  $refStrategy: "none"
2151
2166
  });
2152
2167
  var inputSchema5 = jsonSchema5.definitions?.CreateBlogHtmlInput || jsonSchema5;
@@ -2207,7 +2222,9 @@ async function handleCreateBlogHtml(input) {
2207
2222
  publicDir
2208
2223
  })
2209
2224
  );
2210
- const existing = plannedFiles.filter(({ filePath }) => fs7.existsSync(filePath));
2225
+ const existing = plannedFiles.filter(
2226
+ ({ filePath }) => fs7.existsSync(filePath)
2227
+ );
2211
2228
  if (existing.length > 0 && !overwrite) {
2212
2229
  const existingList = existing.map((f) => f.filePath).join("\n- ");
2213
2230
  throw new Error(
package/dist/index.d.ts CHANGED
@@ -204,6 +204,61 @@ declare function isGooglePlayMultilingual(data: GooglePlayAsoData | GooglePlayMu
204
204
  */
205
205
  declare function isAppStoreMultilingual(data: AppStoreAsoData | AppStoreMultilingualAsoData | undefined): data is AppStoreMultilingualAsoData;
206
206
 
207
+ /**
208
+ * Blog type definitions
209
+ * Used by both MCP tools and web application
210
+ */
211
+ /**
212
+ * Blog Meta Block (raw from HTML comment)
213
+ * All fields are optional as they may be parsed from HTML or defaults
214
+ */
215
+ interface BlogMetaBlock {
216
+ title: string;
217
+ description: string;
218
+ appSlug: string;
219
+ slug: string;
220
+ locale?: string;
221
+ coverImage?: string;
222
+ publishedAt?: string;
223
+ modifiedAt?: string;
224
+ tags?: string[];
225
+ }
226
+ /**
227
+ * Blog Meta (resolved with UnifiedLocale)
228
+ * Used by web application after normalization
229
+ */
230
+ interface BlogMeta extends BlogMetaBlock {
231
+ locale: UnifiedLocale;
232
+ coverImage?: string;
233
+ publishedAt?: string;
234
+ modifiedAt?: string;
235
+ }
236
+ /**
237
+ * Blog Article (complete parsed article with HTML content)
238
+ */
239
+ interface BlogArticle {
240
+ appSlug: string;
241
+ slug: string;
242
+ locale: UnifiedLocale;
243
+ html: string;
244
+ meta: BlogMeta;
245
+ filePath: string;
246
+ }
247
+ /**
248
+ * Blog Summary (aggregated metadata across locales)
249
+ */
250
+ interface BlogSummary {
251
+ appSlug: string;
252
+ slug: string;
253
+ title: string;
254
+ description: string;
255
+ coverImage?: string;
256
+ publishedAt?: string;
257
+ modifiedAt?: string;
258
+ locales: UnifiedLocale[];
259
+ defaultLocale: UnifiedLocale;
260
+ }
261
+
207
262
  interface ImageAsset {
208
263
  src: string;
209
264
  alt: string;
@@ -366,10 +421,60 @@ interface ProductLocale {
366
421
  landing?: LandingPageLocale;
367
422
  }
368
423
 
424
+ /**
425
+ * Site data type definitions
426
+ * Structure for public/site/ directory
427
+ * - contacts.json: Contact information
428
+ * - locales/en-US.json: Localized content (meta, hero, developer)
429
+ */
430
+ interface SiteData {
431
+ meta: {
432
+ title: string;
433
+ description: string;
434
+ };
435
+ hero: {
436
+ brand: string;
437
+ tagline: string;
438
+ subtitle: string;
439
+ };
440
+ contacts: {
441
+ id: string;
442
+ label: string;
443
+ icon: string;
444
+ value: string;
445
+ }[];
446
+ developer: {
447
+ name: string;
448
+ heading: string;
449
+ role: string;
450
+ bio: string;
451
+ principles: string[];
452
+ stack: string[];
453
+ now: string;
454
+ availability: string;
455
+ likes: string[];
456
+ location?: string;
457
+ timezone?: string;
458
+ visited: {
459
+ countries: {
460
+ code: string;
461
+ name: string;
462
+ flagEmoji: string;
463
+ cities: string[];
464
+ }[];
465
+ };
466
+ };
467
+ }
468
+
369
469
  /**
370
470
  * Types for the create-blog-html MCP tool
371
471
  */
372
- interface BlogMeta {
472
+ /**
473
+ * BlogMetaOutput for MCP tool output
474
+ * All fields are required (resolved values)
475
+ * Note: This is separate from blog.types.ts BlogMeta which uses UnifiedLocale
476
+ */
477
+ interface BlogMetaOutput {
373
478
  title: string;
374
479
  description: string;
375
480
  appSlug: string;
@@ -443,7 +548,7 @@ interface CreateBlogHtmlResult {
443
548
  baseDir: string;
444
549
  files: GeneratedBlogFile[];
445
550
  coverImage: string;
446
- metaByLocale: Record<string, BlogMeta>;
551
+ metaByLocale: Record<string, BlogMetaOutput>;
447
552
  }
448
553
 
449
554
  /**
@@ -701,4 +806,4 @@ declare function getPublicDir(): string;
701
806
  */
702
807
  declare function getProductsDir(): string;
703
808
 
704
- export { APP_STORE_TO_UNIFIED, type AppMetaLinks, type AppPageData, type AppStoreAsoData, type AppStoreInfoLocalization, type AppStoreLocale, type AppStoreMultilingualAsoData, type AppStoreReleaseNote, type AppStoreScreenshotDisplayType, type AppStoreScreenshots, type AppStoreVersionLocalization, type AsoData, type AsoLocaleContent, type AsoTemplate, type BlogMeta, type CreateBlogHtmlInput, type CreateBlogHtmlResult, DEFAULT_LOCALE, type DeepPartial, type FeatureItem, GOOGLE_PLAY_TO_UNIFIED, type GeneratedBlogFile, type GooglePlayAsoData, type GooglePlayImageType, type GooglePlayListing, type GooglePlayLocale, type GooglePlayMultilingualAsoData, type GooglePlayReleaseNote, type GooglePlayScreenshotType, type GooglePlayScreenshots, type ImageAsset, type LandingCta, type LandingFeatures, type LandingHero, type LandingPage, type LandingPageLocale, type LandingReviews, type LandingScreenshots, type LayoutColors, type ProductConfig, type ProductContent, type ProductLocale, type ProductMetadata, type ProductScreenshots, type SupportedLocale, type Testimonial, UNIFIED_LOCALES, UNIFIED_TO_APP_STORE, UNIFIED_TO_GOOGLE_PLAY, type UnifiedLocale, appStoreToGooglePlay, appStoreToUnified, appStoreToUnifiedBatch, convertObjectFromAppStore, convertObjectFromGooglePlay, convertObjectToAppStore, convertObjectToGooglePlay, getAsoDataDir, getProductsDir, getPublicDir, getPullDataDir, getPushDataDir, googlePlayToAppStore, googlePlayToUnified, googlePlayToUnifiedBatch, isAppStoreLocale, isAppStoreMultilingual, isGooglePlayLocale, isGooglePlayMultilingual, isSupportedLocale, loadAsoFromConfig, saveAsoToAsoDir, saveAsoToConfig, unifiedToAppStore, unifiedToAppStoreBatch, unifiedToBothPlatforms, unifiedToGooglePlay, unifiedToGooglePlayBatch };
809
+ export { APP_STORE_TO_UNIFIED, type AppMetaLinks, type AppPageData, type AppStoreAsoData, type AppStoreInfoLocalization, type AppStoreLocale, type AppStoreMultilingualAsoData, type AppStoreReleaseNote, type AppStoreScreenshotDisplayType, type AppStoreScreenshots, type AppStoreVersionLocalization, type AsoData, type AsoLocaleContent, type AsoTemplate, type BlogArticle, type BlogMeta, type BlogMetaBlock, type BlogMetaOutput, type BlogSummary, type CreateBlogHtmlInput, type CreateBlogHtmlResult, DEFAULT_LOCALE, type DeepPartial, type FeatureItem, GOOGLE_PLAY_TO_UNIFIED, type GeneratedBlogFile, type GooglePlayAsoData, type GooglePlayImageType, type GooglePlayListing, type GooglePlayLocale, type GooglePlayMultilingualAsoData, type GooglePlayReleaseNote, type GooglePlayScreenshotType, type GooglePlayScreenshots, type ImageAsset, type LandingCta, type LandingFeatures, type LandingHero, type LandingPage, type LandingPageLocale, type LandingReviews, type LandingScreenshots, type LayoutColors, type ProductConfig, type ProductContent, type ProductLocale, type ProductMetadata, type ProductScreenshots, type SiteData, type SupportedLocale, type Testimonial, UNIFIED_LOCALES, UNIFIED_TO_APP_STORE, UNIFIED_TO_GOOGLE_PLAY, type UnifiedLocale, appStoreToGooglePlay, appStoreToUnified, appStoreToUnifiedBatch, convertObjectFromAppStore, convertObjectFromGooglePlay, convertObjectToAppStore, convertObjectToGooglePlay, getAsoDataDir, getProductsDir, getPublicDir, getPullDataDir, getPushDataDir, googlePlayToAppStore, googlePlayToUnified, googlePlayToUnifiedBatch, isAppStoreLocale, isAppStoreMultilingual, isGooglePlayLocale, isGooglePlayMultilingual, isSupportedLocale, loadAsoFromConfig, saveAsoToAsoDir, saveAsoToConfig, unifiedToAppStore, unifiedToAppStoreBatch, unifiedToBothPlatforms, unifiedToGooglePlay, unifiedToGooglePlayBatch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pabal-web-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "MCP server for ASO data management with shared types and utilities",
6
6
  "author": "skyu",