1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

Do stuff for npm workspace

This commit is contained in:
Thesourtimes 2022-04-26 21:34:15 +03:00 committed by Erkin Alp Güney
parent c9c660f7a7
commit 540e643b86
16 changed files with 26 additions and 165 deletions

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -1,3 +0,0 @@
files:
- source: /locales/en/*.json
translation: /locales/%two_letters_code%/%original_file_name%

View File

@ -30,7 +30,7 @@
"discord-open-source"
],
"author": "Fosscord",
"license": "GPLV3",
"license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},

View File

@ -1,18 +0,0 @@
# CONTRIBUTE
### Setup:
```
npm i
npm start
```
### Run tests:
```
npm test
```
#### common errors:
- db not connecting --> start mongod in a seperate terminal window

View File

@ -14,8 +14,8 @@
"url": "git+https://github.com/fosscord/fosscord-server.git"
},
"keywords": [],
"author": "",
"license": "GPLV3",
"author": "Fosscord",
"license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -14,8 +14,8 @@
"url": "git+https://github.com/fosscord/fosscord-server.git"
},
"keywords": [],
"author": "",
"license": "GPLV3",
"author": "Fosscord",
"license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -1,51 +0,0 @@
require("missing-native-js-functions");
const WebSocket = require("ws");
const Constants = require("./dist/util/Constants");
// const ws = new WebSocket("ws://127.0.0.1:8080");
const ws = new WebSocket("wss://dev.fosscord.com");
ws.on("open", () => {
// ws.send(JSON.stringify({ req_type: "new_auth" }));
// ws.send(JSON.stringify({ req_type: "check_auth", token: "" }));
// op: 0,
// d: {},
// s: 42,
// t: "GATEWAY_EVENT_NAME",
});
function send(data) {
ws.send(JSON.stringify(data));
}
ws.on("message", (buffer) => {
let data = JSON.parse(buffer.toString());
console.log(data);
switch (data.op) {
case 10:
setIntervalNow(() => {
send({ op: 1 });
}, data.d.heartbeat_interval);
// send({
// op: 2,
// d: {
// token:
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjgxMTY0MjkxNzQzMjA2NjA0OCIsImlhdCI6MTYxMzU4MTE1MX0.7Qj_z2lYIgJ0rc7NfGtpW5DKGqecQfv1mLpoBUQHKDc",
// intents: 0n,
// properties: {},
// },
// });
send({
op: 6,
});
break;
}
});
ws.on("close", (code, reason) => {
console.log(code, reason, Constants.CLOSECODES[code]);
});

View File

@ -13,7 +13,7 @@
},
"keywords": [],
"author": "Fosscord",
"license": "GPLV3",
"license": "AGPLV3",
"devDependencies": {
"@types/amqplib": "^0.8.1",
"@types/jsonwebtoken": "^8.5.0",

17
package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "fosscord-server",
"version": "1.0.0",
"description": "A Fosscord server written in Node.js",
"workspaces": ["api", "bundle", "cdn", "gateway", "webrtc"],
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/fosscord/fosscord-server.git"
},
"author": "Fosscord",
"license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},
"homepage": "https://fosscord.com"
}

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -23,7 +23,7 @@
"discord-open-source"
],
"author": "Fosscord",
"license": "GPLV3",
"license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},

View File

@ -1,14 +0,0 @@
Copyright (C) 2021 Fosscord and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -9,8 +9,8 @@
"start": "npm run build && node dist/start.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"author": "Fosscord",
"license": "AGPLV3",
"devDependencies": {
"@types/node": "^15.6.1",
"@types/ws": "^7.4.4",