CL into PL refactoring
This commit is contained in:
1 parent
e6893d1db5
commit
e351fe271f
23 files changed
+117
-112
No files matched your search
@@ -93,7 +93,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
while (lastPage === false) {
|
||||
try {
|
||||
page++
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
let listResponse = await octokit[endpoint][method]({
|
||||
owner,
|
||||
repo,
|
||||
@@ -223,7 +223,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
try {
|
||||
page++
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
|
||||
let listResponse = await octokit.rest.pulls.list({
|
||||
owner: owner,
|
||||
@@ -284,7 +284,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
/*
|
||||
Lets get the files changed at this Pull Request.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
let listResponse = await octokit.rest.pulls.listFiles({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -309,7 +309,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
} else {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -333,7 +333,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
let pullRequestFile = filesChanged[j]
|
||||
let fileContentUrl = pullRequestFile.raw_url
|
||||
if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') >= 0) {
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -341,7 +341,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that a User Profile file... \n\n' + fileContentUrl + '\n\n...was submitted together with ' + (filesChanged.length - 1) + ' other file/s. User Profiles files as per the Governance System rules, must be the only file present at a Pull Request in order to pass all the validations and be automatically merged.'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -379,7 +379,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (githubUsername !== fileName) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the File Name. -> Github Username = ' + githubUsername + '-> fileName = ' + fileName)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -387,7 +387,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the name of the User Profile Plugin File.\n\n File Name = "' + fileName + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -402,8 +402,8 @@ exports.newGithubServer = function newGithubServer() {
|
||||
/*
|
||||
Validation #3: The file changed at the PR is a User Profile.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
fileContent = await CL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
fileContent = await PL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
|
||||
userProfile = JSON.parse(fileContent)
|
||||
|
||||
if (userProfile.type !== 'User Profile') {
|
||||
@@ -421,7 +421,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (messageSigned !== githubUsername) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #4 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the Message Signed at the User Profile. -> Github Username = ' + githubUsername + '-> messageSigned = ' + messageSigned)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -429,7 +429,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile.\n\n Message Signed = "' + messageSigned + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -447,7 +447,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (userProfile.name !== githubUsername) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -455,7 +455,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the User Profile node\'s name.\n\n User Profile Name = "' + userProfile.name + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -495,7 +495,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -503,7 +503,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Id already exists and belongs to another User Profile on record. \n\nUser Profile Id = "' + userProfile.id + '" \n\n User Profile with the same Id = "' + testUserProfile + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -538,7 +538,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
let config = JSON.parse(otherUserProfile.config)
|
||||
let messageSigned = JSON.stringify(config.signature)
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
messageSigned
|
||||
)
|
||||
userProfileIdMap.set(serverResponse.address, otherUserProfile.name)
|
||||
@@ -546,7 +546,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
let config = JSON.parse(userProfile.config)
|
||||
let messageSigned = JSON.stringify(config.signature)
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
messageSigned
|
||||
)
|
||||
|
||||
@@ -556,7 +556,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -564,7 +564,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Blockchain Account already exists and belongs to another User Profile on record. \n\nUser Profile Blockchain Account = "' + serverResponse.address + '" \n\n User Profile with the same Blockchain Account = "' + testUserProfile + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -582,7 +582,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
/*
|
||||
All validations passed, we will proceed an merge this Pull Request.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
mergeResponse = await octokit.rest.pulls.merge({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -603,7 +603,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
try {
|
||||
page++
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
|
||||
let listResponse = await octokit.rest.pulls.list({
|
||||
owner: owner,
|
||||
@@ -631,7 +631,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
for (let i = 0; i < githubPrListMaster.length; i++) {
|
||||
let pullRequest = githubPrListMaster[i]
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -639,7 +639,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunatelly we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch intstead. For your convinienve, you can swithch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
|
||||
@@ -24,13 +24,13 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
/*
|
||||
We will create an HTTP Server and leave it running forever.
|
||||
*/
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
}
|
||||
|
||||
function onHttpRequest(httpRequest, httpResponse) {
|
||||
@@ -52,7 +52,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
switch (params.method) {
|
||||
case 'getNetworkClientStatus': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.getNetworkClientStatus(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.getNetworkClientStatus(
|
||||
params.host,
|
||||
params.port,
|
||||
params.interface
|
||||
@@ -63,7 +63,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'createWalletAccount': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.createWalletAccount(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.createWalletAccount(
|
||||
params.entropy
|
||||
)
|
||||
|
||||
@@ -72,7 +72,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getWalletBalances': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.getWalletBalances(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.getWalletBalances(
|
||||
params.host,
|
||||
params.port,
|
||||
params.interface,
|
||||
@@ -84,7 +84,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'signData': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.signData(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.signData(
|
||||
params.privateKey,
|
||||
params.data
|
||||
)
|
||||
@@ -94,7 +94,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'recoverAddress': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
params.signature
|
||||
)
|
||||
|
||||
@@ -103,7 +103,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'mnemonicToPrivateKey': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.mnemonicToPrivateKey(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.mnemonicToPrivateKey(
|
||||
params.mnemonic
|
||||
)
|
||||
|
||||
@@ -625,7 +625,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
contribute()
|
||||
|
||||
async function contribute() {
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const gitpath = await lookpath('git')
|
||||
if (gitpath === undefined) {
|
||||
console.log('[ERROR] `git` not installed.')
|
||||
@@ -1000,7 +1000,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
switch (params.method) {
|
||||
case 'getGithubStars': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubStars(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubStars(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1011,7 +1011,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getGithubWatchers': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubWatchers(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubWatchers(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1022,7 +1022,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getGithubForks': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubForks(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubForks(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1033,7 +1033,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'mergePullRequests': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.mergePullRequests(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.mergePullRequests(
|
||||
params.commitMessage,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1044,7 +1044,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'payContributors': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.payContributors(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.payContributors(
|
||||
params.contractAddress,
|
||||
params.contractAbi,
|
||||
params.paymentsArray,
|
||||
@@ -1375,6 +1375,11 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
let folder = unescape(requestPath[3])
|
||||
let fileName = unescape(requestPath[4])
|
||||
|
||||
/*Beta 12 Refactoring Code: Remove this before realeasing beta 12.*/
|
||||
if (fileName === 'Superalgos-CL.json') {
|
||||
fileName = 'Superalgos-PL.json'
|
||||
}
|
||||
|
||||
let response = await SA.projects.foundations.utilities.plugins.getPluginFileContent(
|
||||
project,
|
||||
folder,
|
||||
@@ -1693,7 +1698,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
default:
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
responseWaiters.set(command.callerId, responseCallBack)
|
||||
}
|
||||
|
||||
CL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
|
||||
PL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> command = ' + JSON.stringify(command))
|
||||
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> error = ' + err.stack)
|
||||
|
||||
@@ -269,7 +269,7 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
let privateKey = response.privateKey
|
||||
|
||||
for (let i = 0; i < paymentsArray.length; i++) {
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(10000)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(10000)
|
||||
let payment = paymentsArray[i]
|
||||
sendTokens(
|
||||
i + 1,
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
}
|
||||
|
||||
|
||||
CL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
|
||||
PL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
|
||||
|
||||
function onResponse(message) {
|
||||
socket.send(message)
|
||||
|
||||
+28
-28
@@ -76,38 +76,38 @@ exports.newPlatformApp = function newPlatformApp() {
|
||||
/*
|
||||
Setting up servers running inside this Client.
|
||||
*/
|
||||
CL.servers = {}
|
||||
PL.servers = {}
|
||||
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
|
||||
console.log('')
|
||||
|
||||
CL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
|
||||
CL.servers.WEB_SERVER.initialize()
|
||||
CL.servers.WEB_SERVER.run()
|
||||
PL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
|
||||
PL.servers.WEB_SERVER.initialize()
|
||||
PL.servers.WEB_SERVER.run()
|
||||
console.log('Web Server .................................................. Started')
|
||||
|
||||
CL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
|
||||
CL.servers.UI_FILE_SERVER.initialize()
|
||||
CL.servers.UI_FILE_SERVER.run()
|
||||
PL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
|
||||
PL.servers.UI_FILE_SERVER.initialize()
|
||||
PL.servers.UI_FILE_SERVER.run()
|
||||
console.log('UI File Server .............................................. Started')
|
||||
|
||||
CL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
|
||||
CL.servers.PROJECT_FILE_SERVER.initialize()
|
||||
CL.servers.PROJECT_FILE_SERVER.run()
|
||||
PL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
|
||||
PL.servers.PROJECT_FILE_SERVER.initialize()
|
||||
PL.servers.PROJECT_FILE_SERVER.run()
|
||||
console.log('Project File Server ......................................... Started')
|
||||
|
||||
CL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
|
||||
CL.servers.PLUGIN_SERVER.initialize()
|
||||
CL.servers.PLUGIN_SERVER.run()
|
||||
PL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
|
||||
PL.servers.PLUGIN_SERVER.initialize()
|
||||
PL.servers.PLUGIN_SERVER.run()
|
||||
console.log('Plugin Server ............................................... Started')
|
||||
|
||||
CL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
|
||||
CL.servers.DATA_FILE_SERVER.initialize()
|
||||
CL.servers.DATA_FILE_SERVER.run()
|
||||
PL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
|
||||
PL.servers.DATA_FILE_SERVER.initialize()
|
||||
PL.servers.DATA_FILE_SERVER.run()
|
||||
console.log('Data File Server ............................................ Started')
|
||||
|
||||
CL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
|
||||
CL.servers.EVENT_SERVER.initialize()
|
||||
CL.servers.EVENT_SERVER.run()
|
||||
PL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
|
||||
PL.servers.EVENT_SERVER.initialize()
|
||||
PL.servers.EVENT_SERVER.run()
|
||||
console.log('Events Server ............................................... Started')
|
||||
|
||||
TASK_MANAGER_SERVER = TASK_MANAGER_SERVER.newTaskManagerServer()
|
||||
@@ -115,19 +115,19 @@ exports.newPlatformApp = function newPlatformApp() {
|
||||
TASK_MANAGER_SERVER.run()
|
||||
console.log('Task Manager Server ......................................... Started')
|
||||
|
||||
CL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
|
||||
CL.servers.CCXT_SERVER.initialize()
|
||||
CL.servers.CCXT_SERVER.run()
|
||||
PL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
|
||||
PL.servers.CCXT_SERVER.initialize()
|
||||
PL.servers.CCXT_SERVER.run()
|
||||
console.log('CCXT Server ................................................. Started')
|
||||
|
||||
CL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
|
||||
CL.servers.WEB3_SERVER.initialize()
|
||||
CL.servers.WEB3_SERVER.run()
|
||||
PL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
|
||||
PL.servers.WEB3_SERVER.initialize()
|
||||
PL.servers.WEB3_SERVER.run()
|
||||
console.log('WEB3 Server ................................................. Started')
|
||||
|
||||
CL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
|
||||
CL.servers.GITHUB_SERVER.initialize()
|
||||
CL.servers.GITHUB_SERVER.run()
|
||||
PL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
|
||||
PL.servers.GITHUB_SERVER.initialize()
|
||||
PL.servers.GITHUB_SERVER.run()
|
||||
console.log('Github Server ............................................... Started')
|
||||
|
||||
console.log('')
|
||||
|
||||
+5
-5
@@ -6,10 +6,10 @@ load all node dependencies and get them ready to the actual App.
|
||||
*/
|
||||
|
||||
/*
|
||||
The CL object is accesible everywhere at the Superalgos Platform Client.
|
||||
The PL object is accesible everywhere at the Superalgos Platform Client.
|
||||
It provides access to all modules built for this Client.
|
||||
*/
|
||||
global.CL = {}
|
||||
global.PL = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
@@ -28,7 +28,7 @@ Setting up the modules that will be available, defined at the Project Schema fil
|
||||
*/
|
||||
let MULTI_PROJECT = require('./MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(CL, 'CL')
|
||||
MULTI_PROJECT_MODULE.initialize(PL, 'PL')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
@@ -54,7 +54,7 @@ SA.nodeModules = {
|
||||
run()
|
||||
|
||||
async function run() {
|
||||
CL.app = require('./Platform/PlatformApp.js').newPlatformApp()
|
||||
await CL.app.run()
|
||||
PL.app = require('./Platform/PlatformApp.js').newPlatformApp()
|
||||
await PL.app.run()
|
||||
console.log('Superalgos Platform App is Running!')
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "Project Schema File",
|
||||
"definition": {
|
||||
"text": "It is the most basic and low level system-wide configuration file. You will find it at the Projects folder. It contains a list of all integrated projects and for each one the list of javascript modules organized in different categories, like Function Libraries, Utilities, Spaces, Globals, etc; in turn organized into the broather categories UI, TS and CL.",
|
||||
"text": "It is the most basic and low level system-wide configuration file. You will find it at the Projects folder. It contains a list of all integrated projects and for each one the list of javascript modules organized in different categories, like Function Libraries, Utilities, Spaces, Globals, etc; in turn organized into the broather categories UI, TS and PL.",
|
||||
"updated": 1614939492529
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": "Assets",
|
||||
"name": "Education-Project-CL",
|
||||
"config": "{\"codeName\":\"Education-Project-CL\"}",
|
||||
"name": "Education-Project-PL",
|
||||
"config": "{\"codeName\":\"Education-Project-PL\"}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [
|
||||
{
|
||||
"type": "Asset Class",
|
||||
"name": "Client",
|
||||
"config": "{\n \"folderPath\": \"Education/CL\"\n}",
|
||||
"config": "{\n \"folderPath\": \"Education/PL\"\n}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [],
|
||||
"assets": [],
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": "Assets",
|
||||
"name": "Ethereum-Project-CL",
|
||||
"config": "{\"codeName\":\"Ethereum-Project-CL\"}",
|
||||
"name": "Ethereum-Project-PL",
|
||||
"config": "{\"codeName\":\"Ethereum-Project-PL\"}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [
|
||||
{
|
||||
"type": "Asset Class",
|
||||
"name": "Client",
|
||||
"config": "{\n \"folderPath\": \"Ethereum/CL\"\n}",
|
||||
"config": "{\n \"folderPath\": \"Ethereum/PL\"\n}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [],
|
||||
"assets": [],
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": "Assets",
|
||||
"name": "Foundations-Project-CL",
|
||||
"config": "{\"codeName\":\"Foundations-Project-CL\"}",
|
||||
"name": "Foundations-Project-PL",
|
||||
"config": "{\"codeName\":\"Foundations-Project-PL\"}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [
|
||||
{
|
||||
"type": "Asset Class",
|
||||
"name": "Client",
|
||||
"config": "{\n \"folderPath\": \"Foundations/CL\"\n}",
|
||||
"config": "{\n \"folderPath\": \"Foundations/PL\"\n}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [],
|
||||
"assets": [],
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "Assets",
|
||||
"name": "Superalgos-CL",
|
||||
"config": "{\"codeName\":\"Superalgos-CL\"}",
|
||||
"name": "Superalgos-PL",
|
||||
"config": "{\"codeName\":\"Superalgos-PL\"}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [
|
||||
{
|
||||
@@ -12,7 +12,7 @@
|
||||
"assetClasses": [
|
||||
{
|
||||
"type": "Asset Class",
|
||||
"name": "Superalgos-CL",
|
||||
"name": "Superalgos-PL",
|
||||
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||
"project": "Governance",
|
||||
"assetClasses": [],
|
||||
@@ -40,12 +40,12 @@
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Assets",
|
||||
"name": "Superalgos-CL",
|
||||
"name": "Superalgos-PL",
|
||||
"id": "4a693d1b-c9cc-4ab6-aa56-e1e1e1e18854"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"Superalgos-CL",
|
||||
"Superalgos-PL",
|
||||
"Assets",
|
||||
"Governance",
|
||||
"4a693d1b-c9cc-4ab6-aa56-e1e1e1e18854"
|
||||
|
||||
@@ -7792,7 +7792,7 @@
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Asset Class",
|
||||
"name": "Superalgos-CL",
|
||||
"name": "Superalgos-PL",
|
||||
"id": "5d13e350-4267-4d2f-a3fa-a1fabd5df10d"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
@@ -7809,7 +7809,7 @@
|
||||
"d6e22645-35ee-443e-9349-01d2e8362d79"
|
||||
],
|
||||
[
|
||||
"Superalgos-CL",
|
||||
"Superalgos-PL",
|
||||
"Asset Class",
|
||||
"Governance",
|
||||
"5d13e350-4267-4d2f-a3fa-a1fabd5df10d"
|
||||
|
||||
@@ -6305,7 +6305,7 @@
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Asset Class",
|
||||
"name": "Superalgos-CL",
|
||||
"name": "Superalgos-PL",
|
||||
"id": "5d13e350-4267-4d2f-a3fa-a1fabd5df10d"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
@@ -6322,7 +6322,7 @@
|
||||
"d6e22645-35ee-443e-9349-01d2e8362d79"
|
||||
],
|
||||
[
|
||||
"Superalgos-CL",
|
||||
"Superalgos-PL",
|
||||
"Asset Class",
|
||||
"Governance",
|
||||
"5d13e350-4267-4d2f-a3fa-a1fabd5df10d"
|
||||
|
||||
@@ -10681,7 +10681,7 @@
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"Superalgos-CL",
|
||||
"Superalgos-PL",
|
||||
"Assets",
|
||||
"Governance",
|
||||
"4a693d1b-c9cc-4ab6-aa56-e1e1e1e18854"
|
||||
|
||||
@@ -1082,8 +1082,8 @@
|
||||
},
|
||||
{
|
||||
"type": "Plugin File",
|
||||
"name": "Education-Project-CL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Education-Project-CL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"name": "Education-Project-PL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Education-Project-PL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"project": "Foundations",
|
||||
"id": "eefc0ae6-0364-4c0e-84ba-138ba30e6ce8",
|
||||
"savedPayload": {
|
||||
|
||||
@@ -1082,8 +1082,8 @@
|
||||
},
|
||||
{
|
||||
"type": "Plugin File",
|
||||
"name": "Ethereum-Project-CL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Ethereum-Project-CL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"name": "Ethereum-Project-PL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Ethereum-Project-PL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"project": "Foundations",
|
||||
"id": "6a48da6b-88ae-4ae0-8638-2473d66abe58",
|
||||
"savedPayload": {
|
||||
|
||||
@@ -1082,8 +1082,8 @@
|
||||
},
|
||||
{
|
||||
"type": "Plugin File",
|
||||
"name": "Foundations-Project-CL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Foundations-Project-CL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"name": "Foundations-Project-PL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Foundations-Project-PL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"project": "Foundations",
|
||||
"id": "81f1afb2-c08c-4f98-88d9-be0790002c09",
|
||||
"savedPayload": {
|
||||
|
||||
@@ -1193,8 +1193,8 @@
|
||||
"pluginFiles": [
|
||||
{
|
||||
"type": "Plugin File",
|
||||
"name": "Superalgos-CL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Superalgos-CL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"name": "Superalgos-PL",
|
||||
"config": "{\"project\":\"Governance\",\"fileName\":\"Superalgos-PL\",\"folderName\":\"Assets\",\"nodeType\":\"Assets\"}",
|
||||
"project": "Foundations",
|
||||
"id": "92ef88cd-4921-4a11-ab45-3ae57c6c903c",
|
||||
"savedPayload": {
|
||||
|
||||
@@ -866,7 +866,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"CL": {
|
||||
"PL": {
|
||||
"utilities": [
|
||||
{
|
||||
"name": "Async Functions",
|
||||
@@ -983,7 +983,7 @@
|
||||
]
|
||||
},
|
||||
"TS": {},
|
||||
"CL": {}
|
||||
"PL": {}
|
||||
},
|
||||
{
|
||||
"name": "TensorFlow",
|
||||
@@ -1091,7 +1091,7 @@
|
||||
"processModules": [],
|
||||
"botModules": []
|
||||
},
|
||||
"CL": {}
|
||||
"PL": {}
|
||||
},
|
||||
{
|
||||
"name": "Governance",
|
||||
@@ -1283,7 +1283,7 @@
|
||||
]
|
||||
},
|
||||
"TS": {},
|
||||
"CL": {},
|
||||
"PL": {},
|
||||
"plugins": [
|
||||
"User Profiles",
|
||||
"Pools",
|
||||
|
||||
Reference in new issue
Block a user