update checker middleware

This commit is contained in:
2024-06-13 19:41:05 +01:00
parent 9204eb81be
commit 04412d7cbc
3 changed files with 16 additions and 13 deletions
+3
View File
@@ -4,6 +4,8 @@ import { input, select } from '@inquirer/prompts'
import clone from 'git-clone'
import path from 'node:path'
import { checkForUpdate } from '../utils/update'
function builder(yargs: Argv) {
return yargs
.option('projectName', {
@@ -18,6 +20,7 @@ function builder(yargs: Argv) {
type: 'string',
demandOption: false,
})
.middleware(async () => await checkForUpdate())
}
async function handler(args: ArgumentsCamelCase) {