Skip to content
Snippets Groups Projects
Commit e96970a0 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Refactoring: `moment` importer

parent e4c739b6
Branches
Tags
No related merge requests found
// 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 {LokiIndex} from "./LokiIndex"
import {TxsDAO} from "../abstract/TxsDAO" import {TxsDAO} from "../abstract/TxsDAO"
import {SandBox} from "../../sqliteDAL/SandBox" import {SandBox} from "../../sqliteDAL/SandBox"
...@@ -5,7 +19,6 @@ import {TransactionDTO} from "../../../dto/TransactionDTO" ...@@ -5,7 +19,6 @@ import {TransactionDTO} from "../../../dto/TransactionDTO"
import {DBTx} from "../../../db/DBTx" import {DBTx} from "../../../db/DBTx"
import {Underscore} from "../../../common-libs/underscore" import {Underscore} from "../../../common-libs/underscore"
const moment = require('moment')
const constants = require('../../../constants') const constants = require('../../../constants')
export class LokiTransactions extends LokiIndex<DBTx> implements TxsDAO { export class LokiTransactions extends LokiIndex<DBTx> implements TxsDAO {
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
import {IdentityDTO} from "./IdentityDTO"
import * as moment from "moment" import * as moment from "moment"
import {IdentityDTO} from "./IdentityDTO"
import {Cloneable} from "./Cloneable"; import {Cloneable} from "./Cloneable";
import {hashf} from "../common"; import {hashf} from "../common";
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
import * as moment from "moment"
import {Directory} from "./system/directory" import {Directory} from "./system/directory"
const moment = require('moment');
const path = require('path'); const path = require('path');
const winston = require('winston'); const winston = require('winston');
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
import {CrawlerConstants} from "./constants"
import * as stream from "stream" import * as stream from "stream"
import * as moment from "moment"
import {CrawlerConstants} from "./constants"
import {Server} from "../../../../server" import {Server} from "../../../../server"
import {PeerDTO} from "../../../lib/dto/PeerDTO" import {PeerDTO} from "../../../lib/dto/PeerDTO"
import {FileDAL} from "../../../lib/dal/fileDAL" import {FileDAL} from "../../../lib/dal/fileDAL"
...@@ -34,7 +35,6 @@ import {Underscore} from "../../../lib/common-libs/underscore" ...@@ -34,7 +35,6 @@ import {Underscore} from "../../../lib/common-libs/underscore"
import {HttpMerkleOfPeers} from "../../bma/lib/dtos" import {HttpMerkleOfPeers} from "../../bma/lib/dtos"
import {DBPeer, JSONDBPeer} from "../../../lib/db/DBPeer" import {DBPeer, JSONDBPeer} from "../../../lib/db/DBPeer"
const moment = require('moment');
const multimeter = require('multimeter'); const multimeter = require('multimeter');
const makeQuerablePromise = require('querablep'); const makeQuerablePromise = require('querablep');
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
import * as moment from "moment"
import {Server} from "../../../../server" import {Server} from "../../../../server"
import {BlockchainContext} from "../../../lib/computation/BlockchainContext" import {BlockchainContext} from "../../../lib/computation/BlockchainContext"
import {TransactionDTO} from "../../../lib/dto/TransactionDTO" import {TransactionDTO} from "../../../lib/dto/TransactionDTO"
...@@ -33,7 +34,6 @@ import {Underscore} from "../../../lib/common-libs/underscore" ...@@ -33,7 +34,6 @@ import {Underscore} from "../../../lib/common-libs/underscore"
import {DBCert} from "../../../lib/dal/sqliteDAL/CertDAL" import {DBCert} from "../../../lib/dal/sqliteDAL/CertDAL"
import {Map} from "../../../lib/common-libs/crypto/map" import {Map} from "../../../lib/common-libs/crypto/map"
const moment = require('moment');
const inquirer = require('inquirer'); const inquirer = require('inquirer');
const constants = CommonConstants const constants = CommonConstants
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
import * as moment from "moment"
import {LOCAL_RULES_HELPERS} from "../../../lib/rules/local_rules" import {LOCAL_RULES_HELPERS} from "../../../lib/rules/local_rules"
import {hashf} from "../../../lib/common" import {hashf} from "../../../lib/common"
import {DBBlock} from "../../../lib/db/DBBlock" import {DBBlock} from "../../../lib/db/DBBlock"
...@@ -23,7 +24,6 @@ import {ProcessCpuProfiler} from "../../../ProcessCpuProfiler" ...@@ -23,7 +24,6 @@ import {ProcessCpuProfiler} from "../../../ProcessCpuProfiler"
import {PowDAL} from "../../../lib/dal/fileDALs/PowDAL"; import {PowDAL} from "../../../lib/dal/fileDALs/PowDAL";
import {Directory} from "../../../lib/system/directory" import {Directory} from "../../../lib/system/directory"
const moment = require('moment');
const querablep = require('querablep'); const querablep = require('querablep');
export function createPowWorker() { export function createPowWorker() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment