fix(core): update
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import * as plugins from './smartinteract.plugins';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import { AnswerBucket } from './smartinteract.classes.answerbucket';
|
||||
import * as plugins from './smartinteract.plugins.js';
|
||||
import { AnswerBucket } from './smartinteract.classes.answerbucket.js';
|
||||
|
||||
/**
|
||||
* the availeable question types
|
||||
@@ -79,9 +78,9 @@ export class SmartInteract {
|
||||
* skips the queue
|
||||
*/
|
||||
askQuestion(optionsArg: IQuestionObject): Promise<IAnswerObject> {
|
||||
const done = smartpromise.defer<IAnswerObject>();
|
||||
const done = plugins.smartpromise.defer<IAnswerObject>();
|
||||
if (this.isValidEnv()) {
|
||||
plugins.inquirer
|
||||
plugins.inquirer.default
|
||||
.prompt([
|
||||
{
|
||||
name: optionsArg.name,
|
||||
@@ -94,7 +93,7 @@ export class SmartInteract {
|
||||
])
|
||||
.then((answers) => {
|
||||
// adjust to the fact that now dots define paths for inquirer
|
||||
const answerValue = plugins.smartparam.smartGet(answers, optionsArg.name);
|
||||
const answerValue = plugins.smartobject.smartGet(answers, optionsArg.name);
|
||||
done.resolve({
|
||||
name: optionsArg.name,
|
||||
value: answerValue,
|
||||
@@ -125,7 +124,7 @@ export class SmartInteract {
|
||||
* run the question queue
|
||||
*/
|
||||
runQueue() {
|
||||
const done = smartpromise.defer<AnswerBucket>();
|
||||
const done = plugins.smartpromise.defer<AnswerBucket>();
|
||||
const answerBucket = new AnswerBucket();
|
||||
const handleQuestion = async () => {
|
||||
if (!this.questionMap.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user