From 7cde3b9c2e84ea20bb0aae4544598483cde9e22c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Jan 2020 14:56:07 +0100 Subject: Update validator dependency --- server/helpers/activitypub.ts | 3 +-- server/helpers/custom-validators/activitypub/activity.ts | 2 +- server/helpers/custom-validators/activitypub/actor.ts | 2 +- server/helpers/custom-validators/activitypub/misc.ts | 2 +- server/helpers/custom-validators/activitypub/playlist.ts | 2 +- server/helpers/custom-validators/activitypub/video-comments.ts | 2 +- server/helpers/custom-validators/activitypub/videos.ts | 2 +- server/helpers/custom-validators/misc.ts | 2 +- server/helpers/custom-validators/plugins.ts | 2 +- server/helpers/custom-validators/search.ts | 2 +- server/helpers/custom-validators/servers.ts | 2 +- server/helpers/custom-validators/user-notifications.ts | 2 +- server/helpers/custom-validators/users.ts | 2 +- server/helpers/custom-validators/video-abuses.ts | 2 +- server/helpers/custom-validators/video-blacklist.ts | 2 +- server/helpers/custom-validators/video-channels.ts | 2 +- server/helpers/custom-validators/video-comments.ts | 2 +- server/helpers/custom-validators/video-imports.ts | 2 +- server/helpers/custom-validators/video-playlists.ts | 2 +- server/helpers/custom-validators/videos.ts | 2 +- 20 files changed, 20 insertions(+), 21 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 97c809a0c..735f2d73a 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -1,9 +1,8 @@ import * as Bluebird from 'bluebird' -import * as validator from 'validator' +import validator from 'validator' import { ResultList } from '../../shared/models' import { Activity } from '../../shared/models/activitypub' import { ACTIVITY_PUB } from '../initializers/constants' -import { ActorModel } from '../models/activitypub/actor' import { signJsonLDObject } from './peertube-crypto' import { pageToStartAndCount } from './core-utils' import { parse } from 'url' diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts index f68c76cdc..8b8c0685f 100644 --- a/server/helpers/custom-validators/activitypub/activity.ts +++ b/server/helpers/custom-validators/activitypub/activity.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { Activity, ActivityType } from '../../../../shared/models/activitypub' import { sanitizeAndCheckActorObject } from './actor' import { isActivityPubUrlValid, isBaseActivityValid, isObjectValid } from './misc' diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts index ec4dd6f96..fa58e163f 100644 --- a/server/helpers/custom-validators/activitypub/actor.ts +++ b/server/helpers/custom-validators/activitypub/actor.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' import { exists, isArray } from '../misc' import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc' diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index 5afcfbedc..4ee8e6fee 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' import { isTestInstance } from '../../core-utils' import { exists } from '../misc' diff --git a/server/helpers/custom-validators/activitypub/playlist.ts b/server/helpers/custom-validators/activitypub/playlist.ts index 6c7bdb193..bd0d16a4a 100644 --- a/server/helpers/custom-validators/activitypub/playlist.ts +++ b/server/helpers/custom-validators/activitypub/playlist.ts @@ -1,6 +1,6 @@ import { exists, isDateValid } from '../misc' import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' -import * as validator from 'validator' +import validator from 'validator' import { PlaylistElementObject } from '../../../../shared/models/activitypub/objects/playlist-element-object' import { isActivityPubUrlValid } from './misc' diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts index ea780ca46..aa3c246b5 100644 --- a/server/helpers/custom-validators/activitypub/video-comments.ts +++ b/server/helpers/custom-validators/activitypub/video-comments.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { ACTIVITY_PUB } from '../../../initializers/constants' import { exists, isArray, isDateValid } from '../misc' import { isActivityPubUrlValid } from './misc' diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts index a28bebf2d..fe94bd58a 100644 --- a/server/helpers/custom-validators/activitypub/videos.ts +++ b/server/helpers/custom-validators/activitypub/videos.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { ACTIVITY_PUB, CONSTRAINTS_FIELDS } from '../../../initializers/constants' import { peertubeTruncate } from '../../core-utils' import { exists, isArray, isBooleanValid, isDateValid, isUUIDValid } from '../misc' diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts index 0c3df1cd0..89149b3e0 100644 --- a/server/helpers/custom-validators/misc.ts +++ b/server/helpers/custom-validators/misc.ts @@ -1,5 +1,5 @@ import 'multer' -import * as validator from 'validator' +import validator from 'validator' import { sep } from 'path' function exists (value: any) { diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index 332418b49..3af72547b 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts @@ -1,5 +1,5 @@ import { exists, isArray, isSafePath } from './misc' -import * as validator from 'validator' +import validator from 'validator' import { PluginType } from '../../../shared/models/plugins/plugin.type' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model' diff --git a/server/helpers/custom-validators/search.ts b/server/helpers/custom-validators/search.ts index ee732b15a..bb17134c3 100644 --- a/server/helpers/custom-validators/search.ts +++ b/server/helpers/custom-validators/search.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { isArray } from './misc' function isNumberArray (value: any) { diff --git a/server/helpers/custom-validators/servers.ts b/server/helpers/custom-validators/servers.ts index 7ced36fd3..adf1ea497 100644 --- a/server/helpers/custom-validators/servers.ts +++ b/server/helpers/custom-validators/servers.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { exists, isArray } from './misc' import { isTestInstance } from '../core-utils' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' diff --git a/server/helpers/custom-validators/user-notifications.ts b/server/helpers/custom-validators/user-notifications.ts index 02ea3bbc2..5a4d10504 100644 --- a/server/helpers/custom-validators/user-notifications.ts +++ b/server/helpers/custom-validators/user-notifications.ts @@ -1,5 +1,5 @@ import { exists } from './misc' -import * as validator from 'validator' +import validator from 'validator' import { UserNotificationType } from '../../../shared/models/users' import { UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts index 008916a04..b4d5751e7 100644 --- a/server/helpers/custom-validators/users.ts +++ b/server/helpers/custom-validators/users.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { UserRole } from '../../../shared' import { CONSTRAINTS_FIELDS, NSFW_POLICY_TYPES } from '../../initializers/constants' import { exists, isArray, isBooleanValid, isFileValid } from './misc' diff --git a/server/helpers/custom-validators/video-abuses.ts b/server/helpers/custom-validators/video-abuses.ts index e43d12be8..a9478c76a 100644 --- a/server/helpers/custom-validators/video-abuses.ts +++ b/server/helpers/custom-validators/video-abuses.ts @@ -1,5 +1,5 @@ import { Response } from 'express' -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants' import { exists } from './misc' import { VideoAbuseModel } from '../../models/video/video-abuse' diff --git a/server/helpers/custom-validators/video-blacklist.ts b/server/helpers/custom-validators/video-blacklist.ts index 9a44332ef..17cb3b00b 100644 --- a/server/helpers/custom-validators/video-blacklist.ts +++ b/server/helpers/custom-validators/video-blacklist.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { exists } from './misc' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' import { VideoBlacklistType } from '../../../shared/models/videos' diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts index 6c52dc093..ded5d5171 100644 --- a/server/helpers/custom-validators/video-channels.ts +++ b/server/helpers/custom-validators/video-channels.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' import { exists } from './misc' diff --git a/server/helpers/custom-validators/video-comments.ts b/server/helpers/custom-validators/video-comments.ts index 8a7cd7105..846f28b17 100644 --- a/server/helpers/custom-validators/video-comments.ts +++ b/server/helpers/custom-validators/video-comments.ts @@ -1,5 +1,5 @@ import 'multer' -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS diff --git a/server/helpers/custom-validators/video-imports.ts b/server/helpers/custom-validators/video-imports.ts index 8820c4c0a..ffad482b4 100644 --- a/server/helpers/custom-validators/video-imports.ts +++ b/server/helpers/custom-validators/video-imports.ts @@ -1,5 +1,5 @@ import 'multer' -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_IMPORT_STATES } from '../../initializers/constants' import { exists, isFileValid } from './misc' import * as express from 'express' diff --git a/server/helpers/custom-validators/video-playlists.ts b/server/helpers/custom-validators/video-playlists.ts index 60125dcda..4bb8384ab 100644 --- a/server/helpers/custom-validators/video-playlists.ts +++ b/server/helpers/custom-validators/video-playlists.ts @@ -1,5 +1,5 @@ import { exists } from './misc' -import * as validator from 'validator' +import validator from 'validator' import { CONSTRAINTS_FIELDS, VIDEO_PLAYLIST_PRIVACIES, VIDEO_PLAYLIST_TYPES } from '../../initializers/constants' import * as express from 'express' import { VideoPlaylistModel } from '../../models/video/video-playlist' diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index ff93f2e99..a9e859e54 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts @@ -1,5 +1,5 @@ import { values } from 'lodash' -import * as validator from 'validator' +import validator from 'validator' import { VideoFilter, VideoPrivacy, VideoRateType } from '../../../shared' import { CONSTRAINTS_FIELDS, -- cgit v1.2.3