Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop
This commit is contained in:
commit
daf931a5c1
100 files changed
+58654
-20355
No files matched your search
@@ -0,0 +1,81 @@
|
||||
const express = require("./backend/src/index");
|
||||
exports.newDesktopApp = function newDesktopApp() {
|
||||
|
||||
let thisObject = {
|
||||
userProfiles: undefined,
|
||||
p2pNetworkClient: undefined,
|
||||
p2pNetwork: undefined,
|
||||
p2pNetworkPeers: undefined,
|
||||
webSocketsInterface: undefined,
|
||||
webAppInterface: undefined,
|
||||
p2pNetworkInterface: undefined,
|
||||
socialGraph: undefined,
|
||||
run: run
|
||||
}
|
||||
|
||||
DK.desktopApp = thisObject
|
||||
|
||||
return thisObject
|
||||
|
||||
async function run() {
|
||||
|
||||
await setupNetwork()
|
||||
await setupServices()
|
||||
|
||||
async function setupNetwork() {
|
||||
/*
|
||||
We set up ourselves as a Network Client.
|
||||
*/
|
||||
thisObject.p2pNetworkClient = SA.projects.network.modules.p2pNetworkClient.newNetworkModulesP2PNetworkClient()
|
||||
await thisObject.p2pNetworkClient.initialize()
|
||||
/*
|
||||
We will read all user profiles plugins and get from there our network identity.
|
||||
*/
|
||||
thisObject.userProfiles = SA.projects.network.modules.userProfiles.newNetworkModulesUserProfiles()
|
||||
await thisObject.userProfiles.initialize(global.env.DESKTOP_APP_SIGNING_ACCOUNT, thisObject.p2pNetworkClient)
|
||||
/*
|
||||
We set up the P2P Network.
|
||||
*/
|
||||
thisObject.p2pNetwork = SA.projects.network.modules.p2pNetwork.newNetworkModulesP2PNetwork()
|
||||
await thisObject.p2pNetwork.initialize('Network Client')
|
||||
/*
|
||||
Set up the connections to network nodes.
|
||||
*/
|
||||
thisObject.p2pNetworkPeers = SA.projects.network.modules.p2pNetworkPeers.newNetworkModulesP2PNetworkPeers()
|
||||
await thisObject.p2pNetworkPeers.initialize(
|
||||
'Network Client',
|
||||
thisObject.p2pNetworkClient,
|
||||
thisObject.p2pNetwork,
|
||||
global.env.DESKTOP_APP_MAX_OUTGOING_PEERS
|
||||
)
|
||||
}
|
||||
|
||||
async function setupServices() {
|
||||
/*
|
||||
This is where we will process all the messages comming from our web app.
|
||||
*/
|
||||
thisObject.webAppInterface = DK.projects.socialTrading.modules.webAppInterface.newSocialTradingModulesWebAppInterface() // this sends events to the p2p network
|
||||
/*
|
||||
This is where we will process all the events comming from the p2p network.
|
||||
*/
|
||||
thisObject.p2pNetworkInterface = DK.projects.socialTrading.modules.p2pNetworkInterface.newSocialTradingModulesP2PNetworkInterface() // this receives events from p2p network
|
||||
/*
|
||||
This is the Personal Social Graph for the user running this App.
|
||||
*/
|
||||
thisObject.socialGraph = DK.projects.socialTrading.modules.socialGraph.newSocialTradingModulesSocialGraph() //
|
||||
await thisObject.socialGraph.initialize()
|
||||
|
||||
|
||||
let express = require('./backend/src/index')
|
||||
let expressPort = JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort;
|
||||
express.startExpress(expressPort,SA);
|
||||
console.log('express Interface ................................................ Listening at port ' + expressPort);
|
||||
|
||||
/*TODO change this to have a definite port number*/
|
||||
let react = require('./frontend/scripts/start')
|
||||
let reactPort = (+JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort + 1);
|
||||
react.start(reactPort);
|
||||
console.log('react Interface ................................................ Listening at port ' + reactPort);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
function newWebApp() {
|
||||
/*
|
||||
In it's current state of development, the Web App only has one module.
|
||||
|
||||
Everything is being coded here until some structure emerges.
|
||||
*/
|
||||
let thisObject = {
|
||||
messageReceived: messageReceived,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
async function initialize() {
|
||||
try {
|
||||
setupRootObject(UI, 'UI')
|
||||
setupRootObject(SA, 'SA')
|
||||
await UI.projects.socialTrading.modules.webSocketsWebAppClient.initialize()
|
||||
loadWUserProfileTimeline()
|
||||
loadWhoToFollow()
|
||||
setupEventHandlers()
|
||||
} catch (err) {
|
||||
console.log('[ERROR] initialize -> err.stack = ' + err.stack)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function setupRootObject(rootObject, rootObjectName) {
|
||||
/!*
|
||||
Here we will setup the UI object, with all the
|
||||
projects and spaces.
|
||||
*!/
|
||||
for (let i = 0; i < UI.schemas.projectSchema.length; i++) {
|
||||
let projectDefinition = UI.schemas.projectSchema[i]
|
||||
rootObject.projects[projectDefinition.propertyName] = {}
|
||||
let projectInstance = rootObject.projects[projectDefinition.propertyName]
|
||||
|
||||
projectInstance.utilities = {}
|
||||
projectInstance.globals = {}
|
||||
projectInstance.functionLibraries = {}
|
||||
projectInstance.modules = {}
|
||||
|
||||
if (projectDefinition[rootObjectName] === undefined) {
|
||||
continue
|
||||
}
|
||||
|
||||
/!* Set up Globals of this Project *!/
|
||||
if (projectDefinition[rootObjectName].globals !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].globals.length; j++) {
|
||||
let globalDefinition = projectDefinition[rootObjectName].globals[j]
|
||||
|
||||
if (exports[globalDefinition.functionName] === undefined) {
|
||||
projectInstance.globals[globalDefinition.propertyName] = eval(globalDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.globals[globalDefinition.propertyName] = eval('exports.' + globalDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/!* Set up Utilities of this Project *!/
|
||||
if (projectDefinition[rootObjectName].utilities !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].utilities.length; j++) {
|
||||
let utilityDefinition = projectDefinition[rootObjectName].utilities[j]
|
||||
|
||||
if (exports[utilityDefinition.functionName] === undefined) {
|
||||
projectInstance.utilities[utilityDefinition.propertyName] = eval(utilityDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.utilities[utilityDefinition.propertyName] = eval('exports.' + utilityDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/!* Set up Function Libraries of this Project *!/
|
||||
if (projectDefinition[rootObjectName].functionLibraries !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].functionLibraries.length; j++) {
|
||||
let functionLibraryDefinition = projectDefinition[rootObjectName].functionLibraries[j]
|
||||
|
||||
if (exports[functionLibraryDefinition.functionName] === undefined) {
|
||||
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/!* Set up Modules of this Project *!/
|
||||
if (projectDefinition[rootObjectName].modules !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].modules.length; j++) {
|
||||
let functionLibraryDefinition = projectDefinition[rootObjectName].modules[j]
|
||||
|
||||
if (exports[functionLibraryDefinition.functionName] === undefined) {
|
||||
projectInstance.modules[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.modules[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
async function loadWUserProfileTimeline() {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.EVENTS,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_LAST,
|
||||
amountRequested: 100,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_PAST
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage(
|
||||
JSON.stringify(query)
|
||||
)
|
||||
.then(console.log)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Query not executed. ' + errorMessage)
|
||||
console.log('[ERROR] query = ' + JSON.stringify(query))
|
||||
}
|
||||
|
||||
function addToContentDiv(events) {
|
||||
try {
|
||||
let contentDiv = document.getElementById('content-div')
|
||||
/!*
|
||||
Delete al current content.
|
||||
*!/
|
||||
while (contentDiv.childNodes.length > 4) {
|
||||
let childToRemove = contentDiv.childNodes[contentDiv.childNodes.length - 1]
|
||||
contentDiv.removeChild(childToRemove)
|
||||
}
|
||||
/!*
|
||||
Render the timeline.
|
||||
*!/
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
let event = events[i]
|
||||
|
||||
let postDiv = document.createElement("div")
|
||||
postDiv.setAttribute("class", "post-div")
|
||||
let textNode
|
||||
|
||||
switch (event.eventType) {
|
||||
case SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " POSTED " + event.postText)
|
||||
break
|
||||
}
|
||||
case SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " FOLLOWED " + event.targetUserProfile.userProfileHandle)
|
||||
break
|
||||
}
|
||||
case SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " UNFOLLOWED " + event.targetUserProfile.userProfileHandle)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
postDiv.appendChild(textNode)
|
||||
contentDiv.appendChild(postDiv)
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log('[ERROR] err.stack = ' + err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
async function loadWhoToFollow() {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.UNFOLLOWED_USER_PROFILES,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST,
|
||||
amountRequested: 3,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_UP
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage(
|
||||
JSON.stringify(query)
|
||||
)
|
||||
.then(addWhoToFollowTable)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Query not executed. ' + errorMessage)
|
||||
console.log('[ERROR] query = ' + JSON.stringify(query))
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
function setupEventHandlers() {
|
||||
/*
|
||||
Add events to process button clicks , and mouseWheel.
|
||||
*/
|
||||
document.addEventListener("click", onClick)
|
||||
document.addEventListener('mousewheel', onMouseWheel, false)
|
||||
|
||||
async function onClick(event) {
|
||||
|
||||
if (event.target && event.target.nodeName === "BUTTON") {
|
||||
switch (event.target.name) {
|
||||
case 'New Post': {
|
||||
let textArea = document.getElementById("new-post-text-area")
|
||||
await sendNewPostEvent(
|
||||
textArea.value
|
||||
)
|
||||
.then(updateTextArea)
|
||||
.catch(onError)
|
||||
|
||||
function updateTextArea() {
|
||||
textArea.value = ""
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
case 'Follow Profile': {
|
||||
await sendTargetUserProfileEvent(
|
||||
event.target.userProfileId,
|
||||
SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE
|
||||
)
|
||||
.then(updateButton)
|
||||
.catch(onError)
|
||||
|
||||
function updateButton() {
|
||||
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
|
||||
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
|
||||
span.setAttribute("class", "profile-to-unfollow-span")
|
||||
button.setAttribute("class", "profile-to-unfollow-button")
|
||||
button.name = 'Unfollow Profile'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
case 'Unfollow Profile': {
|
||||
await sendTargetUserProfileEvent(
|
||||
event.target.userProfileId,
|
||||
SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE
|
||||
)
|
||||
.then(updateButton)
|
||||
.catch(onError)
|
||||
|
||||
/*
|
||||
function updateButton() {
|
||||
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
|
||||
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
|
||||
span.setAttribute("class", "profile-to-follow-span")
|
||||
button.setAttribute("class", "profile-to-follow-button")
|
||||
button.name = 'Follow Profile'
|
||||
}
|
||||
*/
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Error Handling
|
||||
*/
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Click event failed. ' + errorMessage)
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseWheel(event) {
|
||||
let scrollDiv = document.getElementById("scroll-div")
|
||||
scrollDiv.scrollTop = scrollDiv.scrollTop + event.deltaY
|
||||
}
|
||||
}
|
||||
|
||||
async function sendTargetUserProfileEvent(
|
||||
userProfileId,
|
||||
eventType
|
||||
) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
asyncCall(resolve, reject)
|
||||
})
|
||||
|
||||
async function asyncCall(resolve, reject) {
|
||||
let eventMessage
|
||||
let event
|
||||
|
||||
eventMessage = {
|
||||
eventType: eventType,
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
targetUserProfileId: userProfileId,
|
||||
timestamp: (new Date()).valueOf()
|
||||
}
|
||||
|
||||
event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage(
|
||||
JSON.stringify(event)
|
||||
)
|
||||
.then(resolve)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Event not executed. ' + errorMessage)
|
||||
console.log('[ERROR] event = ' + JSON.stringify(event))
|
||||
reject(errorMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function sendNewPostEvent(
|
||||
postText
|
||||
) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
asyncCall(resolve, reject)
|
||||
})
|
||||
|
||||
async function asyncCall(resolve, reject) {
|
||||
let eventMessage
|
||||
let event
|
||||
|
||||
eventMessage = {
|
||||
eventType: SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST,
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
postText: postText,
|
||||
timestamp: (new Date()).valueOf()
|
||||
}
|
||||
|
||||
event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsWebAppClient.sendMessage(
|
||||
JSON.stringify(event)
|
||||
)
|
||||
.then(resolve)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Event not executed. ' + errorMessage)
|
||||
console.log('[ERROR] event = ' + JSON.stringify(event))
|
||||
reject(errorMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function messageReceived(message) {
|
||||
window.alert(message)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
exports.startExpress = (port, SA) => {
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
const webAppInterface = DK.projects.socialTrading.modules.webAppInterface.newSocialTradingModulesWebAppInterface();
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
// define a route handler for the default home page
|
||||
app.get("/health-check", (req, res) => {
|
||||
res.send("all good");
|
||||
});
|
||||
|
||||
app.get("/profiles", async (req, res) => {
|
||||
let profiles = await whoToFollow();
|
||||
console.log(profiles)
|
||||
res.send(profiles);
|
||||
});
|
||||
|
||||
app.post("/follow", async (req, res) => {
|
||||
let follow = followProfile(req.body.userProfileId, SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE);
|
||||
res.send("Followed")
|
||||
});
|
||||
|
||||
app.post("/unFollow", async (req, res) => {
|
||||
let follow = followProfile(req.body.userProfileId, SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE);
|
||||
res.send("UnFollow")
|
||||
});
|
||||
|
||||
|
||||
app.post("/post", async (req, res) => {
|
||||
console.log(req)
|
||||
let post = createPost(req);
|
||||
res.send(post)
|
||||
});
|
||||
|
||||
// start the Express server
|
||||
app.listen(port, () => {
|
||||
console.log(`server started at http://localhost:${port}`);
|
||||
});
|
||||
|
||||
async function createPost(postText) {
|
||||
try {
|
||||
let eventMessage;
|
||||
let event;
|
||||
|
||||
eventMessage = {
|
||||
eventType: SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST,
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
postText: postText,
|
||||
timestamp: (new Date()).valueOf()
|
||||
}
|
||||
|
||||
event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
return await webAppInterface.sendMessage(
|
||||
JSON.stringify(event)
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
async function whoToFollow() {
|
||||
|
||||
try {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.UNFOLLOWED_USER_PROFILES,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST,
|
||||
amountRequested: 3,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_UP
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
return await webAppInterface.messageReceived(
|
||||
JSON.stringify(query)
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function followProfile(userProfileId, eventType) {
|
||||
|
||||
try {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.UNFOLLOWED_USER_PROFILES,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST,
|
||||
amountRequested: 3,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_UP
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
return await webAppInterface.messageReceived(
|
||||
JSON.stringify(query)
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Make sure that including paths.js after env.js will read .env variables.
|
||||
delete require.cache[require.resolve('./paths')];
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV;
|
||||
if (!NODE_ENV) {
|
||||
throw new Error(
|
||||
'The NODE_ENV environment variable is required but was not specified.'
|
||||
);
|
||||
}
|
||||
|
||||
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
||||
const dotenvFiles = [
|
||||
`${paths.dotenv}.${NODE_ENV}.local`,
|
||||
// Don't include `.env.local` for `test` environment
|
||||
// since normally you expect tests to produce the same
|
||||
// results for everyone
|
||||
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
||||
`${paths.dotenv}.${NODE_ENV}`,
|
||||
paths.dotenv,
|
||||
].filter(Boolean);
|
||||
|
||||
// Load environment variables from .env* files. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set. Variable expansion is supported in .env files.
|
||||
// https://github.com/motdotla/dotenv
|
||||
// https://github.com/motdotla/dotenv-expand
|
||||
dotenvFiles.forEach(dotenvFile => {
|
||||
if (fs.existsSync(dotenvFile)) {
|
||||
require('dotenv-expand')(
|
||||
require('dotenv').config({
|
||||
path: dotenvFile,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// We support resolving modules according to `NODE_PATH`.
|
||||
// This lets you use absolute paths in imports inside large monorepos:
|
||||
// https://github.com/facebook/create-react-app/issues/253.
|
||||
// It works similar to `NODE_PATH` in Node itself:
|
||||
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
||||
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
||||
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
|
||||
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
|
||||
// We also resolve them to make sure all tools using them work consistently.
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
||||
.split(path.delimiter)
|
||||
.filter(folder => folder && !path.isAbsolute(folder))
|
||||
.map(folder => path.resolve(appDirectory, folder))
|
||||
.join(path.delimiter);
|
||||
|
||||
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
||||
// injected into the application via DefinePlugin in webpack configuration.
|
||||
const REACT_APP = /^REACT_APP_/i;
|
||||
|
||||
function getClientEnvironment(publicUrl) {
|
||||
const raw = Object.keys(process.env)
|
||||
.filter(key => REACT_APP.test(key))
|
||||
.reduce(
|
||||
(env, key) => {
|
||||
env[key] = process.env[key];
|
||||
return env;
|
||||
},
|
||||
{
|
||||
// Useful for determining whether we’re running in production mode.
|
||||
// Most importantly, it switches React into the correct mode.
|
||||
NODE_ENV: process.env.NODE_ENV || 'development',
|
||||
// Useful for resolving the correct path to static assets in `public`.
|
||||
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
||||
// This should only be used as an escape hatch. Normally you would put
|
||||
// images into the `src` and `import` them in code to get their paths.
|
||||
PUBLIC_URL: publicUrl,
|
||||
// We support configuring the sockjs pathname during development.
|
||||
// These settings let a developer run multiple simultaneous projects.
|
||||
// They are used as the connection `hostname`, `pathname` and `port`
|
||||
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
|
||||
// and `sockPort` options in webpack-dev-server.
|
||||
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
|
||||
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
|
||||
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
|
||||
// Whether or not react-refresh is enabled.
|
||||
// react-refresh is not 100% stable at this time,
|
||||
// which is why it's disabled by default.
|
||||
// It is defined here so it is available in the webpackHotDevClient.
|
||||
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
|
||||
}
|
||||
);
|
||||
// Stringify all values so we can feed into webpack DefinePlugin
|
||||
const stringified = {
|
||||
'process.env': Object.keys(raw).reduce((env, key) => {
|
||||
env[key] = JSON.stringify(raw[key]);
|
||||
return env;
|
||||
}, {}),
|
||||
};
|
||||
|
||||
return { raw, stringified };
|
||||
}
|
||||
|
||||
module.exports = getClientEnvironment;
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Ensure the certificate and key provided are valid and if not
|
||||
// throw an easy to debug error
|
||||
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
|
||||
let encrypted;
|
||||
try {
|
||||
// publicEncrypt will throw an error with an invalid cert
|
||||
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
// privateDecrypt will throw an error with an invalid key
|
||||
crypto.privateDecrypt(key, encrypted);
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
|
||||
err.message
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Read file and throw an error if it doesn't exist
|
||||
function readEnvFile(file, type) {
|
||||
if (!fs.existsSync(file)) {
|
||||
throw new Error(
|
||||
`You specified ${chalk.cyan(
|
||||
type
|
||||
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
|
||||
);
|
||||
}
|
||||
return fs.readFileSync(file);
|
||||
}
|
||||
|
||||
// Get the https config
|
||||
// Return cert files if provided in env, otherwise just true or false
|
||||
function getHttpsConfig() {
|
||||
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
|
||||
const isHttps = HTTPS === 'true';
|
||||
|
||||
if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
|
||||
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
|
||||
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
|
||||
const config = {
|
||||
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
|
||||
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
|
||||
};
|
||||
|
||||
validateKeyAndCerts({ ...config, keyFile, crtFile });
|
||||
return config;
|
||||
}
|
||||
return isHttps;
|
||||
}
|
||||
|
||||
module.exports = getHttpsConfig;
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const resolve = require('resolve');
|
||||
|
||||
/**
|
||||
* Get additional module paths based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {Object} options
|
||||
*/
|
||||
function getAdditionalModulePaths(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
// We don't need to do anything if `baseUrl` is set to `node_modules`. This is
|
||||
// the default behavior.
|
||||
if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Allow the user set the `baseUrl` to `appSrc`.
|
||||
if (path.relative(paths.appSrc, baseUrlResolved) === '') {
|
||||
return [paths.appSrc];
|
||||
}
|
||||
|
||||
// If the path is equal to the root directory we ignore it here.
|
||||
// We don't want to allow importing from the root directly as source files are
|
||||
// not transpiled outside of `src`. We do allow importing them with the
|
||||
// absolute path (e.g. `src/Components/Button.js`) but we set that up with
|
||||
// an alias.
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Otherwise, throw an error.
|
||||
throw new Error(
|
||||
chalk.red.bold(
|
||||
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
|
||||
' Create React App does not support other values at this time.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get webpack aliases based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
function getWebpackAliases(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return {
|
||||
src: paths.appSrc,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jest aliases based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
function getJestAliases(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return {
|
||||
'^src/(.*)$': '<rootDir>/src/$1',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function getModules() {
|
||||
// Check if TypeScript is setup
|
||||
const hasTsConfig = fs.existsSync(paths.appTsConfig);
|
||||
const hasJsConfig = fs.existsSync(paths.appJsConfig);
|
||||
|
||||
if (hasTsConfig && hasJsConfig) {
|
||||
throw new Error(
|
||||
'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
|
||||
);
|
||||
}
|
||||
|
||||
let config;
|
||||
|
||||
// If there's a tsconfig.json we assume it's a
|
||||
// TypeScript project and set up the config
|
||||
// based on tsconfig.json
|
||||
if (hasTsConfig) {
|
||||
const ts = require(resolve.sync('typescript', {
|
||||
basedir: paths.appNodeModules,
|
||||
}));
|
||||
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
|
||||
// Otherwise we'll check if there is jsconfig.json
|
||||
// for non TS projects.
|
||||
} else if (hasJsConfig) {
|
||||
config = require(paths.appJsConfig);
|
||||
}
|
||||
|
||||
config = config || {};
|
||||
const options = config.compilerOptions || {};
|
||||
|
||||
const additionalModulePaths = getAdditionalModulePaths(options);
|
||||
|
||||
return {
|
||||
additionalModulePaths: additionalModulePaths,
|
||||
webpackAliases: getWebpackAliases(options),
|
||||
jestAliases: getJestAliases(options),
|
||||
hasTsConfig,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = getModules();
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath');
|
||||
const {appPublic} = require("./paths");
|
||||
|
||||
// Make sure any symlinks in the project folder are resolved:
|
||||
// https://github.com/facebook/create-react-app/issues/637
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
||||
|
||||
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
|
||||
// "public path" at which the app is served.
|
||||
// webpack needs to know it to put the right <script> hrefs into HTML even in
|
||||
// single-page apps that may serve index.html for nested URLs like /todos/42.
|
||||
// We can't use a relative path in HTML because we don't want to load something
|
||||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||
const publicUrlOrPath = getPublicUrlOrPath(
|
||||
process.env.NODE_ENV === 'development',
|
||||
require(resolveApp('package.json')).homepage,
|
||||
process.env.PUBLIC_URL
|
||||
);
|
||||
|
||||
const buildPath = process.env.BUILD_PATH || 'DesktopReact/build';
|
||||
|
||||
const moduleFileExtensions = [
|
||||
'web.mjs',
|
||||
'mjs',
|
||||
'web.js',
|
||||
'js',
|
||||
'web.ts',
|
||||
'ts',
|
||||
'web.tsx',
|
||||
'tsx',
|
||||
'json',
|
||||
'web.jsx',
|
||||
'jsx',
|
||||
];
|
||||
|
||||
// Resolve file paths in the same order as webpack
|
||||
const resolveModule = (resolveFn, filePath) => {
|
||||
const extension = moduleFileExtensions.find(extension =>
|
||||
fs.existsSync(resolveFn(`${filePath}.${extension}`))
|
||||
);
|
||||
|
||||
if (extension) {
|
||||
return resolveFn(`${filePath}.${extension}`);
|
||||
}
|
||||
|
||||
return resolveFn(`${filePath}.js`);
|
||||
};
|
||||
|
||||
// config after eject: we're in ./config/
|
||||
module.exports = {
|
||||
dotenv: resolveApp('.env'),
|
||||
appPath: resolveApp('.'),
|
||||
appBuild: resolveApp(buildPath),
|
||||
appPublic: resolveApp('DesktopReact/frontend/public'),
|
||||
appHtml: resolveApp('DesktopReact/frontend/public/index.html'),
|
||||
appIndexJs: resolveModule(resolveApp, 'DesktopReact/frontend/src/index'),
|
||||
appPackageJson: resolveApp('package.json'),
|
||||
appSrc: resolveApp('DesktopReact/frontend/src'),
|
||||
appNodeModules: resolveApp('node_modules'),
|
||||
publicUrlOrPath,
|
||||
};
|
||||
|
||||
module.exports.moduleFileExtensions = moduleFileExtensions;
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
|
||||
const { resolveModuleName } = require('ts-pnp');
|
||||
|
||||
exports.resolveModuleName = (
|
||||
typescript,
|
||||
moduleName,
|
||||
containingFile,
|
||||
compilerOptions,
|
||||
resolutionHost
|
||||
) => {
|
||||
return resolveModuleName(
|
||||
moduleName,
|
||||
containingFile,
|
||||
compilerOptions,
|
||||
resolutionHost,
|
||||
typescript.resolveModuleName
|
||||
);
|
||||
};
|
||||
|
||||
exports.resolveTypeReferenceDirective = (
|
||||
typescript,
|
||||
moduleName,
|
||||
containingFile,
|
||||
compilerOptions,
|
||||
resolutionHost
|
||||
) => {
|
||||
return resolveModuleName(
|
||||
moduleName,
|
||||
containingFile,
|
||||
compilerOptions,
|
||||
resolutionHost,
|
||||
typescript.resolveTypeReferenceDirective
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,757 @@
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const resolve = require('resolve');
|
||||
const PnpWebpackPlugin = require('pnp-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
const safePostCssParser = require('postcss-safe-parser');
|
||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
|
||||
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const paths = require('./paths');
|
||||
const modules = require('./modules');
|
||||
const getClientEnvironment = require('./env');
|
||||
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
|
||||
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
|
||||
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
|
||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
||||
|
||||
const postcssNormalize = require('postcss-normalize');
|
||||
|
||||
const appPackageJson = require(paths.appPackageJson);
|
||||
|
||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
||||
|
||||
const webpackDevClientEntry = require.resolve(
|
||||
'react-dev-utils/webpackHotDevClient'
|
||||
);
|
||||
const reactRefreshOverlayEntry = require.resolve(
|
||||
'react-dev-utils/refreshOverlayInterop'
|
||||
);
|
||||
|
||||
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
|
||||
// makes for a smoother build process.
|
||||
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
|
||||
|
||||
const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === 'true';
|
||||
const disableESLintPlugin = process.env.DISABLE_ESLINT_PLUGIN === 'true';
|
||||
|
||||
const imageInlineSizeLimit = parseInt(
|
||||
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
|
||||
);
|
||||
|
||||
// Check if TypeScript is setup
|
||||
const useTypeScript = fs.existsSync(paths.appTsConfig);
|
||||
|
||||
// Get the path to the uncompiled service worker (if it exists).
|
||||
const swSrc = paths.swSrc;
|
||||
|
||||
// style files regexes
|
||||
const cssRegex = /\.css$/;
|
||||
const cssModuleRegex = /\.module\.css$/;
|
||||
const sassRegex = /\.(scss|sass)$/;
|
||||
const sassModuleRegex = /\.module\.(scss|sass)$/;
|
||||
|
||||
const hasJsxRuntime = (() => {
|
||||
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
require.resolve('react/jsx-runtime');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
|
||||
// This is the production and development configuration.
|
||||
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
|
||||
module.exports = function (webpackEnv) {
|
||||
const isEnvDevelopment = webpackEnv === 'development';
|
||||
const isEnvProduction = webpackEnv === 'production';
|
||||
|
||||
// Variable used for enabling profiling in Production
|
||||
// passed into alias object. Uses a flag if passed into the build command
|
||||
const isEnvProductionProfile =
|
||||
isEnvProduction && process.argv.includes('--profile');
|
||||
|
||||
// We will provide `paths.publicUrlOrPath` to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));
|
||||
|
||||
const shouldUseReactRefresh = env.raw.FAST_REFRESH;
|
||||
|
||||
// common function to get style loaders
|
||||
const getStyleLoaders = (cssOptions, preProcessor) => {
|
||||
const loaders = [
|
||||
isEnvDevelopment && require.resolve('style-loader'),
|
||||
isEnvProduction && {
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
// css is located in `static/css`, use '../../' to locate index.html folder
|
||||
// in production `paths.publicUrlOrPath` can be a relative path
|
||||
options: paths.publicUrlOrPath.startsWith('.')
|
||||
? { publicPath: '../../' }
|
||||
: {},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: cssOptions,
|
||||
},
|
||||
{
|
||||
// Options for PostCSS as we reference these options twice
|
||||
// Adds vendor prefixing based on your specified browser support in
|
||||
// package.json
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebook/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
plugins: () => [
|
||||
require('postcss-flexbugs-fixes'),
|
||||
require('postcss-preset-env')({
|
||||
autoprefixer: {
|
||||
flexbox: 'no-2009',
|
||||
},
|
||||
stage: 3,
|
||||
}),
|
||||
// Adds PostCSS Normalize as the reset css with default options,
|
||||
// so that it honors browserslist config in package.json
|
||||
// which in turn let's users customize the target behavior as per their needs.
|
||||
postcssNormalize(),
|
||||
],
|
||||
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
||||
},
|
||||
},
|
||||
].filter(Boolean);
|
||||
if (preProcessor) {
|
||||
loaders.push(
|
||||
{
|
||||
loader: require.resolve('resolve-url-loader'),
|
||||
options: {
|
||||
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
||||
root: paths.appSrc,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve(preProcessor),
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
return loaders;
|
||||
};
|
||||
|
||||
return {
|
||||
mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
|
||||
// Stop compilation early in production
|
||||
bail: isEnvProduction,
|
||||
devtool: isEnvProduction
|
||||
? shouldUseSourceMap
|
||||
? 'source-map'
|
||||
: false
|
||||
: isEnvDevelopment && 'cheap-module-source-map',
|
||||
// These are the "entry points" to our application.
|
||||
// This means they will be the "root" imports that are included in JS bundle.
|
||||
entry:
|
||||
isEnvDevelopment && !shouldUseReactRefresh
|
||||
? [
|
||||
// Include an alternative client for WebpackDevServer. A client's job is to
|
||||
// connect to WebpackDevServer by a socket and get notified about changes.
|
||||
// When you save a file, the client will either apply hot updates (in case
|
||||
// of CSS changes), or refresh the page (in case of JS changes). When you
|
||||
// make a syntax error, this client will display a syntax error overlay.
|
||||
// Note: instead of the default WebpackDevServer client, we use a custom one
|
||||
// to bring better experience for Create React App users. You can replace
|
||||
// the line below with these two lines if you prefer the stock client:
|
||||
//
|
||||
// require.resolve('webpack-dev-server/client') + '?/',
|
||||
// require.resolve('webpack/hot/dev-server'),
|
||||
//
|
||||
// When using the experimental react-refresh integration,
|
||||
// the webpack plugin takes care of injecting the dev client for us.
|
||||
webpackDevClientEntry,
|
||||
// Finally, this is your app's code:
|
||||
paths.appIndexJs,
|
||||
// We include the app code last so that if there is a runtime error during
|
||||
// initialization, it doesn't blow up the WebpackDevServer client, and
|
||||
// changing JS code would still trigger a refresh.
|
||||
]
|
||||
: paths.appIndexJs,
|
||||
output: {
|
||||
// The build folder.
|
||||
path: isEnvProduction ? paths.appBuild : undefined,
|
||||
// Add /* filename */ comments to generated require()s in the output.
|
||||
pathinfo: isEnvDevelopment,
|
||||
// There will be one main bundle, and one file per asynchronous chunk.
|
||||
// In development, it does not produce real files.
|
||||
filename: isEnvProduction
|
||||
? 'static/js/[name].[contenthash:8].js'
|
||||
: isEnvDevelopment && 'static/js/bundle.js',
|
||||
// TODO: remove this when upgrading to webpack 5
|
||||
futureEmitAssets: true,
|
||||
// There are also additional JS chunk files if you use code splitting.
|
||||
chunkFilename: isEnvProduction
|
||||
? 'static/js/[name].[contenthash:8].chunk.js'
|
||||
: isEnvDevelopment && 'static/js/[name].chunk.js',
|
||||
// webpack uses `publicPath` to determine where the app is being served from.
|
||||
// It requires a trailing slash, or the file assets will get an incorrect path.
|
||||
// We inferred the "public path" (such as / or /my-project) from homepage.
|
||||
publicPath: paths.publicUrlOrPath,
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: isEnvProduction
|
||||
? info =>
|
||||
path
|
||||
.relative(paths.appSrc, info.absoluteResourcePath)
|
||||
.replace(/\\/g, '/')
|
||||
: isEnvDevelopment &&
|
||||
(info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
|
||||
// Prevents conflicts when multiple webpack runtimes (from different apps)
|
||||
// are used on the same page.
|
||||
jsonpFunction: `webpackJsonp${appPackageJson.name}`,
|
||||
// this defaults to 'window', but by setting it to 'this' then
|
||||
// module chunks which are built will work in web workers as well.
|
||||
globalObject: 'this',
|
||||
},
|
||||
optimization: {
|
||||
minimize: isEnvProduction,
|
||||
minimizer: [
|
||||
// This is only used in production mode
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
parse: {
|
||||
// We want terser to parse ecma 8 code. However, we don't want it
|
||||
// to apply any minification steps that turns valid ecma 5 code
|
||||
// into invalid ecma 5 code. This is why the 'compress' and 'output'
|
||||
// sections only apply transformations that are ecma 5 safe
|
||||
// https://github.com/facebook/create-react-app/pull/4234
|
||||
ecma: 8,
|
||||
},
|
||||
compress: {
|
||||
ecma: 5,
|
||||
warnings: false,
|
||||
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/2376
|
||||
// Pending further investigation:
|
||||
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
comparisons: false,
|
||||
// Disabled because of an issue with Terser breaking valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/5250
|
||||
// Pending further investigation:
|
||||
// https://github.com/terser-js/terser/issues/120
|
||||
inline: 2,
|
||||
},
|
||||
mangle: {
|
||||
safari10: true,
|
||||
},
|
||||
// Added for profiling in devtools
|
||||
keep_classnames: isEnvProductionProfile,
|
||||
keep_fnames: isEnvProductionProfile,
|
||||
output: {
|
||||
ecma: 5,
|
||||
comments: false,
|
||||
// Turned on because emoji and regex is not minified properly using default
|
||||
// https://github.com/facebook/create-react-app/issues/2488
|
||||
ascii_only: true,
|
||||
},
|
||||
},
|
||||
sourceMap: shouldUseSourceMap,
|
||||
}),
|
||||
// This is only used in production mode
|
||||
new OptimizeCSSAssetsPlugin({
|
||||
cssProcessorOptions: {
|
||||
parser: safePostCssParser,
|
||||
map: shouldUseSourceMap
|
||||
? {
|
||||
// `inline: false` forces the sourcemap to be output into a
|
||||
// separate file
|
||||
inline: false,
|
||||
// `annotation: true` appends the sourceMappingURL to the end of
|
||||
// the css file, helping the browser find the sourcemap
|
||||
annotation: true,
|
||||
}
|
||||
: false,
|
||||
},
|
||||
cssProcessorPluginOptions: {
|
||||
preset: ['default', { minifyFontValues: { removeQuotes: false } }],
|
||||
},
|
||||
}),
|
||||
],
|
||||
// Automatically split vendor and commons
|
||||
// https://twitter.com/wSokra/status/969633336732905474
|
||||
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
name: isEnvDevelopment,
|
||||
},
|
||||
// Keep the runtime chunk separated to enable long term caching
|
||||
// https://twitter.com/wSokra/status/969679223278505985
|
||||
// https://github.com/facebook/create-react-app/issues/5358
|
||||
runtimeChunk: {
|
||||
name: entrypoint => `runtime-${entrypoint.name}`,
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebook/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
modules.additionalModulePaths || []
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebook/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: paths.moduleFileExtensions
|
||||
.map(ext => `.${ext}`)
|
||||
.filter(ext => useTypeScript || !ext.includes('ts')),
|
||||
alias: {
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
// Allows for better profiling with ReactDevTools
|
||||
...(isEnvProductionProfile && {
|
||||
'react-dom$': 'react-dom/profiling',
|
||||
'scheduler/tracing': 'scheduler/tracing-profiling',
|
||||
}),
|
||||
...(modules.webpackAliases || {}),
|
||||
},
|
||||
plugins: [
|
||||
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
|
||||
// guards against forgotten dependencies and such.
|
||||
PnpWebpackPlugin,
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [
|
||||
paths.appPackageJson,
|
||||
reactRefreshOverlayEntry,
|
||||
]),
|
||||
],
|
||||
},
|
||||
resolveLoader: {
|
||||
plugins: [
|
||||
// Also related to Plug'n'Play, but this time it tells webpack to load its loaders
|
||||
// from the current package.
|
||||
PnpWebpackPlugin.moduleLoader(module),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// Disable require.ensure as it's not a standard language feature.
|
||||
{ parser: { requireEnsure: false } },
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// TODO: Merge this config once `image/avif` is in the mime-db
|
||||
// https://github.com/jshttp/mime-db
|
||||
{
|
||||
test: [/\.avif$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: imageInlineSizeLimit,
|
||||
mimetype: 'image/avif',
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// "url" loader works like "file" loader except that it embeds assets
|
||||
// smaller than specified limit in bytes as data URLs to avoid requests.
|
||||
// A missing `test` is equivalent to a match.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: imageInlineSizeLimit,
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// Process application JS with Babel.
|
||||
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
|
||||
{
|
||||
test: /\.(js|mjs|jsx|ts|tsx)$/,
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
customize: require.resolve(
|
||||
'babel-preset-react-app/webpack-overrides'
|
||||
),
|
||||
presets: [
|
||||
[
|
||||
require.resolve('babel-preset-react-app'),
|
||||
{
|
||||
runtime: hasJsxRuntime ? 'automatic' : 'classic',
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
plugins: [
|
||||
[
|
||||
require.resolve('babel-plugin-named-asset-import'),
|
||||
{
|
||||
loaderMap: {
|
||||
svg: {
|
||||
ReactComponent:
|
||||
'@svgr/webpack?-svgo,+titleProp,+ref![path]',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
isEnvDevelopment &&
|
||||
shouldUseReactRefresh &&
|
||||
require.resolve('react-refresh/babel'),
|
||||
].filter(Boolean),
|
||||
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
||||
// It enables caching results in ./node_modules/.cache/babel-loader/
|
||||
// directory for faster rebuilds.
|
||||
cacheDirectory: true,
|
||||
// See #6846 for context on why cacheCompression is disabled
|
||||
cacheCompression: false,
|
||||
compact: isEnvProduction,
|
||||
},
|
||||
},
|
||||
// Process any JS outside of the app with Babel.
|
||||
// Unlike the application JS, we only compile the standard ES features.
|
||||
{
|
||||
test: /\.(js|mjs)$/,
|
||||
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
compact: false,
|
||||
presets: [
|
||||
[
|
||||
require.resolve('babel-preset-react-app/dependencies'),
|
||||
{ helpers: true },
|
||||
],
|
||||
],
|
||||
cacheDirectory: true,
|
||||
// See #6846 for context on why cacheCompression is disabled
|
||||
cacheCompression: false,
|
||||
|
||||
// Babel sourcemaps are needed for debugging into node_modules
|
||||
// code. Without the options below, debuggers like VSCode
|
||||
// show incorrect code and set breakpoints on the wrong lines.
|
||||
sourceMaps: shouldUseSourceMap,
|
||||
inputSourceMap: shouldUseSourceMap,
|
||||
},
|
||||
},
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader turns CSS into JS modules that inject <style> tags.
|
||||
// In production, we use MiniCSSExtractPlugin to extract that CSS
|
||||
// to a file, but in development "style" loader enables hot editing
|
||||
// of CSS.
|
||||
// By default we support CSS Modules with the extension .module.css
|
||||
{
|
||||
test: cssRegex,
|
||||
exclude: cssModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 1,
|
||||
sourceMap: isEnvProduction
|
||||
? shouldUseSourceMap
|
||||
: isEnvDevelopment,
|
||||
}),
|
||||
// Don't consider CSS imports dead code even if the
|
||||
// containing package claims to have no side effects.
|
||||
// Remove this when webpack adds a warning or an error for this.
|
||||
// See https://github.com/webpack/webpack/issues/6571
|
||||
sideEffects: true,
|
||||
},
|
||||
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
|
||||
// using the extension .module.css
|
||||
{
|
||||
test: cssModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 1,
|
||||
sourceMap: isEnvProduction
|
||||
? shouldUseSourceMap
|
||||
: isEnvDevelopment,
|
||||
modules: {
|
||||
getLocalIdent: getCSSModuleLocalIdent,
|
||||
},
|
||||
}),
|
||||
},
|
||||
// Opt-in support for SASS (using .scss or .sass extensions).
|
||||
// By default we support SASS Modules with the
|
||||
// extensions .module.scss or .module.sass
|
||||
{
|
||||
test: sassRegex,
|
||||
exclude: sassModuleRegex,
|
||||
use: getStyleLoaders(
|
||||
{
|
||||
importLoaders: 3,
|
||||
sourceMap: isEnvProduction
|
||||
? shouldUseSourceMap
|
||||
: isEnvDevelopment,
|
||||
},
|
||||
'sass-loader'
|
||||
),
|
||||
// Don't consider CSS imports dead code even if the
|
||||
// containing package claims to have no side effects.
|
||||
// Remove this when webpack adds a warning or an error for this.
|
||||
// See https://github.com/webpack/webpack/issues/6571
|
||||
sideEffects: true,
|
||||
},
|
||||
// Adds support for CSS Modules, but using SASS
|
||||
// using the extension .module.scss or .module.sass
|
||||
{
|
||||
test: sassModuleRegex,
|
||||
use: getStyleLoaders(
|
||||
{
|
||||
importLoaders: 3,
|
||||
sourceMap: isEnvProduction
|
||||
? shouldUseSourceMap
|
||||
: isEnvDevelopment,
|
||||
modules: {
|
||||
getLocalIdent: getCSSModuleLocalIdent,
|
||||
},
|
||||
},
|
||||
'sass-loader'
|
||||
),
|
||||
},
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
loader: require.resolve('file-loader'),
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// its runtime that would otherwise be processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
new HtmlWebpackPlugin(
|
||||
Object.assign(
|
||||
{},
|
||||
{
|
||||
inject: true,
|
||||
template: paths.appHtml,
|
||||
},
|
||||
isEnvProduction
|
||||
? {
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeRedundantAttributes: true,
|
||||
useShortDoctype: true,
|
||||
removeEmptyAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
keepClosingSlash: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true,
|
||||
minifyURLs: true,
|
||||
},
|
||||
}
|
||||
: undefined
|
||||
)
|
||||
),
|
||||
// Inlines the webpack runtime script. This script is too small to warrant
|
||||
// a network request.
|
||||
// https://github.com/facebook/create-react-app/issues/5358
|
||||
isEnvProduction &&
|
||||
shouldInlineRuntimeChunk &&
|
||||
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// It will be an empty string unless you specify "homepage"
|
||||
// in `package.json`, in which case it will be the pathname of that URL.
|
||||
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
|
||||
// This gives some necessary context to module not found errors, such as
|
||||
// the requesting resource.
|
||||
new ModuleNotFoundPlugin(paths.appPath),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
|
||||
// It is absolutely essential that NODE_ENV is set to production
|
||||
// during a production build.
|
||||
// Otherwise React will be compiled in the very slow development mode.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// This is necessary to emit hot updates (CSS and Fast Refresh):
|
||||
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
|
||||
// Experimental hot reloading for React .
|
||||
// https://github.com/facebook/react/tree/master/packages/react-refresh
|
||||
isEnvDevelopment &&
|
||||
shouldUseReactRefresh &&
|
||||
new ReactRefreshWebpackPlugin({
|
||||
overlay: {
|
||||
entry: webpackDevClientEntry,
|
||||
// The expected exports are slightly different from what the overlay exports,
|
||||
// so an interop is included here to enable feedback on module-level errors.
|
||||
module: reactRefreshOverlayEntry,
|
||||
// Since we ship a custom dev client and overlay integration,
|
||||
// the bundled socket handling logic can be eliminated.
|
||||
sockIntegration: false,
|
||||
},
|
||||
}),
|
||||
// Watcher doesn't work well if you mistype casing in a path so we use
|
||||
// a plugin that prints an error when you attempt to do this.
|
||||
// See https://github.com/facebook/create-react-app/issues/240
|
||||
isEnvDevelopment && new CaseSensitivePathsPlugin(),
|
||||
// If you require a missing module and then `npm install` it, you still have
|
||||
// to restart the development server for webpack to discover it. This plugin
|
||||
// makes the discovery automatic so you don't have to restart.
|
||||
// See https://github.com/facebook/create-react-app/issues/186
|
||||
isEnvDevelopment &&
|
||||
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
|
||||
isEnvProduction &&
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// both options are optional
|
||||
filename: 'static/css/[name].[contenthash:8].css',
|
||||
chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
|
||||
}),
|
||||
// Generate an asset manifest file with the following content:
|
||||
// - "files" key: Mapping of all asset filenames to their corresponding
|
||||
// output file so that tools can pick it up without having to parse
|
||||
// `index.html`
|
||||
// - "entrypoints" key: Array of files which are included in `index.html`,
|
||||
// can be used to reconstruct the HTML if necessary
|
||||
new ManifestPlugin({
|
||||
fileName: 'asset-manifest.json',
|
||||
publicPath: paths.publicUrlOrPath,
|
||||
generate: (seed, files, entrypoints) => {
|
||||
const manifestFiles = files.reduce((manifest, file) => {
|
||||
manifest[file.name] = file.path;
|
||||
return manifest;
|
||||
}, seed);
|
||||
const entrypointFiles = entrypoints.main.filter(
|
||||
fileName => !fileName.endsWith('.map')
|
||||
);
|
||||
|
||||
return {
|
||||
files: manifestFiles,
|
||||
entrypoints: entrypointFiles,
|
||||
};
|
||||
},
|
||||
}),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
// Generate a service worker script that will precache, and keep up to date,
|
||||
// the HTML & assets that are part of the webpack build.
|
||||
isEnvProduction &&
|
||||
fs.existsSync(swSrc) &&
|
||||
new WorkboxWebpackPlugin.InjectManifest({
|
||||
swSrc,
|
||||
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
|
||||
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
|
||||
// Bump up the default maximum size (2mb) that's precached,
|
||||
// to make lazy-loading failure scenarios less likely.
|
||||
// See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
|
||||
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
|
||||
}),
|
||||
// TypeScript type checking
|
||||
useTypeScript &&
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
typescript: resolve.sync('typescript', {
|
||||
basedir: paths.appNodeModules,
|
||||
}),
|
||||
async: isEnvDevelopment,
|
||||
checkSyntacticErrors: true,
|
||||
resolveModuleNameModule: process.versions.pnp
|
||||
? `${__dirname}/pnpTs.js`
|
||||
: undefined,
|
||||
resolveTypeReferenceDirectiveModule: process.versions.pnp
|
||||
? `${__dirname}/pnpTs.js`
|
||||
: undefined,
|
||||
tsconfig: paths.appTsConfig,
|
||||
reportFiles: [
|
||||
// This one is specifically to match during CI tests,
|
||||
// as micromatch doesn't match
|
||||
// '../cra-template-typescript/template/src/App.tsx'
|
||||
// otherwise.
|
||||
'../**/src/**/*.{ts,tsx}',
|
||||
'**/src/**/*.{ts,tsx}',
|
||||
'!**/src/**/__tests__/**',
|
||||
'!**/src/**/?(*.)(spec|test).*',
|
||||
'!**/src/setupProxy.*',
|
||||
'!**/src/setupTests.*',
|
||||
],
|
||||
silent: true,
|
||||
// The formatter is invoked directly in WebpackDevServerUtils during development
|
||||
formatter: isEnvProduction ? typescriptFormatter : undefined,
|
||||
}),
|
||||
!disableESLintPlugin &&
|
||||
new ESLintPlugin({
|
||||
// Plugin options
|
||||
extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
|
||||
formatter: require.resolve('react-dev-utils/eslintFormatter'),
|
||||
eslintPath: require.resolve('eslint'),
|
||||
failOnError: !(isEnvDevelopment && emitErrorsAsWarnings),
|
||||
context: paths.appSrc,
|
||||
cache: true,
|
||||
cacheLocation: path.resolve(
|
||||
paths.appNodeModules,
|
||||
'.cache/.eslintcache'
|
||||
),
|
||||
// ESLint class options
|
||||
cwd: paths.appPath,
|
||||
resolvePluginsRelativeTo: __dirname,
|
||||
baseConfig: {
|
||||
extends: [require.resolve('eslint-config-react-app/base')],
|
||||
rules: {
|
||||
...(!hasJsxRuntime && {
|
||||
'react/react-in-jsx-scope': 'error',
|
||||
}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
].filter(Boolean),
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
module: 'empty',
|
||||
dgram: 'empty',
|
||||
dns: 'mock',
|
||||
fs: 'empty',
|
||||
http2: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty',
|
||||
},
|
||||
// Turn off performance processing because we utilize
|
||||
// our own hints via the FileSizeReporter
|
||||
performance: false,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,130 @@
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
|
||||
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
|
||||
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
|
||||
const ignoredFiles = require('react-dev-utils/ignoredFiles');
|
||||
const redirectServedPath = require('react-dev-utils/redirectServedPathMiddleware');
|
||||
const paths = require('./paths');
|
||||
const getHttpsConfig = require('./getHttpsConfig');
|
||||
|
||||
const host = process.env.HOST || '0.0.0.0';
|
||||
const sockHost = process.env.WDS_SOCKET_HOST;
|
||||
const sockPath = process.env.WDS_SOCKET_PATH; // default: '/sockjs-node'
|
||||
const sockPort = process.env.WDS_SOCKET_PORT;
|
||||
|
||||
module.exports = function (proxy, allowedHost) {
|
||||
return {
|
||||
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
|
||||
// websites from potentially accessing local content through DNS rebinding:
|
||||
// https://github.com/webpack/webpack-dev-server/issues/887
|
||||
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
|
||||
// However, it made several existing use cases such as development in cloud
|
||||
// environment or subdomains in development significantly more complicated:
|
||||
// https://github.com/facebook/create-react-app/issues/2271
|
||||
// https://github.com/facebook/create-react-app/issues/2233
|
||||
// While we're investigating better solutions, for now we will take a
|
||||
// compromise. Since our WDS configuration only serves files in the `public`
|
||||
// folder we won't consider accessing them a vulnerability. However, if you
|
||||
// use the `proxy` feature, it gets more dangerous because it can expose
|
||||
// remote code execution vulnerabilities in backends like Django and Rails.
|
||||
// So we will disable the host check normally, but enable it if you have
|
||||
// specified the `proxy` setting. Finally, we let you override it if you
|
||||
// really know what you're doing with a special environment variable.
|
||||
disableHostCheck:
|
||||
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
|
||||
// Enable gzip compression of generated files.
|
||||
compress: true,
|
||||
// Silence WebpackDevServer's own logs since they're generally not useful.
|
||||
// It will still show compile warnings and errors with this setting.
|
||||
clientLogLevel: 'none',
|
||||
// By default WebpackDevServer serves physical files from current directory
|
||||
// in addition to all the virtual build products that it serves from memory.
|
||||
// This is confusing because those files won’t automatically be available in
|
||||
// production build folder unless we copy them. However, copying the whole
|
||||
// project directory is dangerous because we may expose sensitive files.
|
||||
// Instead, we establish a convention that only files in `public` directory
|
||||
// get served. Our build script will copy `public` into the `build` folder.
|
||||
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
|
||||
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
|
||||
// Note that we only recommend to use `public` folder as an escape hatch
|
||||
// for files like `favicon.ico`, `manifest.json`, and libraries that are
|
||||
// for some reason broken when imported through webpack. If you just want to
|
||||
// use an image, put it in `src` and `import` it from JavaScript instead.
|
||||
contentBase: paths.appPublic,
|
||||
contentBasePublicPath: paths.publicUrlOrPath,
|
||||
// By default files from `contentBase` will not trigger a page reload.
|
||||
watchContentBase: true,
|
||||
// Enable hot reloading server. It will provide WDS_SOCKET_PATH endpoint
|
||||
// for the WebpackDevServer client so it can learn when the files were
|
||||
// updated. The WebpackDevServer client is included as an entry point
|
||||
// in the webpack development configuration. Note that only changes
|
||||
// to CSS are currently hot reloaded. JS changes will refresh the browser.
|
||||
hot: true,
|
||||
// Use 'ws' instead of 'sockjs-node' on server since we're using native
|
||||
// websockets in `webpackHotDevClient`.
|
||||
transportMode: 'ws',
|
||||
// Prevent a WS client from getting injected as we're already including
|
||||
// `webpackHotDevClient`.
|
||||
injectClient: false,
|
||||
// Enable custom sockjs pathname for websocket connection to hot reloading server.
|
||||
// Enable custom sockjs hostname, pathname and port for websocket connection
|
||||
// to hot reloading server.
|
||||
sockHost,
|
||||
sockPath,
|
||||
sockPort,
|
||||
// It is important to tell WebpackDevServer to use the same "publicPath" path as
|
||||
// we specified in the webpack config. When homepage is '.', default to serving
|
||||
// from the root.
|
||||
// remove last slash so user can land on `/test` instead of `/test/`
|
||||
publicPath: paths.publicUrlOrPath.slice(0, -1),
|
||||
// WebpackDevServer is noisy by default so we emit custom message instead
|
||||
// by listening to the compiler events with `compiler.hooks[...].tap` calls above.
|
||||
quiet: true,
|
||||
// Reportedly, this avoids CPU overload on some systems.
|
||||
// https://github.com/facebook/create-react-app/issues/293
|
||||
// src/node_modules is not ignored to support absolute imports
|
||||
// https://github.com/facebook/create-react-app/issues/1065
|
||||
watchOptions: {
|
||||
ignored: ignoredFiles(paths.appSrc),
|
||||
},
|
||||
https: getHttpsConfig(),
|
||||
host,
|
||||
overlay: false,
|
||||
historyApiFallback: {
|
||||
// Paths with dots should still use the history fallback.
|
||||
// See https://github.com/facebook/create-react-app/issues/387.
|
||||
disableDotRule: true,
|
||||
index: paths.publicUrlOrPath,
|
||||
},
|
||||
public: allowedHost,
|
||||
// `proxy` is run between `before` and `after` `webpack-dev-server` hooks
|
||||
proxy,
|
||||
before(app, server) {
|
||||
// Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
|
||||
// middlewares before `redirectServedPath` otherwise will not have any effect
|
||||
// This lets us fetch source contents from webpack for the error overlay
|
||||
app.use(evalSourceMapMiddleware(server));
|
||||
// This lets us open files from the runtime error overlay.
|
||||
app.use(errorOverlayMiddleware());
|
||||
|
||||
if (fs.existsSync(paths.proxySetup)) {
|
||||
// This registers user provided middleware for proxy reasons
|
||||
require(paths.proxySetup)(app);
|
||||
}
|
||||
},
|
||||
after(app) {
|
||||
// Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match
|
||||
app.use(redirectServedPath(paths.publicUrlOrPath));
|
||||
|
||||
// This service worker file is effectively a 'no-op' that will reset any
|
||||
// previous service worker registered for the same host:port combination.
|
||||
// We do this in development to avoid hitting the production cache if
|
||||
// it used the same host and port.
|
||||
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
|
||||
app.use(noopServiceWorkerMiddleware(paths.publicUrlOrPath));
|
||||
},
|
||||
};
|
||||
};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Superalgos Desktop</title>
|
||||
<meta name="description" content="Free and Open Source Crypto Social Trading">
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadApp() {
|
||||
// Prevent click-jacking
|
||||
try {
|
||||
if (window === window.top || window.chrome && chrome.app && chrome.app.window) {
|
||||
document.documentElement.style.display = 'block'
|
||||
} else {
|
||||
top.location = self.location
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('CJ protection', e)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="body" onload="loadApp()">
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -0,0 +1,212 @@
|
||||
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'production';
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
|
||||
const path = require('path');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const fs = require('fs-extra');
|
||||
const bfj = require('bfj');
|
||||
const webpack = require('webpack');
|
||||
const configFactory = require('../config/webpack.config');
|
||||
const paths = require('../config/paths');
|
||||
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
||||
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
|
||||
const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
|
||||
const printBuildError = require('react-dev-utils/printBuildError');
|
||||
|
||||
const measureFileSizesBeforeBuild =
|
||||
FileSizeReporter.measureFileSizesBeforeBuild;
|
||||
const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
|
||||
const useYarn = fs.existsSync(paths.yarnLockFile);
|
||||
|
||||
// These sizes are pretty large. We'll warn for bundles exceeding them.
|
||||
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
|
||||
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
||||
|
||||
const isInteractive = process.stdout.isTTY;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const argv = process.argv.slice(2);
|
||||
const writeStatsJson = argv.indexOf('--stats') !== -1;
|
||||
|
||||
// Generate configuration
|
||||
const config = configFactory('production');
|
||||
|
||||
// We require that you explicitly set browsers and do not fall back to
|
||||
// browserslist defaults.
|
||||
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
|
||||
checkBrowsers(paths.appPath, isInteractive)
|
||||
.then(() => {
|
||||
// First, read the current file sizes in build directory.
|
||||
// This lets us display how much they changed later.
|
||||
return measureFileSizesBeforeBuild(paths.appBuild);
|
||||
})
|
||||
.then(previousFileSizes => {
|
||||
// Remove all content but keep the directory so that
|
||||
// if you're in it, you don't end up in Trash
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
// Merge with the public folder
|
||||
copyPublicFolder();
|
||||
// Start the webpack build
|
||||
return build(previousFileSizes);
|
||||
})
|
||||
.then(
|
||||
({ stats, previousFileSizes, warnings }) => {
|
||||
if (warnings.length) {
|
||||
console.log(chalk.yellow('Compiled with warnings.\n'));
|
||||
console.log(warnings.join('\n\n'));
|
||||
console.log(
|
||||
'\nSearch for the ' +
|
||||
chalk.underline(chalk.yellow('keywords')) +
|
||||
' to learn more about each warning.'
|
||||
);
|
||||
console.log(
|
||||
'To ignore, add ' +
|
||||
chalk.cyan('// eslint-disable-next-line') +
|
||||
' to the line before.\n'
|
||||
);
|
||||
} else {
|
||||
console.log(chalk.green('Compiled successfully.\n'));
|
||||
}
|
||||
|
||||
console.log('File sizes after gzip:\n');
|
||||
printFileSizesAfterBuild(
|
||||
stats,
|
||||
previousFileSizes,
|
||||
paths.appBuild,
|
||||
WARN_AFTER_BUNDLE_GZIP_SIZE,
|
||||
WARN_AFTER_CHUNK_GZIP_SIZE
|
||||
);
|
||||
console.log();
|
||||
|
||||
const appPackage = require(paths.appPackageJson);
|
||||
const publicUrl = paths.publicUrlOrPath;
|
||||
const publicPath = config.output.publicPath;
|
||||
const buildFolder = path.relative(process.cwd(), paths.appBuild);
|
||||
printHostingInstructions(
|
||||
appPackage,
|
||||
publicUrl,
|
||||
publicPath,
|
||||
buildFolder,
|
||||
useYarn
|
||||
);
|
||||
},
|
||||
err => {
|
||||
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
|
||||
if (tscCompileOnError) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'Compiled with the following type errors (you may want to check these before deploying your app):\n'
|
||||
)
|
||||
);
|
||||
printBuildError(err);
|
||||
} else {
|
||||
console.log(chalk.red('Failed to compile.\n'));
|
||||
printBuildError(err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
)
|
||||
.catch(err => {
|
||||
if (err && err.message) {
|
||||
console.log(err.message);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// Create the production build and print the deployment instructions.
|
||||
function build(previousFileSizes) {
|
||||
console.log('Creating an optimized production build...');
|
||||
|
||||
const compiler = webpack(config);
|
||||
return new Promise((resolve, reject) => {
|
||||
compiler.run((err, stats) => {
|
||||
let messages;
|
||||
if (err) {
|
||||
if (!err.message) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
let errMessage = err.message;
|
||||
|
||||
// Add additional information for postcss errors
|
||||
if (Object.prototype.hasOwnProperty.call(err, 'postcssNode')) {
|
||||
errMessage +=
|
||||
'\nCompileError: Begins at CSS selector ' +
|
||||
err['postcssNode'].selector;
|
||||
}
|
||||
|
||||
messages = formatWebpackMessages({
|
||||
errors: [errMessage],
|
||||
warnings: [],
|
||||
});
|
||||
} else {
|
||||
messages = formatWebpackMessages(
|
||||
stats.toJson({ all: false, warnings: true, errors: true })
|
||||
);
|
||||
}
|
||||
if (messages.errors.length) {
|
||||
// Only keep the first error. Others are often indicative
|
||||
// of the same problem, but confuse the reader with noise.
|
||||
if (messages.errors.length > 1) {
|
||||
messages.errors.length = 1;
|
||||
}
|
||||
return reject(new Error(messages.errors.join('\n\n')));
|
||||
}
|
||||
if (
|
||||
process.env.CI &&
|
||||
(typeof process.env.CI !== 'string' ||
|
||||
process.env.CI.toLowerCase() !== 'false') &&
|
||||
messages.warnings.length
|
||||
) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'\nTreating warnings as errors because process.env.CI = true.\n' +
|
||||
'Most CI servers set it automatically.\n'
|
||||
)
|
||||
);
|
||||
return reject(new Error(messages.warnings.join('\n\n')));
|
||||
}
|
||||
|
||||
const resolveArgs = {
|
||||
stats,
|
||||
previousFileSizes,
|
||||
warnings: messages.warnings,
|
||||
};
|
||||
|
||||
if (writeStatsJson) {
|
||||
return bfj
|
||||
.write(paths.appBuild + '/bundle-stats.json', stats.toJson())
|
||||
.then(() => resolve(resolveArgs))
|
||||
.catch(error => reject(new Error(error)));
|
||||
}
|
||||
|
||||
return resolve(resolveArgs);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function copyPublicFolder() {
|
||||
fs.copySync(paths.appPublic, paths.appBuild, {
|
||||
dereference: true,
|
||||
filter: file => file !== paths.appHtml,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
exports.start = (port) => {
|
||||
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'development';
|
||||
process.env.NODE_ENV = 'development';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const webpack = require('webpack');
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
const clearConsole = require('react-dev-utils/clearConsole');
|
||||
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
const {
|
||||
choosePort,
|
||||
createCompiler,
|
||||
prepareProxy,
|
||||
prepareUrls,
|
||||
} = require('react-dev-utils/WebpackDevServerUtils');
|
||||
const openBrowser = require('react-dev-utils/openBrowser');
|
||||
const semver = require('semver');
|
||||
const paths = require('../config/paths');
|
||||
const configFactory = require('../config/webpack.config');
|
||||
const createDevServerConfig = require('../config/webpackDevServer.config');
|
||||
const getClientEnvironment = require('../config/env');
|
||||
const react = require(require.resolve('react', {paths: [paths.appPath]}));
|
||||
|
||||
const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));
|
||||
const useYarn = fs.existsSync(paths.yarnLockFile);
|
||||
const isInteractive = process.stdout.isTTY;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Tools like Cloud9 rely on this.
|
||||
const DEFAULT_PORT = port;
|
||||
const HOST = '0.0.0.0';
|
||||
|
||||
if (process.env.HOST) {
|
||||
console.log(
|
||||
chalk.cyan(
|
||||
`Attempting to bind to HOST environment variable: ${chalk.yellow(
|
||||
chalk.bold(process.env.HOST)
|
||||
)}`
|
||||
)
|
||||
);
|
||||
console.log();
|
||||
}
|
||||
|
||||
// We require that you explicitly set browsers and do not fall back to
|
||||
// browserslist defaults.
|
||||
const {checkBrowsers} = require('react-dev-utils/browsersHelper');
|
||||
checkBrowsers(paths.appPath, isInteractive)
|
||||
.then(() => {
|
||||
// We attempt to use the default port but if it is busy, we offer the user to
|
||||
// run on a different port. `choosePort()` Promise resolves to the next free port.
|
||||
return choosePort(HOST, DEFAULT_PORT);
|
||||
})
|
||||
.then(port => {
|
||||
if (port == null) {
|
||||
// We have not found a port.
|
||||
return;
|
||||
}
|
||||
|
||||
const config = configFactory('development');
|
||||
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
|
||||
const appName = require(paths.appPackageJson).name;
|
||||
|
||||
const useTypeScript = fs.existsSync(paths.appTsConfig);
|
||||
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
|
||||
const urls = prepareUrls(
|
||||
protocol,
|
||||
HOST,
|
||||
port,
|
||||
paths.publicUrlOrPath.slice(0, -1)
|
||||
);
|
||||
const devSocket = {
|
||||
warnings: warnings =>
|
||||
devServer.sockWrite(devServer.sockets, 'warnings', warnings),
|
||||
errors: errors =>
|
||||
devServer.sockWrite(devServer.sockets, 'errors', errors),
|
||||
};
|
||||
// Create a webpack compiler that is configured with custom messages.
|
||||
const compiler = createCompiler({
|
||||
appName,
|
||||
config,
|
||||
devSocket,
|
||||
urls,
|
||||
useYarn,
|
||||
useTypeScript,
|
||||
tscCompileOnError,
|
||||
webpack,
|
||||
});
|
||||
// Load proxy config
|
||||
const proxySetting = require(paths.appPackageJson).proxy;
|
||||
const proxyConfig = prepareProxy(
|
||||
proxySetting,
|
||||
paths.appPublic,
|
||||
paths.publicUrlOrPath
|
||||
);
|
||||
// Serve webpack assets generated by the compiler over a web server.
|
||||
const serverConfig = createDevServerConfig(
|
||||
proxyConfig,
|
||||
urls.lanUrlForConfig
|
||||
);
|
||||
const devServer = new WebpackDevServer(compiler, serverConfig);
|
||||
// Launch WebpackDevServer.
|
||||
devServer.listen(port, HOST, err => {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
}
|
||||
|
||||
if (env.raw.FAST_REFRESH && semver.lt(react.version, '16.10.0')) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`Fast Refresh requires React 16.10 or higher. You are using React ${react.version}.`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
console.log(chalk.cyan('Starting the development server...\n'));
|
||||
openBrowser(urls.localUrlForBrowser);
|
||||
});
|
||||
|
||||
['SIGINT', 'SIGTERM'].forEach(function (sig) {
|
||||
process.on(sig, function () {
|
||||
devServer.close();
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
if (process.env.CI !== 'true') {
|
||||
// Gracefully exit when stdin ends
|
||||
process.stdin.on('end', function () {
|
||||
devServer.close();
|
||||
process.exit();
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
if (err && err.message) {
|
||||
console.log(err.message);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'test';
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.PUBLIC_URL = '';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
|
||||
const jest = require('jest');
|
||||
const execSync = require('child_process').execSync;
|
||||
let argv = process.argv.slice(2);
|
||||
|
||||
function isInGitRepository() {
|
||||
try {
|
||||
execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isInMercurialRepository() {
|
||||
try {
|
||||
execSync('hg --cwd . root', { stdio: 'ignore' });
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Watch unless on CI or explicitly running all tests
|
||||
if (
|
||||
!process.env.CI &&
|
||||
argv.indexOf('--watchAll') === -1 &&
|
||||
argv.indexOf('--watchAll=false') === -1
|
||||
) {
|
||||
// https://github.com/facebook/create-react-app/issues/5210
|
||||
const hasSourceControl = isInGitRepository() || isInMercurialRepository();
|
||||
argv.push(hasSourceControl ? '--watch' : '--watchAll');
|
||||
}
|
||||
|
||||
|
||||
jest.run(argv);
|
||||
@@ -0,0 +1,28 @@
|
||||
const baseURL = 'http://localhost:33249'
|
||||
const GET = 'GET'
|
||||
const POST = 'POST'
|
||||
const DELETE = 'DELETE'
|
||||
const UPDATE = 'UPDATE'
|
||||
|
||||
function getProfiles(){
|
||||
return call('/profiles', GET);
|
||||
}
|
||||
|
||||
function getClientNode(){
|
||||
return call('/ClientNode', GET);
|
||||
}
|
||||
|
||||
function call(endpoint, method, body){
|
||||
return new Promise(async(resolve, reject) => {
|
||||
fetch(baseURL + endpoint, { method:method, body:body })
|
||||
.then(response => resolve(response))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
export {
|
||||
getProfiles,
|
||||
getClientNode
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import {BrowserRouter, Route, Routes} from 'react-router-dom';
|
||||
import App from './home/App';
|
||||
import UserProfile from "./userProfile/UserProfile";
|
||||
import NotFound from "./notFound/NotFound";
|
||||
import Feed from "./feed/Feed";
|
||||
import PostPlaceholder from "./postPlaceholder/PostPlaceholder";
|
||||
|
||||
|
||||
const Root = () => {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path='/' element={<App/>}>
|
||||
<Route path='' element={<Feed/>}/>
|
||||
<Route path='Profile' element={<UserProfile/>}>
|
||||
{/*<Route path=':profileId' element={<UserProfile/>}/>*/}
|
||||
</Route>
|
||||
<Route path='Post' element={<PostPlaceholder/>}/>
|
||||
</Route>
|
||||
<Route
|
||||
path="*"
|
||||
element={
|
||||
<NotFound/>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
</BrowserRouter>)
|
||||
}
|
||||
|
||||
export default Root;
|
||||
@@ -0,0 +1,17 @@
|
||||
.followButton {
|
||||
margin: 0.5rem;
|
||||
width: 3rem;
|
||||
max-height: 1.5rem;
|
||||
}
|
||||
|
||||
.userCard {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 0.25rem 1rem;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import "./UserCard.css"
|
||||
import React, {useEffect} from 'react';
|
||||
import {Button, Card, CardContent, CardMedia, Typography} from "@mui/material";
|
||||
import pic from "../../images/superalgos.png"
|
||||
|
||||
const UserCard = ({name, id,followCallback}) => {
|
||||
|
||||
useEffect(() => {
|
||||
console.log(`created user with id ${id}`)
|
||||
}, [id]);
|
||||
|
||||
return (
|
||||
<Card className="userCard" variant="outlined">
|
||||
<CardMedia className="avatar"
|
||||
component="img"
|
||||
image={pic}
|
||||
alt="PP"
|
||||
|
||||
/>
|
||||
<CardContent>
|
||||
<Typography variant="body2">{name}</Typography>
|
||||
</CardContent>
|
||||
<Button className="followButton" size="small" disableElevation variant="outlined" onClick={followCallback}>
|
||||
Follow
|
||||
</Button>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default UserCard;
|
||||
@@ -0,0 +1,4 @@
|
||||
.showMore {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import './UsersSidebar.css';
|
||||
import {Stack} from "@mui/material";
|
||||
import SearchBox from "../searchBox/SearchBox";
|
||||
import SuggestedUsers from "../suggestedUsers/SuggestedUsers";
|
||||
|
||||
|
||||
const UsersSidebar = () => {
|
||||
|
||||
const showMoreCallback = () => console.log("clicked show more");
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={2}
|
||||
sx={{minWidth: "max-content"}}>
|
||||
|
||||
<SearchBox/>
|
||||
<SuggestedUsers showMoreCallback={showMoreCallback}/>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
export default UsersSidebar;
|
||||
@@ -0,0 +1,11 @@
|
||||
.feed {
|
||||
width: 40rem;
|
||||
height: 95vh;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
|
||||
scrollbar-width: none; /* Hide scrollbar for Firefox */
|
||||
}
|
||||
|
||||
.feed::-webkit-scrollbar { /* Hide scrollbar for Chrome, Safari and Opera */
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import './Feed.css';
|
||||
import PostPlaceholder from "../postPlaceholder/PostPlaceholder";
|
||||
import PostsFeed from "../postsFeed/PostsFeed";
|
||||
|
||||
const Feed = () => {
|
||||
return (
|
||||
<div className="feed">
|
||||
<PostPlaceholder/>
|
||||
<PostsFeed/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Feed;
|
||||
@@ -0,0 +1,7 @@
|
||||
.app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.middleSection{
|
||||
width: 40rem;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import './App.css';
|
||||
import Sidebar from "../sidebar/Sidebar";
|
||||
import UsersSidebar from "../UsersSidebar/UsersSidebar";
|
||||
import {Stack} from "@mui/material";
|
||||
import {Outlet} from "react-router-dom";
|
||||
import {getProfiles} from '../../api/service'
|
||||
|
||||
function App() {
|
||||
getProfiles().then( response => {
|
||||
console.log(response)
|
||||
});
|
||||
return (
|
||||
<div className="app">
|
||||
|
||||
<Stack className="app"
|
||||
direction="row"
|
||||
justifyContent="space-around">
|
||||
<Sidebar/>
|
||||
<Outlet className="middleSection"/>
|
||||
<UsersSidebar/>
|
||||
</Stack>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,10 @@
|
||||
/*noinspection CssInvalidPropertyValue*/
|
||||
.logo {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
.icon {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import './Logo.css';
|
||||
import React from 'react';
|
||||
import {Avatar, Stack} from "@mui/material";
|
||||
import pic from "../../images/superalgos.png"
|
||||
|
||||
|
||||
const Logo = props => {
|
||||
/* TODO add on click redirect to / */
|
||||
return (
|
||||
<Stack direction="row" className="logo">
|
||||
<Avatar className="icon" alt="SuperAlgos" src={pic}/>
|
||||
<div>SuperAlgos</div>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default Logo;
|
||||
@@ -0,0 +1,10 @@
|
||||
import React, {useEffect} from 'react';
|
||||
import {useNavigate} from "react-router-dom";
|
||||
|
||||
const NotFound = () => {
|
||||
let navigate = useNavigate();
|
||||
useEffect(() => navigate("/"), [navigate])
|
||||
return null;
|
||||
};
|
||||
|
||||
export default NotFound;
|
||||
@@ -0,0 +1,49 @@
|
||||
.post {
|
||||
min-width: 5rem; /* todo needs to set a minimum width, but overriding from parent*/
|
||||
max-width: 100%;
|
||||
min-height: 5rem; /* todo needs tbd. needed actually? */
|
||||
max-height: 100%; /* todo need to be 8rem, but is collapsing without scroll. need fix*/
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postAvatarContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
}
|
||||
.postBody {
|
||||
max-width: 100%;
|
||||
min-width: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
padding-left: 2.8rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.postUserName {
|
||||
padding: 0.75rem;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.postFooterContainer {
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding-top: 0.50rem;
|
||||
padding-bottom: 0.50rem;
|
||||
}
|
||||
|
||||
.postFooterLikeDislike {
|
||||
justify-content: space-evenly;
|
||||
display: flex;
|
||||
width: 30%;
|
||||
padding-left: 0.50rem;
|
||||
}
|
||||
|
||||
.postFooterRepost {
|
||||
justify-content: flex-end;
|
||||
display: flex;
|
||||
width: 65%;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import "./Post.css"
|
||||
import React, {useState} from 'react';
|
||||
import {Avatar, Card, IconButton, Stack, Typography} from "@mui/material";
|
||||
import {Autorenew, ThumbDown, ThumbUp} from "@mui/icons-material";
|
||||
import pic from "../../images/superalgos.png"
|
||||
|
||||
const Post = () => {
|
||||
|
||||
const userName = "User Name",
|
||||
postBody = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
|
||||
|
||||
const [count, setCount] = useState(0); /* todo define one more for dislike button */
|
||||
|
||||
function onLikeButtonClick() { {/* todo console log print need a fix */}
|
||||
console.log("Liked " + count + " times")
|
||||
}
|
||||
|
||||
function onButtonClick(){ /* todo dislike button function necessary? */
|
||||
console.log("Liked " + count + " times")
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className="post">
|
||||
<Stack direction="row">
|
||||
<Stack className="postAvatarContainer">
|
||||
<Avatar src={pic}/>
|
||||
</Stack>
|
||||
<Stack className="postUserName">
|
||||
{userName}
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack className="postBody">
|
||||
{postBody}
|
||||
</Stack>
|
||||
<Stack className="postFooterContainer" direction="row">
|
||||
<Stack className="postFooterLikeDislike" direction="row">
|
||||
<IconButton
|
||||
onClick={() => setCount(count + 1)}
|
||||
>
|
||||
<ThumbUp/>
|
||||
</IconButton><Typography>{count}</Typography>
|
||||
<IconButton
|
||||
onClick={() => {/* TODO remove unnecessary arrow function*/
|
||||
onButtonClick()
|
||||
}}
|
||||
>
|
||||
<ThumbDown/>
|
||||
</IconButton>
|
||||
</Stack>
|
||||
<Stack className="postFooterRepost" direction="row">
|
||||
<IconButton
|
||||
onClick={() => {/* TODO remove unnecessary arrow function*/
|
||||
onButtonClick()
|
||||
}}
|
||||
>
|
||||
<Autorenew/>
|
||||
</IconButton>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default Post;
|
||||
@@ -0,0 +1,47 @@
|
||||
.postPlaceholder {
|
||||
width: 39rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postPlaceholderContainer {
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.postPlaceholderInputBoxContainer {
|
||||
|
||||
}
|
||||
|
||||
.postPlaceholderAvatar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.postPlaceholderTextField {
|
||||
width: 90%;
|
||||
border: 5px;
|
||||
}
|
||||
|
||||
.postPlaceholderInputBox {
|
||||
width: auto;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postFeedAccountCircle {
|
||||
|
||||
}
|
||||
|
||||
.postPlaceholderButtonStyle {
|
||||
padding: 0.75rem;
|
||||
display: flex;
|
||||
width: auto;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.postPlaceholderButton {
|
||||
height: 1.5rem;
|
||||
width: 5rem;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import "./PostPlaceholder.css"
|
||||
import React from 'react';
|
||||
import {Avatar, Button, Card, Stack, TextField, Typography} from "@mui/material";
|
||||
import pic from "../../images/superalgos.png"
|
||||
|
||||
const PostPlaceholder = () => {
|
||||
|
||||
function onButtonClick() {
|
||||
console.log("Clicked Post button");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="postPlaceholder">
|
||||
<h4>Posts</h4>
|
||||
<div className="postPlaceholderContainer">
|
||||
<Card>
|
||||
<Stack
|
||||
className="postPlaceholderInputBox"
|
||||
direction="row"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}
|
||||
justify="flex-end">
|
||||
<Stack className="postPlaceholderAvatar">
|
||||
<Avatar src={pic}/>
|
||||
</Stack>
|
||||
<Stack className="postPlaceholderTextField">
|
||||
<Typography gutterBottom variant="subtitle1" component="div">
|
||||
<TextField
|
||||
id="outlined-multiline-flexible"
|
||||
label="what's happening?"
|
||||
fullWidth
|
||||
multiline
|
||||
maxRows={6}
|
||||
/>
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack className="postPlaceholderButtonStyle" direction="row">
|
||||
<Button
|
||||
onClick={() => { /* TODO remove unnecessary arrow function call*/
|
||||
onButtonClick()
|
||||
}}
|
||||
className="postPlaceholderButton" variant="outlined">
|
||||
Post
|
||||
</Button>
|
||||
</Stack>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostPlaceholder;
|
||||
@@ -0,0 +1,5 @@
|
||||
.postFeedContainer {
|
||||
max-width: 39rem;
|
||||
padding: 0.5rem ;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import './PostsFeed.css';
|
||||
import React from 'react';
|
||||
import {Stack} from "@mui/material";
|
||||
import Post from "../post/Post";
|
||||
|
||||
const PostsFeed = () => {
|
||||
const postFeed = [1, 2, 3, 4, 5];
|
||||
|
||||
const posts = postFeed.map(
|
||||
value => {
|
||||
return <Post key={value} id={value} name={`user${value}`}/>
|
||||
}
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="postFeedContainer">
|
||||
<Stack direction="column"
|
||||
spacing={2}>
|
||||
{posts}
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostsFeed;
|
||||
@@ -0,0 +1,3 @@
|
||||
.searchIcon {
|
||||
margin: 1rem 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import {Box, TextField} from "@mui/material";
|
||||
import {Search} from "@mui/icons-material";
|
||||
|
||||
const SearchBox = () => {
|
||||
return (
|
||||
<div>
|
||||
<Box sx={{display: 'flex', alignItems: 'flex-end'}}>
|
||||
<Search className="searchIcon"/>
|
||||
<TextField id="users-search" label="Search" variant="standard" type="search"/>
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SearchBox;
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import {Link} from "@mui/material";
|
||||
|
||||
const ShowMoreUsers = ({showMoreCallback}) => {
|
||||
return (
|
||||
<Link
|
||||
component="button"
|
||||
variant="body2"
|
||||
onClick={showMoreCallback}>
|
||||
Show more
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default ShowMoreUsers;
|
||||
@@ -0,0 +1,3 @@
|
||||
.sidebar{
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import './Sidebar.css';
|
||||
import {Divider, Stack} from "@mui/material";
|
||||
import SidebarItem from "../sidebarItem/SidebarItem";
|
||||
import Logo from "../logo/Logo";
|
||||
import HomeIcon from '@mui/icons-material/Home';
|
||||
import PostAddIcon from '@mui/icons-material/PostAdd';
|
||||
import PersonIcon from '@mui/icons-material/Person';
|
||||
|
||||
const Sidebar = props => {
|
||||
const menuOptions = [{name: "Home", icon: HomeIcon},
|
||||
{name: "Profile", icon: PersonIcon},
|
||||
{name: "Post", icon: PostAddIcon}
|
||||
/*, "Explore", "Notifications", "Messages", "Bookmarks", "Lists", "More"*/]
|
||||
|
||||
const menuItems = menuOptions.map(option => {
|
||||
return <SidebarItem key={option.name} Icon={option.icon} value={option.name}/>
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="sidebar">
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={5}
|
||||
sx={{minWidth: "max-content"}}>
|
||||
<Logo/>
|
||||
<Stack
|
||||
direction="column"
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
spacing={2}
|
||||
divider={<Divider orientation="horizontal" flexItem/>}>
|
||||
{menuItems}
|
||||
</Stack>
|
||||
|
||||
</Stack>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Sidebar;
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
.sidebarItem {
|
||||
/*TODO add on hover*/
|
||||
/*TODO add breakpoints*/
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
|
||||
.sidebarText {
|
||||
/*TODO hide when too small*/
|
||||
|
||||
width: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebarIcon {
|
||||
width: auto;
|
||||
padding: 0 1rem;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import './SidebarItem.css';
|
||||
import {Stack} from "@mui/material";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
|
||||
|
||||
const SidebarItem = ({value, Icon}) => {
|
||||
let navigate = useNavigate();
|
||||
const handleClick = () => {
|
||||
navigate(`/${value}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="sidebarItem" onClick={handleClick}>
|
||||
<Stack direction="row">
|
||||
<Icon className="sidebarIcon"/>
|
||||
<div className="sidebarText"> {value} </div>
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SidebarItem;
|
||||
Whitespace-only changes.
@@ -0,0 +1,32 @@
|
||||
import "./SuggestedUsers.css"
|
||||
import React, {useEffect} from 'react';
|
||||
import UserCard from "../User/UserCard";
|
||||
import ShowMoreUsers from "../showMoreUsers/ShowMoreUsers";
|
||||
import {Stack} from "@mui/material";
|
||||
|
||||
|
||||
const SuggestedUsers = ({showMoreCallback}) => {
|
||||
const usersIds = [1, 2, 3, 4, 5];
|
||||
|
||||
|
||||
const users = usersIds.map(value => {
|
||||
let callBack = () => console.log(`Clicked follow on user${value}`);
|
||||
return <UserCard key={value} id={value} name={`user${value}`} followCallback={callBack}/>
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
console.log("SuggestedUsersConstructor called")
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}>
|
||||
{users}
|
||||
<ShowMoreUsers showMoreCallback={showMoreCallback}/>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
export default SuggestedUsers;
|
||||
@@ -0,0 +1,41 @@
|
||||
.userSection {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
.profileAvatar {
|
||||
height: 7rem !important;
|
||||
width: 7rem !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profilePicBG {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none no-repeat scroll 0 0 #fff;
|
||||
position: relative;
|
||||
height: 8rem !important;
|
||||
width: 8rem !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profileCard {
|
||||
margin-top: -50px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 8rem;
|
||||
}
|
||||
|
||||
.profileSection {
|
||||
width: 100%;
|
||||
overflow: initial !important; /* TODO check this is needed */
|
||||
height: 15rem;
|
||||
}
|
||||
|
||||
.middleSection {
|
||||
width: 39rem;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import "./UserProfile.css"
|
||||
import React from 'react';
|
||||
import UserProfileHeader from "../userProfileHeader/UserProfileHeader";
|
||||
import {Stack} from "@mui/material";
|
||||
import PostsFeed from "../postsFeed/PostsFeed";
|
||||
|
||||
|
||||
const UserProfile = () => {
|
||||
|
||||
/*TODO finish this shit*/
|
||||
|
||||
let actualUser = 'Loui Molina';
|
||||
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}
|
||||
className="middleSection">
|
||||
|
||||
<UserProfileHeader actualUser={actualUser}/>
|
||||
<PostsFeed/>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default UserProfile;
|
||||
Whitespace-only changes.
@@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import {Card, CardContent, CardMedia, Typography} from "@mui/material";
|
||||
import banner from "../../images/banner.jpg";
|
||||
import pfp from "../../images/superalgos.png";
|
||||
|
||||
const UserProfileHeader = ({actualUser}) => {
|
||||
return (
|
||||
<Card className="profileSection">
|
||||
<CardMedia className="banner"
|
||||
component="img"
|
||||
image={banner}
|
||||
alt="PP"
|
||||
/>
|
||||
<div className="profileCard">
|
||||
<div className="profilePicBG">
|
||||
<CardMedia className="profileAvatar"
|
||||
component="img"
|
||||
image={pfp}
|
||||
alt="ProfilePic"
|
||||
/>
|
||||
</div>
|
||||
<CardContent className="userSection">
|
||||
<Typography variant="h5">{actualUser}</Typography>
|
||||
</CardContent>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default UserProfileHeader;
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,13 @@
|
||||
body {
|
||||
margin: 2.5vh 5vw;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
height: 95vh !important;
|
||||
}
|
||||
|
||||
#root {
|
||||
height: inherit;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import './index.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import {Provider} from "react-redux";
|
||||
import reducers from "./store";
|
||||
import Root from "./components/Root";
|
||||
|
||||
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<Provider store={reducers}>
|
||||
<Root/>
|
||||
</Provider>
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
@@ -0,0 +1,309 @@
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Saira';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Saira Light'), local('Saira-Light'), url(Fonts/Saira.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Saira Condensed';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Saira Condensed Light'), local('SairaCondensed-Light'), url(Fonts/Saira-Condensed.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: segoeui;
|
||||
src: url(Fonts/segoeui.woff) format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.body{
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.scroll-div {
|
||||
position:absolute;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
top:0px;
|
||||
left:0px;
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.static-div {
|
||||
position: fixed;
|
||||
top:0px;
|
||||
left:18%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
background:transparent;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.content-div {
|
||||
position:relative;
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
left: 31.2%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color:transparent;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.post-placeholder {
|
||||
vertical-align: top;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.post-div {
|
||||
vertical-align: top;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.new-post-div {
|
||||
vertical-align: top;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.page-table {
|
||||
top:0px;
|
||||
left:18%;
|
||||
width: 64%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
background:transparent;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.left-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.middle-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.right-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.left-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.logo-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.menu-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.profile-cell {
|
||||
vertical-align: bottom;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.middle-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.content-title-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.content-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.right-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.search-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.context-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
background:transparent;
|
||||
}
|
||||
|
||||
.menu-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 65%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.menu-item-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.who-to-follow-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.profile-to-follow-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.profile-to-follow-span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.profile-to-follow-button {
|
||||
float: right;
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.profile-to-unfollow-span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.profile-to-unfollow-button {
|
||||
float: right;
|
||||
background-color: red;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
const reportWebVitals = onPerfEntry => {
|
||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||
getCLS(onPerfEntry);
|
||||
getFID(onPerfEntry);
|
||||
getFCP(onPerfEntry);
|
||||
getLCP(onPerfEntry);
|
||||
getTTFB(onPerfEntry);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default reportWebVitals;
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import ExampleReducer from './slices/Globals'
|
||||
|
||||
export default configureStore({
|
||||
reducer:{
|
||||
example: ExampleReducer
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,27 @@
|
||||
import {createSlice} from '@reduxjs/toolkit'
|
||||
|
||||
export const Globals = createSlice({
|
||||
name: 'globals',
|
||||
initialState: {
|
||||
UI: {
|
||||
projects: {},
|
||||
schemas: {projectSchema: undefined},
|
||||
environment: undefined,
|
||||
clientNode: undefined,
|
||||
webApp: undefined
|
||||
},
|
||||
SA: {projects: {}}
|
||||
},
|
||||
reducers: {
|
||||
exampleAction: (state, action) => {
|
||||
state.userName = action.payload;
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
// Action creators are generated for each case reducer function
|
||||
export const {exampleAction} = Globals.actions
|
||||
|
||||
export default Globals.reducer
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
exports.newDesktopRoot = function newDesktopRoot() {
|
||||
/*
|
||||
This module represents the execution root of the Desktop App.
|
||||
We use this module that is outside the Desktop folder to
|
||||
load all node dependencies and get them ready to the actual App.
|
||||
*/
|
||||
let thisObject = {
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
async function run(debugSettings) {
|
||||
/*
|
||||
The DK object is accessible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for this App.
|
||||
*/
|
||||
global.DK = {}
|
||||
/*
|
||||
The SA object is accessible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
/* Load Environment Variables */
|
||||
let ENVIRONMENT = require('./Environment.js');
|
||||
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
|
||||
global.env = ENVIRONMENT_MODULE
|
||||
|
||||
if (debugSettings !== undefined && debugSettings.DESKTOP_APP_SIGNING_ACCOUNT !== undefined) {
|
||||
global.env.DESKTOP_APP_SIGNING_ACCOUNT = debugSettings.DESKTOP_APP_SIGNING_ACCOUNT
|
||||
}
|
||||
/*
|
||||
First thing is to load the project schema file.
|
||||
*/
|
||||
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
|
||||
/*
|
||||
Setting up the modules that will be available, defined at the Project Schema file.
|
||||
*/
|
||||
let MULTI_PROJECT = require('./MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(DK, 'DK')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
util: require('util'),
|
||||
path: require('path'),
|
||||
web3: require('web3'),
|
||||
ws: require('ws'),
|
||||
open: require('open'),
|
||||
http: require('http'),
|
||||
octokit: require("@octokit/rest"),
|
||||
simpleGit: require('simple-git'),
|
||||
nodeFetch: require('node-fetch')
|
||||
}
|
||||
/*
|
||||
Setting up Secrets.
|
||||
*/
|
||||
try {
|
||||
SA.secrets = {
|
||||
array: require('./My-Secrets/Secrets.json').secrets,
|
||||
map: new Map()
|
||||
}
|
||||
} catch (err) {
|
||||
SA.secrets = {
|
||||
array: [],
|
||||
map: new Map()
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < SA.secrets.array.length; i++) {
|
||||
let secret = SA.secrets.array[i]
|
||||
SA.secrets.map.set(secret.nodeCodeName, secret)
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
async function run() {
|
||||
DK.app = require('./DesktopReact/DesktopApp.js').newDesktopApp()
|
||||
await DK.app.run()
|
||||
console.log('Superalgos Desktop App is Running!')
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -38,8 +38,8 @@ exports.newEnvironment = function () {
|
||||
PLATFORM_APP_SIGNING_ACCOUNT: 'Algo-Traders-Platform-1',
|
||||
P2P_NETWORK_NODE_SIGNING_ACCOUNT: 'P2P-Network-Node-1',
|
||||
P2P_NETWORK_NODE_MAX_INCOMING_CLIENTS: 1,
|
||||
P2P_NETWORK_NODE_MAX_INCOMING_PEERS: 2,
|
||||
P2P_NETWORK_NODE_MAX_OUTGOING_PEERS: 2
|
||||
P2P_NETWORK_NODE_MAX_INCOMING_PEERS: 0,
|
||||
P2P_NETWORK_NODE_MAX_OUTGOING_PEERS: 0
|
||||
}
|
||||
|
||||
if (process.env.DATA_PATH) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
exports.newMultiProject = function () {
|
||||
|
||||
/* TODO add init method to DK*/
|
||||
let thisObject = {
|
||||
initialize: initialize
|
||||
}
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ exports.newAlgorithmicTradingBotModulesOrdersSimulations = function (processInde
|
||||
case tradingSystemOrder.type === 'Market Buy Order' || tradingSystemOrder.type === 'Limit Buy Order': {
|
||||
if (tradingEngineOrder.orderStatistics.actualRate.value > tradingEngine.tradingCurrent.tradingEpisode.candle.max.value) {
|
||||
|
||||
const message = 'Simulating - Actual Rate Too Hight'
|
||||
const message = 'Simulating - Actual Rate Too High'
|
||||
let docs = {
|
||||
project: 'Foundations',
|
||||
category: 'Topic',
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
"relatedUiObjectProject": "Community-Plugins"
|
||||
},
|
||||
{
|
||||
"action": "Save Plugin",
|
||||
"action": "Save Plugin File",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Save Plugin",
|
||||
"label": "Save Plugin File",
|
||||
"relatedUiObject": "Plugin File",
|
||||
"actionProject": "Community-Plugins",
|
||||
"relatedUiObjectProject": "Community-Plugins"
|
||||
|
||||
@@ -39,9 +39,9 @@ function newCommunityPluginsActionSwitch() {
|
||||
}
|
||||
break
|
||||
case 'Add Specified Plugin Data Mine':
|
||||
{
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.addSpecifiedPluginDataMine(action.node, action.rootNodes)
|
||||
}
|
||||
{
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.addSpecifiedPluginDataMine(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
case 'Add Missing Plugin Trading Mines':
|
||||
{
|
||||
@@ -108,9 +108,14 @@ function newCommunityPluginsActionSwitch() {
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.disableSavingWithWorkspace(action.node, action.rootNodes, action.callBackFunction)
|
||||
}
|
||||
break
|
||||
case 'Save Plugin File':
|
||||
{
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePluginFile(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
case 'Save Plugin':
|
||||
{
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePlugin(action.node, action.rootNodes)
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePluginHierarchy(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ function newPluginsFunctionLibraryPluginsFunctions() {
|
||||
addMissingPluginApiMaps: addMissingPluginApiMaps,
|
||||
enableSavingWithWorkspace: enableSavingWithWorkspace,
|
||||
disableSavingWithWorkspace: disableSavingWithWorkspace,
|
||||
savePlugin: savePlugin,
|
||||
savePluginFile: savePluginFile,
|
||||
savePluginHierarchy: savePluginHierarchy,
|
||||
installAsPlugin: installAsPlugin
|
||||
}
|
||||
return thisObject
|
||||
@@ -283,8 +284,35 @@ function newPluginsFunctionLibraryPluginsFunctions() {
|
||||
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE)
|
||||
}
|
||||
|
||||
function savePlugin(node, rootNodes) {
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFile(node)
|
||||
function savePluginFile(pluginFile, rootNodes) {
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFileAtClient(pluginFile)
|
||||
}
|
||||
|
||||
function savePluginHierarchy(node, rootNodes) {
|
||||
if (node.isPlugin !== true) { return }
|
||||
|
||||
let plugins = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Plugins')
|
||||
let pluginProject = UI.projects.visualScripting.utilities.nodeChildren.findChildByCodeName(plugins, node.project)
|
||||
let pluginFolderName = UI.projects.communityPlugins.utilities.plugins.getPluginFolderNamesByNodeType(node.type)
|
||||
let pluginForlderNodeType = 'Plugin ' + pluginFolderName.replaceAll('-', ' ')
|
||||
let pluginFolderNode = UI.projects.visualScripting.utilities.nodeChildren.findChildByType(pluginProject, pluginForlderNodeType)
|
||||
|
||||
for (let i = 0; i < pluginFolderNode.pluginFiles.length; i++) {
|
||||
let pluginFile = pluginFolderNode.pluginFiles[i]
|
||||
let fileName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'fileName')
|
||||
let codeName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'codeName')
|
||||
if (codeName === fileName) {
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFileAtClient(pluginFile)
|
||||
/*
|
||||
Show nice message.
|
||||
*/
|
||||
node.payload.uiObject.setInfoMessage(
|
||||
"Plugin Saved.",
|
||||
UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function installAsPlugin(node, rootNodes) {
|
||||
@@ -301,6 +329,8 @@ function newPluginsFunctionLibraryPluginsFunctions() {
|
||||
return
|
||||
}
|
||||
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFile(pluginFile)
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFileAtClient(pluginFile)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ function newPluginsUtilitiesPlugins() {
|
||||
addMissingPluginFiles: addMissingPluginFiles,
|
||||
addMissingPluginFile: addMissingPluginFile,
|
||||
getProjectName: getProjectName,
|
||||
savePluginFile: savePluginFile
|
||||
savePluginFileAtClient: savePluginFileAtClient
|
||||
}
|
||||
|
||||
return thisObject
|
||||
@@ -119,7 +119,7 @@ function newPluginsUtilitiesPlugins() {
|
||||
return config.codeName
|
||||
}
|
||||
|
||||
function savePluginFile(pluginFile) {
|
||||
function savePluginFileAtClient(pluginFile) {
|
||||
let project = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'project')
|
||||
let fileName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'fileName')
|
||||
let folderName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'folderName')
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
let exchangeClass
|
||||
/*
|
||||
This is what we are going to do hereL
|
||||
|
||||
|
||||
1. Parameters set by SA user at the Crypto Exchange node are extracted. There might be parameters for each supported method at the CCXT library.
|
||||
2. The CCXT class for the configured exchange is instantiated, with whatever options where configured.
|
||||
|
||||
@@ -75,6 +75,12 @@
|
||||
statusDependencies = pStatusDependencies;
|
||||
|
||||
exchangeId = TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.codeName
|
||||
/*
|
||||
maxRate - sets the maximum number of OHCLV that is pulled before the data is saved.
|
||||
This is only to be used when the exchange is kicking out the data-mine randomly and alows the user to
|
||||
save the data more often allowing for the data mining to move forward.
|
||||
*/
|
||||
maxRate = TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.maxRate
|
||||
|
||||
/* Applying the parameters defined by the user at the Exchange Node Config */
|
||||
if (TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.API !== undefined) {
|
||||
@@ -578,6 +584,16 @@
|
||||
|
||||
let currentDate = new Date(since)
|
||||
|
||||
/*
|
||||
maxRate - sets the maximum number of OHCLV that is pulled before the data is saved.
|
||||
maxRate should only be used when the exchange is kicking out the data-mine randomly and alows the user to
|
||||
save the data more often allowing for the data mining to move forward.
|
||||
Check if we don't have a maxRate parameter and use global parameter instead
|
||||
*/
|
||||
if (!maxRate) {
|
||||
maxRate = MAX_OHLCVs_PER_EXECUTION
|
||||
}
|
||||
|
||||
/*
|
||||
If we've pulled less OHLCVs than the limit, this either means:
|
||||
(1) we reached the current date and are now pulling the latest
|
||||
|
||||
+16
-2
@@ -3,11 +3,25 @@
|
||||
"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."
|
||||
"text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode.",
|
||||
"translations": [
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Щелкните правой кнопкой мыши и выберите \"Редактировать\", чтобы войти в режим редактирования и изменить этот текст. ENTER, чтобы написать новые абзацы. ESC для выхода из режима редактирования.",
|
||||
"updated": 1637938947366
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"definition": {
|
||||
"text": "The Project Dashboards node groups dashboards by project, acting as an organizational device.",
|
||||
"updated": 1610135408616
|
||||
"updated": 1610135408616,
|
||||
"translations": [
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Узел Project Dashboards группирует панели управления по проекту, выступая в качестве организационного устройства.",
|
||||
"updated": 1637938915161
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -70,7 +70,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Or use the Save Plugin option to manually save the plugin file whenever you wish to!",
|
||||
"text": "Or use the Save Plugin File option to manually save the plugin file whenever you wish to!",
|
||||
"updated": 1629909705348,
|
||||
"translations": [
|
||||
{
|
||||
|
||||
+15
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "El futuro nos depara más. ¡Pero todavía es un trabajo en progreso!",
|
||||
"updated": 1628642151827
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "В будущем нас ждет еще больше. Но это все еще в процессе работы!",
|
||||
"updated": 1637937598065
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Finalmente Dashboards se utilizará para traer múltiples Time Machines juntos en configuraciones útiles dentro del Charting Space. ¡Piensa en múltiples gráficos configurados en intrincadas pantallas una al lado de la otra! Pero por ahora, nos ayudan a mantenernos organizados.",
|
||||
"updated": 1628644087316
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "В конечном счете, приборные панели будут использоваться для объединения нескольких машин времени в полезные конфигурации в пространстве диаграмм (Charting Space). Подумайте о нескольких графиках, сконфигурированных в замысловатые дисплеи бок о бок! Но на данный момент они помогают нам оставаться организованными.",
|
||||
"updated": 1637937667673
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Superalgos es un proyecto comunitario. Si eres un desarrollador al que le gustaría que esta función cobre vida, ¡puedes ayudar a que esto suceda!",
|
||||
"updated": 1628644124615
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Superalgos - это проект сообщества. Если вы являетесь разработчиком, который хотел бы увидеть эту функцию в реальности, вы можете помочь сделать это!",
|
||||
"updated": 1637937717128
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+15
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "¡Has visto estos portales a otra dimensión antes! Ahora echemos un vistazo más de cerca a la magia de los Time Machine.",
|
||||
"updated": 1628645012003
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вы уже видели эти порталы в другое измерение! Теперь давайте подробнее рассмотрим волшебную Машину времени (Time Machine).",
|
||||
"updated": 1637937803910
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Es posible que hayas notado que cada panel tiene una Time Machine adjunto a. Ya te has encontrado con máquinas del tiempo en tutoriales anteriores. Pero hoy vamos a trabajar mucho más con ellas.",
|
||||
"updated": 1628645255596
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вы могли заметить, что к каждой приборной панели подключена машина времени (Time Machine). Вы уже сталкивались с машинами времени в предыдущих уроках. Но сегодня мы будем работать с ними гораздо более тесно.",
|
||||
"updated": 1637937896002
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Tómate un minuto y lea su página de documentación para tener una mejor idea de lo que hacen.",
|
||||
"updated": 1628645275989
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Потратьте минуту и прочитайте страницу их документации, чтобы получить лучшее представление о том, что они делают.",
|
||||
"updated": 1637937914380
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+15
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "Configurar un Time Machine le permitirá mantener sus datos sincronizados y accesibles.",
|
||||
"updated": 1628645411356
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Настройка (Time Machine) позволит вам сохранить синхронизацию и доступ к данным.",
|
||||
"updated": 1637938690521
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "El Time Machinese trata de sincronizar. Ya sea para hacer coincidir velas con indicadores de volumen o ver exactamente cuándo realizó una orden de compra por el Trading Strategy, la máquina del tiempo es tu mejor amiga en el Charting Space.",
|
||||
"updated": 1628645470396
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Машина времени (Time Machine) - это все о синхронизации. Будь то сопоставление свечей с индикаторами объема или точное определение времени, когда ордер на покупку был размещен вашей торговой стратегией (Trading Strategy), машина времени - ваш лучший друг в пространстве графиков (Charting Space).",
|
||||
"updated": 1637938600889
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Un Time Machine en el Design Space aparecerá como un cuadro, o conjunto de gráficos, en el Charting Space",
|
||||
"updated": 1628645498722
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Одна машина времени (Time Machine) в пространстве дизайна (Design Space) будет отображаться как один блок или набор диаграмм в пространстве диаграмм (Charting Space).",
|
||||
"updated": 1637938426322
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+20
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "Sé que estoy listo para personalizar algunos gráficos. ¿Y tú? Veamos cómo agregar los nodos fundamentales que necesitamos para comenzar nuestro gráfico.",
|
||||
"updated": 1628645553111
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Я знаю, что готов настроить некоторые графики. А вы? Давайте проследим, как добавить фундаментальные узлы, которые нам нужны для начала нашей диаграммы.",
|
||||
"updated": 1637938801829
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Lo primero que debemos hacer es agregar un nuevo dashboard.",
|
||||
"updated": 1628645614150
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Первое, что нам нужно сделать, это добавить свежую панель приборов.",
|
||||
"updated": 1637938814690
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Coloca el cursor sobre el nodo Project Dashboardsy has clic en Add Dashboard.",
|
||||
"updated": 1628645660586
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Переместитесь по узлу Project Dashboards node и нажмите кнопку Add Dashboard.",
|
||||
"updated": 1637938884068
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -51,6 +66,11 @@
|
||||
"language": "ES",
|
||||
"text": "Asegúrate de nombrar tu nuevo Dashboard con algo que reconocerás. Una buena práctica de nomenclatura es hacer referencia al tipo de entorno (ive trading, backtesting, etc.) y algo distintivo sobre los gráficos que planeas agregar. Para nosotros eso sería:",
|
||||
"updated": 1628645744284
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Обязательно назовите новую приборную панель (Dashboard) так, чтобы ее можно было узнать. Хорошей практикой именования является ссылка на тип среды (живая торговля, бэктестинг и т.д.) и что-то отличительное о графиках, которые вы планируете добавить. Для нас это было бы так:",
|
||||
"updated": 1637939089832
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+20
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "¡Mírate! Estás haciendo un gran progreso. Ahora vamos a conseguir eso Time Machine agregado!",
|
||||
"updated": 1628645834818
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Посмотрите на себя! Вы добиваетесь больших успехов. Теперь давайте добавим эту Машину Времени (Time Machine)!",
|
||||
"updated": 1637939590565
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Coloca el cursor sobre tu Dashboard y has clic en Add Time Machine.",
|
||||
"updated": 1628645866697
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Наведите курсор на панель инструментов (Dashboard) и нажмите Add Time Machine.",
|
||||
"updated": 1637939675985
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -38,6 +48,11 @@
|
||||
"language": "ES",
|
||||
"text": "Al nombrar un Time Machine es útil hacer referencia al Trading System y tipo de Trading Session que se conectará al gráfico. Para nosotros eso sería:",
|
||||
"updated": 1628645933656
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "При присвоении имени машине времени (Time Machine) полезно указать торговую систему (Trading System) и тип торговой сессии (Trading Session) которая будет подключена к графику. Для нас это было бы так:",
|
||||
"updated": 1637939833112
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -55,6 +70,11 @@
|
||||
"language": "ES",
|
||||
"text": "Otra información útil que puede utilizar para etiquetar sus gráficos puede incluir el intercambio, el par de mercado y el nodo de red asociado con la información presentada.",
|
||||
"updated": 1628645952313
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Другая полезная информация, которую вы можете использовать для маркировки графиков, может включать биржу, рыночную пару и сетевой узел, связанный с отображаемой информацией.",
|
||||
"updated": 1637939877854
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+15
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "¿Notaste que los tres nodos se agregaron automáticamente a su Time Machine?",
|
||||
"updated": 1628646024325
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вы заметили, что три узла автоматически добавляются в вашу Машину Времени ?",
|
||||
"updated": 1637939216157
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "¡Estas son las escalas! Siempre que agregues un time machine, vendrá equipado con tres escalas (Rate Scale, Time Scale, and Time Frame Scale). Estas son las mismas escalas que ha utilizado para interactuar con gráficos en el Charting Space.",
|
||||
"updated": 1628646097018
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вот шкалы! Каждый раз, когда вы добавляете машину времени, она оснащается тремя шкалами (Rate Scale, Time Scale, and Time Frame Scale). Это те же шкалы, которые вы использовали для взаимодействия с графиками в Charting Space.",
|
||||
"updated": 1637940137857
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -38,6 +48,11 @@
|
||||
"language": "ES",
|
||||
"text": "En otro tutorial, cubriremos la personalización de estas escalas para lograr configuraciones de gráficos más complejas. Pero por ahora es importante que sepas que su máquina del tiempo necesita los tres para funcionar correctamente.",
|
||||
"updated": 1628646139121
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "В другом уроке мы рассмотрим настройку этих шкал для достижения более сложных настроек диаграмм. Но сейчас вам важно знать, что ваша машина времени нуждается во всех трех, чтобы работать правильно.",
|
||||
"updated": 1637939243076
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+20
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "Una cosa a tener en cuenta al agregar Time Machines es que pueden aparecer en la parte superior de otros gráficos dentro del Charting Space.",
|
||||
"updated": 1628646293826
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "При добавлении машин времени следует помнить, что они могут появляться поверх других графиков в пространстве графиков (Charting Space).",
|
||||
"updated": 1637940239089
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Echemos un vistazo alrededor del Charting Space y encuentra la máquina del tiempo que agregaste.",
|
||||
"updated": 1628646330822
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Давайте осмотримся в Charting Space и найдем машину времени, которую вы добавили!",
|
||||
"updated": 1637940276541
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Si es necesario, mueva las máquinas del tiempo y busque el título que agregó a su máquina del tiempo en el Design Space.",
|
||||
"updated": 1628646350166
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "При необходимости переместите машины времени и найдите название, которое вы добавили к машине времени в Design Space.",
|
||||
"updated": 1637940311613
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -55,6 +70,11 @@
|
||||
"language": "ES",
|
||||
"text": "Recuerde, para mover un gráfico, mantenga Shift y arrastre con un clic izquierdo.",
|
||||
"updated": 1628646377242
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Помните, что для перемещения графика удерживайте Shift и перетаскивайте его левой кнопкой мыши.",
|
||||
"updated": 1637940361014
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+20
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "¿Encontraste el Time Machine que agregaste? No olvides moverte por el Charting Space, ¡Sé que está aquí!",
|
||||
"updated": 1628646486524
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вы нашли \"Машину времени\" (Time Machine),которую добавили? Не забывайте перемещаться по пространству чартов (Charting Space), я знаю, что оно здесь!",
|
||||
"updated": 1638175402508
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Debería ver tres gráficos dentro del Charting Space.",
|
||||
"updated": 1628646517644
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Вы должны увидеть три графика в пространстве графиков (Charting Space).",
|
||||
"updated": 1638175440080
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "¡Lee los títulos y encuentra el que agregaste!",
|
||||
"updated": 1628646530332
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Прочитайте названия и найдите то, что вы добавили!",
|
||||
"updated": 1638175465519
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -51,6 +66,11 @@
|
||||
"language": "ES",
|
||||
"text": "Si amplía, no hay mucho que ver todavía. Pero eso está bien. Estamos en camino a su propia carta personalizada. ¡Guau! Sigamos y agreguemos algunos datos a su nuevo Time Machine.",
|
||||
"updated": 1628646548672
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Если увеличить масштаб, то пока не на что смотреть. Но это нормально. Мы на пути к созданию вашей собственной индивидуальной диаграммы. Ух ты! Давайте продолжим и добавим некоторые данные в вашу новую машину времени (Time Machine).",
|
||||
"updated": 1638175495560
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+20
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "Ahora que tenemos algo para guardar nuestros gráficos, ¡sigamos adelante y agreguemos uno!",
|
||||
"updated": 1628646604795
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Теперь, когда у нас есть, где хранить графики, давайте добавим их!",
|
||||
"updated": 1638175613264
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Coloca el cursor sobre tu Time Machine y has clic Add Timeline Chart.",
|
||||
"updated": 1628646628639
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Наведите курсор на машину времени (Time Machine) и нажмите Add Timeline Chart.",
|
||||
"updated": 1638175724101
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Dar un nombre útil a un Timeline Chart es importante. Una buena práctica de nomenclatura es hacer referencia a la Data Mine o Data Product con el que se conectará. Ahora mismo estaremos agregando Candles Data Mine datos a este gráfico de línea de tiempo. Un nombre útil sería:",
|
||||
"updated": 1628646729893
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Дать полезное название временной диаграмме (Timeline Chart) очень важно. Хорошей практикой именования является ссылка на Шахту данных (Data Mine) или Продукт данных (Data Product) с которым он будет связан. Сейчас мы будем добавлять данные Candles (Data Mine) на этот график временной шкалы. Полезное название:",
|
||||
"updated": 1638175906721
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -56,6 +71,11 @@
|
||||
"language": "ES",
|
||||
"text": "¡Asegúrate de que tu título sea corto! ",
|
||||
"updated": 1628646807108
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Убедитесь, что ваш заголовок короткий! Скоро вы поймете, почему.",
|
||||
"updated": 1638175920414
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+25
@@ -14,6 +14,11 @@
|
||||
"language": "ES",
|
||||
"text": "Has agregado tu primer gráfico personalizado. Veamos qué tenemos hasta ahora. Amplía todo el recorrido de tu gráfico y eche un vistazo a tu alrededor.",
|
||||
"updated": 1628647058651
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Ух ты, ты сделал это! Вы добавили свой первый пользовательский график. Давайте посмотрим, что у нас есть на данный момент. Увеличьте масштаб вашей диаграммы и осмотритесь.",
|
||||
"updated": 1638175954140
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -27,6 +32,11 @@
|
||||
"language": "ES",
|
||||
"text": "Su gráfico está bien, pero todavía es bastante aburrido.",
|
||||
"updated": 1628646906326
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Ваш график там есть, но он все равно довольно скучный.",
|
||||
"updated": 1638175975827
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -39,6 +49,11 @@
|
||||
"language": "ES",
|
||||
"text": "Encuentra el Layer Manager para el Timeline Chart tu agregaste. Utiliza tu ratón para desplazarte unas cuantas veces.",
|
||||
"updated": 1628646968752
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Найдите менеджер слоев (Layer Manager) для добавленной диаграммы временной шкалы (Timeline Chart). Используйте мышь, чтобы прокрутить несколько раз.",
|
||||
"updated": 1638176050854
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -51,6 +66,11 @@
|
||||
"language": "ES",
|
||||
"text": "No importa cuánto te desplaces, no pasa nada. ¡No te preocupes, no hay nada roto! Simplemente no lo hemos conectado a ninguno de sus datos. ¡Cambiemos eso!",
|
||||
"updated": 1628647017081
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Как бы вы ни старались, ничего не происходит, не так ли? Не волнуйтесь, ничего не сломано! Мы просто не подключили его к вашим данным. Давайте изменим это!",
|
||||
"updated": 1638176090746
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -63,6 +83,11 @@
|
||||
"language": "ES",
|
||||
"text": "Un Layer Manager hereda el nombre de su Timeline Chart. ¡Por eso era mejor un nombre corto!",
|
||||
"updated": 1628647051230
|
||||
},
|
||||
{
|
||||
"language": "RU",
|
||||
"text": "Менеджер слоев (Layer Manager) наследует имя от своей временной диаграммы (Timeline Chart). Вот почему короткое имя было лучшим!",
|
||||
"updated": 1638176175990
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -197,7 +197,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
}
|
||||
|
||||
function installInTradingMine(tradingMine) {
|
||||
let savePlugin = false
|
||||
let savePluginFile = false
|
||||
for (let j = 0; j < tradingMine.tradingBots.length; j++) {
|
||||
let tradingBotNode = tradingMine.tradingBots[j]
|
||||
|
||||
@@ -231,7 +231,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
|
||||
// Explicit check is needed so we know if we have to save the plugin or not
|
||||
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(botDataDependencies, dataset, true) === true) {
|
||||
savePlugin = true
|
||||
savePluginFile = true
|
||||
let dataDependency = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(botDataDependencies, 'Data Dependency')
|
||||
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dataDependency, dataset)
|
||||
}
|
||||
@@ -244,7 +244,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
* We will save the plugin only if we get to the point were we have to add the data dependencies
|
||||
*
|
||||
*/
|
||||
if (savePlugin) {
|
||||
if (savePluginFile) {
|
||||
for (let i = 0; i < rootNodes.length; i++) {
|
||||
let rootNode = rootNodes[i]
|
||||
if (rootNode.type === 'Plugins') {
|
||||
@@ -253,7 +253,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
for (let j = 0; j < tradingMinePlugin.pluginFiles.length; j++) {
|
||||
let pluginFile = tradingMinePlugin.pluginFiles[j]
|
||||
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePlugin(pluginFile)
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePluginFile(pluginFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,7 +263,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
}
|
||||
|
||||
function installInPortfolioMine(portfolioMine) {
|
||||
let savePlugin = false
|
||||
let savePluginFile = false
|
||||
for (let j = 0; j < portfolioMine.portfolioBots.length; j++) {
|
||||
let portfolioBotNode = portfolioMine.portfolioBots[j]
|
||||
|
||||
@@ -297,7 +297,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
|
||||
// Explicit check is needed so we know if we have to save the plugin or not
|
||||
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(botDataDependencies, dataset, true) === true) {
|
||||
savePlugin = true
|
||||
savePluginFile = true
|
||||
let dataDependency = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(botDataDependencies, 'Data Dependency')
|
||||
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dataDependency, dataset)
|
||||
}
|
||||
@@ -310,7 +310,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
* We will save the plugin only if we get to the point were we have to add the data dependencies
|
||||
*
|
||||
*/
|
||||
if (savePlugin) {
|
||||
if (savePluginFile) {
|
||||
for (let i = 0; i < rootNodes.length; i++) {
|
||||
let rootNode = rootNodes[i]
|
||||
if (rootNode.type === 'Plugins') {
|
||||
@@ -319,7 +319,7 @@ function newFoundationsFunctionLibraryProductFunctions() {
|
||||
for (let j = 0; j < portfolioMinePlugin.pluginFiles.length; j++) {
|
||||
let pluginFile = portfolioMinePlugin.pluginFiles[j]
|
||||
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePlugin(pluginFile)
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePluginFile(pluginFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ function newWorkspace() {
|
||||
|
||||
let saveWithWorkspace = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'saveWithWorkspace')
|
||||
if (saveWithWorkspace === true) {
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFile(pluginFile)
|
||||
UI.projects.communityPlugins.utilities.plugins.savePluginFileAtClient(pluginFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,9 @@ function newCircularMenuItem() {
|
||||
text = text + ' -> [Existing Reference] Type : [' + thisObject.payload.uiObject.payload.referenceParent.type + '] , Name : [' + thisObject.payload.uiObject.payload.referenceParent.name + ']'
|
||||
}
|
||||
|
||||
thisObject.payload.uiObject.setInfoMessage(text)
|
||||
if (thisObject.label === undefined) {
|
||||
thisObject.payload.uiObject.setInfoMessage(text)
|
||||
}
|
||||
isMouseOver = true
|
||||
} else {
|
||||
isMouseOver = false
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -26,12 +26,12 @@
|
||||
"id": "40f63b98-548c-4efa-8351-263724b6564a",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 28109.431818181816,
|
||||
"y": 28259.801270189222
|
||||
"x": 32589.931818181816,
|
||||
"y": 14133.825317547306
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 28159.431818181816,
|
||||
"y": 28346.403810567666
|
||||
"x": 32639.931818181816,
|
||||
"y": 14220.42785792575
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -49,12 +49,12 @@
|
||||
"id": "7ad53a0a-a266-447a-bc1a-27be8927fd28",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 28159.431818181816,
|
||||
"y": 28346.403810567666
|
||||
"x": 32639.931818181816,
|
||||
"y": 14220.42785792575
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 28234.431818181816,
|
||||
"y": 28476.307621135333
|
||||
"x": 32696.181818181816,
|
||||
"y": 14317.8557158515
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -81,12 +81,12 @@
|
||||
"id": "6c9a3172-8723-4d4d-8836-ee64299db5dd",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 28494.23943931715,
|
||||
"y": 28326.307621135333
|
||||
"x": 32891.03753403332,
|
||||
"y": 14205.3557158515
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 28364.335628749483,
|
||||
"y": 28401.307621135333
|
||||
"x": 32793.60967610757,
|
||||
"y": 14261.6057158515
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -104,12 +104,12 @@
|
||||
"id": "4a68f9e0-4122-48db-ab25-d159344af354",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 28364.335628749483,
|
||||
"y": 28401.307621135333
|
||||
"x": 32793.60967610757,
|
||||
"y": 14261.6057158515
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 28234.431818181816,
|
||||
"y": 28476.307621135333
|
||||
"x": 32696.181818181816,
|
||||
"y": 14317.8557158515
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -127,19 +127,19 @@
|
||||
"id": "09ae0e39-1e64-4ad5-8bdd-9f399158de72",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32398.681818181816,
|
||||
"y": 14059.602540378444
|
||||
"x": 32684.181818181816,
|
||||
"y": 14023.8557158515
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 2,
|
||||
"distanceToParent": 4,
|
||||
"arrangementStyle": 1
|
||||
},
|
||||
"uiObject": {
|
||||
@@ -150,7 +150,7 @@
|
||||
"communityBuildingPrograms": {
|
||||
"type": "Community Building Programs",
|
||||
"name": "New Community Building Programs",
|
||||
"config": "{}",
|
||||
"config": "{\r\n \"percentage\": 15\r\n}",
|
||||
"project": "Governance",
|
||||
"referralProgram": {
|
||||
"type": "Referral Program",
|
||||
@@ -166,12 +166,12 @@
|
||||
"id": "6c177f63-755d-43dd-996d-2b49b43f0213",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32623.26591512198,
|
||||
"y": 19734.285681507412
|
||||
"x": 32809.731318051425,
|
||||
"y": 13269.07218794967
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32400.190821312874,
|
||||
"y": 19763.654074756923
|
||||
"x": 32829.31024688443,
|
||||
"y": 13417.788917155742
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -207,12 +207,12 @@
|
||||
"id": "0295ea28-3621-4809-95e6-a8571c42cb02",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32578.6953228784,
|
||||
"y": 19900.625396283885
|
||||
"x": 32920.62446123574,
|
||||
"y": 13298.785916112056
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32400.190821312874,
|
||||
"y": 19763.654074756923
|
||||
"x": 32829.31024688443,
|
||||
"y": 13417.788917155742
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -234,12 +234,12 @@
|
||||
"id": "16de0f2b-1005-45d9-bb59-53dc156dfd0c",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32414.87501793763,
|
||||
"y": 19875.191621661477
|
||||
"x": 32928.45473302181,
|
||||
"y": 13404.736297933736
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32400.190821312874,
|
||||
"y": 19763.654074756923
|
||||
"x": 32829.31024688443,
|
||||
"y": 13417.788917155742
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -257,12 +257,12 @@
|
||||
"id": "e0801eee-7336-46c4-a715-022ea484d33b",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32400.190821312874,
|
||||
"y": 19763.654074756923
|
||||
"x": 32829.31024688443,
|
||||
"y": 13417.788917155742
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32043.181818181816,
|
||||
"y": 19489.711431703
|
||||
"x": 32646.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -291,12 +291,12 @@
|
||||
"id": "e9140283-8828-459b-9034-35e63eeb74a2",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32916.1953228784,
|
||||
"y": 20485.19254383838
|
||||
"x": 33261.393249884815,
|
||||
"y": 13041.083487540114
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32380.681818181816,
|
||||
"y": 20074.278579257494
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -323,6 +323,84 @@
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "User Supporter",
|
||||
"name": "Julian-Molina",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"id": "7f6c969b-6459-4ef3-83b9-ff39241445db",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 33354.59130141876,
|
||||
"y": 13112.596867709166
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 3,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "User Profile",
|
||||
"name": "Julian-Molina",
|
||||
"id": "b85aaac1-0708-4aec-97f9-bc3cc70e530a"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"Julian-Molina",
|
||||
"User Profile"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "User Supporter",
|
||||
"name": "harrellbm",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"id": "f542b94d-4c2c-45fb-8193-a0d2977c73ef",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 33426.104681587814,
|
||||
"y": 13205.794919243112
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 3,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "User Profile",
|
||||
"name": "harrellbm",
|
||||
"id": "3af73d3b-7c0e-4de7-a1e1-a72238081740"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"harrellbm",
|
||||
"User Profile"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"tokensAwarded": {
|
||||
@@ -332,12 +410,12 @@
|
||||
"id": "5e61048d-2df0-4176-977c-aaf64b036fe1",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32718.181818181816,
|
||||
"y": 20658.84572681199
|
||||
"x": 33471.0598717149,
|
||||
"y": 13314.326348946977
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32380.681818181816,
|
||||
"y": 20074.278579257494
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -359,12 +437,12 @@
|
||||
"id": "3132f5c9-af4c-45c4-8d91-95d1aec8c182",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32468.78699793035,
|
||||
"y": 20743.503860684817
|
||||
"x": 33486.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32380.681818181816,
|
||||
"y": 20074.278579257494
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -382,12 +460,12 @@
|
||||
"id": "ed2e4359-71d2-4cc8-afb4-bf01d06cbd2b",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32380.681818181816,
|
||||
"y": 20074.278579257494
|
||||
"x": 33036.393249884815,
|
||||
"y": 13430.794919243112
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32043.181818181816,
|
||||
"y": 19489.711431703
|
||||
"x": 32646.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -416,12 +494,12 @@
|
||||
"id": "82f9e154-4da7-4077-b3d3-0fd60d5c255f",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32283.59826466439,
|
||||
"y": 20086.28796554392
|
||||
"x": 33044.3995074091,
|
||||
"y": 13495.517288254729
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32131.28699793035,
|
||||
"y": 20158.936713130322
|
||||
"x": 33092.83200580003,
|
||||
"y": 13597.058132744089
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -457,12 +535,12 @@
|
||||
"id": "9aa871e0-76b4-4db0-a96f-3230f01118a3",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32247.446832578673,
|
||||
"y": 20281.343638238646
|
||||
"x": 33174.43662253892,
|
||||
"y": 13519.618242978542
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32131.28699793035,
|
||||
"y": 20158.936713130322
|
||||
"x": 33092.83200580003,
|
||||
"y": 13597.058132744089
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -498,12 +576,12 @@
|
||||
"id": "9f9e6fdf-f203-4161-b791-42c0718adc65",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32050.766457136542,
|
||||
"y": 20307.23710089203
|
||||
"x": 33191.698930974504,
|
||||
"y": 13650.738493273295
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32131.28699793035,
|
||||
"y": 20158.936713130322
|
||||
"x": 33092.83200580003,
|
||||
"y": 13597.058132744089
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -525,12 +603,12 @@
|
||||
"id": "036aeb75-a628-410a-8397-906c652a2336",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 31965.362732278933,
|
||||
"y": 20128.184468203523
|
||||
"x": 33072.33050918217,
|
||||
"y": 13707.674309845033
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32131.28699793035,
|
||||
"y": 20158.936713130322
|
||||
"x": 33092.83200580003,
|
||||
"y": 13597.058132744089
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -548,12 +626,12 @@
|
||||
"id": "0de0c354-be16-4550-94af-5fb96f024632",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32131.28699793035,
|
||||
"y": 20158.936713130322
|
||||
"x": 33092.83200580003,
|
||||
"y": 13597.058132744089
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32043.181818181816,
|
||||
"y": 19489.711431703
|
||||
"x": 32646.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -571,19 +649,19 @@
|
||||
"id": "923edd09-70dd-43b1-b7fa-40594299e37d",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32398.681818181816,
|
||||
"y": 13886.397459621556
|
||||
"x": 32646.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 3,
|
||||
"distanceToParent": 5,
|
||||
"arrangementStyle": 2
|
||||
},
|
||||
"uiObject": {
|
||||
@@ -594,12 +672,12 @@
|
||||
"votesAndClaimsPrograms": {
|
||||
"type": "Votes And Claims Programs",
|
||||
"name": "New Votes And Claims Programs",
|
||||
"config": " \"codeName\": \"EvaMaria70\"",
|
||||
"config": "\"codeName\": \"EvaMaria70\"\r\n{ \"percentage\": 75\r\n}",
|
||||
"project": "Governance",
|
||||
"claimsProgram": {
|
||||
"type": "Claims Program",
|
||||
"name": "New Claims Program",
|
||||
"config": "{\"percentage\": 75}",
|
||||
"config": "{\r\n \"percentage\": 100\r\n}",
|
||||
"project": "Governance",
|
||||
"assetClaimsFolders": [],
|
||||
"featureClaimsFolders": [],
|
||||
@@ -613,18 +691,18 @@
|
||||
"positionContributionClaims": [
|
||||
{
|
||||
"type": "Position Contribution Claim",
|
||||
"name": "5 Team Members : EvaMaria70 gitforkgit e-Nut Lennart MarinitaMarina Translations Team",
|
||||
"name": "Team Members Translations Team",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"id": "7ed8d42e-a28d-4093-96c8-bc8bf6871404",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32628.585628749483,
|
||||
"y": 13811.397459621556
|
||||
"x": 32935.28753403331,
|
||||
"y": 13619.07214207425
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32678.585628749483,
|
||||
"y": 13898
|
||||
"x": 32991.53753403331,
|
||||
"y": 13716.5
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -639,57 +717,47 @@
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Position",
|
||||
"name": "5 Team Members : EvaMaria70 gitforkgit e-Nut Lennart MarinitaMarina",
|
||||
"id": "6ed65be6-de6f-49a1-9c04-d2114e8763a1"
|
||||
"name": "Team Members",
|
||||
"id": "5760eb89-e8e3-4544-ba60-094b6b1e70be"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"Superalgos",
|
||||
"Positions",
|
||||
"Governance",
|
||||
"50c68665-5da2-48a4-b229-7a1563ae82d2"
|
||||
"Teams of Contributors",
|
||||
"Positions"
|
||||
],
|
||||
[
|
||||
"Roles Played @ Beta-12",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"8b29fcb2-3b9a-444f-b3b0-05976da9a18f"
|
||||
"Teams @ V.1.0",
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"Education Teams",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"2fad4da0-ad26-4ce4-a779-5571aa7d6340"
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"Translations Team",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"0cd21223-d49a-45b1-af83-ec2a31f8caaf"
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"5 Team Members : EvaMaria70 gitforkgit e-Nut Lennart MarinitaMarina",
|
||||
"Position",
|
||||
"Governance",
|
||||
"6ed65be6-de6f-49a1-9c04-d2114e8763a1"
|
||||
"Team Members",
|
||||
"Position"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Position Contribution Claim",
|
||||
"name": "Team Member Exchange Relationships Team",
|
||||
"name": "Team Members Exchange Relationships Team",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"id": "c2c7fd17-ea3d-41f9-a2fd-97fb2e0f5f09",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32765.188169127927,
|
||||
"y": 13848
|
||||
"x": 33088.965391959064,
|
||||
"y": 13660.25
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32678.585628749483,
|
||||
"y": 13898
|
||||
"x": 32991.53753403331,
|
||||
"y": 13716.5
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -704,57 +772,47 @@
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Position",
|
||||
"name": "Team Member",
|
||||
"id": "952609db-1f04-45fb-9acd-948a6fa52d20"
|
||||
"name": "Team Members",
|
||||
"id": "2621796b-2691-4b3e-804a-b909977a8d05"
|
||||
},
|
||||
"referenceParentCombinedNodePath": [
|
||||
[
|
||||
"Superalgos",
|
||||
"Positions",
|
||||
"Governance",
|
||||
"50c68665-5da2-48a4-b229-7a1563ae82d2"
|
||||
"Teams of Contributors",
|
||||
"Positions"
|
||||
],
|
||||
[
|
||||
"Roles Played @ Beta-12",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"8b29fcb2-3b9a-444f-b3b0-05976da9a18f"
|
||||
"Teams @ V.1.0",
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"Marketing Teams",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"27abdc67-60f7-4f6b-8de5-109d1ce1e8d9"
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"Exchange Relationships Team",
|
||||
"Position Class",
|
||||
"Governance",
|
||||
"17c9d4f0-82da-4304-b1e8-b075048ce79c"
|
||||
"Position Class"
|
||||
],
|
||||
[
|
||||
"Team Member",
|
||||
"Position",
|
||||
"Governance",
|
||||
"952609db-1f04-45fb-9acd-948a6fa52d20"
|
||||
"Team Members",
|
||||
"Position"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Position Contribution Claim",
|
||||
"name": "Team Creator EvaMaria70 Non-Tech-Users Community Team",
|
||||
"name": "",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"id": "223537f1-53b1-4e65-8ba4-b98e2a6c3a14",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32728.585628749483,
|
||||
"y": 13984.602540378444
|
||||
"x": 33047.78753403331,
|
||||
"y": 13813.92785792575
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32678.585628749483,
|
||||
"y": 13898
|
||||
"x": 32991.53753403331,
|
||||
"y": 13716.5
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -816,12 +874,12 @@
|
||||
"id": "01e4c26e-e6a4-4688-bf6c-3c35fda086b8",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32678.585628749483,
|
||||
"y": 13898
|
||||
"x": 32991.53753403331,
|
||||
"y": 13716.5
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32548.681818181816,
|
||||
"y": 13973
|
||||
"x": 32796.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -844,12 +902,12 @@
|
||||
"id": "38c01ff9-58e5-4827-927d-c700aaf8205f",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32598.681818181816,
|
||||
"y": 14059.602540378444
|
||||
"x": 32852.931818181816,
|
||||
"y": 13926.42785792575
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32548.681818181816,
|
||||
"y": 13973
|
||||
"x": 32796.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -867,17 +925,17 @@
|
||||
"id": "3e15e7ab-6a1b-4a71-adbc-6fafbf6d9114",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32548.681818181816,
|
||||
"y": 13973
|
||||
"x": 32796.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32398.681818181816,
|
||||
"y": 13973
|
||||
"x": 32571.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"isCollapsed": true,
|
||||
"angleToParent": 3,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
@@ -890,19 +948,19 @@
|
||||
"id": "fe79f40b-9d30-4e86-bda2-1fd8a81599bf",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32398.681818181816,
|
||||
"y": 13973
|
||||
"x": 32571.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 3,
|
||||
"distanceToParent": 4,
|
||||
"arrangementStyle": 2
|
||||
},
|
||||
"uiObject": {
|
||||
@@ -913,7 +971,7 @@
|
||||
"financialPrograms": {
|
||||
"type": "Financial Programs",
|
||||
"name": "New Financial Programs",
|
||||
"config": "{}",
|
||||
"config": "{\r\n \"percentage\": 5\r\n}",
|
||||
"project": "Governance",
|
||||
"stakingProgram": {
|
||||
"type": "Staking Program",
|
||||
@@ -927,12 +985,12 @@
|
||||
"id": "6af397b6-cc73-4dc0-8c33-a2abd1745547",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32565.863151232068,
|
||||
"y": 14162.157857666016
|
||||
"x": 32663.863151232068,
|
||||
"y": 14018.157857666016
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32474.54893688076,
|
||||
"y": 14281.160858709702
|
||||
"x": 32572.54893688076,
|
||||
"y": 14137.160858709702
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -950,12 +1008,12 @@
|
||||
"id": "59357272-6ca3-4539-be7a-6f57e58f2709",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32474.54893688076,
|
||||
"y": 14281.160858709702
|
||||
"x": 32572.54893688076,
|
||||
"y": 14137.160858709702
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32268.429692819926,
|
||||
"y": 14123
|
||||
"x": 32366.429692819926,
|
||||
"y": 13979
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -983,12 +1041,12 @@
|
||||
"id": "805959aa-3810-43e8-8703-76736d28c526",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32383.23472252945,
|
||||
"y": 14400.163859753386
|
||||
"x": 32481.23472252945,
|
||||
"y": 14256.163859753386
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32325.832207674688,
|
||||
"y": 14261.581929876693
|
||||
"x": 32423.832207674688,
|
||||
"y": 14117.581929876693
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1006,12 +1064,12 @@
|
||||
"id": "2691fbbf-b284-4a88-8bd7-93a34e77413b",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32325.832207674688,
|
||||
"y": 14261.581929876693
|
||||
"x": 32423.832207674688,
|
||||
"y": 14117.581929876693
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32268.429692819926,
|
||||
"y": 14123
|
||||
"x": 32366.429692819926,
|
||||
"y": 13979
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1029,17 +1087,17 @@
|
||||
"id": "0f1c339b-84a7-4056-8be1-219cecf4498d",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32268.429692819926,
|
||||
"y": 14123
|
||||
"x": 32366.429692819926,
|
||||
"y": 13979
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 4,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 4
|
||||
@@ -1067,12 +1125,12 @@
|
||||
"id": "47688a3b-9b90-432f-ade9-ef31364e6a4e",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 31948.681818181816,
|
||||
"y": 13453.384757729335
|
||||
"x": 32046.681818181816,
|
||||
"y": 13309.384757729335
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32048.681818181816,
|
||||
"y": 13626.589838486223
|
||||
"x": 32146.681818181816,
|
||||
"y": 13482.589838486223
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1090,12 +1148,12 @@
|
||||
"id": "9f1fd26c-28b9-42f9-9eda-931d2e2eb9fb",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32048.681818181816,
|
||||
"y": 13626.589838486223
|
||||
"x": 32146.681818181816,
|
||||
"y": 13482.589838486223
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32148.681818181816,
|
||||
"y": 13799.794919243112
|
||||
"x": 32246.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1114,12 +1172,12 @@
|
||||
"id": "c8240246-1ad9-4850-8dad-a0222a92619f",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32148.681818181816,
|
||||
"y": 13799.794919243112
|
||||
"x": 32246.681818181816,
|
||||
"y": 13655.794919243112
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1137,11 +1195,11 @@
|
||||
"id": "b96160c4-e1e8-4ad4-bbf6-a6cd35076877",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32248.681818181816,
|
||||
"y": 13973
|
||||
"x": 32346.681818181816,
|
||||
"y": 13829
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 22727.272727272728,
|
||||
"x": 31818.181818181816,
|
||||
"y": 14000.000000000002
|
||||
},
|
||||
"floatingObject": {
|
||||
@@ -1164,11 +1222,11 @@
|
||||
"id": "f95822af-6480-47f6-9f64-93e3b0da64d5",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 22577.272727272728,
|
||||
"x": 31668.181818181816,
|
||||
"y": 14000.000000000002
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 22727.272727272728,
|
||||
"x": 31818.181818181816,
|
||||
"y": 14000.000000000002
|
||||
},
|
||||
"floatingObject": {
|
||||
@@ -1187,11 +1245,11 @@
|
||||
"id": "75a78d74-93f3-44c5-a96a-5b2b9f730afe",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 22727.272727272728,
|
||||
"x": 31818.181818181816,
|
||||
"y": 14000.000000000002
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 22727.272727272728,
|
||||
"x": 31818.181818181816,
|
||||
"y": 14000.000000000002
|
||||
},
|
||||
"floatingObject": {
|
||||
|
||||
@@ -1418,13 +1418,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x898b2153520afe468c285dc7432b52f2e61e5572215917a3761e1ebffbd55bcd\",\n \"s\": \"0x3fdd357a3bde3776062cbfb29ed6b82fa4b071fe0e2339a2b42b9ec47ada851f\",\n \"signature\": \"0x898b2153520afe468c285dc7432b52f2e61e5572215917a3761e1ebffbd55bcd3fdd357a3bde3776062cbfb29ed6b82fa4b071fe0e2339a2b42b9ec47ada851f1c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xb7856f6e87c3a2808f7ad16a0bfbc33594edf7fdda4147281753caa04b828cb1\",\n \"s\": \"0x32239a2a5d29887a37d70a377a8d2d234d915036c12622b45feca6a070c0c932\",\n \"signature\": \"0xb7856f6e87c3a2808f7ad16a0bfbc33594edf7fdda4147281753caa04b828cb132239a2a5d29887a37d70a377a8d2d234d915036c12622b45feca6a070c0c9321b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "71e01eca-2d04-43fa-8cb2-144b64507402",
|
||||
"id": "5bbf87b3-0c88-4762-8963-dcc013778923",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37947.26095580142,
|
||||
"y": 19649.585369022054
|
||||
"x": 37688.45333466609,
|
||||
"y": 19598.585369022054
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37687.45333466609,
|
||||
@@ -1474,13 +1474,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xf6cd2df3ab15cd9652bd018ee571b120faa2003a91f61d7b7836220d9a712355\",\n \"s\": \"0x5c8f89f5eabd9e43a0e24383d475c1b56ea760fe1190a67a43dc139b1567d64c\",\n \"signature\": \"0xf6cd2df3ab15cd9652bd018ee571b120faa2003a91f61d7b7836220d9a7123555c8f89f5eabd9e43a0e24383d475c1b56ea760fe1190a67a43dc139b1567d64c1b\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xb3caae868f8d2f39d2c8d005e52864fb89446fa46e9b3b7d1246aa5882e04206\",\n \"s\": \"0x36f9db32a86b7416906f54b478af814963e75e16c36ab2fea11b16d90a6f4869\",\n \"signature\": \"0xb3caae868f8d2f39d2c8d005e52864fb89446fa46e9b3b7d1246aa5882e0420636f9db32a86b7416906f54b478af814963e75e16c36ab2fea11b16d90a6f48691b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "95b48c78-cfba-4457-aab0-270225a4d2f7",
|
||||
"id": "ef671e4a-85ca-44a2-aaff-46986537af62",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37582.93714059227,
|
||||
"y": 19929.140864795496
|
||||
"x": 37558.291427061515,
|
||||
"y": 19577.363116908775
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37505.291427061515,
|
||||
@@ -1532,13 +1532,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x49610638d20ae306ccfb31e65bde5fdbf47203a97ad01d9f4378e7321084a727\",\n \"s\": \"0x2be4f2d5072fb88475d2f07beacf09295e46f246785e976e58794923f00d002b\",\n \"signature\": \"0x49610638d20ae306ccfb31e65bde5fdbf47203a97ad01d9f4378e7321084a7272be4f2d5072fb88475d2f07beacf09295e46f246785e976e58794923f00d002b1b\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xa452ff2bc00af08db7ec00f485eabb777b688a121bec31aeb39adb2449b20e49\",\n \"s\": \"0x2ba6fb158373c827fc6d46083011e2bc6b6d0a91d122ac6a85625c32fc2e1e36\",\n \"signature\": \"0xa452ff2bc00af08db7ec00f485eabb777b688a121bec31aeb39adb2449b20e492ba6fb158373c827fc6d46083011e2bc6b6d0a91d122ac6a85625c32fc2e1e361c\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "aa0a9beb-3498-4184-97a2-5f85181199fa",
|
||||
"id": "616fc2e6-2286-49ce-b037-9da2b153a8f5",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37127.64571353076,
|
||||
"y": 19869.20061129272
|
||||
"x": 37345.64571353076,
|
||||
"y": 19667.392990157387
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37277.64571353076,
|
||||
@@ -1618,13 +1618,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x79f3cfdf758eeaeadcfca9163d9b8d58fe10ad0b4e8f2c7ce1da90e262058a1a\",\n \"s\": \"0x41ed971b2a304885eac9101f6d0e70964ef707b8589f2ce0dd4058737ab87611\",\n \"signature\": \"0x79f3cfdf758eeaeadcfca9163d9b8d58fe10ad0b4e8f2c7ce1da90e262058a1a41ed971b2a304885eac9101f6d0e70964ef707b8589f2ce0dd4058737ab876111b\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xc61a99e7e06f91a85feb75e1ffb602f40c58d9746f46d507f3d450582ef18fd9\",\n \"s\": \"0x29ac7352f6bd02c6779637a3dd3e68ba06ec02acfa9b79f576587a732f0cc7b4\",\n \"signature\": \"0xc61a99e7e06f91a85feb75e1ffb602f40c58d9746f46d507f3d450582ef18fd929ac7352f6bd02c6779637a3dd3e68ba06ec02acfa9b79f576587a732f0cc7b41c\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "53d1e709-d520-44a9-9321-43cd5f1df872",
|
||||
"id": "c958d032-f21f-4e60-9d93-410ca3f650f8",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 36900,
|
||||
"y": 19839.23048454133
|
||||
"x": 37066,
|
||||
"y": 19626.422863406
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37050,
|
||||
@@ -1704,13 +1704,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Task-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xe631e24d501ccb6de25efdffedeb36e75d678d426d269aca7fa29116886ca6cd\",\n \"s\": \"0x3c16d8e0cf5220b5bf2078cab8d8aa48f1e0ef777228c19a5cf3d0ce7ac5340d\",\n \"signature\": \"0xe631e24d501ccb6de25efdffedeb36e75d678d426d269aca7fa29116886ca6cd3c16d8e0cf5220b5bf2078cab8d8aa48f1e0ef777228c19a5cf3d0ce7ac5340d1b\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Task-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xe69562f3d6fce7a56692c7d000ddf95bc313dc513f1aabdde1f9ee4a09a3a1c8\",\n \"s\": \"0x5da50897902dce98a44b1f94dc498037baa93fe51ca5e08064f0785a00092ee1\",\n \"signature\": \"0xe69562f3d6fce7a56692c7d000ddf95bc313dc513f1aabdde1f9ee4a09a3a1c85da50897902dce98a44b1f94dc498037baa93fe51ca5e08064f0785a00092ee11b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "faa2d0ea-4e8d-4e79-9e21-e0006cce48c6",
|
||||
"id": "90f0eaeb-99a4-4e19-ae05-c19567059dba",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 36760.22225211328,
|
||||
"y": 19657.068576936756
|
||||
"x": 36832.22225211328,
|
||||
"y": 19368.260955801423
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 36910.22225211328,
|
||||
@@ -1760,13 +1760,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Task-Server-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x3e8698a5bf00f3b5d13eda57ce6dc77a0670915b6277b160e8c23df30553a3cb\",\n \"s\": \"0x2e7d7ac3fb1100a55886a30ae9a62484040dfbf64995695a4de3ef9f2c9cef9e\",\n \"signature\": \"0x3e8698a5bf00f3b5d13eda57ce6dc77a0670915b6277b160e8c23df30553a3cb2e7d7ac3fb1100a55886a30ae9a62484040dfbf64995695a4de3ef9f2c9cef9e1c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Task-Server-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xee23a1f8bae29ecb2ceb8ea501e3f75b3e4969cda04dd1c4d4009e84d260409d\",\n \"s\": \"0x1bba5e0ef908751361f0137cc8b93d834010447589ea7c28682c44db71e06081\",\n \"signature\": \"0xee23a1f8bae29ecb2ceb8ea501e3f75b3e4969cda04dd1c4d4009e84d260409d1bba5e0ef908751361f0137cc8b93d834010447589ea7c28682c44db71e060811b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "e85e08cc-a688-4ff5-b515-fb3ca67708ee",
|
||||
"id": "358e8b10-6a2b-4711-b842-42ff37c8b9a0",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 36480.66675633984,
|
||||
"y": 19292.744761727605
|
||||
"x": 36684.44450422656,
|
||||
"y": 19186.099048196847
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 36770.44450422656,
|
||||
@@ -1818,13 +1818,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x944f1d46c6e725609e832f380de33e9871a28606a604d74c9fd9be33dbb6cec2\",\n \"s\": \"0x75ce5a3316bdefebfd28f7ea1d462a1751d1ab76d5997ae4c9cf14fe9a3467f4\",\n \"signature\": \"0x944f1d46c6e725609e832f380de33e9871a28606a604d74c9fd9be33dbb6cec275ce5a3316bdefebfd28f7ea1d462a1751d1ab76d5997ae4c9cf14fe9a3467f41c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x7c60590c40a658cf32166197a19aecd6d3ce790e34e7bcd26417ce28b414f810\",\n \"s\": \"0x53f1b2191fd5dbc94ef8acb711ba2362a3fb8f114bf206a26f8119a4611dde2b\",\n \"signature\": \"0x7c60590c40a658cf32166197a19aecd6d3ce790e34e7bcd26417ce28b414f81053f1b2191fd5dbc94ef8acb711ba2362a3fb8f114bf206a26f8119a4611dde2b1c\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "553eb437-f487-4cd0-95b0-8ba6bb3d5f51",
|
||||
"id": "3c08805f-d53a-4091-b671-4dfab46af594",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 36540.60700984261,
|
||||
"y": 18837.45333466609
|
||||
"x": 36877.414630977946,
|
||||
"y": 19025.45333466609
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 36800.414630977946,
|
||||
@@ -2077,13 +2077,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Bot-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xf60f00a96558f3fc94e71d59460c3bdd43e62f0c5706bb68805280817b840ac6\",\n \"s\": \"0x63b83b8d1629709d9ccca81efee72d9950e224078a9e396f1ffdb5cc2fcd6d51\",\n \"signature\": \"0xf60f00a96558f3fc94e71d59460c3bdd43e62f0c5706bb68805280817b840ac663b83b8d1629709d9ccca81efee72d9950e224078a9e396f1ffdb5cc2fcd6d511c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Bot-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xf20489ce6a3ce04e64b7830049fe1178167e68343153d4a6ffa627269951f133\",\n \"s\": \"0x45ec9473ae6ec521d73dbe01756da5b7cd4aba51ddb1ca244cf8c146fca86ef8\",\n \"signature\": \"0xf20489ce6a3ce04e64b7830049fe1178167e68343153d4a6ffa627269951f13345ec9473ae6ec521d73dbe01756da5b7cd4aba51ddb1ca244cf8c146fca86ef81c\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "ca84c500-2c93-441e-be41-0d5dadfa62be",
|
||||
"id": "c16d25bb-6e53-4229-acd1-6384d8765a0b",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32452.525712198003,
|
||||
"y": 19030
|
||||
"x": 32554.525712198003,
|
||||
"y": 18873
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32473.525712198003,
|
||||
@@ -3038,13 +3038,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Bot-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xddeff57782baa1f4650b7bcaf293102a9d5b2260db3176e2e9ab4d046d4339a5\",\n \"s\": \"0x3640cbc79138edab416ea73b89eccbce87c9fe04628bb3e8964c4650fb82dec3\",\n \"signature\": \"0xddeff57782baa1f4650b7bcaf293102a9d5b2260db3176e2e9ab4d046d4339a53640cbc79138edab416ea73b89eccbce87c9fe04628bb3e8964c4650fb82dec31c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Trading-Bot-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x7fd30d009b5a44db7499e502c45b1440a116a4d75b867c87930ae288f91a338f\",\n \"s\": \"0x693cda2392a47563bceb9806483ae267629dcda78176ae9624e931b9d4ea462e\",\n \"signature\": \"0x7fd30d009b5a44db7499e502c45b1440a116a4d75b867c87930ae288f91a338f693cda2392a47563bceb9806483ae267629dcda78176ae9624e931b9d4ea462e1b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "5f1fdb9a-c7ae-4760-a188-80ee15eff0ae",
|
||||
"id": "ff1ea43f-4160-43c1-8ee1-6bf5943686e5",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 32451.525712198003,
|
||||
"y": 18562
|
||||
"x": 32518.525712198003,
|
||||
"y": 18581
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 32473.525712198003,
|
||||
@@ -3514,13 +3514,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Persona-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xaabe9a8f34b22d058200320e218af3bd58f77ba26127903f72f4b39b4fec9199\",\n \"s\": \"0x5e8d7ebe876a3712611196205aa664b96d20ce547b04d50420fb27baa4b7e721\",\n \"signature\": \"0xaabe9a8f34b22d058200320e218af3bd58f77ba26127903f72f4b39b4fec91995e8d7ebe876a3712611196205aa664b96d20ce547b04d50420fb27baa4b7e7211c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Persona-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xe39747b8f0cf55261bf82a3139a41e1581b79789e82430c49fd8ad5fbc6a8460\",\n \"s\": \"0x27f0fa30bed4af002887b8d77e7e389097e11ba886ea44ea942839ee7ac5959a\",\n \"signature\": \"0xe39747b8f0cf55261bf82a3139a41e1581b79789e82430c49fd8ad5fbc6a846027f0fa30bed4af002887b8d77e7e389097e11ba886ea44ea942839ee7ac5959a1c\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "e4f9d4a6-c9d1-4d7a-a2e0-dc7d4105768e",
|
||||
"id": "2087a41a-a76c-4d1f-a71c-29dfdb886a5d",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37249.19189848183,
|
||||
"y": 18241.606064796506
|
||||
"x": 37322.19189848183,
|
||||
"y": 18289.606064796506
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37229.19189848183,
|
||||
@@ -3570,13 +3570,13 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"Social-Persona-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x71413077e5544c24a616c565fb761f45454233e18b2b29bc13b9aca5e249b5ac\",\n \"s\": \"0x2d25d9101c4dde0d1ab9e2ebcfc79e156a051350741f41083b7d6162ce220436\",\n \"signature\": \"0x71413077e5544c24a616c565fb761f45454233e18b2b29bc13b9aca5e249b5ac2d25d9101c4dde0d1ab9e2ebcfc79e156a051350741f41083b7d6162ce2204361b\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"Social-Persona-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x791a6cfb6af87cb37e3c98766c829fe7adfae9c5d64aa03aae824d19ec5ecc38\",\n \"s\": \"0x05ff43ad3b73f1c05aafcbe5deb89d05bbefd3f9bec426c6a93bb7f7d2c684ab\",\n \"signature\": \"0x791a6cfb6af87cb37e3c98766c829fe7adfae9c5d64aa03aae824d19ec5ecc3805ff43ad3b73f1c05aafcbe5deb89d05bbefd3f9bec426c6a93bb7f7d2c684ab1b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "bd27765f-4612-4b57-befe-3d76d764d668",
|
||||
"id": "e679fa5a-4e7b-4550-9be9-6f5c65d0a7ea",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37569.670272136376,
|
||||
"y": 18187.84978460961
|
||||
"x": 37586.670272136376,
|
||||
"y": 18150.84978460961
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 37521.670272136376,
|
||||
@@ -3656,9 +3656,9 @@
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xa519983fd30d4340dde3aed5d8eaa99befeb611ddc08c99e8eaa629491b6faf5\",\n \"s\": \"0x3083736197c5d4f0d071168f9becdb113cb93f054e2370ed11b555a047d70eb3\",\n \"signature\": \"0xa519983fd30d4340dde3aed5d8eaa99befeb611ddc08c99e8eaa629491b6faf53083736197c5d4f0d071168f9becdb113cb93f054e2370ed11b555a047d70eb31c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xbdf8238593b801dc6969d275052c0a95c6d8e041ba9b197ea039a6782c3b1686\",\n \"s\": \"0x2546945aeec87f977a934bb8ef153de38c9824c4d538f2dc8b9482c2b3966d9e\",\n \"signature\": \"0xbdf8238593b801dc6969d275052c0a95c6d8e041ba9b197ea039a6782c3b16862546945aeec87f977a934bb8ef153de38c9824c4d538f2dc8b9482c2b3966d9e1b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "99c27360-3dbf-44c6-ba6c-eea9da1711ce",
|
||||
"id": "c22841c9-fe97-44c8-850b-b297c61d5071",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 37650,
|
||||
@@ -3707,14 +3707,14 @@
|
||||
{
|
||||
"type": "P2P Network Node",
|
||||
"name": "P2P Network Node #2",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"host\": \"localhost\",\n \"webPort\": \"31248\",\n \"webSocketsPort\": \"18042\"\n}",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"host\": \"localhost\",\n \"webPort\": \"31249\",\n \"webSocketsPort\": \"18043\"\n}",
|
||||
"project": "Governance",
|
||||
"signingAccount": {
|
||||
"type": "Signing Account",
|
||||
"name": "New Signing Account",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x82de669c37cc4d376aad3369d00db371ffdd2dbe06a21393cb736c0be5d71116\",\n \"s\": \"0x510d1f631ad66b71613e9ef6ad64c4b5510d494b74cc29462cc2e26ac64f5736\",\n \"signature\": \"0x82de669c37cc4d376aad3369d00db371ffdd2dbe06a21393cb736c0be5d71116510d1f631ad66b71613e9ef6ad64c4b5510d494b74cc29462cc2e26ac64f57361c\"\n }\n}",
|
||||
"config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x114b5ecd16068e194613344da55f9649164e303030b311a80c1c89b8d3f3640a\",\n \"s\": \"0x72497582c2122f8185c581a1365aa7881e602a82588cc67ef0a64e88139e11ea\",\n \"signature\": \"0x114b5ecd16068e194613344da55f9649164e303030b311a80c1c89b8d3f3640a72497582c2122f8185c581a1365aa7881e602a82588cc67ef0a64e88139e11ea1b\"\n }\n}",
|
||||
"project": "Governance",
|
||||
"id": "afa8b24a-6618-4811-8d42-49321b95f4ac",
|
||||
"id": "229d11eb-449d-4fb1-8841-b2bc3f1c06a4",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 38169.615242270665,
|
||||
@@ -3774,7 +3774,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
File diff suppressed because it is too large.
Load diff
@@ -99,12 +99,12 @@
|
||||
"id": "db380c52-cf90-475b-87df-c005dd51cdf6",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 13705.000000000002,
|
||||
"y": 6103.05830753354
|
||||
"x": 14014.000000000002,
|
||||
"y": 6057.05830753354
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 13705.000000000002,
|
||||
"y": 6103.05830753354
|
||||
"x": 14014.000000000002,
|
||||
"y": 6057.05830753354
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": true,
|
||||
@@ -2914,7 +2914,7 @@
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"isCollapsed": true,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 5,
|
||||
"arrangementStyle": 0
|
||||
@@ -5059,6 +5059,7 @@
|
||||
"arrangementStyle": 1
|
||||
},
|
||||
"uiObject": {
|
||||
"isPlaying": true,
|
||||
"isRunning": false
|
||||
},
|
||||
"tutorial": {
|
||||
|
||||
@@ -78,6 +78,16 @@
|
||||
"iconPathOff": "configuration",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Save Plugin",
|
||||
"actionProject": "Community-Plugins",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Install",
|
||||
"label": "Save Plugin",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"actionProject": "Visual-Scripting",
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
},
|
||||
{
|
||||
"language": "TR",
|
||||
"text": "Çalışma alanını her kaydettiğinizde profilinizi Eklenti olarak kaydedecek şekilde ayarladık! Plugins düğümünü genişleterek Governance Plugin Project düğümünü bulun.Bu düğümün altında Plugin User Profiles düğümünü de genişletrek kullanıcı profilinize erişin ve \"Save Plugin\" butonuna tıklayarak profilinizi kaydedin.",
|
||||
"text": "Çalışma alanını her kaydettiğinizde profilinizi Eklenti olarak kaydedecek şekilde ayarladık! Plugins düğümünü genişleterek Governance Plugin Project düğümünü bulun.Bu düğümün altında Plugin User Profiles düğümünü de genişletrek kullanıcı profilinize erişin ve \"Save Plugin File\" butonuna tıklayarak profilinizi kaydedin.",
|
||||
"updated": 1637442025686
|
||||
}
|
||||
]
|
||||
|
||||
@@ -232,6 +232,7 @@ function newGovernanceFunctionLibraryProfileConstructor() {
|
||||
addSigningAccounts(p2pNetworkNodes, 'P2P Network Node')
|
||||
|
||||
function addSigningAccounts(nodeArray, targetNodeType) {
|
||||
if (nodeArray === undefined) return;
|
||||
for (let i = 0; i < nodeArray.length; i++) {
|
||||
let currentNode = nodeArray[i]
|
||||
addSigningAccount(currentNode, targetNodeType, i + 1)
|
||||
@@ -273,10 +274,10 @@ function newGovernanceFunctionLibraryProfileConstructor() {
|
||||
console.log('Call to WEB3 Server failed. ' + response.error)
|
||||
return
|
||||
}
|
||||
signSigningAccountData(response.privateKey)
|
||||
signSigningAccountData(response.address, response.privateKey)
|
||||
}
|
||||
|
||||
function signSigningAccountData(privateKey) {
|
||||
function signSigningAccountData(blockchainAccount, privateKey) {
|
||||
|
||||
let request = {
|
||||
url: 'WEB3',
|
||||
@@ -340,7 +341,13 @@ function newGovernanceFunctionLibraryProfileConstructor() {
|
||||
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(targetNode.payload, 'codeName', codeName)
|
||||
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'codeName', codeName)
|
||||
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'signature', signature)
|
||||
|
||||
/*
|
||||
Save User Profile Plugin
|
||||
*/
|
||||
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePluginHierarchy(userProfile)
|
||||
/*
|
||||
Deal with secrets
|
||||
*/
|
||||
let secrets = secretsFile.secrets
|
||||
|
||||
let secret = {
|
||||
@@ -349,6 +356,7 @@ function newGovernanceFunctionLibraryProfileConstructor() {
|
||||
nodeType: targetNodeType,
|
||||
nodeCodeName: codeName,
|
||||
signingAccountNodeId: signingAccount.id,
|
||||
blockchainAccount: blockchainAccount,
|
||||
privateKey: privateKey,
|
||||
userProfileHandle: userProfileHandle,
|
||||
userProfileId: userProfile.id
|
||||
|
||||
@@ -8,7 +8,8 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
port: undefined,
|
||||
callerRole: undefined,
|
||||
p2pNetworkNode: undefined,
|
||||
p2pNetworkIdentity: undefined,
|
||||
p2pNetworkClientIdentity: undefined,
|
||||
p2pNetworkClientCodeName: undefined,
|
||||
onConnectionClosedCallBack: undefined,
|
||||
sendMessage: sendMessage,
|
||||
initialize: initialize,
|
||||
@@ -30,7 +31,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
thisObject.port = undefined
|
||||
thisObject.callerRole = undefined
|
||||
thisObject.p2pNetworkNode = undefined
|
||||
thisObject.p2pNetworkIdentity = undefined
|
||||
thisObject.p2pNetworkClientIdentity = undefined
|
||||
thisObject.onConnectionClosedCallBack = undefined
|
||||
|
||||
web3 = undefined
|
||||
@@ -38,10 +39,11 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
onMessageFunctionsMap = undefined
|
||||
}
|
||||
|
||||
async function initialize(callerRole, p2pNetworkIdentity, p2pNetworkNode, onConnectionClosedCallBack) {
|
||||
async function initialize(callerRole, p2pNetworkClientIdentity, p2pNetworkNode, onConnectionClosedCallBack) {
|
||||
|
||||
thisObject.callerRole = callerRole
|
||||
thisObject.p2pNetworkIdentity = p2pNetworkIdentity
|
||||
thisObject.p2pNetworkClientIdentity = p2pNetworkClientIdentity
|
||||
thisObject.p2pNetworkClientCodeName = JSON.parse(thisObject.p2pNetworkClientIdentity.node.config).codeName
|
||||
thisObject.p2pNetworkNode = p2pNetworkNode
|
||||
thisObject.onConnectionClosedCallBack = onConnectionClosedCallBack
|
||||
|
||||
@@ -100,9 +102,9 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
let message = {
|
||||
messageType: 'Handshake',
|
||||
callerRole: thisObject.callerRole,
|
||||
callerProfileHandle: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle,
|
||||
callerProfileHandle: SA.secrets.map.get(thisObject.p2pNetworkClientCodeName).userProfileHandle,
|
||||
callerTimestamp: callerTimestamp,
|
||||
callerNode: JSON.stringify(thisObject.p2pNetworkIdentity.node),
|
||||
callerNode: JSON.stringify(thisObject.p2pNetworkClientIdentity.node),
|
||||
step: 'One'
|
||||
}
|
||||
thisObject.socket.send(JSON.stringify(message))
|
||||
@@ -162,7 +164,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
We will check that the profile handle we sent to the Network Node, is returned at the
|
||||
signed message, to avoid man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle) {
|
||||
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(thisObject.p2pNetworkClientCodeName).userProfileHandle) {
|
||||
console.log('[ERROR] Web Sockets Network Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.')
|
||||
reject()
|
||||
return
|
||||
@@ -192,7 +194,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
*/
|
||||
thisObject.socket.onmessage = socketMessage => { stepTwoResponse(socketMessage) }
|
||||
|
||||
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).privateKey)
|
||||
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(thisObject.p2pNetworkClientCodeName).privateKey)
|
||||
|
||||
let message = {
|
||||
messageType: 'Handshake',
|
||||
|
||||
+2
-2
@@ -197,7 +197,7 @@ exports.newPortfolioManagementBotModulesOrdersSimulations = function (processInd
|
||||
Until here we have got the Actual Rate based on the formula definition or based on session parameters slippage.
|
||||
The last check is about watching what happened in the market. Let's remember that the exchange will
|
||||
fill the order with the best possible matches at it's order book. That means that if the rate
|
||||
we set for the order was too low (for a sale order) or too hight (for a buy order), the actual rate
|
||||
we set for the order was too low (for a sale order) or too high (for a buy order), the actual rate
|
||||
should be better than expected.
|
||||
|
||||
We don't know what it is at the order book, but whe know that the last candle includes trades that bounced between
|
||||
@@ -208,7 +208,7 @@ exports.newPortfolioManagementBotModulesOrdersSimulations = function (processInd
|
||||
case portfolioSystemOrder.type === 'Market Buy Order' || portfolioSystemOrder.type === 'Limit Buy Order': {
|
||||
if (portfolioEngineOrder.orderStatistics.actualRate.value > portfolioEngine.portfolioCurrent.portfolioEpisode.candle.max.value) {
|
||||
|
||||
const message = 'Simulating - Actual Rate Too Hight'
|
||||
const message = 'Simulating - Actual Rate Too High'
|
||||
let docs = {
|
||||
project: 'Foundations',
|
||||
category: 'Topic',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
The Superalgos Desktop is one of the 3 clients of the Superalgos P2P Network:
|
||||
|
||||
* Superalgos Mobile
|
||||
* Superalgos Desktop
|
||||
* Superalgos Server
|
||||
|
||||
Users can use any of these clients for their social trading activities.
|
||||
|
||||
This module represents the Nodejs command that users have to start the Desktop App..
|
||||
|
||||
*/
|
||||
|
||||
let APP_ROOT = require('./DesktopRootReact')
|
||||
let APP_ROOT_MODULE = APP_ROOT.newDesktopRoot()
|
||||
APP_ROOT_MODULE.run()
|
||||
Generated
+34066
-331
File diff suppressed because it is too large.
Load diff
+86
-2
@@ -13,7 +13,10 @@
|
||||
"setup": "node setup noShortcuts && node tf_setup.js",
|
||||
"postsetup": "npm start",
|
||||
"dist": "electron-builder -c build/electron-builder.json",
|
||||
"postinstall": "electron-builder install-app-deps"
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"startNetwork" : "node network",
|
||||
"startDesktop": "node desktop",
|
||||
"startDesktopReact": "node desktop-react"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/rest": "^18.12.0",
|
||||
@@ -35,7 +38,76 @@
|
||||
"twitter": "^1.7.1",
|
||||
"util": "^0.12.4",
|
||||
"web3": "^1.6.1",
|
||||
"ws": "^8.2.3"
|
||||
"ws": "^8.2.3",
|
||||
"@babel/core": "7.12.3",
|
||||
"@emotion/react": "^11.6.0",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@mui/icons-material": "^5.1.1",
|
||||
"@mui/material": "^5.1.1",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "0.4.3",
|
||||
"@reduxjs/toolkit": "^1.6.2",
|
||||
"@svgr/webpack": "5.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.5.0",
|
||||
"@typescript-eslint/parser": "^4.5.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.6.0",
|
||||
"babel-loader": "8.1.0",
|
||||
"babel-plugin-named-asset-import": "^0.3.7",
|
||||
"babel-preset-react-app": "^10.0.0",
|
||||
"bfj": "^7.0.2",
|
||||
"camelcase": "^6.1.0",
|
||||
"case-sensitive-paths-webpack-plugin": "2.3.0",
|
||||
"css-loader": "4.3.0",
|
||||
"dotenv": "8.2.0",
|
||||
"dotenv-expand": "5.1.0",
|
||||
"eslint": "^7.11.0",
|
||||
"eslint-config-react-app": "^6.0.0",
|
||||
"eslint-plugin-flowtype": "^5.2.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jest": "^24.1.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"eslint-plugin-testing-library": "^3.9.2",
|
||||
"eslint-webpack-plugin": "^2.5.2",
|
||||
"file-loader": "6.1.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.6.0",
|
||||
"jest-circus": "26.6.0",
|
||||
"jest-resolve": "26.6.0",
|
||||
"jest-watch-typeahead": "0.6.1",
|
||||
"mini-css-extract-plugin": "0.11.3",
|
||||
"optimize-css-assets-webpack-plugin": "5.0.4",
|
||||
"pnp-webpack-plugin": "1.6.4",
|
||||
"postcss-flexbugs-fixes": "4.2.1",
|
||||
"postcss-loader": "3.0.0",
|
||||
"postcss-normalize": "8.0.1",
|
||||
"postcss-preset-env": "6.7.0",
|
||||
"postcss-safe-parser": "5.0.2",
|
||||
"prompts": "2.4.0",
|
||||
"react": "^17.0.2",
|
||||
"react-app-polyfill": "^2.0.0",
|
||||
"react-dev-utils": "^11.0.3",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-redux": "^7.2.6",
|
||||
"react-refresh": "^0.8.3",
|
||||
"react-router-dom": "^6.0.2",
|
||||
"redux": "^4.1.2",
|
||||
"resolve": "1.18.1",
|
||||
"resolve-url-loader": "^3.1.2",
|
||||
"sass-loader": "^10.0.5",
|
||||
"semver": "7.3.2",
|
||||
"style-loader": "1.3.0",
|
||||
"terser-webpack-plugin": "4.2.3",
|
||||
"ts-pnp": "1.2.0",
|
||||
"url-loader": "4.1.1",
|
||||
"web-vitals": "^1.1.2",
|
||||
"webpack": "4.44.2",
|
||||
"webpack-dev-server": "3.11.1",
|
||||
"webpack-manifest-plugin": "2.2.0",
|
||||
"workbox-webpack-plugin": "5.1.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tensorflow/tfjs-node": "^2.8.6"
|
||||
@@ -43,5 +115,17 @@
|
||||
"devDependencies": {
|
||||
"electron": "^15.1.0",
|
||||
"electron-builder": "^22.14.5"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user