How to use the @theia/application-package.NpmRegistry function in @theia/application-package

To help you get started, we’ve selected a few @theia/application-package examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / extension-manager / src / node / application-project.ts View on Github external
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);
    }

@theia/application-package

Theia application package API.

EPL-2.0
Latest version published 4 days ago

Package Health Score

93 / 100
Full package analysis

Similar packages