Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop

This commit is contained in:
Julian Molina committed 2021-08-28 10:01:55 +02:00
commit db3c9a89d0
33 files changed
+23699 -12836

No files matched your search

+76 -1
View File
@@ -211,6 +211,7 @@ exports.newGithubServer = function newGithubServer() {
})
await getPrList()
await mergePrs()
await closePrsToMaster()
async function getPrList() {
@@ -445,7 +446,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 octokit.rest.issues.createComment({
owner: owner,
@@ -592,6 +593,80 @@ exports.newGithubServer = function newGithubServer() {
}
}
}
async function closePrsToMaster() {
let githubPrListMaster = []
const per_page = 100 // Max
let page = 0
try {
page++
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit.rest.pulls.list({
owner: owner,
repo: repo,
state: 'open',
head: undefined,
base: 'master',
sort: undefined,
direction: undefined,
per_page: per_page,
page: page
});
if (listResponse.data.length < 100) {
lastPage = true
}
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Receiving Page = ' + page)
for (let i = 0; i < listResponse.data.length; i++) {
let pullRequest = listResponse.data[i]
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Pull Request "' + pullRequest.title + '" found and added to the list to validate. ')
githubPrListMaster.push(pullRequest)
}
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Received = ' + listResponse.data.length)
for (let i = 0; i < githubPrListMaster.length; i++) {
let pullRequest = githubPrListMaster[i]
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pullRequest.number,
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 octokit.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pullRequest.number,
state: 'closed'
});
}
} catch (err) {
console.log(err)
if (err.stack.indexOf('last page') >= 0) {
return
} else {
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->Method call produced an error.')
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->err.stack = ' + err.stack)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->repository = ' + repository)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->username = ' + username)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->token ends with = ' + '...' + token.substring(token.length - 10))
error = err
return
}
}
}
} catch (err) {
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> err.stack = ' + err.stack)
}
+28
View File
@@ -0,0 +1,28 @@
global.NT = {
memory: {
maps: {
USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id.
USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle.
POSTS: new Map(), // This are all the posts we are keeping track of.
EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once.
},
arrays: {
EVENTS: [], // A time ordered list of events.
NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking.
NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking.
}
},
modules: {
USER_PROFILE: require('./UserProfile.js'),
BOT: require('./BotProfile.js'),
EVENT: require('./Event.js'),
POST: require('./Post.js'),
QUERY: require('./Query.js'),
QUERY_PROFILE_STATS: require('./Queries/ProfileStats.js'),
QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'),
QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'),
QUERY_EVENTS: require('./Queries/Events.js')
}
}
+245
View File
@@ -0,0 +1,245 @@
exports.newEvents = function newEvents() {
let thisObject = {
profile: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const INITIAL_EVENT_INDEX_FIRST = 'First'
const INITIAL_EVENT_INDEX_LAST = 'Last'
const MIN_AMOUNT_REQUESTED = 1
const MAX_AMOUNT_REQUESTED = 100
const DIRECTION_FUTURE = 'Future'
const DIRECTION_PAST = 'Past'
return thisObject
function finalize() {
thisObject.profile = undefined
}
function initialize(queryReceived) {
/*
Validate User Profile
*/
if (queryReceived.emitterUserProfileId !== undefined) {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
} else {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.emitterUserProfileHandle)
}
if (thisObject.profile === undefined) {
throw ('Emitter User Profile Not Found.')
}
/*
Validate Initial Index
*/
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_LAST) {
queryReceived.initialIndex = thisObject.profile.posts.length - 1
}
if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Event Is Not a Number.')
}
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
if (queryReceived.amountRequested === undefined) {
throw ('Amount Requested Undefined.')
}
if (isNaN(queryReceived.amountRequested) === true) {
throw ('Amount Requested Is Not a Number.')
}
if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) {
throw ('Amount Requested Below Min.')
}
if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
/*
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
}
if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) {
throw ('Direction Not Supported.')
}
thisObject.direction = queryReceived.direction
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let event = NT.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let event = NT.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
break
}
}
return response
function checkEventContext(event) {
/*
For an event to be returned at the response of this query, it needs to be related
to the profile making the query. How it can be related?
1. The Emitter or Target profile must be the same as the Query Profile.
2. The Emitter or Traget profile must be at the Following map of the Query Profile.
3. The Emmiter or Target post must be belong to any profile at the Following of the Query Profile.
Any of the above happening, means that indeed it is related.
*/
let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId)
let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId)
let emitterPost = NT.memory.maps.POSTS.get(eventReceived.emitterPostHash)
let targetPost = NT.memory.maps.POSTS.get(eventReceived.targetPostHash)
/*
Test #1 : The Emitter or Target profile must be the same as the Query Profile.
*/
if (emitterUserProfile !== undefined) {
if (emitterUserProfile.userProfieId === thisObject.profile.userProfieId) {
addToResponse(event)
return
}
}
if (targetUserProfile !== undefined) {
if (targetUserProfile.userProfieId === thisObject.profile.userProfieId) {
addToResponse(event)
return
}
}
/*
Test #2 : The Emitter or Traget profile must be at the Following map of the Query Profile.
*/
if (emitterUserProfile !== undefined) {
if (thisObject.profile.following.get(emitterUserProfile.userProfieId) !== undefined) {
addToResponse(event)
return
}
}
if (targetUserProfile !== undefined) {
if (thisObject.profile.following.get(targetUserProfile.userProfieId) !== undefined) {
addToResponse(event)
return
}
}
/*
Test #3 : The Emmiter or Target post must be belong to any profile at the Following of the Query Profile.
*/
if (emitterPost !== undefined) {
if (thisObject.profile.following.get(emitterPost.emitterUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (emitterPost !== undefined) {
if (thisObject.profile.following.get(emitterPost.targetUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (targetPost !== undefined) {
if (thisObject.profile.following.get(targetPost.emitterUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (targetPost !== undefined) {
if (thisObject.profile.following.get(targetPost.targetUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
function addToResponse(event) {
let eventResponse = {
eventId: event.eventId,
eventType: event.eventType,
emitterUserProfileId: event.emitterUserProfileId,
targetUserProfileId: event.targetUserProfileId,
emitterPostHash: event.emitterPostHash,
targetPostHash: event.targetPostHash,
timestamp: event.timestamp,
botId: event.botId,
botAsset: event.botAsset,
botExchange: event.botExchange
}
if (emitterUserProfile !== undefined) {
let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats()
query.initialize({ targetUserProfileId: event.emitterUserProfileId })
eventResponse.emitterUserProfile = query.execute()
}
if (targetUserProfile !== undefined) {
let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats()
query.initialize({ targetUserProfileId: event.targetUserProfileId })
eventResponse.targetUserProfile = query.execute()
}
if (emitterPost !== undefined) {
eventResponse.emitterPost = addPost(emitterPost)
}
if (targetPost !== undefined) {
eventResponse.targetPost = addPost(targetPost)
}
response.push(eventResponse)
function addPost(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
return postResponse
}
}
}
}
}
+129
View File
@@ -0,0 +1,129 @@
exports.newPostReplies = function newPostReplies() {
let thisObject = {
post: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const INITIAL_REPLY_INDEX_FIRST = 'First'
const INITIAL_REPLY_INDEX_LAST = 'Last'
const MIN_AMOUNT_REQUESTED = 1
const MAX_AMOUNT_REQUESTED = 100
const DIRECTION_FUTURE = 'Future'
const DIRECTION_PAST = 'Past'
return thisObject
function finalize() {
thisObject.post = undefined
}
function initialize(queryReceived) {
/*
Validate Post
*/
thisObject.post = NT.memory.maps.POSTS.get(queryReceived.targetPostHash)
if (thisObject.post === undefined) {
throw ('Target Post Not Found.')
}
/*
Validate Initial Index
*/
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_LAST) {
queryReceived.initialIndex = thisObject.poat.replies.length - 1
}
if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Reply Is Not a Number.')
}
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
if (queryReceived.amountRequested === undefined) {
throw ('Amount Requested Undefined.')
}
if (isNaN(queryReceived.amountRequested) === true) {
throw ('Amount Requested Is Not a Number.')
}
if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) {
throw ('Amount Requested Below Min.')
}
if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
/*
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
}
if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) {
throw ('Direction Not Supported.')
}
thisObject.direction = queryReceived.direction
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let post = thisObject.post.replies[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let post = thisObject.post.replies[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
}
return response
function addToResponse(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
response.push(postResponse)
}
}
}
+133
View File
@@ -0,0 +1,133 @@
exports.newProfilePosts = function newProfilePosts() {
let thisObject = {
profile: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const INITIAL_POST_INDEX_FIRST = 'First'
const INITIAL_POST_INDEX_LAST = 'Last'
const MIN_AMOUNT_REQUESTED = 1
const MAX_AMOUNT_REQUESTED = 100
const DIRECTION_FUTURE = 'Future'
const DIRECTION_PAST = 'Past'
return thisObject
function finalize() {
thisObject.profile = undefined
}
function initialize(queryReceived) {
/*
Validate User Profile
*/
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (thisObject.profile === undefined) {
throw ('Target User Profile Not Found.')
}
/*
Validate Initial Index
*/
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) {
queryReceived.initialIndex = thisObject.profile.posts.length - 1
}
if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Post Is Not a Number.')
}
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
if (queryReceived.amountRequested === undefined) {
throw ('Amount Requested Undefined.')
}
if (isNaN(queryReceived.amountRequested) === true) {
throw ('Amount Requested Is Not a Number.')
}
if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) {
throw ('Amount Requested Below Min.')
}
if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
/*
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
}
if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) {
throw ('Direction Not Supported.')
}
thisObject.direction = queryReceived.direction
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let post = thisObject.profile.posts[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let post = thisObject.profile.posts[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
}
return response
function addToResponse(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
response.push(postResponse)
}
}
}
+47
View File
@@ -0,0 +1,47 @@
exports.newProfileStats = function newProfileStats() {
let thisObject = {
profile: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize(queryReceived) {
/*
Validate User Profile
*/
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (thisObject.profile === undefined) {
throw ('Target User Profile Not Found.')
}
}
function execute() {
return {
"userProfieId": thisObject.profile.userProfieId,
"userProfileHandle": thisObject.profile.userProfileHandle,
"blockchainAccount": thisObject.profile.blockchainAccount,
"ranking": thisObject.profile.ranking,
"followingCount": thisObject.profile.followingCount,
"followersCount": thisObject.profile.followersCount,
"emitterEventsCount": thisObject.profile.emitterEventsCount,
"targetEventsCount": thisObject.profile.targetEventsCount,
"postsCount": thisObject.profile.postsCount,
"botsCount": thisObject.profile.botsCount
}
}
}
+63
View File
@@ -0,0 +1,63 @@
exports.newQuery = function newQuery() {
let thisObject = {
query: undefined,
queryType: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const QUERY_TYPES = {
PROFILE_STATS: 0,
PROFILE_POSTS: 1,
POST_REPLIES: 2,
EVENTS: 3
}
return thisObject
function finalize() {
thisObject.query = undefined
thisObject.queryType = undefined
}
function initialize(queryReceived) {
thisObject.queryType = queryReceived.queryType
switch (thisObject.queryType) {
case QUERY_TYPES.PROFILE_STATS: {
thisObject.query = NT.modules.QUERY_PROFILE_STATS.newProfileStats()
query.initialize(queryReceived)
break
}
case QUERY_TYPES.PROFILE_POSTS: {
thisObject.query = NT.modules.QUERY_PROFILE_POSTS.newProfilePosts()
query.initialize(queryReceived)
break
}
case QUERY_TYPES.POST_REPLIES: {
thisObject.query = NT.modules.QUERY_POST_REPLIES.newPostReplies()
query.initialize(queryReceived)
break
}
case QUERY_TYPES.maps.EVENTS: {
thisObject.query = NT.modules.QUERY_EVENTS.newEvents()
query.initialize(queryReceived)
break
}
default: throw('Query Type Not Supported.')
}
}
function execute() {
return thisObject.query.execute()
}
}
+131
View File
@@ -0,0 +1,131 @@
exports.newUserProfile = function newUserProfile() {
let thisObject = {
botProfileId: undefined,
botProfileHandle: undefined,
botAsset: undefined,
botExchange: undefined,
enabled: undefined,
following: undefined,
followers: undefined,
followingCount: undefined,
followersCount: undefined,
emitterEventsCount: undefined,
targetEventsCount: undefined,
postsCount: undefined,
posts: undefined,
addPost: addPost,
removePost: removePost,
addFollowing: addFollowing,
removeFollowing: removeFollowing,
addFollower: addFollower,
removeFollower: removeFollower,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
thisObject.following = undefined
thisObject.followers = undefined
thisObject.posts = undefined
}
function initialize() {
thisObject.following = new Map()
thisObject.followers = new Map()
thisObject.followingCount = 0
thisObject.followersCount = 0
thisObject.emitterEventsCount = 0
thisObject.targetEventsCount = 0
thisObject.postsCount = 0
thisObject.posts = []
}
function addPost(
emitterPostHash,
targetPostHash,
postType,
botProfile,
timestamp
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
}
let post = NT.modules.POST.newPost()
post.initialize(
emitterPostHash,
targetPostHash,
postType,
botProfile,
timestamp
)
thisObject.maps.POSTS.push(post)
NT.memory.maps.POSTS.set(emitterPostHash, post)
thisObject.postsCount++
}
function removePost(
emitterPostHash
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) {
throw ('Post Does Not Exist.')
}
let post = thisObject.posts.get(emitterPostHash)
post.finalize()
for (let i = thisObject.posts.length - 1; i >= 0; i--) {
if (thisObject.posts[i].emitterPostHash === emitterPostHash) {
thisObject.posts.splice(i, 1)
break
}
}
NT.memory.maps.POSTS.delete(emitterPostHash)
thisObject.postsCount--
}
function addFollowing(
botProfile
) {
if (thisObject.following.get(botProfile.id) === undefined) {
thisObject.following.set(botProfile.id, botProfile)
thisObject.followingCount++
}
}
function removeFollowing(
botProfile
) {
if (thisObject.following.get(botProfile.id) !== undefined) {
thisObject.following.delete(botProfile.id)
thisObject.followingCount--
}
}
function addFollower(
botProfile
) {
if (thisObject.followers.get(botProfile.id) === undefined) {
thisObject.followers.set(botProfile.id, botProfile)
thisObject.followersCount++
}
}
function removeFollower(
botProfile
) {
if (thisObject.followers.get(botProfile.id) !== undefined) {
thisObject.followers.delete(botProfile.id)
thisObject.followersCount--
}
}
}
+59 -5
View File
@@ -1,9 +1,10 @@
exports.newClientInterface = function newClientInterface() {
let thisObject = {
eventReceived: eventReceived,
queryReceived: queryReceived,
initialize: initialize,
finalize: finalize,
run: run
finalize: finalize
}
return thisObject
@@ -16,7 +17,60 @@ exports.newClientInterface = function newClientInterface() {
}
function run() {
}
function eventReceived(eventMessage) {
/*
We expect here a JSON string with the following properties:
{
"eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"eventType": 10,
"emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"timestamp": 124234234234,
"botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"botAsset": "BTC",
"botExchange": "Binance"
}
*/
let eventReceived = JSON.parse(eventMessage)
if (NT.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) {
throw ('Event Already Exists.')
}
let event = NT.modules.EVENT.newEvent()
event.initialize(eventReceived)
NT.memory.maps.EVENTS.set(eventReceived.eventId, event)
}
function queryReceived(queryMessage) {
/*
We expect here a JSON string with the following properties:
{
"equeryId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"queryType": 10,
"emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"emitterUserProfileHandle": "Luis-Fernando-Molina",
"targetUserProfileHandle": "Luis-Fernando-Molina",
"emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"timestamp": 124234234234,
"botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"botAsset": "BTC",
"botExchange": "Binance",
"initialIndex": 35,
"amountRequested": 50,
"direction": "Past"
}
*/
let queryReceived = JSON.parse(queryMessage)
let query = NT.modules.QUERY.newQuery()
query.initialize(queryReceived)
return query.execute()
}
}
+171 -110
View File
@@ -2,28 +2,41 @@ exports.newEvent = function newEvent() {
let thisObject = {
eventId: undefined,
eventType: undefined,
emitterUserProfile: undefined,
targetUserProfile: undefined,
asset: undefined,
emitterUserProfileId: undefined,
targetUserProfileId: undefined,
emitterBotProfileId: undefined,
targetBotProfileId: undefined,
emitterPostHash: undefined,
targetPostHash: undefined,
timestamp: undefined,
botId: undefined,
botAsset: undefined,
botExchange: undefined,
initialize: initialize,
finalize: finalize
}
const EVENT_TYPES = {
NEW_MULTI_MEDIA_POST: 10,
REPLY_TO_MULTI_MEDIA_POST: 11,
REPOST_MULTI_MEDIA: 12,
QUOTE_REPOST_MULTI_MEDIA: 13,
FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: 14,
UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: 15,
NEW_TRADE_POST: 20,
REPLY_TO_TRADE_POST: 21,
RE_POST_TRADE: 22,
QUOTE_REPOST_TRADE: 23,
FOLLOW_USER_PROFILE_TRADE_POSTS: 24,
UNFOLLOW_USER_PROFILE_TRADE_POSTS: 25,
NEW_USER_POST: 10,
REPLY_TO_USER_POST: 11,
REPOST_USER_POST: 12,
QUOTE_REPOST_USER_POST: 13,
FOLLOW_USER_PROFILE: 14,
UNFOLLOW_USER_PROFILE: 15,
NEW_BOT_POST: 20,
REPLY_TO_BOT_POST: 21,
REPOST_BOT_POST: 22,
QUOTE_REPOST_BOT_POST: 23,
FOLLOW_BOT_PROFILE: 24,
UNFOLLOW_BOT_PROFILE: 25,
ADD_BOT: 50,
REMOVE_BOT: 51,
ENABLE_BOT: 52,
DISABLE_BOT: 53,
ADD_REACTION_LIKE: 100,
ADD_REACTION_LOVE: 101,
ADD_REACTION_HAHA: 102,
@@ -31,6 +44,7 @@ exports.newEvent = function newEvent() {
ADD_REACTION_SAD: 104,
ADD_REACTION_ANGRY: 105,
ADD_REACTION_HUG: 106,
REMOVE_REACTION_LIKE: 200,
REMOVE_REACTION_LOVE: 201,
REMOVE_REACTION_HAHA: 202,
@@ -43,116 +57,124 @@ exports.newEvent = function newEvent() {
return thisObject
function finalize() {
thisObject.emitterUserProfile = undefined
thisObject.targetUserProfile = undefined
emitterUserProfile = undefined
targetUserProfile = undefined
}
function initialize(eventMessage) {
function initialize(eventReceived) {
/*
We expect here a JSON string with the following properties:
{
"eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"eventType": 10,
"emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"asset": "BTC",
"timestamp": 124234234234
}
Store the message properties into this object properties.
*/
let event = JSON.parse(eventMessage)
thisObject.emitterUserProfile = NT.memory.USER_PROFILES.get(event.emitterUserProfileId)
if (thisObject.emitterUserProfile === undefined) {
/* The message is ignored */
return
thisObject.eventId = eventReceived.eventId
thisObject.emitterUserProfileId = eventReceived.emitterUserProfileId
thisObject.targetUserProfileId = eventReceived.targetUserProfileId
thisObject.emitterBotProfileId = eventReceived.emitterBotProfileId
thisObject.targetBotProfileId = eventReceived.targetBotProfileId
thisObject.emitterPostHash = eventReceived.emitterPostHash
thisObject.targetPostHash = eventReceived.targetPostHash
thisObject.timestamp = eventReceived.timestamp
thisObject.botId = eventReceived.botId
thisObject.botAsset = eventReceived.botAsset
thisObject.botExchange = eventReceived.botExchange
/*
Validate Emitter User Profile.
*/
let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId)
if (emitterUserProfile === undefined) {
throw ('Emitter User Profile Not Found.')
}
thisObject.targetUserProfile = NT.memory.USER_PROFILES.get(event.targetUserProfileId)
if (thisObject.targetUserProfile === undefined) {
emitterUserProfile.emitterEventsCount++
/*
Validate Target User Profile.
*/
let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
if (targetUserProfile === undefined) {
/* We thow an exception when it does not have a target user profile and is required*/
if (
event.eventType !== EVENT_TYPES.NEW_MULTI_MEDIA_POST &&
event.eventType !== EVENT_TYPES.NEW_TRADE_POST
)
thisObject.eventType !== EVENT_TYPES.NEW_USER_POST &&
thisObject.eventType !== EVENT_TYPES.NEW_BOT_POST
) {
throw ('Target User Profile Not Found.')
}
} else {
targetUserProfile.targetEventsCount++
}
thisObject.eventId = event.eventId
thisObject.eventType = event.eventType
thisObject.asset = event.asset
thisObject.timestamp = event.timestamp
/*
Is is a new post?
*/
if (
event.eventType === EVENT_TYPES.NEW_MULTI_MEDIA_POST ||
event.eventType === EVENT_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
event.eventType === EVENT_TYPES.REPOST_MULTI_MEDIA ||
event.eventType === EVENT_TYPES.QUOTE_REPOST_MULTI_MEDIA ||
event.eventType === EVENT_TYPES.NEW_TRADE_POST ||
event.eventType === EVENT_TYPES.REPLY_TO_TRADE_POST ||
event.eventType === EVENT_TYPES.RE_POST_TRADE ||
event.eventType === EVENT_TYPES.QUOTE_REPOST_TRADE
thisObject.eventType === EVENT_TYPES.NEW_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.NEW_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST
) {
let post = NT.modules.POST.newPost()
post.initialize(
event.emitterPostHash,
event.targetPostHash,
thisObject.eventType,
thisObject.emitterUserProfile,
thisObject.asset,
thisObject.timestamp
)
if (
thisObject.eventType === EVENT_TYPES.NEW_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST
) {
emitterUserProfile.addPost(
thisObject.emitterUserProfileId,
thisObject.targetUserProfileId,
thisObject.emitterBotProfileId,
thisObject.targetBotProfileId,
thisObject.emitterPostHash,
thisObject.targetPostHash,
thisObject.eventType - 10,
thisObject.timestamp
)
}
return
}
/*
Is is a following?
*/
if (
event.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS ||
event.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS ||
event.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE_TRADE_POSTS ||
event.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE_TRADE_POSTS
thisObject.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE ||
thisObject.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE ||
thisObject.eventType === EVENT_TYPES.FOLLOW_BOT_PROFILE ||
thisObject.eventType === EVENT_TYPES.UNFOLLOW_BOT_PROFILE
) {
switch (event.eventType) {
case EVENT_TYPES.FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: {
thisObject.emitterUserProfile.addMultiMediaPostsFollowing(
thisObject.targetUserProfile
switch (thisObject.eventType) {
case EVENT_TYPES.FOLLOW_USER_PROFILE: {
emitterUserProfile.addFollowing(
targetUserProfile
)
thisObject.targetUserProfile.addMultiMediaPostsFollower(
thisObject.emitterUserProfile
targetUserProfile.addFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: {
thisObject.emitterUserProfile.removeMultiMediaPostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.UNFOLLOW_USER_PROFILE: {
emitterUserProfile.removeFollowing(
targetUserProfile
)
thisObject.targetUserProfile.removeMultiMediaPostsFollower(
thisObject.emitterUserProfile
targetUserProfile.removeFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.FOLLOW_USER_PROFILE_TRADE_POSTS: {
thisObject.emitterUserProfile.addTradePostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.FOLLOW_BOT_PROFILE: {
emitterUserProfile.addTradePostsFollowing(
targetUserProfile
)
thisObject.targetUserProfile.addTradePostsFollower(
thisObject.emitterUserProfile
targetUserProfile.addTradePostsFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.UNFOLLOW_USER_PROFILE_TRADE_POSTS: {
thisObject.emitterUserProfile.removeTradePostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: {
emitterUserProfile.removeTradePostsFollowing(
targetUserProfile
)
thisObject.targetUserProfile.removeTradePostsFollower(
thisObject.emitterUserProfile
targetUserProfile.removeTradePostsFollower(
emitterUserProfile
)
break
}
@@ -163,39 +185,78 @@ exports.newEvent = function newEvent() {
Is is a Reaction?
*/
if (
event.eventType === EVENT_TYPES.ADD_REACTION_LIKE ||
event.eventType === EVENT_TYPES.ADD_REACTION_LOVE ||
event.eventType === EVENT_TYPES.ADD_REACTION_HAHA ||
event.eventType === EVENT_TYPES.ADD_REACTION_WOW ||
event.eventType === EVENT_TYPES.ADD_REACTION_SAD ||
event.eventType === EVENT_TYPES.ADD_REACTION_ANGRY ||
event.eventType === EVENT_TYPES.ADD_REACTION_HUG
thisObject.eventType === EVENT_TYPES.ADD_REACTION_LIKE ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_LOVE ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_HAHA ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_WOW ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_SAD ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_ANGRY ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_HUG
) {
let targetPost = NT.memory.POSTS.get(event.targetPostHash)
let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found')
}
targetPost.addReaction(event.eventType - 100)
targetPost.addReaction(thisObject.eventType - 100)
return
}
if (
event.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_WOW ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_SAD ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY ||
event.eventType === EVENT_TYPES.REMOVE_REACTION_HUG
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_WOW ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_SAD ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HUG
) {
let targetPost = NT.memory.POSTS.get(event.targetPostHash)
let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found')
}
targetPost.removeReaction(event.eventType - 200)
targetPost.removeReaction(thisObject.eventType - 200)
return
}
/*
Is is a Bot?
*/
if (
thisObject.eventType === EVENT_TYPES.ADD_BOT ||
thisObject.eventType === EVENT_TYPES.REMOVE_BOT ||
thisObject.eventType === EVENT_TYPES.ENABLE_BOT ||
thisObject.eventType === EVENT_TYPES.DISABLE_BOT
) {
switch (thisObject.eventType) {
case EVENT_TYPES.ADD_BOT: {
emitterUserProfile.addBot(
thisObject.botId,
thisObject.botAsset,
thisObject.botExchange
)
break
}
case EVENT_TYPES.REMOVE_BOT: {
emitterUserProfile.removeBot(
thisObject.botId
)
break
}
case EVENT_TYPES.ENABLE_BOT: {
emitterUserProfile.enableBot(
thisObject.botId
)
break
}
case EVENT_TYPES.DISABLE_BOT: {
emitterUserProfile.disableBot(
thisObject.botId
)
break
}
}
return
}
}
-10
View File
@@ -1,10 +0,0 @@
{
"eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"eventType": 10,
"emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"asset": "BTC",
"timestamp": 124234234234,
"postHash": "dasdhqJKGdadjlasgjaGSHAJGSDjhagsg",
"postId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db"
}
-20
View File
@@ -1,20 +0,0 @@
{
"userProfiles": [
{
"username": "Luis-Fernando-Molina",
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"posts": [
{
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"replyTo": "a8de78f0-c3e4-4a2a-b7e8-f659073969db"
}
],
"replies": [
{
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"replyTo": "a8de78f0-c3e4-4a2a-b7e8-f659073969db"
}
]
}
]
}
-19
View File
@@ -1,19 +0,0 @@
global.NT = {
memory: {
USER_PROFILES: new Map(), // Here we will store the user profiles and their statistics.
POSTS: new Map(), // This are all the posts we are keeping track of.
EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once.
TIMELINE: [] // A time ordered list of Posts and Trades.
},
modules: {
EVENT: require('./event.js'),
POST: require('./post.js')
}
}
/*
We will add this event to the timeline
*/
NT.memory.TIMELINE.push()
+40 -33
View File
@@ -1,14 +1,17 @@
exports.newPost = function newPost() {
let thisObject = {
postHash: undefined,
emitterUserProfileId: undefined,
targetUserProfileId: undefined,
emitterBotProfileId: undefined,
targetBotProfileId: undefined,
emitterPostHash: undefined,
targetPostHash: undefined,
postType: undefined,
userProfile: undefined,
asset: undefined,
timestamp: undefined,
replies: undefined,
targetPost: undefined,
reactionsCount: undefined,
reactionTypesCount: undefined,
addReaction: addReaction,
removeReactions: removeReaction,
initialize: initialize,
@@ -16,14 +19,10 @@ exports.newPost = function newPost() {
}
const POST_TYPES = {
NEW_MULTI_MEDIA_POST: 10,
REPLY_TO_MULTI_MEDIA_POST: 11,
REPOST_MULTI_MEDIA: 12,
QUOTE_REPOST_MULTI_MEDIA: 13,
NEW_TRADE_POST: 20,
REPLY_TO_TRADE_POST: 21,
RE_POST_TRADE: 22,
QUOTE_REPOST_TRADE: 23
NEW_POST: 0,
REPLY_TO_POST: 1,
REPOST_: 2,
QUOTE_REPOST_: 3
}
const REACTION_TYPES = {
@@ -36,6 +35,8 @@ exports.newPost = function newPost() {
REACTION_HUG: 6
}
thisObject.reactionTypesCount = 7
thisObject.reactionsCount = new Map()
thisObject.reactionsCount.set(REACTION_TYPES.REACTION_LIKE, 0)
thisObject.reactionsCount.set(REACTION_TYPES.REACTION_LOVE, 0)
@@ -48,44 +49,51 @@ exports.newPost = function newPost() {
return thisObject
function finalize() {
thisObject.postHash = undefined
thisObject.emitterUserProfileId = undefined
thisObject.targetUserProfileId = undefined
thisObject.emitterBotProfileId = undefined
thisObject.targetBotProfileId = undefined
thisObject.emitterPostHash = undefined
thisObject.targetPostHash = undefined
thisObject.postType = undefined
thisObject.userProfile = undefined
thisObject.asset = undefined
thisObject.timestamp = undefined
thisObject.replies = undefined
thisObject.targetPost = undefined
}
function initialize(
emitterUserProfileId,
targetUserProfileId,
emitterBotProfileId,
targetBotProfileId,
emitterPostHash,
targetPostHash,
postType,
userProfile,
asset,
timestamp
) {
thisObject.emitterUserProfileId = emitterUserProfileId
thisObject.targetUserProfileId = targetUserProfileId
thisObject.emitterBotProfileId = emitterBotProfileId
thisObject.targetBotProfileId = targetBotProfileId
thisObject.emitterPostHash = emitterPostHash
thisObject.targetPostHash = targetPostHash
thisObject.postType = postType
thisObject.userProfile = userProfile
thisObject.asset = asset
thisObject.timestamp = timestamp
thisObject.replies = []
/*
Let's find the Target Post
*/
if (
event.eventType === POST_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
event.eventType === POST_TYPES.REPOST_MULTI_MEDIA ||
event.eventType === POST_TYPES.QUOTE_REPOST_MULTI_MEDIA ||
event.eventType === POST_TYPES.REPLY_TO_TRADE_POST ||
event.eventType === POST_TYPES.RE_POST_TRADE ||
event.eventType === POST_TYPES.QUOTE_REPOST_TRADE
) {
thisObject.targetPost = NT.memory.POSTS.get(thisObject.targetPostHash)
let targetPost
if (thisObject.targetPost === undefined) {
if (
thisObject.postType === POST_TYPES.REPLY_TO_POST ||
thisObject.postType === POST_TYPES.REPOST_ ||
thisObject.postType === POST_TYPES.QUOTE_REPOST_
) {
targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found.')
}
}
@@ -93,10 +101,9 @@ exports.newPost = function newPost() {
Let's add this post to the replies of the Target Post
*/
if (
event.eventType === POST_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
event.eventType === POST_TYPES.REPLY_TO_TRADE_POST
thisObject.postType === POST_TYPES.REPLY_TO_POST
) {
thisObject.targetPost.replies.push(thisObject)
targetPost.replies.push(thisObject)
}
}
-22
View File
@@ -1,22 +0,0 @@
[
{
"userProfile": "Luis-Fernando-Molina",
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"followers": 0,
"following": 0,
"ranking": 0,
"joined": 123423423423,
"account": "asd23123aff23q2bcaa21447567"
},
{
"userProfile": "Luis-Fernando-Molina",
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"followers": 0,
"following": 0,
"ranking": 0,
"joined": 123423423423,
"account": "asd23123aff23q2bcaa21447567"
}
]
// a map by userProfile would be needed.
-27
View File
@@ -1,27 +0,0 @@
[
{
"type": "post",
"timestamp": 12343242342,
"userProfile": "Luis-Fernando-Molina",
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
},
{
"type": "post",
"timestamp": 12343242342,
"userProfile": "Luis-Fernando-Molina",
"hash": "dhaHSkjasdmwhdajSHSJhewshed",
"relatedEvent": "daawerewdhkasdSdGHGjdsasd"
},
{
"type": "trade",
"timestamp": 12343242342,
"userProfile": "Luis-Fernando-Molina",
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
},
{
"type": "post",
"timestamp": 12343242342,
"userProfile": "Luis-Fernando-Molina",
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
}
]
+145 -67
View File
@@ -2,28 +2,29 @@ exports.newUserProfile = function newUserProfile() {
let thisObject = {
userProfieId: undefined,
githubUsername: undefined,
userProfileHandle: undefined,
blockchainAccount: undefined,
multiMediaPostsFollowing: undefined,
multiMediaPostsFollowers: undefined,
tradePostsFollowing: undefined,
tradePostsFollowers: undefined,
ranking: undefined,
events: undefined,
multiMediaPostFollowingCount: undefined,
multiMediaPostFollowersCount: undefined,
tradePostsFollowingCount: undefined,
tradePostsFollowersCount: undefined,
eventsCount: undefined,
following: undefined,
followers: undefined,
followingCount: undefined,
followersCount: undefined,
emitterEventsCount: undefined,
targetEventsCount: undefined,
postsCount: undefined,
addMultiMediaPostsFollowing: addMultiMediaPostsFollowing,
removeMultiMediaPostsFollowing: removeMultiMediaPostsFollowing,
addTradePostsFollowing: addTradePostsFollowing,
removeTradePostsFollowing: removeTradePostsFollowing,
addMultiMediaPostsFollower: addMultiMediaPostsFollower,
removeMultiMediaPostsFollower: removeMultiMediaPostsFollower,
addTradePostsFollower: addTradePostsFollower,
removeTradePostsFollower: removeTradePostsFollower,
botsCount: undefined,
bots: undefined,
posts: undefined,
addPost: addPost,
removePost: removePost,
addFollowing: addFollowing,
removeFollowing: removeFollowing,
addFollower: addFollower,
removeFollower: removeFollower,
addBot: addBot,
removeBot: removeBot,
enableBot: enableBot,
disableBot: disableBot,
initialize: initialize,
finalize: finalize
}
@@ -31,97 +32,174 @@ exports.newUserProfile = function newUserProfile() {
return thisObject
function finalize() {
thisObject.following = undefined
thisObject.followers = undefined
thisObject.posts = undefined
thisObject.bots = undefined
}
function initialize() {
thisObject.multiMediaPostsFollowing = new Map()
thisObject.multiMediaPostsFollowers = new Map()
thisObject.following = new Map()
thisObject.followers = new Map()
thisObject.tradePostsFollowing = new Map()
thisObject.tradePostsFollowers = new Map()
thisObject.followingCount = 0
thisObject.followersCount = 0
thisObject.events = [] // Dont know what this is
thisObject.multiMediaPostFollowingCount = 0
thisObject.multiMediaPostFollowersCount = 0
thisObject.tradePostsFollowingCount = 0
thisObject.tradePostsFollowersCount = 0
thisObject.eventsCount = 0
thisObject.emitterEventsCount = 0
thisObject.targetEventsCount = 0
thisObject.postsCount = 0
thisObject.botsCount = 0
thisObject.posts = []
thisObject.bots = []
}
function addMultiMediaPostsFollowing(
function addPost(
emitterUserProfileId,
targetUserProfileId,
emitterPostHash,
targetPostHash,
postType,
userProfile,
timestamp
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
}
let post = NT.modules.POST.newPost()
post.initialize(
emitterUserProfileId,
targetUserProfileId,
undefined,
undefined,
emitterPostHash,
targetPostHash,
postType,
userProfile,
timestamp
)
thisObject.maps.POSTS.push(post)
NT.memory.maps.POSTS.set(emitterPostHash, post)
thisObject.postsCount++
}
function removePost(
emitterPostHash
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) {
throw ('Post Does Not Exist.')
}
let post = thisObject.posts.get(emitterPostHash)
post.finalize()
for (let i = thisObject.posts.length - 1; i >= 0; i--) {
if (thisObject.posts[i].emitterPostHash === emitterPostHash) {
thisObject.posts.splice(i, 1)
break
}
}
NT.memory.maps.POSTS.delete(emitterPostHash)
thisObject.postsCount--
}
function addFollowing(
userProfile
) {
if (thisObject.multiMediaPostsFollowing.get(userProfile.id) === undefined) {
thisObject.multiMediaPostsFollowing.set(userProfile.id, userProfile)
thisObject.multiMediaPostFollowingCount++
if (thisObject.following.get(userProfile.id) === undefined) {
thisObject.following.set(userProfile.id, userProfile)
thisObject.followingCount++
}
}
function removeMultiMediaPostsFollowing(
function removeFollowing(
userProfile
) {
if (thisObject.multiMediaPostsFollowing.get(userProfile.id) !== undefined) {
thisObject.multiMediaPostsFollowing.delete(userProfile.id)
thisObject.multiMediaPostFollowingCount--
if (thisObject.following.get(userProfile.id) !== undefined) {
thisObject.following.delete(userProfile.id)
thisObject.followingCount--
}
}
function addTradePostsFollowing(
function addFollower(
userProfile
) {
if (thisObject.tradePostsFollowingCount.get(userProfile.id) === undefined) {
thisObject.tradePostsFollowingCount.set(userProfile.id, userProfile)
thisObject.tradePostsFollowingCount++
if (thisObject.followers.get(userProfile.id) === undefined) {
thisObject.followers.set(userProfile.id, userProfile)
thisObject.followersCount++
}
}
function removeTradePostsFollowing(
function removeFollower(
userProfile
) {
if (thisObject.tradePostsFollowingCount.get(userProfile.id) !== undefined) {
thisObject.tradePostsFollowingCount.delete(userProfile.id)
thisObject.tradePostsFollowingCount--
if (thisObject.followers.get(userProfile.id) !== undefined) {
thisObject.followers.delete(userProfile.id)
thisObject.followersCount--
}
}
function addMultiMediaPostsFollower(
userProfile
function addBot(
botId,
botAsset,
botExchange
) {
if (thisObject.multiMediaPostsFollowers.get(userProfile.id) === undefined) {
thisObject.multiMediaPostsFollowers.set(userProfile.id, userProfile)
thisObject.multiMediaPostFollowersCount++
if (thisObject.bots.get(botId) !== undefined) {
throw ('Bot Already Exists.')
}
let bot = NT.modules.BOTS.newBot()
bot.initialize(
botId,
botAsset,
botExchange
)
thisObject.bots.set(botId, bot)
thisObject.botsCount++
}
function removeMultiMediaPostsFollower(
userProfile
function removeBot(
botId
) {
if (thisObject.multiMediaPostsFollowers.get(userProfile.id) !== undefined) {
thisObject.multiMediaPostsFollowers.delete(userProfile.id)
thisObject.multiMediaPostFollowersCount--
if (thisObject.bots.get(botId) === undefined) {
throw ('Bot Does Not Exist.')
}
thisObject.bots.get(botId).finalize()
thisObject.bots.delete(botId)
thisObject.botsCount--
}
function addTradePostsFollower(
userProfile
function enableBot(
botId
) {
if (thisObject.tradePostsFollowers.get(userProfile.id) === undefined) {
thisObject.tradePostsFollowers.set(userProfile.id, userProfile)
thisObject.tradePostsFollowersCount++
let bot = thisObject.bots.get(botId)
if (bot === undefined) {
throw ('Bot Does Not Exist.')
}
if (bot.enabled === true) {
throw ('Bot Already Enabled.')
}
bot.enabled = true
}
function removeTradePostsFollower(
userProfile
function disableBot(
botId
) {
if (thisObject.tradePostsFollowers.get(userProfile.id) !== undefined) {
thisObject.tradePostsFollowers.delete(userProfile.id)
thisObject.tradePostsFollowersCount--
let bot = thisObject.bots.get(botId)
if (bot === undefined) {
throw ('Bot Does Not Exist.')
}
if (bot.enabled === false) {
throw ('Bot Already Disabled.')
}
bot.enabled = false
}
}
@@ -150,7 +150,7 @@
"communityBuildingPrograms": {
"type": "Community Building Programs",
"name": "New Community Building Programs",
"config": "{}",
"config": "{\n \"percentage\": 0\n}",
"project": "Governance",
"referralProgram": {
"type": "Referral Program",
@@ -539,7 +539,7 @@
"votesAndClaimsPrograms": {
"type": "Votes And Claims Programs",
"name": "New Votes And Claims Programs",
"config": "{\n \"percentage\": 50\n}",
"config": "{\n \"percentage\": 30\n}",
"project": "Governance",
"votingProgram": {
"type": "Voting Program",
@@ -12078,7 +12078,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -12435,7 +12435,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -12471,7 +12471,7 @@
"financialPrograms": {
"type": "Financial Programs",
"name": "New Financial Programs",
"config": "{\n \"percentage\": 30\n}",
"config": "{\n \"percentage\": 70\n}",
"project": "Governance",
"stakingProgram": {
"type": "Staking Program",
@@ -12543,7 +12543,7 @@
{
"type": "Delegate Power Switch",
"name": "Phill",
"config": "{\n \"percentage\": 30\n}",
"config": "{\n \"percentage\": 35\n}",
"project": "Governance",
"delegatePowerSwitch": [],
"userDelegates": [
@@ -12759,7 +12759,7 @@
{
"type": "Delegate Power Switch",
"name": "Carl",
"config": "{\n \"percentage\": 5\n}",
"config": "{\n \"percentage\": 0\n}",
"project": "Governance",
"delegatePowerSwitch": [],
"userDelegates": [
@@ -12797,7 +12797,9 @@
"referenceParentCombinedNodePath": [
[
"cozed-gh",
"User Profile"
"User Profile",
"Governance",
"07f0b13a-a50f-4488-8a2c-a3f8f08e889d"
]
]
}
@@ -13162,7 +13164,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -382,7 +382,7 @@
"floatingObject": {
"isPinned": true,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1667,7 +1667,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Charting Space",
@@ -1689,12 +1689,12 @@
"id": "fb31f94d-8c05-4c1a-89b7-92d48946ad9e",
"savedPayload": {
"position": {
"x": 19972,
"y": 30934.25
"x": 17027,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -1708,7 +1708,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1726,12 +1726,12 @@
"id": "33321959-1eb0-494c-8df3-94b1e47efdb3",
"savedPayload": {
"position": {
"x": 20159.74486052001,
"y": 31154.339995635255
"x": 20180.438536534504,
"y": 31099.451694843894
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1745,7 +1745,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Workspace",
@@ -1762,12 +1762,12 @@
"id": "a13ac48c-5743-4794-85bd-bf0794d9e1a2",
"savedPayload": {
"position": {
"x": 20110.41891667401,
"y": 31333.068539176038
"x": 20151.433991612474,
"y": 31282.579184277827
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1781,7 +1781,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1793,12 +1793,12 @@
"id": "d9b824fd-a201-40b8-8a60-d0c516d9634b",
"savedPayload": {
"position": {
"x": 19965.459387782023,
"y": 31448.66990593233
"x": 20020.329184277827,
"y": 31413.683991612474
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1812,7 +1812,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Crypto Exchange",
@@ -1849,12 +1849,12 @@
"id": "a0d50140-b862-4b7e-9bc6-ed055b34a0bd",
"savedPayload": {
"position": {
"x": 19780.235886887614,
"y": 31456.988302949165
"x": 19837.201694843894,
"y": 31442.688536534504
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1868,7 +1868,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Market",
@@ -1914,12 +1914,12 @@
"id": "eca95394-e23c-4464-a0a2-955e45fd9ca5",
"savedPayload": {
"position": {
"x": 19884.132034355964,
"y": 31146.382034355964
"x": 16939.132034355964,
"y": 31134.382034355964
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -1933,7 +1933,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1951,12 +1951,12 @@
"id": "df575afd-af40-4725-a9a0-d0e3bdd64572",
"savedPayload": {
"position": {
"x": 19695.670272136376,
"y": 31514.40021539039
"x": 19822,
"y": 31494.057621135333
},
"targetPosition": {
"x": 19607.243719813105,
"y": 31227.728373654547
"x": 19672,
"y": 31234.25
},
"floatingObject": {
"isPinned": false,
@@ -1970,7 +1970,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Charting Space",
@@ -1995,12 +1995,12 @@
"id": "1a414df9-32fa-4055-b0db-7a932e4b59e1",
"savedPayload": {
"position": {
"x": 19403.19189848183,
"y": 31447.643935203494
"x": 19522,
"y": 31494.057621135333
},
"targetPosition": {
"x": 19607.243719813105,
"y": 31227.728373654547
"x": 19672,
"y": 31234.25
},
"floatingObject": {
"isPinned": false,
@@ -2014,7 +2014,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2023,12 +2023,12 @@
"id": "47f47947-70a9-48a6-88d0-bd3dae2be578",
"savedPayload": {
"position": {
"x": 19672,
"y": 31234.25
"x": 16727,
"y": 31222.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2042,7 +2042,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2079,7 +2079,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Governance Project",
@@ -2123,7 +2123,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2154,7 +2154,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Time Machine",
@@ -2194,12 +2194,12 @@
"id": "1b7b5af2-bb52-4090-965e-cd457b2e229c",
"savedPayload": {
"position": {
"x": 19459.867965644036,
"y": 31146.382034355964
"x": 16514.867965644036,
"y": 31134.382034355964
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2213,7 +2213,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2250,7 +2250,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Tutorial",
@@ -2294,7 +2294,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2325,7 +2325,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2334,12 +2334,12 @@
"id": "9aaa02f8-73ec-4c89-b1ec-85d4114c5a93",
"savedPayload": {
"position": {
"x": 19372,
"y": 30934.25
"x": 16427,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2353,7 +2353,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2390,7 +2390,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2421,7 +2421,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2452,7 +2452,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2461,12 +2461,12 @@
"id": "ba99b336-1578-4a76-99f0-24e461922b4c",
"savedPayload": {
"position": {
"x": 19459.867965644036,
"y": 30722.117965644036
"x": 16514.867965644036,
"y": 30710.117965644036
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2480,7 +2480,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2517,7 +2517,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2548,14 +2548,14 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "GitHub Glory",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub Glory\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub Glory\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e580ebc9-097b-46d6-bb6d-145621548377",
"savedPayload": {
@@ -2578,9 +2578,7 @@
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
"tutorial": {}
}
}
],
@@ -2588,139 +2586,12 @@
"id": "578fdee3-64ad-4836-8feb-3e41746bceda",
"savedPayload": {
"position": {
"x": 19672,
"y": 30634.25
"x": 16727,
"y": 30622.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Topic",
"name": "Submit Profile",
"config": "{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Make it Official",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Make it Official\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n }\n }\n}",
"project": "Education",
"id": "fe74b3ae-9490-465a-a491-db4b0834dbf7",
"savedPayload": {
"position": {
"x": 19885.132034355964,
"y": 30421.117965644036
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Step",
"name": "Infinity and Beyond",
"config": "{\n \"icon\": {\n \"name\": \"User\\\\user-profile\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - To Infinity and Beyond\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e4c5a34f-67c4-4fdc-8c11-aef5bde92d72",
"savedPayload": {
"position": {
"x": 20097.264068711927,
"y": 30508.985931288073
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Step",
"name": "Welcome aboard!",
"config": "{\n \"icon\": {\n \"name\": \"Announcement\\\\announcement\",\n \"project\": \"Foundations\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome aboard!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "340f9107-9b4a-424b-94f2-79d65873c572",
"savedPayload": {
"position": {
"x": 20185.132034355964,
"y": 30721.117965644036
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
}
],
"tutorialTopics": [],
"id": "75373f58-ac05-4358-ad12-e50c88f08196",
"savedPayload": {
"position": {
"x": 19884.132034355964,
"y": 30722.117965644036
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2734,7 +2605,156 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
{
"type": "Tutorial Topic",
"name": "Submit Profile",
"config": "{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Make it Official",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Make it Official\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n }\n },\n \"positionAtReferenceParent\": true\n}",
"project": "Education",
"id": "fe74b3ae-9490-465a-a491-db4b0834dbf7",
"savedPayload": {
"position": {
"x": 16939.132034355964,
"y": 30410.117965644036
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {},
"referenceParent": {
"type": "Github API",
"name": "New Github API",
"id": "cbbb57f9-a9a0-4148-89a5-f820f40f56d3"
},
"referenceParentCombinedNodePath": [
[
"New APIs",
"APIs"
],
[
"New Github API",
"Github API"
]
]
}
},
{
"type": "Tutorial Step",
"name": "Infinity and Beyond",
"config": "{\n \"icon\": {\n \"name\": \"User\\\\user-profile\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - To Infinity and Beyond\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e4c5a34f-67c4-4fdc-8c11-aef5bde92d72",
"savedPayload": {
"position": {
"x": 17151.264068711927,
"y": 30497.985931288073
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Welcome aboard!",
"config": "{\n \"icon\": {\n \"name\": \"Announcement\\\\announcement\",\n \"project\": \"Foundations\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome aboard!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}",
"project": "Education",
"id": "340f9107-9b4a-424b-94f2-79d65873c572",
"savedPayload": {
"position": {
"x": 17239.132034355964,
"y": 30710.117965644036
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {},
"referenceParent": {
"type": "Tutorial",
"name": "Governance Program Walk Through Tutorial",
"id": "eb85fbbd-080f-41c6-91a8-c6b68195a74b"
},
"referenceParentCombinedNodePath": [
[
"Governance Program Walk Through Tutorial",
"Tutorial"
]
]
}
}
],
"tutorialTopics": [],
"id": "75373f58-ac05-4358-ad12-e50c88f08196",
"savedPayload": {
"position": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"targetPosition": {
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
@@ -2742,12 +2762,12 @@
"id": "57e388d1-f479-4a16-af85-aee12be285a0",
"savedPayload": {
"position": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2766,30 +2786,256 @@
}
}
},
null,
{
"type": "APIs",
"name": "New APIs",
"project": "Foundations",
"id": "d9d1ab81-0cf6-4269-b4f1-ffe20566f239",
"type": "Tutorial",
"name": "Governance Program Walk Through Tutorial",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\financial-programs\",\n \"project\": \"Governance\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Into the Thick of It\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Refer a Friend",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\referral-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Refer a Friend\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Referral Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "a3df7ac4-69e0-41b9-af1c-fd0087d26161",
"savedPayload": {
"position": {
"x": 21016,
"y": 30930.750000000004
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "A Thank You for Support",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\support-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Thank You for Support\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Support Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "dc20ebdc-6708-4fed-a75b-bade62d3ce0c",
"savedPayload": {
"position": {
"x": 20903.04694055762,
"y": 31165.299444740413
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Find a Mentor",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\mentorship-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Find a Mentor\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Mentorship Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "258b83f3-200d-41d7-8288-81eec5da0ccf",
"savedPayload": {
"position": {
"x": 20649.243719813105,
"y": 31223.22837365455
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Claim some Contributions",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\claims-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Claim some Contributions\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Contribution Claims Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "7301eace-be0a-45f8-9f8d-14afb7e9336a",
"savedPayload": {
"position": {
"x": 20445.709339629273,
"y": 31060.91512173527
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Lend a Vote",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\voting-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Lend a Vote\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Voting Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "61b34c29-85ce-4b86-8a77-21f8e8888c35",
"savedPayload": {
"position": {
"x": 20445.709339629273,
"y": 30800.584878264737
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Delegate some Power",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\delegation-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Delegate some Power\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Delegation Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "bb0b161f-af82-4b93-87a8-30ae6ace533c",
"savedPayload": {
"position": {
"x": 20649.243719813105,
"y": 30638.271626345457
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Stake some Tokens",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\staking-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Stake some Tokens\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Staking Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "507fc893-7a06-4bba-ba23-fb7125aa2017",
"savedPayload": {
"position": {
"x": 20903.04694055762,
"y": 30696.200555259595
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
],
"tutorialTopics": [],
"id": "eb85fbbd-080f-41c6-91a8-c6b68195a74b",
"savedPayload": {
"position": {
"x": 30283.083333333336,
"y": 10760.951150794494
"x": 20716,
"y": 30930.750000000004
},
"targetPosition": {
"x": 30283.083333333336,
"y": 10760.951150794494
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
"arrangementStyle": 1
},
"uiObject": {
"isPlaying": false,
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
@@ -17,9 +17,9 @@
"updated": 1629984765258
},
{
"style": "List",
"text": "You will find guides to do that here: Building Your Profile",
"updated": 1629585521857
"style": "Note",
"text": "You will find guides for how to do this under the Building Your Profile topic in the docs.",
"updated": 1630009326066
},
{
"style": "Text",
@@ -0,0 +1,14 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 1,
"type": "Into the Thick of It",
"definition": {
"text": "Write a summary for this tutorial page."
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository."
}
]
}
@@ -0,0 +1,30 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 2,
"type": "Tutorial Step - Into the Thick of It",
"definition": {
"text": "Now that you have a working profile, it's time to dive into the real governance of Superalgos!",
"updated": 1630009993777,
"icon": {
"name": "Programs\\financial-programs",
"project": "Governance"
}
},
"paragraphs": [
{
"style": "Text",
"text": "I will walk you through all the main programs and help you get aquainted with the way they work. ",
"updated": 1630010162848
},
{
"style": "Success",
"text": "The Governance system is a living part of our collaboration so there will always be something new to check out! ",
"updated": 1630010228910
},
{
"style": "Text",
"text": "Each program aims to foster valuable types of user interaction and contribution from mentoring new users to contributing code. So let's dive in!",
"updated": 1630010267953
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 3,
"type": "Tutorial Step - Refer a Friend",
"definition": {
"text": "Helping people you know find Superalgos is an important way to speed the mass adoption of Superalgos!",
"icon": {
"name": "Programs\\referral-program",
"project": "Governance"
},
"updated": 1630011972702
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011916068
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 4,
"type": "Tutorial Step - A Thank You for Support",
"definition": {
"text": "Superalgos support is given by other Superalgos users just like you. This program lets you tell them Thank You!",
"icon": {
"name": "Programs\\support-program",
"project": "Governance"
},
"updated": 1630012220466
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011987218
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 5,
"type": "Tutorial Step - Find a Mentor",
"definition": {
"text": "Mentoring users is an important part of strengthening the community!",
"icon": {
"name": "Programs\\mentorship-program",
"project": "Governance"
},
"updated": 1630012185029
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011996028
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 6,
"type": "Tutorial Step - Claim some Contributions",
"definition": {
"text": "You are in charge of claiming the work you have put in to Superalgos.",
"icon": {
"name": "Programs\\claims-program",
"project": "Governance"
},
"updated": 1630012157111
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012004228
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 7,
"type": "Tutorial Step - Lend a Vote",
"definition": {
"text": "Each user helps decide how tokens will distributed.",
"icon": {
"name": "Programs\\voting-program",
"project": "Governance"
},
"updated": 1630012134952
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012013221
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 8,
"type": "Tutorial Step - Delegate some Power",
"definition": {
"text": "Helping new users join in governance is the ultimate act of open collaboration!",
"icon": {
"name": "Programs\\delegation-program",
"project": "Governance"
},
"updated": 1630012095620
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012020882
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 9,
"type": "Tutorial Step - Stake some Tokens",
"definition": {
"text": "If you want to put some tokens to work without doing anything you can simply stake them.",
"icon": {
"name": "Programs\\staking-program",
"project": "Governance"
},
"updated": 1630012064453
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012030833
}
]
}
+2
View File
@@ -33,7 +33,9 @@ let nodeModulesDirs = [
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Announcements"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Low-Frequency-Trading", "APIs"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Task-Modules"),
/* Aug-27-21 - TensorFlow dependency integration undergoing modifications. Should be resolved within a day or two:
path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")
*/
];
console.log('');