* Updates the progress state with a new message.
(message, { isComposeMessage = false } = {})
| 500 | * Updates the progress state with a new message. |
| 501 | */ |
| 502 | notice(message, { isComposeMessage = false } = {}) { |
| 503 | if (!renderer.isInteractive) { |
| 504 | writeStdErr({ level: 'info', messageTokens: [message] }) |
| 505 | return |
| 506 | } |
| 507 | if (renderer.state.progressTasks.has(this.namespace) === undefined) { |
| 508 | throw new Error( |
| 509 | `Progress state with name ${this.namespace} does not exist.`, |
| 510 | ) |
| 511 | } |
| 512 | this.message = message |
| 513 | writeProgress({ namespace: this.namespace, isComposeMessage }) |
| 514 | } |
| 515 | |
| 516 | /** |
| 517 | * Removes the progress state and the namespace from the renderer instance. |
no test coverage detected