This commit is contained in:
Flam3rboy 2021-08-13 20:54:59 +02:00
commit f70a24ab6a
15 changed files with 28 additions and 29 deletions

BIN
api/package-lock.json generated

Binary file not shown.

View File

@ -5,8 +5,6 @@
"main": "dist/Server.js", "main": "dist/Server.js",
"types": "dist/Server.d.ts", "types": "dist/Server.d.ts",
"scripts": { "scripts": {
"link": "npm run build && npm link",
"postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"start": "npm run build && node dist/start", "start": "npm run build && node dist/start",
@ -66,16 +64,16 @@
"require_optional": "^1.0.1" "require_optional": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
"0x": "^4.10.2",
"@types/amqplib": "^0.8.1", "@types/amqplib": "^0.8.1",
"@types/bcrypt": "^5.0.0", "@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/i18next-node-fs-backend": "^2.1.0", "@types/i18next-node-fs-backend": "^2.1.0",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/multer": "^1.4.5", "@types/multer": "^1.4.5",
"@types/node": "^14.14.22", "@types/node": "^14.17.9",
"@types/node-fetch": "^2.5.7", "@types/node-fetch": "^2.5.7",
"@zerollup/ts-transform-paths": "^1.7.18", "@zerollup/ts-transform-paths": "^1.7.18",
"0x": "^4.10.2",
"caxa": "^2.1.0", "caxa": "^2.1.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"saslprep": "^1.0.3", "saslprep": "^1.0.3",

BIN
bundle/package-lock.json generated

Binary file not shown.

View File

@ -4,9 +4,12 @@
"description": "", "description": "",
"main": "src/start.js", "main": "src/start.js",
"scripts": { "scripts": {
"linkInstall": "npm run --prefix ../util/ link && npm run --prefix ../api/ link && npm run --prefix ../cdn/ link && npm run --prefix ../gateway/ link", "postinstall": "cd ../api/ && npm i && cd ../cdn/ && npm i && cd ../gateway/ && npm i && ",
"postinstall": "npm run linkInstall && npm link @fosscord/util && npm link @fosscord/api && npm link @fosscord/gateway && npm link @fosscord/cdn", "build": "npm run build:api && npm run build:cdn && npm run build:gateway && npm run build:bundle",
"build": "tsc -b .", "build:bundle": "tsc -b .",
"build:api": "cd ../api/ && npm run build",
"build:cdn": "cd ../cdn/ && npm run build",
"build:gateway": "cd ../gateway/ && npm run build",
"start": "npm run build && node dist/start.js", "start": "npm run build && node dist/start.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
@ -21,14 +24,12 @@
"url": "https://github.com/fosscord/fosscord-server/issues" "url": "https://github.com/fosscord/fosscord-server/issues"
}, },
"homepage": "https://fosscord.com", "homepage": "https://fosscord.com",
"devDependencies": { "dependencies": {
"@types/async-exit-hook": "^2.0.0", "@types/async-exit-hook": "^2.0.0",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/node": "^16.6.1",
"@types/node-os-utils": "^1.2.0", "@types/node-os-utils": "^1.2.0",
"typescript": "^4.3.5" "typescript": "^4.3.5",
}, "@types/node": "^16.6.1",
"dependencies": {
"@fosscord/api": "file:../api", "@fosscord/api": "file:../api",
"@fosscord/cdn": "file:../cdn", "@fosscord/cdn": "file:../cdn",
"@fosscord/gateway": "file:../gateway", "@fosscord/gateway": "file:../gateway",

View File

@ -21,12 +21,14 @@ const cdn = new CDNServer({ server, port, production, app });
const gateway = new GatewayServer({ server, port, production }); const gateway = new GatewayServer({ server, port, production });
async function main() { async function main() {
await Config.set({
cdn: { endpointClientKeepDefault: true, endpoint: `http://localhost:${port}` },
gateway: { endpointClientKeepDefault: true, endpoint: `ws://localhost:${port}` },
});
await api.start(); await api.start();
await cdn.start(); await cdn.start();
await gateway.start(); await gateway.start();
if (!Config.get().gateway.endpoint) await Config.set({ gateway: { endpoint: `ws://localhost:${port}` } });
if (!Config.get().cdn.endpoint) await Config.set({ cdn: { endpoint: `http://localhost:${port}` } });
} }
main().catch(console.error); main().catch(console.error);

BIN
cdn/package-lock.json generated Normal file

Binary file not shown.

View File

@ -5,8 +5,6 @@
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"link": "npm run build && npm link",
"postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc -b .", "build": "tsc -b .",
"start": "npm run build && node dist/start.js" "start": "npm run build && node dist/start.js"

BIN
gateway/package-lock.json generated Normal file

Binary file not shown.

View File

@ -4,8 +4,6 @@
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"link": "npm run build && npm link",
"postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run build && node dist/start.js", "start": "npm run build && node dist/start.js",
"build": "tsc -b .", "build": "tsc -b .",

View File

@ -1 +0,0 @@
// TODO: start api AND cdn AND gateway

BIN
util/package-lock.json generated Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"link": "npm run build && npm link", "postinstall": "npm run build",
"build": "tsc -b ." "build": "tsc -b ."
}, },
"repository": { "repository": {
@ -25,11 +25,14 @@
"url": "https://github.com/fosscord/fosscord-server-util/issues" "url": "https://github.com/fosscord/fosscord-server-util/issues"
}, },
"homepage": "https://docs.fosscord.com/", "homepage": "https://docs.fosscord.com/",
"dependencies": { "devDependencies": {
"@types/amqplib": "^0.8.1",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/node": "^14.14.25", "@types/node": "^14.17.9",
"typescript": "^4.1.3",
"ajv": "^8.5.0", "ajv": "^8.5.0",
"amqplib": "^0.8.0", "amqplib": "^0.8.0",
"dot-prop": "^6.0.1", "dot-prop": "^6.0.1",
@ -38,10 +41,6 @@
"missing-native-js-functions": "^1.2.2", "missing-native-js-functions": "^1.2.2",
"mongodb": "^3.6.9", "mongodb": "^3.6.9",
"mongoose": "^5.13.7", "mongoose": "^5.13.7",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3"
"typescript": "^4.1.3"
},
"devDependencies": {
"@types/amqplib": "^0.8.1"
} }
} }

View File

@ -43,9 +43,11 @@ export interface KafkaBroker {
export interface DefaultOptions { export interface DefaultOptions {
gateway: { gateway: {
endpointClientKeepDefault?: boolean;
endpoint: string | null; endpoint: string | null;
}; };
cdn: { cdn: {
endpointClientKeepDefault?: boolean;
endpoint: string | null; endpoint: string | null;
}; };
general: { general: {
@ -148,9 +150,11 @@ export interface DefaultOptions {
export const DefaultOptions: DefaultOptions = { export const DefaultOptions: DefaultOptions = {
gateway: { gateway: {
endpointClientKeepDefault: false,
endpoint: null, endpoint: null,
}, },
cdn: { cdn: {
endpointClientKeepDefault: false,
endpoint: null, endpoint: null,
}, },
general: { general: {

View File

@ -1,3 +1,4 @@
export default function toBigInt(string: string): bigint { export default function toBigInt(string: string): bigint {
return BigInt(string); return BigInt(string);
} }

View File

@ -4,7 +4,6 @@
"description": "A javascript fosscord webrtc server for voice and video communication", "description": "A javascript fosscord webrtc server for voice and video communication",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"postinstall": "npm link @fosscord/util",
"test": "npm run build && node dist/test.js", "test": "npm run build && node dist/test.js",
"build": "tsc -b .", "build": "tsc -b .",
"start": "npm run build && node dist/start.js" "start": "npm run build && node dist/start.js"