1import path from 'path'; 2 3import { EXPOTOOLS_DIR } from '../Constants'; 4import { ReleaseType } from './types'; 5 6/** 7 * File name of the backup file. 8 */ 9export const BACKUP_FILE_NAME = 'publish-packages.backup.json'; 10 11/** 12 * Absolute path to the backup file. 13 */ 14export const BACKUP_PATH = path.join(EXPOTOOLS_DIR, 'cache', BACKUP_FILE_NAME); 15 16/** 17 * Time in milliseconds after which the backup is treated as no longer valid. 18 */ 19export const BACKUP_EXPIRATION_TIME = 30 * 60 * 1000; // 30 minutes 20 21/** 22 * An array of option names that are stored in the backup and 23 * are required to stay the same to use the backup at next call. 24 */ 25export const BACKUPABLE_OPTIONS_FIELDS = [ 26 'packageNames', 27 'prerelease', 28 'tag', 29 'commitMessage', 30 'dry', 31] as const; 32 33/** 34 * An array of directories treated as containing native code. 35 */ 36export const NATIVE_DIRECTORIES = ['ios', 'android', 'cpp']; 37 38/** 39 * An array of release types in the order from patch to major. 40 */ 41export const RELEASE_TYPES_ASC_ORDER = [ReleaseType.PATCH, ReleaseType.MINOR, ReleaseType.MAJOR]; 42