Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { logger } from '@/utils' import { Project, Effect, EffectOptions } from '@/internal' interface OutdatedOptions { cwd?: string effect?: EffectOptions } export default async(options: OutdatedOptions = {}) => { const cwd = options.cwd || process.cwd() Effect.replace(options.effect) const project = await Project.load(cwd) const repo = await project.getTemplateRepo() Iif (await repo.isVerioning()) { throw new Error('`mili outdated` cannot check the template without version control') } else Iif (await repo.isLatest()) { logger.info('Congratulations, the current template is the latest version.') } else { logger.warn([ '', '', 'Project Mili Template Is Outdated', 'run `npx mili upgrade` to upgrade template', '', '', ].join('\n')) } } |