MCPcopy
hub / github.com/serverless/serverless / notice

Method notice

packages/util/src/logger/index.js:502–514  ·  view source on GitHub ↗

* Updates the progress state with a new message.

(message, { isComposeMessage = false } = {})

Source from the content-addressed store, hash-verified

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.

Callers 3

createMethod · 0.95
updateMethod · 0.95
infoMethod · 0.95

Calls 2

writeStdErrFunction · 0.85
writeProgressFunction · 0.85

Tested by

no test coverage detected