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

Method _run

packages/insomnia/bin/yarn-standalone.js:105811–105830  ·  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

105809 */
105810
105811 _run(cb) {
105812 this.done = cb;
105813
105814 // Once user confirm (enter key)
105815 var events = observe(this.rl);
105816 var submit = events.line.pipe(map(this.getCurrentValue.bind(this)));
105817
105818 var validation = this.handleSubmitEvents(submit);
105819 validation.success.forEach(this.onEnd.bind(this));
105820 validation.error.forEach(this.onError.bind(this));
105821
105822 events.keypress
105823 .pipe(takeUntil(validation.success))
105824 .forEach(this.onKeypress.bind(this));
105825
105826 // Init the prompt
105827 this.render();
105828
105829 return this;
105830 }
105831
105832 /**
105833 * 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