From 9639bd175726b73f8fe664b5ced12a72407b1f0b Mon Sep 17 00:00:00 2001 From: buoyantair Date: Mon, 29 Oct 2018 22:18:31 +0530 Subject: Move utils to /shared Move utils used by /server/tools/* & /server/tests/**/* into /shared folder. Issue: #1336 --- server/tools/peertube-get-access-token.ts | 2 +- server/tools/peertube-import-videos.ts | 2 +- server/tools/peertube-upload.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tools') diff --git a/server/tools/peertube-get-access-token.ts b/server/tools/peertube-get-access-token.ts index eb2571a03..a68665f5b 100644 --- a/server/tools/peertube-get-access-token.ts +++ b/server/tools/peertube-get-access-token.ts @@ -6,7 +6,7 @@ import { Server, Client, User -} from '../tests/utils/index' +} from '../../shared/utils' program .option('-u, --url ', 'Server url') diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 21505b79d..1fe0a9348 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts @@ -6,7 +6,7 @@ import { join } from 'path' import { VideoPrivacy } from '../../shared/models/videos' import { doRequestAndSaveToFile } from '../helpers/requests' import { CONSTRAINTS_FIELDS } from '../initializers' -import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../tests/utils' +import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../../shared/utils/index' import { truncate } from 'lodash' import * as prompt from 'prompt' import { remove } from 'fs-extra' diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts index 6248fb47d..cc7bd9b4c 100644 --- a/server/tools/peertube-upload.ts +++ b/server/tools/peertube-upload.ts @@ -1,8 +1,8 @@ import * as program from 'commander' import { access, constants } from 'fs-extra' import { isAbsolute } from 'path' -import { getClient, login } from '../tests/utils' -import { uploadVideo } from '../tests/utils/index' +import { getClient, login } from '../../shared/utils' +import { uploadVideo } from '../../shared/utils/' import { VideoPrivacy } from '../../shared/models/videos' import { netrc, getSettings } from './cli' -- cgit v1.2.3