appshot-cli 0.3.0 → 0.5.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.
Files changed (51) hide show
  1. package/README.md +1343 -714
  2. package/dist/cli.js +7 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/build.d.ts.map +1 -1
  5. package/dist/commands/build.js +11 -4
  6. package/dist/commands/build.js.map +1 -1
  7. package/dist/commands/doctor.d.ts +3 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +67 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/fonts.d.ts +3 -0
  12. package/dist/commands/fonts.d.ts.map +1 -0
  13. package/dist/commands/fonts.js +384 -0
  14. package/dist/commands/fonts.js.map +1 -0
  15. package/dist/commands/migrate.d.ts +3 -0
  16. package/dist/commands/migrate.d.ts.map +1 -0
  17. package/dist/commands/migrate.js +123 -0
  18. package/dist/commands/migrate.js.map +1 -0
  19. package/dist/commands/specs.d.ts.map +1 -1
  20. package/dist/commands/specs.js +61 -46
  21. package/dist/commands/specs.js.map +1 -1
  22. package/dist/commands/style.d.ts.map +1 -1
  23. package/dist/commands/style.js +92 -1
  24. package/dist/commands/style.js.map +1 -1
  25. package/dist/core/app-store-specs.d.ts +2 -0
  26. package/dist/core/app-store-specs.d.ts.map +1 -1
  27. package/dist/core/app-store-specs.js +2 -0
  28. package/dist/core/app-store-specs.js.map +1 -1
  29. package/dist/core/compose.d.ts +4 -0
  30. package/dist/core/compose.d.ts.map +1 -1
  31. package/dist/core/compose.js +102 -9
  32. package/dist/core/compose.js.map +1 -1
  33. package/dist/services/doctor.d.ts +35 -0
  34. package/dist/services/doctor.d.ts.map +1 -0
  35. package/dist/services/doctor.js +439 -0
  36. package/dist/services/doctor.js.map +1 -0
  37. package/dist/services/fonts.d.ts +71 -0
  38. package/dist/services/fonts.d.ts.map +1 -0
  39. package/dist/services/fonts.js +314 -0
  40. package/dist/services/fonts.js.map +1 -0
  41. package/dist/types/exec.d.ts +5 -0
  42. package/dist/types/exec.d.ts.map +1 -0
  43. package/dist/types/exec.js +2 -0
  44. package/dist/types/exec.js.map +1 -0
  45. package/dist/types.d.ts +2 -0
  46. package/dist/types.d.ts.map +1 -1
  47. package/dist/utils/language.d.ts +32 -0
  48. package/dist/utils/language.d.ts.map +1 -0
  49. package/dist/utils/language.js +103 -0
  50. package/dist/utils/language.js.map +1 -0
  51. package/package.json +1 -1
@@ -0,0 +1,439 @@
1
+ import { exec } from 'child_process';
2
+ import { promises as fs } from 'fs';
3
+ import path from 'path';
4
+ import { promisify } from 'util';
5
+ import { platform } from 'os';
6
+ import sharp from 'sharp';
7
+ import { FontService } from './fonts.js';
8
+ import { loadConfig } from '../core/files.js';
9
+ import { frameRegistry } from '../core/devices.js';
10
+ const execAsync = promisify(exec);
11
+ export class DoctorService {
12
+ results = [];
13
+ suggestions = [];
14
+ async runAllChecks(categories) {
15
+ this.results = [];
16
+ this.suggestions = [];
17
+ const availableCategories = ['system', 'dependencies', 'fonts', 'filesystem', 'frames'];
18
+ const categoriesToRun = categories?.length
19
+ ? categories.filter(c => availableCategories.includes(c))
20
+ : availableCategories;
21
+ if (categoriesToRun.includes('system')) {
22
+ await this.checkSystemRequirements();
23
+ }
24
+ if (categoriesToRun.includes('dependencies')) {
25
+ await this.checkDependencies();
26
+ }
27
+ if (categoriesToRun.includes('fonts')) {
28
+ await this.checkFontSystem();
29
+ }
30
+ if (categoriesToRun.includes('filesystem')) {
31
+ await this.checkFileSystem();
32
+ }
33
+ if (categoriesToRun.includes('frames')) {
34
+ await this.checkFrameAssets();
35
+ }
36
+ return this.generateReport();
37
+ }
38
+ addResult(result) {
39
+ this.results.push(result);
40
+ if (result.suggestion && result.status !== 'pass') {
41
+ this.suggestions.push(result.suggestion);
42
+ }
43
+ }
44
+ async checkSystemRequirements() {
45
+ // Check Node.js version
46
+ const nodeVersion = process.version;
47
+ const majorVersion = parseInt(nodeVersion.slice(1).split('.')[0]);
48
+ this.addResult({
49
+ name: 'Node.js Version',
50
+ category: 'system',
51
+ status: majorVersion >= 18 ? 'pass' : 'error',
52
+ message: `Node.js ${nodeVersion} (minimum: v18.0.0)`,
53
+ suggestion: majorVersion < 18 ? 'Update Node.js to version 18 or higher' : undefined
54
+ });
55
+ // Check npm availability
56
+ try {
57
+ const { stdout } = await execAsync('npm --version');
58
+ this.addResult({
59
+ name: 'npm',
60
+ category: 'system',
61
+ status: 'pass',
62
+ message: `npm v${stdout.trim()}`
63
+ });
64
+ }
65
+ catch {
66
+ this.addResult({
67
+ name: 'npm',
68
+ category: 'system',
69
+ status: 'warning',
70
+ message: 'npm not found',
71
+ suggestion: 'Install npm or ensure it\'s in your PATH'
72
+ });
73
+ }
74
+ // Platform detection
75
+ const os = platform();
76
+ this.addResult({
77
+ name: 'Platform',
78
+ category: 'system',
79
+ status: 'pass',
80
+ message: `${os} (${this.getPlatformName(os)})`
81
+ });
82
+ }
83
+ async checkDependencies() {
84
+ // Check Sharp installation
85
+ try {
86
+ const sharpVersion = sharp.versions;
87
+ this.addResult({
88
+ name: 'Sharp Module',
89
+ category: 'dependencies',
90
+ status: 'pass',
91
+ message: `Sharp v${sharpVersion.sharp} installed`
92
+ });
93
+ // Check Sharp native bindings
94
+ if (sharpVersion.vips) {
95
+ this.addResult({
96
+ name: 'Sharp Native Bindings',
97
+ category: 'dependencies',
98
+ status: 'pass',
99
+ message: `libvips v${sharpVersion.vips} loaded`
100
+ });
101
+ }
102
+ // Test Sharp functionality
103
+ try {
104
+ await sharp({
105
+ create: {
106
+ width: 100,
107
+ height: 100,
108
+ channels: 4,
109
+ background: { r: 255, g: 0, b: 0, alpha: 1 }
110
+ }
111
+ })
112
+ .png()
113
+ .toBuffer();
114
+ this.addResult({
115
+ name: 'Image Processing',
116
+ category: 'dependencies',
117
+ status: 'pass',
118
+ message: 'Sharp image processing test passed'
119
+ });
120
+ }
121
+ catch (error) {
122
+ this.addResult({
123
+ name: 'Image Processing',
124
+ category: 'dependencies',
125
+ status: 'error',
126
+ message: 'Sharp image processing test failed',
127
+ details: error instanceof Error ? error.message : String(error),
128
+ suggestion: 'Try reinstalling sharp: npm install sharp --force'
129
+ });
130
+ }
131
+ }
132
+ catch (error) {
133
+ this.addResult({
134
+ name: 'Sharp Module',
135
+ category: 'dependencies',
136
+ status: 'error',
137
+ message: 'Sharp not installed or not functional',
138
+ details: error instanceof Error ? error.message : String(error),
139
+ suggestion: 'Install sharp: npm install sharp'
140
+ });
141
+ }
142
+ // Check OpenAI API key
143
+ const hasApiKey = !!process.env.OPENAI_API_KEY;
144
+ this.addResult({
145
+ name: 'OpenAI API Key',
146
+ category: 'dependencies',
147
+ status: hasApiKey ? 'pass' : 'warning',
148
+ message: hasApiKey ? 'OpenAI API key found' : 'OpenAI API key not found (translation features disabled)',
149
+ suggestion: hasApiKey ? undefined : 'Set OPENAI_API_KEY environment variable to enable translation features'
150
+ });
151
+ }
152
+ async checkFontSystem() {
153
+ const fontService = FontService.getInstance();
154
+ const os = platform();
155
+ // Check font detection command availability
156
+ let fontCommandAvailable = false;
157
+ let fontCommand = '';
158
+ if (os === 'darwin') {
159
+ fontCommand = 'system_profiler';
160
+ try {
161
+ await execAsync('which system_profiler');
162
+ fontCommandAvailable = true;
163
+ }
164
+ catch {
165
+ fontCommandAvailable = false;
166
+ }
167
+ }
168
+ else if (os === 'win32') {
169
+ fontCommand = 'PowerShell';
170
+ fontCommandAvailable = true; // PowerShell is always available on Windows
171
+ }
172
+ else {
173
+ fontCommand = 'fc-list';
174
+ try {
175
+ await execAsync('which fc-list');
176
+ fontCommandAvailable = true;
177
+ }
178
+ catch {
179
+ fontCommandAvailable = false;
180
+ }
181
+ }
182
+ this.addResult({
183
+ name: 'Font Detection',
184
+ category: 'fonts',
185
+ status: fontCommandAvailable ? 'pass' : 'warning',
186
+ message: fontCommandAvailable
187
+ ? `Font detection available (${fontCommand})`
188
+ : `Font detection command not found (${fontCommand})`,
189
+ suggestion: !fontCommandAvailable && os === 'linux'
190
+ ? 'Install fontconfig: apt-get install fontconfig or yum install fontconfig'
191
+ : undefined
192
+ });
193
+ // Try to load system fonts
194
+ try {
195
+ const fonts = await fontService.getSystemFonts();
196
+ this.addResult({
197
+ name: 'System Fonts',
198
+ category: 'fonts',
199
+ status: fonts.length > 0 ? 'pass' : 'warning',
200
+ message: fonts.length > 0
201
+ ? `System fonts loaded (${fonts.length} fonts)`
202
+ : 'No system fonts detected',
203
+ suggestion: fonts.length === 0
204
+ ? 'Font detection may not be working properly on your system'
205
+ : undefined
206
+ });
207
+ // Check for common fonts
208
+ const commonFonts = ['Arial', 'Helvetica', 'Times New Roman'];
209
+ for (const fontName of commonFonts) {
210
+ const isInstalled = await fontService.isFontInstalled(fontName);
211
+ if (isInstalled) {
212
+ this.addResult({
213
+ name: `${fontName} Font`,
214
+ category: 'fonts',
215
+ status: 'pass',
216
+ message: `${fontName} font available`
217
+ });
218
+ break; // Just need one common font to pass
219
+ }
220
+ }
221
+ }
222
+ catch (error) {
223
+ this.addResult({
224
+ name: 'System Fonts',
225
+ category: 'fonts',
226
+ status: 'warning',
227
+ message: 'Could not load system fonts',
228
+ details: error instanceof Error ? error.message : String(error)
229
+ });
230
+ }
231
+ }
232
+ async checkFileSystem() {
233
+ // Check write permissions in current directory
234
+ const testFile = path.join(process.cwd(), '.appshot-doctor-test');
235
+ try {
236
+ await fs.writeFile(testFile, 'test', 'utf8');
237
+ await fs.unlink(testFile);
238
+ this.addResult({
239
+ name: 'Current Directory',
240
+ category: 'filesystem',
241
+ status: 'pass',
242
+ message: 'Write permissions in current directory'
243
+ });
244
+ }
245
+ catch (error) {
246
+ this.addResult({
247
+ name: 'Current Directory',
248
+ category: 'filesystem',
249
+ status: 'error',
250
+ message: 'No write permissions in current directory',
251
+ details: error instanceof Error ? error.message : String(error),
252
+ suggestion: 'Check directory permissions'
253
+ });
254
+ }
255
+ // Check write permissions in temp directory
256
+ const tempDir = process.platform === 'win32' ? process.env.TEMP || 'C:\\Temp' : '/tmp';
257
+ const tempFile = path.join(tempDir, '.appshot-doctor-test');
258
+ try {
259
+ await fs.writeFile(tempFile, 'test', 'utf8');
260
+ await fs.unlink(tempFile);
261
+ this.addResult({
262
+ name: 'Temp Directory',
263
+ category: 'filesystem',
264
+ status: 'pass',
265
+ message: 'Write permissions in temp directory'
266
+ });
267
+ }
268
+ catch (error) {
269
+ this.addResult({
270
+ name: 'Temp Directory',
271
+ category: 'filesystem',
272
+ status: 'warning',
273
+ message: 'No write permissions in temp directory',
274
+ details: error instanceof Error ? error.message : String(error)
275
+ });
276
+ }
277
+ // Check .appshot directory
278
+ const appshotDir = path.join(process.cwd(), '.appshot');
279
+ try {
280
+ await fs.stat(appshotDir);
281
+ this.addResult({
282
+ name: '.appshot Directory',
283
+ category: 'filesystem',
284
+ status: 'pass',
285
+ message: '.appshot directory exists'
286
+ });
287
+ // Check configuration file
288
+ try {
289
+ await loadConfig();
290
+ this.addResult({
291
+ name: 'Configuration File',
292
+ category: 'filesystem',
293
+ status: 'pass',
294
+ message: 'Configuration file valid'
295
+ });
296
+ }
297
+ catch {
298
+ this.addResult({
299
+ name: 'Configuration File',
300
+ category: 'filesystem',
301
+ status: 'warning',
302
+ message: 'Configuration file missing or invalid',
303
+ suggestion: 'Run "appshot init" to create configuration'
304
+ });
305
+ }
306
+ }
307
+ catch {
308
+ this.addResult({
309
+ name: '.appshot Directory',
310
+ category: 'filesystem',
311
+ status: 'warning',
312
+ message: '.appshot directory not found',
313
+ suggestion: 'Run "appshot init" to initialize project'
314
+ });
315
+ }
316
+ }
317
+ async checkFrameAssets() {
318
+ const framesDir = path.join(process.cwd(), 'frames');
319
+ try {
320
+ const files = await fs.readdir(framesDir);
321
+ const frameFiles = files.filter(f => f.endsWith('.png'));
322
+ this.addResult({
323
+ name: 'Frames Directory',
324
+ category: 'frames',
325
+ status: 'pass',
326
+ message: `Frames directory found (${frameFiles.length} files)`
327
+ });
328
+ // Check Frames.json
329
+ const framesJsonPath = path.join(framesDir, 'Frames.json');
330
+ try {
331
+ const framesJson = await fs.readFile(framesJsonPath, 'utf8');
332
+ JSON.parse(framesJson);
333
+ this.addResult({
334
+ name: 'Frames.json',
335
+ category: 'frames',
336
+ status: 'pass',
337
+ message: 'Frames.json valid'
338
+ });
339
+ // Count frames by device type
340
+ const deviceCounts = {
341
+ iphone: 0,
342
+ ipad: 0,
343
+ mac: 0,
344
+ watch: 0
345
+ };
346
+ for (const frame of frameRegistry) {
347
+ deviceCounts[frame.deviceType]++;
348
+ }
349
+ for (const [device, count] of Object.entries(deviceCounts)) {
350
+ if (count > 0) {
351
+ this.addResult({
352
+ name: `${device.charAt(0).toUpperCase() + device.slice(1)} Frames`,
353
+ category: 'frames',
354
+ status: 'pass',
355
+ message: `${device === 'mac' ? 'Mac' : device.charAt(0).toUpperCase() + device.slice(1)} frames: ${count}`
356
+ });
357
+ }
358
+ }
359
+ // Check if all frame files referenced in registry exist
360
+ let missingFrames = 0;
361
+ for (const frame of frameRegistry) {
362
+ const framePath = path.join(framesDir, `${frame.originalName || frame.displayName}.png`);
363
+ try {
364
+ await fs.access(framePath);
365
+ }
366
+ catch {
367
+ missingFrames++;
368
+ }
369
+ }
370
+ if (missingFrames === 0) {
371
+ this.addResult({
372
+ name: 'Frame Files',
373
+ category: 'frames',
374
+ status: 'pass',
375
+ message: 'All frame files present'
376
+ });
377
+ }
378
+ else {
379
+ this.addResult({
380
+ name: 'Frame Files',
381
+ category: 'frames',
382
+ status: 'warning',
383
+ message: `${missingFrames} frame files missing`,
384
+ suggestion: 'Some device frames may not be available'
385
+ });
386
+ }
387
+ }
388
+ catch (error) {
389
+ this.addResult({
390
+ name: 'Frames.json',
391
+ category: 'frames',
392
+ status: 'warning',
393
+ message: 'Frames.json missing or invalid',
394
+ details: error instanceof Error ? error.message : String(error)
395
+ });
396
+ }
397
+ }
398
+ catch {
399
+ this.addResult({
400
+ name: 'Frames Directory',
401
+ category: 'frames',
402
+ status: 'warning',
403
+ message: 'Frames directory not found',
404
+ suggestion: 'Device frames may not be available for the build command'
405
+ });
406
+ }
407
+ }
408
+ getPlatformName(os) {
409
+ switch (os) {
410
+ case 'darwin': return 'macOS';
411
+ case 'win32': return 'Windows';
412
+ case 'linux': return 'Linux';
413
+ default: return os;
414
+ }
415
+ }
416
+ generateReport() {
417
+ const categorizedChecks = {};
418
+ for (const result of this.results) {
419
+ if (!categorizedChecks[result.category]) {
420
+ categorizedChecks[result.category] = [];
421
+ }
422
+ categorizedChecks[result.category].push(result);
423
+ }
424
+ const summary = {
425
+ passed: this.results.filter(r => r.status === 'pass').length,
426
+ warnings: this.results.filter(r => r.status === 'warning').length,
427
+ errors: this.results.filter(r => r.status === 'error').length
428
+ };
429
+ return {
430
+ timestamp: new Date().toISOString(),
431
+ version: '0.5.0',
432
+ platform: platform(),
433
+ checks: categorizedChecks,
434
+ summary,
435
+ suggestions: [...new Set(this.suggestions)] // Remove duplicates
436
+ };
437
+ }
438
+ }
439
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/services/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AA0BlC,MAAM,OAAO,aAAa;IAChB,OAAO,GAAk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O,EAAE,CAAC;YAClC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACxC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YAC1C,CAAC;YACD,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;QAED,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM;YAC5D,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,MAAM;YACjE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,MAAM;SAC9D,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ,EAAE;YACpB,MAAM,EAAE,iBAAiB;YACzB,OAAO;YACP,WAAW,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB;SACjE,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,71 @@
1
+ export interface FontInfo {
2
+ name: string;
3
+ family?: string;
4
+ style?: string;
5
+ category?: 'system' | 'recommended' | 'web-safe';
6
+ fallback?: string;
7
+ installed?: boolean;
8
+ }
9
+ export interface FontCategory {
10
+ name: string;
11
+ fonts: FontInfo[];
12
+ }
13
+ export interface FontStatus {
14
+ name: string;
15
+ installed: boolean;
16
+ category?: 'system' | 'recommended' | 'web-safe';
17
+ fallback: string;
18
+ warning?: string;
19
+ }
20
+ export declare class FontService {
21
+ private static instance;
22
+ private systemFontsCache;
23
+ static getInstance(): FontService;
24
+ /**
25
+ * Get list of system fonts based on platform
26
+ */
27
+ getSystemFonts(): Promise<string[]>;
28
+ /**
29
+ * Get fonts on macOS using system_profiler
30
+ */
31
+ private getMacOSFonts;
32
+ /**
33
+ * Get fonts on Linux using fc-list
34
+ */
35
+ private getLinuxFonts;
36
+ /**
37
+ * Get fonts on Windows using PowerShell
38
+ */
39
+ private getWindowsFonts;
40
+ /**
41
+ * Get recommended fonts with installation status
42
+ */
43
+ getRecommendedFonts(): Promise<FontInfo[]>;
44
+ /**
45
+ * Get basic recommended fonts (without async check) for backward compatibility
46
+ */
47
+ getRecommendedFontsSync(): FontInfo[];
48
+ /**
49
+ * Get fonts organized by category with installation status
50
+ */
51
+ getFontCategories(): Promise<FontCategory[]>;
52
+ /**
53
+ * Check if a font is actually installed on the system
54
+ * This is the TRUTH - only returns true if font can actually be used
55
+ */
56
+ isFontInstalled(fontName: string): Promise<boolean>;
57
+ /**
58
+ * Validate if a font can be rendered
59
+ * NOW only checks if actually installed, not just "recommended"
60
+ */
61
+ validateFont(fontName: string): Promise<boolean>;
62
+ /**
63
+ * Get detailed status about a font
64
+ */
65
+ getFontStatus(fontName: string): Promise<FontStatus>;
66
+ /**
67
+ * Get a font's fallback chain (synchronous for backward compatibility)
68
+ */
69
+ getFontFallback(fontName: string): string;
70
+ }
71
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/services/fonts.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC;IACjD,QAAQ,CAAC,EA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