Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public get autorest(): AutoRest {
if (!this._autoRest) {
this._autoRest = new AutoRest(this, this.configurationFile);
this._autoRest.AddConfiguration({ "output-artifact": ["swagger-document", "swagger-document.map"] });
this.Manager.listenForResults(this._autoRest);
this.autorest.GeneratedFile.Subscribe((instance, artifact) => {
this._outputs.set(artifact.uri, artifact.content);
})
this._autoRest.Finished.Subscribe((autorest, success) => {
this.cancel = () => true;
if (success) {
this.FlushDiagnostics(true);
this.ClearDiagnostics();
}
this.Manager.verbose(`AutoRest Process Finished with '${success}'.`);
})
}