Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* exitOnError controls whether the app will exit when an uncaught exception or unhandled rejection occurs.
*
* exitOnError can be set to false in order to run tests on the error handling.
* In general, though, it should be left on. In some cases, by the time the
* process trap is invoked, the runtime is not in a good state to continue.
*/
public exitOnError: boolean = true;
protected errorsHandled: boolean = false;
protected logger: Logger = new ContextLogger("app");
protected lastEvent: events.BrigadeEvent;
protected projectID: string;
protected projectNS: string;
// On project loading error, this value may be passed. In all other cases,
// it is overwritten by an actual project.
protected proj: events.Project = new events.Project();
// true if the "after" event has fired.
protected afterHasFired: boolean = false;
protected storageIsDestroyed: boolean = false;
/**
* loadProject is a function that loads projects.
*/
public loadProject: ProjectLoader = k8s.loadProject;
/**
* buildStorage controls the per-build storage layer.
*/
public buildStorage: BuildStorage = new k8s.BuildStorage();
protected exitCode: number = 0;
/**