Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Logger = require('logplease')
Logger.setLogLevel('NONE') // turn off logs
const logger = Logger.create('orbitdb-cli', { color: Logger.Colors.Cyan })
module.exports = (e, displayErrorMessage = true) => {
if (displayErrorMessage) {
console.error('Error:', e.message)
logger.error(e.stack)
} else {
console.error(e.message)
}
process.exit(1)
}
"use strict";
const emitter_1 = require("./public/js/emitter/emitter");
/**
* Created by Derwish (derwish.pro@gmail.com) on 04.07.2016.
* License: http://www.gnu.org/licenses/gpl-3.0.txt
*/
//source map for node typescript debug
require('source-map-support').install();
console.log("----------------------------- SingleHub -----------------------------");
let config = require('./config.json');
const server_1 = require('./modules/server/server');
const container_1 = require('./public/nodes/container');
//add app root dir to global
const path = require('path');
global.__rootdirname = path.resolve(__dirname);
const log = require('logplease').create('app', { color: 2 });
class App extends emitter_1.Emitter {
constructor() {
super();
this.createServer();
if (!config.firstRun)
this.start();
//this need for app. in other modules
// setTimeout(this.lateConstructor.bind(this),100);
}
lateConstructor() {
this.createServer();
if (!config.firstRun)
this.start();
}
start() {
if (!this.rootContainer) {
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License 3.0 as published by
// the Free Software Foundation. See
//
// Written by Ivan Bravo Bravo , 2019.
import { isNil } from 'lodash'
import { spawn } from 'child_process'
import EventBus from 'js-event-bus'
import deferred from 'deferred'
import semverRegex from 'semver-regex'
import { existsSync } from './fs'
import { getPowerPath } from './paths'
import { settings } from '../services'
const logger = require('logplease').create('electron:power')
export function exec(args, options = {}) {
args.push('--debug')
if (settings.processing.usePython) {
// python script
args.unshift('main.py')
logger.debug('Spawning Python script.', {
args,
options,
})
return spawn('python3', args, {
cwd: getPowerPath(),
...options,
/**
* Created by Derwish (derwish.pro@gmail.com) on 04.07.2016.
* License: http://www.gnu.org/licenses/gpl-3.0.txt
*/
import { Container, Side } from "./container";
import Utils from "./utils";
// import { Editor } from "../js/editor/editor";
// import { Renderer } from "../js/editor/renderer";
const log = require('logplease').create('node', { color: 5 });
export interface IInputInfo {
input: NodeInput;
slot: number;
link_pos: [number, number];
locked: boolean;
}
export interface IOutputInfo {
output: NodeOutput;
slot: number;
link_pos: [number, number];
locked: boolean;
}
constructor() {
this._logger = logplease.create(`updater:${this.name}`)
}
'use strict'
const Logger = require('logplease')
Logger.setLogLevel(process.env.LOG_LEVEL || 'INFO')
module.exports = Logger.create('notifications', { showTimestamp: false })
'use strict'
const Logger = require('logplease')
Logger.setLogLevel(process.env.LOG_LEVEL || 'INFO')
module.exports = Logger.create('origin-bridge', {
color: Logger.Colors.Yellow,
showTimestamp: false
})
'use strict'
const Logger = require('logplease')
Logger.setLogLevel('DEBUG')
module.exports = Logger.create('origin-dapp-creator-server', {
color: Logger.Colors.Green
})
'use strict'
const Logger = require('logplease')
Logger.setLogLevel('DEBUG')
module.exports = Logger.create('origin-ipfs-proxy', {
color: Logger.Colors.Yellow
})
'use strict'
const Logger = require('logplease')
const logLevel = process.env.LOG_LEVEL || 'INFO'
Logger.setLogLevel(logLevel)
module.exports = Logger.create('token-transfer-server', {
showTimestamp: false
})