mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 12:39:24 +00:00
fix(cli): ⚡ clean eslinter
fix(cli): ⚡ clean eslinter
This commit is contained in:
@@ -1,10 +1,7 @@
|
|||||||
const prompts = require('prompts')
|
const prompts = require('prompts')
|
||||||
const { yellow, red } = require('kleur')
|
const { yellow, red } = require('kleur')
|
||||||
const { installAll } = require('../install')
|
|
||||||
const { cleanSession } = require('../clean')
|
|
||||||
const { copyBaseApp } = require('../create-app')
|
const { copyBaseApp } = require('../create-app')
|
||||||
const { checkNodeVersion, checkOs } = require('../check')
|
const { checkNodeVersion, checkOs } = require('../check')
|
||||||
const { jsonConfig } = require('../configuration')
|
|
||||||
|
|
||||||
const startInteractive = async () => {
|
const startInteractive = async () => {
|
||||||
const questions = [
|
const questions = [
|
||||||
@@ -51,42 +48,36 @@ const startInteractive = async () => {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
const response = await prompts(questions, { onCancel })
|
const response = await prompts(questions, { onCancel })
|
||||||
const {
|
const { outDir = '', providerDb = [], providerWs = [] } = response
|
||||||
dependencies = '',
|
|
||||||
cleanTmp = '',
|
|
||||||
outDir = '',
|
|
||||||
providerDb = [],
|
|
||||||
providerWs = [],
|
|
||||||
} = response
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* Question
|
* Question
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const installOrUdpateDep = async () => {
|
// const installOrUdpateDep = async () => {
|
||||||
const answer = dependencies.toLowerCase() || 'n'
|
// const answer = dependencies.toLowerCase() || 'n'
|
||||||
if (answer.includes('n')) return true
|
// if (answer.includes('n')) return true
|
||||||
|
|
||||||
if (answer.includes('y')) {
|
// if (answer.includes('y')) {
|
||||||
await installAll()
|
// await installAll()
|
||||||
return true
|
// return true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* Question
|
* Question
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const cleanAllSession = async () => {
|
// const cleanAllSession = async () => {
|
||||||
const answer = cleanTmp.toLowerCase() || 'n'
|
// const answer = cleanTmp.toLowerCase() || 'n'
|
||||||
if (answer.includes('n')) return true
|
// if (answer.includes('n')) return true
|
||||||
|
|
||||||
if (answer.includes('y')) {
|
// if (answer.includes('y')) {
|
||||||
await cleanSession()
|
// await cleanSession()
|
||||||
return true
|
// return true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crear una app (copiar plantilla)
|
* Crear una app (copiar plantilla)
|
||||||
|
|||||||
Reference in New Issue
Block a user