pabal-web-mcp 0.1.0
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/README.md +133 -0
- package/dist/bin/mcp-server.d.ts +1 -0
- package/dist/bin/mcp-server.js +1906 -0
- package/dist/chunk-YJWGBO7W.js +952 -0
- package/dist/index.d.ts +592 -0
- package/dist/index.js +62 -0
- package/package.json +52 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified locale system for ASO (App Store Optimization)
|
|
3
|
+
* Consolidates App Store Connect and Google Play Console locale codes
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Unified locale codes used across the application
|
|
7
|
+
* These codes are used in /locales directory structure
|
|
8
|
+
*/
|
|
9
|
+
declare const UNIFIED_LOCALES: readonly ["af", "am", "ar", "az-AZ", "be", "bg-BG", "bn-BD", "ca-ES", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IN", "en-SG", "en-US", "en-ZA", "es-419", "es-ES", "es-US", "et-EE", "eu-ES", "fa", "fa-AE", "fa-AF", "fa-IR", "fi-FI", "fil", "fr-CA", "fr-FR", "gl-ES", "gu", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS", "it-IT", "ja-JP", "ka-GE", "kk", "km-KH", "kn-IN", "ko-KR", "ky-KG", "lo-LA", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms", "ms-MY", "my-MM", "ne-NP", "nl-NL", "no-NO", "pa", "pl-PL", "pt-BR", "pt-PT", "rm", "ro-RO", "ru-RU", "si-LK", "sk-SK", "sl-SI", "sq", "sr-RS", "sv-SE", "sw", "ta-IN", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur", "vi-VN", "zh-HK", "zh-Hans", "zh-Hant", "zu"];
|
|
10
|
+
type UnifiedLocale = (typeof UNIFIED_LOCALES)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Default locale (for fallback)
|
|
13
|
+
*/
|
|
14
|
+
declare const DEFAULT_LOCALE: UnifiedLocale;
|
|
15
|
+
/**
|
|
16
|
+
* Unified locale to App Store Connect locale mapping
|
|
17
|
+
* Maps our unified locale codes to App Store Connect API codes
|
|
18
|
+
*/
|
|
19
|
+
declare const UNIFIED_TO_APP_STORE: Record<UnifiedLocale, string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Unified locale to Google Play Console locale mapping
|
|
22
|
+
* Maps our unified locale codes to Google Play Console API codes
|
|
23
|
+
*/
|
|
24
|
+
declare const UNIFIED_TO_GOOGLE_PLAY: Record<UnifiedLocale, string | null>;
|
|
25
|
+
/**
|
|
26
|
+
* App Store Connect locale to unified locale mapping
|
|
27
|
+
* Reverse mapping for converting App Store codes to our unified system
|
|
28
|
+
*/
|
|
29
|
+
declare const APP_STORE_TO_UNIFIED: Record<string, UnifiedLocale>;
|
|
30
|
+
/**
|
|
31
|
+
* Google Play Console locale to unified locale mapping
|
|
32
|
+
* Reverse mapping for converting Google Play codes to our unified system
|
|
33
|
+
*/
|
|
34
|
+
declare const GOOGLE_PLAY_TO_UNIFIED: Record<string, UnifiedLocale>;
|
|
35
|
+
/**
|
|
36
|
+
* Locales supported by App Store Connect
|
|
37
|
+
*/
|
|
38
|
+
declare const APP_STORE_SUPPORTED_LOCALES: ("af" | "am" | "ar" | "az-AZ" | "be" | "bg-BG" | "bn-BD" | "ca-ES" | "cs-CZ" | "da-DK" | "de-DE" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-SG" | "en-US" | "en-ZA" | "es-419" | "es-ES" | "es-US" | "et-EE" | "eu-ES" | "fa" | "fa-AE" | "fa-AF" | "fa-IR" | "fi-FI" | "fil" | "fr-CA" | "fr-FR" | "gl-ES" | "gu" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "hy-AM" | "id-ID" | "is-IS" | "it-IT" | "ja-JP" | "ka-GE" | "kk" | "km-KH" | "kn-IN" | "ko-KR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms" | "ms-MY" | "my-MM" | "ne-NP" | "nl-NL" | "no-NO" | "pa" | "pl-PL" | "pt-BR" | "pt-PT" | "rm" | "ro-RO" | "ru-RU" | "si-LK" | "sk-SK" | "sl-SI" | "sq" | "sr-RS" | "sv-SE" | "sw" | "ta-IN" | "te-IN" | "th-TH" | "tr-TR" | "uk-UA" | "ur" | "vi-VN" | "zh-HK" | "zh-Hans" | "zh-Hant" | "zu")[];
|
|
39
|
+
/**
|
|
40
|
+
* Locales supported by Google Play Console
|
|
41
|
+
*/
|
|
42
|
+
declare const GOOGLE_PLAY_SUPPORTED_LOCALES: ("af" | "am" | "ar" | "az-AZ" | "be" | "bg-BG" | "bn-BD" | "ca-ES" | "cs-CZ" | "da-DK" | "de-DE" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-SG" | "en-US" | "en-ZA" | "es-419" | "es-ES" | "es-US" | "et-EE" | "eu-ES" | "fa" | "fa-AE" | "fa-AF" | "fa-IR" | "fi-FI" | "fil" | "fr-CA" | "fr-FR" | "gl-ES" | "gu" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "hy-AM" | "id-ID" | "is-IS" | "it-IT" | "ja-JP" | "ka-GE" | "kk" | "km-KH" | "kn-IN" | "ko-KR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms" | "ms-MY" | "my-MM" | "ne-NP" | "nl-NL" | "no-NO" | "pa" | "pl-PL" | "pt-BR" | "pt-PT" | "rm" | "ro-RO" | "ru-RU" | "si-LK" | "sk-SK" | "sl-SI" | "sq" | "sr-RS" | "sv-SE" | "sw" | "ta-IN" | "te-IN" | "th-TH" | "tr-TR" | "uk-UA" | "ur" | "vi-VN" | "zh-HK" | "zh-Hans" | "zh-Hant" | "zu")[];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ASO (App Store Optimization) data type definitions
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Unified locale type used across the application
|
|
50
|
+
* This type represents the unified locale codes used in /locales directory
|
|
51
|
+
*/
|
|
52
|
+
type SupportedLocale = UnifiedLocale;
|
|
53
|
+
/**
|
|
54
|
+
* App Store Connect specific locale type
|
|
55
|
+
*/
|
|
56
|
+
type AppStoreLocale = (typeof APP_STORE_SUPPORTED_LOCALES)[number];
|
|
57
|
+
/**
|
|
58
|
+
* Google Play Console specific locale type
|
|
59
|
+
*/
|
|
60
|
+
type GooglePlayLocale = (typeof GOOGLE_PLAY_SUPPORTED_LOCALES)[number];
|
|
61
|
+
/**
|
|
62
|
+
* Check if locale is supported by our unified system
|
|
63
|
+
*/
|
|
64
|
+
declare function isSupportedLocale(locale: string): locale is SupportedLocale;
|
|
65
|
+
/**
|
|
66
|
+
* Check if locale is supported by App Store
|
|
67
|
+
*/
|
|
68
|
+
declare function isAppStoreLocale(locale: string): locale is AppStoreLocale;
|
|
69
|
+
/**
|
|
70
|
+
* Check if locale is supported by Google Play
|
|
71
|
+
*/
|
|
72
|
+
declare function isGooglePlayLocale(locale: string): locale is GooglePlayLocale;
|
|
73
|
+
/**
|
|
74
|
+
* Google Play Store ASO data
|
|
75
|
+
*/
|
|
76
|
+
interface GooglePlayAsoData {
|
|
77
|
+
title: string;
|
|
78
|
+
shortDescription: string;
|
|
79
|
+
fullDescription: string;
|
|
80
|
+
screenshots: {
|
|
81
|
+
phone: string[];
|
|
82
|
+
tablet?: string[];
|
|
83
|
+
tablet7?: string[];
|
|
84
|
+
tablet10?: string[];
|
|
85
|
+
tv?: string[];
|
|
86
|
+
wear?: string[];
|
|
87
|
+
};
|
|
88
|
+
featureGraphic?: string;
|
|
89
|
+
promoGraphic?: string;
|
|
90
|
+
category?: string;
|
|
91
|
+
contentRating?: string;
|
|
92
|
+
keywords?: string[];
|
|
93
|
+
contactEmail?: string;
|
|
94
|
+
contactPhone?: string;
|
|
95
|
+
contactWebsite?: string;
|
|
96
|
+
packageName: string;
|
|
97
|
+
defaultLanguage: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Google Play release notes (per version)
|
|
101
|
+
*/
|
|
102
|
+
interface GooglePlayReleaseNote {
|
|
103
|
+
versionCode: number;
|
|
104
|
+
versionName: string;
|
|
105
|
+
releaseNotes: {
|
|
106
|
+
[language: string]: string;
|
|
107
|
+
};
|
|
108
|
+
track: string;
|
|
109
|
+
status: string;
|
|
110
|
+
releaseDate?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* App Store release notes (per version)
|
|
114
|
+
*/
|
|
115
|
+
interface AppStoreReleaseNote {
|
|
116
|
+
versionString: string;
|
|
117
|
+
releaseNotes: {
|
|
118
|
+
[locale: string]: string;
|
|
119
|
+
};
|
|
120
|
+
platform: string;
|
|
121
|
+
releaseDate?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* App Store ASO data
|
|
125
|
+
*/
|
|
126
|
+
interface AppStoreAsoData {
|
|
127
|
+
name: string;
|
|
128
|
+
subtitle?: string;
|
|
129
|
+
description: string;
|
|
130
|
+
keywords?: string;
|
|
131
|
+
promotionalText?: string;
|
|
132
|
+
screenshots: {
|
|
133
|
+
iphone65?: string[];
|
|
134
|
+
iphone61?: string[];
|
|
135
|
+
iphone58?: string[];
|
|
136
|
+
iphone55?: string[];
|
|
137
|
+
iphone47?: string[];
|
|
138
|
+
iphone40?: string[];
|
|
139
|
+
ipadPro129?: string[];
|
|
140
|
+
ipadPro11?: string[];
|
|
141
|
+
ipad105?: string[];
|
|
142
|
+
ipad97?: string[];
|
|
143
|
+
appleWatch?: string[];
|
|
144
|
+
};
|
|
145
|
+
appPreview?: string[];
|
|
146
|
+
primaryCategory?: string;
|
|
147
|
+
secondaryCategory?: string;
|
|
148
|
+
contentRightId?: string;
|
|
149
|
+
supportUrl?: string;
|
|
150
|
+
marketingUrl?: string;
|
|
151
|
+
privacyPolicyUrl?: string;
|
|
152
|
+
bundleId: string;
|
|
153
|
+
locale: string;
|
|
154
|
+
whatsNew?: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Multilingual Google Play ASO data
|
|
158
|
+
*/
|
|
159
|
+
interface GooglePlayMultilingualAsoData {
|
|
160
|
+
locales: {
|
|
161
|
+
[locale: string]: GooglePlayAsoData;
|
|
162
|
+
};
|
|
163
|
+
defaultLocale?: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Multilingual App Store ASO data
|
|
167
|
+
*/
|
|
168
|
+
interface AppStoreMultilingualAsoData {
|
|
169
|
+
locales: {
|
|
170
|
+
[locale: string]: AppStoreAsoData;
|
|
171
|
+
};
|
|
172
|
+
defaultLocale?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Unified ASO data (format stored in local config.json)
|
|
176
|
+
* Supports single language (legacy compatible) or multilingual structure
|
|
177
|
+
*/
|
|
178
|
+
interface AsoData {
|
|
179
|
+
googlePlay?: GooglePlayAsoData | GooglePlayMultilingualAsoData;
|
|
180
|
+
appStore?: AppStoreAsoData | AppStoreMultilingualAsoData;
|
|
181
|
+
lastSynced?: {
|
|
182
|
+
googlePlay?: string;
|
|
183
|
+
appStore?: string;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Check if Google Play data is multilingual structure
|
|
188
|
+
*/
|
|
189
|
+
declare function isGooglePlayMultilingual(data: GooglePlayAsoData | GooglePlayMultilingualAsoData | undefined): data is GooglePlayMultilingualAsoData;
|
|
190
|
+
/**
|
|
191
|
+
* Check if App Store data is multilingual structure
|
|
192
|
+
*/
|
|
193
|
+
declare function isAppStoreMultilingual(data: AppStoreAsoData | AppStoreMultilingualAsoData | undefined): data is AppStoreMultilingualAsoData;
|
|
194
|
+
|
|
195
|
+
interface ImageAsset {
|
|
196
|
+
src: string;
|
|
197
|
+
alt: string;
|
|
198
|
+
width?: number;
|
|
199
|
+
height?: number;
|
|
200
|
+
srcDark?: string;
|
|
201
|
+
}
|
|
202
|
+
interface LandingHero {
|
|
203
|
+
brand?: string;
|
|
204
|
+
logoPath?: string;
|
|
205
|
+
title?: string;
|
|
206
|
+
titleHighlight?: string;
|
|
207
|
+
description: string;
|
|
208
|
+
}
|
|
209
|
+
interface LandingScreenshots {
|
|
210
|
+
title?: string;
|
|
211
|
+
images: Array<{
|
|
212
|
+
imageSrc: string;
|
|
213
|
+
width?: number;
|
|
214
|
+
height?: number;
|
|
215
|
+
title: string;
|
|
216
|
+
description: string;
|
|
217
|
+
}>;
|
|
218
|
+
}
|
|
219
|
+
interface FeatureItem {
|
|
220
|
+
title: string;
|
|
221
|
+
body: string;
|
|
222
|
+
iconPath?: string;
|
|
223
|
+
iconName?: string;
|
|
224
|
+
media?: ImageAsset;
|
|
225
|
+
badge?: string;
|
|
226
|
+
}
|
|
227
|
+
interface LandingFeatures {
|
|
228
|
+
title: string;
|
|
229
|
+
items: FeatureItem[];
|
|
230
|
+
}
|
|
231
|
+
interface Testimonial {
|
|
232
|
+
authorName: string;
|
|
233
|
+
handle?: string;
|
|
234
|
+
avatarPath?: string;
|
|
235
|
+
quote: string;
|
|
236
|
+
rating?: number;
|
|
237
|
+
}
|
|
238
|
+
interface LandingReviews {
|
|
239
|
+
title?: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
testimonials: Testimonial[];
|
|
242
|
+
icons?: string[];
|
|
243
|
+
rating?: number;
|
|
244
|
+
}
|
|
245
|
+
interface LandingCta {
|
|
246
|
+
headline: string;
|
|
247
|
+
icons?: string[];
|
|
248
|
+
rating?: number;
|
|
249
|
+
description?: string;
|
|
250
|
+
}
|
|
251
|
+
interface LandingPage {
|
|
252
|
+
hero: LandingHero;
|
|
253
|
+
screenshots: LandingScreenshots;
|
|
254
|
+
features: LandingFeatures;
|
|
255
|
+
reviews: LandingReviews;
|
|
256
|
+
cta: LandingCta;
|
|
257
|
+
}
|
|
258
|
+
type DeepPartial<T> = T extends (infer U)[] ? Array<DeepPartial<U>> : T extends object ? {
|
|
259
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
260
|
+
} : T;
|
|
261
|
+
type LandingPageLocale = DeepPartial<LandingPage>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Product Config JSON file type definitions
|
|
265
|
+
* Structure for public/products/{slug}/config.json
|
|
266
|
+
*/
|
|
267
|
+
/**
|
|
268
|
+
* Screenshot metadata
|
|
269
|
+
*/
|
|
270
|
+
interface ProductScreenshots {
|
|
271
|
+
phone?: string[];
|
|
272
|
+
tablet?: string[];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Product Metadata (store-common metadata)
|
|
276
|
+
*/
|
|
277
|
+
interface ProductMetadata {
|
|
278
|
+
category?: string;
|
|
279
|
+
contactEmail?: string;
|
|
280
|
+
instagram?: string;
|
|
281
|
+
supportUrl?: string;
|
|
282
|
+
marketingUrl?: string;
|
|
283
|
+
termsUrl?: string;
|
|
284
|
+
privacyUrl?: string;
|
|
285
|
+
screenshots?: ProductScreenshots;
|
|
286
|
+
featureGraphic?: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Product Content settings
|
|
290
|
+
*/
|
|
291
|
+
interface ProductContent {
|
|
292
|
+
defaultLocale?: string;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Product Config (complete config.json structure)
|
|
296
|
+
*
|
|
297
|
+
* Based on actual config.json file structure,
|
|
298
|
+
* includes additional fields used by existing code.
|
|
299
|
+
*/
|
|
300
|
+
interface ProductConfig {
|
|
301
|
+
slug: string;
|
|
302
|
+
order?: number;
|
|
303
|
+
appStoreAppId?: string;
|
|
304
|
+
packageName?: string;
|
|
305
|
+
bundleId?: string;
|
|
306
|
+
layoutColors?: LayoutColors;
|
|
307
|
+
metadata?: ProductMetadata;
|
|
308
|
+
content?: ProductContent;
|
|
309
|
+
name?: string;
|
|
310
|
+
tagline?: string;
|
|
311
|
+
webUrl?: string;
|
|
312
|
+
hasDetailPage?: boolean;
|
|
313
|
+
isDarkIcon?: boolean;
|
|
314
|
+
landing?: LandingPage;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
interface LayoutColors {
|
|
318
|
+
bg?: string;
|
|
319
|
+
fg?: string;
|
|
320
|
+
fgMuted?: string;
|
|
321
|
+
muted?: string;
|
|
322
|
+
accentGrad?: string;
|
|
323
|
+
}
|
|
324
|
+
interface AppMetaLinks {
|
|
325
|
+
privacyPath: string;
|
|
326
|
+
termsPath: string;
|
|
327
|
+
backPath: string;
|
|
328
|
+
}
|
|
329
|
+
interface AppPageData {
|
|
330
|
+
product?: ProductConfig;
|
|
331
|
+
links: AppMetaLinks;
|
|
332
|
+
privacy: string;
|
|
333
|
+
terms: string;
|
|
334
|
+
layoutColors?: LayoutColors;
|
|
335
|
+
landing?: LandingPage;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface AsoTemplate {
|
|
339
|
+
intro: string;
|
|
340
|
+
keyFeaturesHeading?: string;
|
|
341
|
+
featuresHeading?: string;
|
|
342
|
+
outro: string;
|
|
343
|
+
includeSupportLinks?: boolean;
|
|
344
|
+
}
|
|
345
|
+
interface AsoLocaleContent {
|
|
346
|
+
title?: string;
|
|
347
|
+
subtitle?: string;
|
|
348
|
+
shortDescription?: string;
|
|
349
|
+
keywords?: string[] | string;
|
|
350
|
+
template?: AsoTemplate;
|
|
351
|
+
}
|
|
352
|
+
interface ProductLocale {
|
|
353
|
+
aso?: AsoLocaleContent;
|
|
354
|
+
landing?: LandingPageLocale;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Locale conversion utilities for ASO platforms
|
|
359
|
+
* Handles conversion between unified locales and platform-specific locale codes
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Convert unified locale to App Store Connect locale
|
|
364
|
+
* Returns null if the locale is not supported by App Store
|
|
365
|
+
*
|
|
366
|
+
* @param locale - Unified locale code (e.g., "ar", "zh-Hans")
|
|
367
|
+
* @returns App Store locale code (e.g., "ar-SA", "zh-Hans") or null
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* unifiedToAppStore("ar") // Returns "ar-SA"
|
|
371
|
+
* unifiedToAppStore("zh-Hans") // Returns "zh-Hans"
|
|
372
|
+
* unifiedToAppStore("en-IN") // Returns null (not supported)
|
|
373
|
+
*/
|
|
374
|
+
declare function unifiedToAppStore(locale: UnifiedLocale): string | null;
|
|
375
|
+
/**
|
|
376
|
+
* Convert unified locale to Google Play Console locale
|
|
377
|
+
* Returns null if the locale is not supported by Google Play
|
|
378
|
+
*
|
|
379
|
+
* @param locale - Unified locale code (e.g., "ar", "zh-Hans")
|
|
380
|
+
* @returns Google Play locale code (e.g., "ar-SA", "zh-CN") or null
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* unifiedToGooglePlay("ar") // Returns "ar-SA"
|
|
384
|
+
* unifiedToGooglePlay("zh-Hans") // Returns "zh-CN"
|
|
385
|
+
* unifiedToGooglePlay("bg-BG") // Returns "bg-BG"
|
|
386
|
+
*/
|
|
387
|
+
declare function unifiedToGooglePlay(locale: UnifiedLocale): string | null;
|
|
388
|
+
/**
|
|
389
|
+
* Convert unified locale to both platforms
|
|
390
|
+
* Returns an object with App Store and Google Play locale codes
|
|
391
|
+
*
|
|
392
|
+
* @param locale - Unified locale code
|
|
393
|
+
* @returns Object with appStore and googlePlay locale codes (or null if not supported)
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* unifiedToBothPlatforms("ar")
|
|
397
|
+
* // Returns { appStore: "ar-SA", googlePlay: "ar-SA" }
|
|
398
|
+
*
|
|
399
|
+
* unifiedToBothPlatforms("zh-Hans")
|
|
400
|
+
* // Returns { appStore: "zh-Hans", googlePlay: "zh-CN" }
|
|
401
|
+
*/
|
|
402
|
+
declare function unifiedToBothPlatforms(locale: UnifiedLocale): {
|
|
403
|
+
appStore: string | null;
|
|
404
|
+
googlePlay: string | null;
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Convert App Store Connect locale to unified locale
|
|
408
|
+
* Returns the default locale if the App Store locale is not recognized
|
|
409
|
+
*
|
|
410
|
+
* @param locale - App Store locale code (e.g., "ar-SA", "zh-Hans")
|
|
411
|
+
* @returns Unified locale code (e.g., "ar", "zh-Hans")
|
|
412
|
+
*
|
|
413
|
+
* @example
|
|
414
|
+
* appStoreToUnified("ar-SA") // Returns "ar"
|
|
415
|
+
* appStoreToUnified("zh-Hans") // Returns "zh-Hans"
|
|
416
|
+
* appStoreToUnified("es-MX") // Returns "es-419"
|
|
417
|
+
*/
|
|
418
|
+
declare function appStoreToUnified(locale: string): UnifiedLocale;
|
|
419
|
+
/**
|
|
420
|
+
* Convert Google Play Console locale to unified locale
|
|
421
|
+
* Returns the default locale if the Google Play locale is not recognized
|
|
422
|
+
*
|
|
423
|
+
* @param locale - Google Play locale code (e.g., "ar-SA", "zh-CN")
|
|
424
|
+
* @returns Unified locale code (e.g., "ar", "zh-Hans")
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* googlePlayToUnified("ar-SA") // Returns "ar"
|
|
428
|
+
* googlePlayToUnified("zh-CN") // Returns "zh-Hans"
|
|
429
|
+
* googlePlayToUnified("zh-TW") // Returns "zh-Hant"
|
|
430
|
+
*/
|
|
431
|
+
declare function googlePlayToUnified(locale: string): UnifiedLocale;
|
|
432
|
+
/**
|
|
433
|
+
* Convert multiple unified locales to App Store locales
|
|
434
|
+
* Filters out locales not supported by App Store
|
|
435
|
+
*
|
|
436
|
+
* @param locales - Array of unified locale codes
|
|
437
|
+
* @returns Array of App Store locale codes (excluding unsupported locales)
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* unifiedToAppStoreBatch(["ar", "zh-Hans", "en-IN"])
|
|
441
|
+
* // Returns ["ar-SA", "zh-Hans"] (en-IN is not supported by App Store)
|
|
442
|
+
*/
|
|
443
|
+
declare function unifiedToAppStoreBatch(locales: UnifiedLocale[]): string[];
|
|
444
|
+
/**
|
|
445
|
+
* Convert multiple unified locales to Google Play locales
|
|
446
|
+
* Filters out locales not supported by Google Play
|
|
447
|
+
*
|
|
448
|
+
* @param locales - Array of unified locale codes
|
|
449
|
+
* @returns Array of Google Play locale codes (excluding unsupported locales)
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* unifiedToGooglePlayBatch(["ar", "zh-Hans", "bg-BG"])
|
|
453
|
+
* // Returns ["ar-SA", "zh-CN", "bg-BG"]
|
|
454
|
+
*/
|
|
455
|
+
declare function unifiedToGooglePlayBatch(locales: UnifiedLocale[]): string[];
|
|
456
|
+
/**
|
|
457
|
+
* Convert multiple App Store locales to unified locales
|
|
458
|
+
*
|
|
459
|
+
* @param locales - Array of App Store locale codes
|
|
460
|
+
* @returns Array of unified locale codes
|
|
461
|
+
*
|
|
462
|
+
* @example
|
|
463
|
+
* appStoreToUnifiedBatch(["ar-SA", "zh-Hans", "es-MX"])
|
|
464
|
+
* // Returns ["ar", "zh-Hans", "es-419"]
|
|
465
|
+
*/
|
|
466
|
+
declare function appStoreToUnifiedBatch(locales: string[]): UnifiedLocale[];
|
|
467
|
+
/**
|
|
468
|
+
* Convert multiple Google Play locales to unified locales
|
|
469
|
+
*
|
|
470
|
+
* @param locales - Array of Google Play locale codes
|
|
471
|
+
* @returns Array of unified locale codes
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* googlePlayToUnifiedBatch(["ar-SA", "zh-CN", "zh-TW"])
|
|
475
|
+
* // Returns ["ar", "zh-Hans", "zh-Hant"]
|
|
476
|
+
*/
|
|
477
|
+
declare function googlePlayToUnifiedBatch(locales: string[]): UnifiedLocale[];
|
|
478
|
+
/**
|
|
479
|
+
* Convert App Store locale to Google Play locale
|
|
480
|
+
* Goes through unified locale as intermediate step
|
|
481
|
+
*
|
|
482
|
+
* @param locale - App Store locale code
|
|
483
|
+
* @returns Google Play locale code or null if conversion not possible
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* appStoreToGooglePlay("ar-SA") // Returns "ar-SA"
|
|
487
|
+
* appStoreToGooglePlay("zh-Hans") // Returns "zh-CN"
|
|
488
|
+
* appStoreToGooglePlay("es-MX") // Returns "es-419"
|
|
489
|
+
*/
|
|
490
|
+
declare function appStoreToGooglePlay(locale: string): string | null;
|
|
491
|
+
/**
|
|
492
|
+
* Convert Google Play locale to App Store locale
|
|
493
|
+
* Goes through unified locale as intermediate step
|
|
494
|
+
*
|
|
495
|
+
* @param locale - Google Play locale code
|
|
496
|
+
* @returns App Store locale code or null if conversion not possible
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* googlePlayToAppStore("ar-SA") // Returns "ar-SA"
|
|
500
|
+
* googlePlayToAppStore("zh-CN") // Returns "zh-Hans"
|
|
501
|
+
* googlePlayToAppStore("zh-TW") // Returns "zh-Hant"
|
|
502
|
+
* googlePlayToAppStore("en-IN") // Returns null (not supported by App Store)
|
|
503
|
+
*/
|
|
504
|
+
declare function googlePlayToAppStore(locale: string): string | null;
|
|
505
|
+
/**
|
|
506
|
+
* Convert an object with unified locale keys to App Store locale keys
|
|
507
|
+
* Useful for converting locale-based data structures
|
|
508
|
+
*
|
|
509
|
+
* @param data - Object with unified locale keys
|
|
510
|
+
* @returns Object with App Store locale keys (excluding unsupported locales)
|
|
511
|
+
*
|
|
512
|
+
* @example
|
|
513
|
+
* convertObjectToAppStore({
|
|
514
|
+
* "ar": "مرحبا",
|
|
515
|
+
* "zh-Hans": "你好",
|
|
516
|
+
* "en-IN": "Hello"
|
|
517
|
+
* })
|
|
518
|
+
* // Returns { "ar-SA": "مرحبا", "zh-Hans": "你好" }
|
|
519
|
+
*/
|
|
520
|
+
declare function convertObjectToAppStore<T>(data: Record<UnifiedLocale, T>): Record<string, T>;
|
|
521
|
+
/**
|
|
522
|
+
* Convert an object with unified locale keys to Google Play locale keys
|
|
523
|
+
* Useful for converting locale-based data structures
|
|
524
|
+
*
|
|
525
|
+
* @param data - Object with unified locale keys
|
|
526
|
+
* @returns Object with Google Play locale keys (excluding unsupported locales)
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* convertObjectToGooglePlay({
|
|
530
|
+
* "ar": "مرحبا",
|
|
531
|
+
* "zh-Hans": "你好",
|
|
532
|
+
* "zh-Hant": "你好"
|
|
533
|
+
* })
|
|
534
|
+
* // Returns { "ar-SA": "مرحبا", "zh-CN": "你好", "zh-TW": "你好" }
|
|
535
|
+
*/
|
|
536
|
+
declare function convertObjectToGooglePlay<T>(data: Record<UnifiedLocale, T>): Record<string, T>;
|
|
537
|
+
/**
|
|
538
|
+
* Convert an object with App Store locale keys to unified locale keys
|
|
539
|
+
* Useful for converting locale-based data structures from App Store
|
|
540
|
+
*
|
|
541
|
+
* @param data - Object with App Store locale keys
|
|
542
|
+
* @returns Object with unified locale keys
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* convertObjectFromAppStore({
|
|
546
|
+
* "ar-SA": "مرحبا",
|
|
547
|
+
* "zh-Hans": "你好",
|
|
548
|
+
* "es-MX": "Hola"
|
|
549
|
+
* })
|
|
550
|
+
* // Returns { "ar": "مرحبا", "zh-Hans": "你好", "es-419": "Hola" }
|
|
551
|
+
*/
|
|
552
|
+
declare function convertObjectFromAppStore<T>(data: Record<string, T>): Record<UnifiedLocale, T>;
|
|
553
|
+
/**
|
|
554
|
+
* Convert an object with Google Play locale keys to unified locale keys
|
|
555
|
+
* Useful for converting locale-based data structures from Google Play
|
|
556
|
+
*
|
|
557
|
+
* @param data - Object with Google Play locale keys
|
|
558
|
+
* @returns Object with unified locale keys
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
* convertObjectFromGooglePlay({
|
|
562
|
+
* "ar-SA": "مرحبا",
|
|
563
|
+
* "zh-CN": "你好",
|
|
564
|
+
* "zh-TW": "你好"
|
|
565
|
+
* })
|
|
566
|
+
* // Returns { "ar": "مرحبا", "zh-Hans": "你好", "zh-Hant": "你好" }
|
|
567
|
+
*/
|
|
568
|
+
declare function convertObjectFromGooglePlay<T>(data: Record<string, T>): Record<UnifiedLocale, T>;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* ASO Data Converter
|
|
572
|
+
*
|
|
573
|
+
* config.json (source of truth) ↔ aso-data.json (build artifact) 변환 유틸리티
|
|
574
|
+
*/
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* config.json에서 ASO 데이터를 읽어옵니다
|
|
578
|
+
* 새 구조: config.json (메타데이터) + locales/{locale}.json (콘텐츠)
|
|
579
|
+
*/
|
|
580
|
+
declare function loadAsoFromConfig(slug: string): AsoData;
|
|
581
|
+
/**
|
|
582
|
+
* config.json에 ASO 데이터를 저장합니다
|
|
583
|
+
*/
|
|
584
|
+
declare function saveAsoToConfig(slug: string, config: ProductConfig): void;
|
|
585
|
+
/**
|
|
586
|
+
* ASO 데이터를 지정한 ASO 디렉토리에 저장합니다 (기본: .aso/pushData)
|
|
587
|
+
*/
|
|
588
|
+
declare function saveAsoToAsoDir(slug: string, asoData: AsoData, options?: {
|
|
589
|
+
rootDir?: string;
|
|
590
|
+
}): void;
|
|
591
|
+
|
|
592
|
+
export { APP_STORE_TO_UNIFIED, type AppMetaLinks, type AppPageData, type AppStoreAsoData, type AppStoreLocale, type AppStoreMultilingualAsoData, type AppStoreReleaseNote, type AsoData, type AsoLocaleContent, type AsoTemplate, DEFAULT_LOCALE, type DeepPartial, type FeatureItem, GOOGLE_PLAY_TO_UNIFIED, type GooglePlayAsoData, type GooglePlayLocale, type GooglePlayMultilingualAsoData, type GooglePlayReleaseNote, 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, googlePlayToAppStore, googlePlayToUnified, googlePlayToUnifiedBatch, isAppStoreLocale, isAppStoreMultilingual, isGooglePlayLocale, isGooglePlayMultilingual, isSupportedLocale, loadAsoFromConfig, saveAsoToAsoDir, saveAsoToConfig, unifiedToAppStore, unifiedToAppStoreBatch, unifiedToBothPlatforms, unifiedToGooglePlay, unifiedToGooglePlayBatch };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
APP_STORE_TO_UNIFIED,
|
|
3
|
+
DEFAULT_LOCALE,
|
|
4
|
+
GOOGLE_PLAY_TO_UNIFIED,
|
|
5
|
+
UNIFIED_LOCALES,
|
|
6
|
+
UNIFIED_TO_APP_STORE,
|
|
7
|
+
UNIFIED_TO_GOOGLE_PLAY,
|
|
8
|
+
appStoreToGooglePlay,
|
|
9
|
+
appStoreToUnified2 as appStoreToUnified,
|
|
10
|
+
appStoreToUnifiedBatch,
|
|
11
|
+
convertObjectFromAppStore,
|
|
12
|
+
convertObjectFromGooglePlay,
|
|
13
|
+
convertObjectToAppStore,
|
|
14
|
+
convertObjectToGooglePlay,
|
|
15
|
+
googlePlayToAppStore,
|
|
16
|
+
googlePlayToUnified2 as googlePlayToUnified,
|
|
17
|
+
googlePlayToUnifiedBatch,
|
|
18
|
+
isAppStoreLocale,
|
|
19
|
+
isAppStoreMultilingual,
|
|
20
|
+
isGooglePlayLocale,
|
|
21
|
+
isGooglePlayMultilingual,
|
|
22
|
+
isSupportedLocale,
|
|
23
|
+
loadAsoFromConfig,
|
|
24
|
+
saveAsoToAsoDir,
|
|
25
|
+
saveAsoToConfig,
|
|
26
|
+
unifiedToAppStore,
|
|
27
|
+
unifiedToAppStoreBatch,
|
|
28
|
+
unifiedToBothPlatforms,
|
|
29
|
+
unifiedToGooglePlay,
|
|
30
|
+
unifiedToGooglePlayBatch
|
|
31
|
+
} from "./chunk-YJWGBO7W.js";
|
|
32
|
+
export {
|
|
33
|
+
APP_STORE_TO_UNIFIED,
|
|
34
|
+
DEFAULT_LOCALE,
|
|
35
|
+
GOOGLE_PLAY_TO_UNIFIED,
|
|
36
|
+
UNIFIED_LOCALES,
|
|
37
|
+
UNIFIED_TO_APP_STORE,
|
|
38
|
+
UNIFIED_TO_GOOGLE_PLAY,
|
|
39
|
+
appStoreToGooglePlay,
|
|
40
|
+
appStoreToUnified,
|
|
41
|
+
appStoreToUnifiedBatch,
|
|
42
|
+
convertObjectFromAppStore,
|
|
43
|
+
convertObjectFromGooglePlay,
|
|
44
|
+
convertObjectToAppStore,
|
|
45
|
+
convertObjectToGooglePlay,
|
|
46
|
+
googlePlayToAppStore,
|
|
47
|
+
googlePlayToUnified,
|
|
48
|
+
googlePlayToUnifiedBatch,
|
|
49
|
+
isAppStoreLocale,
|
|
50
|
+
isAppStoreMultilingual,
|
|
51
|
+
isGooglePlayLocale,
|
|
52
|
+
isGooglePlayMultilingual,
|
|
53
|
+
isSupportedLocale,
|
|
54
|
+
loadAsoFromConfig,
|
|
55
|
+
saveAsoToAsoDir,
|
|
56
|
+
saveAsoToConfig,
|
|
57
|
+
unifiedToAppStore,
|
|
58
|
+
unifiedToAppStoreBatch,
|
|
59
|
+
unifiedToBothPlatforms,
|
|
60
|
+
unifiedToGooglePlay,
|
|
61
|
+
unifiedToGooglePlayBatch
|
|
62
|
+
};
|