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

Commit

Permalink
Merge branch 'main' into file-track
Browse files Browse the repository at this point in the history
  • Loading branch information
azatsarynnyy committed Aug 4, 2021
2 parents e1c4bea + 929e119 commit 0978888
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/; \
```

Expand Down
4 changes: 2 additions & 2 deletions devfiles/che-theia-dev.devsandbox.devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.'; \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -52,6 +51,6 @@ export class CheServerRemoteApiImpl {
}

getCheApiURI(): string {
return this.baseAPIUrl;
return this.baseAPIUrl!;
}
}

0 comments on commit 0978888

Please sign in to comment.