How to use the prompts.message function in prompts

To help you get started, we’ve selected a few prompts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VKCOM / vk-miniapps-deploy / index.js View on Github external
const packageJson = require('./package.json');
const chalk = require('chalk');
const prompt = require('prompts');
const fetch = require('node-fetch');
const { zip } = require('zip-a-folder');
const fs = require('fs-extra');
const FormData = require('form-data');
const Configstore = require('configstore');
const vault = new Configstore(packageJson.name, {});

var configJSON = require('require-module')('./vk-hosting-config.json');
var cfg = configJSON || {};
prompt.message = "vk-mini-apps-deploy".grey;
prompt.delimiter = "=>".grey;

const API_HOST = cfg.api_host || 'https://api.vk.com/method/';
const OAUTH_HOST = cfg.oauth_host || 'https://oauth.vk.com/';

const API_VERSION = '5.101';
const DEPLOY_APP_ID = 6670517;

const CLIENT_VERSION = 2;

const APPLICATION_ENV_DEV = 1;
const APPLICATION_ENV_PRODUCTION = 2;

const CODE_SUCCESS = 200;
const CODE_DEPLOY = 201;
const CODE_SKIP = 202;