Beta groups from apple.testflight.groups (created when missing, never changed), testers from a CSV in .storebound/ (masked in logs, confirmation before Apple emails invitations, --remove / --invite), What to Test per locale from the App Store listing (whatToTest or whatsNew), Test Information and Beta App Review details, builds by exact number to groups, Beta App Review submission behind --submit-review and a confirmation. Pure planners in cli/lib/testflight.ts, shared CSV / table / JSON:API helpers. MCP: apple_testflight_status, _groups, _what_to_test, _info, _distribute (internal groups only). Skill testflight.
38 lines
1.8 KiB
TypeScript
38 lines
1.8 KiB
TypeScript
// Copies the templates into the current project without overwriting anything, and makes sure .storebound/ is ignored.
|
|
// storebound init [--dir .]
|
|
import { appendFileSync, copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
import { dirname, join, resolve } from 'node:path';
|
|
import type { Args } from './lib/args';
|
|
import { log } from './lib/log';
|
|
|
|
const T = join(import.meta.dir, '..', 'templates');
|
|
const FILES: [string, string][] = [
|
|
['storebound.config.ts', 'storebound.config.ts'],
|
|
['listing.md', 'store/listing.md'],
|
|
['appstore.md', 'store/appstore.md'],
|
|
['shots-copy.json', 'store/shots/copy.json'],
|
|
['app-privacy.md', 'store/app-privacy.md'],
|
|
['declarations.md', 'store/declarations.md'],
|
|
['privacy-policy.html', 'store/privacy-policy.html'],
|
|
['credentials.example.json', '.storebound/credentials.json'],
|
|
['testers.csv', '.storebound/testers.csv'],
|
|
];
|
|
|
|
export async function run(args: Args): Promise<void> {
|
|
const root = resolve(args.str('dir', '.'));
|
|
for (const [from, to] of FILES) {
|
|
const dest = join(root, to);
|
|
if (existsSync(dest)) { log('init', `keep ${to} (exists)`); continue; }
|
|
mkdirSync(dirname(dest), { recursive: true });
|
|
copyFileSync(join(T, from), dest);
|
|
log('init', `create ${to}`);
|
|
}
|
|
const gi = join(root, '.gitignore');
|
|
const cur = existsSync(gi) ? readFileSync(gi, 'utf8') : '';
|
|
if (!/^\/?\.storebound\/?$/m.test(cur)) {
|
|
if (cur) appendFileSync(gi, `${cur.endsWith('\n') ? '' : '\n'}# storebound: credentials, fonts, temp files\n.storebound/\n`);
|
|
else writeFileSync(gi, '# storebound: credentials, fonts, temp files\n.storebound/\n');
|
|
log('init', '.gitignore: added .storebound/');
|
|
}
|
|
log('init', 'next: edit storebound.config.ts and .storebound/credentials.json, then `storebound check`');
|
|
}
|