diff --git a/plugins/task-plugin/.gitignore b/plugins/task-plugin/.gitignore new file mode 100644 index 000000000..9b2253699 --- /dev/null +++ b/plugins/task-plugin/.gitignore @@ -0,0 +1,4 @@ +dist/ +lib/ +node_modules/ +*.theia diff --git a/plugins/task-plugin/README.md b/plugins/task-plugin/README.md new file mode 100644 index 000000000..cf99d7677 --- /dev/null +++ b/plugins/task-plugin/README.md @@ -0,0 +1,31 @@ +# Theia - Che Task Plug-in + +The plugin allows to work with the Che Commands through the Theia Tasks concept. + +Contributes: +- Che task runner that runs the Che commands as the Theia tasks; +- Che task resolver that fills the missed mandatory parameters in a task; +- Che task provider that provides the Che workspace's commands as provided Theia tasks; +- `Preview URLs` view; +- `che.task.preview.notifications` preference to set the preferred way of previewing a service URL: + - `on` value enables a notification to ask a user how a URL should be opened + - `alwaysPreview` value tells Theia to open a preview URL automatically inside Theia as soon as a task is running + - `alwaysGoTo` value tells Theia to open a preview URL automatically in a separate browser's tab as soon as a task is running + - `off` value disables opening a preview URL (automatically and with a notification) + +The format of a Che task is the following: +```json +{ + "type": "che", + "label": "", + "command": "", + "target": { + "workspaceId": "", + "machineName": "" + }, + "previewUrl": "" +} +``` +The `target` and `previewUrl` fields are optional. + +The variables substitution is supported for the `command` and `previewUrl` fields. diff --git a/plugins/task-plugin/package.json b/plugins/task-plugin/package.json new file mode 100644 index 000000000..664a5e500 --- /dev/null +++ b/plugins/task-plugin/package.json @@ -0,0 +1,62 @@ +{ + "name": "task-plugin", + "publisher": "theia", + "keywords": [ + "theia-plugin" + ], + "version": "0.0.1", + "license": "EPL-2.0", + "contributors": [ + { + "name": "Artem Zatsarynnyi", + "email": "azatsary@redhat.com" + }, + { + "name": "Roman Nikitenko", + "email": "rnikiten@redhat.com" + } + ], + "files": [ + "src" + ], + "contributes": { + "configuration": { + "type": "object", + "title": "Che task preview configuration", + "properties": { + "che.task.preview.notifications": { + "type": "string", + "default": "on", + "enum": [ + "on", + "alwaysPreview", + "alwaysGoTo", + "off" + ], + "description": "Enable/disable the notifications with a proposal to open a Che task's preview URL. Can be: 'on', 'alwaysPreview', 'alwaysGoTo' or 'off'." + } + } + } + }, + "devDependencies": { + "@eclipse-che/plugin": "0.0.1", + "@theia/plugin": "next", + "@theia/plugin-packager": "latest" + }, + "scripts": { + "prepare": "yarn run clean && yarn run build", + "clean": "rimraf lib", + "format": "tsfmt -r --useTsfmt ../../configs/tsfmt.json", + "watch": "tsc -watch", + "compile": "tsc", + "lint": "tslint -c ../../configs/tslint.json --project tsconfig.json", + "lint:fix": "tslint -c ../../configs/tslint.json --fix --project .", + "build": "concurrently -n \"format,lint,compile\" -c \"red,green,blue\" \"yarn format\" \"yarn lint\" \"yarn compile\" && theia:plugin pack" + }, + "engines": { + "theiaPlugin": "next" + }, + "theiaPlugin": { + "backend": "lib/task-plugin-backend.js" + } +} diff --git a/plugins/task-plugin/resources/preview-urls-view.css b/plugins/task-plugin/resources/preview-urls-view.css new file mode 100644 index 000000000..67468f7eb --- /dev/null +++ b/plugins/task-plugin/resources/preview-urls-view.css @@ -0,0 +1,354 @@ + +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +:root { + + --md-red-50: #FFEBEE; + --md-red-100: #FFCDD2; + --md-red-200: #EF9A9A; + --md-red-300: #E57373; + --md-red-400: #EF5350; + --md-red-500: #F44336; + --md-red-600: #E53935; + --md-red-700: #D32F2F; + --md-red-800: #C62828; + --md-red-900: #B71C1C; + --md-red-A100: #FF8A80; + --md-red-A200: #FF5252; + --md-red-A400: #FF1744; + --md-red-A700: #D50000; + + --md-pink-50: #FCE4EC; + --md-pink-100: #F8BBD0; + --md-pink-200: #F48FB1; + --md-pink-300: #F06292; + --md-pink-400: #EC407A; + --md-pink-500: #E91E63; + --md-pink-600: #D81B60; + --md-pink-700: #C2185B; + --md-pink-800: #AD1457; + --md-pink-900: #880E4F; + --md-pink-A100: #FF80AB; + --md-pink-A200: #FF4081; + --md-pink-A400: #F50057; + --md-pink-A700: #C51162; + + --md-purple-50: #F3E5F5; + --md-purple-100: #E1BEE7; + --md-purple-200: #CE93D8; + --md-purple-300: #BA68C8; + --md-purple-400: #AB47BC; + --md-purple-500: #9C27B0; + --md-purple-600: #8E24AA; + --md-purple-700: #7B1FA2; + --md-purple-800: #6A1B9A; + --md-purple-900: #4A148C; + --md-purple-A100: #EA80FC; + --md-purple-A200: #E040FB; + --md-purple-A400: #D500F9; + --md-purple-A700: #AA00FF; + + --md-deep-purple-50: #EDE7F6; + --md-deep-purple-100: #D1C4E9; + --md-deep-purple-200: #B39DDB; + --md-deep-purple-300: #9575CD; + --md-deep-purple-400: #7E57C2; + --md-deep-purple-500: #673AB7; + --md-deep-purple-600: #5E35B1; + --md-deep-purple-700: #512DA8; + --md-deep-purple-800: #4527A0; + --md-deep-purple-900: #311B92; + --md-deep-purple-A100: #B388FF; + --md-deep-purple-A200: #7C4DFF; + --md-deep-purple-A400: #651FFF; + --md-deep-purple-A700: #6200EA; + + --md-indigo-50: #E8EAF6; + --md-indigo-100: #C5CAE9; + --md-indigo-200: #9FA8DA; + --md-indigo-300: #7986CB; + --md-indigo-400: #5C6BC0; + --md-indigo-500: #3F51B5; + --md-indigo-600: #3949AB; + --md-indigo-700: #303F9F; + --md-indigo-800: #283593; + --md-indigo-900: #1A237E; + --md-indigo-A100: #8C9EFF; + --md-indigo-A200: #536DFE; + --md-indigo-A400: #3D5AFE; + --md-indigo-A700: #304FFE; + + --md-blue-50: #E3F2FD; + --md-blue-100: #BBDEFB; + --md-blue-200: #90CAF9; + --md-blue-300: #64B5F6; + --md-blue-400: #42A5F5; + --md-blue-500: #2196F3; + --md-blue-600: #1E88E5; + --md-blue-700: #1976D2; + --md-blue-800: #1565C0; + --md-blue-900: #0D47A1; + --md-blue-A100: #82B1FF; + --md-blue-A200: #448AFF; + --md-blue-A400: #2979FF; + --md-blue-A700: #2962FF; + + --md-light-blue-50: #E1F5FE; + --md-light-blue-100: #B3E5FC; + --md-light-blue-200: #81D4FA; + --md-light-blue-300: #4FC3F7; + --md-light-blue-400: #29B6F6; + --md-light-blue-500: #03A9F4; + --md-light-blue-600: #039BE5; + --md-light-blue-700: #0288D1; + --md-light-blue-800: #0277BD; + --md-light-blue-900: #01579B; + --md-light-blue-A100: #80D8FF; + --md-light-blue-A200: #40C4FF; + --md-light-blue-A400: #00B0FF; + --md-light-blue-A700: #0091EA; + + --md-cyan-50: #E0F7FA; + --md-cyan-100: #B2EBF2; + --md-cyan-200: #80DEEA; + --md-cyan-300: #4DD0E1; + --md-cyan-400: #26C6DA; + --md-cyan-500: #00BCD4; + --md-cyan-600: #00ACC1; + --md-cyan-700: #0097A7; + --md-cyan-800: #00838F; + --md-cyan-900: #006064; + --md-cyan-A100: #84FFFF; + --md-cyan-A200: #18FFFF; + --md-cyan-A400: #00E5FF; + --md-cyan-A700: #00B8D4; + + --md-teal-50: #E0F2F1; + --md-teal-100: #B2DFDB; + --md-teal-200: #80CBC4; + --md-teal-300: #4DB6AC; + --md-teal-400: #26A69A; + --md-teal-500: #009688; + --md-teal-600: #00897B; + --md-teal-700: #00796B; + --md-teal-800: #00695C; + --md-teal-900: #004D40; + --md-teal-A100: #A7FFEB; + --md-teal-A200: #64FFDA; + --md-teal-A400: #1DE9B6; + --md-teal-A700: #00BFA5; + + --md-green-50: #E8F5E9; + --md-green-100: #C8E6C9; + --md-green-200: #A5D6A7; + --md-green-300: #81C784; + --md-green-400: #66BB6A; + --md-green-500: #4CAF50; + --md-green-600: #43A047; + --md-green-700: #388E3C; + --md-green-800: #2E7D32; + --md-green-900: #1B5E20; + --md-green-A100: #B9F6CA; + --md-green-A200: #69F0AE; + --md-green-A400: #00E676; + --md-green-A700: #00C853; + + --md-light-green-50: #F1F8E9; + --md-light-green-100: #DCEDC8; + --md-light-green-200: #C5E1A5; + --md-light-green-300: #AED581; + --md-light-green-400: #9CCC65; + --md-light-green-500: #8BC34A; + --md-light-green-600: #7CB342; + --md-light-green-700: #689F38; + --md-light-green-800: #558B2F; + --md-light-green-900: #33691E; + --md-light-green-A100: #CCFF90; + --md-light-green-A200: #B2FF59; + --md-light-green-A400: #76FF03; + --md-light-green-A700: #64DD17; + + --md-lime-50: #F9FBE7; + --md-lime-100: #F0F4C3; + --md-lime-200: #E6EE9C; + --md-lime-300: #DCE775; + --md-lime-400: #D4E157; + --md-lime-500: #CDDC39; + --md-lime-600: #C0CA33; + --md-lime-700: #AFB42B; + --md-lime-800: #9E9D24; + --md-lime-900: #827717; + --md-lime-A100: #F4FF81; + --md-lime-A200: #EEFF41; + --md-lime-A400: #C6FF00; + --md-lime-A700: #AEEA00; + + --md-yellow-50: #FFFDE7; + --md-yellow-100: #FFF9C4; + --md-yellow-200: #FFF59D; + --md-yellow-300: #FFF176; + --md-yellow-400: #FFEE58; + --md-yellow-500: #FFEB3B; + --md-yellow-600: #FDD835; + --md-yellow-700: #FBC02D; + --md-yellow-800: #F9A825; + --md-yellow-900: #F57F17; + --md-yellow-A100: #FFFF8D; + --md-yellow-A200: #FFFF00; + --md-yellow-A400: #FFEA00; + --md-yellow-A700: #FFD600; + + --md-amber-50: #FFF8E1; + --md-amber-100: #FFECB3; + --md-amber-200: #FFE082; + --md-amber-300: #FFD54F; + --md-amber-400: #FFCA28; + --md-amber-500: #FFC107; + --md-amber-600: #FFB300; + --md-amber-700: #FFA000; + --md-amber-800: #FF8F00; + --md-amber-900: #FF6F00; + --md-amber-A100: #FFE57F; + --md-amber-A200: #FFD740; + --md-amber-A400: #FFC400; + --md-amber-A700: #FFAB00; + + --md-orange-50: #FFF3E0; + --md-orange-100: #FFE0B2; + --md-orange-200: #FFCC80; + --md-orange-300: #FFB74D; + --md-orange-400: #FFA726; + --md-orange-500: #FF9800; + --md-orange-600: #FB8C00; + --md-orange-700: #F57C00; + --md-orange-800: #EF6C00; + --md-orange-900: #E65100; + --md-orange-A100: #FFD180; + --md-orange-A200: #FFAB40; + --md-orange-A400: #FF9100; + --md-orange-A700: #FF6D00; + + --md-deep-orange-50: #FBE9E7; + --md-deep-orange-100: #FFCCBC; + --md-deep-orange-200: #FFAB91; + --md-deep-orange-300: #FF8A65; + --md-deep-orange-400: #FF7043; + --md-deep-orange-500: #FF5722; + --md-deep-orange-600: #F4511E; + --md-deep-orange-700: #E64A19; + --md-deep-orange-800: #D84315; + --md-deep-orange-900: #BF360C; + --md-deep-orange-A100: #FF9E80; + --md-deep-orange-A200: #FF6E40; + --md-deep-orange-A400: #FF3D00; + --md-deep-orange-A700: #DD2C00; + + --md-brown-50: #EFEBE9; + --md-brown-100: #D7CCC8; + --md-brown-200: #BCAAA4; + --md-brown-300: #A1887F; + --md-brown-400: #8D6E63; + --md-brown-500: #795548; + --md-brown-600: #6D4C41; + --md-brown-700: #5D4037; + --md-brown-800: #4E342E; + --md-brown-900: #3E2723; + + --md-grey-50: #FAFAFA; + --md-grey-100: #F5F5F5; + --md-grey-200: #EEEEEE; + --md-grey-300: #E0E0E0; + --md-grey-400: #BDBDBD; + --md-grey-500: #9E9E9E; + --md-grey-600: #757575; + --md-grey-700: #616161; + --md-grey-800: #2e2e2e; + --md-grey-900: #212121; + + --md-blue-grey-50: #ECEFF1; + --md-blue-grey-100: #CFD8DC; + --md-blue-grey-200: #b0bec5; + --md-blue-grey-300: #90A4AE; + --md-blue-grey-400: #78909C; + --md-blue-grey-500: #607D8B; + --md-blue-grey-600: #546E7A; + --md-blue-grey-700: #455A64; + --md-blue-grey-800: #37474F; + --md-blue-grey-900: #263238; + +} + +html, body { + font-family: var(--theia-ui-font-family); + background: var(--theia-layout-color0); +} + +.previews-container { + display: flex; + flex-direction: column; +} +.previews-placeholder { + top: 50%; + left: 50%; + position: absolute; + transform: translate(-50%, -50%); + color: var(--theia-ui-font-color1); + font-size: var(--theia-ui-font-size1); +} + +.preview { + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 5px; +} + +.previews-labels-part { + display: flex; + flex-direction: row; + justify-content: flex-start; +} + +.previews-buttons-part { + display: flex; + flex-direction: row; + white-space: nowrap; + justify-content: flex-end; +} + +.button { + background-color: var(--theia-ui-button-color); + color: var(--theia-ui-button-font-color); + border: none; + border-radius: 0px; + align-self: center; + height: 22px; + text-decoration: none; + padding: 0px 5px; + margin: 0px 7px 0px 7px; + font-size: var(--theia-ui-font-size1); + outline: none; + cursor: pointer; +} + +.server-label { + margin-left: 10px; + margin-right: 10px; + color: var(--theia-ui-font-color1); + font-size: var(--theia-ui-font-size1); +} + +.task-label { + margin-left: 10px; + margin-right: 10px; + color: var(--theia-ui-font-color2); + font-size: var(--theia-ui-font-size1); +} diff --git a/plugins/task-plugin/resources/preview-urls.js b/plugins/task-plugin/resources/preview-urls.js new file mode 100644 index 000000000..e3ae10a4f --- /dev/null +++ b/plugins/task-plugin/resources/preview-urls.js @@ -0,0 +1,26 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +let api; + +(function () { + if (typeof acquireTheiaApi === 'undefined') { + return + } + api = acquireTheiaApi(); +}()); + +function preview(choice, url) { + api.postMessage({ + command: 'preview', + choice, + url + }); +} diff --git a/plugins/task-plugin/src/che-task-backend-module.ts b/plugins/task-plugin/src/che-task-backend-module.ts new file mode 100644 index 000000000..e264baa6d --- /dev/null +++ b/plugins/task-plugin/src/che-task-backend-module.ts @@ -0,0 +1,61 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { Container } from 'inversify'; +import { CheTaskProvider } from './task/che-task-provider'; +import { MachinesPicker } from './machine/machines-picker'; +import { ProjectPathVariableResolver } from './variable/project-path-variable-resolver'; +import { CheTaskRunner } from './task/che-task-runner'; +import { ServerVariableResolver } from './variable/server-variable-resolver'; +import { MachineExecClient } from './machine/machine-exec-client'; +import { CheTerminalWidget, CheTerminalWidgetOptions, TerminalWidgetFactory } from './machine/terminal-widget'; +import { CheTaskEventsHandler } from './preview/task-events-handler'; +import { TasksPreviewManager } from './preview/tasks-preview-manager'; +import { AttachTerminalClient } from './machine/attach-client'; +import { PreviewUrlsWidgetFactory, PreviewUrlsWidget, PreviewUrlsWidgetOptions } from './preview/previews-widget'; +import { CheTaskPreviewMode } from './preview/task-preview-mode'; +import { PreviewUrlOpenService } from './preview/preview-url-open-service'; +import { CheWorkspaceClient } from './che-workspace-client'; + +const container = new Container(); +container.bind(CheTaskProvider).toSelf().inSingletonScope(); +container.bind(CheTaskEventsHandler).toSelf().inSingletonScope(); +container.bind(TasksPreviewManager).toSelf().inSingletonScope(); +container.bind(CheTaskRunner).toSelf().inSingletonScope(); +container.bind(MachinesPicker).toSelf().inSingletonScope(); +container.bind(AttachTerminalClient).toSelf().inSingletonScope(); +container.bind(MachineExecClient).toSelf().inSingletonScope(); +container.bind(ServerVariableResolver).toSelf().inSingletonScope(); +container.bind(ProjectPathVariableResolver).toSelf().inSingletonScope(); +container.bind(CheWorkspaceClient).toSelf().inSingletonScope(); +container.bind(CheTaskPreviewMode).toSelf().inSingletonScope(); +container.bind(PreviewUrlOpenService).toSelf().inSingletonScope(); + +container.bind(CheTerminalWidget).toSelf().inTransientScope(); +container.bind(TerminalWidgetFactory).toDynamicValue(ctx => ({ + createWidget: (options: CheTerminalWidgetOptions) => { + const child = new Container({ defaultScope: 'Singleton' }); + child.parent = ctx.container; + child.bind(CheTerminalWidgetOptions).toConstantValue(options); + return child.get(CheTerminalWidget); + } +})); + +container.bind(PreviewUrlsWidget).toSelf().inTransientScope(); +container.bind(PreviewUrlsWidgetFactory).toDynamicValue(ctx => ({ + createWidget: (options: PreviewUrlsWidgetOptions) => { + const child = new Container({ defaultScope: 'Singleton' }); + child.parent = ctx.container; + child.bind(PreviewUrlsWidgetOptions).toConstantValue(options); + return child.get(PreviewUrlsWidget); + } +})); + +export { container }; diff --git a/plugins/task-plugin/src/che-workspace-client.ts b/plugins/task-plugin/src/che-workspace-client.ts new file mode 100644 index 000000000..4719b9fb4 --- /dev/null +++ b/plugins/task-plugin/src/che-workspace-client.ts @@ -0,0 +1,83 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import * as che from '@eclipse-che/plugin'; +import { che as cheApi } from '@eclipse-che/api'; +import { injectable } from 'inversify'; + +const TERMINAL_SERVER_TYPE = 'terminal'; + +@injectable() +export class CheWorkspaceClient { + + async getMachines(): Promise<{ [attrName: string]: cheApi.workspace.Machine }> { + const workspace = await this.getCurrentWorkspace(); + const runtime = workspace.runtime; + if (!runtime) { + throw new Error('Workspace is not running.'); + } + + const machines = runtime.machines; + if (!machines) { + throw new Error('No machines for current workspace is found.'); + } + return machines; + } + + async getCommands(): Promise { + const workspace = await this.getCurrentWorkspace(); + + const config = workspace.config; + if (!config) { + return []; + } + + const commands = config.commands; + return commands ? commands : []; + } + + getCurrentWorkspace(): Promise { + return che.workspace.getCurrentWorkspace(); + } + + async getWorkspaceId(): Promise { + const workspace = await this.getCurrentWorkspace(); + return workspace.id; + } + + async getMachineExecServerURL(): Promise { + const machineExecServer = await this.getMachineExecServer(); + if (!machineExecServer) { + throw new Error(`No server with type ${TERMINAL_SERVER_TYPE} found.`); + } + return machineExecServer.url!; + } + + protected async getMachineExecServer(): Promise { + const machines = await this.getMachines(); + for (const machineName in machines) { + if (!machines.hasOwnProperty(machineName)) { + continue; + } + const servers = machines[machineName].servers!; + for (const serverName in servers) { + if (!servers.hasOwnProperty(serverName)) { + continue; + } + + const serverAttributes = servers[serverName].attributes; + if (serverAttributes && serverAttributes['type'] === TERMINAL_SERVER_TYPE) { + return servers[serverName]; + } + } + } + return undefined; + } +} diff --git a/plugins/task-plugin/src/machine/attach-client.ts b/plugins/task-plugin/src/machine/attach-client.ts new file mode 100644 index 000000000..325652156 --- /dev/null +++ b/plugins/task-plugin/src/machine/attach-client.ts @@ -0,0 +1,42 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import { CheWorkspaceClient } from '../che-workspace-client'; +import { ReconnectingWebSocket } from './websocket'; + +const ATTACH_TERMINAL_SEGMENT: string = 'attach'; + +export interface TerminalProcessOutputHandler { + onMessage(content: string): void; +} + +@injectable() +export class AttachTerminalClient { + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + async connectTerminalProcess(terminalId: number, outputHandler: TerminalProcessOutputHandler): Promise { + const termServerEndpoint = await this.cheWorkspaceClient.getMachineExecServerURL(); + const terminalURL = `${termServerEndpoint}/${ATTACH_TERMINAL_SEGMENT}/${terminalId}`; + + const webSocket = new ReconnectingWebSocket(terminalURL); + + webSocket.onMessage = (message: string) => { + outputHandler.onMessage(message); + }; + + webSocket.onError = (error: Error) => { + console.error('Websocket error:', error); + }; + // TODO close webSocket when task is completed; event with runtime info is not implemented for plugin API at the moment + } +} diff --git a/plugins/task-plugin/src/machine/machine-exec-client.ts b/plugins/task-plugin/src/machine/machine-exec-client.ts new file mode 100644 index 000000000..8e8ccf2df --- /dev/null +++ b/plugins/task-plugin/src/machine/machine-exec-client.ts @@ -0,0 +1,72 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import * as rpc from 'vscode-ws-jsonrpc'; +import { injectable, inject } from 'inversify'; +import { CheWorkspaceClient } from '../che-workspace-client'; +import { createConnection } from './websocket'; + +const CREATE_METHOD_NAME: string = 'create'; +const CONNECT_TERMINAL_SEGMENT: string = 'connect'; + +export interface MachineIdentifier { + workspaceId: string, + machineName: string +} +export interface MachineExec { + identifier: MachineIdentifier, + cmd: string[], + tty: boolean, + id?: number +} + +export interface TerminalProcessOutputHandler { + onMessage(content: string): void; +} + +@injectable() +export class MachineExecClient { + + private machineExecServerEndpoint: string | undefined = undefined; + private connection: rpc.MessageConnection | undefined = undefined; + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + async getExecId(machineExec: MachineExec): Promise { + const connection = await this.getConnection(); + const request = new rpc.RequestType(CREATE_METHOD_NAME); + return await connection.sendRequest(request, machineExec); + } + + private async getConnection(): Promise { + if (this.connection) { + return this.connection; + } + + const machineExecServerEndpoint = await this.fetchMachineExecServerURL(); + if (machineExecServerEndpoint === undefined) { + throw new Error('URL for machine-exec server is not found in the current workspace.'); + } + + const execServerUrl: string = `${machineExecServerEndpoint}/${CONNECT_TERMINAL_SEGMENT}`; + this.connection = await createConnection(execServerUrl); + return this.connection; + } + + private async fetchMachineExecServerURL(): Promise { + if (this.machineExecServerEndpoint === undefined) { + const url = await this.cheWorkspaceClient.getMachineExecServerURL(); + this.machineExecServerEndpoint = url; + return url; + } + return this.machineExecServerEndpoint; + } +} diff --git a/plugins/task-plugin/src/machine/machines-picker.ts b/plugins/task-plugin/src/machine/machines-picker.ts new file mode 100644 index 000000000..1487c0b37 --- /dev/null +++ b/plugins/task-plugin/src/machine/machines-picker.ts @@ -0,0 +1,67 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as theia from '@theia/plugin'; +import { CheWorkspaceClient } from '../che-workspace-client'; + +const MACHINES_PLACE_HOLDER = 'Pick a machine to run the task'; + +@injectable() +export class MachinesPicker { + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + /** + * Returns a machine name if there's just one machine in the current workspace. + * Shows a quick open widget allows to pick a machine if there are several ones. + */ + async pick(): Promise { + const machines = await this.getMachines(); + if (machines.length === 1) { + return Promise.resolve(machines[0]); + } + + const items: string[] = []; + for (const machineName of machines) { + items.push(machineName); + } + + return this.showMachineQuickPick(items); + } + + protected async getMachines(): Promise { + const machineNames: string[] = []; + const machines = await this.cheWorkspaceClient.getMachines(); + if (!machines) { + return machineNames; + } + + for (const machineName in machines) { + if (machines.hasOwnProperty(machineName)) { + machineNames.push(machineName); + } + } + return machineNames; + } + + private showMachineQuickPick(items: string[]): Promise { + return new Promise(resolve => { + + const options = { placeHolder: MACHINES_PLACE_HOLDER } as theia.QuickPickOptions; + options.onDidSelectItem = (item => { + const machineName = typeof item === 'string' ? item : item.label; + resolve(machineName); + }); + theia.window.showQuickPick(items, options); + }); + } +} diff --git a/plugins/task-plugin/src/machine/terminal-widget.ts b/plugins/task-plugin/src/machine/terminal-widget.ts new file mode 100644 index 000000000..035c3b400 --- /dev/null +++ b/plugins/task-plugin/src/machine/terminal-widget.ts @@ -0,0 +1,45 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as theia from '@theia/plugin'; +import { AttachTerminalClient } from './attach-client'; + +export const TerminalWidgetFactory = Symbol('TerminalWidgetFactory'); +export interface TerminalWidgetFactory { + createWidget(options: CheTerminalWidgetOptions): Promise; +} + +export const CheTerminalWidgetOptions = Symbol('CheTerminalWidgetOptions'); +export interface CheTerminalWidgetOptions { + title: string; + terminalId: number; +} + +@injectable() +export class CheTerminalWidget { + + @inject(AttachTerminalClient) + protected readonly attachTerminalClient!: AttachTerminalClient; + + @inject(CheTerminalWidgetOptions) + protected readonly options!: CheTerminalWidgetOptions; + + async connectTerminalProcess(): Promise { + const outputChannel = theia.window.createOutputChannel(this.options.title); + await this.attachTerminalClient.connectTerminalProcess(this.options.terminalId, { + onMessage: content => { + outputChannel.appendLine(content); + } + }); + + outputChannel.show(); + } +} diff --git a/plugins/task-plugin/src/machine/websocket.ts b/plugins/task-plugin/src/machine/websocket.ts new file mode 100644 index 000000000..2b55c3845 --- /dev/null +++ b/plugins/task-plugin/src/machine/websocket.ts @@ -0,0 +1,126 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import * as WS from 'ws'; +import { IWebSocket, ConsoleLogger, createWebSocketConnection, Logger, MessageConnection } from 'vscode-ws-jsonrpc'; + +/** Websocket wrapper allows to reconnect in case of failures */ +export class ReconnectingWebSocket { + + /** Delay before trying to reconnect */ + private static RECONNECTION_DELAY: number = 1000; + + /** Instance of the websocket library. */ + private ws: WS; + + /** URL for connection */ + private readonly url: string; + + private readonly logger: Logger; + + constructor(url: string) { + this.url = url; + this.logger = new ConsoleLogger(); + this.open(); + } + + /** Open the websocket. If error, try to reconnect. */ + open() { + this.ws = new WS(this.url); + + this.ws.on('open', () => { + this.onOpen(this.url); + }); + + this.ws.on('message', (data: WS.Data) => { + this.onMessage(data); + }); + + this.ws.on('close', (code: number, reason: string) => { + switch (code) { + case 1000: + break; + default: + this.reconnect(reason); + break; + } + this.onClose(code, reason); + }); + + // tslint:disable-next-line:no-any + this.ws.on('error', (e: any) => { + switch (e.code) { + case 'ECONNREFUSED': + this.reconnect(e); + break; + default: + this.onError(e); + break; + } + }); + } + + // tslint:disable-next-line:no-any + public send(data: any) { + try { + this.ws.send(data); + } catch (error) { + this.ws.emit('error', error); + } + } + + public close() { + this.ws.close(); + } + + private reconnect(reason: string) { + this.logger.warn(`WebSocket: Reconnecting in ${ReconnectingWebSocket.RECONNECTION_DELAY}ms due to ${reason}`); + this.ws.removeAllListeners(); + setTimeout(() => { + this.logger.warn('WebSocket: Reconnecting...'); + this.open(); + }, ReconnectingWebSocket.RECONNECTION_DELAY); + } + + public onOpen(url: string) { } + public onClose(code: number, reason: string) { } + public onMessage(data: WS.Data) { } + public onError(reason: Error) { } +} + +export function createConnection(url: string): Promise { + const webSocket = new ReconnectingWebSocket(url); + const logger = new ConsoleLogger(); + + return new Promise((resolve, reject) => { + webSocket.onOpen = () => { + const messageConnection = createWebSocketConnection(toSocket(webSocket), logger); + + messageConnection.listen(); + resolve(messageConnection); + }; + + webSocket.onError = (error: Error) => { + reject(error); + logger.error('' + error); + return; + }; + }); +} + +export function toSocket(webSocket: ReconnectingWebSocket): IWebSocket { + return { + send: content => webSocket.send(content), + onMessage: callback => webSocket.onMessage = data => callback(data), + onError: callback => webSocket.onError = error => callback(error.message), + onClose: callback => webSocket.onClose = (code: number, reason: string) => callback(code, reason), + dispose: () => webSocket.close() + }; +} diff --git a/plugins/task-plugin/src/preview/preview-url-open-service.ts b/plugins/task-plugin/src/preview/preview-url-open-service.ts new file mode 100644 index 000000000..351b19032 --- /dev/null +++ b/plugins/task-plugin/src/preview/preview-url-open-service.ts @@ -0,0 +1,43 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable } from 'inversify'; +import * as che from '@eclipse-che/plugin'; +import * as theia from '@theia/plugin'; + +const EXTERNAL_COMMAND_ID = 'theia.open'; +const INTERNAL_COMMAND_ID = 'mini-browser.openUrl'; + +@injectable() +export class PreviewUrlOpenService { + + /** + * Open the given URL to preview it in a separate browser's tab. + * Method also tries to resolve the variables in the given URL. + * @param previewURL a URL to go to + */ + async previewExternally(previewURL: string): Promise { + return this.preview(previewURL, EXTERNAL_COMMAND_ID); + } + + /** + * Open the given URL to preview it in the embedded mini-browser. + * Method also tries to resolve the variables in the given URL. + * @param previewURL a URL to preview + */ + async previewInternally(previewURL: string): Promise { + return this.preview(previewURL, INTERNAL_COMMAND_ID); + } + + private async preview(previewURL: string, commandId: string): Promise { + const url = await che.variables.resolve(previewURL); + return theia.commands.executeCommand(commandId, url); + } +} diff --git a/plugins/task-plugin/src/preview/previews-widget.ts b/plugins/task-plugin/src/preview/previews-widget.ts new file mode 100644 index 000000000..c079dfdc2 --- /dev/null +++ b/plugins/task-plugin/src/preview/previews-widget.ts @@ -0,0 +1,107 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import * as theia from '@theia/plugin'; +import * as path from 'path'; +import * as startPoint from '../task-plugin-backend'; +import { injectable, inject } from 'inversify'; +import { EXTERNALLY_CHOICE, INTERNALLY_CHOICE, PREVIEW_URL_TITLE } from './tasks-preview-manager'; + +const GO_TO_BUTTON_NAME = 'Go To'; +const PREVIEW_BUTTON_NAME = 'Preview'; +const PLACEHOLDER = 'No Che tasks with a preview URL are running'; + +export const PreviewUrlsWidgetFactory = Symbol('PreviewUrlsWidgetFactory'); +export interface PreviewUrlsWidgetFactory { + createWidget(options: PreviewUrlsWidgetOptions): Promise; +} + +export const PreviewUrlsWidgetOptions = Symbol('PreviewUrlsWidgetOptions'); +export interface PreviewUrlsWidgetOptions { + tasks: theia.Task[]; +} + +@injectable() +export class PreviewUrlsWidget { + + @inject(PreviewUrlsWidgetOptions) + private readonly options!: PreviewUrlsWidgetOptions; + + getHtml(): string { + const context = startPoint.getContext(); + const scriptPathOnDisk = theia.Uri.file(path.join(context.extensionPath, 'resources', 'preview-urls.js')); + const scriptUri = scriptPathOnDisk.with({ scheme: 'theia-resource' }); + + const cssPathOnDisk = theia.Uri.file(path.join(context.extensionPath, 'resources', 'preview-urls-view.css')); + const cssUri = cssPathOnDisk.with({ scheme: 'theia-resource' }); + + const rendering = this.render(); + return ` + + + + + + + + ${PREVIEW_URL_TITLE} + + + + ${rendering} + + + `; + } + + private render(): string { + if (this.options.tasks.length < 1) { + return `
${PLACEHOLDER}
`; + } + + const previews = this.renderPreviews().join(''); + return `
${previews}
`; + } + + private renderPreviews(): Array { + return this.options.tasks.map(cheTask => { + const previewUrl = cheTask.definition.previewUrl; + + const server = `${previewUrl}`; + const taskLabel = `${cheTask.name}`; + const previewButton = ``; + const goToButton = ``; + + return this.renderTemplate(server, taskLabel, previewButton, goToButton); + }); + } + + private renderTemplate(server: string, taskLabel: string, previewButton: string, goToButton: string) { + return `
+
+
+ ${server} +
+
+ ${taskLabel} +
+
+
+
+ ${previewButton} +
+
+ ${goToButton} +
+
+
`; + } +} diff --git a/plugins/task-plugin/src/preview/task-events-handler.ts b/plugins/task-plugin/src/preview/task-events-handler.ts new file mode 100644 index 000000000..2c4633c73 --- /dev/null +++ b/plugins/task-plugin/src/preview/task-events-handler.ts @@ -0,0 +1,101 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as theia from '@theia/plugin'; +import * as startPoint from '../task-plugin-backend'; +import { CheTaskDefinition, CHE_TASK_TYPE } from '../task/task-protocol'; +import { CheTaskPreviewMode, PreviewMode } from './task-preview-mode'; +import { PreviewUrlOpenService } from './preview-url-open-service'; +import { TasksPreviewManager } from './tasks-preview-manager'; + +const GO_TO_BUTTON_TEXT = 'Go To'; +const PREVIEW_URL_BUTTON_TEXT = 'Preview'; + +@injectable() +export class CheTaskEventsHandler { + + @inject(CheTaskPreviewMode) + protected readonly taskPreviewMode!: CheTaskPreviewMode; + + @inject(PreviewUrlOpenService) + protected readonly previewUrlOpenService!: PreviewUrlOpenService; + + @inject(TasksPreviewManager) + protected readonly tasksPreviewManager!: TasksPreviewManager; + + init() { + theia.tasks.onDidStartTask(event => { + const task = event.execution.task; + if (task.definition.type !== CHE_TASK_TYPE) { + return; + } + + this.onTaskStarted(task); + }, undefined, startPoint.getSubscriptions()); + + theia.tasks.onDidEndTask(event => { + const task = event.execution.task; + if (task.definition.type !== CHE_TASK_TYPE) { + return; + } + // TODO handle stopped tasks, at the moment we can not track che task end events + console.log('Task is stopped ' + event.execution.task.name); + }, undefined, startPoint.getSubscriptions()); + } + + onTaskStarted(task: theia.Task): void { + const cheTaskDefinition = task.definition as CheTaskDefinition; + const previewUrl = cheTaskDefinition.previewUrl; + if (!previewUrl) { + return; + } + + this.tasksPreviewManager.showPreviews(); + + const mode = this.taskPreviewMode.get(); + switch (mode) { + case PreviewMode.AlwaysGoTo: { + this.previewUrlOpenService.previewExternally(previewUrl); + break; + } + case PreviewMode.AlwaysPreview: { + this.previewUrlOpenService.previewInternally(previewUrl); + break; + } + case PreviewMode.Off: { + break; + } + default: { + const message = `Task ${task.name} launched a service on ${previewUrl}`; + this.askUser(message, previewUrl); + break; + } + } + } + + async askUser(message: string, url: string) { + const item = await theia.window.showInformationMessage(message, {}, PREVIEW_URL_BUTTON_TEXT, GO_TO_BUTTON_TEXT); + + switch (item) { + case PREVIEW_URL_BUTTON_TEXT: { + this.previewUrlOpenService.previewInternally(url); + break; + } + case GO_TO_BUTTON_TEXT: { + this.previewUrlOpenService.previewExternally(url); + break; + } + default: { + break; + } + } + } +} diff --git a/plugins/task-plugin/src/preview/task-preview-mode.ts b/plugins/task-plugin/src/preview/task-preview-mode.ts new file mode 100644 index 000000000..40ac9986b --- /dev/null +++ b/plugins/task-plugin/src/preview/task-preview-mode.ts @@ -0,0 +1,45 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable } from 'inversify'; +import * as theia from '@theia/plugin'; + +const CHE_CONFIGURATION = 'che'; +const TASK_PREVIEW_NOTIFICATIONS = 'task.preview.notifications'; + +export enum PreviewMode { + On = 'on', + AlwaysPreview = 'alwaysPreview', + AlwaysGoTo = 'alwaysGoTo', + Off = 'off' +} + +@injectable() +export class CheTaskPreviewMode { + + get(): PreviewMode { + const configuration = theia.workspace.getConfiguration(CHE_CONFIGURATION); + if (!configuration) { + return PreviewMode.On; + } + + const preference = configuration.get(TASK_PREVIEW_NOTIFICATIONS); + switch (preference) { + case 'alwaysPreview': + return PreviewMode.AlwaysPreview; + case 'alwaysGoTo': + return PreviewMode.AlwaysGoTo; + case 'off': + return PreviewMode.Off; + default: + return PreviewMode.On; + } + } +} diff --git a/plugins/task-plugin/src/preview/tasks-preview-manager.ts b/plugins/task-plugin/src/preview/tasks-preview-manager.ts new file mode 100644 index 000000000..d7cfd7f07 --- /dev/null +++ b/plugins/task-plugin/src/preview/tasks-preview-manager.ts @@ -0,0 +1,98 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as theia from '@theia/plugin'; +import * as startPoint from '../task-plugin-backend'; +import { PreviewUrlsWidgetFactory } from './previews-widget'; +import * as path from 'path'; +import { PreviewUrlOpenService } from './preview-url-open-service'; + +export const PREVIEW_URL_TITLE = 'Preview URLs'; +export const PREVIEW_URL_VIEW_TYPE = 'PreviewUrlView'; +export const EXTERNALLY_CHOICE = 'externally'; +export const INTERNALLY_CHOICE = 'internally'; + +export const STATUS_BAR_PREVIEW = { + id: 'show.preview.urls', + label: 'Show Preview URLs', + title: 'Previews' +}; + +@injectable() +export class TasksPreviewManager { + + private currentPanel: theia.WebviewPanel | undefined; + + @inject(PreviewUrlsWidgetFactory) + protected readonly previewUrlsWidgetFactory!: PreviewUrlsWidgetFactory; + + @inject(PreviewUrlOpenService) + protected readonly previewUrlOpenService!: PreviewUrlOpenService; + + init() { + this.setStatusBarPreviewUrlItem(); + } + + async showPreviews() { + const executions = theia.tasks.taskExecutions; + const tasks = executions.map(execution => execution.task); + + const context = startPoint.getContext(); + const previewsWidget = await this.previewUrlsWidgetFactory.createWidget({ tasks: tasks }); + + const panel = this.providePanel(); + panel.webview.html = previewsWidget.getHtml(); + panel.webview.onDidReceiveMessage(message => this.onMessageReceived(message), undefined, context.subscriptions); + panel.onDidDispose(() => { this.currentPanel = undefined; }, undefined, context.subscriptions); + } + + // tslint:disable-next-line:no-any + private onMessageReceived(message: any) { + if (message.command !== 'preview') { + return; + } + + const url = message.url; + if (EXTERNALLY_CHOICE === message.choice) { + this.previewUrlOpenService.previewExternally(url); + return; + } + + if (INTERNALLY_CHOICE === message.choice) { + this.previewUrlOpenService.previewInternally(url); + } + } + + private providePanel(): theia.WebviewPanel { + if (this.currentPanel) { + // TODO improve way of updating webview panel + // depends on https://github.com/theia-ide/theia/issues/4342 and https://github.com/theia-ide/theia/issues/4339 + this.currentPanel.dispose(); + } + + return this.currentPanel = theia.window.createWebviewPanel(PREVIEW_URL_VIEW_TYPE, PREVIEW_URL_TITLE, { area: theia.WebviewPanelTargetArea.Bottom }, { + enableScripts: true, + localResourceRoots: [theia.Uri.file(path.join(startPoint.getContext().extensionPath, 'resources'))] + }); + } + + private async setStatusBarPreviewUrlItem() { + const previewCommandSubscription = theia.commands.registerCommand(STATUS_BAR_PREVIEW, () => this.showPreviews()); + startPoint.getSubscriptions().push(previewCommandSubscription); + + const item = await theia.window.createStatusBarItem(theia.StatusBarAlignment.Left); + + item.text = `$(link) ${STATUS_BAR_PREVIEW.title}`; + item.tooltip = STATUS_BAR_PREVIEW.label; + item.command = STATUS_BAR_PREVIEW.id; + item.show(); + } +} diff --git a/plugins/task-plugin/src/task-plugin-backend.ts b/plugins/task-plugin/src/task-plugin-backend.ts new file mode 100644 index 000000000..84190f761 --- /dev/null +++ b/plugins/task-plugin/src/task-plugin-backend.ts @@ -0,0 +1,58 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import 'reflect-metadata'; +import { container } from './che-task-backend-module'; +import * as theia from '@theia/plugin'; +import * as che from '@eclipse-che/plugin'; +import { CHE_TASK_TYPE } from './task/task-protocol'; +import { CheTaskProvider } from './task/che-task-provider'; +import { CheTaskRunner } from './task/che-task-runner'; +import { ServerVariableResolver } from './variable/server-variable-resolver'; +import { ProjectPathVariableResolver } from './variable/project-path-variable-resolver'; +import { CheTaskEventsHandler } from './preview/task-events-handler'; +import { TasksPreviewManager } from './preview/tasks-preview-manager'; + +let pluginContext: theia.PluginContext; + +export async function start(context: theia.PluginContext) { + pluginContext = context; + + const сheTaskEventsHandler = container.get(CheTaskEventsHandler); + сheTaskEventsHandler.init(); + + const tasksPreviewManager = container.get(TasksPreviewManager); + tasksPreviewManager.init(); + + const serverVariableResolver = container.get(ServerVariableResolver); + serverVariableResolver.registerVariables(); + + const projectPathVariableResolver = container.get(ProjectPathVariableResolver); + projectPathVariableResolver.registerVariables(); + + const cheTaskProvider = container.get(CheTaskProvider); + const taskProviderSubscription = theia.tasks.registerTaskProvider(CHE_TASK_TYPE, cheTaskProvider); + getSubscriptions().push(taskProviderSubscription); + + const cheTaskRunner = container.get(CheTaskRunner); + const taskRunnerSubscription = await che.task.registerTaskRunner(CHE_TASK_TYPE, cheTaskRunner); + getSubscriptions().push(taskRunnerSubscription); +} + +export function stop() { } + +export function getContext(): theia.PluginContext { + return pluginContext; +} + +// tslint:disable-next-line:no-any +export function getSubscriptions(): { dispose(): any }[] { + return pluginContext.subscriptions; +} diff --git a/plugins/task-plugin/src/task/che-task-provider.ts b/plugins/task-plugin/src/task/che-task-provider.ts new file mode 100644 index 000000000..2c2c914a4 --- /dev/null +++ b/plugins/task-plugin/src/task/che-task-provider.ts @@ -0,0 +1,97 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as che from '@eclipse-che/plugin'; +import { che as cheApi } from '@eclipse-che/api'; +import { Task } from '@theia/plugin'; +import { CHE_TASK_TYPE, MACHINE_NAME_ATTRIBUTE, PREVIEW_URL_ATTRIBUTE, CheTaskDefinition, Target } from './task-protocol'; +import { MachinesPicker } from '../machine/machines-picker'; +import { CheWorkspaceClient } from '../che-workspace-client'; + +/** Reads the commands from the current Che workspace and provides it as Task Configurations. */ +@injectable() +export class CheTaskProvider { + @inject(MachinesPicker) + protected readonly machinePicker!: MachinesPicker; + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + async provideTasks(): Promise { + const commands = await this.cheWorkspaceClient.getCommands(); + return commands.map(command => this.toTask(command)); + } + + async resolveTask(task: Task): Promise { + const taskDefinition = task.definition; + const taskType = taskDefinition.type; + if (taskType !== CHE_TASK_TYPE) { + throw new Error(`Unsupported task type: ${taskType}`); + } + + const cheTaskDefinition = taskDefinition as CheTaskDefinition; + const target = cheTaskDefinition.target; + const resultTarget: Target = {}; + + if (target && target.workspaceId) { + resultTarget.workspaceId = target.workspaceId; + } else { + resultTarget.workspaceId = await this.cheWorkspaceClient.getWorkspaceId(); + } + + if (target && target.machineName) { + resultTarget.machineName = target.machineName; + } else { + resultTarget.machineName = await this.machinePicker.pick(); + } + + const command = await che.variables.resolve(cheTaskDefinition.command); + return { + definition: { + type: taskType, + command: command, + target: resultTarget, + previewUrl: cheTaskDefinition.previewUrl + }, + name: task.name, + source: task.source, + execution: task.execution + }; + } + + private toTask(command: cheApi.workspace.Command): Task { + return { + definition: { + type: CHE_TASK_TYPE, + command: command.commandLine, + target: { + machineName: this.getCommandAttribute(command, MACHINE_NAME_ATTRIBUTE) + }, + previewUrl: this.getCommandAttribute(command, PREVIEW_URL_ATTRIBUTE) + }, + name: `${command.name}`, + source: CHE_TASK_TYPE, + }; + } + + private getCommandAttribute(command: cheApi.workspace.Command, attrName: string): string | undefined { + if (!command.attributes) { + return undefined; + } + + for (const attr in command.attributes) { + if (attr === attrName) { + return command.attributes[attr]; + } + } + return undefined; + } +} diff --git a/plugins/task-plugin/src/task/che-task-runner.ts b/plugins/task-plugin/src/task/che-task-runner.ts new file mode 100644 index 000000000..7ec05d7f6 --- /dev/null +++ b/plugins/task-plugin/src/task/che-task-runner.ts @@ -0,0 +1,92 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable, inject } from 'inversify'; +import * as che from '@eclipse-che/plugin'; +import { CHE_TASK_TYPE } from './task-protocol'; +import { MachineExecClient, MachineExec } from '../machine/machine-exec-client'; +import { TerminalWidgetFactory } from '../machine/terminal-widget'; +import { ProjectPathVariableResolver } from '../variable/project-path-variable-resolver'; +import { CheWorkspaceClient } from '../che-workspace-client'; + +// CHE task gets ID at creating in che task service +// https://github.com/eclipse/che-theia/blob/c515f75044f9099820c3b18afb8de83f263d671a/extensions/eclipse-che-theia-plugin-ext/src/node/che-task-service.ts#L89 +const STUB_TASK_ID: number = -1; + +@injectable() +export class CheTaskRunner { + + @inject(MachineExecClient) + protected readonly machineExecClient!: MachineExecClient; + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + @inject(TerminalWidgetFactory) + protected readonly terminalWidgetFactory!: TerminalWidgetFactory; + + @inject(ProjectPathVariableResolver) + protected readonly projectPathVariableResolver!: ProjectPathVariableResolver; + + /** + * Runs a task from the given task configuration which must have a target property specified. + */ + async run(taskConfig: che.TaskConfiguration, ctx?: string): Promise { + const { type, label, ...definition } = taskConfig; + if (type !== CHE_TASK_TYPE) { + throw new Error(`Unsupported task type: ${type}`); + } + + const target = definition.target; + if (!target) { + throw new Error("Che task config must have 'target' property specified"); + } + + const workspaceId = target.workspaceId; + if (!workspaceId) { + throw new Error("Che task config must have 'target.workspaceId' property specified"); + } + + const machineName = target.machineName; + if (!machineName) { + throw new Error("Che task config must have 'target.machineName' property specified"); + } + + const machineExec: MachineExec = { + identifier: { + machineName: machineName, + workspaceId: workspaceId + }, + cmd: ['sh', '-c', taskConfig.command], + tty: true + }; + + try { + const execId = await this.machineExecClient.getExecId(machineExec); + const terminalWidget = await this.terminalWidgetFactory.createWidget({ title: taskConfig.label, terminalId: execId }); + terminalWidget.connectTerminalProcess(); + + return { + kill: () => { + throw new Error('Stopping a Che task currently is not supported.'); + }, + getRuntimeInfo: () => + ({ + taskId: STUB_TASK_ID, + ctx: ctx, + config: taskConfig + }) + }; + } catch (error) { + console.error('Failed to execute Che command:', error); + throw new Error(`Failed to execute Che command: ${error.message}`); + } + } +} diff --git a/plugins/task-plugin/src/task/task-protocol.ts b/plugins/task-plugin/src/task/task-protocol.ts new file mode 100644 index 000000000..2f8c85627 --- /dev/null +++ b/plugins/task-plugin/src/task/task-protocol.ts @@ -0,0 +1,26 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { TaskDefinition } from '@theia/plugin'; + +export const CHE_TASK_TYPE: string = 'che'; +export const MACHINE_NAME_ATTRIBUTE: string = 'machineName'; +export const PREVIEW_URL_ATTRIBUTE: string = 'previewUrl'; + +export interface CheTaskDefinition extends TaskDefinition { + readonly target?: Target, + readonly command: string, + readonly previewUrl?: string +} + +export interface Target { + workspaceId?: string, + machineName?: string +} diff --git a/plugins/task-plugin/src/variable/project-path-variable-resolver.ts b/plugins/task-plugin/src/variable/project-path-variable-resolver.ts new file mode 100644 index 000000000..b46d9c53c --- /dev/null +++ b/plugins/task-plugin/src/variable/project-path-variable-resolver.ts @@ -0,0 +1,86 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { injectable } from 'inversify'; +import Uri from 'vscode-uri'; +import * as che from '@eclipse-che/plugin'; +import * as theia from '@theia/plugin'; +import * as startPoint from '../task-plugin-backend'; + +const VARIABLE_NAME = 'current.project.path'; +const SELECTED_CONTEXT_COMMAND = 'theia.plugin.workspace.selectedContext'; +const PROJECTS_ROOT_VARIABLE = 'CHE_PROJECTS_ROOT'; +const ERROR_MESSAGE_TEMPLATE = 'Can not resolve \'current.project.path\' variable.'; +/** + * Contributes the variable for getting path for current project as a relative path to the first directory under the root workspace. + */ +@injectable() +export class ProjectPathVariableResolver { + private projectsRoot: string; + private isResolved: boolean = false; + + async registerVariables(): Promise { + this.projectsRoot = await theia.env.getEnvVariable(PROJECTS_ROOT_VARIABLE); + + const variableSubscription = await che.variables.registerVariable(this.createVariable()); + startPoint.getSubscriptions().push(variableSubscription); + } + + async resolve(): Promise { + if (!this.projectsRoot) { + return this.onError('Projects root is not set'); + } + + const selections = await theia.commands.executeCommand(SELECTED_CONTEXT_COMMAND); + if (selections.length < 1) { + return this.onError('Please select a project.'); + } + + const selection = selections[0]; + const selectionPath = selection.path; + const workspaceFolder = theia.workspace.getWorkspaceFolder(theia.Uri.file(selectionPath)); + if (!workspaceFolder) { + return this.onError('Selection doesn\'t match any workspace folder.'); + } + + const workspaceFolderPath = workspaceFolder.uri.path; + if (workspaceFolderPath === this.projectsRoot) { + const splittedSelectionUri = selectionPath.substring(workspaceFolderPath.length).split('/'); + const project = splittedSelectionUri.shift() || splittedSelectionUri.shift(); + + this.isResolved = true; + return `${this.projectsRoot}/${project}`; + } + + if (workspaceFolderPath.startsWith(this.projectsRoot)) { + this.isResolved = true; + return workspaceFolderPath; + } + + return this.onError('The selection isn\'t under the current workspace root folder.'); + } + + private createVariable(): che.Variable { + return { + name: VARIABLE_NAME, + description: 'The path of the project root folder', + resolve: async () => this.resolve(), + isResolved: this.isResolved + }; + } + + private onError(error?: string) { + this.isResolved = false; + + const errorMessage = error ? `${ERROR_MESSAGE_TEMPLATE} ${error}` : ERROR_MESSAGE_TEMPLATE; + theia.window.showErrorMessage(errorMessage); + return Promise.reject(errorMessage); + } +} diff --git a/plugins/task-plugin/src/variable/server-variable-resolver.ts b/plugins/task-plugin/src/variable/server-variable-resolver.ts new file mode 100644 index 000000000..1e98bdc7d --- /dev/null +++ b/plugins/task-plugin/src/variable/server-variable-resolver.ts @@ -0,0 +1,57 @@ +/********************************************************************* + * Copyright (c) 2019 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { inject, injectable } from 'inversify'; +import * as che from '@eclipse-che/plugin'; +import * as startPoint from '../task-plugin-backend'; +import { CheWorkspaceClient } from '../che-workspace-client'; + +/** + * Contributes the substitution variables, in form of `server.`, + * which are resolved to the URL of the server of Che machines. + */ +@injectable() +export class ServerVariableResolver { + + @inject(CheWorkspaceClient) + protected readonly cheWorkspaceClient!: CheWorkspaceClient; + + async registerVariables(): Promise { + const machines = await this.cheWorkspaceClient.getMachines(); + for (const machineName in machines) { + if (!machines.hasOwnProperty(machineName)) { + continue; + } + + const servers = machines[machineName].servers!; + + for (const serverName in servers) { + if (!servers.hasOwnProperty(serverName)) { + continue; + } + + const url = servers[serverName].url; + if (url) { + const variableSubscription = await che.variables.registerVariable(this.createVariable(serverName, url)); + startPoint.getSubscriptions().push(variableSubscription); + } + } + } + } + + private createVariable(serverName: string, url: string): che.Variable { + return { + name: `server.${serverName}`, + description: url, + resolve: async () => url, + isResolved: true + }; + } +} diff --git a/plugins/task-plugin/tsconfig.json b/plugins/task-plugin/tsconfig.json new file mode 100644 index 000000000..7fac8ad73 --- /dev/null +++ b/plugins/task-plugin/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../configs/base.tsconfig", + "compilerOptions": { + "lib": [ + "es6", + "webworker" + ], + "rootDir": "src", + "outDir": "lib" + }, + "include": [ + "src", "resources/preview-urls.js" + ] +} diff --git a/plugins/task-plugin/tsfmt.json b/plugins/task-plugin/tsfmt.json new file mode 100644 index 000000000..ad905f319 --- /dev/null +++ b/plugins/task-plugin/tsfmt.json @@ -0,0 +1,18 @@ +{ + "baseIndentSize": 0, + "newLineCharacter": "\n", + "indentSize": 4, + "tabSize": 4, + "indentStyle": 4, + "convertTabsToSpaces": true, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +} diff --git a/yarn.lock b/yarn.lock index 8b8cc4ff6..49e2a672c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,9 +31,9 @@ integrity sha512-kXrUsNJWUkoZfw9wOKgtZH8KYntjXqkyIHNduXMyELFizpV8n94PWBvSj6MeyeKqogKO5QmeC5xvFZS5/I1fkg== "@eclipse-che/plugin@latest": - version "0.0.1-1551794959" - resolved "https://registry.yarnpkg.com/@eclipse-che/plugin/-/plugin-0.0.1-1551794959.tgz#4e2f280ad8e2225acb9b50ed97dcdd22fc94dd91" - integrity sha512-gPpdoIiKsQsJPDtkgTtOKlCP5QyF0HeIdZpZWqbUilcuOXERg5X0hzPtNQGSej7NY/1SMOvZtt78Xs+ph3ZvAA== + version "0.0.1-1552318614" + resolved "https://registry.yarnpkg.com/@eclipse-che/plugin/-/plugin-0.0.1-1552318614.tgz#bd892858e37ba4b14525270b263202b4f35a1456" + integrity sha512-19F/8EjFbcpxIAzU6tR/J1mCbeokBkcaVg9GWwOBL6X/55EQN8IvZruLsdz12CVdM7hfZTo0TxsPW+Vr35I2OQ== dependencies: "@eclipse-che/api" latest @@ -696,26 +696,28 @@ url-template "^2.0.8" "@octokit/plugin-enterprise-rest@^2.1.1": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-2.1.2.tgz#259bd5ac00825a8a482ff6584ae9aed60acd0b41" - integrity sha512-EWKrEqhSgzqWXI9DuEsEI691PNJppm/a4zW62//te27I8pYI5zSNVR3wtNUk0NWPlvs7054YzGZochwbUbhI8A== + version "2.2.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-2.2.0.tgz#7ee72a187e8a034d6fc21b8174bef40e34c22f02" + integrity sha512-/uXIvjK5bxmMKI1MDZXxVSiheiyvqv7GCWjoN1s43jF3MMrfqnErOwbZkreeL0CgO1R2lNW6dESDV5NbRiWEQA== -"@octokit/request@2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.4.0.tgz#729fc5ea7654ab7cb74e0ae1935f69462a33b5e6" - integrity sha512-Bm2P0duVRUeKhyepNyFg5GX+yhCK71fqdtpsw5Rz+PQPjSha8HYwPMF5QfpzpD8b6/Xl3xhTgu3V90W362gZ1A== +"@octokit/request@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.4.1.tgz#98c4d6870e4abe3ccdd2b9799034b4ae3f441c30" + integrity sha512-nN8W24ZXEpJQJoVgMsGZeK9FOzxkc39Xn9ykseUpPpPMNEDFSvqfkCeqqKrjUiXRm72ubGLWG1SOz0aJPcgGww== dependencies: "@octokit/endpoint" "^3.1.1" + deprecation "^1.0.1" is-plain-object "^2.0.4" node-fetch "^2.3.0" + once "^1.4.0" universal-user-agent "^2.0.1" "@octokit/rest@^16.16.0": - version "16.16.4" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.16.4.tgz#c168cd14d7b9e43074d0e5b091e5a8d66b924610" - integrity sha512-9Itw0hQgEf26hg4IOsI7HYKbJBRYaTAAD0pA9ZxXyXjzTUU36Wx+EWkl8w4PNSdX2/79Ggdl6ekD5z1h3jyc7A== + version "16.17.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.17.0.tgz#3a8c0ff5290e25a48b11f6957aa90791c672c91e" + integrity sha512-1RB7e4ptR/M+1Ik3Qn84pbppbSadBaCtpgFqgqsXn6s4ZVE6hqW9SOm6UW5yd3KT7ObVfdYUkhMlgR937oKyDw== dependencies: - "@octokit/request" "2.4.0" + "@octokit/request" "2.4.1" before-after-hook "^1.4.0" btoa-lite "^1.0.0" lodash.get "^4.4.2" @@ -835,10 +837,10 @@ dependencies: execa "^0.2.2" -"@theia/application-package@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-0.5.0-next.df62ad04.tgz#b8f10f2bf22849392a85e7f3501f3f1434774af2" - integrity sha512-GW4Idojk1HRaW20yYGZesVOUUx0eY/huusx1XPK915tGixqRFrK9IH21s0/U96b+nFBwtLhGMLoh4u5s2ST8vg== +"@theia/application-package@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-0.5.0-next.ed309e6b.tgz#b21ec2dc4fc76e59ba4116ae61298b4a80f11635" + integrity sha512-fCkvHJ8ACDgc3BWitFqIBdv0I6F5A44MOn5BVyq3506QzfaP/6gzm0V8Tbm84VBV0A/v+BlDZXCMqctOWzbQjA== dependencies: "@types/fs-extra" "^4.0.2" "@types/request" "^2.0.3" @@ -851,22 +853,22 @@ semver "^5.4.1" write-json-file "^2.2.0" -"@theia/console@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/console/-/console-0.5.0-next.df62ad04.tgz#ed3f41d7478300239b4c2e21eb985b5fc2426ec5" - integrity sha512-77Pd388OCVir4D7FVffOYlIHB+2iJGOAcLeVNd1mFjpQw3CT+xwsELY5vaXTKEBVWAJsJzV70CM39KzmRNBMNA== +"@theia/console@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/console/-/console-0.5.0-next.ed309e6b.tgz#253b4d23e6590f353c361d1bcc71816453a274b2" + integrity sha512-qYWy5SF45BBB+pqgxC3jF8EHNULQHXIDTHZyM2LwnTE+zghQkeOCNLZcYMBF/+kWgswi+4YSEEEUUa7WSpHCEQ== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/monaco" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/monaco" "0.5.0-next.ed309e6b" anser "^1.4.7" -"@theia/core@0.5.0-next.df62ad04", "@theia/core@next": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/core/-/core-0.5.0-next.df62ad04.tgz#40e1fa66c106b1da236f5a7a471af79f78dc8486" - integrity sha512-4daMj3Z65nuqLXxUWuVoLoVhW+7JBnTLKyL+RZaqAsaeD2Y8F3XXROairdVKtUDeHcpslC7ng9doeq4iI3iTPg== +"@theia/core@0.5.0-next.ed309e6b", "@theia/core@next": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/core/-/core-0.5.0-next.ed309e6b.tgz#0e22b6b62bb1cb134abcd08e83b6f1dab4eede2d" + integrity sha512-aY+kPluunDqrJO150Zu+LPI/c1Wa5s2MtXVMi8/w71XqdGJ2jU1F1zqBgchjIh22hz81aD92lVCNJonQLjGFMg== dependencies: "@phosphor/widgets" "^1.5.0" - "@theia/application-package" "0.5.0-next.df62ad04" + "@theia/application-package" "0.5.0-next.ed309e6b" "@types/body-parser" "^1.16.4" "@types/bunyan" "^1.8.0" "@types/express" "^4.16.0" @@ -905,62 +907,63 @@ ws "^5.2.2" yargs "^11.1.0" -"@theia/debug@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-0.5.0-next.df62ad04.tgz#a98b309fe71e5d1b1a405bdef48964e1d454fed1" - integrity sha512-KmTjaBB96uTcZ/nV36Geg5l1DECW+Hix3jbbONUTFv6kbQe+NL50E3Ji/UnO73ZVTLcrSIGQvIkPA+nmTpGmkQ== - dependencies: - "@theia/console" "0.5.0-next.df62ad04" - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/json" "0.5.0-next.df62ad04" - "@theia/markers" "0.5.0-next.df62ad04" - "@theia/monaco" "0.5.0-next.df62ad04" - "@theia/output" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/terminal" "0.5.0-next.df62ad04" - "@theia/variable-resolver" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" +"@theia/debug@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-0.5.0-next.ed309e6b.tgz#c11649fea2a04f638bf1b665bd9bfbdcb6055343" + integrity sha512-s2QqCrC5ONaWEVSk7LI/uA98Y2TJUu1sBK9Eb8pb+qFUGmLS8UIONAiMCVz3uE6pqhzsN5B1WPI97bjAXABi4A== + dependencies: + "@theia/console" "0.5.0-next.ed309e6b" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/json" "0.5.0-next.ed309e6b" + "@theia/markers" "0.5.0-next.ed309e6b" + "@theia/monaco" "0.5.0-next.ed309e6b" + "@theia/output" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/terminal" "0.5.0-next.ed309e6b" + "@theia/variable-resolver" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" "@types/p-debounce" "^1.0.0" jsonc-parser "^2.0.2" mkdirp "^0.5.0" p-debounce "^1.0.0" + requestretry "^3.1.0" tar "^4.0.0" unzip-stream "^0.3.0" vscode-debugprotocol "^1.32.0" vscode-uri "^1.0.1" -"@theia/editor@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-0.5.0-next.df62ad04.tgz#9a15af3a95343513f3dd1bc105f58d6107d7930e" - integrity sha512-nUU55erIwbL96RnXGtky70n17o6tOVye+Z1638ETYjkCMdM1wCFI05PK/rAI1Wdr1x4+6/e5a2ZnyETZuNYJrw== +"@theia/editor@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-0.5.0-next.ed309e6b.tgz#3253287296392a7d4bf97e3964e48b5931ab2fcc" + integrity sha512-hzNM50liaNoldxSTv2/hczOdhEiwoFxMaimo1SxU2qO1yjoMFqC745PBr1DrFKrmTtyZACBv9G6HsNNcAGF6WA== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/languages" "0.5.0-next.df62ad04" - "@theia/variable-resolver" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/languages" "0.5.0-next.ed309e6b" + "@theia/variable-resolver" "0.5.0-next.ed309e6b" "@types/base64-arraybuffer" "0.1.0" base64-arraybuffer "^0.1.5" -"@theia/file-search@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-0.5.0-next.df62ad04.tgz#3072b4660bdc598b7f0d6751e6c0ffc266094435" - integrity sha512-2qRoda7hsXdHXdf1yXr2VFb63kEUqeqJwsZKrdrcAmfiAFiredQdKu7wr0xH4qdEvOhpCOPqarR9OYhw2ekhEg== +"@theia/file-search@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-0.5.0-next.ed309e6b.tgz#4377d455eb38c7b1bac8e410c515f1d1c7b7a1d1" + integrity sha512-yvOFZlC9mI0wl/WJf40SO1uCmmhViA4t1HHTN8a7mYuayIqPfXmJZS7NObogAqnGf2CtI1jbdLTqpYsKXj7wuw== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" fuzzy "^0.1.3" vscode-ripgrep "^1.2.4" -"@theia/filesystem@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-0.5.0-next.df62ad04.tgz#4dad0cca1fc5de79d7d1bfcbac015ab4e835499b" - integrity sha512-Vcep34ml6RVEyHP5VMgfcuRZwtesOJ7Od5lYftOjtJB0GegGlncy1DIN+st2YvRgWBBl9LM2UcLnUGtcQ/lKxg== +"@theia/filesystem@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-0.5.0-next.ed309e6b.tgz#996c50f46c7fc775a08e4dc9dc4b46721a46b21e" + integrity sha512-GORoPGZXYzsi8baJzyFZIXKAegCFkvh/6Y54gKCRURrU+poRRyFYnEmPG8B5feR6xUbzeEGsfOsKwMUCKZSO+A== dependencies: - "@theia/core" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" "@types/base64-js" "^1.2.5" "@types/body-parser" "^1.17.0" "@types/fs-extra" "^4.0.2" @@ -984,59 +987,59 @@ uuid "^3.2.1" zip-dir "^1.0.2" -"@theia/json@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/json/-/json-0.5.0-next.df62ad04.tgz#e8c13a73d0b0fd6f4d4c73046aca88065ee5acf6" - integrity sha512-pZ2lb7Css+Lv6Tamaf5wfdjEWWVr9KNWBNJPCvMY0etUA3QXqrhet6taKhbydb5fUwdPio/zfHEDrVkW9rFaAQ== +"@theia/json@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/json/-/json-0.5.0-next.ed309e6b.tgz#7219ca06b5c4bf732b481c71909ddf81c62e69a2" + integrity sha512-Bq6WgWAaD2jj0scu3PndIlfpXM9gc4uK61+DAaS1kPnK+l5MuDal6YzUEKYMWGl9yBavrYXoiWoc3ymctBEk8g== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/languages" "0.5.0-next.df62ad04" - "@theia/monaco" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/languages" "0.5.0-next.ed309e6b" + "@theia/monaco" "0.5.0-next.ed309e6b" vscode-json-languageserver "^1.0.1" -"@theia/languages@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/languages/-/languages-0.5.0-next.df62ad04.tgz#ca688871f60190313bc6a6efd9062614cb4e0cf5" - integrity sha512-j2ZOfH5VmwThKNEZ7Fnd3KOdFTP/h9nKwrzA0Ro5GU9a6ZwJJTuc/tG3EE8yBeb2MBKQH7pF8J7j+TxWY1VwIw== +"@theia/languages@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/languages/-/languages-0.5.0-next.ed309e6b.tgz#48bc9bf5f55dfaab7c326832fa54b04a0f1df44f" + integrity sha512-qtQoQHZWnPCoCA2DWgaBGCEZ9nGapY76eGi6uBeXo1wIUvUYY8nvDdIpxm1VDOKA4uzeviVIx2+/Pb6agVJwKA== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/output" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/output" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" "@typefox/monaco-editor-core" "^0.14.6" "@types/uuid" "^3.4.3" monaco-languageclient "^0.9.0" uuid "^3.2.1" -"@theia/markers@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-0.5.0-next.df62ad04.tgz#0c3f133dc33072427a3d6fc6ac7d3961cb6206cb" - integrity sha512-WNeaJJaDtYLi9TvLamwb05ti00424HIXkZEPTCwvbuUig3mOX7x/RjDYTHrQn0qA7Yxd50VjVgh3s0iACLYUfw== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/navigator" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" - -"@theia/messages@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-0.5.0-next.df62ad04.tgz#6ecfa9075dfc81adc4d771bc4429f0adcfa364bf" - integrity sha512-ScKJ90H4wjYH/SYON+0wy+DGnR1phfE+AOs0wrKvPvw1lmmSZVDYo8C9cRr73n1jjo4/9Ax0nQhFchUXgghfhQ== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - -"@theia/monaco@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-0.5.0-next.df62ad04.tgz#e6136eb4b8ba0a7223a411bc55602a591e521375" - integrity sha512-oxdrmIJvxbY1VNVmieP+m4msbipfcSNg7JFLTNkCIaopYwHzOWrsrCZOxKSxOTm1GW7YftfXP9OEA1QS7SbQCQ== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/languages" "0.5.0-next.df62ad04" - "@theia/markers" "0.5.0-next.df62ad04" - "@theia/outline-view" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" +"@theia/markers@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-0.5.0-next.ed309e6b.tgz#1e303c50a8ff0abc42c90103037b5ad06233c1e9" + integrity sha512-0t5DICAOo0xKnyH8voVVqnnkwheJ6J9VfJKPqeh53wNoxUSonYOEUw4xnN4UXUzA0l9OiZKYFo6+j0T8HmCStQ== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/navigator" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" + +"@theia/messages@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-0.5.0-next.ed309e6b.tgz#426174dd27e3d3a2ca16cd7aa76de0d2205dd9c4" + integrity sha512-iQIOBYo3xaqyIOc6I6N+VT6+bNLc4Dh+vvrVjF3xIFPsGi1n5QiN8imAh9+jTYAyly0sq8rbRLUtsNYwq3je9A== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + +"@theia/monaco@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-0.5.0-next.ed309e6b.tgz#47dff6c55e9376f2da79d8db97b1355d2a0fdeaa" + integrity sha512-/wn2VZccmhayCMAR/IWth4O8BvBOApezYWdrB7uTJhebQbhj4FN77gmOJtwY/hI30BcrDQcQyXidY/jxPITmXQ== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/languages" "0.5.0-next.ed309e6b" + "@theia/markers" "0.5.0-next.ed309e6b" + "@theia/outline-view" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" deepmerge "2.0.1" jsonc-parser "^2.0.2" monaco-css "^2.0.1" @@ -1044,14 +1047,14 @@ onigasm "^2.1.0" vscode-textmate "^4.0.1" -"@theia/navigator@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-0.5.0-next.df62ad04.tgz#628c4e9c8739538acc9fd778d82e75813ebabfa8" - integrity sha512-9biv5ZAtSaphiLItr3PIIUkyeVqWjRoHC9Ial6l83Lfee+mfkOwRu5An9Ok6x48ouGDm24qOrXDneTXlDkqwuA== +"@theia/navigator@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-0.5.0-next.ed309e6b.tgz#cb33ab4353e18e4b43a4a867737fa0792732b9ce" + integrity sha512-OFUxWPFgbYzeZ8Wz3HtsdTjP8V0IKmN1dPO28JXbqwwjPpyg6OozTuuxCWa7+AoKhXfh+NdFeVITlBD5QPPR8Q== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" fuzzy "^0.1.3" minimatch "^3.0.4" @@ -1062,39 +1065,39 @@ dependencies: nan "2.10.0" -"@theia/outline-view@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-0.5.0-next.df62ad04.tgz#96ae46973bf7b826f499d0225bd3c77a1987fc0b" - integrity sha512-cjXfgMqvj2UtlIWQ4Y7AXJ1/2btcAskUqISiUqyLrOaNvpRdXHvy/JVxWzSLyb/nfJqtHMlHnQpHm6LppWLphw== +"@theia/outline-view@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-0.5.0-next.ed309e6b.tgz#827717c53f2b70ef75df70c28b16ad1f95b29341" + integrity sha512-r3cusNV1b9LgbmIIz2lvHyDtvIjQzo5BhyTb3rj0/1v/Pil0YZS4h6+MnGme0cDdAaHogyul0z+wlRX+OYnknQ== dependencies: - "@theia/core" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" -"@theia/output@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/output/-/output-0.5.0-next.df62ad04.tgz#7200352d8cee9b44d491879497abad1441d63a4e" - integrity sha512-9UkW9hMeYIFKdPvoZkD11ZtddvH4UK+oadRGX+Ao9821duqBrnPhspRQ3NbVGpKSHPek8jImXXZ48IpvlOT4zQ== +"@theia/output@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/output/-/output-0.5.0-next.ed309e6b.tgz#32211548c24f7a76fb5ebf6b1ed77d2a4387442d" + integrity sha512-rwNowDjOXgl7BHeMjYbOStpF3jmY+K4OfwjmKAeBIJRspyHdzaaXFi7smgtYrEwi6TpyzCceReNB1ZPx3xolLA== dependencies: - "@theia/core" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" "@theia/plugin-ext@next": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/plugin-ext/-/plugin-ext-0.5.0-next.df62ad04.tgz#5b062e586c6967c5cdbca53b6d56de1b793f0b92" - integrity sha512-TYf8rznXxutKZ5JAWEHfx/lQjL1kKHyAGy4onHBhv873TXm53z46u0cyufjLq4X0zOLe8pnopkmhyzjDCnsKqA== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/debug" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/file-search" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/markers" "0.5.0-next.df62ad04" - "@theia/messages" "0.5.0-next.df62ad04" - "@theia/monaco" "0.5.0-next.df62ad04" - "@theia/navigator" "0.5.0-next.df62ad04" - "@theia/plugin" "0.5.0-next.df62ad04" - "@theia/preferences" "0.5.0-next.df62ad04" - "@theia/search-in-workspace" "0.5.0-next.df62ad04" - "@theia/task" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/plugin-ext/-/plugin-ext-0.5.0-next.ed309e6b.tgz#5efa61e73bec8237a9a5bf98b77b43cccf151bef" + integrity sha512-Owf+Bg+Sm3cOobgAxTzSR+uNNr8PCofwpI9OL2mBOZwEJZYtLk9HAXbNshzDQorQIaJYp0fU0HDNYl6cLhGMqQ== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/debug" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/file-search" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/markers" "0.5.0-next.ed309e6b" + "@theia/messages" "0.5.0-next.ed309e6b" + "@theia/monaco" "0.5.0-next.ed309e6b" + "@theia/navigator" "0.5.0-next.ed309e6b" + "@theia/plugin" "0.5.0-next.ed309e6b" + "@theia/preferences" "0.5.0-next.ed309e6b" + "@theia/search-in-workspace" "0.5.0-next.ed309e6b" + "@theia/task" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" decompress "^4.2.0" jsonc-parser "^2.0.2" lodash.clonedeep "^4.5.0" @@ -1104,9 +1107,9 @@ vscode-uri "^1.0.1" "@theia/plugin-packager@latest": - version "0.0.1-1550255725" - resolved "https://registry.yarnpkg.com/@theia/plugin-packager/-/plugin-packager-0.0.1-1550255725.tgz#4a829848555e272e9102d166b3a9c74327348c72" - integrity sha512-cgPOkkCLv1MzkuufBfDla1C5JsbeOGTkG7nDHsFtt+o63aHjU5VDGE6x4K6p5HUYQbXVB1EOgxTXj+QW4iYr1w== + version "0.0.1-1551941037" + resolved "https://registry.yarnpkg.com/@theia/plugin-packager/-/plugin-packager-0.0.1-1551941037.tgz#859d408be29c6c910f3156ee3ad7c0eb8bfe0ab4" + integrity sha512-Z+7mZvDH6v001FZhulNupYHtRce5guQqJlY8p0YIvmC3fcrjx8mczEyEE65rlaCKGWeeXcK+dKR3klR+aEdi/g== dependencies: archiver "2.1.1" chalk "2.4.1" @@ -1121,103 +1124,103 @@ resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-0.3.19.tgz#eb1ea2d8311097535b6613ea6d554ff93bb4efc8" integrity sha512-8iKIPE7UQfaxbN/p+eHqT4wmbEgdVGxMMhzczqrX0x9sFwXxVOipC9urdfG8UvNWQO3dXCssxVslNF56jScofg== -"@theia/plugin@0.5.0-next.df62ad04", "@theia/plugin@next": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-0.5.0-next.df62ad04.tgz#4752443e78cb1fb18800afd226f6ff20264f7574" - integrity sha512-fpI+buTLVnREhqRnWlhMLugwoIQJWO2c/a8oesUX+mgyLQtAtt/1G8mu3WYscVdTJd0cifRNDAlSjd7pRu4jNQ== +"@theia/plugin@0.5.0-next.ed309e6b", "@theia/plugin@next": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-0.5.0-next.ed309e6b.tgz#ac6b61fecca4685c4f321793a24dd54001a7d5e3" + integrity sha512-ZbIKViaSB5keloDRIaZkiqpPxttdWZYoszhU4uSECwyZMUFThKUbDIfZSamijSQ8KfhlzBsD9lr0mgsbBy323A== "@theia/plugin@latest": version "0.4.0" resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-0.4.0.tgz#61d992fbf6d1d7e56dbdeb64d9f5eb83884485d8" integrity sha512-UZUZNTq67hRZ5vwyvop5f3optpNk/fCXY55Jzbvw37/tJvV/oGtHXGHg6i7bWh33xYTWTTdWPYOglKnvXNvHzw== -"@theia/preferences@0.5.0-next.df62ad04", "@theia/preferences@next": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-0.5.0-next.df62ad04.tgz#67aeedca94725d4e6f2d58a6d78a919ac6539117" - integrity sha512-89ahkQuwPoEKc8tOUgCP7slK+RMwZ7C+jrtAy6zUcTAkbLXlMBsb6GUSGgWkYB1aODuLaLwM9CyhYq0ftARchA== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/json" "0.5.0-next.df62ad04" - "@theia/monaco" "0.5.0-next.df62ad04" - "@theia/userstorage" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" +"@theia/preferences@0.5.0-next.ed309e6b", "@theia/preferences@next": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-0.5.0-next.ed309e6b.tgz#337084b5e8332af3c407e4c8fc02335bda7c5f8c" + integrity sha512-BkYwJ1TS08OMV45UyTYQpNZx6dk5MEw6na3CHOK3WnZMDtTPrph8JjO0jC71DnSeWGhZ/CnuvzxgKw7Ouqchaw== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/json" "0.5.0-next.ed309e6b" + "@theia/monaco" "0.5.0-next.ed309e6b" + "@theia/userstorage" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" "@types/fs-extra" "^4.0.2" fs-extra "^4.0.2" jsonc-parser "^2.0.2" -"@theia/process@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/process/-/process-0.5.0-next.df62ad04.tgz#162d5492b5858730b44746cb6fc3c052156029fd" - integrity sha512-lz2NlrvzKPoKJ7DWi3VnlzorjEbWA/4obQCJyz46vvX9n+LkPIDFlkZ0bqDakW4XvtLgnvDTgFrS1n//qw5ruQ== +"@theia/process@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/process/-/process-0.5.0-next.ed309e6b.tgz#d8b80754f3277ddc51185377637b8c94346c9139" + integrity sha512-PCAFs1SP1aM3IWnz8DfuT9TXgPjqrHtqoT4CgVNi6BR84WGhjYI7Tfoe0Rek3qb8W4RJnVKOlBjBPEoTIRrLDg== dependencies: - "@theia/core" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" "@theia/node-pty" "0.7.8-theia004" string-argv "^0.1.1" -"@theia/search-in-workspace@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-0.5.0-next.df62ad04.tgz#c9ec321a8cb43f03d8d4a451f12a8af589cd26c7" - integrity sha512-kMYtGjZQgNzuvw/cUYX9djhYGiTJrY96MUXQD0d9wW+xj638mriRnvz3nryFdhlss+Q7pbzK5QvJFva37WbcMg== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/navigator" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" +"@theia/search-in-workspace@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-0.5.0-next.ed309e6b.tgz#871fbdd3e14b5f372575cc5d05002f2539b70c6d" + integrity sha512-mPFpjpYan9W6xQGloSrq32rzaLfb++YNpNYhdv9Sq9KGOe937JaK8rQpbg1gBBX7nCp8RM4bzlkIbnMMnxwbgQ== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/navigator" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" vscode-ripgrep "^1.2.4" -"@theia/task@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/task/-/task-0.5.0-next.df62ad04.tgz#a4fdf503a0b591736f0366aa8c424d1aa91ae56d" - integrity sha512-JpQi2eKLSrKIELwcF39OIfXQ6ZDjMbzrLu8Wxf8iSyX/L28FllellEEVBIv1dJrtszAyHGMdLKQxqpu/HhUhYg== - dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/markers" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/terminal" "0.5.0-next.df62ad04" - "@theia/variable-resolver" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" +"@theia/task@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/task/-/task-0.5.0-next.ed309e6b.tgz#0bb23757c9fc6d5c378018e15c900000c316ea4c" + integrity sha512-srqQ4f5UTqCaOgjDR34z0jBGmGhcG7spwpUeayJRIUJSQxWxCq9kFG0dbOsAlBSPa54ePreBCWBU5F0MPcCDMw== + dependencies: + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/markers" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/terminal" "0.5.0-next.ed309e6b" + "@theia/variable-resolver" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" jsonc-parser "^2.0.2" -"@theia/terminal@0.5.0-next.df62ad04", "@theia/terminal@next": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-0.5.0-next.df62ad04.tgz#706ca7e928909af646b63fea3a3ef796202c9a41" - integrity sha512-wzMQV7wzCcpvA36ESTjwqy/xWHIOKwobG7Z+24a/bIu2pEOGT8sA+BFQwkFNpXhZNN0ZPyLfUwUnhL/zSxKVSA== +"@theia/terminal@0.5.0-next.ed309e6b", "@theia/terminal@next": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-0.5.0-next.ed309e6b.tgz#c9272ebc86688bc5aa3c6cd064cc80d26e0fb322" + integrity sha512-Q/23R1tUXRMf+RbIlDlQY0mFrSdtsWPZANJwPvYZ9USHY1F6Q4xp1B2AcvaRNzavjdU5Ts9bVsKRxDcMF8cM1Q== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/editor" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/process" "0.5.0-next.df62ad04" - "@theia/workspace" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/editor" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/process" "0.5.0-next.ed309e6b" + "@theia/workspace" "0.5.0-next.ed309e6b" xterm "3.9.2" -"@theia/userstorage@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-0.5.0-next.df62ad04.tgz#7191d683838a94466e8a59b7effbd222e45ad8b4" - integrity sha512-xILbsEWBLTjY5M7QQRQp+61idrMQDAWq8CcXZ8cNx2bkHpE+nkzod0Qhm81bmG0ke9s9x8YagULOy8XCctdezA== +"@theia/userstorage@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-0.5.0-next.ed309e6b.tgz#957a4fbf51635015c7cbe8686809b6e14d2a6a66" + integrity sha512-BiZLP5GUfticurWNNSYId8TctCnaCsBQaCJCCQ5g7EoaK4sX5dm7FLq1IS7Cz2a8dH/0n7ce70cO3nQK5aLaaw== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" -"@theia/variable-resolver@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-0.5.0-next.df62ad04.tgz#4d01eff1461446c71e0b44cbfc8665792cae6595" - integrity sha512-8Efrj6ClmNGhA7Zd65bOCcsAgNF8LYo0bSa4IBgbQNaHAyUmVX6txwHRIgnK8VV1p59+EffyMxHHxGnnhp0NyQ== +"@theia/variable-resolver@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-0.5.0-next.ed309e6b.tgz#a7a6479e859498a66e860ba8a1939d8cee8a5713" + integrity sha512-Xb0yB8cOdOvrvDmZmptUSxUVTXJkIApNaDP4/8Kt2xwPVh2zfVx5y+etCPHH6ZAQBID9Q6Z9EakCA2DZD6C1xA== dependencies: - "@theia/core" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" -"@theia/workspace@0.5.0-next.df62ad04": - version "0.5.0-next.df62ad04" - resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-0.5.0-next.df62ad04.tgz#91607da5562cd84227aafc750c5897c6aeacfc2e" - integrity sha512-Qx8+aB5FE1c8FekfOWoCOqpLv3uYPjQWuulROAmM4IaPFDDYE4t105lXXrMi1dRg0VCmGToSzEFim05Me8MLtg== +"@theia/workspace@0.5.0-next.ed309e6b": + version "0.5.0-next.ed309e6b" + resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-0.5.0-next.ed309e6b.tgz#7cd048bcf0ded8e6ddb3beecfb0f935285bba636" + integrity sha512-ZAbkOHAfW4thbIKcuESDjZfY6/quGmM74oDeL2hIDz+gfa2dZOXOHm/FlItsi4Br3d+KeKNlQauYxAWE5b4+rw== dependencies: - "@theia/core" "0.5.0-next.df62ad04" - "@theia/filesystem" "0.5.0-next.df62ad04" - "@theia/variable-resolver" "0.5.0-next.df62ad04" + "@theia/core" "0.5.0-next.ed309e6b" + "@theia/filesystem" "0.5.0-next.ed309e6b" + "@theia/variable-resolver" "0.5.0-next.ed309e6b" "@types/fs-extra" "^4.0.2" ajv "^6.5.3" fs-extra "^4.0.2" @@ -1249,16 +1252,16 @@ "@types/node" "*" "@types/bunyan@^1.8.0": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@types/bunyan/-/bunyan-1.8.5.tgz#d992adbce8ed20cde634764bd8f269f29f703647" - integrity sha512-7n8ANtxh2c5A/NfCuv8cVtWcgSLdq76MQbtmbInpzXuPw4TSAReUJ+MGHK4m67I4zI3ynCJoABfaeHYJaYSeRg== + version "1.8.6" + resolved "https://registry.yarnpkg.com/@types/bunyan/-/bunyan-1.8.6.tgz#6527641cca30bedec5feb9ab527b7803b8000582" + integrity sha512-YiozPOOsS6bIuz31ilYqR5SlLif4TBWsousN2aCWLi5233nZSX19tFbcQUPdR7xJ8ypPyxkCGNxg0CIV5n9qxQ== dependencies: "@types/node" "*" "@types/caseless@*": - version "0.12.1" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a" - integrity sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A== + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" + integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== "@types/connect@*": version "3.4.32" @@ -1332,9 +1335,9 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.122" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.122.tgz#3e31394c38cf1e5949fb54c1192cbc406f152c6c" - integrity sha512-9IdED8wU93ty8gP06ninox+42SBSJHp2IAamsSYMUY76mshRTeUsid/gtbl8ovnOwy8im41ib4cxTiIYMXGKew== + version "4.14.123" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.123.tgz#39be5d211478c8dd3bdae98ee75bb7efe4abfe4d" + integrity sha512-pQvPkc4Nltyx7G1Ww45OjVqUsJP4UsZm+GWJpigXgkikZqJgRm4c48g027o6tdgubWHwFRF15iFd+Y4Pmqv6+Q== "@types/mime-types@^2.1.0": version "2.1.0" @@ -1352,24 +1355,19 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "11.10.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.10.4.tgz#3f5fc4f0f322805f009e00ab35a2ff3d6b778e42" - integrity sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg== + version "11.11.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.1.tgz#9ee55ffce20f72e141863b0036a6e51c6fc09a1f" + integrity sha512-2azXFP9n4aA2QNLkKm/F9pzKxgYj1SMawZ5Eh9iC21RH3XNcFsivLVU2NhpMgQm7YobSByvIol4c42ZFusXFHQ== "@types/node@11.9.4": version "11.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-11.9.4.tgz#ceb0048a546db453f6248f2d1d95e937a6f00a14" integrity sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA== -"@types/node@^10.11.7": - version "10.12.29" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.29.tgz#c2c8d2d27bb55649fbafe8ea1731658421f38acf" - integrity sha512-J/tnbnj8HcsBgCe2apZbdUpQ7hs4d7oZNTYA5bekWdP0sr2NGsOpI/HRdDroEi209tEvTcTtxhD0FfED3DhEcw== - "@types/node@^8.0.24": - version "8.10.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.42.tgz#d3d8e738e13540a09b3f4a714dac1ffbf8939f7d" - integrity sha512-8LCqostMfYwQs9by1k21/P4KZp9uFQk3Q528y3qtPKQnCJmKz0Em3YzgeNjTNV1FVrG/7n/6j12d4UKg9zSgDw== + version "8.10.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.43.tgz#8d3281a33c92a56038b05d9460a65bc1dcd5735b" + integrity sha512-5m5W13HR2k3cu88mpzlnPBBv5+GyMHtj4F0P83RG4mqoC0AYVYHVMHfF3SgwKNtqEZiZQASMxU92QsLEekKcnw== "@types/p-debounce@^1.0.0": version "1.0.0" @@ -1402,9 +1400,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^16.4.1": - version "16.8.6" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.6.tgz#fa1de3fe56cc9b6afeddc73d093d7f30fd5e31cc" - integrity sha512-bN9qDjEMltmHrl0PZRI4IF2AbB7V5UlRfG+OOduckVnRQ4VzXVSzy/1eLAh778IEqhTnW0mmgL9yShfinNverA== + version "16.8.7" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.7.tgz#7b1c0223dd5494f9b4501ad2a69aa6acb350a29b" + integrity sha512-0xbkIyrDNKUn4IJVf8JaCn+ucao/cq6ZB8O6kSzhrJub1cVSqgTArtG0qCfdERWKMEIvUbrwLXeQMqWEsyr9dA== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -1432,7 +1430,7 @@ resolved "https://registry.yarnpkg.com/@types/route-parser/-/route-parser-0.1.2.tgz#41cf1844f0acfd90eaba01881bb567649eaf0bd0" integrity sha512-fdOCj8qPC6vGrq00eDU/F7WZmXjdOUEFVfygrm6Rf8v/yxElYGmO2/v8acQ2HGNJUOcn0EsmadwV/lMI4ufhQw== -"@types/semver@^5.4.0", "@types/semver@^5.5.0": +"@types/semver@^5.4.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== @@ -1697,7 +1695,7 @@ acorn@^6.0.1, acorn@^6.0.5: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== -agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: +agent-base@4, agent-base@^4.1.0, agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== @@ -1751,10 +1749,10 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" - integrity sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w== +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== ansi-styles@^2.2.1: version "2.2.1" @@ -3516,6 +3514,11 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +deprecation@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-1.0.1.tgz#2df79b79005752180816b7b6e079cbd80490d711" + integrity sha512-ccVHpE72+tcIKaGMql33x5MAjKQIZrk+3x2GbJ7TeraUCZWHoT+KSZpoC+JQFsUBlSTXUrBaGiF0j6zVTepPLg== + des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" @@ -3661,14 +3664,12 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" editorconfig@^0.15.0: - version "0.15.2" - resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.2.tgz#047be983abb9ab3c2eefe5199cb2b7c5689f0702" - integrity sha512-GWjSI19PVJAM9IZRGOS+YKI8LN+/sjkSjNyvxL5ucqP9/IqtYNXBaQ/6c/hkPNYQHyOHra2KoXZI/JVpuqwmcQ== + version "0.15.3" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" + integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== dependencies: - "@types/node" "^10.11.7" - "@types/semver" "^5.5.0" commander "^2.19.0" - lru-cache "^4.1.3" + lru-cache "^4.1.5" semver "^5.6.0" sigmund "^1.0.1" @@ -3700,9 +3701,9 @@ electron-store@^2.0.0: conf "^2.0.0" electron@^2.0.14: - version "2.0.17" - resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.17.tgz#871c02eabcdfe11f7452c01b2f36510241b6de19" - integrity sha512-lbACWEiuiHFeSps3rB9DclD2zvwAIrTc2wmHUjZ3NAS64/jY5zXZuGxw0E28zVzCvMLtvvfF5wc5m1PIlz2TGA== + version "2.0.18" + resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.18.tgz#52f1b248c3cc013b5a870094de3b6ba5de313a0f" + integrity sha512-PQRHtFvLxHdJzMMIwTddUtkS+Te/fZIs+PHO+zPmTUTBE76V3Od3WRGzMQwiJHxN679licmCKhJpMyxZfDEVWQ== dependencies: "@types/node" "^8.0.24" electron-download "^3.0.1" @@ -4093,7 +4094,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.2: +extend@^3.0.2, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -4291,12 +4292,12 @@ finalhandler@1.1.1: unpipe "~1.0.0" find-cache-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d" - integrity sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== dependencies: commondir "^1.0.1" - make-dir "^1.0.0" + make-dir "^2.0.0" pkg-dir "^3.0.0" find-index@^0.1.1: @@ -4957,9 +4958,9 @@ http-signature@~1.2.0: sshpk "^1.7.0" http-status-codes@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/http-status-codes/-/http-status-codes-1.3.0.tgz#9cd0e71391773d0671b489d41cbc5094aa4163b6" - integrity sha1-nNDnE5F3PQZxtInUHLxQlKpBY7Y= + version "1.3.1" + resolved "https://registry.yarnpkg.com/http-status-codes/-/http-status-codes-1.3.1.tgz#534ee8ac601037b71e0fe396147d773fc38ecbe0" + integrity sha512-j7EfK9geezX8jYI/GCe4N/8y14K67+TB/bseZrYjbGdt5E/j5tx5wY8s450EDdfQFlHKfF1tgfXVIzqyJXfM6w== https-browserify@^1.0.0: version "1.0.0" @@ -6370,7 +6371,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.5.1, lodash@^4.8.0: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.5.1, lodash@^4.8.0: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== @@ -6390,7 +6391,7 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" -lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: +lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -6417,6 +6418,14 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + make-error@^1.1.1: version "1.3.5" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" @@ -6803,9 +6812,9 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -"moxios@git://github.com/stoplightio/moxios#v1.3.0": +"moxios@git://github.com/stoplightio/moxios.git#v1.3.0": version "1.3.0" - resolved "git://github.com/stoplightio/moxios#9d702c8eafee4b02917d6bc400ae15f1e835cf51" + resolved "git://github.com/stoplightio/moxios.git#9d702c8eafee4b02917d6bc400ae15f1e835cf51" dependencies: class-autobind "^0.1.4" @@ -7656,6 +7665,11 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + pinkie-promise@^2.0.0, pinkie-promise@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -7996,19 +8010,19 @@ rc@^1.1.2, rc@^1.1.6, rc@^1.2.7: strip-json-comments "~2.0.1" react-dom@^16.4.1: - version "16.8.3" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.3.tgz#ae236029e66210783ac81999d3015dfc475b9c32" - integrity sha512-ttMem9yJL4/lpItZAQ2NTFAbV7frotHk5DZEHXUOws2rMmrsvh1Na7ThGT0dTzUIl6pqTOi5tYREfL8AEna3lA== + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.4.tgz#1061a8e01a2b3b0c8160037441c3bf00a0e3bc48" + integrity sha512-Ob2wK7XG2tUDt7ps7LtLzGYYB6DXMCLj0G5fO6WeEICtT4/HdpOi7W/xLzZnR6RCG1tYza60nMdqtxzA8FaPJQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.3" + scheduler "^0.13.4" react-is@^16.8.1: - version "16.8.3" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d" - integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA== + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2" + integrity sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA== react-lifecycles-compat@^3.0.4: version "3.0.4" @@ -8028,14 +8042,14 @@ react-virtualized@^9.20.0: react-lifecycles-compat "^3.0.4" react@^16.4.1: - version "16.8.3" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9" - integrity sha512-3UoSIsEq8yTJuSu0luO1QQWYbgGEILm+eJl2QN/VLDi7hL+EN18M3q3oVZwmVzzBJ3DkM7RMdRwBmZZ+b4IzSA== + version "16.8.4" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.4.tgz#fdf7bd9ae53f03a9c4cd1a371432c206be1c4768" + integrity sha512-0GQ6gFXfUH7aZcjGVymlPOASTuSjlQL4ZtVC5YKH+3JL6bBLCVO21DknzmaPlI90LN253ojj02nsapy+j7wIjg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.3" + scheduler "^0.13.4" read-cmd-shim@^1.0.1: version "1.0.1" @@ -8300,6 +8314,15 @@ request@^2.45.0, request@^2.82.0, request@^2.87.0: tunnel-agent "^0.6.0" uuid "^3.3.2" +requestretry@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-3.1.0.tgz#c8e1976bb946f14889d3604bbad56a01d191c10d" + integrity sha512-DkvCPK6qvwxIuVA5TRCvi626WHC2rWjF/n7SCQvVHAr2JX9i1/cmIpSEZlmHAo+c1bj9rjaKoZ9IsKwCpTkoXA== + dependencies: + extend "^3.0.2" + lodash "^4.17.10" + when "^3.7.7" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -8480,10 +8503,10 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.3.tgz#bed3c5850f62ea9c716a4d781f9daeb9b2a58896" - integrity sha512-UxN5QRYWtpR1egNWzJcVLk8jlegxAugswQc984lD3kU7NuobsO37/sRfbpTdBjtnD5TBNFA2Q2oLV5+UmPSmEQ== +scheduler@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.4.tgz#8fef05e7a3580c76c0364d2df5e550e4c9140298" + integrity sha512-cvSOlRPxOHs5dAhP9yiS/6IDmVAVxmk33f0CtTJRkmUWcb1Us+t7b1wqdzoC0REw2muC9V5f1L/w5R5uKGaepA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -8716,17 +8739,17 @@ snapdragon@^0.8.1: use "^3.1.0" socks-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" - integrity sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" + integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== dependencies: - agent-base "~4.2.0" - socks "~2.2.0" + agent-base "~4.2.1" + socks "~2.3.2" -socks@~2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.3.tgz#7399ce11e19b2a997153c983a9ccb6306721f2dc" - integrity sha512-+2r83WaRT3PXYoO/1z+RDEBE7Z2f9YcdQnJ0K/ncXXbV5gJ6wYfNAebYFYiiUjM6E4JyXnPY8cimwyvFYHVUUA== +socks@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" + integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== dependencies: ip "^1.1.5" smart-buffer "4.0.2" @@ -8761,10 +8784,10 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.6, source-map-support@~0.5.9: - version "0.5.10" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" - integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ== +source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.6, source-map-support@~0.5.10: + version "0.5.11" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.11.tgz#efac2ce0800355d026326a0ca23e162aeac9a4e2" + integrity sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -8942,9 +8965,9 @@ stream-shift@^1.0.0: integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= string-argv@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.1.1.tgz#66bd5ae3823708eaa1916fa5412703150d4ddfaf" - integrity sha512-El1Va5ehZ0XTj3Ekw4WFidXvTmt9SrC0+eigdojgtJMVtPkF0qbBe9fyNSl9eQf+kUHnTSQxdQYzuHfZy8V+DQ== + version "0.1.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.1.2.tgz#c5b7bc03fb2b11983ba3a72333dd0559e77e4738" + integrity sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA== string-length@^2.0.0: version "2.0.0" @@ -9005,11 +9028,11 @@ strip-ansi@^4.0.0: ansi-regex "^3.0.0" strip-ansi@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" - integrity sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow== + version "5.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.1.0.tgz#55aaa54e33b4c0649a7338a43437b1887d153ec4" + integrity sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg== dependencies: - ansi-regex "^4.0.0" + ansi-regex "^4.1.0" strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" @@ -9182,13 +9205,13 @@ terser-webpack-plugin@^1.1.0: worker-farm "^1.5.2" terser@^3.16.1: - version "3.16.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.16.1.tgz#5b0dd4fa1ffd0b0b43c2493b2c364fd179160493" - integrity sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow== + version "3.17.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" + integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== dependencies: - commander "~2.17.1" + commander "^2.19.0" source-map "~0.6.1" - source-map-support "~0.5.9" + source-map-support "~0.5.10" test-exclude@^4.2.1: version "4.2.3" @@ -9594,9 +9617,9 @@ unzip-stream@^0.3.0: mkdirp "^0.5.1" upath@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" + integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== uri-js@^4.2.2: version "4.2.2" @@ -9967,6 +9990,11 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +when@^3.7.7: + version "3.7.8" + resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" + integrity sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I= + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"