From e2fd7c8a765d352d2d69a39ef31107ee8168bf0b Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Sat, 22 Jul 2017 17:05:46 +0200 Subject: [PATCH] [fix] #1037 Remove any reference to duniter-(bma|crawler|keypair) --- README.md | 4 - app/modules/bma/lib/bma.ts | 96 +++++----- .../bma/lib/controllers/transactions.ts | 5 +- app/modules/bma/lib/network.ts | 5 +- app/modules/crawler/lib/contacter.ts | 4 +- app/modules/crawler/lib/crawler.ts | 2 +- app/modules/prover/index.ts | 4 +- package.json | 15 +- server.ts | 2 +- test/integration/branches.js | 2 +- test/integration/branches2.js | 10 +- test/integration/branches_pending_data.js | 2 +- test/integration/branches_revert.js | 2 +- test/integration/branches_revert2.js | 4 +- .../branches_revert_memberships.js | 2 +- test/integration/branches_switch.js | 8 +- .../integration/certification_chainability.js | 2 +- test/integration/certifier-is-member.js | 2 +- test/integration/collapse.js | 2 +- test/integration/continuous-proof.js | 2 +- test/integration/crosschain-test.js | 2 +- test/integration/forwarding.js | 2 +- test/integration/http_api.js | 2 +- test/integration/identity-absorption.js | 2 +- test/integration/identity-clean-test.js | 2 +- test/integration/identity-expiry.js | 2 +- .../identity-implicit-revocation.js | 2 +- test/integration/identity-kicking-by-certs.js | 2 +- test/integration/identity-kicking.js | 2 +- test/integration/identity-pulling.js | 2 +- test/integration/identity-same-pubkey.js | 2 +- test/integration/identity-test.js | 4 +- test/integration/lookup.js | 2 +- test/integration/peer-outdated.js | 2 +- test/integration/peerings.js | 6 +- test/integration/peers-same-pubkey.js | 2 +- test/integration/revocation-test.js | 4 +- test/integration/server-import-export.js | 2 +- test/integration/server-sandbox.js | 2 +- test/integration/sources_property.js | 2 +- test/integration/start_generate_blocks.js | 6 +- test/integration/tests.js | 4 +- test/integration/tools/node.js | 9 +- test/integration/tools/toolbox.js | 10 +- test/integration/tools/toolbox.ts | 10 +- test/integration/tools/user.js | 2 +- test/integration/transactions-chaining.js | 2 +- test/integration/transactions-cltv.js | 2 +- test/integration/transactions-csv.js | 2 +- test/integration/transactions-test.js | 2 +- test/integration/v0.4-times.js | 2 +- test/integration/v0.5-identity-blockstamp.js | 2 +- test/integration/v0.5-transactions.js | 2 +- test/integration/v0.6-difficulties.js | 2 +- test/integration/v1.0-double-dividend.js | 2 +- test/integration/v1.0-g1-dividend-long-run.js | 2 +- test/integration/v1.0-g1-dividend.js | 2 +- test/integration/v1.0-modules-api.js | 8 +- .../v1.0-source-garbaging.disabled | 2 +- test/integration/v1.1-dividend.js | 2 +- test/integration/wotb.js | 2 +- yarn.lock | 180 +----------------- 62 files changed, 163 insertions(+), 317 deletions(-) diff --git a/README.md b/README.md index 6e4caa01f..9989ac46f 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,6 @@ If you wish to participate/debate on Duniter, you can: ### Developement Duniter is using modules on different git repositories: -- [Common](https://github.com/duniter/duniter-common): commons tools for Duniter core and modules. -- [Crawler](https://github.com/duniter/duniter-crawler): network crawler. -- [BMA API](https://github.com/duniter/duniter-bma): Basic Merkled API. -- [Keypair](https://github.com/duniter/duniter-keypair): provide the cryptographic keypair. - [WotB](https://github.com/duniter/wotb): compute Web of Trust. - [Debug](https://github.com/duniter/duniter-debug): debug tool. - [Web admin](https://github.com/duniter/duniter-ui): web administration interface (optional). diff --git a/app/modules/bma/lib/bma.ts b/app/modules/bma/lib/bma.ts index 2fcbe2cb1..850510edf 100644 --- a/app/modules/bma/lib/bma.ts +++ b/app/modules/bma/lib/bma.ts @@ -43,54 +43,54 @@ export const bma = function(server:Server, interfaces:NetworkInterface[], httpLo const wot = new WOTBinding(server) const transactions = new TransactionBinding(server) const dividend = new UDBinding(server) - httpMethods.httpGET( '/', node.summary, dtos.Summary, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/node/summary', node.summary, dtos.Summary, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/node/sandboxes', node.sandboxes, dtos.Sandboxes, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/parameters', blockchain.parameters, dtos.Parameters, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/blockchain/membership', blockchain.parseMembership, dtos.Membership, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/memberships/:search', blockchain.memberships, dtos.Memberships, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/blockchain/block', blockchain.parseBlock, dtos.Block, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/block/:number', blockchain.promoted, dtos.Block, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/blocks/:count/:from', blockchain.blocks, dtos.Blocks, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/current', blockchain.current, dtos.Block, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/hardship/:search', blockchain.hardship, dtos.Hardship, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/difficulties', blockchain.difficulties, dtos.Difficulties, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/newcomers', blockchain.with.newcomers, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/certs', blockchain.with.certs, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/joiners', blockchain.with.joiners, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/actives', blockchain.with.actives, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/leavers', blockchain.with.leavers, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/excluded', blockchain.with.excluded, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/revoked', blockchain.with.revoked, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/ud', blockchain.with.ud, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/with/tx', blockchain.with.tx, dtos.Stat, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/blockchain/branches', blockchain.branches, dtos.Branches, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/network/peering', net.peer, dtos.Peer, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/network/peering/peers', net.peersGet, dtos.MerkleOfPeers, BMALimitation.limitAsVeryHighUsage()); - httpMethods.httpPOST( '/network/peering/peers', net.peersPost, dtos.Peer, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/network/peers', net.peers, dtos.Peers, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/wot/add', wot.add, dtos.Identity, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/wot/certify', wot.certify, dtos.Cert, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/wot/revoke', wot.revoke, dtos.Result, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/lookup/:search', wot.lookup, dtos.Lookup, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/members', wot.members, dtos.Members, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/pending', wot.pendingMemberships, dtos.MembershipList, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/requirements/:search', wot.requirements, dtos.Requirements, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/requirements-of-pending/:minsig', wot.requirementsOfPending, dtos.Requirements, BMALimitation.limitAsLowUsage()); - httpMethods.httpGET( '/wot/certifiers-of/:search', wot.certifiersOf, dtos.Certifications, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/certified-by/:search', wot.certifiedBy, dtos.Certifications, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/wot/identity-of/:search', wot.identityOf, dtos.SimpleIdentity, BMALimitation.limitAsHighUsage()); - httpMethods.httpPOST( '/tx/process', transactions.parseTransaction, dtos.Transaction, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/hash/:hash', transactions.getByHash, dtos.Transaction, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/sources/:pubkey', transactions.getSources, dtos.Sources, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/history/:pubkey', transactions.getHistory, dtos.TxHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/history/:pubkey/blocks/:from/:to', transactions.getHistoryBetweenBlocks, dtos.TxHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/history/:pubkey/times/:from/:to', transactions.getHistoryBetweenTimes, dtos.TxHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/history/:pubkey/pending', transactions.getPendingForPubkey, dtos.TxHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/tx/pending', transactions.getPending, dtos.TxPending, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/ud/history/:pubkey', dividend.getHistory, dtos.UDHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/ud/history/:pubkey/blocks/:from/:to', dividend.getHistoryBetweenBlocks, dtos.UDHistory, BMALimitation.limitAsHighUsage()); - httpMethods.httpGET( '/ud/history/:pubkey/times/:from/:to', dividend.getHistoryBetweenTimes, dtos.UDHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/', (req:any) => node.summary(), dtos.Summary, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/node/summary', (req:any) => node.summary(), dtos.Summary, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/node/sandboxes', (req:any) => node.sandboxes(), dtos.Sandboxes, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/parameters', (req:any) => blockchain.parameters(), dtos.Parameters, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/blockchain/membership', (req:any) => blockchain.parseMembership(req), dtos.Membership, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/memberships/:search', (req:any) => blockchain.memberships(req), dtos.Memberships, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/blockchain/block', (req:any) => blockchain.parseBlock(req), dtos.Block, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/block/:number', (req:any) => blockchain.promoted(req), dtos.Block, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/blocks/:count/:from', (req:any) => blockchain.blocks(req), dtos.Blocks, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/current', (req:any) => blockchain.current(), dtos.Block, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/hardship/:search', (req:any) => blockchain.hardship(req), dtos.Hardship, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/difficulties', (req:any) => blockchain.difficulties(), dtos.Difficulties, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/newcomers', (req:any) => blockchain.with.newcomers(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/certs', (req:any) => blockchain.with.certs(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/joiners', (req:any) => blockchain.with.joiners(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/actives', (req:any) => blockchain.with.actives(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/leavers', (req:any) => blockchain.with.leavers(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/excluded', (req:any) => blockchain.with.excluded(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/revoked', (req:any) => blockchain.with.revoked(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/ud', (req:any) => blockchain.with.ud(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/with/tx', (req:any) => blockchain.with.tx(req), dtos.Stat, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/blockchain/branches', (req:any) => blockchain.branches(), dtos.Branches, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/network/peering', (req:any) => net.peer(), dtos.Peer, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/network/peering/peers', (req:any) => net.peersGet(req), dtos.MerkleOfPeers, BMALimitation.limitAsVeryHighUsage()); + httpMethods.httpPOST( '/network/peering/peers', (req:any) => net.peersPost(req), dtos.Peer, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/network/peers', (req:any) => net.peers(), dtos.Peers, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/wot/add', (req:any) => wot.add(req), dtos.Identity, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/wot/certify', (req:any) => wot.certify(req), dtos.Cert, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/wot/revoke', (req:any) => wot.revoke(req), dtos.Result, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/lookup/:search', (req:any) => wot.lookup(req), dtos.Lookup, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/members', (req:any) => wot.members(), dtos.Members, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/pending', (req:any) => wot.pendingMemberships(), dtos.MembershipList, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/requirements/:search', (req:any) => wot.requirements(req), dtos.Requirements, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/requirements-of-pending/:minsig', (req:any) => wot.requirementsOfPending(req), dtos.Requirements, BMALimitation.limitAsLowUsage()); + httpMethods.httpGET( '/wot/certifiers-of/:search', (req:any) => wot.certifiersOf(req), dtos.Certifications, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/certified-by/:search', (req:any) => wot.certifiedBy(req), dtos.Certifications, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/wot/identity-of/:search', (req:any) => wot.identityOf(req), dtos.SimpleIdentity, BMALimitation.limitAsHighUsage()); + httpMethods.httpPOST( '/tx/process', (req:any) => transactions.parseTransaction(req), dtos.Transaction, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/hash/:hash', (req:any) => transactions.getByHash(req), dtos.Transaction, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/sources/:pubkey', (req:any) => transactions.getSources(req), dtos.Sources, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/history/:pubkey', (req:any) => transactions.getHistory(req), dtos.TxHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/history/:pubkey/blocks/:from/:to', (req:any) => transactions.getHistoryBetweenBlocks(req), dtos.TxHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/history/:pubkey/times/:from/:to', (req:any) => transactions.getHistoryBetweenTimes(req), dtos.TxHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/history/:pubkey/pending', (req:any) => transactions.getPendingForPubkey(req), dtos.TxHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/tx/pending', (req:any) => transactions.getPending(), dtos.TxPending, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/ud/history/:pubkey', (req:any) => dividend.getHistory(req), dtos.UDHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/ud/history/:pubkey/blocks/:from/:to', (req:any) => dividend.getHistoryBetweenBlocks(req), dtos.UDHistory, BMALimitation.limitAsHighUsage()); + httpMethods.httpGET( '/ud/history/:pubkey/times/:from/:to', (req:any) => dividend.getHistoryBetweenTimes(req), dtos.UDHistory, BMALimitation.limitAsHighUsage()); }, (httpServer:any) => { diff --git a/app/modules/bma/lib/controllers/transactions.ts b/app/modules/bma/lib/controllers/transactions.ts index e09609e68..7b889682f 100644 --- a/app/modules/bma/lib/controllers/transactions.ts +++ b/app/modules/bma/lib/controllers/transactions.ts @@ -1,6 +1,7 @@ import {AbstractController} from "./AbstractController" import {ParametersService} from "../parameters" import {Source} from "../entity/source" +import {BMAConstants} from "../constants"; const _ = require('underscore'); const common = require('duniter-common'); @@ -11,7 +12,7 @@ const Transaction = common.document.Transaction export class TransactionBinding extends AbstractController { parseTransaction(req:any) { - return this.pushEntity(req, http2raw.transaction, constants.ENTITY_TRANSACTION) + return this.pushEntity(req, http2raw.transaction, BMAConstants.ENTITY_TRANSACTION) } async getSources(req:any) { @@ -32,7 +33,7 @@ export class TransactionBinding extends AbstractController { const hash = ParametersService.getHash(req); const tx = await this.server.dal.getTxByHash(hash); if (!tx) { - throw constants.ERRORS.TX_NOT_FOUND; + throw BMAConstants.ERRORS.TX_NOT_FOUND; } if (tx.block_number) { tx.written_block = tx.block_number diff --git a/app/modules/bma/lib/network.ts b/app/modules/bma/lib/network.ts index 61e74ec38..9d2c252c6 100644 --- a/app/modules/bma/lib/network.ts +++ b/app/modules/bma/lib/network.ts @@ -163,7 +163,7 @@ export const Network = { } // Return API - return new BmaApi(interfaces, ddosInstance, httpServers, logger) + return new BmaApi(name, interfaces, ddosInstance, httpServers, logger) } } @@ -172,6 +172,7 @@ export class BmaApi { private listenings:boolean[] constructor( + private name:string, private interfaces:any, private ddosInstance:any, private httpServers:any, @@ -192,7 +193,7 @@ export class BmaApi { const isListening = this.listenings[i]; if (isListening) { this.listenings[i] = false; - this.logger && this.logger.info(name + ' stop listening'); + this.logger && this.logger.info(this.name + ' stop listening'); await Q.Promise((resolve:any, reject:any) => { httpServer.errorPropagates((err:any) => { reject(err); diff --git a/app/modules/crawler/lib/contacter.ts b/app/modules/crawler/lib/contacter.ts index 501148521..96cda407b 100644 --- a/app/modules/crawler/lib/contacter.ts +++ b/app/modules/crawler/lib/contacter.ts @@ -1,8 +1,8 @@ import {CrawlerConstants} from "./constants" const rp = require('request-promise'); -const sanitize = require('duniter-bma').duniter.methods.sanitize; -const dtos = require('duniter-bma').duniter.methods.dtos; +const sanitize = require('../../../modules/bma').BmaDependency.duniter.methods.sanitize; +const dtos = require('../../../modules/bma').BmaDependency.duniter.methods.dtos; export class Contacter { diff --git a/app/modules/crawler/lib/crawler.ts b/app/modules/crawler/lib/crawler.ts index 5e67bc1d5..4af7079cb 100644 --- a/app/modules/crawler/lib/crawler.ts +++ b/app/modules/crawler/lib/crawler.ts @@ -374,7 +374,7 @@ export class BlockCrawler { return server.dal.getCurrentBlockOrNull() } async remoteCurrent(source?: any): Promise<BlockDTO | null> { - return thePeer.getCurrent() + return source.getCurrent() } async remotePeers(source?: any): Promise<PeerDTO[]> { return Promise.resolve([node]) diff --git a/app/modules/prover/index.ts b/app/modules/prover/index.ts index 84937e761..9d343fb1f 100644 --- a/app/modules/prover/index.ts +++ b/app/modules/prover/index.ts @@ -3,9 +3,9 @@ import {BlockGenerator, BlockGeneratorWhichProves} from "./lib/blockGenerator" import {Constants} from "./lib/constants" import {BlockProver} from "./lib/blockProver" import {Prover} from "./lib/prover" +import {Contacter} from "../crawler/lib/contacter"; const async = require('async'); -const contacter = require('duniter-crawler').duniter.methods.contacter; const common = require('duniter-common'); const Peer = common.document.Peer @@ -191,7 +191,7 @@ function proveAndSend(program:any, server:any, block:any, issuer:any, difficulty program.show && console.log(proven.getRawSigned()); logger.info('Posted block ' + proven.getRawSigned()); const p = Peer.fromJSON(peer); - const contact = contacter(p.getHostPreferDNS(), p.getPort()); + const contact = new Contacter(p.getHostPreferDNS(), p.getPort()); await contact.postBlock(proven.getRawSigned()); } catch(e) { next(e); diff --git a/package.json b/package.json index 28e76655c..ad6fec5e3 100644 --- a/package.json +++ b/package.json @@ -49,18 +49,28 @@ "archiver": "1.3.0", "async": "2.2.0", "bindings": "1.2.1", + "body-parser": "1.17.1", "bs58": "^4.0.1", "co": "4.6.0", "colors": "1.1.2", + "cors": "2.8.2", "commander": "2.9.0", "daemonize2": "0.4.2", + "ddos": "0.1.16", "duniter-common": "1.4.x", "event-stream": "3.3.4", + "errorhandler": "1.5.0", + "express": "4.15.2", + "express-cors": "0.0.3", + "express-fileupload": "0.0.5", "heapdump": "^0.3.9", "inquirer": "3.0.6", "merkle": "0.5.1", "moment": "2.18.1", + "morgan": "1.8.1", + "multimeter": "0.1.1", "naclb": "1.3.9", + "nnupnp": "1.0.2", "node-pre-gyp": "0.6.34", "optimist": "0.6.1", "q-io": "1.13.2", @@ -69,6 +79,7 @@ "request-promise": "4.2.0", "seedrandom": "^2.4.3", "sha1": "1.1.1", + "scryptb": "6.0.4", "spawn-sync": "^1.0.15", "sqlite3": "3.1.4", "superagent": "3.5.2", @@ -78,14 +89,14 @@ "unzip": "0.1.11", "unzip2": "0.2.5", "winston": "2.3.1", - "wotb": "0.5.x" + "wotb": "0.5.x", + "ws": "1.1.1" }, "devDependencies": { "@types/mocha": "^2.2.41", "@types/node": "^8.0.9", "@types/should": "^8.3.0", "coveralls": "2.11.4", - "duniter-ui": "1.3.x", "eslint": "3.13.1", "eslint-plugin-mocha": "4.8.0", "istanbul": "0.4.0", diff --git a/server.ts b/server.ts index 1aa0c167c..ada29a16b 100644 --- a/server.ts +++ b/server.ts @@ -66,7 +66,7 @@ export class Server extends stream.Duplex implements HookableServer { this.paramsP = directory.getHomeParams(memoryOnly, home) - this.MerkleService = require("./app/lib/helpers/merkle"); + this.MerkleService = require("./app/lib/helpers/merkle").processForURL this.IdentityService = new IdentityService() this.MembershipService = new MembershipService() this.PeeringService = new PeeringService(this) diff --git a/test/integration/branches.js b/test/integration/branches.js index e16696fe9..7c61d30dc 100644 --- a/test/integration/branches.js +++ b/test/integration/branches.js @@ -4,7 +4,7 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const rp = require('request-promise'); const httpTest = require('./tools/http'); diff --git a/test/integration/branches2.js b/test/integration/branches2.js index 9aeb656ff..56edff125 100644 --- a/test/integration/branches2.js +++ b/test/integration/branches2.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const rp = require('request-promise'); @@ -15,7 +15,7 @@ const expectJSON = httpTest.expectJSON; const expectHttpCode = httpTest.expectHttpCode; if (constants.MUTE_LOGS_DURING_UNIT_TESTS) { - require('../../app/lib/logger').NewLogger().mute(); + // require('../../app/lib/logger').NewLogger().mute(); } // Trace these errors @@ -72,8 +72,8 @@ describe("SelfFork", function() { yield s1.initWithDAL().then(bma).then((bmapi) => bmapi.openConnections()); yield s2.initWithDAL().then(bma).then((bmapi) => bmapi.openConnections()); - s1.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint - s2.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint + s1.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint + s2.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint // Server 1 yield cat.createIdentity(); @@ -106,7 +106,7 @@ describe("SelfFork", function() { yield s1.singleWritePromise(s2p); // Forking S1 from S2 - return require('duniter-crawler').duniter.methods.pullBlocks(s1, s2p.pubkey); + return require('../../app/modules/crawler').CrawlerDependency.duniter.methods.pullBlocks(s1, s2p.pubkey); })); describe("Server 1 /blockchain", function() { diff --git a/test/integration/branches_pending_data.js b/test/integration/branches_pending_data.js index 9cf29a9b0..378fc7000 100644 --- a/test/integration/branches_pending_data.js +++ b/test/integration/branches_pending_data.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); diff --git a/test/integration/branches_revert.js b/test/integration/branches_revert.js index f5a03a2b9..71153f8c7 100644 --- a/test/integration/branches_revert.js +++ b/test/integration/branches_revert.js @@ -2,7 +2,7 @@ const co = require('co'); const _ = require('underscore'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const toolbox = require('./tools/toolbox'); const commit = require('./tools/commit'); diff --git a/test/integration/branches_revert2.js b/test/integration/branches_revert2.js index 6845ac5a5..2e963444e 100644 --- a/test/integration/branches_revert2.js +++ b/test/integration/branches_revert2.js @@ -3,14 +3,14 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); const commit = require('./tools/commit'); require('../../app/modules/prover/lib/constants').Constants.CORES_MAXIMUM_USE_IN_PARALLEL = 1 -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter const expectJSON = httpTest.expectJSON; const expectHttpCode = httpTest.expectHttpCode; diff --git a/test/integration/branches_revert_memberships.js b/test/integration/branches_revert_memberships.js index 6132aa45e..d6101ce35 100644 --- a/test/integration/branches_revert_memberships.js +++ b/test/integration/branches_revert_memberships.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/branches_switch.js b/test/integration/branches_switch.js index bc62789d4..64128e1d0 100644 --- a/test/integration/branches_switch.js +++ b/test/integration/branches_switch.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); @@ -57,8 +57,8 @@ describe("Switch", function() { before(() => co(function *() { yield s1.initWithDAL().then(bma).then((bmapi) => bmapi.openConnections()); yield s2.initWithDAL().then(bma).then((bmapi) => bmapi.openConnections()); - s1.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint - s2.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint + s1.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint + s2.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint yield cat.createIdentity(); yield toc.createIdentity(); yield toc.cert(cat); @@ -87,7 +87,7 @@ describe("Switch", function() { yield s1.singleWritePromise(s2p); // Forking S1 from S2 - yield require('duniter-crawler').duniter.methods.pullBlocks(s1, s2p.pubkey); + yield require('../../app/modules/crawler').CrawlerDependency.duniter.methods.pullBlocks(s1, s2p.pubkey); // S1 should have switched to the other branch })); diff --git a/test/integration/certification_chainability.js b/test/integration/certification_chainability.js index 5731249fd..2e12d916d 100644 --- a/test/integration/certification_chainability.js +++ b/test/integration/certification_chainability.js @@ -4,7 +4,7 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const rp = require('request-promise'); diff --git a/test/integration/certifier-is-member.js b/test/integration/certifier-is-member.js index 87026a463..54562479e 100644 --- a/test/integration/certifier-is-member.js +++ b/test/integration/certifier-is-member.js @@ -5,7 +5,7 @@ const co = require('co'); const assert = require('assert'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/collapse.js b/test/integration/collapse.js index 9b602e302..b1f35d6ac 100644 --- a/test/integration/collapse.js +++ b/test/integration/collapse.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const httpTest = require('./tools/http'); diff --git a/test/integration/continuous-proof.js b/test/integration/continuous-proof.js index c373ddc1c..1b04ecbc6 100644 --- a/test/integration/continuous-proof.js +++ b/test/integration/continuous-proof.js @@ -106,7 +106,7 @@ describe("Continous proof-of-work", function() { yield s2.until('block', 15); s2.stopBlockComputation(); yield [ - require('duniter-crawler').duniter.methods.pullBlocks(s3), + require('../../app/modules/crawler').CrawlerDependency.duniter.methods.pullBlocks(s3), s3.startBlockComputation() ]; yield s3.expectJSON('/blockchain/current', { number: 15 }); diff --git a/test/integration/crosschain-test.js b/test/integration/crosschain-test.js index 60850a660..ae5c90827 100644 --- a/test/integration/crosschain-test.js +++ b/test/integration/crosschain-test.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const assert = require('assert'); const should = require('should'); const rp = require('request-promise'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const commit = require('./tools/commit'); const toolbox = require('./tools/toolbox'); const user = require('./tools/user'); diff --git a/test/integration/forwarding.js b/test/integration/forwarding.js index a57f8a563..0898b7cc5 100644 --- a/test/integration/forwarding.js +++ b/test/integration/forwarding.js @@ -9,7 +9,7 @@ const user = require('./tools/user'); const jspckg = require('../../package'); const constants = require('../../app/lib/constants'); -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter if (constants.MUTE_LOGS_DURING_UNIT_TESTS) { // require('../../app/lib/logger').NewLogger().mute(); diff --git a/test/integration/http_api.js b/test/integration/http_api.js index 84747eaa2..e12c6233c 100644 --- a/test/integration/http_api.js +++ b/test/integration/http_api.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const http = require('./tools/http'); const constants = require('../../app/lib/constants'); diff --git a/test/integration/identity-absorption.js b/test/integration/identity-absorption.js index 74b7a2ed3..88734c94a 100644 --- a/test/integration/identity-absorption.js +++ b/test/integration/identity-absorption.js @@ -3,7 +3,7 @@ const _ = require('underscore'); const co = require('co'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); diff --git a/test/integration/identity-clean-test.js b/test/integration/identity-clean-test.js index 2ee0fc136..7e46bb0e0 100644 --- a/test/integration/identity-clean-test.js +++ b/test/integration/identity-clean-test.js @@ -3,7 +3,7 @@ const _ = require('underscore'); const co = require('co'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); diff --git a/test/integration/identity-expiry.js b/test/integration/identity-expiry.js index 17fc852da..1104f5c99 100644 --- a/test/integration/identity-expiry.js +++ b/test/integration/identity-expiry.js @@ -4,7 +4,7 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const prover = require('../../app/modules/prover').ProverDependency.duniter.methods; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); diff --git a/test/integration/identity-implicit-revocation.js b/test/integration/identity-implicit-revocation.js index d477a926e..704cb92bd 100644 --- a/test/integration/identity-implicit-revocation.js +++ b/test/integration/identity-implicit-revocation.js @@ -5,7 +5,7 @@ const co = require('co'); const assert = require('assert'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/identity-kicking-by-certs.js b/test/integration/identity-kicking-by-certs.js index 0f9c14b45..e1da87805 100644 --- a/test/integration/identity-kicking-by-certs.js +++ b/test/integration/identity-kicking-by-certs.js @@ -5,7 +5,7 @@ const co = require('co'); const assert = require('assert'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/identity-kicking.js b/test/integration/identity-kicking.js index 9a1e996bb..76e15b59b 100644 --- a/test/integration/identity-kicking.js +++ b/test/integration/identity-kicking.js @@ -4,7 +4,7 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const rp = require('request-promise'); diff --git a/test/integration/identity-pulling.js b/test/integration/identity-pulling.js index 637913732..2f1a2f3c1 100644 --- a/test/integration/identity-pulling.js +++ b/test/integration/identity-pulling.js @@ -98,7 +98,7 @@ describe("Identity pulling", function() { it('s1 should be able to pull sandbox data from s2', () => co(function*() { yield s2.sharePeeringWith(s1) - const pullSandbox = require('duniter-crawler').duniter.methods.pullSandbox + const pullSandbox = require('../../app/modules/crawler').CrawlerDependency.duniter.methods.pullSandbox yield pullSandbox(s1) yield pullSandbox(s1) diff --git a/test/integration/identity-same-pubkey.js b/test/integration/identity-same-pubkey.js index 251e288c9..cf2f307eb 100644 --- a/test/integration/identity-same-pubkey.js +++ b/test/integration/identity-same-pubkey.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/identity-test.js b/test/integration/identity-test.js index bcb51094b..46a0ee0a0 100644 --- a/test/integration/identity-test.js +++ b/test/integration/identity-test.js @@ -4,14 +4,14 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const rp = require('request-promise'); const httpTest = require('./tools/http'); const commit = require('./tools/commit'); -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter const expectAnswer = httpTest.expectAnswer; diff --git a/test/integration/lookup.js b/test/integration/lookup.js index 84fdf26c1..5bdbcf79c 100644 --- a/test/integration/lookup.js +++ b/test/integration/lookup.js @@ -3,7 +3,7 @@ const _ = require('underscore'); const co = require('co'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); diff --git a/test/integration/peer-outdated.js b/test/integration/peer-outdated.js index fbc91d6e4..d9d4721be 100644 --- a/test/integration/peer-outdated.js +++ b/test/integration/peer-outdated.js @@ -4,7 +4,7 @@ const co = require('co'); const should = require('should'); const es = require('event-stream'); const _ = require('underscore'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const until = require('./tools/until'); diff --git a/test/integration/peerings.js b/test/integration/peerings.js index dbbd98fed..f1dbdb253 100644 --- a/test/integration/peerings.js +++ b/test/integration/peerings.js @@ -4,14 +4,14 @@ const co = require('co'); const _ = require('underscore'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const constants = require('../../app/lib/constants'); const rp = require('request-promise'); const httpTest = require('./tools/http'); const commit = require('./tools/commit'); const sync = require('./tools/sync'); -const contacter = require('duniter-crawler').duniter.methods.contacter; +const contacter = require('../../app/modules/crawler').CrawlerDependency.duniter.methods.contacter; const until = require('./tools/until'); const multicaster = require('../../app/lib/streams/multicaster'); const PeerDTO = require('../../app/lib/dto/PeerDTO').PeerDTO @@ -78,7 +78,7 @@ describe("Network", function() { const commitS3 = commit(s3); return [s1, s2, s3].reduce(function(p, server) { - server.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint + server.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint return p .then(function(){ return server diff --git a/test/integration/peers-same-pubkey.js b/test/integration/peers-same-pubkey.js index 12bc7d221..414f42e9e 100644 --- a/test/integration/peers-same-pubkey.js +++ b/test/integration/peers-same-pubkey.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const sync = require('./tools/sync'); diff --git a/test/integration/revocation-test.js b/test/integration/revocation-test.js index 08f29dc37..ab0aff831 100644 --- a/test/integration/revocation-test.js +++ b/test/integration/revocation-test.js @@ -4,7 +4,7 @@ const _ = require('underscore'); const co = require('co'); const should = require('should'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); @@ -12,7 +12,7 @@ const commit = require('./tools/commit'); const expectAnswer = httpTest.expectAnswer; -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter const MEMORY_MODE = true; const commonConf = { diff --git a/test/integration/server-import-export.js b/test/integration/server-import-export.js index 71436b16c..da836bfc6 100644 --- a/test/integration/server-import-export.js +++ b/test/integration/server-import-export.js @@ -6,7 +6,7 @@ const co = require('co'); const unzip = require('unzip'); const toolbox = require('../integration/tools/toolbox'); const user = require('../integration/tools/user'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const serverConfig = { memory: false, diff --git a/test/integration/server-sandbox.js b/test/integration/server-sandbox.js index 5a3a44936..e76ef7a1b 100644 --- a/test/integration/server-sandbox.js +++ b/test/integration/server-sandbox.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const common = require('duniter-common'); const user = require('./tools/user'); const commit = require('./tools/commit'); diff --git a/test/integration/sources_property.js b/test/integration/sources_property.js index 8812bd4e2..db5aa4822 100644 --- a/test/integration/sources_property.js +++ b/test/integration/sources_property.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const constants = require('../../app/lib/constants'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const toolbox = require('./tools/toolbox'); const node = require('./tools/node'); const unit = require('./tools/unit'); diff --git a/test/integration/start_generate_blocks.js b/test/integration/start_generate_blocks.js index 112d548f9..104230675 100644 --- a/test/integration/start_generate_blocks.js +++ b/test/integration/start_generate_blocks.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const rp = require('request-promise'); const httpTest = require('./tools/http'); @@ -11,7 +11,7 @@ const commit = require('./tools/commit'); const until = require('./tools/until'); const multicaster = require('../../app/lib/streams/multicaster'); const PeerDTO = require('../../app/lib/dto/PeerDTO').PeerDTO -const contacter = require('duniter-crawler').duniter.methods.contacter; +const contacter = require('../../app/modules/crawler').CrawlerDependency.duniter.methods.contacter; const sync = require('./tools/sync'); const expectJSON = httpTest.expectJSON; @@ -67,7 +67,7 @@ describe("Generation", function() { return co(function *() { let servers = [s1, s2]; for (const server of servers) { - server.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint + server.getMainEndpoint = require('../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint yield server.initWithDAL(); server.bma = yield bma(server); yield server.bma.openConnections(); diff --git a/test/integration/tests.js b/test/integration/tests.js index 509cc5828..950aa719a 100644 --- a/test/integration/tests.js +++ b/test/integration/tests.js @@ -4,7 +4,7 @@ const co = require('co'); const _ = require('underscore'); const should = require('should'); const assert = require('assert'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const node = require('./tools/node'); const duniter = require('../../index'); @@ -17,7 +17,7 @@ const rp = require('request-promise'); const expectAnswer = httpTest.expectAnswer; const MEMORY_MODE = true; -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter describe("Integration", function() { diff --git a/test/integration/tools/node.js b/test/integration/tools/node.js index 43241a360..eaca6d3ea 100644 --- a/test/integration/tools/node.js +++ b/test/integration/tools/node.js @@ -3,14 +3,14 @@ var co = require('co'); var _ = require('underscore'); var async = require('async'); var request = require('request'); -var contacter = require('duniter-crawler').duniter.methods.contacter; +var contacter = require('../../../app/modules/crawler').CrawlerDependency.duniter.methods.contacter; var duniter = require('../../../index'); var multicaster = require('../../../app/lib/streams/multicaster'); var ConfDTO = require('../../../app/lib/dto/ConfDTO').ConfDTO var PeerDTO = require('../../../app/lib/dto/PeerDTO').PeerDTO var user = require('./user'); var http = require('./http'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../../app/modules/bma').BmaDependency.duniter.methods.bma; module.exports = function (dbName, options) { return new Node(dbName, options); @@ -147,9 +147,8 @@ function Node (dbName, options) { function service(callback) { return function () { const stack = duniter.statics.simpleStack(); - for (const name of ['duniter-keypair', 'duniter-bma']) { - stack.registerDependency(require(name), name); - } + stack.registerDependency(require('../../../app/modules/keypair').KeypairDependency, 'duniter-keypair') + stack.registerDependency(require('../../../app/modules/bma').BmaDependency, 'duniter-bma') stack.registerDependency({ duniter: { config: { diff --git a/test/integration/tools/toolbox.js b/test/integration/tools/toolbox.js index 54927ea79..eef84362e 100644 --- a/test/integration/tools/toolbox.js +++ b/test/integration/tools/toolbox.js @@ -19,11 +19,11 @@ const sync = require('../tools/sync'); const commit = require('../tools/commit'); const user = require('../tools/user'); const until = require('../tools/until'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../../app/modules/bma').BmaDependency.duniter.methods.bma; const multicaster = require('../../../app/lib/streams/multicaster'); -const dtos = require('duniter-bma').duniter.methods.dtos; +const dtos = require('../../../app/modules/bma').BmaDependency.duniter.methods.dtos; const logger = require('../../../app/lib/logger').NewLogger('toolbox'); -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter const MEMORY_MODE = true; const CURRENCY_NAME = 'duniter_unit_test_currency'; const HOST = '127.0.0.1'; @@ -109,7 +109,7 @@ exports.fakeSyncServer = (readBlocksMethod, readParticularBlockMethod, onPeersRe canAnswerNow: () => true, processRequest: () => { } }; - const fakeServer = yield require('duniter-bma').duniter.methods.createServersAndListen("Fake Duniter Server", { conf: {} }, [{ + const fakeServer = yield require('../../../app/modules/bma').BmaDependency.duniter.methods.createServersAndListen("Fake Duniter Server", { conf: {} }, [{ ip: host, port: port }], NO_HTTP_LOGS, logger, NO_STATIC_PATH, (app, httpMethods) => { @@ -166,7 +166,7 @@ class TestingServer { constructor(port, server) { this.port = port; this.server = server; - server.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint; + server.getMainEndpoint = require('../../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint; } get BlockchainService() { return this.server.BlockchainService; diff --git a/test/integration/tools/toolbox.ts b/test/integration/tools/toolbox.ts index e3ec93af8..7ccd7a6a1 100644 --- a/test/integration/tools/toolbox.ts +++ b/test/integration/tools/toolbox.ts @@ -14,12 +14,12 @@ const sync = require('../tools/sync'); const commit = require('../tools/commit'); const user = require('../tools/user'); const until = require('../tools/until'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../../app/modules/bma').BmaDependency.duniter.methods.bma; const multicaster = require('../../../app/lib/streams/multicaster'); -const dtos = require('duniter-bma').duniter.methods.dtos; +const dtos = require('../../../app/modules/bma').BmaDependency.duniter.methods.dtos; const logger = require('../../../app/lib/logger').NewLogger('toolbox'); -require('duniter-bma').duniter.methods.noLimit(); // Disables the HTTP limiter +require('../../../app/modules/bma').BmaDependency.duniter.methods.noLimit(); // Disables the HTTP limiter const MEMORY_MODE = true; const CURRENCY_NAME = 'duniter_unit_test_currency'; @@ -135,7 +135,7 @@ export const fakeSyncServer = async (readBlocksMethod:any, readParticularBlockMe processRequest: () => { /* Does nothing */ } }; - const fakeServer = await require('duniter-bma').duniter.methods.createServersAndListen("Fake Duniter Server", { conf: {} }, [{ + const fakeServer = await require('../../../app/modules/bma').BmaDependency.duniter.methods.createServersAndListen("Fake Duniter Server", { conf: {} }, [{ ip: host, port: port }], NO_HTTP_LOGS, logger, NO_STATIC_PATH, (app:any, httpMethods:any) => { @@ -216,7 +216,7 @@ export class TestingServer { private port:number, private server:Server) { - server.getMainEndpoint = require('duniter-bma').duniter.methods.getMainEndpoint + server.getMainEndpoint = require('../../../app/modules/bma').BmaDependency.duniter.methods.getMainEndpoint } get BlockchainService() { diff --git a/test/integration/tools/user.js b/test/integration/tools/user.js index 6ef3ede13..d2912b6e6 100644 --- a/test/integration/tools/user.js +++ b/test/integration/tools/user.js @@ -3,7 +3,7 @@ const co = require('co'); const _ = require('underscore'); const async = require('async'); const request = require('request'); -const contacter = require('duniter-crawler').duniter.methods.contacter; +const contacter = require('../../../app/modules/crawler').CrawlerDependency.duniter.methods.contacter; const common = require('duniter-common'); const ucp = common.buid; const parsers = require('duniter-common').parsers; diff --git a/test/integration/transactions-chaining.js b/test/integration/transactions-chaining.js index 7d867158c..0ef947b48 100644 --- a/test/integration/transactions-chaining.js +++ b/test/integration/transactions-chaining.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const constants = require('../../app/lib/constants'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const common = require('duniter-common'); const toolbox = require('./tools/toolbox'); const node = require('./tools/node'); diff --git a/test/integration/transactions-cltv.js b/test/integration/transactions-cltv.js index eb0a89c77..611382517 100644 --- a/test/integration/transactions-cltv.js +++ b/test/integration/transactions-cltv.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const constants = require('../../app/lib/constants'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const toolbox = require('./tools/toolbox'); const node = require('./tools/node'); const unit = require('./tools/unit'); diff --git a/test/integration/transactions-csv.js b/test/integration/transactions-csv.js index 5ce58c9e1..fbf95d451 100644 --- a/test/integration/transactions-csv.js +++ b/test/integration/transactions-csv.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const constants = require('../../app/lib/constants'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const toolbox = require('./tools/toolbox'); const node = require('./tools/node'); const unit = require('./tools/unit'); diff --git a/test/integration/transactions-test.js b/test/integration/transactions-test.js index aab8f40f6..eb0e7f5a7 100644 --- a/test/integration/transactions-test.js +++ b/test/integration/transactions-test.js @@ -5,7 +5,7 @@ const _ = require('underscore'); const should = require('should'); const assert = require('assert'); const constants = require('../../app/lib/constants'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const toolbox = require('./tools/toolbox'); const node = require('./tools/node'); const user = require('./tools/user'); diff --git a/test/integration/v0.4-times.js b/test/integration/v0.4-times.js index c9f7cc61f..419a231de 100644 --- a/test/integration/v0.4-times.js +++ b/test/integration/v0.4-times.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const commit = require('./tools/commit'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v0.5-identity-blockstamp.js b/test/integration/v0.5-identity-blockstamp.js index 3cda20910..06dd57f79 100644 --- a/test/integration/v0.5-identity-blockstamp.js +++ b/test/integration/v0.5-identity-blockstamp.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v0.5-transactions.js b/test/integration/v0.5-transactions.js index 9a3ac5916..dc4180c06 100644 --- a/test/integration/v0.5-transactions.js +++ b/test/integration/v0.5-transactions.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v0.6-difficulties.js b/test/integration/v0.6-difficulties.js index 64f98bef6..f4b7e76b0 100644 --- a/test/integration/v0.6-difficulties.js +++ b/test/integration/v0.6-difficulties.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v1.0-double-dividend.js b/test/integration/v1.0-double-dividend.js index fde26bb81..bc51db461 100644 --- a/test/integration/v1.0-double-dividend.js +++ b/test/integration/v1.0-double-dividend.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v1.0-g1-dividend-long-run.js b/test/integration/v1.0-g1-dividend-long-run.js index 4cd3a0266..48b0e70f6 100644 --- a/test/integration/v1.0-g1-dividend-long-run.js +++ b/test/integration/v1.0-g1-dividend-long-run.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v1.0-g1-dividend.js b/test/integration/v1.0-g1-dividend.js index 14bf41ca5..d3dd6b946 100644 --- a/test/integration/v1.0-g1-dividend.js +++ b/test/integration/v1.0-g1-dividend.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v1.0-modules-api.js b/test/integration/v1.0-modules-api.js index 79a13af03..d0e79e535 100644 --- a/test/integration/v1.0-modules-api.js +++ b/test/integration/v1.0-modules-api.js @@ -43,7 +43,7 @@ describe("v1.0 Module API", () => { sStack.registerDependency(helloDependency, 'duniter-hello'); sStack.registerDependency(helloDependency, 'duniter-hello'); // Try to load it 2 times, should not throw an error - sStack.registerDependency(require('duniter-keypair'), 'duniter-keypair'); + sStack.registerDependency(require('../../app/modules/keypair').KeypairDependency, 'duniter-keypair'); aStack.registerDependency(helloDependency, 'duniter-hello'); (yield sStack.executeStack(['node', 'index.js', '--memory', 'hello', 'World', 'TEST', '--opt1', '--option2', '5'])).should.equal('Hello, World. You successfully sent arg \'TEST\' along with opt1 = true and option2 = 5.'); @@ -106,7 +106,7 @@ describe("v1.0 Module API", () => { } }; - stack.registerDependency(require('duniter-keypair'), 'duniter-keypair'); + stack.registerDependency(require('../../app/modules/keypair').KeypairDependency, 'duniter-keypair'); stack.registerDependency(configurationDependency, 'duniter-configuration'); stack.registerDependency(returnConfDependency, 'duniter-gimme-conf'); })); @@ -236,8 +236,8 @@ describe("v1.0 Module API", () => { } }; - stack.registerDependency(require('duniter-keypair'), 'duniter-keypair'); - stack.registerDependency(require('duniter-bma'), 'duniter-bma'); + stack.registerDependency(require('../../app/modules/keypair').KeypairDependency, 'duniter-keypair'); + stack.registerDependency(require('../../app/modules/bma').BmaDependency, 'duniter-bma'); stack.registerDependency(dummyStartServiceDependency, 'duniter-dummy-start'); stack.registerDependency(dummyStopServiceDependency, 'duniter-dummy-stop'); })); diff --git a/test/integration/v1.0-source-garbaging.disabled b/test/integration/v1.0-source-garbaging.disabled index 3a9920d17..e66774960 100644 --- a/test/integration/v1.0-source-garbaging.disabled +++ b/test/integration/v1.0-source-garbaging.disabled @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const constants = require('../../app/lib/constants'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/v1.1-dividend.js b/test/integration/v1.1-dividend.js index 02516308e..63efcee34 100644 --- a/test/integration/v1.1-dividend.js +++ b/test/integration/v1.1-dividend.js @@ -2,7 +2,7 @@ const co = require('co'); const should = require('should'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); const toolbox = require('./tools/toolbox'); diff --git a/test/integration/wotb.js b/test/integration/wotb.js index 98581d58d..168cc5759 100644 --- a/test/integration/wotb.js +++ b/test/integration/wotb.js @@ -4,7 +4,7 @@ const co = require('co'); const should = require('should'); const _ = require('underscore'); const duniter = require('../../index'); -const bma = require('duniter-bma').duniter.methods.bma; +const bma = require('../../app/modules/bma').BmaDependency.duniter.methods.bma; const user = require('./tools/user'); const commit = require('./tools/commit'); diff --git a/yarn.lock b/yarn.lock index 4360e3cbf..c45705f3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,10 +51,6 @@ acorn@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" -adm-zip@0.4.7: - version "0.4.7" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" - ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" @@ -239,12 +235,6 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -base-x@^2.0.1: - version "2.0.6" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-2.0.6.tgz#4582a91ebcec99ee06f4e4032030b0cf1c2941d8" - dependencies: - safe-buffer "^5.0.1" - base-x@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.2.tgz#bf873861b7514279b7969f340929eab87c11d130" @@ -334,12 +324,6 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -bs58@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.0.tgz#65f5deaf6d74e6135a99f763ca6209ab424b9172" - dependencies: - base-x "^2.0.1" - bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -651,7 +635,7 @@ debug@2.0.0: dependencies: ms "0.6.2" -debug@2.6.1: +debug@2.6.1, debug@^2.1.1, debug@^2.2.0: version "2.6.1" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" dependencies: @@ -663,12 +647,6 @@ debug@2.6.7: dependencies: ms "2.0.0" -debug@^2.1.1, debug@^2.2.0: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" @@ -744,42 +722,7 @@ doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" -duniter-bma@1.3.x: - version "1.3.2" - resolved "https://registry.yarnpkg.com/duniter-bma/-/duniter-bma-1.3.2.tgz#9a44aa362cd3f576b157dd68402f26ce9495caee" - dependencies: - async "2.2.0" - body-parser "1.17.1" - co "4.6.0" - cors "2.8.2" - ddos "0.1.16" - duniter-common "^1.3.0" - errorhandler "1.5.0" - event-stream "3.3.4" - express "4.15.2" - express-cors "0.0.3" - express-fileupload "0.0.5" - inquirer "3.0.6" - morgan "1.8.1" - nnupnp "1.0.2" - node-pre-gyp "^0.6.34" - q "1.5.0" - underscore "1.8.3" - ws "1.1.1" - -duniter-common@1.3.x: - version "1.3.5" - resolved "https://registry.yarnpkg.com/duniter-common/-/duniter-common-1.3.5.tgz#b727117a2c9463d0486b7c0feb845df60b65e247" - dependencies: - bs58 "^4.0.0" - co "4.6.0" - jison "0.4.17" - naclb "1.3.9" - seedrandom "^2.4.3" - tweetnacl "0.14.3" - underscore "1.8.3" - -duniter-common@1.4.x, duniter-common@^1.3.0: +duniter-common@1.4.x: version "1.4.1" resolved "https://registry.yarnpkg.com/duniter-common/-/duniter-common-1.4.1.tgz#e2093478ca3367d3ecb9b3b6891122c1054e95c4" dependencies: @@ -791,62 +734,6 @@ duniter-common@1.4.x, duniter-common@^1.3.0: tweetnacl "0.14.3" underscore "1.8.3" -duniter-crawler@1.3.x: - version "1.3.8" - resolved "https://registry.yarnpkg.com/duniter-crawler/-/duniter-crawler-1.3.8.tgz#823e6e84219669fd30ab94b4359bcc425c1299ac" - dependencies: - async "2.2.0" - co "4.6.0" - duniter-bma "1.3.x" - duniter-common "1.3.x" - moment "2.18.1" - multimeter "0.1.1" - querablep "0.1.0" - request "2.81.0" - request-promise "4.2.0" - underscore "1.8.3" - -duniter-keypair@1.3.x: - version "1.3.4" - resolved "https://registry.yarnpkg.com/duniter-keypair/-/duniter-keypair-1.3.4.tgz#0f13cbf3130ad3720bb853d4440b78a6b7106c6b" - dependencies: - bs58 "4.0.0" - co "4.6.0" - duniter-common "1.3.x" - inquirer "^3.0.6" - js-yaml "3.8.2" - node-pre-gyp "0.6.34" - q "1.5.0" - scryptb "6.0.4" - tweetnacl "0.14.5" - tweetnacl-util "0.15.0" - -duniter-ui@1.3.x: - version "1.3.11" - resolved "https://registry.yarnpkg.com/duniter-ui/-/duniter-ui-1.3.11.tgz#de22d5bff5b8313e4a563b6fa994c746f1908c39" - dependencies: - adm-zip "0.4.7" - body-parser "1.17.1" - co "4.6.0" - cors "2.8.2" - duniter-bma "1.3.x" - duniter-common "1.3.x" - duniter-crawler "1.3.x" - duniter-keypair "1.3.x" - event-stream "3.3.4" - express "4.15.2" - express-fileupload "0.0.5" - fs-extra "2.1.2" - materialize-css "0.98.1" - moment "2.18.1" - node-pre-gyp "0.6.34" - q "1.5.0" - request "2.81.0" - request-promise "4.2.0" - rimraf "2.6.1" - tmp "0.0.31" - underscore "1.8.3" - duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -1070,10 +957,6 @@ esprima@^1.2.2: version "1.2.5" resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" @@ -1309,13 +1192,6 @@ from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" -fs-extra@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - fs-extra@^0.22.1: version "0.22.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.22.1.tgz#5fd6f8049dc976ca19eb2355d658173cabcce056" @@ -1463,10 +1339,6 @@ growl@1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/growl/-/growl-1.8.1.tgz#4b2dec8d907e93db336624dcec0183502f8c9428" -hammerjs@^2.0.4: - version "2.0.8" - resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" - handlebars@^4.0.1: version "4.0.10" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" @@ -1594,7 +1466,7 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@3.0.6, inquirer@^3.0.6: +inquirer@3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347" dependencies: @@ -1774,10 +1646,6 @@ jison@0.4.17: lex-parser "~0.1.3" nomnom "1.5.2" -jquery@^2.1.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02" - js-tokens@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -1789,13 +1657,6 @@ js-yaml@3.0.1: argparse "~ 0.1.11" esprima "~ 1.0.2" -js-yaml@3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" - js-yaml@3.x, js-yaml@^3.2.5, js-yaml@^3.5.1: version "3.9.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce" @@ -1936,14 +1797,6 @@ map-stream@~0.1.0: buffers "~0.1.1" readable-stream "~1.0.0" -materialize-css@0.98.1: - version "0.98.1" - resolved "https://registry.yarnpkg.com/materialize-css/-/materialize-css-0.98.1.tgz#7276895b2c998b53e26deaa0c23a0484c0851d99" - dependencies: - hammerjs "^2.0.4" - jquery "^2.1.4" - node-archiver "^0.3.0" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -2155,13 +2008,6 @@ nnupnp@1.0.2: request "2.10.0" xml2js "0.1.14" -node-archiver@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/node-archiver/-/node-archiver-0.3.0.tgz#b9f1afe5006d0bdf29260181833a070978bc6947" - dependencies: - fstream "^1.0.10" - tar "^2.2.1" - node-pre-gyp@0.6.23: version "0.6.23" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.23.tgz#155bf3683abcfcde008aedab1248891a0773db95" @@ -2190,7 +2036,7 @@ node-pre-gyp@0.6.33: tar "~2.2.1" tar-pack "~3.3.0" -node-pre-gyp@0.6.34, node-pre-gyp@^0.6.34, node-pre-gyp@~0.6.28: +node-pre-gyp@0.6.34, node-pre-gyp@~0.6.28: version "0.6.34" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" dependencies: @@ -2446,7 +2292,7 @@ q-io@1.13.2: qs "^1.2.1" url2 "^0.0.0" -q@1.5.0, q@^1.0.1: +q@^1.0.1: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" @@ -2462,7 +2308,7 @@ qs@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/qs/-/qs-1.0.2.tgz#50a93e2b5af6691c31bcea5dae78ee6ea1903768" -querablep@0.1.0, querablep@^0.1.0: +querablep@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/querablep/-/querablep-0.1.0.tgz#b2cd2b3e75fcd45d5dd7ade4c1811ab547849a84" @@ -2679,7 +2525,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@2.6.1, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -3135,7 +2981,7 @@ tmp@0.0.29: dependencies: os-tmpdir "~1.0.1" -tmp@0.0.31, tmp@^0.0.31: +tmp@^0.0.31: version "0.0.31" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" dependencies: @@ -3165,18 +3011,10 @@ tunnel-agent@~0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" -tweetnacl-util@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.0.tgz#4576c1cee5e2d63d207fee52f1ba02819480bc75" - -tweetnacl@0.14.3: +tweetnacl@0.14.3, tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d" -tweetnacl@0.14.5, tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - type-check@~0.3.1, type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" -- GitLab