diff --git a/app/lib/dal/indexDAL/loki/LokiTransactions.ts b/app/lib/dal/indexDAL/loki/LokiTransactions.ts index 97265aaecf2d34ba568d150794a1c044bd7b1305..76f87a2a0bac7cc1da5dd0c6e9b0ec037170bba1 100644 --- a/app/lib/dal/indexDAL/loki/LokiTransactions.ts +++ b/app/lib/dal/indexDAL/loki/LokiTransactions.ts @@ -1,3 +1,17 @@ +// 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 * as moment from "moment" import {LokiIndex} from "./LokiIndex" import {TxsDAO} from "../abstract/TxsDAO" import {SandBox} from "../../sqliteDAL/SandBox" @@ -5,7 +19,6 @@ import {TransactionDTO} from "../../../dto/TransactionDTO" import {DBTx} from "../../../db/DBTx" import {Underscore} from "../../../common-libs/underscore" -const moment = require('moment') const constants = require('../../../constants') export class LokiTransactions extends LokiIndex<DBTx> implements TxsDAO { diff --git a/app/lib/dto/MembershipDTO.ts b/app/lib/dto/MembershipDTO.ts index 6d8ada8844142bb0f4c4467bd015b9a8b416c906..267106ab0d634bd17bf9162b771fcfcfda748db6 100644 --- a/app/lib/dto/MembershipDTO.ts +++ b/app/lib/dto/MembershipDTO.ts @@ -11,8 +11,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. -import {IdentityDTO} from "./IdentityDTO" import * as moment from "moment" +import {IdentityDTO} from "./IdentityDTO" import {Cloneable} from "./Cloneable"; import {hashf} from "../common"; diff --git a/app/lib/logger.ts b/app/lib/logger.ts index 7a2f4e1f260c30d007ac43d96baff72868367198..f4d4f35babb0ce7e12c6b0454283e256f2cc2eb4 100644 --- a/app/lib/logger.ts +++ b/app/lib/logger.ts @@ -11,9 +11,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. +import * as moment from "moment" import {Directory} from "./system/directory" -const moment = require('moment'); const path = require('path'); const winston = require('winston'); diff --git a/app/modules/crawler/lib/sync.ts b/app/modules/crawler/lib/sync.ts index 7325a907c457eeaf8840947e181bea893582f9b5..8c6c442ca27ad49392c8b2513c6b870026ab7159 100644 --- a/app/modules/crawler/lib/sync.ts +++ b/app/modules/crawler/lib/sync.ts @@ -11,8 +11,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. -import {CrawlerConstants} from "./constants" import * as stream from "stream" +import * as moment from "moment" +import {CrawlerConstants} from "./constants" import {Server} from "../../../../server" import {PeerDTO} from "../../../lib/dto/PeerDTO" import {FileDAL} from "../../../lib/dal/fileDAL" @@ -34,7 +35,6 @@ import {Underscore} from "../../../lib/common-libs/underscore" import {HttpMerkleOfPeers} from "../../bma/lib/dtos" import {DBPeer, JSONDBPeer} from "../../../lib/db/DBPeer" -const moment = require('moment'); const multimeter = require('multimeter'); const makeQuerablePromise = require('querablep'); diff --git a/app/modules/prover/lib/blockGenerator.ts b/app/modules/prover/lib/blockGenerator.ts index 3ca3f43ece2cbfb4ac0d5642c064ce8348533d08..f5520d68f47ee71872c2fd0d811eb78c90edaf71 100644 --- a/app/modules/prover/lib/blockGenerator.ts +++ b/app/modules/prover/lib/blockGenerator.ts @@ -11,6 +11,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. +import * as moment from "moment" import {Server} from "../../../../server" import {BlockchainContext} from "../../../lib/computation/BlockchainContext" import {TransactionDTO} from "../../../lib/dto/TransactionDTO" @@ -33,7 +34,6 @@ import {Underscore} from "../../../lib/common-libs/underscore" import {DBCert} from "../../../lib/dal/sqliteDAL/CertDAL" import {Map} from "../../../lib/common-libs/crypto/map" -const moment = require('moment'); const inquirer = require('inquirer'); const constants = CommonConstants diff --git a/app/modules/prover/lib/proof.ts b/app/modules/prover/lib/proof.ts index aa5381a80d88fca94914e3ee5c54dbd47a2e3f1f..50329b0a595ed6976b47dfc4390a4d5eb9951cc0 100644 --- a/app/modules/prover/lib/proof.ts +++ b/app/modules/prover/lib/proof.ts @@ -11,6 +11,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. +import * as moment from "moment" import {LOCAL_RULES_HELPERS} from "../../../lib/rules/local_rules" import {hashf} from "../../../lib/common" import {DBBlock} from "../../../lib/db/DBBlock" @@ -23,7 +24,6 @@ import {ProcessCpuProfiler} from "../../../ProcessCpuProfiler" import {PowDAL} from "../../../lib/dal/fileDALs/PowDAL"; import {Directory} from "../../../lib/system/directory" -const moment = require('moment'); const querablep = require('querablep'); export function createPowWorker() {