Fix build
This commit is contained in:
parent
c55e3d7227
commit
f304a1580b
|
@ -1,5 +1,6 @@
|
|||
import { intoArray, toBoolean } from '@app/helpers'
|
||||
import { AttributesOnly, getAllPrivacies } from '@shared/core-utils'
|
||||
import { getAllPrivacies } from '@shared/core-utils'
|
||||
import { AttributesOnly } from '@shared/typescript-utils'
|
||||
import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models'
|
||||
|
||||
type VideoFiltersKeys = {
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
"@shared/models": [ "../shared/models" ],
|
||||
"@shared/core-utils": [ "../shared/core-utils" ],
|
||||
"@shared/core-utils/*": [ "../shared/core-utils/*" ],
|
||||
"@shared/typescript-utils": [ "../shared/typescript-utils" ],
|
||||
"@shared/typescript-utils/*": [ "../shared/typescript-utils/*" ],
|
||||
"@root-helpers/*": [ "src/root-helpers/*" ],
|
||||
"fs": [ "src/shims/noop.ts" ],
|
||||
"http": [ "src/shims/http.ts" ],
|
||||
|
|
|
@ -2,9 +2,9 @@ import { compare, genSalt, hash } from 'bcrypt'
|
|||
import { createSign, createVerify } from 'crypto'
|
||||
import { Request } from 'express'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { sha256 } from '@shared/extra-utils'
|
||||
import { BCRYPT_SALT_SIZE, HTTP_SIGNATURE, PRIVATE_RSA_KEY_SIZE } from '../initializers/constants'
|
||||
import { MActor } from '../types/models'
|
||||
import { sha256 } from '@shared/core-utils/common/crypto'
|
||||
import { createPrivateKey, getPublicKey, promisify1, promisify2 } from './core-utils'
|
||||
import { jsonld } from './custom-jsonld-signature'
|
||||
import { logger } from './logger'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { remove } from 'fs-extra'
|
||||
import { Instance as ParseTorrent } from 'parse-torrent'
|
||||
import { join } from 'path'
|
||||
import { sha256 } from '@shared/extra-utils'
|
||||
import { ResultList } from '../../shared'
|
||||
import { CONFIG } from '../initializers/config'
|
||||
import { sha256 } from '@shared/core-utils/common/crypto'
|
||||
import { execPromise, execPromise2, randomBytesPromise } from './core-utils'
|
||||
import { logger } from './logger'
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import { VideoPathManager } from '@server/lib/video-path-manager'
|
|||
import { MVideo } from '@server/types/models/video/video'
|
||||
import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file'
|
||||
import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist'
|
||||
import { sha1 } from '@shared/extra-utils'
|
||||
import { CONFIG } from '../initializers/config'
|
||||
import { promisify2 } from './core-utils'
|
||||
import { sha1 } from '@shared/core-utils/common/crypto'
|
||||
import { logger } from './logger'
|
||||
import { generateVideoImportTmpPath } from './utils'
|
||||
import { extractVideo } from './video'
|
||||
|
|
|
@ -8,9 +8,9 @@ import {
|
|||
UnauthorizedClientError,
|
||||
UnsupportedGrantTypeError
|
||||
} from 'oauth2-server'
|
||||
import { sha1 } from '@shared/core-utils/common/crypto'
|
||||
import { randomBytesPromise } from '@server/helpers/core-utils'
|
||||
import { MOAuthClient } from '@server/types/models'
|
||||
import { sha1 } from '@shared/extra-utils'
|
||||
import { OAUTH_LIFETIME } from '../../initializers/constants'
|
||||
import { BypassLogin, getClient, getRefreshToken, getUser, revokeToken, saveToken } from './oauth-model'
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ import { join } from 'path'
|
|||
import validator from 'validator'
|
||||
import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
|
||||
import { escapeHTML } from '@shared/core-utils/renderer'
|
||||
import { sha256 } from '@shared/extra-utils'
|
||||
import { HTMLServerConfig } from '@shared/models'
|
||||
import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/core-utils/i18n/i18n'
|
||||
import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
|
||||
import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos'
|
||||
import { isTestInstance } from '../helpers/core-utils'
|
||||
import { sha256 } from '@shared/core-utils/common/crypto'
|
||||
import { logger } from '../helpers/logger'
|
||||
import { mdToPlainText } from '../helpers/markdown'
|
||||
import { CONFIG } from '../initializers/config'
|
||||
|
|
|
@ -2,7 +2,7 @@ import { close, ensureDir, move, open, outputJSON, read, readFile, remove, stat,
|
|||
import { flatten, uniq } from 'lodash'
|
||||
import { basename, dirname, join } from 'path'
|
||||
import { MStreamingPlaylistFilesVideo, MVideo, MVideoUUID } from '@server/types/models'
|
||||
import { sha256 } from '@shared/core-utils/common/crypto'
|
||||
import { sha256 } from '@shared/extra-utils'
|
||||
import { getAudioStreamCodec, getVideoStreamCodec, getVideoStreamSize } from '../helpers/ffprobe-utils'
|
||||
import { logger } from '../helpers/logger'
|
||||
import { doRequest, doRequestAndSaveToFile } from '../helpers/requests'
|
||||
|
|
|
@ -18,10 +18,10 @@ import {
|
|||
import { getHLSPublicFileUrl } from '@server/lib/object-storage'
|
||||
import { VideoFileModel } from '@server/models/video/video-file'
|
||||
import { MStreamingPlaylist, MVideo } from '@server/types/models'
|
||||
import { AttributesOnly } from '@shared/typescript-utils'
|
||||
import { sha1 } from '@shared/extra-utils'
|
||||
import { VideoStorage } from '@shared/models'
|
||||
import { AttributesOnly } from '@shared/typescript-utils'
|
||||
import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
|
||||
import { sha1 } from '@shared/core-utils/common/crypto'
|
||||
import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
|
||||
import { isArrayOf } from '../../helpers/custom-validators/misc'
|
||||
import { isVideoFileInfoHashValid } from '../../helpers/custom-validators/videos'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from 'chai'
|
||||
import { basename } from 'path'
|
||||
import { removeFragmentedMP4Ext } from '@shared/core-utils'
|
||||
import { sha256 } from '@shared/core-utils/common/crypto'
|
||||
import { sha256 } from '@shared/extra-utils'
|
||||
import { HttpStatusCode, VideoStreamingPlaylist } from '@shared/models'
|
||||
import { PeerTubeServer } from '@shared/server-commands'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai'
|
||||
import { sha1 } from '@shared/core-utils'
|
||||
import { sha1 } from '@shared/extra-utils'
|
||||
import { makeGetRequest } from '@shared/server-commands'
|
||||
|
||||
async function hlsInfohashExist (serverUrl: string, masterPlaylistUrl: string, fileNumber: number) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { program } from 'commander'
|
|||
import { accessSync, constants } from 'fs'
|
||||
import { remove } from 'fs-extra'
|
||||
import { join } from 'path'
|
||||
import { sha256 } from '@shared/core-utils/crypto'
|
||||
import { sha256, wait } from '@shared/core-utils'
|
||||
import { doRequestAndSaveToFile } from '../helpers/requests'
|
||||
import {
|
||||
assignToken,
|
||||
|
@ -15,7 +15,6 @@ import {
|
|||
getLogger,
|
||||
getServerCredentials
|
||||
} from './cli'
|
||||
import { wait } from '@shared/server-commands'
|
||||
import { YoutubeDLCLI, YoutubeDLInfo, YoutubeDLInfoBuilder } from '@server/helpers/youtube-dl'
|
||||
import prompt = require('prompt')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export * from './array'
|
||||
export * from './crypto'
|
||||
export * from './random'
|
||||
export * from './date'
|
||||
export * from './env'
|
||||
export * from './object'
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// high excluded
|
||||
function randomInt (low: number, high: number) {
|
||||
return Math.floor(Math.random() * (high - low) + low)
|
||||
}
|
||||
|
||||
export {
|
||||
randomInt
|
||||
}
|
|
@ -1,2 +1,3 @@
|
|||
export * from './crypto'
|
||||
export * from './ffprobe'
|
||||
export * from './file'
|
||||
|
|
Loading…
Reference in New Issue