Repo cleanup, remove fs-extras
This commit is contained in:
parent
f132065664
commit
02235067f9
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,8 +2,6 @@
|
||||
db/
|
||||
dist/
|
||||
node_modules
|
||||
api/assets/*.js
|
||||
api/assets/*.css
|
||||
database.db
|
||||
tsconfig.tsbuildinfo
|
||||
files/
|
||||
@ -11,3 +9,5 @@ files/
|
||||
config.json
|
||||
|
||||
.vscode/settings.json
|
||||
api/assets/plugins/*.js
|
||||
package-lock.json
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -1,4 +0,0 @@
|
||||
{
|
||||
"awooga.originalColorCustomizations": {},
|
||||
"workbench.colorCustomizations": {}
|
||||
}
|
||||
69
api/assets/fosscord-login.css
Normal file
69
api/assets/fosscord-login.css
Normal file
@ -0,0 +1,69 @@
|
||||
/* replace tos acceptance popup */
|
||||
#app-mount > div:nth-child(7) > div > div > div.tooltipContent-bqVLWK {
|
||||
visibility: hidden;
|
||||
}
|
||||
#app-mount > div:nth-child(7) > div > div > div.tooltipContent-bqVLWK::after{
|
||||
visibility: visible;
|
||||
display: block;
|
||||
content: "You need to agree to this instance's rules to continue";
|
||||
margin-top: -32px;
|
||||
}
|
||||
/* replace login header */
|
||||
#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.mainLoginContainer-1ddwnR > h3 {
|
||||
visibility: hidden;
|
||||
}
|
||||
h3.title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO::after {
|
||||
margin-top: -32px;
|
||||
content: "Welcome to Fosscord!";
|
||||
visibility: visible;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Logo in top left when bg removed */
|
||||
#app-mount > div.app-1q1i1E > div > a {
|
||||
/* replace me: original dimensions: 130x36 */
|
||||
background: url(https://raw.githubusercontent.com/fosscord/fosscord/9900329e5ef2c17bdeb6893e04c0511f72027f97/assets/logo/temp.svg);
|
||||
background-size: contain;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* replace TOS text */
|
||||
|
||||
#app-mount
|
||||
> div.app-1q1i1E
|
||||
> div
|
||||
> div
|
||||
> div
|
||||
> form
|
||||
> div
|
||||
> div
|
||||
> div.flex-1xMQg5.flex-1O1GKY.horizontal-1ae9ci.horizontal-2EEEnY.flex-1O1GKY.directionRow-3v3tfG.justifyStart-2NDFzi.alignCenter-1dQNNs.noWrap-3jynv6.marginTop20-3TxNs6
|
||||
> label
|
||||
> div.label-cywgfr.labelClickable-11AuB8.labelForward-1wfipV
|
||||
> * {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#app-mount
|
||||
> div.app-1q1i1E
|
||||
> div
|
||||
> div
|
||||
> div
|
||||
> form
|
||||
> div
|
||||
> div
|
||||
> div.flex-1xMQg5.flex-1O1GKY.horizontal-1ae9ci.horizontal-2EEEnY.flex-1O1GKY.directionRow-3v3tfG.justifyStart-2NDFzi.alignCenter-1dQNNs.noWrap-3jynv6.marginTop20-3TxNs6
|
||||
> label
|
||||
> div.label-cywgfr.labelClickable-11AuB8.labelForward-1wfipV::after {
|
||||
visibility: visible;
|
||||
content: "I have read and agree with the rules set by this instance.";
|
||||
display: block;
|
||||
margin-top: -16px;
|
||||
}
|
||||
|
||||
/* shrink login box to same size as register */
|
||||
.authBoxExpanded-2jqaBe {
|
||||
width: 480px !important;
|
||||
}
|
||||
42
api/assets/fosscord.css
Normal file
42
api/assets/fosscord.css
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
/* loading spinner */
|
||||
#app-mount > div.app-1q1i1E > div.container-16j22k.fixClipping-3qAKRb > div.content-1-zrf2 > video {
|
||||
filter: opacity(1);
|
||||
background: url("http://www.clipartbest.com/cliparts/7ca/6Rr/7ca6RrLAi.gif");
|
||||
background-size: contain;
|
||||
/* width: 64px;
|
||||
height: 64px; */
|
||||
padding-bottom: 64px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* home button icon */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div
|
||||
{
|
||||
background-image: url(https://raw.githubusercontent.com/fosscord/fosscord/9900329e5ef2c17bdeb6893e04c0511f72027f97/assets/logo/temp.svg);
|
||||
background-size: contain;
|
||||
border-radius: 50%;
|
||||
}
|
||||
/* Login QR */
|
||||
#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.transitionGroup-aR7y1d.qrLogin-1AOZMt,
|
||||
#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.verticalSeparator-3huAjp,
|
||||
/* Remove login bg */
|
||||
#app-mount > div.app-1q1i1E > div > svg,
|
||||
/* Download bar */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.notice-3bPHh-.colorDefault-22HBa0,
|
||||
/* Connection problem links */
|
||||
#app-mount > div.app-1q1i1E > div.container-16j22k.fixClipping-3qAKRb > div.problems-3mgf6w.slideIn-sCvzGz > div:nth-child(2),
|
||||
/* Downloads button */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div:nth-child(7) > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div,
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div:nth-child(6) > div,
|
||||
/* help button */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.content-98HsJk > div.chat-3bRxxu > section > div.toolbar-1t6TWx > a,
|
||||
/* download button start of guild */
|
||||
#chat-messages-899316648933185083 > div > div > div:nth-child(5),
|
||||
/* Thread permissions etc popups */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.content-98HsJk > div.sidebar-2K8pFh.hasNotice-1XRy4h > nav > div.container-3O_wAf,
|
||||
/* home button icon */
|
||||
#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div > svg
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
BIN
api/package-lock.json
generated
BIN
api/package-lock.json
generated
Binary file not shown.
BIN
api/scripts/stresstest/package-lock.json
generated
BIN
api/scripts/stresstest/package-lock.json
generated
Binary file not shown.
BIN
bundle/package-lock.json
generated
BIN
bundle/package-lock.json
generated
Binary file not shown.
@ -100,4 +100,4 @@
|
||||
"typescript-json-schema": "^0.50.1",
|
||||
"ws": "^7.4.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
const { execSync } = require("child_process");
|
||||
const path = require("path");
|
||||
const fse = require("fs-extra");
|
||||
const fs = require("fs");
|
||||
const { getSystemErrorMap } = require("util");
|
||||
const { argv } = require("process");
|
||||
|
||||
@ -8,21 +9,41 @@ const dirs = ["api", "util", "cdn", "gateway", "bundle"];
|
||||
|
||||
const verbose = argv.includes("verbose") || argv.includes("v");
|
||||
|
||||
var copyRecursiveSync = function(src, dest) {
|
||||
if(verbose) console.log(`cpsync: ${src} -> ${dest}`);
|
||||
var exists = fs.existsSync(src);
|
||||
if(!exists){
|
||||
console.log(src + " doesn't exist, not copying!");
|
||||
return;
|
||||
}
|
||||
var stats = exists && fs.statSync(src);
|
||||
var isDirectory = exists && stats.isDirectory();
|
||||
if (isDirectory) {
|
||||
fs.mkdirSync(dest, {recursive: true});
|
||||
fs.readdirSync(src).forEach(function(childItemName) {
|
||||
copyRecursiveSync(path.join(src, childItemName),
|
||||
path.join(dest, childItemName));
|
||||
});
|
||||
} else {
|
||||
fs.copyFileSync(src, dest);
|
||||
}
|
||||
};
|
||||
|
||||
if (argv.includes("clean")) {
|
||||
dirs.forEach((a) => {
|
||||
var d = "../" + a + "/dist";
|
||||
if (fse.existsSync(d)) {
|
||||
fse.rmSync(d, { recursive: true });
|
||||
if (fs.existsSync(d)) {
|
||||
fs.rmSync(d, { recursive: true });
|
||||
if (verbose) console.log(`Deleted ${d}!`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fse.copySync(path.join(__dirname, "..", "..", "api", "assets"), path.join(__dirname, "..", "dist", "api", "assets"));
|
||||
fse.copySync(path.join(__dirname, "..", "..", "api", "client_test"), path.join(__dirname, "..", "dist", "api", "client_test"));
|
||||
fse.copySync(path.join(__dirname, "..", "..", "api", "locales"), path.join(__dirname, "..", "dist", "api", "locales"));
|
||||
copyRecursiveSync(path.join(__dirname, "..", "..", "api", "assets"), path.join(__dirname, "..", "dist", "api", "assets"));
|
||||
copyRecursiveSync(path.join(__dirname, "..", "..", "api", "client_test"), path.join(__dirname, "..", "dist", "api", "client_test"));
|
||||
copyRecursiveSync(path.join(__dirname, "..", "..", "api", "locales"), path.join(__dirname, "..", "dist", "api", "locales"));
|
||||
dirs.forEach((a) => {
|
||||
fse.copySync("../" + a + "/src", "dist/" + a + "/src");
|
||||
copyRecursiveSync("../" + a + "/src", "dist/" + a + "/src");
|
||||
if (verbose) console.log(`Copied ${"../" + a + "/dist"} -> ${"dist/" + a + "/src"}!`);
|
||||
});
|
||||
|
||||
@ -46,3 +67,4 @@ if (!argv.includes("copyonly")) {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ if (cluster.isMaster) {
|
||||
╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝
|
||||
|
||||
fosscord-server | ${yellow(
|
||||
`Pre-relase (${
|
||||
`Pre-release (${
|
||||
commit !== null
|
||||
? commit.slice(0, 7)
|
||||
: "Unknown (Git cannot be found)"
|
||||
|
||||
BIN
cdn/package-lock.json
generated
BIN
cdn/package-lock.json
generated
Binary file not shown.
BIN
dashboard/package-lock.json
generated
BIN
dashboard/package-lock.json
generated
Binary file not shown.
BIN
gateway/package-lock.json
generated
BIN
gateway/package-lock.json
generated
Binary file not shown.
BIN
util/package-lock.json
generated
BIN
util/package-lock.json
generated
Binary file not shown.
BIN
webrtc/package-lock.json
generated
BIN
webrtc/package-lock.json
generated
Binary file not shown.
Reference in New Issue
Block a user