chore(cli): upgrade npm dependencies

This commit is contained in:
LongYinan 2022-07-06 21:08:29 +08:00
parent 2bc9218547
commit 5cfff2ad5c
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
7 changed files with 988 additions and 1040 deletions

View file

@ -3,7 +3,7 @@ import { join } from 'path'
import chalk from 'chalk'
import { Command, Option } from 'clipanion'
import inquirer, { prompt } from 'inquirer'
import inquirer from 'inquirer'
import { CreateNpmDirCommand } from '../create-npm-dir'
import { debugFactory } from '../debug'
@ -75,7 +75,7 @@ export class NewProjectCommand extends Command {
if (!this.dirname) {
const [scope, name] = this.name?.split('/') ?? []
const defaultProjectDir = name ?? scope
const dirAnswer = await prompt({
const dirAnswer = await inquirer.prompt({
type: 'input',
name: DIR_PROMOTE_NAME,
default: defaultProjectDir,
@ -222,7 +222,7 @@ edition = "2021"
private async getName() {
if (!this.name) {
const nameAnswer = await prompt({
const nameAnswer = await inquirer.prompt({
type: 'input',
name: NAME_PROMOTE_NAME,
suffix: ' (The name filed in your package.json)',

View file

@ -2,7 +2,7 @@ import { join } from 'path'
import chalk from 'chalk'
import { Command, Option } from 'clipanion'
import { prompt } from 'inquirer'
import inquirer from 'inquirer'
import { load, dump } from 'js-yaml'
import { debugFactory } from './debug'
@ -46,7 +46,7 @@ export class RenameCommand extends Command {
const name =
this.name ??
(
await prompt({
await inquirer.prompt({
name: 'name',
type: 'input',
suffix: chalk.dim(' name field in package.json'),
@ -55,7 +55,7 @@ export class RenameCommand extends Command {
const napiName =
this.napiName ??
(
await prompt({
await inquirer.prompt({
name: 'napi name',
type: 'input',
default: name.split('/')[1],
@ -67,7 +67,7 @@ export class RenameCommand extends Command {
const repository =
this.repository ??
(
await prompt({
await inquirer.prompt({
name: 'repository',
type: 'input',
suffix: chalk.dim(' Leave empty to skip'),
@ -79,7 +79,7 @@ export class RenameCommand extends Command {
const description =
this.description ??
(
await prompt({
await inquirer.prompt({
name: 'description',
type: 'input',
suffix: chalk.dim(' Leave empty to skip'),