diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 90f6bc1b0..7bbc500fa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,27 +4,27 @@ # the repo. Unless a later match takes precedence, these will be requested for # review when someone opens a pull request. -* @Superalgos/foundations-project +* @Superalgos/foundations-project # Project Teams -/Projects/Algorithmic-Trading @Superalgos/algorithmic-trading-project -/Projects/Community-Plugins @Superalgos/community-plugins-project -/Projects/Data-Mining @Superalgos/data-mining-project -/Projects/Ethereum @Superalgos/ethereum-project -/Projects/Foundations @Superalgos/foundations-project -/Projects/Governance @Superalgos/governance-project -/Projects/Machine-Learning @Superalgos/machine-learning-project -/Projects/Network @Superalgos/network-project -/Projects/Social-Bots @Superalgos/social-bots-project -/Projects/Social-Trading @Superalgos/social-trading-project -/Projects/TensorFlow @Superalgos/tensorflow-project -/Projects/Visual-Scripting @Superalgos/visual-scripting-project +/Projects/Algorithmic-Trading/ @Superalgos/algorithmic-trading-project +/Projects/Community-Plugins/ @Superalgos/community-plugins-project +/Projects/Data-Mining/ @Superalgos/data-mining-project +/Projects/Ethereum/ @Superalgos/ethereum-project +/Projects/Foundations/ @Superalgos/foundations-project +/Projects/Governance/ @Superalgos/governance-project +/Projects/Machine-Learning/ @Superalgos/machine-learning-project +/Projects/Network/ @Superalgos/network-project +/Projects/Social-Bots/ @Superalgos/social-bots-project +/Projects/Social-Trading/ @Superalgos/social-trading-project +/Projects/TensorFlow/ @Superalgos/tensorflow-project +/Projects/Visual-Scripting/ @Superalgos/visual-scripting-project -/Projects/Education @Superalgos/education-project -Docs*/ @Superalgos/education-project +/Projects/Education/ @Superalgos/education-project +Docs*/ @Superalgos/education-project -/.github @Superalgos/sysadmins-team -/Docker @Superalgos/sysadmins-team -.git* @Superalgos/sysadmins-team -.docker* @Superalgos/sysadmins-team -package*.json @Superalgos/sysadmins-team +/.github/ @Superalgos/sysadmins-team +/Docker/ @Superalgos/sysadmins-team +.git* @Superalgos/sysadmins-team +.docker* @Superalgos/sysadmins-team +package*.json @Superalgos/sysadmins-team diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 652791349..f1553be19 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,9 +2,14 @@ name: Publish Docker image on: push: - branches: [master, develop] - release: - types: [published, created, edited] + branches: + - master + - develop + release: + types: + - published + - created + - edited jobs: publish: diff --git a/Desktop/UI/Globals.js b/Desktop/UI/Globals.js index 2bce6ff39..4599bca36 100644 --- a/Desktop/UI/Globals.js +++ b/Desktop/UI/Globals.js @@ -1,4 +1,4 @@ - +/* Root object*/ /* Root objects*/ let UI = { projects: {}, @@ -13,3 +13,4 @@ We will use this to load functions originally intended for Nodejs */ let exports = {} + diff --git a/Docker/README.md b/Docker/README.md index 151d21f8e..80d729df7 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -16,9 +16,9 @@ ## Introduction -This walkthrough is broken up into to parts: a quick-start guide to running [Superalgos](https://github.com/Superalgos/Superalgos) with Docker and a deeper, more theoretical dive into containers with the hopes of explaining some of the design decisions. +This walk through is broken up into to parts: a quick-start guide to running [Superalgos](https://github.com/Superalgos/Superalgos) with Docker and a deeper, more theoretical dive into containers with the hopes of explaining some of the design decisions. -[Superalgos](https://github.com/Superalgos/Superalgos), at its core, is a web application which also means it can be deployed inside a container like many other web applications. One of the leading platforms for operating containers is Docker. Docker can run on many different operatng systems and compute platforms. The containers provide an easy, fast, repeatable, and secure way to deploy and distribute applications. While it doesn't take much experience to run containers or Docker, there are some basics that any user should learn in order to use the technology effectively. +[Superalgos](https://github.com/Superalgos/Superalgos), at its core, is a web application which also means it can be deployed inside a container like many other web applications. One of the leading platforms for operating containers is Docker. Docker can run on many different operating systems and compute platforms. The containers provide an easy, fast, repeatable, and secure way to deploy and distribute applications. While it doesn't take much experience to run containers or Docker, there are some basics that any user should learn in order to use the technology effectively. Before getting started, be aware that Docker is not the originally intended method of running the [Superalgos](https://github.com/Superalgos/Superalgos) application and as such there are some drawbacks to doing so. Namely, you won't be able contribute back to the project or configure your Governance profile. We'll discuss this more later. Therefore, you should only consider using the Docker container for production deployments. @@ -55,7 +55,7 @@ Docker should automatically start after installation. If you don't see the whale ### Linux and BSD -On Linux and BSD systems, Docker can be installed using the prefered package manager. [Step by step instructions for many different distributions](https://docs.docker.com/engine/install/debian/) of Linux can be found in the official Docker Docs. Since [Superalgos](https://github.com/Superalgos/Superalgos) runs well on Raspberry Pi 4 single-board computers, I'm going to illustrate the commands necessary to run [Superalgos](https://github.com/Superalgos/Superalgos) on the Raspbian Linux distribution. +On Linux and BSD systems, Docker can be installed using the preferred package manager. [Step by step instructions for many different distributions](https://docs.docker.com/engine/install/debian/) of Linux can be found in the official Docker Docs. Since [Superalgos](https://github.com/Superalgos/Superalgos) runs well on Raspberry Pi 4 single-board computers, I'm going to illustrate the commands necessary to run [Superalgos](https://github.com/Superalgos/Superalgos) on the Raspbian Linux distribution. ```shell # install the requirements @@ -70,7 +70,7 @@ sudo apt-get install \ # add the gpg keys to verify the packages curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg -# confgure the official repository +# configure the official repository echo \ "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null @@ -84,7 +84,7 @@ Docker should automatically start when it is done installing. You can check its ## Running Superalgos -Now that we have Docker installed and running, we can run the container. The option `--rm` will remove the isntance of the container when it is exited. +Now that we have Docker installed and running, we can run the container. The option `--rm` will remove the instance of the container when it is exited. ```shell docker run --rm ghcr.io/superalgos/superalgos:latest @@ -147,7 +147,7 @@ Continue reading the [Docker Command Line documentation](https://docs.docker.com ### Using Docker-Compose -Docker-compose is a wrapper for the Docker API which makes it a little easier to maintain a declaritive configuration for an application instead of using the direct command line commands. There is a sample docker-compose configuration included in the [Superalgos](https://github.com/Superalgos/Superalgos) which you can as the basis for your own configuration. +Docker-compose is a wrapper for the Docker API which makes it a little easier to maintain a declarative configuration for an application instead of using the direct command line commands. There is a sample docker-compose configuration included in the [Superalgos](https://github.com/Superalgos/Superalgos) which you can as the basis for your own configuration. Let's download the sample and edit it. If you don't use `vim`, change that command for your preferred editor. @@ -236,10 +236,10 @@ Docker has many advantages which can aid in every step from development through Docker maintains a list of [Dockerfile best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) in their main documentation. These tips dictate many of the decisions around the Superalgos Dockerfile. Some of the tips that are used by [Superalgos](https://github.com/Superalgos/Superalgos) are listed below. - Use `.dockerignore` to prevent unwanted data from entering the container. This keeps the container small but also enhances security to prevent secrets from leaking into a container by accident. -- Don't install unneccesary packages. In lieu of multi-stage builds, build caches and build dependencies are removed before finalizing the container. Only packages that are necessary for the execution of the application are installed. This is why `git` is not present. +- Don't install unnecessary packages. In lieu of multi-stage builds, build caches and build dependencies are removed before finalizing the container. Only packages that are necessary for the execution of the application are installed. This is why `git` is not present. - Minimize the number of layers. Many `RUN` commands are combined into one using `&&` in order to reduce the number of layers. - Sort multiline arguments. This mostly enhances readability and maintainability. -- Leverage build cache. When testing locally, several of the tips above help levarage the build cache and speed up build times. +- Leverage build cache. When testing locally, several of the tips above help leverage the build cache and speed up build times. ### Twelve Factor App diff --git a/Platform/Client/taskManagerServer.js b/Platform/Client/taskManagerServer.js index c645e497b..c96063c6e 100644 --- a/Platform/Client/taskManagerServer.js +++ b/Platform/Client/taskManagerServer.js @@ -65,7 +65,7 @@ let path = global.env.BASE_PATH + '/TaskServerRoot.js' - /* Workarround to avoid having the same debug port at the forked process which makes it crash. */ + /* Workaround to avoid having the same debug port at the forked process which makes it crash. */ for (let i = 0; i < process.execArgv.length; i++) { let argument = process.execArgv[i] if (argument.indexOf('--inspect') > -1) { @@ -94,7 +94,7 @@ console.log(`[ERROR] Client -> Task Manager Server -> runTask -> Task Server exited with error ${err}`) tasksMap.delete(task.id) }) - /* If the Tast Server stops, we remove it from our task map */ + /* If the Task Server stops, we remove it from our task map */ task.childProcess.on('close', (code, signal) => { //console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Terminated. -> Task Name = ' + task.name) //console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Terminated. -> Task Id = ' + task.id) @@ -190,7 +190,7 @@ function finalize() { - /* Before disconnecting we will forze all eventListeners to stop listening. */ + /* Before disconnecting we will force all eventListeners to stop listening. */ const eventListenersArray = [...eventListeners.values()] for (let i = 0; i < eventListenersArray.length; i++) { let handler = eventListenersArray[i] diff --git a/Platform/Client/webSocketsInterface.js b/Platform/Client/webSocketsInterface.js index 6159d840b..9b51c398c 100644 --- a/Platform/Client/webSocketsInterface.js +++ b/Platform/Client/webSocketsInterface.js @@ -41,7 +41,7 @@ try { if (global.env.DEMO_MODE === true) { /* - In DEMO MODE we will accept Task / Sessioins Running or Stopping if you are requesting this from localhost only. + In DEMO MODE we will accept Task / Sessions Running or Stopping if you are requesting this from localhost only. */ if (socket._socket.remoteAddress !== "::1") { if ( diff --git a/Platform/PlatformApp.js b/Platform/PlatformApp.js index dffa50d13..d156752dd 100644 --- a/Platform/PlatformApp.js +++ b/Platform/PlatformApp.js @@ -20,7 +20,7 @@ exports.newPlatformApp = function newPlatformApp() { }) process.on('unhandledRejection', (reason, p) => { - // Signal user that a necissary node module is missing + // Signal user that a necessary node module is missing if (reason.code == 'MODULE_NOT_FOUND') { console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.") console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason)) diff --git a/Platform/UI/ProductStorage.js b/Platform/UI/ProductStorage.js index ad44db9bf..fad952099 100644 --- a/Platform/UI/ProductStorage.js +++ b/Platform/UI/ProductStorage.js @@ -8,7 +8,7 @@ function newProductStorage(name) { /* This object will initialize children objects that will end up loading the data of each set defined at each product of the bot received at initialization. - Once all the underlaying objects are fully initialized it will callback. + Once all the underlying objects are fully initialized it will callback. At the same time it will raise an event for each underlaying file being loaded, so that the UI can reflect the progress to the end user. diff --git a/Platform/UI/Utilities.js b/Platform/UI/Utilities.js index b8be0cd45..54affe934 100644 --- a/Platform/UI/Utilities.js +++ b/Platform/UI/Utilities.js @@ -15,7 +15,7 @@ function getSchemaDocument(node, project) { even those can fail. For that reason, we will temporally see if we can find the schema document at any of the available projects. - TODO: We need to explictly declare the project of a relatedUIObject in order to avoid potential name collision + TODO: We need to explicitly declare the project of a relatedUIObject in order to avoid potential name collision between nodes belonging to more than one project. */ diff --git a/Platform/WebServer/externalScripts/flexsearch.bundle.js b/Platform/WebServer/externalScripts/flexsearch.bundle.js new file mode 100644 index 000000000..dd0c08309 --- /dev/null +++ b/Platform/WebServer/externalScripts/flexsearch.bundle.js @@ -0,0 +1,33 @@ +/**! + * FlexSearch.js v0.7.2 (Bundle) + * Copyright 2018-2021 Nextapps GmbH + * Author: Thomas Wilkerling + * Licence: Apache-2.0 + * https://github.com/nextapps-de/flexsearch + */ +(function _f(self){'use strict';try{if(module)self=module}catch(e){}self._factory=_f;var t;function u(a){return"undefined"!==typeof a?a:!0}function aa(a){const b=Array(a);for(let c=0;c=this.B&&(w||!n[l])){var f=L(q,d,r),g="";switch(this.G){case "full":if(3f;h--)if(h-f>=this.B){var k=L(q,d,r,e,f);g=l.substring(f,h);M(this,n,g,k,a,c)}break}case "reverse":if(2=this.B&&M(this,n, +g,L(q,d,r,e,h),a,c);g=""}case "forward":if(1=this.B&&M(this,n,g,f,a,c);break}default:if(this.C&&(f=Math.min(f/this.C(b,l,r)|0,q-1)),M(this,n,l,f,a,c),w&&1=this.B&&!e[l]){e[l]=1;const p=this.l&&l>f;M(this,m,p?f:l,L(g+(d/2>g?0:1),d,r,h-1,k-1),a,c,p?l:f)}}}}this.m||(this.register[a]=1)}}return this}; +function L(a,b,c,d,e){return c&&1=this.B&&!c[q])if(this.s||f||this.map[q])k[w++]=q,c[q]=1;else return d;a=k;e=a.length}if(!e)return d;b||(b=100);h=this.depth&&1=d)))break;if(n){if(f)return ta(k,d,0);b[b.length]=k;return}}return!c&&k}function ta(a,b,c){a=1===a.length?a[0]:[].concat.apply([],a);return c||a.length>b?a.slice(c,c+b):a} +function ua(a,b,c,d){c?(d=d&&b>c,a=(a=a[d?b:c])&&a[d?c:b]):a=a[b];return a}t.contain=function(a){return!!this.register[a]};t.update=function(a,b){return this.remove(a).add(a,b)}; +t.remove=function(a,b){const c=this.register[a];if(c){if(this.m)for(let d=0,e;db||c)e=e.slice(c,c+b);d&&(e=za.call(this,e));return{tag:a,result:e}}}function za(a){const b=Array(a.length);for(let c=0,d;c +