MCPcopy
hub / github.com/Kong/insomnia / _run

Method _run

packages/insomnia/bin/yarn-standalone.js:105667–105689  ·  view source on GitHub ↗

* Start the Inquiry session * @param {Function} cb Callback when prompt is done * @return {this}

(cb)

Source from the content-addressed store, hash-verified

105665 */
105666
105667 _run(cb) {
105668 this.done = cb;
105669
105670 var events = observe(this.rl);
105671
105672 // Once user confirm (enter key)
105673 var submit = events.line.pipe(map(this.filterInput.bind(this)));
105674
105675 var validation = this.handleSubmitEvents(submit);
105676 validation.success.forEach(this.onEnd.bind(this));
105677 validation.error.forEach(this.onError.bind(this));
105678
105679 if (this.opt.mask) {
105680 events.keypress
105681 .pipe(takeUntil(validation.success))
105682 .forEach(this.onKeypress.bind(this));
105683 }
105684
105685 // Init
105686 this.render();
105687
105688 return this;
105689 }
105690
105691 /**
105692 * Render the prompt to screen

Callers

nothing calls this directly

Calls 5

renderMethod · 0.95
mapFunction · 0.85
takeUntilFunction · 0.85
handleSubmitEventsMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected