Fix dependency errors between modules

This commit is contained in:
buoyantair 2018-11-16 02:51:26 +05:30
parent ae28cdf327
commit 92e07c3b5d
8 changed files with 18 additions and 11 deletions

View File

@ -12,7 +12,7 @@ import { getOrCreateVideoAndAccountAndChannel } from '../videos'
import { forwardVideoRelatedActivity } from '../send/utils'
import { Redis } from '../../redis'
import { createOrUpdateCacheFile } from '../cache-file'
import { immutableAssign } from '../../../tests/utils'
import { immutableAssign } from '../../../../shared/utils'
import { getVideoDislikeActivityPubUrl } from '../url'
import { VideoModel } from '../../../models/video/video'

View File

@ -5,7 +5,7 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat
import { ActorModel } from '../../../models/activitypub/actor'
import { forwardVideoRelatedActivity } from '../send/utils'
import { getOrCreateVideoAndAccountAndChannel } from '../videos'
import { immutableAssign } from '../../../tests/utils'
import { immutableAssign } from '../../../../shared/utils'
import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from '../url'
async function processLikeActivity (activity: ActivityLike, byActor: ActorModel) {

View File

@ -9,7 +9,7 @@ import {
runServer,
ServerInfo,
setAccessTokensToServers
} from '../../shared/utils'
} from '../../../../shared/utils'
const expect = chai.expect

View File

@ -13,10 +13,10 @@ import {
setAccessTokensToServers,
uploadVideo,
userLogin
} from '../../utils'
} from '../../../../shared/utils'
import * as chai from 'chai'
import { setActorField, setVideoField } from '../../utils/miscs/sql'
import { waitJobs } from '../../utils/server/jobs'
import { waitJobs } from '../../../../shared/utils/server/jobs'
import { Video } from '../../../../shared/models/videos'
const expect = chai.expect

View File

@ -2,7 +2,7 @@
import 'mocha'
import { expect } from 'chai'
import { buildRequestStub } from '../../utils'
import { buildRequestStub } from '../../utils/miscs/stubs'
import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
import { cloneDeep } from 'lodash'
import { buildSignedActivity } from '../../../helpers/activitypub'

View File

@ -2,7 +2,16 @@
import 'mocha'
import { flushAndRunMultipleServers, flushTests, killallServers, makePOSTAPRequest, makeFollowRequest, ServerInfo } from '../../utils'
import {
flushAndRunMultipleServers,
flushTests,
killallServers,
ServerInfo
} from '../../../../shared/utils'
import {
makePOSTAPRequest,
makeFollowRequest,
} from '../../utils/requests/activitypub'
import { HTTP_SIGNATURE } from '../../../initializers'
import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils'
import * as chai from 'chai'

View File

@ -4,8 +4,8 @@ import {
flushTests,
killallServers,
ServerInfo
} from '../../utils/index'
import { runServer } from '../../utils/server/servers'
} from '../../../../shared/utils'
import { runServer } from '../../../../shared/utils/server/servers'
describe('Start and stop server without web client routes', function () {
let server: ServerInfo

View File

@ -4,10 +4,8 @@ export * from './server/clients'
export * from './server/config'
export * from './users/login'
export * from './miscs/miscs'
export * from './miscs/stubs'
export * from './server/follows'
export * from './requests/requests'
export * from './requests/activitypub'
export * from './server/servers'
export * from './videos/services'
export * from './users/users'