MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / prettyWarning

Function prettyWarning

packages/cli-v3/src/utilities/cliOutput.ts:91–112  ·  view source on GitHub ↗
(header: string, body?: string, footer?: string)

Source from the content-addressed store, hash-verified

89}
90
91export function prettyWarning(header: string, body?: string, footer?: string) {
92 const prefix = "Warning: ";
93 const indent = Array(prefix.length).fill(" ").join("");
94 const spacing = "\n\n";
95
96 const prettyPrefix = chalkWarning(prefix);
97
98 const withIndents = (text?: string) =>
99 text
100 ?.split("\n")
101 .map((line) => `${indent}${line}`)
102 .join("\n");
103
104 const prettyBody = withIndents(body);
105 const prettyFooter = withIndents(footer);
106
107 log.warn(
108 `${prettyPrefix}${header}${prettyBody ? `${spacing}${prettyBody}` : ""}${
109 prettyFooter ? `${spacing}${prettyFooter}` : ""
110 }`
111 );
112}

Callers 1

updateTriggerPackagesFunction · 0.85

Calls 4

ArrayInterface · 0.85
chalkWarningFunction · 0.85
withIndentsFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…