"scripty": "^1.5.0",
"sequelize": "4.0.0-2",
"typescript": "~2.2.0",
+ "validator": "^7.0.0",
"winston": "^2.1.1",
"ws": "^2.0.0"
},
"@types/node": "^7.0.18",
"@types/request": "^0.0.43",
"@types/sequelize": "^4.0.55",
+ "@types/validator": "^6.2.0",
"@types/winston": "^2.3.2",
"@types/ws": "^0.0.41",
"chai": "^3.3.0",
}
// ----------- Node modules -----------
-import bodyParser = require('body-parser')
-import express = require('express')
+import * as bodyParser from 'body-parser'
+import * as express from 'express'
+// FIXME: cannot import express-validator
const expressValidator = require('express-validator')
-import http = require('http')
-import morgan = require('morgan')
-import path = require('path')
-import bittorrentTracker = require('bittorrent-tracker')
+import * as http from 'http'
+import * as morgan from 'morgan'
+import * as path from 'path'
+import * as bittorrentTracker from 'bittorrent-tracker'
import { Server as WebSocketServer } from 'ws'
const TrackerServer = bittorrentTracker.Server
-import express = require('express')
+import * as express from 'express'
import { CONFIG } from '../../initializers';
import { logger } from '../../helpers'
-import express = require('express')
+import * as express from 'express'
import { CONFIG } from '../../initializers'
-import express = require('express')
+import * as express from 'express'
import { badRequest } from '../../helpers'
-import express = require('express')
+import * as express from 'express'
import { waterfall } from 'async'
import { database as db } from '../../initializers/database'
-import express = require('express')
+import * as express from 'express'
import { badRequest } from '../../../helpers'
-import express = require('express')
+import * as express from 'express'
import * as waterfall from 'async/waterfall'
import { database as db } from '../../../initializers/database'
-import express = require('express')
+import * as express from 'express'
import { eachSeries, waterfall } from 'async'
import { database as db } from '../../../initializers/database'
-import express = require('express')
+import * as express from 'express'
import { parallel } from 'async'
import {
-import express = require('express')
+import * as express from 'express'
import { waterfall } from 'async'
import { database as db } from '../../initializers/database'
-import express = require('express')
+import * as express from 'express'
import { waterfall } from 'async'
import { database as db } from '../../../initializers/database'
-import friends = require('../../../lib/friends')
+import * as friends from '../../../lib/friends'
import {
logger,
getFormatedObjects,
-import express = require('express')
+import * as express from 'express'
import { database as db } from '../../../initializers/database'
import { logger } from '../../../helpers'
-import express = require('express')
-import fs = require('fs')
-import multer = require('multer')
-import path = require('path')
+import * as express from 'express'
+import * as fs from 'fs'
+import * as multer from 'multer'
+import * as path from 'path'
import { waterfall } from 'async'
import { database as db } from '../../../initializers/database'
-import express = require('express')
+import * as express from 'express'
import { waterfall } from 'async'
import { database as db } from '../../../initializers/database'
import { parallel } from 'async'
-import express = require('express')
-import fs = require('fs')
+import * as express from 'express'
+import * as fs from 'fs'
import { join } from 'path'
-import expressValidator = require('express-validator')
-// TODO: use .validator when express-validator typing will have validator field
-const validator = expressValidator['validator']
+import * as validator from 'validator'
import { database as db } from '../initializers/database'
import {
-import express = require('express')
-import cors = require('cors')
+import * as express from 'express'
+import * as cors from 'cors'
import {
CONFIG,
-import expressValidator = require('express-validator')
-// TODO: use .validator when express-validator typing will have validator field
-const validator = expressValidator['validator']
+import * as validator from 'validator'
import { isArray } from './misc'
import { values } from 'lodash'
-import expressValidator = require('express-validator')
-// TODO: use .validator when express-validator typing will have validator field
-const validator = expressValidator['validator']
+import * as validator from 'validator'
import { CONSTRAINTS_FIELDS, USER_ROLES } from '../../initializers'
const USERS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.USERS
import { values } from 'lodash'
-import expressValidator = require('express-validator')
-// TODO: use .validator when express-validator typing will have validator field
-const validator = expressValidator['validator']
+import * as validator from 'validator'
import {
CONSTRAINTS_FIELDS,
// TODO: import from ES6 when retry typing file will include errorFilter function
-import retry = require('async/retry')
+import * as retry from 'async/retry'
import { database as db } from '../initializers/database'
import { logger } from './logger'
// Thanks http://tostring.it/2014/06/23/advanced-logging-with-nodejs/
-import mkdirp = require('mkdirp')
-import path = require('path')
-import winston = require('winston')
+import * as mkdirp from 'mkdirp'
+import * as path from 'path'
+import * as winston from 'winston'
// Do not use barrel (dependencies issues)
import { CONFIG } from '../initializers/constants'
-import crypto = require('crypto')
-import bcrypt = require('bcrypt')
-import fs = require('fs')
-import openssl = require('openssl-wrapper')
+import * as crypto from 'crypto'
+import * as bcrypt from 'bcrypt'
+import * as fs from 'fs'
+import * as openssl from 'openssl-wrapper'
import { join } from 'path'
import {
-import replay = require('request-replay')
-import request = require('request')
+import * as replay from 'request-replay'
+import * as request from 'request'
import {
RETRY_REQUESTS,
-import config = require('config')
+import * as config from 'config'
import { database as db } from './database'
import { CONFIG } from './constants'
-import config = require('config')
+import * as config from 'config'
import { join } from 'path'
// Do not use barrels, remain constants as independent as possible
-import fs = require('fs')
+import * as fs from 'fs'
import { join } from 'path'
-import Sequelize = require('sequelize')
+import * as Sequelize from 'sequelize'
import { CONFIG } from './constants'
// Do not use barrel, we need to load database first
import { join } from 'path'
-import config = require('config')
+import * as config from 'config'
import { each, series } from 'async'
-import mkdirp = require('mkdirp')
-import passwordGenerator = require('password-generator')
+import * as mkdirp from 'mkdirp'
+import * as passwordGenerator from 'password-generator'
import { database as db } from './database'
import { USER_ROLES, CONFIG, LAST_MIGRATION_VERSION } from './constants'
import { waterfall, eachSeries } from 'async'
-import fs = require('fs')
-import path = require('path')
+import * as fs from 'fs'
+import * as path from 'path'
import * as Sequelize from 'sequelize'
import { database as db } from './database'
import { each, eachLimit, eachSeries, series, waterfall } from 'async'
-import request = require('request')
+import * as request from 'request'
import { database as db } from '../initializers/database'
import {
-import OAuthServer = require('express-oauth-server')
+import * as OAuthServer from 'express-oauth-server'
import { OAUTH_LIFETIME } from '../initializers'
import { logger } from '../helpers'
-import safeBuffer = require('safe-buffer')
+import * as safeBuffer from 'safe-buffer'
const Buffer = safeBuffer.Buffer
-import createTorrent = require('create-torrent')
-import ffmpeg = require('fluent-ffmpeg')
-import fs = require('fs')
-import magnetUtil = require('magnet-uri')
+import * as createTorrent from 'create-torrent'
+import * as ffmpeg from 'fluent-ffmpeg'
+import * as fs from 'fs'
+import * as magnetUtil from 'magnet-uri'
import { map, values } from 'lodash'
import { parallel, series } from 'async'
-import parseTorrent = require('parse-torrent')
+import * as parseTorrent from 'parse-torrent'
import { join } from 'path'
import * as Sequelize from 'sequelize'
"@types/express-serve-static-core" "*"
"@types/mime" "*"
-"@types/validator@*":
+"@types/validator@*", "@types/validator@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@types/validator/-/validator-6.2.0.tgz#020322fe1929f69889eb675a1bdb5a98394b71f0"
version "5.7.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-5.7.0.tgz#7a87a58146b695ac486071141c0c49d67da05e5c"
+validator@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/validator/-/validator-7.0.0.tgz#c74deb8063512fac35547938e6f0b1504a282fd2"
+
validator@~6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/validator/-/validator-6.2.1.tgz#bc575b78d15beb2e338a665ba9530c7f409ef667"