Comments (16)
Got it. This one's... gnarly. Will try to work on it some more soon.
from vorpal.
This problem still exists and breaks the REPL
from vorpal.
Yikes! Okay will check out.
from vorpal.
Hi Team,
Is above issue solved?
from vorpal.
Issue is still present.
from vorpal.
Hey Scott - sorry I haven't been very active recently. A lot of things are changing in life right now, so I haven't had too much time for OSS. Hope to get back fairly soon and close all these issues.
Otherwise, all your help's been very appreciated. I wouldn't mind adding you to the Vorpal team, if you're down with that.
from vorpal.
Don't worry about it; that's how open source is sometimes. You contribute
when you can, and mostly when you need it yourself. ;)
I would appreciate the abilities to accept pull requests and deploy code to
npm if possible.
from vorpal.
Okay Scott, giving you access now.
Feel free to make any patches you need, obviously add tests as you go. Just check with me before committing anything that alters the API, or any breaking changes.
Thanks for all your help!
from vorpal.
Okay this should be good now. Can you please try it? v1.5.2
from vorpal.
No luck.
C17PR768G8WP:cli shovestadt$ cli
cli:
function (str) {
if (str === undefined) {
return this._delimiter;
}
this._delimiter = String(str).trim() + ' ';
if (this.isLocal()) {
this.parent.ui.refresh();
} else {
this.parent._send('vantage-delimiter-downstream', 'downstream', {value: str, sessionId: this.id});
}
return this;
}
function (str) {
if (str === undefined) {
return this._delimiter;
}
this._delimiter = String(str).trim() + ' ';
if (this.isLocal()) {
this.parent.ui.refresh();
} else {
this.parent._send('vantage-delimiter-downstream', 'downstream', {value: str, sessionId: this.id});
}
return this;
Username: test
Password:
^C/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:75
throw e;
^
TypeError: Cannot read property 'removeListener' of null
at [object Object].UI.close (/usr/local/lib/node_modules/cli/node_modules/inquirer/lib/ui/baseUI.js:45:10)
at [object Object].PromptUI.onCompletion (/usr/local/lib/node_modules/cli/node_modules/inquirer/lib/ui/prompt.js:54:8)
at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:1550:12)
at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:1489:14)
at Subject.Rx.Subject.addProperties.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:5871:19)
at Subject.tryCatcher (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:63:31)
at AutoDetachObserverPrototype.completed (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:5796:56)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:1489:14)
at AutoDetachObserver.tryCatcher (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:63:31)
at AutoDetachObserverPrototype.completed (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:5796:56)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:1489:14)
at InnerObserver.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:2966:65)
at InnerObserver.tryCatcher (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:63:31)
at AutoDetachObserverPrototype.completed (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:5796:56)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:1489:14)
at AutoDetachObserver.tryCatcher (/usr/local/lib/node_modules/cli/node_modules/rx-lite/rx.lite.js:63:31)
from vorpal.
Can you show me the code with the inquirer prompt?
from vorpal.
// Login command only available in CLI, requires user input.
vorpal
.command('login [userKey] [userSecret]')
.description('Set user key and user secret key.')
.action(function(args, callback) {
this.prompt([
{
type: 'input',
name: 'userKey',
message: 'User key: ',
validate: (input) => {
return input.length > 10;
}
},
{
type: 'input',
name: 'userSecret',
message: 'User secret key: ',
validate: (input) => {
return input.length > 20;
}
}
], (answers) => {
self.userKey = self.commands.userKey = answers.userKey;
self.userSecret = self.commands.userSecret = answers.userSecret;
callback();
});
});
}
from vorpal.
Thanks. Checking it out.
from vorpal.
Oh - haha - it only breaks on multi-inputs. Looks like the Inquirer cancellation doesn't handle an array of inputs.
from vorpal.
Ugh. Cancelling inquirer prompts is literally the messiest part of my code, because Inquirer doesn't support command cancellation, so I have to hack it. This is going to take longer to fix.
from vorpal.
Running into this as well... where's the like button? 👍
from vorpal.
Related Issues (20)
- Wait for promise
- Current project status HOT 7
- Compatibility with Node v11 HOT 1
- Support for default values dropped ?
- Vorpal + Vim ? An ability to launch interactive cli app from the vorpal app
- command.log like console.table()
- access raw unparsed command ? HOT 1
- Complex inputs renders weird stuff to the screen HOT 1
- Run script of my vorpal commands does not work on async functions HOT 2
- How to make sub commands without the multi-word command feature?
- vi command edit mode, aka set -o vi
- Results of running example code is different from example. The Version is 1.12.0 HOT 1
- types for localstorage wrong HOT 1
- Plural forms, shortened words or alternatives in the command string.
- Arguments with `=` (equals sign) in them are parsed incorrectly HOT 2
- New vulnerabilities in used old dependencies: inquirer & lodash HOT 3
- How to auto restart vorpal after any change to source code?
- Deno support? HOT 2
- can I override the exit command?
- command.after seems to do nothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vorpal.