How to use the titanium-editor-commons.updates.checkAllUpdates function in titanium-editor-commons

To help you get started, we’ve selected a few titanium-editor-commons 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 appcelerator / vscode-appcelerator-titanium / src / explorer / updatesExplorer.ts View on Github external
public async refresh (): Promise {
		this.checkingForUpdates = true;
		this._onDidChangeTreeData.fire();
		try {
			this.updates = await updates.checkAllUpdates();
		} catch (error) {
			let message = 'Failed to check for updates';
			// Need to check in string as titaniumlib currently returns a string as the error
			if (error.code === 'ENOTFOUND' || /ENOTFOUND/.test(error)) {
				message = `${message} as you are offline`;
			}
			await vscode.window.showErrorMessage(message);
		}
		this.checkingForUpdates = false;
		this._onDidChangeTreeData.fire();
		if (this.updates.length) {
			ExtensionContainer.context.globalState.update(GlobalState.HasUpdates, true);
			vscode.commands.executeCommand('setContext', GlobalState.HasUpdates, true);
		}
	}

titanium-editor-commons

`titanium-editor-commons` is a commons library for the [Atom](https://github.com/appcelerator/atom-appcelerator-titanium) and [VS Code](https://github.com/appcelerator/vscode-appcelerator-titanium) editor plugins for [Titanium SDK](https://github.com/appc

Apache-2.0
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages