appshot-cli 0.9.0 → 0.9.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.
- package/README.md +305 -1
- package/dist/cli.js +6 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +382 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/order.d.ts +3 -0
- package/dist/commands/order.d.ts.map +1 -0
- package/dist/commands/order.js +321 -0
- package/dist/commands/order.js.map +1 -0
- package/dist/services/doctor.js +1 -1
- package/dist/services/export-validator.d.ts +23 -0
- package/dist/services/export-validator.d.ts.map +1 -0
- package/dist/services/export-validator.js +209 -0
- package/dist/services/export-validator.js.map +1 -0
- package/dist/services/fastlane-config-generator.d.ts +17 -0
- package/dist/services/fastlane-config-generator.d.ts.map +1 -0
- package/dist/services/fastlane-config-generator.js +343 -0
- package/dist/services/fastlane-config-generator.js.map +1 -0
- package/dist/services/fastlane-language-mapper.d.ts +33 -0
- package/dist/services/fastlane-language-mapper.d.ts.map +1 -0
- package/dist/services/fastlane-language-mapper.js +167 -0
- package/dist/services/fastlane-language-mapper.js.map +1 -0
- package/dist/services/screenshot-order.d.ts +41 -0
- package/dist/services/screenshot-order.d.ts.map +1 -0
- package/dist/services/screenshot-order.js +211 -0
- package/dist/services/screenshot-order.js.map +1 -0
- package/dist/services/screenshot-organizer.d.ts +44 -0
- package/dist/services/screenshot-organizer.d.ts.map +1 -0
- package/dist/services/screenshot-organizer.js +234 -0
- package/dist/services/screenshot-organizer.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { promises as fs } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import pc from 'picocolors';
|
|
5
|
+
import { select, confirm } from '@inquirer/prompts';
|
|
6
|
+
import { loadOrderConfig, saveOrderConfig, getAvailableScreenshots, displayOrder, applyOrder } from '../services/screenshot-order.js';
|
|
7
|
+
export default function orderCmd() {
|
|
8
|
+
const cmd = new Command('order')
|
|
9
|
+
.description('Manage screenshot ordering for App Store submissions')
|
|
10
|
+
.option('--device <name>', 'Specific device to order (iphone|ipad|mac|watch)')
|
|
11
|
+
.option('--source <dir>', 'Source directory containing screenshots', './final')
|
|
12
|
+
.option('--lang <code>', 'Language code for screenshots', 'en')
|
|
13
|
+
.option('--show', 'Display current order without editing')
|
|
14
|
+
.option('--reset', 'Reset ordering to defaults')
|
|
15
|
+
.option('--apply', 'Apply saved order by adding numeric prefixes to files')
|
|
16
|
+
.option('--remove-prefixes', 'Remove numeric prefixes from filenames')
|
|
17
|
+
.addHelpText('after', `
|
|
18
|
+
${pc.bold('Examples:')}
|
|
19
|
+
${pc.dim('# Interactive ordering for iPhone screenshots')}
|
|
20
|
+
$ appshot order --device iphone
|
|
21
|
+
|
|
22
|
+
${pc.dim('# Show current order without editing')}
|
|
23
|
+
$ appshot order --show
|
|
24
|
+
|
|
25
|
+
${pc.dim('# Apply numeric prefixes based on saved order')}
|
|
26
|
+
$ appshot order --apply --device iphone
|
|
27
|
+
|
|
28
|
+
${pc.dim('# Remove numeric prefixes from files')}
|
|
29
|
+
$ appshot order --remove-prefixes --device iphone
|
|
30
|
+
|
|
31
|
+
${pc.dim('# Reset to smart defaults')}
|
|
32
|
+
$ appshot order --reset
|
|
33
|
+
|
|
34
|
+
${pc.bold('How it works:')}
|
|
35
|
+
1. Run 'appshot order --device [device]' to set the order
|
|
36
|
+
2. Use arrow keys to reorder screenshots interactively
|
|
37
|
+
3. Order is saved to .appshot/screenshot-order.json
|
|
38
|
+
4. Run 'appshot export --order' to use the saved order
|
|
39
|
+
|
|
40
|
+
${pc.bold('Smart Defaults:')}
|
|
41
|
+
The command automatically prioritizes common screenshot names:
|
|
42
|
+
• home/main/dashboard (first)
|
|
43
|
+
• features/content screens (middle)
|
|
44
|
+
• settings/about (last)
|
|
45
|
+
`)
|
|
46
|
+
.action(async (opts) => {
|
|
47
|
+
try {
|
|
48
|
+
// Handle show option
|
|
49
|
+
if (opts.show) {
|
|
50
|
+
await showCurrentOrder(opts.source, opts.lang);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Handle reset option
|
|
54
|
+
if (opts.reset) {
|
|
55
|
+
await resetOrder();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// Handle remove prefixes option
|
|
59
|
+
if (opts.removePrefixes) {
|
|
60
|
+
await removePrefixes(opts.device, opts.source, opts.lang);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Handle apply option
|
|
64
|
+
if (opts.apply) {
|
|
65
|
+
if (!opts.device) {
|
|
66
|
+
console.error(pc.red('Error: --device is required with --apply'));
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
await applyOrderToFiles(opts.device, opts.source, opts.lang);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// Interactive ordering mode
|
|
73
|
+
let device = opts.device;
|
|
74
|
+
if (!device) {
|
|
75
|
+
// Let user select device
|
|
76
|
+
const devices = await getAvailableDevices(opts.source, opts.lang);
|
|
77
|
+
if (devices.length === 0) {
|
|
78
|
+
console.error(pc.red('No screenshots found in the source directory'));
|
|
79
|
+
console.log(pc.dim(` Checked: ${path.join(opts.source, '*', opts.lang)}`));
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
// Build choices with screenshot counts
|
|
83
|
+
const choices = [];
|
|
84
|
+
for (const d of devices) {
|
|
85
|
+
const count = (await getAvailableScreenshots(d, opts.source, opts.lang)).length;
|
|
86
|
+
choices.push({
|
|
87
|
+
name: `${d} (${count} screenshots)`,
|
|
88
|
+
value: d
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
device = await select({
|
|
92
|
+
message: 'Select device to order screenshots for:',
|
|
93
|
+
choices
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
// Get screenshots for the device
|
|
97
|
+
const screenshots = await getAvailableScreenshots(device, opts.source, opts.lang);
|
|
98
|
+
if (screenshots.length === 0) {
|
|
99
|
+
console.error(pc.red(`No screenshots found for ${device}`));
|
|
100
|
+
console.log(pc.dim(` Checked: ${path.join(opts.source, device, opts.lang)}`));
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
// Load existing order or use smart defaults
|
|
104
|
+
const existingConfig = await loadOrderConfig();
|
|
105
|
+
const currentOrder = applyOrder(screenshots, device, existingConfig);
|
|
106
|
+
console.log(pc.cyan(`\n📱 Ordering screenshots for ${device}`));
|
|
107
|
+
console.log(pc.dim(` Found ${screenshots.length} screenshots`));
|
|
108
|
+
// Interactive reordering using a simpler approach
|
|
109
|
+
const orderedScreenshots = await interactiveOrder(currentOrder);
|
|
110
|
+
// Save the new order (always save clean names without prefixes)
|
|
111
|
+
const orders = existingConfig?.orders || {};
|
|
112
|
+
// Remove any numeric prefixes before saving
|
|
113
|
+
const cleanOrderedScreenshots = orderedScreenshots.map(file => file.replace(/^\d+[-_.]/, ''));
|
|
114
|
+
orders[device] = cleanOrderedScreenshots;
|
|
115
|
+
await saveOrderConfig(orders);
|
|
116
|
+
console.log(pc.green('\n✓ Screenshot order saved!'));
|
|
117
|
+
displayOrder(orderedScreenshots, device);
|
|
118
|
+
// Ask if user wants to apply prefixes now
|
|
119
|
+
const shouldApply = await confirm({
|
|
120
|
+
message: 'Add numeric prefixes to files now?',
|
|
121
|
+
default: false
|
|
122
|
+
});
|
|
123
|
+
if (shouldApply) {
|
|
124
|
+
await applyOrderToFiles(device, opts.source, opts.lang);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
console.log(pc.dim('\nTo apply this order when exporting:'));
|
|
128
|
+
console.log(pc.cyan(' $ appshot export --order'));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
console.error(pc.red('Error:'), error);
|
|
133
|
+
process.exit(1);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
return cmd;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Interactive ordering UI
|
|
140
|
+
*/
|
|
141
|
+
async function interactiveOrder(screenshots) {
|
|
142
|
+
const ordered = [...screenshots];
|
|
143
|
+
let currentIndex = 0;
|
|
144
|
+
let done = false;
|
|
145
|
+
console.log('\n' + pc.bold('Reorder screenshots:'));
|
|
146
|
+
console.log(pc.dim(' ↑/↓: Navigate │ Space: Select │ ↑/↓: Move selected │ Enter: Done\n'));
|
|
147
|
+
while (!done) {
|
|
148
|
+
// Display current order
|
|
149
|
+
console.clear();
|
|
150
|
+
console.log('\n' + pc.bold('Screenshot Order:'));
|
|
151
|
+
console.log(pc.dim(' Use arrow keys to navigate, space to select/move, enter when done\n'));
|
|
152
|
+
ordered.forEach((file, index) => {
|
|
153
|
+
const num = String(index + 1).padStart(2, '0');
|
|
154
|
+
const prefix = index === currentIndex ? pc.cyan('→') : ' ';
|
|
155
|
+
const highlight = index === currentIndex ? pc.cyan(file) : file;
|
|
156
|
+
console.log(` ${prefix} ${pc.dim(num)}. ${highlight}`);
|
|
157
|
+
});
|
|
158
|
+
// Simple menu for now - will enhance later
|
|
159
|
+
const action = await select({
|
|
160
|
+
message: '\nChoose action:',
|
|
161
|
+
choices: [
|
|
162
|
+
{ name: 'Move current item up', value: 'up', disabled: currentIndex === 0 },
|
|
163
|
+
{ name: 'Move current item down', value: 'down', disabled: currentIndex === ordered.length - 1 },
|
|
164
|
+
{ name: 'Jump to item...', value: 'jump' },
|
|
165
|
+
{ name: 'Reset to alphabetical', value: 'reset' },
|
|
166
|
+
{ name: 'Done - save this order', value: 'done' }
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
switch (action) {
|
|
170
|
+
case 'up':
|
|
171
|
+
if (currentIndex > 0) {
|
|
172
|
+
[ordered[currentIndex - 1], ordered[currentIndex]] = [ordered[currentIndex], ordered[currentIndex - 1]];
|
|
173
|
+
currentIndex--;
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case 'down':
|
|
177
|
+
if (currentIndex < ordered.length - 1) {
|
|
178
|
+
[ordered[currentIndex], ordered[currentIndex + 1]] = [ordered[currentIndex + 1], ordered[currentIndex]];
|
|
179
|
+
currentIndex++;
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
case 'jump':
|
|
183
|
+
const target = await select({
|
|
184
|
+
message: 'Select screenshot to jump to:',
|
|
185
|
+
choices: ordered.map((file, idx) => ({
|
|
186
|
+
name: `${String(idx + 1).padStart(2, '0')}. ${file}`,
|
|
187
|
+
value: idx
|
|
188
|
+
}))
|
|
189
|
+
});
|
|
190
|
+
currentIndex = target;
|
|
191
|
+
break;
|
|
192
|
+
case 'reset':
|
|
193
|
+
ordered.sort();
|
|
194
|
+
currentIndex = 0;
|
|
195
|
+
break;
|
|
196
|
+
case 'done':
|
|
197
|
+
done = true;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return ordered;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Get available devices from source directory
|
|
205
|
+
*/
|
|
206
|
+
async function getAvailableDevices(sourcePath, language) {
|
|
207
|
+
const devices = ['iphone', 'ipad', 'mac', 'watch'];
|
|
208
|
+
const available = [];
|
|
209
|
+
for (const device of devices) {
|
|
210
|
+
const screenshots = await getAvailableScreenshots(device, sourcePath, language);
|
|
211
|
+
if (screenshots.length > 0) {
|
|
212
|
+
available.push(device);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return available;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Show current order for all devices
|
|
219
|
+
*/
|
|
220
|
+
async function showCurrentOrder(_sourcePath, _language) {
|
|
221
|
+
const config = await loadOrderConfig();
|
|
222
|
+
if (!config) {
|
|
223
|
+
console.log(pc.yellow('No order configuration found'));
|
|
224
|
+
console.log(pc.dim('Run "appshot order --device [device]" to create one'));
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
console.log(pc.bold('\nCurrent screenshot order:'));
|
|
228
|
+
console.log(pc.dim(' Config: .appshot/screenshot-order.json'));
|
|
229
|
+
console.log(pc.dim(` Modified: ${new Date(config.modified).toLocaleString()}\n`));
|
|
230
|
+
for (const [device, order] of Object.entries(config.orders)) {
|
|
231
|
+
if (order && order.length > 0) {
|
|
232
|
+
displayOrder(order, device);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Reset order configuration
|
|
238
|
+
*/
|
|
239
|
+
async function resetOrder() {
|
|
240
|
+
const configPath = path.join(process.cwd(), '.appshot/screenshot-order.json');
|
|
241
|
+
try {
|
|
242
|
+
await fs.unlink(configPath);
|
|
243
|
+
console.log(pc.green('✓ Order configuration reset'));
|
|
244
|
+
console.log(pc.dim('Screenshots will use smart defaults'));
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
if (error.code === 'ENOENT') {
|
|
248
|
+
console.log(pc.yellow('No order configuration to reset'));
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
throw error;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Apply order to files by adding numeric prefixes
|
|
257
|
+
*/
|
|
258
|
+
async function applyOrderToFiles(device, sourcePath, language) {
|
|
259
|
+
const config = await loadOrderConfig();
|
|
260
|
+
const screenshots = await getAvailableScreenshots(device, sourcePath, language);
|
|
261
|
+
if (screenshots.length === 0) {
|
|
262
|
+
console.error(pc.red(`No screenshots found for ${device}`));
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const ordered = applyOrder(screenshots, device, config);
|
|
266
|
+
const devicePath = path.join(sourcePath, device, language);
|
|
267
|
+
console.log(pc.cyan(`\nApplying numeric prefixes to ${device} screenshots...`));
|
|
268
|
+
for (let i = 0; i < ordered.length; i++) {
|
|
269
|
+
const oldName = ordered[i];
|
|
270
|
+
const oldPath = path.join(devicePath, oldName);
|
|
271
|
+
// Remove existing prefix if present
|
|
272
|
+
const cleanName = oldName.replace(/^\d+[-_.]/, '');
|
|
273
|
+
const newName = `${String(i + 1).padStart(2, '0')}_${cleanName}`;
|
|
274
|
+
const newPath = path.join(devicePath, newName);
|
|
275
|
+
if (oldPath !== newPath) {
|
|
276
|
+
await fs.rename(oldPath, newPath);
|
|
277
|
+
console.log(pc.dim(` ${oldName} → ${newName}`));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
console.log(pc.green(`✓ Applied order to ${ordered.length} screenshots`));
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Remove numeric prefixes from files
|
|
284
|
+
*/
|
|
285
|
+
async function removePrefixes(device, sourcePath, language) {
|
|
286
|
+
if (!device) {
|
|
287
|
+
console.error(pc.red('Error: --device is required with --remove-prefixes'));
|
|
288
|
+
process.exit(1);
|
|
289
|
+
}
|
|
290
|
+
const devicePath = path.join(sourcePath, device, language);
|
|
291
|
+
const files = await fs.readdir(devicePath);
|
|
292
|
+
const screenshots = files.filter(f => f.match(/\.(png|jpg|jpeg)$/i) && !f.startsWith('.'));
|
|
293
|
+
console.log(pc.cyan(`\nRemoving numeric prefixes from ${device} screenshots...`));
|
|
294
|
+
let renamed = 0;
|
|
295
|
+
for (const file of screenshots) {
|
|
296
|
+
if (/^\d+[-_.]/.test(file)) {
|
|
297
|
+
const oldPath = path.join(devicePath, file);
|
|
298
|
+
const newName = file.replace(/^\d+[-_.]/, '');
|
|
299
|
+
const newPath = path.join(devicePath, newName);
|
|
300
|
+
// Check if target already exists
|
|
301
|
+
try {
|
|
302
|
+
await fs.access(newPath);
|
|
303
|
+
console.log(pc.yellow(` ⚠ Cannot rename ${file} → ${newName} (file exists)`));
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
catch {
|
|
307
|
+
// File doesn't exist, safe to rename
|
|
308
|
+
}
|
|
309
|
+
await fs.rename(oldPath, newPath);
|
|
310
|
+
console.log(pc.dim(` ${file} → ${newName}`));
|
|
311
|
+
renamed++;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (renamed > 0) {
|
|
315
|
+
console.log(pc.green(`✓ Removed prefixes from ${renamed} screenshots`));
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
console.log(pc.yellow('No numeric prefixes found'));
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/commands/order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,UAAU,EAEX,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;SAC7B,WAAW,CAAC,sDAAsD,CAAC;SACnE,MAAM,CAAC,iBAAiB,EAAE,kDAAkD,CAAC;SAC7E,MAAM,CAAC,gBAAgB,EAAE,yCAAyC,EAAE,SAAS,CAAC;SAC9E,MAAM,CAAC,eAAe,EAAE,+BAA+B,EAAE,IAAI,CAAC;SAC9D,MAAM,CAAC,QAAQ,EAAE,uCAAuC,CAAC;SACzD,MAAM,CAAC,SAAS,EAAE,4BAA4B,CAAC;SAC/C,MAAM,CAAC,SAAS,EAAE,uDAAuD,CAAC;SAC1E,MAAM,CAAC,mBAAmB,EAAE,wCAAwC,CAAC;SACrE,WAAW,CAAC,O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C;YACvC,CAAC;YAED,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC;YAC9C,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,2BAA2B,OAAO,cAAc,CAAC,CAAC,CAAC;IAC1E,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
|
package/dist/services/doctor.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ValidationResult {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
issues: string[];
|
|
4
|
+
warnings: string[];
|
|
5
|
+
stats?: {
|
|
6
|
+
totalScreenshots: number;
|
|
7
|
+
deviceCounts: Record<string, number>;
|
|
8
|
+
languageCounts: Record<string, number>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Validate export operation before execution
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateExport(source: string, languages: Map<string, string>, requestedDevices?: string[]): Promise<ValidationResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Validate output directory
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateOutputDirectory(outputPath: string, requireEmpty?: boolean): Promise<ValidationResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a path is safe to clean (not a system directory)
|
|
21
|
+
*/
|
|
22
|
+
export declare function isSafeToClean(targetPath: string): boolean;
|
|
23
|
+
//# sourceMappingURL=export-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-validator.d.ts","sourceRoot":"","sources":["../../src/services/export-validator.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACxC,CAAC;CACH;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAmI3B;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,OAAe,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAuD3B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAqCzD"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { FASTLANE_LANGUAGES } from './fastlane-language-mapper.js';
|
|
4
|
+
/**
|
|
5
|
+
* Validate export operation before execution
|
|
6
|
+
*/
|
|
7
|
+
export async function validateExport(source, languages, requestedDevices) {
|
|
8
|
+
const issues = [];
|
|
9
|
+
const warnings = [];
|
|
10
|
+
const deviceCounts = {};
|
|
11
|
+
const languageCounts = {};
|
|
12
|
+
// Check source directory exists
|
|
13
|
+
try {
|
|
14
|
+
await fs.access(source);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
issues.push(`Source directory not found: ${source}`);
|
|
18
|
+
return { valid: false, issues, warnings };
|
|
19
|
+
}
|
|
20
|
+
// Check if source is the correct directory structure
|
|
21
|
+
const sourceContents = await fs.readdir(source);
|
|
22
|
+
const allDevices = ['iphone', 'ipad', 'mac', 'watch'];
|
|
23
|
+
const hasDeviceDirectories = sourceContents.some(item => allDevices.includes(item.toLowerCase()));
|
|
24
|
+
if (!hasDeviceDirectories) {
|
|
25
|
+
warnings.push(`No device directories found in ${source}. Expected: ${allDevices.join(', ')}`);
|
|
26
|
+
}
|
|
27
|
+
// Use requested devices or default to all
|
|
28
|
+
const devices = requestedDevices && requestedDevices.length > 0
|
|
29
|
+
? requestedDevices
|
|
30
|
+
: allDevices;
|
|
31
|
+
// Count screenshots and validate structure
|
|
32
|
+
let totalScreenshots = 0;
|
|
33
|
+
for (const device of devices) {
|
|
34
|
+
const deviceDir = path.join(source, device);
|
|
35
|
+
deviceCounts[device] = 0;
|
|
36
|
+
let deviceDirExists = false;
|
|
37
|
+
try {
|
|
38
|
+
await fs.access(deviceDir);
|
|
39
|
+
deviceDirExists = true;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// Device directory doesn't exist
|
|
43
|
+
// If this device was specifically requested, warn about it
|
|
44
|
+
if (requestedDevices && requestedDevices.includes(device)) {
|
|
45
|
+
warnings.push(`No ${device} directory found - requested device will be skipped`);
|
|
46
|
+
}
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
for (const [sourceLang] of languages) {
|
|
50
|
+
const langDir = path.join(deviceDir, sourceLang);
|
|
51
|
+
try {
|
|
52
|
+
await fs.access(langDir);
|
|
53
|
+
const files = await fs.readdir(langDir);
|
|
54
|
+
const screenshots = files.filter(f => f.match(/\.(png|jpg|jpeg)$/i) && !f.startsWith('.'));
|
|
55
|
+
totalScreenshots += screenshots.length;
|
|
56
|
+
deviceCounts[device] += screenshots.length;
|
|
57
|
+
if (!languageCounts[sourceLang]) {
|
|
58
|
+
languageCounts[sourceLang] = 0;
|
|
59
|
+
}
|
|
60
|
+
languageCounts[sourceLang] += screenshots.length;
|
|
61
|
+
// Check for empty directories
|
|
62
|
+
if (screenshots.length === 0) {
|
|
63
|
+
warnings.push(`No screenshots found in ${device}/${sourceLang}/`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// Language directory doesn't exist for this device
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// After checking all languages, warn if a requested device has no screenshots
|
|
71
|
+
if (requestedDevices && requestedDevices.includes(device) && deviceCounts[device] === 0 && deviceDirExists) {
|
|
72
|
+
warnings.push(`No screenshots found for requested device: ${device}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// Check if any screenshots were found for requested devices
|
|
76
|
+
if (totalScreenshots === 0) {
|
|
77
|
+
if (requestedDevices && requestedDevices.length > 0) {
|
|
78
|
+
// User specifically requested devices, but none have screenshots
|
|
79
|
+
issues.push(`No screenshots found for requested devices: ${requestedDevices.join(', ')}`);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// No screenshots at all
|
|
83
|
+
issues.push('No screenshots found to export');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// Validate language code mappings
|
|
87
|
+
for (const [source, target] of languages) {
|
|
88
|
+
if (!FASTLANE_LANGUAGES.has(target)) {
|
|
89
|
+
warnings.push(`Language code '${target}' (mapped from '${source}') may not be recognized by Fastlane. ` +
|
|
90
|
+
`Consider using one of: ${Array.from(FASTLANE_LANGUAGES).slice(0, 5).join(', ')}...`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Only check for missing iPhone if we're exporting all devices or iPhone is requested
|
|
94
|
+
const checkingIphone = !requestedDevices || requestedDevices.includes('iphone');
|
|
95
|
+
if (checkingIphone && deviceCounts.iphone === 0 && totalScreenshots > 0) {
|
|
96
|
+
warnings.push('No iPhone screenshots found. iPhone screenshots are typically required for App Store submission.');
|
|
97
|
+
}
|
|
98
|
+
// Only warn about App Store resolutions if we're actually exporting those devices
|
|
99
|
+
const exportingIphone = requestedDevices ? requestedDevices.includes('iphone') : true;
|
|
100
|
+
const exportingIpad = requestedDevices ? requestedDevices.includes('ipad') : true;
|
|
101
|
+
if ((exportingIphone && deviceCounts.iphone > 0) || (exportingIpad && deviceCounts.ipad > 0)) {
|
|
102
|
+
const requiredNote = 'Consider using `appshot build --preset iphone-6-9,ipad-13` for required App Store resolutions.';
|
|
103
|
+
if (!warnings.find(w => w.includes('required App Store resolutions'))) {
|
|
104
|
+
warnings.push(requiredNote);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
valid: issues.length === 0,
|
|
109
|
+
issues,
|
|
110
|
+
warnings,
|
|
111
|
+
stats: {
|
|
112
|
+
totalScreenshots,
|
|
113
|
+
deviceCounts,
|
|
114
|
+
languageCounts
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Validate output directory
|
|
120
|
+
*/
|
|
121
|
+
export async function validateOutputDirectory(outputPath, requireEmpty = false) {
|
|
122
|
+
const issues = [];
|
|
123
|
+
const warnings = [];
|
|
124
|
+
try {
|
|
125
|
+
await fs.access(outputPath);
|
|
126
|
+
if (requireEmpty) {
|
|
127
|
+
const contents = await fs.readdir(outputPath);
|
|
128
|
+
if (contents.length > 0) {
|
|
129
|
+
warnings.push(`Output directory is not empty: ${outputPath}. ` +
|
|
130
|
+
'Use --clean to remove existing files.');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Directory doesn't exist, which is fine - we'll create it
|
|
136
|
+
}
|
|
137
|
+
// Check if we can write to the parent directory or create it
|
|
138
|
+
const parentDir = path.dirname(outputPath);
|
|
139
|
+
// Find the nearest existing ancestor directory
|
|
140
|
+
let checkDir = parentDir;
|
|
141
|
+
let foundExistingDir = false;
|
|
142
|
+
while (checkDir && checkDir !== path.dirname(checkDir)) {
|
|
143
|
+
try {
|
|
144
|
+
await fs.access(checkDir);
|
|
145
|
+
foundExistingDir = true;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// Move up to parent
|
|
150
|
+
checkDir = path.dirname(checkDir);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// If we found an existing directory, check if it's writable
|
|
154
|
+
if (foundExistingDir) {
|
|
155
|
+
try {
|
|
156
|
+
await fs.access(checkDir, fs.constants.W_OK);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
issues.push(`Cannot write to directory: ${checkDir}`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
// No parent directory found at all (shouldn't happen on normal systems)
|
|
164
|
+
issues.push(`No writable parent directory found for: ${outputPath}`);
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
valid: issues.length === 0,
|
|
168
|
+
issues,
|
|
169
|
+
warnings
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Check if a path is safe to clean (not a system directory)
|
|
174
|
+
*/
|
|
175
|
+
export function isSafeToClean(targetPath) {
|
|
176
|
+
const normalizedPath = path.resolve(targetPath);
|
|
177
|
+
const unsafePaths = [
|
|
178
|
+
'/',
|
|
179
|
+
'/Users',
|
|
180
|
+
'/System',
|
|
181
|
+
'/Applications',
|
|
182
|
+
'/Library',
|
|
183
|
+
'/usr',
|
|
184
|
+
'/bin',
|
|
185
|
+
'/sbin',
|
|
186
|
+
'/etc',
|
|
187
|
+
'/var',
|
|
188
|
+
'/tmp',
|
|
189
|
+
process.env.HOME || '',
|
|
190
|
+
path.resolve('.'), // Current directory
|
|
191
|
+
path.resolve('..') // Parent directory
|
|
192
|
+
].filter(Boolean);
|
|
193
|
+
// Check if path is a system directory
|
|
194
|
+
if (unsafePaths.includes(normalizedPath)) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
// Check if path is too short (likely a mistake)
|
|
198
|
+
const pathDepth = normalizedPath.split(path.sep).filter(Boolean).length;
|
|
199
|
+
if (pathDepth < 2) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
// Check if it's in the project directory
|
|
203
|
+
const projectRoot = process.cwd();
|
|
204
|
+
if (!normalizedPath.startsWith(projectRoot)) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=export-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-validator.js","sourceRoot":"","sources":["../../src/services/export-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAanE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAc,EACd,SAA8B,EAC9B,gBAA2B;IAE3B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,YAAY,GAA2B,EAAE,CAAC;IAChD,MAAM,cAAc,GAA2B,EAAE,CAAC;IAElD,gCAAgC;IAChC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,IAAI,CAAC,+BAA+B,MAAM,EAAE,CAAC,CAAC;QACrD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC5C,CAAC;IAED,qDAAqD;IACrD,MAAM,cAAc,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,oBAAoB,GAAG,c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MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IACxE,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IACzC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a Deliverfile for Fastlane
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateDeliverfile(languages: string[], screenshotsPath?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate a Fastlane lane for appshot integration
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateFastfileLane(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Generate a README for Fastlane integration
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateFastlaneReadme(languages: string[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate a .gitignore for Fastlane directory
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateFastlaneGitignore(): string;
|
|
17
|
+
//# sourceMappingURL=fastlane-config-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fastlane-config-generator.d.ts","sourceRoot":"","sources":["../../src/services/fastlane-config-generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EAAE,EACnB,eAAe,GAAE,MAAwB,GACxC,MAAM,CAqCR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA6I7C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAwHlE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CA6BlD"}
|