fix(striker-ui-api): add label to stdoutVar, simplify uuidgen

main
Tsu-ba-me 2 years ago
parent efc8832321
commit ab5ded03cf
  1. 6
      striker-ui-api/src/lib/shell.ts

@ -58,5 +58,7 @@ export const stderr = (message: string) => print(message, { stream: 'stderr' });
export const stdout = (message: string) => print(message);
export const stdoutVar = (variable: { [name: string]: unknown }) =>
print(`Variables: ${JSON.stringify(variable, null, 2)}`);
export const stdoutVar = (variable: unknown, label = 'Variables: ') =>
print(`${label}${JSON.stringify(variable, null, 2)}`);
export const uuid = () => uuidgen('--random').trim();

Loading…
Cancel
Save