diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b032882a..6813c3b96 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -175,8 +175,8 @@ After changing sources of Theia or Che-Theia use `'2. Rsync sources'` to synchro ``` [che-dev] -$ rsync -rtv --exclude='node_mobules' --exclude='package.json' --exclude='root-compilation.tsconfig.json' /projects/theia/ /tmp/theia/; \ -$ rsync -rtv --exclude='node_mobules' --exclude='package.json' /projects/che-theia/ /tmp/theia/che/che-theia/; \ +$ rsync -rtv --exclude='node_modules' --exclude='package.json' --exclude='root-compilation.tsconfig.json' /projects/theia/ /tmp/theia/; \ +$ rsync -rtv --exclude='node_modules' --exclude='package.json' /projects/che-theia/ /tmp/theia/che/che-theia/; \ ``` diff --git a/devfiles/che-theia-dev.devsandbox.devfile.yaml b/devfiles/che-theia-dev.devsandbox.devfile.yaml index 8c443e721..cace7adef 100644 --- a/devfiles/che-theia-dev.devsandbox.devfile.yaml +++ b/devfiles/che-theia-dev.devsandbox.devfile.yaml @@ -94,8 +94,8 @@ commands: command: | if [ -d "$BUILD_PATH/theia/che/che-theia" ]; then \ echo -e '\e[32mRsyncing sources...\e[0m'; \ - rsync -rtv --exclude='node_mobules' --exclude='package.json' --exclude='root-compilation.tsconfig.json' /projects/theia/ $BUILD_PATH/theia/; \ - rsync -rtv --exclude='node_mobules' --exclude='package.json' /projects/che-theia/ $BUILD_PATH/theia/che/che-theia/; \ + rsync -rtv --exclude='node_modules' --exclude='package.json' --exclude='root-compilation.tsconfig.json' /projects/theia/ $BUILD_PATH/theia/; \ + rsync -rtv --exclude='node_modules' --exclude='package.json' /projects/che-theia/ $BUILD_PATH/theia/che/che-theia/; \ echo -e '\e[32mDone\e[0m'; \ else \ echo 'Che-Theia is not initialized.'; \ diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh index 720eb26aa..d01ac7a16 100755 --- a/dockerfiles/build.sh +++ b/dockerfiles/build.sh @@ -43,7 +43,7 @@ build_directory() { build_all() { # loop on all directories and call build.sh script if present - for directory in */ ; do + for directory in $(ls -d */ | sort) ; do if [ -e ${directory}/build.sh ] ; then build_directory ${directory} else diff --git a/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-api-provider.ts b/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-api-provider.ts index 31b492df3..afd9b1580 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-api-provider.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-api-provider.ts @@ -21,7 +21,7 @@ export class ChePluginApiProvider implements ExtPluginApiProvider { initFunction: 'initializeApi', initVariable: 'che_api_provider', }, - backendInitPath: require.resolve('@eclipse-che/theia-plugin-ext/lib/plugin/node/che-api-node-provider'), + backendInitPath: '@eclipse-che/theia-plugin-ext/lib/plugin/node/che-api-node-provider', }; } } diff --git a/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-service.ts b/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-service.ts index 458b87d6e..bb4b01b77 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-service.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-service.ts @@ -98,9 +98,9 @@ export class ChePluginServiceImpl implements ChePluginService { try { const workspaceSettings: WorkspaceSettings = await this.workspaceService.getWorkspaceSettings(); - if (workspaceSettings && workspaceSettings[PLUGIN_REGISTRY_INTERNAL_URL]) { - const uri = workspaceSettings[PLUGIN_REGISTRY_INTERNAL_URL]; - const publicUri = workspaceSettings[PLUGIN_REGISTRY_URL] || uri; + if (workspaceSettings) { + const publicUri = workspaceSettings[PLUGIN_REGISTRY_URL]; + const uri = workspaceSettings[PLUGIN_REGISTRY_INTERNAL_URL] || publicUri; this.defaultRegistry = { name: 'Eclipse Che plugins', diff --git a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-http-service-impl.ts b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-http-service-impl.ts index bc9bc02f0..196467c48 100644 --- a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-http-service-impl.ts +++ b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-http-service-impl.ts @@ -47,7 +47,7 @@ export class CheServerHttpServiceImpl implements HttpService { const certificateAuthority = await this.certificateService.getCertificateAuthority(); const proxyUrl = process.env.http_proxy; - const baseUrl = process.env.CHE_API; + const baseUrl = process.env.CHE_API_EXTERNAL; console.log('proxyUrl && proxyUrl !== && baseUrl', proxyUrl && proxyUrl !== '' && baseUrl); if (proxyUrl && proxyUrl !== '' && baseUrl) { const parsedBaseUrl = url.parse(baseUrl); diff --git a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-remote-api-impl.ts b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-remote-api-impl.ts index e5ded6e80..a5d9ba617 100644 --- a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-remote-api-impl.ts +++ b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-remote-api-impl.ts @@ -24,14 +24,13 @@ export class CheServerRemoteApiImpl { * baseAPIUrl - responsible for storing base url to API service, taken from environment variable * machineToken - machine token taken from environment variable, always the same at workspace lifecycle */ - private readonly baseAPIUrl: string; + private readonly baseAPIUrl: string | undefined; private readonly machineToken: string; constructor() { - if (process.env.CHE_API_INTERNAL === undefined) { - console.error('Unable to create Che API REST Client: "CHE_API_INTERNAL" is not set.'); - } else { - this.baseAPIUrl = process.env.CHE_API_INTERNAL; + this.baseAPIUrl = process.env.CHE_API_INTERNAL || process.env.CHE_API_EXTERNAL; + if (!this.baseAPIUrl) { + console.error('Unable to create Che API REST client: "CHE_API" is not set'); } if (process.env.CHE_MACHINE_TOKEN === undefined) { @@ -52,6 +51,6 @@ export class CheServerRemoteApiImpl { } getCheApiURI(): string { - return this.baseAPIUrl; + return this.baseAPIUrl!; } }