1import * as _ from 'lodash-es' 4// Quiet mode context - reduces output when running programmatic tests 5export const quietModeCtx = genContext<{quiet: boolean}>() 7// Multi-deploy context - skip log streaming when multiple deploys run sequentially 8// (streaming blocks forever waiting for logs, preventing subsequent deploys) 9export const multiDeployCtx = genContext<{skipStreamLogs: boolean}>() 11// Wrap async fn to print '.' every intervalMs while running (for long ops like docker build/push) 12export const withProgressDots = async <T,>(fn: () => Promise<T>, intervalMs = 10_000): Promise<T> => { 13 const timer = setInterval(() => process.stdout.write('.'), intervalMs) 21type PrintDeployedUrlProps = { action?: string, kubeExtUrl?: string, nodePortUrl?: string } 23export const printDeployedUrl = ({action, kubeExtUrl, nodePortUrl}: PrintDeployedUrlProps) => { 24 if (!_.includes(['apply', 'info'], action)) return 25 const url = kubeExtUrl || nodePortUrl 26 if (url) console.log(`\nApp available at ${url}`)