mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
server/server -> server/core
This commit is contained in:
parent
114327d4ce
commit
5a3d0650c9
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@ -69,8 +69,8 @@ npx @redocly/cli preview-docs ./support/doc/api/openapi.yaml
|
||||
```
|
||||
|
||||
Some hints:
|
||||
* Routes are defined in [/server/server/controllers/](https://github.com/Chocobozzz/PeerTube/tree/develop/server/server/controllers) directory
|
||||
* Parameters validators are defined in [/server/server/middlewares/validators](https://github.com/Chocobozzz/PeerTube/tree/develop/server/server/middlewares/validators) directory
|
||||
* Routes are defined in [/server/core/controllers/](https://github.com/Chocobozzz/PeerTube/tree/develop/server/core/controllers) directory
|
||||
* Parameters validators are defined in [/server/core/middlewares/validators](https://github.com/Chocobozzz/PeerTube/tree/develop/server/core/middlewares/validators) directory
|
||||
* Models sent/received by the controllers are defined in [/packages/models](https://github.com/Chocobozzz/PeerTube/tree/develop/packages/models) directory
|
||||
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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 () {
|
||||
|
||||
|
@ -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 () {
|
||||
|
||||
|
@ -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 () {
|
||||
|
||||
|
@ -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([
|
||||
|
@ -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 () {
|
||||
|
@ -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 () {
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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 () {
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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 = {
|
||||
|
@ -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'
|
||||
|
@ -7,7 +7,7 @@
|
||||
"tsBuildInfoFile": "./dist/.tsbuildinfo",
|
||||
"paths": {
|
||||
"@tests/*": [ "src/*" ],
|
||||
"@server/*": [ "../../server/server/*" ]
|
||||
"@server/*": [ "../../server/core/*" ]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
|
@ -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" ]
|
||||
|
@ -10,7 +10,7 @@
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.server.types.tsbuildinfo",
|
||||
"paths": {
|
||||
"@server/*": [ "../../server/server/*" ]
|
||||
"@server/*": [ "../../server/core/*" ]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
|
@ -7,6 +7,6 @@ rm -rf ./dist ./packages/*/dist
|
||||
npm run tsc -- -b --verbose server/tsconfig.json
|
||||
npm run resolve-tspaths:server
|
||||
|
||||
cp -r "./server/server/static" "./server/server/assets" ./dist/server
|
||||
cp -r "./server/server/lib/emails" "./dist/server/lib"
|
||||
cp -r "./server/core/static" "./server/core/assets" ./dist/core
|
||||
cp -r "./server/core/lib/emails" "./dist/core/lib"
|
||||
cp "./server/scripts/upgrade.sh" "./dist/scripts"
|
||||
|
@ -14,12 +14,12 @@ mkdir -p "./client/dist"
|
||||
rm -rf "./client/dist/locale"
|
||||
cp -r "./client/src/locale" "./client/dist/locale"
|
||||
|
||||
mkdir -p "./dist/server/lib"
|
||||
mkdir -p "./dist/core/lib"
|
||||
|
||||
npm run tsc -- -b -v --incremental server/tsconfig.json
|
||||
npm run resolve-tspaths:server
|
||||
|
||||
cp -r ./server/server/static ./server/server/assets ./dist/server
|
||||
cp -r "./server/server/lib/emails" "./dist/server/lib"
|
||||
cp -r ./server/core/static ./server/core/assets ./dist/core
|
||||
cp -r "./server/core/lib/emails" "./dist/core/lib"
|
||||
|
||||
./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node dist/server"' server/tsconfig.json
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
VIDEO_PLAYLIST_TYPES,
|
||||
VIDEO_PRIVACIES,
|
||||
VIDEO_STATES
|
||||
} from '@peertube/peertube-server/server/initializers/constants.js'
|
||||
} from '@peertube/peertube-server/core/initializers/constants.js'
|
||||
|
||||
const videojs = readJsonSync(join(root(), 'client', 'src', 'locale', 'videojs.en-US.json'))
|
||||
const playerKeys = {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "../dist/scripts",
|
||||
"paths": {
|
||||
"@server/*": [ "./server/server/*" ]
|
||||
"@server/*": [ "./server/core/*" ]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user