Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async Activate(): Promise {
// tell autorest that it's view needs to be re-created.
this.Manager.verbose(`Invalidating Autorest view.`);
this.autorest.Invalidate();
// if there is a process() running, kill it.
this.cancel();
// reaquire the config file.
this.autorest.configFileUri = await AutoRest.DetectConfigurationFile(this, this.RootUri);
// if autorest is about to restart the work, stop that
// so we can push it out a bit more.
if (this._readyToRun) {
clearTimeout(this._readyToRun);
this._readyToRun = null;
}
return await this.RunAutoRest();
}