mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
tsfmt - src
This commit is contained in:
@@ -31,7 +31,7 @@ export function main(argv: string[]): TPromise<void> {
|
||||
if (args.help) {
|
||||
console.log(buildHelpMessage(product.nameLong, product.applicationName, pkg.version));
|
||||
} else if (args.version) {
|
||||
console.log(`${ pkg.version }\n${ product.commit }`);
|
||||
console.log(`${pkg.version}\n${product.commit}`);
|
||||
} else if (shouldSpawnCliProcess(args)) {
|
||||
const mainCli = new TPromise<IMainCli>(c => require(['vs/code/node/cliProcessMain'], c));
|
||||
return mainCli.then(cli => cli.main(args));
|
||||
|
||||
@@ -30,24 +30,24 @@ import { RequestService } from 'vs/platform/request/node/requestService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConfigurationService } from 'vs/platform/configuration/node/configurationService';
|
||||
import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender';
|
||||
import {mkdirp} from 'vs/base/node/pfs';
|
||||
import { mkdirp } from 'vs/base/node/pfs';
|
||||
|
||||
const notFound = id => localize('notFound', "Extension '{0}' not found.", id);
|
||||
const notInstalled = id => localize('notInstalled', "Extension '{0}' is not installed.", id);
|
||||
const useId = localize('useId', "Make sure you use the full extension ID, including the publisher, eg: {0}", 'ms-vscode.csharp');
|
||||
|
||||
function getId(manifest: IExtensionManifest): string {
|
||||
return `${ manifest.publisher }.${ manifest.name }`;
|
||||
return `${manifest.publisher}.${manifest.name}`;
|
||||
}
|
||||
|
||||
type Task = { ():TPromise<void> };
|
||||
type Task = { (): TPromise<void> };
|
||||
|
||||
class Main {
|
||||
|
||||
constructor(
|
||||
@IExtensionManagementService private extensionManagementService: IExtensionManagementService,
|
||||
@IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService
|
||||
) {}
|
||||
) { }
|
||||
|
||||
run(argv: ParsedArgs): TPromise<any> {
|
||||
// TODO@joao - make this contributable
|
||||
@@ -110,7 +110,7 @@ class Main {
|
||||
const [extension] = result.firstPage;
|
||||
|
||||
if (!extension) {
|
||||
return TPromise.wrapError(`${ notFound(id) }\n${ useId }`);
|
||||
return TPromise.wrapError(`${notFound(id)}\n${useId}`);
|
||||
}
|
||||
|
||||
console.log(localize('foundExtension', "Found '{0}' in the marketplace.", id));
|
||||
@@ -131,7 +131,7 @@ class Main {
|
||||
const [extension] = installed.filter(e => getId(e.manifest) === id);
|
||||
|
||||
if (!extension) {
|
||||
return TPromise.wrapError(`${ notInstalled(id) }\n${ useId }`);
|
||||
return TPromise.wrapError(`${notInstalled(id)}\n${useId}`);
|
||||
}
|
||||
|
||||
console.log(localize('uninstalling', "Uninstalling {0}...", id));
|
||||
|
||||
@@ -30,8 +30,8 @@ import { TelemetryAppenderChannel } from 'vs/platform/telemetry/common/telemetry
|
||||
import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender';
|
||||
import { ISharedProcessInitData } from './sharedProcess';
|
||||
import {IChoiceService} from 'vs/platform/message/common/message';
|
||||
import {ChoiceChannelClient} from 'vs/platform/message/common/messageIpc';
|
||||
import { IChoiceService } from 'vs/platform/message/common/message';
|
||||
import { ChoiceChannelClient } from 'vs/platform/message/common/messageIpc';
|
||||
import { WindowEventChannelClient } from 'vs/code/common/windowsIpc';
|
||||
import { IWindowEventService, ActiveWindowManager } from 'vs/code/common/windows';
|
||||
|
||||
@@ -66,7 +66,7 @@ function main(server: Server, initData: ISharedProcessInitData): void {
|
||||
services.set(IConfigurationService, new SyncDescriptor(ConfigurationService));
|
||||
services.set(IRequestService, new SyncDescriptor(RequestService));
|
||||
|
||||
const windowEventService:IWindowEventService = new WindowEventChannelClient(server.getChannel('windowEvent', {
|
||||
const windowEventService: IWindowEventService = new WindowEventChannelClient(server.getChannel('windowEvent', {
|
||||
routeCall: (command: any, arg: any) => {
|
||||
return 'main';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user