fix(core): update

This commit is contained in:
2023-07-13 14:07:12 +02:00
parent 0acb00c9c4
commit db268d4fad
15 changed files with 2358 additions and 12436 deletions

View File

@@ -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()) {