diff --git a/build/Dockerfile b/build/Dockerfile index fc72538..c9af9c0 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -2,11 +2,24 @@ FROM node:18-bookworm as build-stage # install required tools to build the application -RUN apt-get update && apt-get install -y libxkbfile-dev libsecret-1-dev +RUN apt-get update && \ + apt-get install -y git jq libxkbfile-dev libsecret-1-dev + +WORKDIR /tmp +RUN git clone --depth 1 https://github.com/eclipse-theia/theia-blueprint.git WORKDIR /home/theia -# Copy repository files -COPY theia/. . +RUN cp -r /tmp/theia-blueprint/* . && \ + mv package.json package.json.orig +COPY package.json.acend . +COPY preload.html ./applications/browser/resources/preload.html +COPY branding-util.tsx ./theia-extensions/product/src/browser/branding-util.tsx + +# customize package.json +RUN jq -s '.[0] * .[1]' package.json.acend package.json.orig > package.json.tmp1 && \ + jq 'del(.theiaPlugins."vscode-builtin-extensions-pack")' package.json.tmp1 > package.json.tmp2 && \ + jq 'del(.theiaPlugins."vscjava.vscode-java-pack")' package.json.tmp2 > package.json.tmp3 && \ + jq 'del(.theiaPlugins."vscjava.vscode-java-dependency")' package.json.tmp3 > package.json # Remove unnecesarry files for the browser application # Download plugins and build application production mode diff --git a/build/branding-util.tsx b/build/branding-util.tsx new file mode 100644 index 0000000..dbc5783 --- /dev/null +++ b/build/branding-util.tsx @@ -0,0 +1,131 @@ +/******************************************************************************** + * Copyright (C) 2020 EclipseSource and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +import { Key, KeyCode } from '@theia/core/lib/browser'; +import { WindowService } from '@theia/core/lib/browser/window/window-service'; +import * as React from 'react'; + +export interface ExternalBrowserLinkProps { + text: string; + url: string; + windowService: WindowService; +} + +function ExternalBrowserLink(props: ExternalBrowserLinkProps): JSX.Element { + return openExternalLink(props.url, props.windowService)} + onKeyDown={(e: React.KeyboardEvent) => { + if (Key.ENTER.keyCode === KeyCode.createKeyCode(e.nativeEvent).key?.keyCode) { + openExternalLink(props.url, props.windowService); + } + }}> + {props.text} + ; +} + +function openExternalLink(url: string, windowService: WindowService): void { + windowService.openNewWindow(url, { external: true }); +} + +export function renderWhatIs(windowService: WindowService): React.ReactNode { + return
+

+ What is this Webshell? +

+
+ This Webshell gives you everthing you need to work on our Labs. + All tools mentioned in the lab are integraded and preconfigured. + For more information ask your Trainer (the person in the front)! +
+
; +} + +export function renderWhatIsNot(): React.ReactNode { + return
+

+ What is it not? +

+
+ As it used for our Tranings only it will be deleted after your Training has ended (plus 2 or 3 days). +
+
; +} + +export function renderSupport(windowService: WindowService): React.ReactNode { + return
+

+ Support +

+
+ For any questions or things which are not working ask your acend Trainer. +
+
; +} + +export function renderTickets(windowService: WindowService): React.ReactNode { + return
+

+ Reporting feature requests and bugs +

+
+ If something is missing in the toolset or you have a great idea, please tell us so we can integrate it. +
+
; +} + +export function renderSourceCode(windowService: WindowService): React.ReactNode { + return
+

+ Source Code +

+
+ The source code of Eclipse Theia Blueprint is available + on . +
+
; +} + +export function renderDocumentation(windowService: WindowService): React.ReactNode { + return
+

+ Documentation +

+
+ Please see for + documentation how to customize Eclipse Theia Blueprint. +
+
; +} + +export function renderDownloads(): React.ReactNode { + return
+

+ Updates and Downloads +

+
+ You can update Eclipse Theia Blueprint directly in this application by navigating to + File {'>'} Settings {'>'} Check for Updates… Moreover the application will check for updates + after each launch automatically. +
+
+ Alternatively you can download the most recent version from the download page. +
+
; +} diff --git a/build/build.sh b/build/build.sh index ba46668..e6876d7 100755 --- a/build/build.sh +++ b/build/build.sh @@ -17,7 +17,7 @@ build() { echo -e "\nBuild:\n" set -e if [ -n "$(which docker)" ]; then - DOCKER_BUILDKIT=1 docker build -t $ORG/$APP . + DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build -t $ORG/$APP . test_image docker push $ORG/$APP elif [ -n "$(which buildah)" ]; then diff --git a/build/package.json.acend b/build/package.json.acend new file mode 100644 index 0000000..b2cda3b --- /dev/null +++ b/build/package.json.acend @@ -0,0 +1,14 @@ +{ + "theiaPlugins": { + "json": "https://open-vsx.org/api/vscode/json/1.62.3/file/vscode.json-1.62.3.vsix", + "yaml": "https://open-vsx.org/api/vscode/yaml/1.62.3/file/vscode.yaml-1.62.3.vsix", + "shell": "https://open-vsx.org/api/vscode/shellscript/1.62.3/file/vscode.shellscript-1.62.3.vsix", + "golang": "https://open-vsx.org/api/vscode/go/1.62.3/file/vscode.go-1.62.3.vsix", + "python": "https://open-vsx.org/api/vscode/python/1.62.3/file/vscode.python-1.62.3.vsix", + "docker": "https://open-vsx.org/api/vscode/docker/1.62.3/file/vscode.docker-1.62.3.vsix", + "dockerfile": "https://open-vsx.org/api/jeff-hykin/better-dockerfile-syntax/1.0.2/file/jeff-hykin.better-dockerfile-syntax-1.0.2.vsix", + "markdown": "https://open-vsx.org/api/vscode/markdown/1.62.3/file/vscode.markdown-1.62.3.vsix", + "terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix", + "yaml.lint": "https://open-vsx.org/api/phil9909/ytt-lint/0.3.1/file/phil9909.ytt-lint-0.3.1.vsix" + } +} diff --git a/build/theia/applications/browser/resources/preload.html b/build/preload.html similarity index 100% rename from build/theia/applications/browser/resources/preload.html rename to build/preload.html diff --git a/build/theia/applications/browser/package.json b/build/theia/applications/browser/package.json deleted file mode 100644 index c9d1bbc..0000000 --- a/build/theia/applications/browser/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "private": true, - "name": "blueprint-browser-app", - "description": "Eclipse Theia blueprint browser product", - "productName": "Theia Blueprint", - "version": "1.40.0", - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "author": "Eclipse Theia ", - "homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", - "bugs": { - "url": "https://github.com/eclipse-theia/theia/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" - }, - "engines": { - "yarn": ">=1.7.0 <2", - "node": ">=12.14.1" - }, - "theia": { - "frontend": { - "config": { - "applicationName": "Awesome acend Webshell", - "warnOnPotentiallyInsecureHostPattern": false, - "preferences": { - "toolbar.showToolbar": true, - "files.enableTrash": false, - "security.workspace.trust.enabled": false, - "workbench.colorTheme": "dark" - } - } - }, - "backend": { - "config": { - "warnOnPotentiallyInsecureHostPattern": false, - "startupTimeout": -1, - "resolveSystemPlugins": false, - "redhat.telemetry.enabled": false, - "workbench.colorTheme": "dark" - } - }, - "generator": { - "config": { - "preloadTemplate": "./resources/preload.html" - } - } - }, - "dependencies": { - "@theia/bulk-edit": "1.41.0", - "@theia/callhierarchy": "1.41.0", - "@theia/console": "1.41.0", - "@theia/core": "1.41.0", - "@theia/debug": "1.41.0", - "@theia/editor": "1.41.0", - "@theia/editor-preview": "1.41.0", - "@theia/external-terminal": "1.41.0", - "@theia/file-search": "1.41.0", - "@theia/filesystem": "1.41.0", - "@theia/getting-started": "1.41.0", - "@theia/keymaps": "1.41.0", - "@theia/markers": "1.41.0", - "@theia/memory-inspector": "1.41.0", - "@theia/messages": "1.41.0", - "@theia/metrics": "1.41.0", - "@theia/mini-browser": "1.41.0", - "@theia/monaco": "1.41.0", - "@theia/navigator": "1.41.0", - "@theia/outline-view": "1.41.0", - "@theia/output": "1.41.0", - "@theia/plugin-dev": "1.41.0", - "@theia/plugin-ext": "1.41.0", - "@theia/plugin-ext-vscode": "1.41.0", - "@theia/preferences": "1.41.0", - "@theia/process": "1.41.0", - "@theia/property-view": "1.41.0", - "@theia/scm": "1.41.0", - "@theia/scm-extra": "1.41.0", - "@theia/search-in-workspace": "1.41.0", - "@theia/secondary-window": "1.41.0", - "@theia/task": "1.41.0", - "@theia/terminal": "1.41.0", - "@theia/timeline": "1.41.0", - "@theia/toolbar": "1.41.0", - "@theia/typehierarchy": "1.41.0", - "@theia/userstorage": "1.41.0", - "@theia/variable-resolver": "1.41.0", - "@theia/vsx-registry": "1.41.0", - "@theia/workspace": "1.41.0", - "fs-extra": "^9.0.1", - "blueprint-product-ext": "1.40.0" - }, - "devDependencies": { - "@theia/cli": "1.41.0" - }, - "scripts": { - "clean": "theia clean && rimraf node_modules", - "build": "yarn -s rebuild && theia build --app-target=\"browser\" --mode development", - "build:prod": "yarn -s rebuild && theia build --app-target=\"browser\"", - "rebuild": "theia rebuild:browser --cacheRoot .", - "start": "theia start --plugins=local-dir:../../plugins", - "watch": "concurrently --kill-others -n tsc,build -c red,yellow \"tsc -b -w --preserveWatchOutput\" \"yarn -s watch:bundle\"", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts" - } -} diff --git a/build/theia/applications/browser/tsconfig.json b/build/theia/applications/browser/tsconfig.json deleted file mode 100644 index 47ffd5f..0000000 --- a/build/theia/applications/browser/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../configs/base.tsconfig", - "include": [], - "compilerOptions": { - "composite": true - }, - "references": [ - { - "path": "../../theia-extensions/launcher" - }, - { - "path": "../../theia-extensions/product" - } - ] -} diff --git a/build/theia/applications/browser/webpack.config.js b/build/theia/applications/browser/webpack.config.js deleted file mode 100644 index 3b8dcb0..0000000 --- a/build/theia/applications/browser/webpack.config.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file can be edited to customize webpack configuration. - * To reset delete this file and rerun theia build again. - */ -// @ts-check -const config = require('./gen-webpack.config.js'); -const backend = require('./gen-webpack.node.config.js'); - -/** - * Expose bundled modules on window.theia.moduleName namespace, e.g. - * window['theia']['@theia/core/lib/common/uri']. - * Such syntax can be used by external code, for instance, for testing. -config.module.rules.push({ - test: /\.js$/, - loader: require.resolve('@theia/application-manager/lib/expose-loader') -}); */ - -if (process.platform !== 'win32') { - // For some reason, blueprint wants to bundle the `.node` files directly without going through `@vscode/windows-ca-certs` - backend.ignoredResources.add('@vscode/windows-ca-certs/build/Release/crypt32.node'); -} - -module.exports = [ - ...config, - backend.config -]; diff --git a/build/theia/applications/electron/.eslintrc.js b/build/theia/applications/electron/.eslintrc.js deleted file mode 100644 index b3327da..0000000 --- a/build/theia/applications/electron/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: [ - '../../configs/build.eslintrc.json' - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.eslint.json' - } -}; diff --git a/build/theia/applications/electron/electron-builder.yml b/build/theia/applications/electron/electron-builder.yml deleted file mode 100644 index e6b0da2..0000000 --- a/build/theia/applications/electron/electron-builder.yml +++ /dev/null @@ -1,77 +0,0 @@ -appId: eclipse.theia -productName: TheiaBlueprint -copyright: Copyright © 2020-2023 Eclipse Foundation, Inc -electronDist: ../../node_modules/electron/dist -electronVersion: 23.3.11 -# Although it is generally not recommended to disable asar, it is required for Theia. -# Enabling this leads to: process ERROR Error: spawn ENOTDIR -# because binaries can not be executed from the asar archive. -# See asar file API limitations: https://www.electronjs.org/docs/tutorial/application-packaging#limitations-of-the-node-api -asar: false -nodeGypRebuild: false -npmRebuild: false - -directories: - buildResources: resources - -# node_modules and package.json are copied automatically -# Exclude node_modules manually because electron is copied by electron-builder and we are using a bundled backend -files: - - src-gen - - lib - - scripts - - "!**node_modules/**" -extraResources: - - from: ../../plugins - to: app/plugins - -win: - icon: resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico - target: - - nsis - publish: - provider: generic - url: "https://download.eclipse.org/theia/${version}/windows" - useMultipleRangeRequest: false -mac: - icon: resources/icons/MacLauncherIcon/512-512-2.icns - category: public.app-category.developer-tools - darkModeSupport: true - target: - - dmg - - zip - publish: - provider: generic - url: "https://download.eclipse.org/theia/latest/macos" -linux: - icon: resources/icons/LinuxLauncherIcon/512-512.png - category: Development - vendor: Eclipse Foundation, Inc - target: - - deb - - AppImage - publish: - provider: generic - url: "https://download.eclipse.org/theia/latest/linux" - -nsis: - menuCategory: true - oneClick: false - perMachine: false - installerHeaderIcon: resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico - installerIcon: resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico - uninstallerIcon: resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico - installerSidebar: resources/icons/InstallerSidebarImage/164-314Windows.bmp - uninstallerSidebar: resources/icons/InstallerSidebarImage/164-314Windows.bmp - allowToChangeInstallationDirectory: true - runAfterFinish: false - artifactName: ${productName}.${ext} - license: LICENSE -dmg: - artifactName: ${productName}.${ext} -deb: - artifactName: ${productName}.${ext} -appImage: - artifactName: ${productName}.${ext} - -afterPack: ./scripts/after-pack.js diff --git a/build/theia/applications/electron/entitlements.plist b/build/theia/applications/electron/entitlements.plist deleted file mode 100644 index 6bc22e9..0000000 --- a/build/theia/applications/electron/entitlements.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.allow-dyld-environment-variables - - com.apple.security.cs.disable-library-validation - - - diff --git a/build/theia/applications/electron/package.json b/build/theia/applications/electron/package.json deleted file mode 100644 index 2176792..0000000 --- a/build/theia/applications/electron/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "private": true, - "name": "blueprint-electron-app", - "description": "Eclipse Theia blueprint product", - "productName": "Theia Blueprint", - "version": "1.40.0", - "main": "scripts/theia-electron-main.js", - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "author": "Eclipse Theia ", - "homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", - "bugs": { - "url": "https://github.com/eclipse-theia/theia/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" - }, - "engines": { - "yarn": ">=1.7.0 <2", - "node": ">=12.14.1" - }, - "theia": { - "target": "electron", - "frontend": { - "config": { - "applicationName": "Awesome acend Webshell", - "preferences": { - "toolbar.showToolbar": true, - "security.workspace.trust.enabled": false - } - } - }, - "backend": { - "config": { - "startupTimeout": -1, - "resolveSystemPlugins": false - } - }, - "generator": { - "config": { - "preloadTemplate": "./resources/preload.html" - } - } - }, - "dependencies": { - "@theia/bulk-edit": "1.41.0", - "@theia/callhierarchy": "1.41.0", - "@theia/console": "1.41.0", - "@theia/core": "1.41.0", - "@theia/debug": "1.41.0", - "@theia/editor": "1.41.0", - "@theia/editor-preview": "1.41.0", - "@theia/electron": "1.41.0", - "@theia/external-terminal": "1.41.0", - "@theia/file-search": "1.41.0", - "@theia/filesystem": "1.41.0", - "@theia/getting-started": "1.41.0", - "@theia/keymaps": "1.41.0", - "@theia/markers": "1.41.0", - "@theia/memory-inspector": "1.41.0", - "@theia/messages": "1.41.0", - "@theia/metrics": "1.41.0", - "@theia/mini-browser": "1.41.0", - "@theia/monaco": "1.41.0", - "@theia/navigator": "1.41.0", - "@theia/outline-view": "1.41.0", - "@theia/output": "1.41.0", - "@theia/plugin-dev": "1.41.0", - "@theia/plugin-ext": "1.41.0", - "@theia/plugin-ext-vscode": "1.41.0", - "@theia/preferences": "1.41.0", - "@theia/process": "1.41.0", - "@theia/property-view": "1.41.0", - "@theia/secondary-window": "1.41.0", - "@theia/scm": "1.41.0", - "@theia/scm-extra": "1.41.0", - "@theia/search-in-workspace": "1.41.0", - "@theia/task": "1.41.0", - "@theia/terminal": "1.41.0", - "@theia/timeline": "1.41.0", - "@theia/toolbar": "1.41.0", - "@theia/typehierarchy": "1.41.0", - "@theia/userstorage": "1.41.0", - "@theia/variable-resolver": "1.41.0", - "@theia/vsx-registry": "1.41.0", - "@theia/workspace": "1.41.0", - "fs-extra": "^9.0.1", - "blueprint-updater-ext": "1.40.0", - "blueprint-product-ext": "1.40.0", - "blueprint-launcher-ext": "1.40.0" - }, - "devDependencies": { - "@theia/cli": "1.41.0", - "@types/js-yaml": "^3.12.0", - "@types/yargs": "17.0.24", - "@wdio/cli": "^6.10.2", - "@wdio/local-runner": "^6.10.2", - "@wdio/mocha-framework": "^6.8.0", - "@wdio/spec-reporter": "^6.8.1", - "app-builder-lib": "22.14.13", - "chai": "^4.2.0", - "electron": "^23.2.4", - "electron-builder": "23.6.0", - "electron-chromedriver": "9.0.0", - "electron-mocha": "^9.3.2", - "js-yaml": "^3.12.0", - "mocha": "^8.2.1", - "rimraf": "^2.7.1", - "ts-node": "^10.0.0", - "wdio-chromedriver-service": "^6.0.4", - "webdriverio": "^6.10.2", - "yargs": "17.7.2", - "concurrently": "^3.5.0" - }, - "scripts": { - "clean": "theia clean && rimraf node_modules", - "clean:dist": "rimraf dist", - "build": "yarn -s rebuild && theia build --app-target=\"electron\" --mode development", - "build:prod": "yarn -s rebuild && theia build --app-target=\"electron\"", - "rebuild": "theia rebuild:electron --cacheRoot .", - "watch": "concurrently -n compile,build \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"", - "start": "electron scripts/theia-electron-main.js --plugins=local-dir:../../plugins", - "start:debug": "yarn start --log-level=debug", - "package": "yarn clean:dist && yarn rebuild && electron-builder -c.mac.identity=null --publish never", - "package:prod": "yarn deploy", - "deploy": "yarn clean:dist && yarn rebuild && electron-builder -c.mac.identity=null --publish always", - "package:preview": "yarn clean:dist && yarn rebuild && electron-builder -c.mac.identity=null --dir", - "update:checksum": "ts-node scripts/update-checksum.ts", - "update:blockmap": "ts-node scripts/update-blockmap.ts", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts", - "test": "mocha --timeout 60000 \"./test/*.spec.js\"", - "lint": "eslint --ext js,jsx,ts,tsx scripts && eslint --ext js,jsx,ts,tsx test", - "lint:fix": "eslint --ext js,jsx,ts,tsx scripts --fix && eslint --ext js,jsx,ts,tsx test -fix" - } -} diff --git a/build/theia/applications/electron/resources/LICENSE b/build/theia/applications/electron/resources/LICENSE deleted file mode 100644 index 4ee1e0a..0000000 --- a/build/theia/applications/electron/resources/LICENSE +++ /dev/null @@ -1,642 +0,0 @@ -This program and the accompanying materials are made available under the -terms of the Eclipse Public License v. 2.0 which is available at -https://www.eclipse.org/legal/epl-2.0, or GNU General Public License, version 2 -with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html. - -# Eclipse Public License - v 2.0 - - THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE - PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION - OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - - 1. DEFINITIONS - - "Contribution" means: - - a) in the case of the initial Contributor, the initial content - Distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - i) changes to the Program, and - ii) additions to the Program; - where such changes and/or additions to the Program originate from - and are Distributed by that particular Contributor. A Contribution - "originates" from a Contributor if it was added to the Program by - such Contributor itself or anyone acting on such Contributor's behalf. - Contributions do not include changes or additions to the Program that - are not Modified Works. - - "Contributor" means any person or entity that Distributes the Program. - - "Licensed Patents" mean patent claims licensable by a Contributor which - are necessarily infringed by the use or sale of its Contribution alone - or when combined with the Program. - - "Program" means the Contributions Distributed in accordance with this - Agreement. - - "Recipient" means anyone who receives the Program under this Agreement - or any Secondary License (as applicable), including Contributors. - - "Derivative Works" shall mean any work, whether in Source Code or other - form, that is based on (or derived from) the Program and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. - - "Modified Works" shall mean any work in Source Code or other form that - results from an addition to, deletion from, or modification of the - contents of the Program, including, for purposes of clarity any new file - in Source Code form that contains any contents of the Program. Modified - Works shall not include works that contain only declarations, - interfaces, types, classes, structures, or files of the Program solely - in each case in order to link to, bind by name, or subclass the Program - or Modified Works thereof. - - "Distribute" means the acts of a) distributing or b) making available - in any manner that enables the transfer of a copy. - - "Source Code" means the form of a Program preferred for making - modifications, including but not limited to software source code, - documentation source, and configuration files. - - "Secondary License" means either the GNU General Public License, - Version 2.0, or any later versions of that license, including any - exceptions or additional permissions as identified by the initial - Contributor. - - 2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare Derivative Works of, publicly display, - publicly perform, Distribute and sublicense the Contribution of such - Contributor, if any, and such Derivative Works. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in Source Code or other form. This patent license shall - apply to the combination of the Contribution and the Program if, at - the time the Contribution is added by the Contributor, such addition - of the Contribution causes such combination to be covered by the - Licensed Patents. The patent license shall not apply to any other - combinations which include the Contribution. No hardware per se is - licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. - Each Contributor disclaims any liability to Recipient for claims - brought by any other entity based on infringement of intellectual - property rights or otherwise. As a condition to exercising the - rights and licenses granted hereunder, each Recipient hereby - assumes sole responsibility to secure any other intellectual - property rights needed, if any. For example, if a third party - patent license is required to allow Recipient to Distribute the - Program, it is Recipient's responsibility to acquire that license - before distributing the Program. - - d) Each Contributor represents that to its knowledge it has - sufficient copyright rights in its Contribution, if any, to grant - the copyright license set forth in this Agreement. - - e) Notwithstanding the terms of any Secondary License, no - Contributor makes additional grants to any Recipient (other than - those set forth in this Agreement) as a result of such Recipient's - receipt of the Program under the terms of a Secondary License - (if permitted under the terms of Section 3). - - 3. REQUIREMENTS - - 3.1 If a Contributor Distributes the Program in any form, then: - - a) the Program must also be made available as Source Code, in - accordance with section 3.2, and the Contributor must accompany - the Program with a statement that the Source Code for the Program - is available under this Agreement, and informs Recipients how to - obtain it in a reasonable manner on or through a medium customarily - used for software exchange; and - - b) the Contributor may Distribute the Program under a license - different than this Agreement, provided that such license: - i) effectively disclaims on behalf of all other Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all other Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) does not attempt to limit or alter the recipients' rights - in the Source Code under section 3.2; and - - iv) requires any subsequent distribution of the Program by any - party to be under a license that satisfies the requirements - of this section 3. - - 3.2 When the Program is Distributed as Source Code: - - a) it must be made available under this Agreement, or if the - Program (i) is combined with other material in a separate file or - files made available under a Secondary License, and (ii) the initial - Contributor attached to the Source Code the notice described in - Exhibit A of this Agreement, then the Program may be made available - under the terms of such Secondary Licenses, and - - b) a copy of this Agreement must be included with each copy of - the Program. - - 3.3 Contributors may not remove or alter any copyright, patent, - trademark, attribution notices, disclaimers of warranty, or limitations - of liability ("notices") contained within the Program from any copy of - the Program which they Distribute, provided that Contributors may add - their own appropriate notices. - - 4. COMMERCIAL DISTRIBUTION - - Commercial distributors of software may accept certain responsibilities - with respect to end users, business partners and the like. While this - license is intended to facilitate the commercial use of the Program, - the Contributor who includes the Program in a commercial product - offering should do so in a manner which does not create potential - liability for other Contributors. Therefore, if a Contributor includes - the Program in a commercial product offering, such Contributor - ("Commercial Contributor") hereby agrees to defend and indemnify every - other Contributor ("Indemnified Contributor") against any losses, - damages and costs (collectively "Losses") arising from claims, lawsuits - and other legal actions brought by a third party against the Indemnified - Contributor to the extent caused by the acts or omissions of such - Commercial Contributor in connection with its distribution of the Program - in a commercial product offering. The obligations in this section do not - apply to any claims or Losses relating to any actual or alleged - intellectual property infringement. In order to qualify, an Indemnified - Contributor must: a) promptly notify the Commercial Contributor in - writing of such claim, and b) allow the Commercial Contributor to control, - and cooperate with the Commercial Contributor in, the defense and any - related settlement negotiations. The Indemnified Contributor may - participate in any such claim at its own expense. - - For example, a Contributor might include the Program in a commercial - product offering, Product X. That Contributor is then a Commercial - Contributor. If that Commercial Contributor then makes performance - claims, or offers warranties related to Product X, those performance - claims and warranties are such Commercial Contributor's responsibility - alone. Under this section, the Commercial Contributor would have to - defend claims against the other Contributors related to those performance - claims and warranties, and if a court requires any other Contributor to - pay any damages as a result, the Commercial Contributor must pay - those damages. - - 5. NO WARRANTY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT - PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" - BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR - IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF - TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR - PURPOSE. Each Recipient is solely responsible for determining the - appropriateness of using and distributing the Program and assumes all - risks associated with its exercise of rights under this Agreement, - including but not limited to the risks and costs of program errors, - compliance with applicable laws, damage to or loss of data, programs - or equipment, and unavailability or interruption of operations. - - 6. DISCLAIMER OF LIABILITY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT - PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS - SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST - PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE - EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES. - - 7. GENERAL - - If any provision of this Agreement is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this Agreement, and without further - action by the parties hereto, such provision shall be reformed to the - minimum extent necessary to make such provision valid and enforceable. - - If Recipient institutes patent litigation against any entity - (including a cross-claim or counterclaim in a lawsuit) alleging that the - Program itself (excluding combinations of the Program with other software - or hardware) infringes such Recipient's patent(s), then such Recipient's - rights granted under Section 2(b) shall terminate as of the date such - litigation is filed. - - All Recipient's rights under this Agreement shall terminate if it - fails to comply with any of the material terms or conditions of this - Agreement and does not cure such failure in a reasonable period of - time after becoming aware of such noncompliance. If all Recipient's - rights under this Agreement terminate, Recipient agrees to cease use - and distribution of the Program as soon as reasonably practicable. - However, Recipient's obligations under this Agreement and any licenses - granted by Recipient relating to the Program shall continue and survive. - - Everyone is permitted to copy and distribute copies of this Agreement, - but in order to avoid inconsistency the Agreement is copyrighted and - may only be modified in the following manner. The Agreement Steward - reserves the right to publish new versions (including revisions) of - this Agreement from time to time. No one other than the Agreement - Steward has the right to modify this Agreement. The Eclipse Foundation - is the initial Agreement Steward. The Eclipse Foundation may assign the - responsibility to serve as the Agreement Steward to a suitable separate - entity. Each new version of the Agreement will be given a distinguishing - version number. The Program (including Contributions) may always be - Distributed subject to the version of the Agreement under which it was - received. In addition, after a new version of the Agreement is published, - Contributor may elect to Distribute the Program (including its - Contributions) under the new version. - - Except as expressly stated in Sections 2(a) and 2(b) above, Recipient - receives no rights or licenses to the intellectual property of any - Contributor under this Agreement, whether expressly, by implication, - estoppel or otherwise. All rights in the Program not expressly granted - under this Agreement are reserved. Nothing in this Agreement is intended - to be enforceable by any entity that is not a Contributor or Recipient. - No third-party beneficiary rights are created under this Agreement. - - Exhibit A - Form of Secondary Licenses Notice - - "This Source Code may also be made available under the following - Secondary Licenses when the conditions for such availability set forth - in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), - version(s), and exceptions or additional permissions here}." - - Simply including a copy of this Agreement, including this Exhibit A - is not sufficient to license the Source Code under Secondary Licenses. - - If it is not possible or desirable to put the notice in a particular - file, then You may include the notice in a location (such as a LICENSE - file in a relevant directory) where a recipient would be likely to - look for such a notice. - - You may add additional accurate notices of copyright ownership. - ---- - -## The GNU General Public License (GPL) Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor - Boston, MA 02110-1335 - USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your freedom to - share and change it. By contrast, the GNU General Public License is - intended to guarantee your freedom to share and change free software--to - make sure the software is free for all its users. This General Public - License applies to most of the Free Software Foundation's software and - to any other program whose authors commit to using it. (Some other Free - Software Foundation software is covered by the GNU Library General - Public License instead.) You can apply it to your programs, too. - - When we speak of free software, we are referring to freedom, not price. - Our General Public Licenses are designed to make sure that you have the - freedom to distribute copies of free software (and charge for this - service if you wish), that you receive source code or can get it if you - want it, that you can change the software or use pieces of it in new - free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid anyone - to deny you these rights or to ask you to surrender the rights. These - restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether gratis - or for a fee, you must give the recipients all the rights that you have. - You must make sure that they, too, receive or can get the source code. - And you must show them these terms so they know their rights. - - We protect your rights with two steps: (1) copyright the software, and - (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software patents. - We wish to avoid the danger that redistributors of a free program will - individually obtain patent licenses, in effect making the program - proprietary. To prevent this, we have made it clear that any patent must - be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed under - the terms of this General Public License. The "Program", below, refers - to any such program or work, and a "work based on the Program" means - either the Program or any derivative work under copyright law: that is - to say, a work containing the Program or a portion of it, either - verbatim or with modifications and/or translated into another language. - (Hereinafter, translation is included without limitation in the term - "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License; they are outside its scope. The act of running - the Program is not restricted, and the output from the Program is - covered only if its contents constitute a work based on the Program - (independent of having been made by running the Program). Whether that - is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's source - code as you receive it, in any medium, provided that you conspicuously - and appropriately publish on each copy an appropriate copyright notice - and disclaimer of warranty; keep intact all the notices that refer to - this License and to the absence of any warranty; and give any other - recipients of the Program a copy of this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion of - it, thus forming a work based on the Program, and copy and distribute - such modifications or work under the terms of Section 1 above, provided - that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any part - thereof, to be licensed as a whole at no charge to all third parties - under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a notice - that there is no warranty (or else, saying that you provide a - warranty) and that users may redistribute the program under these - conditions, and telling the user how to view a copy of this License. - (Exception: if the Program itself is interactive but does not - normally print such an announcement, your work based on the Program - is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, and - can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based on - the Program, the distribution of the whole must be on the terms of this - License, whose permissions for other licensees extend to the entire - whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you; rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of a - storage or distribution medium does not bring the other work under the - scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your cost - of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed - only for noncommercial distribution and only if you received the - program in object code or executable form with such an offer, in - accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to control - compilation and installation of the executable. However, as a special - exception, the source code distributed need not include anything that is - normally distributed (in either source or binary form) with the major - components (compiler, kernel, and so on) of the operating system on - which the executable runs, unless that component itself accompanies the - executable. - - If distribution of executable or object code is made by offering access - to copy from a designated place, then offering equivalent access to copy - the source code from the same place counts as distribution of the source - code, even though third parties are not compelled to copy the source - along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt otherwise - to copy, modify, sublicense or distribute the Program is void, and will - automatically terminate your rights under this License. However, parties - who have received copies, or rights, from you under this License will - not have their licenses terminated so long as such parties remain in - full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and all - its terms and conditions for copying, distributing or modifying the - Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further restrictions - on the recipients' exercise of the rights granted herein. You are not - responsible for enforcing compliance by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot distribute - so as to satisfy simultaneously your obligations under this License and - any other pertinent obligations, then as a consequence you may not - distribute the Program at all. For example, if a patent license would - not permit royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only way you - could satisfy both it and this License would be to refrain entirely from - distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims; this section has the sole purpose of protecting the - integrity of the free software distribution system, which is implemented - by public license practices. Many people have made generous - contributions to the wide range of software distributed through that - system in reliance on consistent application of that system; it is up to - the author/donor to decide if he or she is willing to distribute - software through any other system and a licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed to be - a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License may - add an explicit geographical distribution limitation excluding those - countries, so that distribution is permitted only in or among countries - not thus excluded. In such case, this License incorporates the - limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and - conditions either of that version or of any later version published by - the Free Software Foundation. If the Program does not specify a version - number of this License, you may choose any version ever published by the - Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted by the - Free Software Foundation, write to the Free Software Foundation; we - sometimes make exceptions for this. Our decision will be guided by the - two goals of preserving the free status of all derivatives of our free - software and of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. - EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE - ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH - YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY - AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR - DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL - DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM - (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED - INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF - THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR - OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest to - attach them to the start of each source file to most effectively convey - the exclusion of warranty; and each file should have at least the - "copyright" line and a pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - - Also add information on how to contact you by electronic and paper mail. - - If the program is interactive, make it output a short notice like this - when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type - `show w'. This is free software, and you are welcome to redistribute - it under certain conditions; type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the commands - you use may be called something other than `show w' and `show c'; they - could even be mouse-clicks or menu items--whatever suits your program. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a "copyright disclaimer" for the program, if - necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (which makes passes at compilers) written by - James Hacker. - - signature of Ty Coon, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your program - into proprietary programs. If your program is a subroutine library, you - may consider it more useful to permit linking proprietary applications - with the library. If this is what you want to do, use the GNU Library - General Public License instead of this License. - ---- - -## CLASSPATH EXCEPTION - - Linking this library statically or dynamically with other modules is - making a combined work based on this library. Thus, the terms and - conditions of the GNU General Public License version 2 cover the whole - combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent - modules, and to copy and distribute the resulting executable under - terms of your choice, provided that you also meet, for each linked - independent module, the terms and conditions of the license of that - module. An independent module is a module which is not derived from or - based on this library. If you modify this library, you may extend this - exception to your version of the library, but you are not obligated to - do so. If you do not wish to do so, delete this exception statement - from your version. \ No newline at end of file diff --git a/build/theia/applications/electron/resources/icon.icns b/build/theia/applications/electron/resources/icon.icns deleted file mode 100644 index 1fc08be..0000000 Binary files a/build/theia/applications/electron/resources/icon.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icon.ico b/build/theia/applications/electron/resources/icon.ico deleted file mode 100644 index 976587a..0000000 Binary files a/build/theia/applications/electron/resources/icon.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/512x512.png b/build/theia/applications/electron/resources/icons/512x512.png deleted file mode 100644 index f7f8292..0000000 Binary files a/build/theia/applications/electron/resources/icons/512x512.png and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314IOS.bmp b/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314IOS.bmp deleted file mode 100644 index 33af82f..0000000 Binary files a/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314IOS.bmp and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314Windows.bmp b/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314Windows.bmp deleted file mode 100644 index ea7eb1a..0000000 Binary files a/build/theia/applications/electron/resources/icons/InstallerSidebarImage/164-314Windows.bmp and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/LinuxLauncherIcon/512-512.png b/build/theia/applications/electron/resources/icons/LinuxLauncherIcon/512-512.png deleted file mode 100644 index d59605a..0000000 Binary files a/build/theia/applications/electron/resources/icons/LinuxLauncherIcon/512-512.png and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/512-512-2.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/512-512-2.icns deleted file mode 100644 index 6bbc18a..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/512-512-2.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/Theia-16bp-alfa ignored.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/Theia-16bp-alfa ignored.icns deleted file mode 100644 index ed2d988..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/Theia-16bp-alfa ignored.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/128-128.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/128-128.icns deleted file mode 100644 index 875c0e9..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/128-128.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/16-16-1.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/16-16-1.icns deleted file mode 100644 index 1fbe460..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/16-16-1.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/256-256.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/256-256.icns deleted file mode 100644 index c5815c0..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/256-256.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/32-32.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/32-32.icns deleted file mode 100644 index b6f5526..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/32-32.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/48-48.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/48-48.icns deleted file mode 100644 index 1d3d7e3..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/48-48.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/512-512-2 copy.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/512-512-2 copy.icns deleted file mode 100644 index d42f8b1..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-1bit/512-512-2 copy.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/128-128.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/128-128.icns deleted file mode 100644 index 867f71e..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/128-128.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/16-16.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/16-16.icns deleted file mode 100644 index dadcad3..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/16-16.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/256-256.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/256-256.icns deleted file mode 100644 index 62bf870..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/256-256.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/32-32.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/32-32.icns deleted file mode 100644 index ed39bc3..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/32-32.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/48-48.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/48-48.icns deleted file mode 100644 index c5b4775..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/48-48.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/512-512.icns b/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/512-512.icns deleted file mode 100644 index 6f30727..0000000 Binary files a/build/theia/applications/electron/resources/icons/MacLauncherIcon/icns-8bit/512-512.icns and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico deleted file mode 100644 index e4e6852..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/TheiaBluePrint.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/128-128.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/128-128.ico deleted file mode 100644 index 5cfdabc..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/128-128.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/16-16.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/16-16.ico deleted file mode 100644 index 192c689..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/16-16.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/256-256.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/256-256.ico deleted file mode 100644 index 88e4164..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/256-256.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/32-32.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/32-32.ico deleted file mode 100644 index e47b56c..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/32-32.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/48-48.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/48-48.ico deleted file mode 100644 index 6f2d614..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windows ICO0-24bit/48-48.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/128-128.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/128-128.ico deleted file mode 100644 index 766dc51..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/128-128.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/16-16.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/16-16.ico deleted file mode 100644 index f2fa1fe..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/16-16.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/256-256.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/256-256.ico deleted file mode 100644 index 3a67505..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/256-256.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/32-32.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/32-32.ico deleted file mode 100644 index c5bccef..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/32-32.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/48-48.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/48-48.ico deleted file mode 100644 index 517d95c..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/48-48.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/512-512.ico b/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/512-512.ico deleted file mode 100644 index c91ee15..0000000 Binary files a/build/theia/applications/electron/resources/icons/WindowsLauncherIcon/windowsICO-8bits/512-512.ico and /dev/null differ diff --git a/build/theia/applications/electron/resources/installerSidebar.bmp b/build/theia/applications/electron/resources/installerSidebar.bmp deleted file mode 100644 index 136b02e..0000000 Binary files a/build/theia/applications/electron/resources/installerSidebar.bmp and /dev/null differ diff --git a/build/theia/applications/electron/resources/preload.html b/build/theia/applications/electron/resources/preload.html deleted file mode 100644 index e0d34a5..0000000 --- a/build/theia/applications/electron/resources/preload.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - -
-
- - - - - - - - -
-
- - - \ No newline at end of file diff --git a/build/theia/applications/electron/scripts/after-pack.js b/build/theia/applications/electron/scripts/after-pack.js deleted file mode 100755 index cd6239f..0000000 --- a/build/theia/applications/electron/scripts/after-pack.js +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs'); -const path = require('path'); -const util = require('util'); -const child_process = require('child_process'); -const rimraf = require('rimraf'); -const sign_util = require('app-builder-lib/electron-osx-sign/util'); -const asyncRimraf = util.promisify(rimraf); - -const DELETE_PATHS = [ - 'Contents/Resources/app/node_modules/unzip-stream/aa.zip', - 'Contents/Resources/app/node_modules/unzip-stream/testData*' -]; - -const signCommand = path.join(__dirname, 'sign.sh'); -const notarizeCommand = path.join(__dirname, 'notarize.sh'); -const entitlements = path.resolve(__dirname, '..', 'entitlements.plist'); - -const signFile = file => { - const stat = fs.lstatSync(file); - const mode = stat.isFile() ? stat.mode : undefined; - - console.log(`Signing ${file}...`); - child_process.spawnSync(signCommand, [ - path.basename(file), - entitlements - ], { - cwd: path.dirname(file), - maxBuffer: 1024 * 10000, - env: process.env, - stdio: 'inherit', - encoding: 'utf-8' - }); - - if (mode) { - console.log(`Setting attributes of ${file}...`); - fs.chmodSync(file, mode); - } -}; - -exports.default = async function (context) { - const running_ci = process.env.BLUEPRINT_JENKINS_CI === 'true'; - const releaseDryRun = process.env.BLUEPRINT_JENKINS_RELEASE_DRYRUN === 'true'; - const branch = process.env.CHANGE_BRANCH; - const running_on_mac = context.packager.platform.name === 'mac'; - const appPath = path.resolve(context.appOutDir, `${context.packager.appInfo.productFilename}.app`); - - // Remove anything we don't want in the final package - for (const deletePath of DELETE_PATHS) { - const resolvedPath = path.resolve(appPath, deletePath); - console.log(`Deleting ${resolvedPath}...`); - await asyncRimraf(resolvedPath); - } - - // Only continue for macOS during CI - if ((( branch === 'master' || releaseDryRun) && running_ci && running_on_mac)) { - console.log('Detected Blueprint Release on Mac ' + releaseDryRun ? ' (dry-run)' : '' - + ' - proceeding with signing and notarizing'); - } else { - if (running_on_mac) { - console.log('Not a release or dry-run requiring signing/notarizing - skipping'); - } - return; - } - - // Use app-builder-lib to find all binaries to sign, at this level it will include the final .app - let childPaths = await sign_util.walkAsync(context.appOutDir); - - // Sign deepest first - // From https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/electron-osx-sign/sign.js#L120 - childPaths = childPaths.sort((a, b) => { - const aDepth = a.split(path.sep).length; - const bDepth = b.split(path.sep).length; - return bDepth - aDepth; - }); - - // Sign binaries - childPaths.forEach(file => signFile(file, context.appOutDir)); - - // Notarize app - child_process.spawnSync(notarizeCommand, [ - path.basename(appPath), - context.packager.appInfo.info._configuration.appId - ], { - cwd: path.dirname(appPath), - maxBuffer: 1024 * 10000, - env: process.env, - stdio: 'inherit', - encoding: 'utf-8' - }); -}; diff --git a/build/theia/applications/electron/scripts/notarize.sh b/build/theia/applications/electron/scripts/notarize.sh deleted file mode 100755 index 81af71f..0000000 --- a/build/theia/applications/electron/scripts/notarize.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -x - -INPUT=$1 -APP_ID=$2 -NEEDS_UNZIP=false -UUID_REGEX='"uuid"\s*:\s*"([^"]+)' -STATUS_REGEX='"status"\s*:\s*"([^"]+)' - -# if folder, zip it -if [ -d "${INPUT}" ]; then - NEEDS_UNZIP=true - zip -r -q -y unsigned.zip "${INPUT}" - rm -rf "${INPUT}" - INPUT=unsigned.zip -fi - -# copy file to storage server -scp -p "${INPUT}" genie.theia@projects-storage.eclipse.org:./ -rm -f "${INPUT}" - -# name to use on server -REMOTE_NAME=${INPUT##*/} - -# notarize over ssh -RESPONSE=$(ssh -q genie.theia@projects-storage.eclipse.org curl -X POST -F file=@"\"${REMOTE_NAME}\"" -F "'options={\"primaryBundleId\": \"${APP_ID}\", \"staple\": true};type=application/json'" https://cbi.eclipse.org/macos/xcrun/notarize) - -# fund uuid and status -[[ $RESPONSE =~ $UUID_REGEX ]] -UUID=${BASH_REMATCH[1]} -[[ $RESPONSE =~ $STATUS_REGEX ]] -STATUS=${BASH_REMATCH[1]} - -# poll progress -echo " Progress: $RESPONSE" -while [[ $STATUS == 'IN_PROGRESS' ]]; do - sleep 120 - RESPONSE=$(ssh -q genie.theia@projects-storage.eclipse.org curl -s https://cbi.eclipse.org/macos/xcrun/${UUID}/status) - [[ $RESPONSE =~ $STATUS_REGEX ]] - STATUS=${BASH_REMATCH[1]} - echo " Progress: $RESPONSE" -done - -if [[ $STATUS != 'COMPLETE' ]]; then - echo "Notarization failed: $RESPONSE" - exit 1 -fi - -# download stapled result -ssh -q genie.theia@projects-storage.eclipse.org curl -o "\"stapled-${REMOTE_NAME}\"" https://cbi.eclipse.org/macos/xcrun/${UUID}/download - -# copy stapled file back from server -scp -T -p genie.theia@projects-storage.eclipse.org:"\"./stapled-${REMOTE_NAME}\"" "${INPUT}" - -# ensure storage server is clean -ssh -q genie.theia@projects-storage.eclipse.org rm -f "\"${REMOTE_NAME}\"" "\"stapled-${REMOTE_NAME}\"" entitlements.plist - -# if unzip needed -if [ "$NEEDS_UNZIP" = true ]; then - unzip -qq "${INPUT}" - - if [ $? -ne 0 ]; then - # echo contents if unzip failed - output=$(cat $INPUT) - echo "$output" - exit 1 - fi - - rm -f "${INPUT}" -fi diff --git a/build/theia/applications/electron/scripts/sign.sh b/build/theia/applications/electron/scripts/sign.sh deleted file mode 100755 index c690833..0000000 --- a/build/theia/applications/electron/scripts/sign.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -x - -INPUT=$1 -ENTITLEMENTS=$2 -NEEDS_UNZIP=false - -# if folder, zip it -if [ -d "${INPUT}" ]; then - NEEDS_UNZIP=true - zip -r -q -y unsigned.zip "${INPUT}" - rm -rf "${INPUT}" - INPUT=unsigned.zip -fi - -# copy file to storage server -scp -p "${INPUT}" genie.theia@projects-storage.eclipse.org:./ -rm -f "${INPUT}" - -# copy entitlements to storage server -scp -p "${ENTITLEMENTS}" genie.theia@projects-storage.eclipse.org:./entitlements.plist - -# name to use on server -REMOTE_NAME=${INPUT##*/} - -# sign over ssh -# https://wiki.eclipse.org/IT_Infrastructure_Doc#Web_service -ssh -q genie.theia@projects-storage.eclipse.org curl -f -o "\"signed-${REMOTE_NAME}\"" -F file=@"\"${REMOTE_NAME}\"" -F entitlements=@entitlements.plist https://cbi.eclipse.org/macos/codesign/sign - -# copy signed file back from server -scp -T -p genie.theia@projects-storage.eclipse.org:"\"./signed-${REMOTE_NAME}\"" "${INPUT}" - -# ensure storage server is clean -ssh -q genie.theia@projects-storage.eclipse.org rm -f "\"${REMOTE_NAME}\"" "\"signed-${REMOTE_NAME}\"" entitlements.plist - -# if unzip needed -if [ "$NEEDS_UNZIP" = true ]; then - unzip -qq "${INPUT}" - - if [ $? -ne 0 ]; then - # echo contents if unzip failed - output=$(cat $INPUT) - echo "$output" - exit 1 - fi - - rm -f "${INPUT}" -fi diff --git a/build/theia/applications/electron/scripts/theia-electron-main.js b/build/theia/applications/electron/scripts/theia-electron-main.js deleted file mode 100644 index bf11aa8..0000000 --- a/build/theia/applications/electron/scripts/theia-electron-main.js +++ /dev/null @@ -1,16 +0,0 @@ -const path = require('path'); -const os = require('os'); - -// Update to override the supported VS Code API version. -// process.env.VSCODE_API_VERSION = '1.50.0' - -// Use a set of builtin plugins in our application. -process.env.THEIA_DEFAULT_PLUGINS = `local-dir:${path.resolve(__dirname, '../', 'plugins')}`; - -// Lookup inside the user's home folder for more plugins, and accept user-defined paths. -process.env.THEIA_PLUGINS = [ - process.env.THEIA_PLUGINS, `local-dir:${path.resolve(os.homedir(), '.theia-blueprint', 'plugins')}`, -].filter(Boolean).join(','); - -// Handover to the auto-generated electron application handler. -require('../lib/backend/electron-main.js'); diff --git a/build/theia/applications/electron/scripts/update-blockmap.ts b/build/theia/applications/electron/scripts/update-blockmap.ts deleted file mode 100644 index 9c6887c..0000000 --- a/build/theia/applications/electron/scripts/update-blockmap.ts +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2023 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { hideBin } from 'yargs/helpers'; -import yargs from 'yargs/yargs'; -import { executeAppBuilderAsJson } from 'app-builder-lib/out/util/appBuilder'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { BlockMapDataHolder } from 'builder-util-runtime'; -import { rmSync } from 'fs'; -import * as path from 'path'; - -const BLOCK_MAP_FILE_SUFFIX = '.blockmap'; - -const argv = yargs(hideBin(process.argv)) - .option('executable', { alias: 'e', type: 'string', default: 'TheiaBlueprint.exe', description: 'The executable for which the blockmap needs to be updated' }) - .version(false) - .wrap(120) - .parseSync(); - -execute(); - -async function execute(): Promise { - const executable = argv.executable; - const executablePath = path.resolve( - __dirname, - '../dist/', - executable - ); - const blockMapFile = `${executablePath}${BLOCK_MAP_FILE_SUFFIX}`; - rmSync(blockMapFile, { - force: true, - }); - await executeAppBuilderAsJson(['blockmap', '--input', executablePath, '--output', blockMapFile]); -}; diff --git a/build/theia/applications/electron/scripts/update-checksum.ts b/build/theia/applications/electron/scripts/update-checksum.ts deleted file mode 100644 index a58c85f..0000000 --- a/build/theia/applications/electron/scripts/update-checksum.ts +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ -import * as crypto from 'crypto'; -import * as fs from 'fs'; -import * as jsyaml from 'js-yaml'; -import * as path from 'path'; -import { hideBin } from 'yargs/helpers'; -import yargs from 'yargs/yargs'; - -const argv = yargs(hideBin(process.argv)) - .option('executable', { alias: 'e', type: 'string', default: 'TheiaBlueprint.AppImage', description: 'The executable for which the checksum needs to be updated' }) - .option('yaml', { alias: 'y', type: 'string', default: 'latest-linux.yml', description: 'The yaml file where the checksum needs to be updated' }) - .option('platform', { alias: 'p', type: 'string', default: 'linux', description: 'The OS platform' }) - .version(false) - .wrap(120) - .parseSync(); - -execute(); - -async function execute(): Promise { - const executable = argv.executable; - const yaml = argv.yaml; - const platform = argv.platform; - - const executablePath = path.resolve( - __dirname, - '../dist/', - executable - ); - - const yamlPath = path.resolve( - __dirname, - '../dist/', - yaml - ); - - console.log('Exe: ' + executablePath + '; Yaml: ' + yamlPath + '; Platform: ' + platform); - - const hash = await hashFile(executablePath, 'sha512', 'base64', {}); - const size = fs.statSync(executablePath).size; - - const yamlContents: string = fs.readFileSync(yamlPath, { encoding: 'utf8' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const latestYaml: any = jsyaml.safeLoad(yamlContents); - latestYaml.sha512 = hash; - latestYaml.path = updatedPath(latestYaml.path, latestYaml.version, platform); - for (const file of latestYaml.files) { - file.sha512 = hash; - file.size = size; - file.url = updatedPath(file.url, latestYaml.version, platform); - } - - // line width -1 to avoid adding >- on long strings like a hash - const newYamlContents = jsyaml.dump(latestYaml, { lineWidth: -1 }); - fs.writeFileSync(yamlPath, newYamlContents); -} - -function hashFile(file: fs.PathLike, algorithm = 'sha512', encoding: BufferEncoding = 'base64', options: string | { - flags?: string; - encoding?: BufferEncoding; - fd?: number; - mode?: number; - autoClose?: boolean; - emitClose?: boolean; - start?: number; - end?: number; - highWaterMark?: number; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -}): Promise { - return new Promise((resolve, reject) => { - const hash = crypto.createHash(algorithm); - hash.on('error', reject).setEncoding(encoding); - fs.createReadStream( - file, - Object.assign({}, options, { - highWaterMark: 1024 * 1024, - }) - ) - .on('error', reject) - .on('end', () => { - hash.end(); - resolve(hash.read()); - }) - .pipe( - hash, - { - end: false, - } - ); - }); -} - -function updatedPath(toUpdate: string, version: string, platform: string): string { - const extensionIndex = toUpdate.lastIndexOf('.'); - return '../../' + version + '/' + platform + '/' + toUpdate.substring(0, extensionIndex) + '-' + version + toUpdate.substring(extensionIndex); -} diff --git a/build/theia/applications/electron/test/app.spec.js b/build/theia/applications/electron/test/app.spec.js deleted file mode 100644 index 04d0b50..0000000 --- a/build/theia/applications/electron/test/app.spec.js +++ /dev/null @@ -1,135 +0,0 @@ -const os = require('os'); -const path = require('path'); -const { remote } = require('webdriverio'); -const { expect } = require('chai'); - -const THEIA_LOAD_TIMEOUT = 15000; // 15 seconds - -function getBinaryPath() { - const distFolder = path.join(__dirname, '..', 'dist'); - switch (os.platform()) { - case 'linux': - return path.join( - distFolder, - 'linux-unpacked', - 'blueprint-electron-app' - ); - case 'win32': - return path.join( - distFolder, - 'win-unpacked', - 'TheiaBlueprint.exe' - ); - case 'darwin': - return path.join( - distFolder, - 'mac', - 'TheiaBlueprint.app', - 'Contents', - 'MacOS', - 'TheiaBlueprint' - ); - default: - return undefined; - } -}; - -// Utility for keyboard shortcuts that execute commands where -// the key combination is the same on all platforms *except that* -// the Command key is used instead of Control on MacOS. Note that -// sometimes MacOS also uses Control. This is not handled, here -function macSafeKeyCombo(keys) { - if (os.platform() === 'darwin' && keys.includes('Control')) { - // Puppeteer calls the Command key "Meta" - return keys.map(k => k === 'Control' ? 'Meta' : k); - } - return keys; -}; - -describe('Theia App', function () { - // In mocha, 'this' is a common context between sibling beforeEach, afterEach, it, etc methods within the same describe. - // Each describe has its own context. - beforeEach(async function () { - const binary = getBinaryPath(); - if (!binary) { - throw new Error('Tests are not supported for this platform.'); - } - - // Start app and store connection in context (this) - this.browser = await remote({ - // Change to info to get detailed events of webdriverio - logLevel: 'info', - capabilities: { - browserName: 'chrome', - 'goog:chromeOptions': { - // Path to built and packaged theia - binary: binary, - // Hand in workspace to load as runtime parameter - args: [path.join(__dirname, 'workspace')], - }, - }, - }); - - const appShell = await this.browser.$('#theia-app-shell'); - - // mocha waits for returned promise to resolve - // Theia is loaded once the app shell is present - return appShell.waitForExist({ - timeout: THEIA_LOAD_TIMEOUT, - timeoutMsg: 'Theia took too long to load.', - }); - }); - - afterEach(async function () { - try { - await this.browser.closeWindow(); - } catch (err) { - // Workaround: Puppeteer cannot properly connect to electron and throws an error. - // However, the window is closed and that's all we want here. - if (`${err}`.includes('Protocol error (Target.createTarget)')) { - return; - } - // Rethrow for unexpected errors to fail test. - throw err; - } - }); - - it('Correct window title', async function () { - const windowTitle = await this.browser.getTitle(); - expect(windowTitle).to.include('workspace'); - }); - - it('Builtin extensions', async function () { - // Wait a bit to make sure key handlers are registered. - await new Promise(r => setTimeout(r, 2000)); - - // Open extensions view - await this.browser.keys(macSafeKeyCombo(['Control', 'Shift', 'x'])); - const builtinContainer = await this.browser.$( - '#vsx-extensions-view-container--vsx-extensions\\:builtin' - ); - - // Expand builtin extensions - const builtinHeader = await builtinContainer.$('.theia-header.header'); - await builtinHeader.moveTo({ xOffset: 1, yOffset: 1 }); - await builtinHeader.waitForDisplayed(); - await builtinHeader.waitForClickable(); - await builtinHeader.click(); - - // Wait for expansion to finish - const builtin = await this.browser.$( - '#vsx-extensions\\:builtin .theia-TreeContainer' - ); - await builtin.waitForExist(); - - // Get names of all builtin extensions - const extensions = await builtin.$$('.theia-vsx-extension .name'); - const extensionNames = await Promise.all( - extensions.map(e => e.getText()) - ); - - // Exemplary check a few extensions - expect(extensionNames).to.include('Debugger for Java'); - expect(extensionNames).to.include('TypeScript Language Basics (built-in)'); - }); -}); diff --git a/build/theia/applications/electron/test/workspace/README.md b/build/theia/applications/electron/test/workspace/README.md deleted file mode 100644 index e589628..0000000 --- a/build/theia/applications/electron/test/workspace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Test Workspace - -This is the test workspace for E2E tests. diff --git a/build/theia/applications/electron/tsconfig.eslint.json b/build/theia/applications/electron/tsconfig.eslint.json deleted file mode 100644 index e5309d0..0000000 --- a/build/theia/applications/electron/tsconfig.eslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": [ - "./scripts", - "./test" - ] - } - \ No newline at end of file diff --git a/build/theia/applications/electron/tsconfig.json b/build/theia/applications/electron/tsconfig.json deleted file mode 100644 index 44452b4..0000000 --- a/build/theia/applications/electron/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../configs/base.tsconfig", - "include": [], - "compilerOptions": { - "composite": true, - "esModuleInterop": true - }, - "references": [ - { - "path": "../../theia-extensions/launcher" - }, - { - "path": "../../theia-extensions/product" - }, - { - "path": "../../theia-extensions/updater" - } - ] -} diff --git a/build/theia/applications/electron/webpack.config.js b/build/theia/applications/electron/webpack.config.js deleted file mode 100644 index 3ecda1b..0000000 --- a/build/theia/applications/electron/webpack.config.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file can be edited to customize webpack configuration. - * To reset delete this file and rerun theia build again. - */ -// @ts-check -const config = require('./gen-webpack.config.js'); -const backend = require('./gen-webpack.node.config.js'); - -/** - * Expose bundled modules on window.theia.moduleName namespace, e.g. - * window['theia']['@theia/core/lib/common/uri']. - * Such syntax can be used by external code, for instance, for testing. -config.module.rules.push({ - test: /\.js$/, - loader: require.resolve('@theia/application-manager/lib/expose-loader') -}); */ - -if (process.platform !== 'win32') { - // For some reason, blueprint wants to bundle the `.node` files directly without going through `@vscode/windows-ca-certs` - backend.ignoredResources.add('@vscode/windows-ca-certs/build/Release/crypt32.node'); -} - - -module.exports = [ - ...config, - backend.config -]; diff --git a/build/theia/configs/base.eslintrc.json b/build/theia/configs/base.eslintrc.json deleted file mode 100644 index e44619d..0000000 --- a/build/theia/configs/base.eslintrc.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 6, - "ecmaFeatures": { - "jsx": true - } - }, - "plugins": [ - "@typescript-eslint", - "@typescript-eslint/tslint", - "import", - "no-null" - ], - "env": { - "browser": true, - "mocha": true, - "node": true - }, - "ignorePatterns": [ - "node_modules", - "lib" - ] -} diff --git a/build/theia/configs/base.tsconfig.json b/build/theia/configs/base.tsconfig.json deleted file mode 100644 index e325d20..0000000 --- a/build/theia/configs/base.tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "skipLibCheck": true, - "declaration": true, - "declarationMap": true, - "noImplicitAny": true, - "noEmitOnError": false, - "noImplicitThis": true, - "noUnusedLocals": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "downlevelIteration": true, - "resolveJsonModule": true, - "module": "commonjs", - "moduleResolution": "node", - "target": "ES2017", - "jsx": "react", - "lib": [ - "ES2017", - "ES2020.Promise", - "dom" - ], - "sourceMap": true, - "composite": true - } -} diff --git a/build/theia/configs/build.eslintrc.json b/build/theia/configs/build.eslintrc.json deleted file mode 100644 index c0a2c52..0000000 --- a/build/theia/configs/build.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "./base.eslintrc.json", - "./errors.eslintrc.json" - ] -} diff --git a/build/theia/configs/errors.eslintrc.json b/build/theia/configs/errors.eslintrc.json deleted file mode 100644 index 4faa6e8..0000000 --- a/build/theia/configs/errors.eslintrc.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/eslintrc", - "rules": { - "@typescript-eslint/consistent-type-definitions": "error", - "@typescript-eslint/indent": "off", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/quotes": [ - "error", - "single", - { - "avoidEscape": true - } - ], - "@typescript-eslint/semi": [ - "error", - "always" - ], - "@typescript-eslint/type-annotation-spacing": "error", - "arrow-body-style": [ - "error", - "as-needed" - ], - "arrow-parens": [ - "error", - "as-needed" - ], - "camelcase": "off", - "comma-dangle": "off", - "curly": "error", - "eol-last": "error", - "eqeqeq": [ - "error", - "smart" - ], - "guard-for-in": "error", - "id-blacklist": "off", - "id-match": "off", - "max-len": [ - "error", - { - "code": 180 - } - ], - "no-magic-numbers": "off", - "no-multiple-empty-lines": [ - "error", - { - "max": 1 - } - ], - "no-new-wrappers": "error", - "no-null/no-null": "error", - "no-shadow": "off", - "@typescript-eslint/no-shadow": [ - "error", - { - "hoist": "all" - } - ], - "no-tabs": "error", - "no-throw-literal": "error", - "no-trailing-spaces": "error", - "no-underscore-dangle": "off", - "no-unused-expressions": "error", - "no-var": "error", - "no-void": "error", - "one-var": [ - "error", - "never" - ], - "prefer-const": [ - "error", - { - "destructuring": "all" - } - ], - "radix": "off", - "space-before-function-paren": [ - "error", - { - "anonymous": "always", - "named": "never", - "asyncArrow": "always" - } - ], - "spaced-comment": [ - "error", - "always", - { - "exceptions": [ - "*", - "+", - "-", - "/" - ] - } - ], - "@typescript-eslint/tslint/config": [ - "error", - { - "rules": { - "file-header": [ - true, - "SPDX-License-Identifier: EPL-2\\.0 OR GPL-2\\.0 WITH Classpath-exception-2\\.0" - ], - "jsdoc-format": [ - true, - "check-multiline-start" - ], - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "typedef": [ - true, - "call-signature", - "property-declaration" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } - } - ], - "import/no-extraneous-dependencies": "error" - }, - "overrides": [ - { - "files": [ - "dev-packages", - "*.{spec,espec,slow-spec}.{js,ts}" - ], - "rules": { - "import/no-extraneous-dependencies": "off" - } - } - ] -} diff --git a/build/theia/configs/tsconfig.eslint.json b/build/theia/configs/tsconfig.eslint.json deleted file mode 100644 index 3f55d8a..0000000 --- a/build/theia/configs/tsconfig.eslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": [ - "../scripts" - ] - } - \ No newline at end of file diff --git a/build/theia/configs/warnings.eslintrc.json b/build/theia/configs/warnings.eslintrc.json deleted file mode 100644 index 8403d0a..0000000 --- a/build/theia/configs/warnings.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "plugins": [ - "deprecation" - ], - "rules": { - "@typescript-eslint/await-thenable": "warn", - "no-return-await": "warn", - "deprecation/deprecation": "warn" - } -} \ No newline at end of file diff --git a/build/theia/configs/xss.eslintrc.json b/build/theia/configs/xss.eslintrc.json deleted file mode 100644 index 11745db..0000000 --- a/build/theia/configs/xss.eslintrc.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": ["plugin:no-unsanitized/DOM"], - "plugins": ["no-unsanitized", "react"], - "parserOptions": { - "ecmaFeatures": { - "jsx": true - } - }, - "rules": { - "no-unsanitized/method": [ - "warn", { - "escape": { - "methods": ["DOMPurify.sanitize"] - } - } - ], - "no-unsanitized/property": [ - "warn", { - "escape": { - "methods": ["DOMPurify.sanitize"] - } - } - ], - "no-eval": "warn", - "no-implied-eval": "warn", - "react/no-danger-with-children": "warn", - "react/no-danger": "warn" - } -} diff --git a/build/theia/lerna.json b/build/theia/lerna.json deleted file mode 100644 index 0e15258..0000000 --- a/build/theia/lerna.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "lerna": "4.0.0", - "version": "0.0.0", - "useWorkspaces": true, - "npmClient": "yarn", - "command": { - "run": { - "stream": true - } - } -} \ No newline at end of file diff --git a/build/theia/package.json b/build/theia/package.json deleted file mode 100644 index fc894bc..0000000 --- a/build/theia/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "private": true, - "version": "1.40.0", - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "author": "Rob Moran ", - "homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", - "bugs": { - "url": "https://github.com/eclipse-theia/theia/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" - }, - "engines": { - "yarn": ">=1.7.0 <2", - "node": ">=12.14.1" - }, - "devDependencies": { - "@theia/cli": "1.41.0", - "@typescript-eslint/eslint-plugin": "^4.25.0", - "@typescript-eslint/eslint-plugin-tslint": "^4.25.0", - "@typescript-eslint/parser": "^4.25.0", - "eslint": "^7.27.0", - "eslint-plugin-deprecation": "1.5.0", - "eslint-plugin-import": "^2.23.3", - "eslint-plugin-no-null": "^1.0.2", - "eslint-plugin-no-unsanitized": "^3.1.5", - "eslint-plugin-react": "^7.23.2", - "lerna": "^6.0.1", - "rimraf": "^2.7.1", - "ts-node": "^10.0.0", - "type-fest": "^0.21.0", - "yargs": "17.7.2" - }, - "scripts": { - "clean": "lerna run clean && rimraf node_modules", - "build": "yarn build:extensions && yarn build:applications", - "build:dev": "yarn build:extensions && yarn build:applications:dev", - "build:applications": "yarn build:extensions && lerna run --scope=\"blueprint*app\" build:prod --concurrency 1", - "build:applications:dev": "yarn build:extensions && lerna run --scope=\"blueprint*app\" build --concurrency 1", - "build:extensions": "lerna run --scope=\"blueprint*ext\" build", - "download:plugins": "theia download:plugins --rate-limit=15 --parallel=false --ignore-errors", - "package:applications": "lerna run --scope=\"blueprint*app\" package --concurrency 1", - "package:applications:preview": "lerna run --scope=\"blueprint*app\" package:preview --concurrency 1", - "package:applications:prod": "lerna run --scope=\"blueprint*app\" package:prod --concurrency 1", - "watch": "lerna run --parallel watch", - "test": "lerna run test", - "electron": "yarn --cwd applications/electron", - "browser": "yarn --cwd applications/browser", - "update:next": "ts-node scripts/update-theia-to-next.ts && lerna run update:next", - "lint": "eslint --ext js,jsx,ts,tsx scripts && lerna run lint", - "lint:fix": "eslint --ext js,jsx,ts,tsx scripts --fix && lerna run lint:fix" - }, - "theiaPluginsDir": "plugins", - "theiaPlugins": { - "json": "https://open-vsx.org/api/vscode/json/1.62.3/file/vscode.json-1.62.3.vsix", - "yaml": "https://open-vsx.org/api/vscode/yaml/1.62.3/file/vscode.yaml-1.62.3.vsix", - "shell": "https://open-vsx.org/api/vscode/shellscript/1.62.3/file/vscode.shellscript-1.62.3.vsix", - "golang": "https://open-vsx.org/api/vscode/go/1.62.3/file/vscode.go-1.62.3.vsix", - "python": "https://open-vsx.org/api/vscode/python/1.62.3/file/vscode.python-1.62.3.vsix", - "docker": "https://open-vsx.org/api/vscode/docker/1.62.3/file/vscode.docker-1.62.3.vsix", - "dockerfile": "https://open-vsx.org/api/jeff-hykin/better-dockerfile-syntax/1.0.2/file/jeff-hykin.better-dockerfile-syntax-1.0.2.vsix", - "markdown": "https://open-vsx.org/api/vscode/markdown/1.62.3/file/vscode.markdown-1.62.3.vsix", - "terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix", - "yaml.lint": "https://open-vsx.org/api/phil9909/ytt-lint/0.3.1/file/phil9909.ytt-lint-0.3.1.vsix" - }, - "theiaPluginsExcludeIds": [ - "ms-vscode.js-debug-companion", - "VisualStudioExptTeam.vscodeintellicode", - "vscode.extension-editing", - "vscode.builtin-notebook-renderers", - "vscode.git", - "vscode.git-ui", - "vscode.github", - "vscode.github-authentication", - "vscode.microsoft-authentication" - ], - "workspaces": [ - "applications/*", - "theia-extensions/*" - ], - "resolutions": { - "@types/puppeteer": "^5.4.0", - "@yarnpkg/parsers": "3.0.0-rc.50", - "**/msgpackr": "1.9.9", - "**/multer": "1.4.4-lts.1" - } -} diff --git a/build/theia/scripts/update-theia-to-next.ts b/build/theia/scripts/update-theia-to-next.ts deleted file mode 100644 index 15b184c..0000000 --- a/build/theia/scripts/update-theia-to-next.ts +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ -import * as fs from 'fs'; -import * as path from 'path'; -import { PackageJson } from 'type-fest'; - -execute(); - -async function execute(): Promise { - const packageJsonPath = path.resolve( - './', - 'package.json' - ); - - console.log(`Updating ${packageJsonPath}...`); - - const packageJsonContents: string = fs.readFileSync(packageJsonPath, { encoding: 'utf8' }); - const packageJson: PackageJson = JSON.parse(packageJsonContents); - - console.log('...dependencies...'); - if (packageJson.dependencies) { - updateTheiaVersions(packageJson.dependencies); - } - console.log('...done...'); - - console.log('...devDependencies...'); - if (packageJson.devDependencies) { - updateTheiaVersions(packageJson.devDependencies); - } - console.log('...done.'); - - // note: "null" is valid as per `stringify()` signature - // eslint-disable-next-line no-null/no-null - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2)); -} - -function updateTheiaVersions(dependencies: PackageJson.Dependency): void { - for (const dependency in dependencies) { - if (dependency.startsWith('@theia/')) { - console.log(`...setting ${dependency} from ${dependencies[dependency]} to next...`); - dependencies[dependency] = 'next'; - } - } -} diff --git a/build/theia/theia-extensions/launcher/.eslintrc.js b/build/theia/theia-extensions/launcher/.eslintrc.js deleted file mode 100644 index 1308994..0000000 --- a/build/theia/theia-extensions/launcher/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: [ - '../../configs/build.eslintrc.json' - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - } -}; diff --git a/build/theia/theia-extensions/launcher/package.json b/build/theia/theia-extensions/launcher/package.json deleted file mode 100644 index 0d1f3ca..0000000 --- a/build/theia/theia-extensions/launcher/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "blueprint-launcher-ext", - "version": "1.40.0", - "keywords": [ - "theia-extension" - ], - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "repository": { - "type": "git", - "url": "https://github.com/eclipse-theia/theia-blueprint.git" - }, - "bugs": { - "url": "https://github.com/eclipse-theia/theia-blueprint/issues" - }, - "homepage": "https://github.com/eclipse-theia/theia-blueprint", - "files": [ - "lib", - "src" - ], - "dependencies": { - "@theia/core": "1.41.0", - "body-parser": "^1.17.2", - "fs-extra": "^4.0.2", - "@vscode/sudo-prompt": "9.3.1" - }, - "devDependencies": { - "rimraf": "^2.7.1", - "typescript": "^4.5.5" - }, - "scripts": { - "clean": "rimraf lib *.tsbuildinfo", - "build": "tsc -b", - "lint": "eslint --ext js,jsx,ts,tsx src", - "lint:fix": "eslint --ext js,jsx,ts,tsx src --fix", - "watch": "tsc -w", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts" - }, - "theiaExtensions": [ - { - "frontendElectron": "lib/browser/create-launcher-frontend-module", - "backend": "lib/node/launcher-backend-module" - } - ] -} diff --git a/build/theia/theia-extensions/launcher/src/browser/create-launcher-contribution.ts b/build/theia/theia-extensions/launcher/src/browser/create-launcher-contribution.ts deleted file mode 100644 index 63d9f18..0000000 --- a/build/theia/theia-extensions/launcher/src/browser/create-launcher-contribution.ts +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2022 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { ConfirmDialog, Dialog, FrontendApplication, FrontendApplicationContribution, StorageService } from '@theia/core/lib/browser'; -import { ILogger, MaybePromise } from '@theia/core/lib/common'; -import { nls } from '@theia/core/lib/common/nls'; -import { inject, injectable } from '@theia/core/shared/inversify'; -import { LauncherService } from './launcher-service'; - -@injectable() -export class CreateLauncherCommandContribution implements FrontendApplicationContribution { - - @inject(StorageService) - protected readonly storageService: StorageService; - - @inject(ILogger) - protected readonly logger: ILogger; - - @inject(LauncherService) private readonly launcherService: LauncherService; - - onStart(app: FrontendApplication): MaybePromise { - this.launcherService.isInitialized().then(async initialized => { - if (!initialized) { - const messageContainer = document.createElement('div'); - // eslint-disable-next-line max-len - messageContainer.textContent = nls.localizeByDefault("Would you like to install a shell command that launches the application?\nYou will be able to run Theia Blueprint from the command line by typing 'theia'."); - messageContainer.setAttribute('style', 'white-space: pre-line'); - const details = document.createElement('p'); - details.textContent = 'Administrator privileges are required, you will need to enter your password next.'; - messageContainer.appendChild(details); - const dialog = new ConfirmDialog({ - title: nls.localizeByDefault('Create launcher'), - msg: messageContainer, - ok: Dialog.YES, - cancel: Dialog.NO - }); - const install = await dialog.open(); - this.launcherService.createLauncher(!!install); - this.logger.info('Initialized application launcher.'); - } else { - this.logger.info('Application launcher was already initialized.'); - } - }); - } -} diff --git a/build/theia/theia-extensions/launcher/src/browser/create-launcher-frontend-module.ts b/build/theia/theia-extensions/launcher/src/browser/create-launcher-frontend-module.ts deleted file mode 100644 index 1fc1612..0000000 --- a/build/theia/theia-extensions/launcher/src/browser/create-launcher-frontend-module.ts +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2022 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ -import { CreateLauncherCommandContribution } from './create-launcher-contribution'; -import { ContainerModule } from '@theia/core/shared/inversify'; -import { LauncherService } from './launcher-service'; -import { FrontendApplicationContribution } from '@theia/core/lib/browser'; - -export default new ContainerModule(bind => { - bind(FrontendApplicationContribution).to(CreateLauncherCommandContribution); - bind(LauncherService).toSelf().inSingletonScope(); -}); diff --git a/build/theia/theia-extensions/launcher/src/browser/launcher-service.ts b/build/theia/theia-extensions/launcher/src/browser/launcher-service.ts deleted file mode 100644 index af202d9..0000000 --- a/build/theia/theia-extensions/launcher/src/browser/launcher-service.ts +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2022 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { Endpoint } from '@theia/core/lib/browser'; -import { injectable } from '@theia/core/shared/inversify'; - -@injectable() -export class LauncherService { - - async isInitialized(): Promise { - const response = await fetch(new Request(`${this.endpoint()}/initialized`), { - body: undefined, - method: 'GET' - }).then(r => r.json()); - return !!response?.initialized; - } - - async createLauncher(create: boolean): Promise { - fetch(new Request(`${this.endpoint()}`), { - body: JSON.stringify({ create }), - method: 'PUT', - headers: new Headers({ 'Content-Type': 'application/json' }) - }); - } - - protected endpoint(): string { - const url = new Endpoint({ path: 'launcher' }).getRestUrl().toString(); - return url.endsWith('/') ? url.slice(0, -1) : url; - } -} diff --git a/build/theia/theia-extensions/launcher/src/node/launcher-backend-module.ts b/build/theia/theia-extensions/launcher/src/node/launcher-backend-module.ts deleted file mode 100644 index 4f9af35..0000000 --- a/build/theia/theia-extensions/launcher/src/node/launcher-backend-module.ts +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2022 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { ContainerModule } from '@theia/core/shared/inversify'; -import { TheiaLauncherServiceEndpoint } from './launcher-endpoint'; -import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; - -export default new ContainerModule(bind => { - bind(TheiaLauncherServiceEndpoint).toSelf().inSingletonScope(); - bind(BackendApplicationContribution).toService(TheiaLauncherServiceEndpoint); -}); diff --git a/build/theia/theia-extensions/launcher/src/node/launcher-endpoint.ts b/build/theia/theia-extensions/launcher/src/node/launcher-endpoint.ts deleted file mode 100644 index 7738234..0000000 --- a/build/theia/theia-extensions/launcher/src/node/launcher-endpoint.ts +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2022 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { inject, injectable } from '@theia/core/shared/inversify'; -import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; -import { Application, Router, Request, Response } from '@theia/core/shared/express'; -import { json } from 'body-parser'; -import { ILogger } from '@theia/core/lib/common'; -import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; -import * as sudo from '@vscode/sudo-prompt'; -import * as fs from 'fs-extra'; -import URI from '@theia/core/lib/common/uri'; - -interface PathEntry { - source: string; - target: string; -} - -@injectable() -export class TheiaLauncherServiceEndpoint implements BackendApplicationContribution { - protected static PATH = '/launcher'; - private LAUNCHER_LINK_SOURCE = '/usr/local/bin/theia'; - - @inject(ILogger) - protected readonly logger: ILogger; - - @inject(EnvVariablesServer) - protected readonly envServer: EnvVariablesServer; - - configure(app: Application): void { - const router = Router(); - router.put('/', (request, response) => this.createLauncher(request, response)); - router.get('/initialized', (request, response) => this.isInitialized(request, response)); - app.use(json()); - app.use(TheiaLauncherServiceEndpoint.PATH, router); - } - - private async isInitialized(_request: Request, response: Response): Promise { - if (!process.env.APPIMAGE) { - // we are not running from an AppImage, so there's nothing to initialize - // return true - response.json({ initialized: true }); - } - const storageFile = await this.getStorageFilePath(); - if (!storageFile) { - throw new Error('Could not resolve path to storage file.'); - } - if (!fs.existsSync(storageFile)) { - response.json({ initialized: false }); - return; - } - const data = await this.readLauncherPathsFromStorage(storageFile); - const initialized = !!data.find(entry => entry.source === this.LAUNCHER_LINK_SOURCE); - response.json({ initialized }); - } - - private async getStorageFilePath(): Promise { - const configDirUri = await this.envServer.getConfigDirUri(); - const globalStorageFolderUri = new URI(configDirUri).resolve('globalStorage/blueprint-launcher/paths.json'); - const globalStorageFolderFsPath = globalStorageFolderUri.path.fsPath(); - return globalStorageFolderFsPath; - } - - private async readLauncherPathsFromStorage(storageFile: string): Promise { - if (!fs.existsSync(storageFile)) { - return []; - } - try { - return await fs.readJSON(storageFile); - } catch (error) { - console.error('Failed to parse data from "', storageFile, '". Reason:', error); - return []; - } - } - - private async getLogFilePath(): Promise { - const configDirUri = await this.envServer.getConfigDirUri(); - const logFileUri = new URI(configDirUri).resolve('logs/launcher.log'); - return logFileUri.path.fsPath(); - } - - private async createLauncher(request: Request, response: Response): Promise { - const shouldCreateLauncher = request.body.create; - const launcher = this.LAUNCHER_LINK_SOURCE; - const target = process.env.APPIMAGE; - const logFile = await this.getLogFilePath(); - const command = `printf '%s\n' '#!/bin/bash' 'exec "${target}" \\$1 &> ${logFile} &' >${launcher} && chmod +x ${launcher}`; - if (shouldCreateLauncher) { - const targetExists = target && fs.existsSync(target); - if (!targetExists) { - throw new Error('Could not find application to launch'); - } - sudo.exec(command, { name: 'Theia Blueprint' }); - } - - const storageFile = await this.getStorageFilePath(); - const data = fs.existsSync(storageFile) ? await this.readLauncherPathsFromStorage(storageFile) : []; - fs.outputJSONSync(storageFile, [...data, { source: launcher, target: shouldCreateLauncher ? target : undefined }]); - - response.sendStatus(200); - } -} diff --git a/build/theia/theia-extensions/launcher/tsconfig.json b/build/theia/theia-extensions/launcher/tsconfig.json deleted file mode 100644 index 8a8bd31..0000000 --- a/build/theia/theia-extensions/launcher/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../configs/base.tsconfig", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib", - "baseUrl": ".", - "esModuleInterop": true - }, - "include": ["src"] -} diff --git a/build/theia/theia-extensions/product/.eslintrc.js b/build/theia/theia-extensions/product/.eslintrc.js deleted file mode 100644 index 1308994..0000000 --- a/build/theia/theia-extensions/product/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: [ - '../../configs/build.eslintrc.json' - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - } -}; diff --git a/build/theia/theia-extensions/product/icons/512-512.png b/build/theia/theia-extensions/product/icons/512-512.png deleted file mode 100644 index d59605a..0000000 Binary files a/build/theia/theia-extensions/product/icons/512-512.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/package.json b/build/theia/theia-extensions/product/package.json deleted file mode 100644 index a0d23a6..0000000 --- a/build/theia/theia-extensions/product/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "private": true, - "name": "blueprint-product-ext", - "version": "1.40.0", - "description": "Eclipse Theia Blueprint Product Branding", - "dependencies": { - "@theia/core": "1.41.0", - "@theia/getting-started": "1.41.0", - "@theia/vsx-registry": "1.41.0", - "@theia/workspace": "1.41.0", - "inversify": "^6.0.1" - }, - "devDependencies": { - "rimraf": "^2.7.1", - "tslint": "^5.12.0", - "typescript": "^4.5.5" - }, - "theiaExtensions": [ - { - "frontend": "lib/browser/theia-blueprint-frontend-module", - "electronMain": "lib/electron-main/theia-blueprint-main-module", - "backend": "lib/node/theia-blueprint-backend-module" - } - ], - "keywords": [ - "theia-extension" - ], - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "repository": { - "type": "git", - "url": "https://github.com/eclipse-theia/theia-blueprint.git" - }, - "bugs": { - "url": "https://github.com/eclipse-theia/theia-blueprint/issues" - }, - "homepage": "https://github.com/eclipse-theia/theia-blueprint", - "files": [ - "lib", - "src" - ], - "scripts": { - "clean": "rimraf lib *.tsbuildinfo", - "build": "tsc -b", - "lint": "eslint --ext js,jsx,ts,tsx src", - "lint:fix": "eslint --ext js,jsx,ts,tsx src --fix", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts" - }, - "peerDependencies": { - "react": "^16.8.0" - } -} diff --git a/build/theia/theia-extensions/product/src/browser/branding-util.tsx b/build/theia/theia-extensions/product/src/browser/branding-util.tsx deleted file mode 100644 index 2b91a0d..0000000 --- a/build/theia/theia-extensions/product/src/browser/branding-util.tsx +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { Key, KeyCode } from '@theia/core/lib/browser'; -import { WindowService } from '@theia/core/lib/browser/window/window-service'; -import * as React from 'react'; - -export interface ExternalBrowserLinkProps { - text: string; - url: string; - windowService: WindowService; -} - -function ExternalBrowserLink(props: ExternalBrowserLinkProps): JSX.Element { - return openExternalLink(props.url, props.windowService)} - onKeyDown={(e: React.KeyboardEvent) => { - if (Key.ENTER.keyCode === KeyCode.createKeyCode(e.nativeEvent).key?.keyCode) { - openExternalLink(props.url, props.windowService); - } - }}> - {props.text} - ; -} - -function openExternalLink(url: string, windowService: WindowService): void { - windowService.openNewWindow(url, { external: true }); -} - -export function renderAboutYourTraining(windowService: WindowService): React.ReactNode { - return
-

- About your Training -

-
- Your teacher will provide you with all the necessary information on how to use your training environment. - - Visit to see what other trainings we provide. -
-
; -} - diff --git a/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-blue.png b/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-blue.png deleted file mode 100644 index 666fda0..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-blue.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-white.png b/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-white.png deleted file mode 100644 index 9eff982..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/TheiaBlueprintLogo-white.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSize.png b/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSize.png deleted file mode 100644 index da6da02..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSize.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSizeWhite.png b/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSizeWhite.png deleted file mode 100644 index 01f019b..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/TheiaLogoLargeSizeWhite.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.png deleted file mode 100644 index c6b3da0..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.svg deleted file mode 100644 index f6dd665..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-black.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.png deleted file mode 100644 index c94aef5..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.svg deleted file mode 100644 index c19dace..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.png deleted file mode 100644 index 305e0b8..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.svg deleted file mode 100644 index cd9a8f3..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-green.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.png deleted file mode 100644 index 98e516f..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.svg deleted file mode 100644 index 503e2f9..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-red.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.png deleted file mode 100644 index af81bbb..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.svg deleted file mode 100644 index 0885446..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-white.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.png b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.png deleted file mode 100644 index 61c063c..0000000 Binary files a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.png and /dev/null differ diff --git a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.svg b/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.svg deleted file mode 100644 index 03b7515..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/acend/AC-logo-rgb-yellow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/icons/theia-logo-blueprint.svg b/build/theia/theia-extensions/product/src/browser/icons/theia-logo-blueprint.svg deleted file mode 100644 index 503e2f9..0000000 --- a/build/theia/theia-extensions/product/src/browser/icons/theia-logo-blueprint.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/style/index.css b/build/theia/theia-extensions/product/src/browser/style/index.css deleted file mode 100644 index e0d7056..0000000 --- a/build/theia/theia-extensions/product/src/browser/style/index.css +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -:root { - --theia-branding-logo: url(../icons/acend/AC-logo-rgb-black.png); -} - -.gs-blue-header { - color: #5088e7; - text-transform: capitalize; - font-weight: 600; -} - -.gs-text-bold { - font-weight: 600; -} - -.gs-text-underline { - text-decoration: underline; -} - -.gs-float { - float: right; -} - -.gs-logo { - background-image: var(--theia-branding-logo); - background-position: center center; - background-repeat: no-repeat; - background-size: contain; - width: 250px; - height: 62; - padding: 20px; -} - -.gs-preference { - margin-top: 20px; - align-items: center; - display: flex; -} - -.ad-logo { - background-image: var(--theia-branding-logo); - background-position: center center; - background-repeat: no-repeat; - background-size: contain; - width: 250px; - height: 62; - padding: 20px; -} - -.ad-float { - float: right; -} - -.ad-container { - padding: 20px; - width: 1150px; - height: 700; -} - -ul.theia-aboutExtensions { - height: 450px; - overflow: hidden; - overflow-y: scroll; - list-style-type: none; - padding: 0; - margin-left: 10px; - } \ No newline at end of file diff --git a/build/theia/theia-extensions/product/src/browser/theia-blueprint-about-dialog.tsx b/build/theia/theia-extensions/product/src/browser/theia-blueprint-about-dialog.tsx deleted file mode 100644 index ebb1522..0000000 --- a/build/theia/theia-extensions/product/src/browser/theia-blueprint-about-dialog.tsx +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import * as React from 'react'; -import { AboutDialog, AboutDialogProps, ABOUT_CONTENT_CLASS } from '@theia/core/lib/browser/about-dialog'; -import { injectable, inject } from '@theia/core/shared/inversify'; -import { VSXEnvironment } from '@theia/vsx-registry/lib/common/vsx-environment'; -import { WindowService } from '@theia/core/lib/browser/window/window-service'; - -@injectable() -export class TheiaBlueprintAboutDialog extends AboutDialog { - - @inject(VSXEnvironment) - protected readonly environment: VSXEnvironment; - - @inject(WindowService) - protected readonly windowService: WindowService; - - protected vscodeApiVersion: string; - - constructor( - @inject(AboutDialogProps) protected readonly props: AboutDialogProps - ) { - super(props); - } - - protected async doInit(): Promise { - this.vscodeApiVersion = await this.environment.getVscodeApiVersion(); - super.doInit(); - } - - protected render(): React.ReactNode { - return
- {this.renderContent()} -
; - } - - protected renderContent(): React.ReactNode { - return
-
-
-
-
- {this.renderTitle()} -
- -
; - - } - - protected renderTitle(): React.ReactNode { - return
-

Awesome acend Webshell

- {this.renderVersion()} -
; - } - - protected renderVersion(): React.ReactNode { - return
-

- {this.applicationInfo ? 'Version ' + this.applicationInfo.version + ' (Beta)' : '(Beta)'} -

- -

- {'VS Code API Version: ' + this.vscodeApiVersion} -

-
; - } -} diff --git a/build/theia/theia-extensions/product/src/browser/theia-blueprint-frontend-module.ts b/build/theia/theia-extensions/product/src/browser/theia-blueprint-frontend-module.ts deleted file mode 100644 index 62c79f7..0000000 --- a/build/theia/theia-extensions/product/src/browser/theia-blueprint-frontend-module.ts +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import '../../src/browser/style/index.css'; - -import { FrontendApplicationContribution, WidgetFactory, bindViewContribution, PreferenceContribution } from '@theia/core/lib/browser'; -import { AboutDialog } from '@theia/core/lib/browser/about-dialog'; -import { ContainerModule } from '@theia/core/shared/inversify'; -import { GettingStartedWidget } from '@theia/getting-started/lib/browser/getting-started-widget'; -import { TheiaBlueprintAboutDialog } from './theia-blueprint-about-dialog'; -import { TheiaBlueprintGettingStartedContribution } from './theia-blueprint-getting-started-contribution'; -import { TheiaBlueprintGettingStartedWidget } from './theia-blueprint-getting-started-widget'; -import { theiaBlueprintPreferenceSchema } from './theia-blueprint-preferences'; - -export default new ContainerModule((bind, _unbind, isBound, rebind) => { - bindViewContribution(bind, TheiaBlueprintGettingStartedContribution); - bind(FrontendApplicationContribution).toService(TheiaBlueprintGettingStartedContribution); - bind(TheiaBlueprintGettingStartedWidget).toSelf(); - bind(WidgetFactory).toDynamicValue(context => ({ - id: GettingStartedWidget.ID, - createWidget: () => context.container.get(TheiaBlueprintGettingStartedWidget), - })).inSingletonScope(); - if (isBound(AboutDialog)) { - rebind(AboutDialog).to(TheiaBlueprintAboutDialog).inSingletonScope(); - } else { - bind(AboutDialog).to(TheiaBlueprintAboutDialog).inSingletonScope(); - } - - bind(PreferenceContribution).toConstantValue({ schema: theiaBlueprintPreferenceSchema }); -}); diff --git a/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-contribution.ts b/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-contribution.ts deleted file mode 100644 index 9037378..0000000 --- a/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-contribution.ts +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { AbstractViewContribution, FrontendApplication, FrontendApplicationContribution, PreferenceService } from '@theia/core/lib/browser'; -import { inject, injectable } from '@theia/core/shared/inversify'; -import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; -import { GettingStartedWidget } from '@theia/getting-started/lib/browser/getting-started-widget'; -import { TheiaBlueprintGettingStartedWidget } from './theia-blueprint-getting-started-widget'; -import { BlueprintPreferences } from './theia-blueprint-preferences'; - -@injectable() -export class TheiaBlueprintGettingStartedContribution extends AbstractViewContribution implements FrontendApplicationContribution { - - @inject(FrontendApplicationStateService) - protected readonly stateService: FrontendApplicationStateService; - - @inject(PreferenceService) - protected readonly preferenceService: PreferenceService; - - constructor() { - super({ - widgetId: GettingStartedWidget.ID, - widgetName: GettingStartedWidget.LABEL, - defaultWidgetOptions: { - area: 'main', - } - }); - } - - async onStart(app: FrontendApplication): Promise { - this.stateService.reachedState('ready').then( - () => this.preferenceService.ready.then(() => { - const showWelcomePage: boolean = this.preferenceService.get(BlueprintPreferences.alwaysShowWelcomePage, true); - if (showWelcomePage) { - this.openView({ reveal: true, activate: true }); - } - }) - ); - } -} diff --git a/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-widget.tsx b/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-widget.tsx deleted file mode 100644 index 1e85de1..0000000 --- a/build/theia/theia-extensions/product/src/browser/theia-blueprint-getting-started-widget.tsx +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import * as React from 'react'; -import { inject, injectable } from '@theia/core/shared/inversify'; -import { renderAboutYourTraining } from './branding-util'; -import { GettingStartedWidget } from '@theia/getting-started/lib/browser/getting-started-widget'; -import { VSXEnvironment } from '@theia/vsx-registry/lib/common/vsx-environment'; -import { WindowService } from '@theia/core/lib/browser/window/window-service'; -import { Message, PreferenceService } from '@theia/core/lib/browser'; -import { BlueprintPreferences } from './theia-blueprint-preferences'; - -@injectable() -export class TheiaBlueprintGettingStartedWidget extends GettingStartedWidget { - - @inject(VSXEnvironment) - protected readonly environment: VSXEnvironment; - - @inject(WindowService) - protected readonly windowService: WindowService; - - @inject(PreferenceService) - protected readonly preferenceService: PreferenceService; - - protected vscodeApiVersion: string; - - protected async doInit(): Promise { - super.doInit(); - this.vscodeApiVersion = await this.environment.getVscodeApiVersion(); - await this.preferenceService.ready; - this.update(); - } - - protected onActivateRequest(msg: Message): void { - super.onActivateRequest(msg); - const htmlElement = document.getElementById('alwaysShowWelcomePage'); - if (htmlElement) { - htmlElement.focus(); - } - } - - protected render(): React.ReactNode { - return
-
-
-
- {this.renderActions()} -
- {this.renderHeader()} -
-
-
- {renderAboutYourTraining(this.windowService)} -
-
-
-
- {this.renderPreferences()} -
-
-
; - } - - protected renderActions(): React.ReactNode { - return
-
-
- {this.renderOpen()} -
-
-
-
- {this.renderRecentWorkspaces()} -
-
-
-
- {this.renderSettings()} -
-
- -
; - } - - protected renderHeader(): React.ReactNode { - return
-

Welcome to your acend Training

-
; - } - - - - protected renderPreferences(): React.ReactNode { - return ; - } -} - -export interface PreferencesProps { - preferenceService: PreferenceService; -} - -function GSPreferences(props: PreferencesProps): JSX.Element { - const [alwaysShowWelcomePage, setAlwaysShowWelcomePage] = React.useState(props.preferenceService.get(BlueprintPreferences.alwaysShowWelcomePage, true)); - React.useEffect(() => { - const preflistener = props.preferenceService.onPreferenceChanged(change => { - if (change.preferenceName === BlueprintPreferences.alwaysShowWelcomePage) { - const prefValue: boolean = change.newValue; - console.info('Set blueprint.alwaysShowWelcomePage checkbox state to ' + prefValue); - setAlwaysShowWelcomePage(prefValue); - } - }); - return () => preflistener.dispose(); - }, [props.preferenceService]); - const handleChange = (e: React.ChangeEvent) => { - const newChecked = e.target.checked; - console.info('Set blueprint.alwaysShowWelcomePage pref to ' + newChecked); - props.preferenceService.updateValue(BlueprintPreferences.alwaysShowWelcomePage, newChecked); - }; - return
- - -
; -} diff --git a/build/theia/theia-extensions/product/src/browser/theia-blueprint-preferences.ts b/build/theia/theia-extensions/product/src/browser/theia-blueprint-preferences.ts deleted file mode 100644 index 454b2f9..0000000 --- a/build/theia/theia-extensions/product/src/browser/theia-blueprint-preferences.ts +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { PreferenceSchema } from '@theia/core/lib/common/preferences/preference-schema'; -export namespace BlueprintPreferences { - export const alwaysShowWelcomePage = 'blueprint.alwaysShowWelcomePage'; -} - -export const theiaBlueprintPreferenceSchema: PreferenceSchema = { - 'type': 'object', - 'properties': { - 'blueprint.alwaysShowWelcomePage': { - type: 'boolean', - description: 'Show Welcome Page after every start of the application.', - default: true - } - } -}; diff --git a/build/theia/theia-extensions/product/src/electron-main/icon-contribution.ts b/build/theia/theia-extensions/product/src/electron-main/icon-contribution.ts deleted file mode 100644 index a22156d..0000000 --- a/build/theia/theia-extensions/product/src/electron-main/icon-contribution.ts +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { ElectronMainApplication, ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; -import { injectable } from '@theia/core/shared/inversify'; -import * as path from 'path'; -import * as os from 'os'; - -@injectable() -export class IconContribution implements ElectronMainApplicationContribution { - - onStart(application: ElectronMainApplication): void { - if (os.platform() === 'linux') { - const windowOptions = application.config.electron.windowOptions; - if (windowOptions && windowOptions.icon === undefined) { - // The window image is undefined. If the executable has an image set, this is used as a fallback. - // Since AppImage does not support this anymore via electron-builder, set an image for the linux platform. - windowOptions.icon = path.join(__dirname, '../../icons/512-512.png'); - } - } - } -} diff --git a/build/theia/theia-extensions/product/src/electron-main/theia-blueprint-main-module.ts b/build/theia/theia-extensions/product/src/electron-main/theia-blueprint-main-module.ts deleted file mode 100644 index 7269ab4..0000000 --- a/build/theia/theia-extensions/product/src/electron-main/theia-blueprint-main-module.ts +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { ContainerModule } from '@theia/core/shared/inversify'; -import { ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; -import { IconContribution } from './icon-contribution'; - -export default new ContainerModule(bind => { - bind(IconContribution).toSelf().inSingletonScope(); - bind(ElectronMainApplicationContribution).toService(IconContribution); -}); diff --git a/build/theia/theia-extensions/product/src/node/theia-blueprint-backend-module.ts b/build/theia/theia-extensions/product/src/node/theia-blueprint-backend-module.ts deleted file mode 100644 index 29b8c91..0000000 --- a/build/theia/theia-extensions/product/src/node/theia-blueprint-backend-module.ts +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 Ericsson and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { ContainerModule } from '@theia/core/shared/inversify'; -import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; -import { TheiaBlueprintEnvVariableServer } from './theia-blueprint-variables-server'; - -export default new ContainerModule((bind, unbind, isBound, rebind) => { - rebind(EnvVariablesServer).to(TheiaBlueprintEnvVariableServer).inSingletonScope(); -}); diff --git a/build/theia/theia-extensions/product/src/node/theia-blueprint-variables-server.ts b/build/theia/theia-extensions/product/src/node/theia-blueprint-variables-server.ts deleted file mode 100644 index 3b9bde6..0000000 --- a/build/theia/theia-extensions/product/src/node/theia-blueprint-variables-server.ts +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2021 Ericsson and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import * as os from 'os'; -import * as path from 'path'; -import { injectable } from '@theia/core/shared/inversify'; -import { FileUri } from '@theia/core/lib/node/file-uri'; -import { EnvVariablesServerImpl } from '@theia/core/lib/node/env-variables'; - -@injectable() -export class TheiaBlueprintEnvVariableServer extends EnvVariablesServerImpl { - - protected readonly _configDirUri: string = FileUri.create(path.join(os.homedir(), '.theia-blueprint')).toString(true); - - async getConfigDirUri(): Promise { - return this._configDirUri; - } - -} - diff --git a/build/theia/theia-extensions/product/tsconfig.json b/build/theia/theia-extensions/product/tsconfig.json deleted file mode 100644 index 6788223..0000000 --- a/build/theia/theia-extensions/product/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../configs/base.tsconfig", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib", - "baseUrl": ".", - "esModuleInterop": true - }, - "include": [ - "src", - ] -} diff --git a/build/theia/theia-extensions/updater/.eslintrc.js b/build/theia/theia-extensions/updater/.eslintrc.js deleted file mode 100644 index 1308994..0000000 --- a/build/theia/theia-extensions/updater/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: [ - '../../configs/build.eslintrc.json' - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - } -}; diff --git a/build/theia/theia-extensions/updater/package.json b/build/theia/theia-extensions/updater/package.json deleted file mode 100644 index 5cbb155..0000000 --- a/build/theia/theia-extensions/updater/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "private": true, - "name": "blueprint-updater-ext", - "version": "1.40.0", - "description": "Eclipse Theia Blueprint Updater", - "dependencies": { - "@theia/core": "1.41.0", - "@theia/output": "1.41.0", - "@theia/preferences": "1.41.0", - "electron-log": "^4.3.0", - "electron-updater": "5.3.0", - "fs-extra": "^10.0.0", - "vscode-uri": "^2.1.1" - }, - "devDependencies": { - "rimraf": "^2.7.1", - "tslint": "^5.12.0", - "typescript": "^4.5.5" - }, - "theiaExtensions": [ - { - "electronMain": "lib/electron-main/update/theia-updater-main-module", - "frontendElectron": "lib/electron-browser/theia-updater-frontend-module" - } - ], - "keywords": [ - "theia-extension" - ], - "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", - "repository": { - "type": "git", - "url": "https://github.com/eclipse-theia/theia-blueprint.git" - }, - "bugs": { - "url": "https://github.com/eclipse-theia/theia-blueprint/issues" - }, - "homepage": "https://github.com/eclipse-theia/theia-blueprint", - "files": [ - "lib", - "src" - ], - "scripts": { - "clean": "rimraf lib *.tsbuildinfo", - "build": "tsc -b", - "lint": "eslint --ext js,jsx,ts,tsx src", - "lint:fix": "eslint --ext js,jsx,ts,tsx src --fix", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts" - } -} diff --git a/build/theia/theia-extensions/updater/src/common/updater/theia-updater.ts b/build/theia/theia-extensions/updater/src/common/updater/theia-updater.ts deleted file mode 100644 index 6cfb795..0000000 --- a/build/theia/theia-extensions/updater/src/common/updater/theia-updater.ts +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory'; - -export const TheiaUpdaterPath = '/services/theia-updater'; -export const TheiaUpdater = Symbol('TheiaUpdater'); -export interface TheiaUpdater extends JsonRpcServer { - checkForUpdates(): void; - downloadUpdate(): void; - onRestartToUpdateRequested(): void; - disconnectClient(client: TheiaUpdaterClient): void; -} - -export const TheiaUpdaterClient = Symbol('TheiaUpdaterClient'); - -export interface UpdaterError { - message: string; - errorLogPath?: string; -} - -export interface TheiaUpdaterClient { - updateAvailable(available: boolean, startupCheck: boolean): void; - notifyReadyToInstall(): void; - reportError(error: UpdaterError): void; -} diff --git a/build/theia/theia-extensions/updater/src/electron-browser/theia-updater-frontend-module.ts b/build/theia/theia-extensions/updater/src/electron-browser/theia-updater-frontend-module.ts deleted file mode 100644 index 6c0f632..0000000 --- a/build/theia/theia-extensions/updater/src/electron-browser/theia-updater-frontend-module.ts +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; -import { ElectronMenuUpdater, TheiaUpdaterClientImpl, TheiaUpdaterFrontendContribution } from './updater/theia-updater-frontend-contribution'; -import { TheiaUpdater, TheiaUpdaterClient, TheiaUpdaterPath } from '../common/updater/theia-updater'; -import { ContainerModule } from '@theia/core/shared/inversify'; -import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider'; -import { PreferenceContribution } from '@theia/core/lib/browser'; -import { theiaUpdaterPreferenceSchema } from './updater/theia-updater-preferences'; - -export default new ContainerModule((bind, _unbind, isBound, rebind) => { - bind(ElectronMenuUpdater).toSelf().inSingletonScope(); - bind(TheiaUpdaterClientImpl).toSelf().inSingletonScope(); - bind(TheiaUpdaterClient).toService(TheiaUpdaterClientImpl); - bind(TheiaUpdater).toDynamicValue(context => { - const client = context.container.get(TheiaUpdaterClientImpl); - return ElectronIpcConnectionProvider.createProxy(context.container, TheiaUpdaterPath, client); - }).inSingletonScope(); - bind(TheiaUpdaterFrontendContribution).toSelf().inSingletonScope(); - bind(MenuContribution).toService(TheiaUpdaterFrontendContribution); - bind(CommandContribution).toService(TheiaUpdaterFrontendContribution); - - bind(PreferenceContribution).toConstantValue({ schema: theiaUpdaterPreferenceSchema }); -}); diff --git a/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-frontend-contribution.ts b/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-frontend-contribution.ts deleted file mode 100644 index b0d23b3..0000000 --- a/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-frontend-contribution.ts +++ /dev/null @@ -1,249 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { - Command, - CommandContribution, - CommandRegistry, - Emitter, - MenuContribution, - MenuModelRegistry, - MenuPath, - MessageService, - Progress -} from '@theia/core/lib/common'; -import { PreferenceScope, PreferenceService } from '@theia/core/lib/browser/preferences'; -import { TheiaUpdater, TheiaUpdaterClient, UpdaterError } from '../../common/updater/theia-updater'; -import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; -import { CommonMenus, OpenerService } from '@theia/core/lib/browser'; -import { ElectronMainMenuFactory } from '@theia/core/lib/electron-browser/menu/electron-main-menu-factory'; -import URI from '@theia/core/lib/common/uri'; -import { URI as VSCodeURI } from 'vscode-uri'; - -export namespace TheiaUpdaterCommands { - - const category = 'Theia Electron Updater'; - - export const CHECK_FOR_UPDATES: Command = { - id: 'electron-theia:check-for-updates', - label: 'Check for Updates...', - category - }; - - export const RESTART_TO_UPDATE: Command = { - id: 'electron-theia:restart-to-update', - label: 'Restart to Update', - category - }; - -} - -export namespace TheiaUpdaterMenu { - export const MENU_PATH: MenuPath = [...CommonMenus.FILE_SETTINGS_SUBMENU, '3_settings_submenu_update']; -} - -@injectable() -export class TheiaUpdaterClientImpl implements TheiaUpdaterClient { - - @inject(PreferenceService) private readonly preferenceService: PreferenceService; - - protected readonly onReadyToInstallEmitter = new Emitter(); - readonly onReadyToInstall = this.onReadyToInstallEmitter.event; - - protected readonly onUpdateAvailableEmitter = new Emitter(); - readonly onUpdateAvailable = this.onUpdateAvailableEmitter.event; - - protected readonly onErrorEmitter = new Emitter(); - readonly onError = this.onErrorEmitter.event; - - notifyReadyToInstall(): void { - this.onReadyToInstallEmitter.fire(); - } - - updateAvailable(available: boolean, startupCheck: boolean): void { - if (startupCheck) { - // When we are checking for updates after program launch we need to check whether to prompt the user - // we need to wait for the preference service. Also add a few seconds delay before showing the dialog - this.preferenceService.ready - .then(() => { - setTimeout(() => { - const reportOnStart: boolean = this.preferenceService.get('updates.reportOnStart', true); - if (reportOnStart) { - this.onUpdateAvailableEmitter.fire(available); - } - }, 10000); - }); - } else { - this.onUpdateAvailableEmitter.fire(available); - } - - } - - reportError(error: UpdaterError): void { - this.onErrorEmitter.fire(error); - } - -} - -// Dynamic menus aren't yet supported by electron: https://github.com/eclipse-theia/theia/issues/446 -@injectable() -export class ElectronMenuUpdater { - - @inject(ElectronMainMenuFactory) - protected readonly factory: ElectronMainMenuFactory; - - public update(): void { - this.setMenu(); - } - - private setMenu(): void { - window.electronTheiaCore.setMenu(this.factory.createElectronMenuBar()); - } - -} - -@injectable() -export class TheiaUpdaterFrontendContribution implements CommandContribution, MenuContribution { - - @inject(MessageService) - protected readonly messageService: MessageService; - - @inject(ElectronMenuUpdater) - protected readonly menuUpdater: ElectronMenuUpdater; - - @inject(TheiaUpdater) - protected readonly updater: TheiaUpdater; - - @inject(TheiaUpdaterClientImpl) - protected readonly updaterClient: TheiaUpdaterClientImpl; - - @inject(PreferenceService) - private readonly preferenceService: PreferenceService; - - @inject(OpenerService) - protected readonly openerService: OpenerService; - - protected readyToUpdate = false; - - private progress: Progress | undefined; - private intervalId: NodeJS.Timeout | undefined; - - @postConstruct() - protected init(): void { - this.updaterClient.onUpdateAvailable(available => { - if (available) { - this.handleDownloadUpdate(); - } else { - this.handleNoUpdate(); - } - }); - - this.updaterClient.onReadyToInstall(async () => { - this.readyToUpdate = true; - this.menuUpdater.update(); - this.handleUpdatesAvailable(); - }); - - this.updaterClient.onError(error => this.handleError(error)); - } - - registerCommands(registry: CommandRegistry): void { - registry.registerCommand(TheiaUpdaterCommands.CHECK_FOR_UPDATES, { - execute: async () => { - this.updater.checkForUpdates(); - }, - isEnabled: () => !this.readyToUpdate, - isVisible: () => !this.readyToUpdate - }); - registry.registerCommand(TheiaUpdaterCommands.RESTART_TO_UPDATE, { - execute: () => this.updater.onRestartToUpdateRequested(), - isEnabled: () => this.readyToUpdate, - isVisible: () => this.readyToUpdate - }); - } - - registerMenus(registry: MenuModelRegistry): void { - registry.registerMenuAction(TheiaUpdaterMenu.MENU_PATH, { - commandId: TheiaUpdaterCommands.CHECK_FOR_UPDATES.id - }); - registry.registerMenuAction(TheiaUpdaterMenu.MENU_PATH, { - commandId: TheiaUpdaterCommands.RESTART_TO_UPDATE.id - }); - } - - protected async handleDownloadUpdate(): Promise { - const answer = await this.messageService.info('Updates found, do you want to update?', 'No', 'Yes', 'Never'); - if (answer === 'Never') { - this.preferenceService.set('updates.reportOnStart', false, PreferenceScope.User); - return; - } - if (answer === 'Yes') { - this.stopProgress(); - this.progress = await this.messageService.showProgress({ - text: 'Blueprint Update' - }); - let dots = 0; - this.intervalId = setInterval(() => { - if (this.progress !== undefined) { - dots = (dots + 1) % 4; - this.progress.report({ message: 'Downloading' + '.'.repeat(dots) }); - } - }, 1000); - this.updater.downloadUpdate(); - } - } - - protected async handleNoUpdate(): Promise { - this.messageService.info('Already using the latest version'); - } - - protected async handleUpdatesAvailable(): Promise { - if (this.progress !== undefined) { - this.progress.report({ work: { done: 1, total: 1 } }); - this.stopProgress(); - } - const answer = await this.messageService.info('An update has been downloaded and will be automatically installed on exit. Do you want to restart now?', 'No', 'Yes'); - if (answer === 'Yes') { - this.updater.onRestartToUpdateRequested(); - } - } - - protected async handleError(error: UpdaterError): Promise { - this.stopProgress(); - if (error.errorLogPath) { - const viewLogAction = 'View Error Log'; - const answer = await this.messageService.error(error.message, viewLogAction); - if (answer === viewLogAction) { - const uri = new URI(VSCodeURI.file(error.errorLogPath)); - const opener = await this.openerService.getOpener(uri); - opener.open(uri); - } - } else { - this.messageService.error(error.message); - } - } - - private stopProgress(): void { - if (this.intervalId !== undefined) { - clearInterval(this.intervalId); - this.intervalId = undefined; - } - if (this.progress !== undefined) { - this.progress.cancel(); - this.progress = undefined; - } - } -} diff --git a/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-preferences.ts b/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-preferences.ts deleted file mode 100644 index e895b50..0000000 --- a/build/theia/theia-extensions/updater/src/electron-browser/updater/theia-updater-preferences.ts +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { PreferenceSchema } from '@theia/core/lib/common/preferences/preference-schema'; - -export const theiaUpdaterPreferenceSchema: PreferenceSchema = { - 'type': 'object', - 'properties': { - 'updates.reportOnStart': { - type: 'boolean', - description: 'Report available updates after application start.', - default: true - } - } -}; diff --git a/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-impl.ts b/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-impl.ts deleted file mode 100644 index 41b2031..0000000 --- a/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-impl.ts +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import * as fs from 'fs-extra'; -import * as http from 'http'; -import * as os from 'os'; -import * as path from 'path'; -import { ElectronMainApplication, ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; -import { TheiaUpdater, TheiaUpdaterClient } from '../../common/updater/theia-updater'; -import { injectable } from '@theia/core/shared/inversify'; - -const { autoUpdater } = require('electron-updater'); - -autoUpdater.logger = require('electron-log'); -autoUpdater.logger.transports.file.level = 'info'; - -@injectable() -export class TheiaUpdaterImpl implements TheiaUpdater, ElectronMainApplicationContribution { - - protected clients: Array = []; - - private initialCheck: boolean = true; - private reportOnFirstRegistration: boolean = false; - - constructor() { - autoUpdater.autoDownload = false; - autoUpdater.on('update-available', () => { - const startupCheck = this.initialCheck; - if (this.initialCheck) { - this.initialCheck = false; - if (this.clients.length === 0) { - this.reportOnFirstRegistration = true; - } - } - this.clients.forEach(c => c.updateAvailable(true, startupCheck)); - }); - autoUpdater.on('update-not-available', () => { - if (this.initialCheck) { - this.initialCheck = false; - /* do not report that no update is available on start up */ - return; - } - this.clients.forEach(c => c.updateAvailable(false, false)); - }); - - autoUpdater.on('update-downloaded', () => { - this.clients.forEach(c => c.notifyReadyToInstall()); - }); - - autoUpdater.on('error', (err: unknown) => { - const errorLogPath = autoUpdater.logger.transports.file.getFile().path; - this.clients.forEach(c => c.reportError({ message: 'An error has occurred while attempting to update.', errorLogPath })); - }); - } - - checkForUpdates(): void { - autoUpdater.checkForUpdates(); - } - - onRestartToUpdateRequested(): void { - autoUpdater.quitAndInstall(); - } - - downloadUpdate(): void { - autoUpdater.downloadUpdate(); - - // record download stat, ignore errors - fs.mkdtemp(path.join(os.tmpdir(), 'updater-')) - .then(tmpDir => { - const file = fs.createWriteStream(path.join(tmpDir, 'update')); - http.get('https://www.eclipse.org/downloads/download.php?file=/theia/update&r=1', response => { - response.pipe(file); - file.on('finish', () => { - file.close(); - }); - }); - }); - } - - onStart(application: ElectronMainApplication): void { - // Called when the contribution is starting. You can use both async and sync code from here. - this.checkForUpdates(); - } - - onStop(application: ElectronMainApplication): void { - // Invoked when the contribution is stopping. You can clean up things here. You are not allowed call async code from here. - } - - setClient(client: TheiaUpdaterClient | undefined): void { - if (client) { - this.clients.push(client); - if (this.reportOnFirstRegistration) { - this.reportOnFirstRegistration = false; - this.clients.forEach(c => c.updateAvailable(true, true)); - } - } - } - - disconnectClient(client: TheiaUpdaterClient): void { - const index = this.clients.indexOf(client); - if (index !== -1) { - this.clients.splice(index, 1); - } - } - - dispose(): void { - this.clients.forEach(this.disconnectClient.bind(this)); - } - -} diff --git a/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-main-module.ts b/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-main-module.ts deleted file mode 100644 index 2b6486e..0000000 --- a/build/theia/theia-extensions/updater/src/electron-main/update/theia-updater-main-module.ts +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2020 TypeFox, EclipseSource and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GNU General Public License, version 2 - * with the GNU Classpath Exception which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ********************************************************************************/ - -import { TheiaUpdater, TheiaUpdaterClient, TheiaUpdaterPath } from '../../common/updater/theia-updater'; -import { ContainerModule } from '@theia/core/shared/inversify'; -import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler'; -import { ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; -import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory'; -import { TheiaUpdaterImpl } from './theia-updater-impl'; - -export default new ContainerModule(bind => { - bind(TheiaUpdaterImpl).toSelf().inSingletonScope(); - bind(TheiaUpdater).toService(TheiaUpdaterImpl); - bind(ElectronMainApplicationContribution).toService(TheiaUpdater); - bind(ElectronConnectionHandler).toDynamicValue(context => - new JsonRpcConnectionHandler(TheiaUpdaterPath, client => { - const server = context.container.get(TheiaUpdater); - server.setClient(client); - client.onDidCloseConnection(() => server.disconnectClient(client)); - return server; - }) - ).inSingletonScope(); -}); diff --git a/build/theia/theia-extensions/updater/tsconfig.json b/build/theia/theia-extensions/updater/tsconfig.json deleted file mode 100644 index 6788223..0000000 --- a/build/theia/theia-extensions/updater/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../configs/base.tsconfig", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib", - "baseUrl": ".", - "esModuleInterop": true - }, - "include": [ - "src", - ] -} diff --git a/deploy/charts/webshell/templates/clusterrole.yaml b/deploy/charts/webshell/templates/clusterrole.yaml index 014c3a5..fa84eca 100644 --- a/deploy/charts/webshell/templates/clusterrole.yaml +++ b/deploy/charts/webshell/templates/clusterrole.yaml @@ -1,4 +1,3 @@ - {{- if .Values.rbac.create -}} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -16,4 +15,4 @@ rules: verbs: - get - list -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/deploy/charts/webshell/templates/clusterrolebinding_scc.yaml b/deploy/charts/webshell/templates/clusterrolebinding_scc.yaml new file mode 100644 index 0000000..e8bec93 --- /dev/null +++ b/deploy/charts/webshell/templates/clusterrolebinding_scc.yaml @@ -0,0 +1,14 @@ +{{- if .Values.openshift -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: privileged_{{ .Values.namespace | default .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:openshift:scc:privileged +subjects: +- kind: ServiceAccount + name: {{ include "webshell.serviceAccountName" . }} + namespace: {{ .Values.namespace | default .Release.Namespace }} +{{- end -}} diff --git a/deploy/charts/webshell/templates/deployment.yaml b/deploy/charts/webshell/templates/deployment.yaml index 29f7c99..94e97bc 100644 --- a/deploy/charts/webshell/templates/deployment.yaml +++ b/deploy/charts/webshell/templates/deployment.yaml @@ -60,9 +60,9 @@ spec: - name: shared-data mountPath: /home/project {{- if .Values.dind.enabled }} - - image: "{{ .Values.dind.image.repository }}:{{ .Values.dind.image.tag }}" + - name: dind + image: "{{ .Values.dind.image.repository }}:{{ .Values.dind.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - name: dind env: - name: DOCKER_TLS_CERTDIR value: /home/project/.tls @@ -95,7 +95,33 @@ spec: mountPath: /home/project - name: docker-volume mountPath: /var/lib/docker - {{- end }} + {{- end }} + {{- if .Values.openshift }} + - name: oauth-proxy + image: "{{ .Values.openshiftOauthProxy.image.repository }}:{{ .Values.openshiftOauthProxy.image.tag }}" + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8888 + protocol: TCP + name: oauth-proxy + volumeMounts: + - mountPath: /etc/tls/private + name: secret-webshell-proxy-tls + - mountPath: /etc/proxy/secrets + name: secret-webshell-proxy + args: + - -provider=openshift + - -https-address=:8888 + - -http-address= + - -upstream=http://localhost:3000 + - '-openshift-sar={"namespace":"{{ .Release.Namespace }}","resource":"services","name":"{{ include "webshell.fullname" . }}","verb":"list"}' + - -tls-cert=/etc/tls/private/tls.crt + - -tls-key=/etc/tls/private/tls.key + - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token + - -cookie-secret-file=/etc/proxy/secrets/session_secret + - -openshift-service-account={{ include "webshell.serviceAccountName" . }} + - -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -122,4 +148,14 @@ spec: claimName: {{ include "webshell.fullname" . }}-docker {{- else }} emptyDir: {} - {{- end -}} + {{- end }} + {{- if .Values.openshift }} + - name: secret-webshell-proxy-tls + secret: + defaultMode: 420 + secretName: webshell-proxy-tls + - name: secret-webshell-proxy + secret: + defaultMode: 420 + secretName: webshell-proxy + {{- end }} diff --git a/deploy/charts/webshell/templates/resourcequota.yaml b/deploy/charts/webshell/templates/resourcequota.yaml index 0ded9bb..13828c7 100644 --- a/deploy/charts/webshell/templates/resourcequota.yaml +++ b/deploy/charts/webshell/templates/resourcequota.yaml @@ -8,4 +8,4 @@ metadata: {{- include "webshell.labels" . | nindent 4 }} spec: hard: - pods: "30" \ No newline at end of file + pods: "30" diff --git a/deploy/charts/webshell/templates/rolebinding.yaml b/deploy/charts/webshell/templates/rolebinding.yaml index 0b4dc3b..36fff7e 100644 --- a/deploy/charts/webshell/templates/rolebinding.yaml +++ b/deploy/charts/webshell/templates/rolebinding.yaml @@ -15,4 +15,4 @@ subjects: - kind: ServiceAccount name: {{ include "webshell.serviceAccountName" . }} namespace: {{ .Release.Namespace }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/deploy/charts/webshell/templates/rolebinding_openshift-oauth-sar.yaml b/deploy/charts/webshell/templates/rolebinding_openshift-oauth-sar.yaml new file mode 100644 index 0000000..4084dd4 --- /dev/null +++ b/deploy/charts/webshell/templates/rolebinding_openshift-oauth-sar.yaml @@ -0,0 +1,14 @@ +{{- if .Values.openshift -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: openshift-oauth-sar + namespace: {{ .Values.namespace | default .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: view +subjects: +- kind: User + name: {{ .Values.user }} +{{- end -}} diff --git a/deploy/charts/webshell/templates/secret-basicauth.yaml b/deploy/charts/webshell/templates/secret-basicauth.yaml index 38961fc..9525335 100644 --- a/deploy/charts/webshell/templates/secret-basicauth.yaml +++ b/deploy/charts/webshell/templates/secret-basicauth.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.openshiftOauthProxy.enabled -}} --- apiVersion: v1 kind: Secret @@ -12,4 +13,5 @@ data: {{ .Values.user }}: {{ .Values.password | b64enc | quote }} {{ else }} auth: {{ (htpasswd .Values.user .Values.password) | b64enc | quote }} -{{ end }} \ No newline at end of file +{{ end }} +{{ end }} diff --git a/deploy/charts/webshell/templates/secret-webshell-proxy.yaml b/deploy/charts/webshell/templates/secret-webshell-proxy.yaml new file mode 100644 index 0000000..b42a406 --- /dev/null +++ b/deploy/charts/webshell/templates/secret-webshell-proxy.yaml @@ -0,0 +1,16 @@ +{{- if .Values.openshiftOauthProxy.enabled -}} + {{- $secret := (lookup "v1" "Secret" .Release.Namespace "webshell-proxy") -}} +apiVersion: v1 +kind: Secret +metadata: + name: webshell-proxy + namespace: {{ .Values.namespace | default .Release.Namespace }} +type: Opaque + {{- if $secret }} +data: + session_secret: {{ $secret.data.session_secret }} + {{- else }} +stringData: + session_secret: {{ randAlphaNum 48 | quote }} + {{- end }} +{{- end }} diff --git a/deploy/charts/webshell/templates/service.yaml b/deploy/charts/webshell/templates/service.yaml index 53260cc..9491a55 100644 --- a/deploy/charts/webshell/templates/service.yaml +++ b/deploy/charts/webshell/templates/service.yaml @@ -3,13 +3,21 @@ kind: Service metadata: name: {{ include "webshell.fullname" . }} namespace: {{ .Values.namespace | default .Release.Namespace }} + annotations: + {{- if .Values.openshiftOauthProxy.enabled }} + service.beta.openshift.io/serving-cert-secret-name: webshell-proxy-tls + {{- end }} labels: {{- include "webshell.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} + {{- if .Values.openshiftOauthProxy.enabled }} + targetPort: 8888 + {{- else }} targetPort: 3000 + {{- end }} protocol: TCP name: web selector: diff --git a/deploy/charts/webshell/templates/serviceaccount.yaml b/deploy/charts/webshell/templates/serviceaccount.yaml index 5aba00a..921e92a 100644 --- a/deploy/charts/webshell/templates/serviceaccount.yaml +++ b/deploy/charts/webshell/templates/serviceaccount.yaml @@ -1,4 +1,5 @@ -{{- if .Values.serviceAccount.create -}} +{{- if or .Values.serviceAccount.create .Values.openshiftOauthProxy.enabled -}} +{{- $routeName := include "webshell.fullname" . -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -6,8 +7,18 @@ metadata: namespace: {{ .Values.namespace | default .Release.Namespace }} labels: {{- include "webshell.labels" . | nindent 4 }} + {{- if .Values.openshiftOauthProxy.enabled }} + annotations: + {{- range .Values.ingress.hosts }} + serviceaccounts.openshift.io/oauth-redirecturi.first: "https://{{ .host }}" + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} + {{- end }} {{- end }} diff --git a/deploy/charts/webshell/values-openshift.yaml b/deploy/charts/webshell/values-openshift.yaml new file mode 100644 index 0000000..83c645c --- /dev/null +++ b/deploy/charts/webshell/values-openshift.yaml @@ -0,0 +1,119 @@ +# Default values for webshell. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +user: "user1" +password: "changeme" + +# Set to true when deploying on OpenShift +openshift: true + +image: + pullPolicy: IfNotPresent + +theia: + webview_url: "{{uuid}}.webview.{{hostname}}" + image: + repository: quay.io/acend/theia + # Overrides the image tag whose default is the chart appVersion. + tag: "" + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + securityContext: + # Uncomment for OpenShift + privileged: true + runAsUser: 1001 + persistence: + enabled: true + pvcsize: 1Gi + # Define StorageClass + storageclass: gp3-csi + +init: + image: + repository: quay.io/prometheus/busybox + tag: latest + command: + - sh + - -c + - echo Welcome to the acend theia ide > /home/project/welcome + +dind: + enabled: true + image: + repository: docker + tag: 24.0.6-dind + resources: {} + persistence: + enabled: false + pvcsize: 50Gi + storageclass: gp3-csi + +openshiftOauthProxy: + # Set to true when deploying on OpenShift + enabled: true + image: + repository: registry.redhat.io/openshift4/ose-oauth-proxy + tag: v4.13 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +# Set empty when deploying on OpenShift +podSecurityContext: {} + +rbac: + create: true + +reset: + enabled: false + schedule: 0 */1 * * * + +service: + type: ClusterIP + port: 3000 + +updateStrategy: + type: RollingUpdate + +ingress: + enabled: true + className: "" + annotations: + route.openshift.io/termination: reencrypt + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: user1-webshell.apps.training.openshift.ch + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: webshell-tls + # hosts: + # - webshell-test.ocp-staging.cloudscale.puzzle.ch + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/charts/webshell/values.yaml b/deploy/charts/webshell/values.yaml index a5f00af..bd79f7e 100644 --- a/deploy/charts/webshell/values.yaml +++ b/deploy/charts/webshell/values.yaml @@ -7,6 +7,9 @@ replicaCount: 1 user: "user1" password: "changeme" +# Set to true when deploying on OpenShift +openshift: false + image: pullPolicy: IfNotPresent @@ -16,7 +19,7 @@ theia: repository: quay.io/acend/theia # Overrides the image tag whose default is the chart appVersion. tag: "" - resources: + resources: limits: cpu: 500m memory: 1Gi @@ -24,16 +27,20 @@ theia: cpu: 50m memory: 50Mi securityContext: {} + # Uncomment for OpenShift + #privileged: true + #runAsUser: 1001 persistence: - enabled: false + enabled: true pvcsize: 1Gi + # Define StorageClass storageclass: cloudscale-volume-ssd init: image: repository: quay.io/prometheus/busybox tag: latest - command: + command: - sh - -c - echo Welcome to the acend theia ide > /home/project/welcome @@ -49,6 +56,13 @@ dind: pvcsize: 50Gi storageclass: cloudscale-volume-ssd +openshiftOauthProxy: + # Set to true when deploying on OpenShift + enabled: false + image: + repository: registry.redhat.io/openshift4/ose-oauth-proxy + tag: v4.13 + imagePullSecrets: [] nameOverride: "" fullnameOverride: "" @@ -64,6 +78,8 @@ serviceAccount: podAnnotations: {} +# Set empty podSecurityContext when deploying on OpenShift +#podSecurityContext: {} podSecurityContext: fsGroup: 1001 @@ -85,6 +101,7 @@ ingress: enabled: false className: "" annotations: {} + # route.openshift.io/termination: reencrypt # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: @@ -93,9 +110,9 @@ ingress: - path: / pathType: ImplementationSpecific tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local + # - secretName: chart-example-tls + # hosts: + # - chart-example.local nodeSelector: {}