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

Method _run

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

70253 */
70254
70255 _run(cb) {
70256 this.done = cb;
70257
70258 // Once user confirm (enter key)
70259 var events = observe(this.rl);
70260 var submit = events.line.pipe(map(this.filterInput.bind(this)));
70261
70262 var validation = this.handleSubmitEvents(submit);
70263 validation.success.forEach(this.onEnd.bind(this));
70264 validation.error.forEach(this.onError.bind(this));
70265
70266 events.keypress
70267 .pipe(takeUntil(validation.success))
70268 .forEach(this.onKeypress.bind(this));
70269
70270 // Init
70271 this.render();
70272
70273 return this;
70274 }
70275
70276 /**
70277 * 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