Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
cfdd54eff1 | |||
741365d325 | |||
b36e95af1a | |||
ac9ef4915e | |||
6ca2e427ff | |||
39f9bb11fe | |||
8925f29962 | |||
2e862d6840 |
@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"npmGlobalTools": ["npmts"],
|
||||||
"npmts"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
}
|
||||||
}
|
}
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartinteract",
|
"name": "smartinteract",
|
||||||
"version": "2.0.0",
|
"version": "2.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartinteract",
|
"name": "@pushrocks/smartinteract",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "2.0.0",
|
"version": "2.0.4",
|
||||||
"description": "smart cli interaction",
|
"description": "smart cli interaction",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './smartinteract.plugins';
|
import * as plugins from './smartinteract.plugins';
|
||||||
import * as smartq from 'smartq';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import { Objectmap } from '@pushrocks/lik';
|
import { Objectmap } from '@pushrocks/lik';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,6 +15,9 @@ export type questionType =
|
|||||||
| 'password'
|
| 'password'
|
||||||
| 'editor';
|
| 'editor';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a choice
|
||||||
|
*/
|
||||||
export interface IChoiceObject {
|
export interface IChoiceObject {
|
||||||
name: string;
|
name: string;
|
||||||
value: any;
|
value: any;
|
||||||
@ -60,7 +63,7 @@ export class SmartInteract {
|
|||||||
* skips the queue
|
* skips the queue
|
||||||
*/
|
*/
|
||||||
askQuestion(optionsArg: IQuestionObject): Promise<IAnswerObject> {
|
askQuestion(optionsArg: IQuestionObject): Promise<IAnswerObject> {
|
||||||
let done = smartq.defer<IAnswerObject>();
|
let done = smartpromise.defer<IAnswerObject>();
|
||||||
if (this.isValidEnv()) {
|
if (this.isValidEnv()) {
|
||||||
plugins.inquirer
|
plugins.inquirer
|
||||||
.prompt([
|
.prompt([
|
||||||
@ -110,7 +113,7 @@ export class SmartInteract {
|
|||||||
* run the question queue
|
* run the question queue
|
||||||
*/
|
*/
|
||||||
runQueue() {
|
runQueue() {
|
||||||
let done = smartq.defer<AnswerBucket>();
|
let done = smartpromise.defer<AnswerBucket>();
|
||||||
let answerBucket = new AnswerBucket();
|
let answerBucket = new AnswerBucket();
|
||||||
let handleQuestion = async () => {
|
let handleQuestion = async () => {
|
||||||
if (!this.questionMap.isEmpty()) {
|
if (!this.questionMap.isEmpty()) {
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "tslint-config-standard"
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
}
|
"rules": {
|
||||||
|
"semicolon": [true, "always"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user