Fix dependency errors between modules
authorbuoyantair <buoyantair@protonmail.com>
Thu, 15 Nov 2018 21:21:26 +0000 (02:51 +0530)
committerbuoyantair <buoyantair@protonmail.com>
Thu, 15 Nov 2018 21:21:26 +0000 (02:51 +0530)
server/lib/activitypub/process/process-create.ts
server/lib/activitypub/process/process-like.ts
server/tests/api/activitypub/client.ts
server/tests/api/activitypub/fetch.ts
server/tests/api/activitypub/helpers.ts
server/tests/api/activitypub/security.ts
server/tests/api/server/no-client.ts
shared/utils/index.ts

index 214e14546f943d36669a08e8351104a251f776ac..9a72cb899b56c7c3fb6f3fb6bebc937643827c60 100644 (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'
 
index 0dca175511b9bb9854939b841136db03589ab043..be86665e91ed700ed27fd36d491b5a065c5d4564 100644 (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) {
index 334cd4e5ccc000e5de18994d732a190ae92d3e5d..d45232c8d0617cc84d8ead43b66078a8e17f6ee0 100644 (file)
@@ -9,7 +9,7 @@ import {
   runServer,
   ServerInfo,
   setAccessTokensToServers
-} from '../../shared/utils'
+} from '../../../../shared/utils'
 
 
 const expect = chai.expect
index a42c606c6cccc8ddcce6d7f267907dfeb02752df..e84eb18bb3e2e2e7e0a6cf3ab5f04d2dfb5db1b3 100644 (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
index 61084624784674585b1b99ab6c53e4c967238550..4c42f3d67e6754dcc01c14ae1a598d5de1c7eb79 100644 (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'
index e7899bb14c48be01171aaa8ee8fbefdab40c47db..69b7c01482030cd4139eeb9be4a3cc79d25b742a 100644 (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'
index 6d6ce8532a761a14e7a21342993d051259dee201..3b95ce945bab0dd456df09f458cf911b3bafa662 100644 (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
index 905d938238ac6588aeb185a9f1fa056747ffb761..897389824d165d84cedf35fe11e3b06d7f477f93 100644 (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'