Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Align che-theia with upstream changes #1213

Merged
merged 5 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.include
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IMAGE_TAG="next"
THEIA_GITHUB_REPO="eclipse-theia/theia"
THEIA_VERSION="master"
THEIA_BRANCH="master"
THEIA_COMMIT_SHA="9f4f56e388109178dbfed244522bbe49ba474c31"
THEIA_COMMIT_SHA="a73a746bfdefc115edb506f2351b5f4e3f267077"
THEIA_GIT_REFS="refs\\/heads\\/master"
THEIA_DOCKER_IMAGE_VERSION=
SHA1_SUFFIX=
Expand Down
4 changes: 2 additions & 2 deletions configs/base.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"resolveJsonModule": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"target": "ES2017",
"jsx": "react",
"lib": [
"es6",
"ES2017",
"dom"
],
"sourceMap": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-about/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-activity-tracker/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-cli-endpoint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-credentials/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-git-provisioner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-logging/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-messaging/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-mini-browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-plugin-ext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"sourceMap": true,
"rootDir": "src",
"outDir": "lib",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**********************************************************************
* Copyright (c) 2021 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 { DeployedPlugin } from '@theia/plugin-ext/lib/common/plugin-protocol';
import { HostedPluginServerImpl } from '@theia/plugin-ext/lib/hosted/node/plugin-service';
import { injectable } from '@theia/core/shared/inversify';

@injectable()
export class CheHostedPluginServerImpl extends HostedPluginServerImpl {
protected async localizePlugin(plugin: DeployedPlugin, locale: string): Promise<DeployedPlugin> {
// che-theia doesn't support localization for plugins
return plugin;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@
import * as path from 'path';

import { ContainerModule, interfaces } from 'inversify';
import {
HostedPluginClient,
HostedPluginServer,
hostedServicePath,
} from '@theia/plugin-ext/lib/common/plugin-protocol';
import {
HostedPluginProcess,
HostedPluginProcessConfiguration,
} from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-process';

import { CheHostedPluginServerImpl } from './hosted-plugin-service';
import { ChePluginUriFactory } from './che-plugin-uri-factory';
import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module';
import { HostedPluginMapping } from './plugin-remote-mapping';
Expand All @@ -27,7 +33,7 @@ import { PluginUriFactory } from '@theia/plugin-ext/lib/hosted/node/scanners/plu
import { ServerPluginProxyRunner } from './server-plugin-proxy-runner';
import { ServerPluginRunner } from '@theia/plugin-ext/lib/common';

const localModule = ConnectionContainerModule.create(({ bind, unbind, isBound, rebind }) => {
const localModule = ConnectionContainerModule.create(({ bind, unbind, isBound, rebind, bindBackendService }) => {
bind(HostedPluginRemote)
.toSelf()
.inSingletonScope()
Expand All @@ -39,6 +45,18 @@ const localModule = ConnectionContainerModule.create(({ bind, unbind, isBound, r
bind(ServerPluginRunner).to(ServerPluginProxyRunner).inSingletonScope();
bind(LogHostedPluginProcess).toSelf().inSingletonScope();
rebind(HostedPluginProcess).toService(LogHostedPluginProcess);

bind(CheHostedPluginServerImpl).toSelf().inSingletonScope();
rebind(HostedPluginServer).toService(CheHostedPluginServerImpl);
bindBackendService<HostedPluginServer, HostedPluginClient>(
hostedServicePath,
HostedPluginServer,
(server, client) => {
server.setClient(client);
client.onDidCloseConnection(() => server.dispose());
return server;
}
);
});

export default new ContainerModule((bind, unbind, isBound, rebind) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ export class PluginRemoteInit {
// Bind VsCode system
inversifyContainer.load(pluginVscodeBackendModule);

// include plugin-vscode-init inside node_modules for initializations of vscode extensions
require('@theia/plugin-ext-vscode/lib/node/plugin-vscode-init');

inversifyContainer.bind(EnvVariablesServer).to(CheEnvVariablesServerImpl).inSingletonScope();

// override handler to our own class
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-plugin-remote/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"compilerOptions": {
"skipLibCheck": true,
"jsx": "react",
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-remote-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-remote-impl-k8s/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-terminal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
5 changes: 0 additions & 5 deletions extensions/eclipse-che-theia-user-preferences/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"downlevelIteration": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"lib": [
"es6",
"dom"
],
"sourceMap": true,
"rootDir": "src",
"outDir": "lib",
Expand Down
4 changes: 0 additions & 4 deletions extensions/eclipse-che-theia-workspace/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
4 changes: 0 additions & 4 deletions generator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"compilerOptions": {
"skipLibCheck": true,
"jsx": "react",
"lib": [
"es6",
"dom"
],
"rootDir": "src",
"outDir": "dist"
},
Expand Down
3 changes: 1 addition & 2 deletions plugins/containers-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"target": "es5",
"lib": [
"es6",
"ES2017",
"webworker"
],
"sourceMap": true,
Expand Down
3 changes: 1 addition & 2 deletions plugins/ext-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"target": "es5",
"lib": [
"es6",
"ES2017",
"webworker"
],
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/github-auth-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"skipLibCheck": true,
"lib": [
"es6",
"ES2017",
"webworker"
],
"rootDir": "src",
Expand Down
3 changes: 1 addition & 2 deletions plugins/ports-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"target": "es5",
"lib": [
"es6",
"ES2017",
"webworker"
],
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/recommendations-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"lib": [
"es6",
"ES2017",
"webworker"
],
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/resource-monitor-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"lib": ["es6", "webworker"],
"lib": ["ES2017", "webworker"],
"rootDir": "src",
"outDir": "lib"
},
Expand Down
Loading