MCPcopy
hub / github.com/triggerdotdev/trigger.dev / table

Method table

packages/cli-v3/src/utilities/logger.ts:66–77  ·  view source on GitHub ↗
(data: TableRow<Keys>[], level?: Exclude<LoggerLevel, "none">)

Source from the content-addressed store, hash-verified

64 warn = (...args: unknown[]) => this.doLog("warn", args);
65 error = (...args: unknown[]) => this.doLog("error", args);
66 table<Keys extends string>(data: TableRow<Keys>[], level?: Exclude<LoggerLevel, "none">) {
67 const keys: Keys[] = data.length === 0 ? [] : (Object.keys(data[0]!) as Keys[]);
68 const t = new CLITable({
69 head: keys,
70 style: {
71 head: chalk.level ? ["blue"] : [],
72 border: chalk.level ? ["gray"] : [],
73 },
74 });
75 t.push(...data.map((row) => keys.map((k) => row[k])));
76 return this.doLog(level ?? "log", [t.toString()]);
77 }
78
79 private doLog(messageLevel: Exclude<LoggerLevel, "none">, args: unknown[]) {
80 const message = this.formatMessage(messageLevel, format(...args));

Callers 3

printUpdateTableFunction · 0.45
tableFunction · 0.45
hasUserConfirmedFunction · 0.45

Calls 3

doLogMethod · 0.95
keysMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected