Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@inject(ApplicationProjectOptions) readonly options: ApplicationProjectOptions,
@inject(FileSystemWatcherServer) protected readonly fileSystemWatcher: FileSystemWatcherServer,
@inject(ILogger) protected readonly logger: ILogger,
@inject(NpmClient) protected readonly npmClient: NpmClient,
) {
logger.debug('AppProjectOptions', options);
this.registry = new NpmRegistry({
watchChanges: this.options.watchRegistry
});
this.backup();
this.packageUri = FileUri.create(this.packagePath).toString();
this.toDispose.push(this.fileSystemWatcher);
this.fileSystemWatcher.setClient({
onDidFilesChanged: changes => this.onDidFilesChanged(changes)
});
this.fileSystemWatcher.watchFileChanges(this.packageUri).then(watcher =>
this.toDispose.push(Disposable.create(() =>
this.fileSystemWatcher.unwatchFileChanges(watcher)
))
);
this.toDispose.push(this.onWillInstallEmitter);
this.toDispose.push(this.onDidInstallEmitter);
}