avocadowastaken/rapidbundle

View on GitHub
src/ctx.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export type TaskContext = {
  cwd: string;
  ci: boolean;
  noTTY: boolean;
};

export function createTaskContext(currentProcess: NodeJS.Process): TaskContext {
  return {
    cwd: currentProcess.cwd(),
    ci: !!currentProcess.env["CI"],
    noTTY: !!currentProcess.env["NO_TTY"],
  };
}