Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • 305-re-enable-sanity-tests
  • 308-add-a-runtime-api-to-simulate-max-net-tx-cost-for-the-end-user-fees-refund
  • 270-parametrage-de-la-gtest
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
  • runtime-401 protected
  • v0.4.0 protected
40 results

.editorconfig

Blame
  • index.ts 20.26 KiB
    // Source file from duniter: Crypto-currency software to manage libre currency such as Ğ1
    // Copyright (C) 2018  Cedric Moreau <cem.moreau@gmail.com>
    //
    // This program is free software: you can redistribute it and/or modify
    // it under the terms of the GNU Affero General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU Affero General Public License for more details.
    
    import {ExecuteCommand} from "./app/cli"
    import * as stream from "stream"
    import {Server} from "./server"
    import {ConfDTO} from "./app/lib/dto/ConfDTO"
    import {ProverDependency} from "./app/modules/prover/index"
    import {KeypairDependency} from "./app/modules/keypair/index"
    import {CrawlerDependency} from "./app/modules/crawler/index"
    import {BmaDependency} from "./app/modules/bma/index"
    import {WS2PDependency} from "./app/modules/ws2p/index"
    import {ProverConstants} from "./app/modules/prover/lib/constants"
    import {ProxiesConf} from './app/lib/proxy';
    import {RouterDependency} from "./app/modules/router"
    import {OtherConstants} from "./app/lib/other_constants"
    import {Directory} from "./app/lib/system/directory"
    import {Underscore} from "./app/lib/common-libs/underscore"
    import {CliCommand, DuniterDependency, DuniterModule} from "./app/modules/DuniterModule"
    import {ProgramOptions} from "./app/lib/common-libs/programOptions"
    import {ExitCodes} from "./app/lib/common-libs/exit-codes"
    
    const path = require('path');
    const constants = require('./app/lib/constants');
    const logger = require('./app/lib/logger').NewLogger('duniter');
    
    const configDependency    = require('./app/modules/config');
    const wizardDependency    = require('./app/modules/wizard');
    const resetDependency     = require('./app/modules/reset');
    const checkConfDependency = require('./app/modules/check-config');
    const exportBcDependency  = require('./app/modules/export-bc');
    const reapplyDependency   = require('./app/modules/reapply');
    const revertDependency    = require('./app/modules/revert');
    const daemonDependency    = require('./app/modules/daemon');
    const pSignalDependency   = require('./app/modules/peersignal');
    const pluginDependency    = require('./app/modules/plugin');
    const dumpDependency      = require('./app/modules/dump');
    
    let sigintListening = false
    
    // Trace errors
    process.on('unhandledRejection', (reason) => {
      logger.error('Unhandled rejection: ' + reason);
      logger.error(reason);
    });
    
    export class Stacks {
    
      static todoOnRunDone:() => any = () => process.exit()
    
      static async quickRun(...args:any[]) {
        const deps = Array.from(args).map((f, index) => {
          const canonicalPath = path.resolve(f)
          return {
            name: 'duniter-quick-module-' + index,
            required: require(canonicalPath)
          }
        })
        const stack = Stacks.autoStack(deps)
        let res