[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

[ci] format

authored by

natemoo-re and committed by
github-actions[bot]
(Dec 19, 2024, 6:50 PM UTC) 61200702 801246ba

+14 -5
+8 -4
packages/core/src/prompts/prompt.ts
··· 122 122 return resolve(CANCEL_SYMBOL); 123 123 } 124 124 125 - this._abortSignal.addEventListener('abort', () => { 126 - this.state = 'cancel'; 127 - this.close(); 128 - }, { once: true }); 125 + this._abortSignal.addEventListener( 126 + 'abort', 127 + () => { 128 + this.state = 'cancel'; 129 + this.close(); 130 + }, 131 + { once: true } 132 + ); 129 133 } 130 134 131 135 const sink = new WriteStream(0);
+6 -1
packages/core/test/prompts/prompt.test.ts
··· 253 253 const abortController = new AbortController(); 254 254 abortController.abort(); 255 255 256 - const instance = new Prompt({ input, output, render: () => 'foo', signal: abortController.signal }); 256 + const instance = new Prompt({ 257 + input, 258 + output, 259 + render: () => 'foo', 260 + signal: abortController.signal, 261 + }); 257 262 instance.prompt(); 258 263 259 264 expect(instance.state).to.equal('cancel');