server/server -> server/core

This commit is contained in:
Chocobozzz
2023-10-04 15:13:25 +02:00
parent 114327d4ce
commit 5a3d0650c9
838 changed files with 111 additions and 111 deletions

View File

@@ -8,9 +8,9 @@ import {
activityPubContextify,
buildGlobalHTTPHeaders,
signAndContextify
} from '@peertube/peertube-server/server/helpers/activity-pub-utils.js'
import { buildDigest } from '@peertube/peertube-server/server/helpers/peertube-crypto.js'
import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@peertube/peertube-server/server/initializers/constants.js'
} from '@peertube/peertube-server/core/helpers/activity-pub-utils.js'
import { buildDigest } from '@peertube/peertube-server/core/helpers/peertube-crypto.js'
import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@peertube/peertube-server/core/initializers/constants.js'
import { makePOSTAPRequest } from '@tests/shared/requests.js'
import { SQLCommand } from '@tests/shared/sql-command.js'
import { expect } from 'chai'

View File

@@ -12,7 +12,7 @@ import {
setAccessTokensToServers,
waitJobs
} from '@peertube/peertube-server-commands'
import { DEFAULT_AUDIO_RESOLUTION } from '@peertube/peertube-server/server/initializers/constants.js'
import { DEFAULT_AUDIO_RESOLUTION } from '@peertube/peertube-server/core/initializers/constants.js'
import { checkDirectoryIsEmpty, checkTmpIsEmpty } from '@tests/shared/directories.js'
import { completeCheckHlsPlaylist } from '@tests/shared/streaming-playlists.js'

View File

@@ -3,7 +3,7 @@
import { expect } from 'chai'
import { getAllFiles, getMaxTheoreticalBitrate, getMinTheoreticalBitrate, omit } from '@peertube/peertube-core-utils'
import { HttpStatusCode, VideoFileMetadata, VideoState } from '@peertube/peertube-models'
import { canDoQuickTranscode } from '@peertube/peertube-server/server/lib/transcoding/transcoding-quick-transcode.js'
import { canDoQuickTranscode } from '@peertube/peertube-server/core/lib/transcoding/transcoding-quick-transcode.js'
import { buildAbsoluteFixturePath } from '@peertube/peertube-node-utils'
import {
ffprobePromise,

View File

@@ -2,7 +2,7 @@
import { expect } from 'chai'
import { basename } from 'path'
import { ACTOR_IMAGES_SIZE } from '@peertube/peertube-server/server/initializers/constants.js'
import { ACTOR_IMAGES_SIZE } from '@peertube/peertube-server/core/initializers/constants.js'
import { testFileExistsOrNot, testImage } from '@tests/shared/checks.js'
import { SQLCommand } from '@tests/shared/sql-command.js'
import { wait } from '@peertube/peertube-core-utils'

View File

@@ -1,12 +1,12 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { buildAbsoluteFixturePath } from '@peertube/peertube-node-utils'
import { signAndContextify } from '@peertube/peertube-server/server/helpers/activity-pub-utils.js'
import { signAndContextify } from '@peertube/peertube-server/core/helpers/activity-pub-utils.js'
import {
isHTTPSignatureVerified,
isJsonLDSignatureVerified,
parseHTTPSignature
} from '@peertube/peertube-server/server/helpers/peertube-crypto.js'
} from '@peertube/peertube-server/core/helpers/peertube-crypto.js'
import { buildRequestStub } from '@tests/shared/tests.js'
import { expect } from 'chai'
import { readJsonSync } from 'fs-extra/esm'

View File

@@ -5,7 +5,7 @@ import snakeCase from 'lodash-es/snakeCase.js'
import validator from 'validator'
import { getAverageTheoreticalBitrate, getMaxTheoreticalBitrate, parseChapters } from '@peertube/peertube-core-utils'
import { VideoResolution } from '@peertube/peertube-models'
import { objectConverter, parseBytes, parseDurationToMs, parseSemVersion } from '@peertube/peertube-server/server/helpers/core-utils.js'
import { objectConverter, parseBytes, parseDurationToMs, parseSemVersion } from '@peertube/peertube-server/core/helpers/core-utils.js'
describe('Parse Bytes', function () {

View File

@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
import { decrypt, encrypt } from '@peertube/peertube-server/server/helpers/peertube-crypto.js'
import { decrypt, encrypt } from '@peertube/peertube-server/core/helpers/peertube-crypto.js'
describe('Encrypt/Descrypt', function () {

View File

@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
import { isResolvingToUnicastOnly } from '@peertube/peertube-server/server/helpers/dns.js'
import { isResolvingToUnicastOnly } from '@peertube/peertube-server/core/helpers/dns.js'
describe('DNS helpers', function () {

View File

@@ -5,8 +5,8 @@ import { remove } from 'fs-extra/esm'
import { readFile } from 'fs/promises'
import { join } from 'path'
import { buildAbsoluteFixturePath, root } from '@peertube/peertube-node-utils'
import { execPromise } from '@peertube/peertube-server/server/helpers/core-utils.js'
import { processImage } from '@peertube/peertube-server/server/helpers/image-utils.js'
import { execPromise } from '@peertube/peertube-server/core/helpers/core-utils.js'
import { processImage } from '@peertube/peertube-server/core/helpers/image-utils.js'
async function checkBuffers (path1: string, path2: string, equals: boolean) {
const [ buf1, buf2 ] = await Promise.all([

View File

@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { mdToOneLinePlainText } from '@peertube/peertube-server/server/helpers/markdown.js'
import { mdToOneLinePlainText } from '@peertube/peertube-server/core/helpers/markdown.js'
import { expect } from 'chai'
describe('Markdown helpers', function () {

View File

@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
import { extractMentions } from '@peertube/peertube-server/server/helpers/mentions.js'
import { extractMentions } from '@peertube/peertube-server/core/helpers/mentions.js'
describe('Comment model', function () {
it('Should correctly extract mentions', async function () {

View File

@@ -5,7 +5,7 @@ import { pathExists, remove } from 'fs-extra/esm'
import { join } from 'path'
import { wait } from '@peertube/peertube-core-utils'
import { root } from '@peertube/peertube-node-utils'
import { doRequest, doRequestAndSaveToFile } from '@peertube/peertube-server/server/helpers/requests.js'
import { doRequest, doRequestAndSaveToFile } from '@peertube/peertube-server/core/helpers/requests.js'
import { Mock429 } from '@tests/shared/mock-servers/mock-429.js'
import { FIXTURE_URLS } from '@tests/shared/tests.js'

View File

@@ -4,7 +4,7 @@ import { expect } from 'chai'
import {
isPluginStableOrUnstableVersionValid,
isPluginStableVersionValid
} from '@peertube/peertube-server/server/helpers/custom-validators/plugins.js'
} from '@peertube/peertube-server/core/helpers/custom-validators/plugins.js'
describe('Validators', function () {

View File

@@ -7,8 +7,8 @@ import {
VIDEO_LICENCES,
VIDEO_PLAYLIST_PRIVACIES,
VIDEO_PRIVACIES
} from '@peertube/peertube-server/server/initializers/constants.js'
import { VideoConstantManagerFactory } from '@peertube/peertube-server/server/lib/plugins/video-constant-manager-factory.js'
} from '@peertube/peertube-server/core/initializers/constants.js'
import { VideoConstantManagerFactory } from '@peertube/peertube-server/core/lib/plugins/video-constant-manager-factory.js'
describe('VideoConstantManagerFactory', function () {
const factory = new VideoConstantManagerFactory('peertube-plugin-constants')

View File

@@ -1,4 +1,4 @@
import { doRequest } from '@peertube/peertube-server/server/helpers/requests.js'
import { doRequest } from '@peertube/peertube-server/core/helpers/requests.js'
export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) {
const options = {

View File

@@ -12,7 +12,7 @@ import {
VIDEO_LANGUAGES,
VIDEO_LICENCES,
VIDEO_PRIVACIES
} from '@peertube/peertube-server/server/initializers/constants.js'
} from '@peertube/peertube-server/core/initializers/constants.js'
import { getLowercaseExtension } from '@peertube/peertube-node-utils'
import { makeRawRequest, PeerTubeServer, VideoEdit, waitJobs } from '@peertube/peertube-server-commands'
import { dateIsValid, expectStartWith, testImageGeneratedByFFmpeg } from './checks.js'

View File

@@ -7,7 +7,7 @@
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"paths": {
"@tests/*": [ "src/*" ],
"@server/*": [ "../../server/server/*" ]
"@server/*": [ "../../server/core/*" ]
}
},
"references": [

View File

@@ -7,7 +7,7 @@
],
"baseUrl": "./dist",
"paths": {
"@server/*": [ "server/server/*" ],
"@server/*": [ "server/core/*" ],
"@client/*": [ "client/*" ],
"@peertube/peertube-models": [ "peertube-models" ],
"@peertube/peertube-typescript-utils": [ "peertube-typescript-utils" ]

View File

@@ -10,7 +10,7 @@
"rootDir": "./src",
"tsBuildInfoFile": "./dist/tsconfig.server.types.tsbuildinfo",
"paths": {
"@server/*": [ "../../server/server/*" ]
"@server/*": [ "../../server/core/*" ]
}
},
"references": [