1
0
Fork 0
Bsian 2020-01-20 10:55:14 +00:00
commit 57b22596ca
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
10 changed files with 39 additions and 11 deletions

4
.gitignore vendored
View File

@ -6,4 +6,6 @@ htmlEmail_templates
yarn-error.log yarn-error.log
src/keys.json src/keys.json
dist dist
securesign_genrsa.ts securesign_genrsa.ts
.idea
.vscode

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
# Builds TypeScript & Go
check_certificate_files := $(wildcard src/go/checkCertificate/*.go)
check_certificate_signatures_files := $(wildcard src/go/checkCertSignatures/*.go)
storage_files := $(wildcard src/go/storage/*.go)
all: check_certificate check_cert_signatures storage typescript
check_certificate:
HOME=/root go build -v -ldflags="-s -w" -o dist/bin/checkCertificate ${check_certificate_files}
@chmod 740 dist/bin/checkCertificate
file dist/bin/checkCertificate
check_cert_signatures:
HOME=/root go build -v -ldflags="-s -w" -o dist/bin/checkCertSignatures ${check_certificate_signatures_files}
@chmod 740 dist/bin/checkCertSignatures
file dist/bin/checkCertSignatures
storage:
HOME=/root go build -v -ldflags="-s -w" -o dist/bin/storage ${storage_files}
@chmod 740 dist/bin/storage
file dist/bin/storage
typescript:
tsc -p ./tsconfig.json

View File

@ -1,7 +1,8 @@
# This file builds the Go binaries. Hardcoded by LOC Engineering # This file builds the Go binaries. Hardcoded by LOC Engineering
go build -o dist/bin/storage src/go/storage/storage.go src/go/storage/dirsize.go # DEPRECATED, USE MAKEFILE INSTEAD
go build -ldflags="-s -w" -o dist/bin/storage src/go/storage/storage.go src/go/storage/dirsize.go
file dist/bin/storage file dist/bin/storage
go build -o dist/bin/checkCertificate src/go/checkCertificate/checkCertificate.go go build -ldflags="-s -w" -o dist/bin/checkCertificate src/go/checkCertificate/checkCertificate.go
file dist/bin/checkCertificate file dist/bin/checkCertificate
go build -o dist/bin/checkCertSignatures src/go/checkCertSignatures/checkCertSignatures.go go build -ldflags="-s -w" -o dist/bin/checkCertSignatures src/go/checkCertSignatures/checkCertSignatures.go
file dist/bin/checkCertSignatures file dist/bin/checkCertSignatures

View File

@ -5,7 +5,7 @@
"main": "dist/Client.js", "main": "dist/Client.js",
"scripts": { "scripts": {
"lint": "eslint ./ --ext ts --fix", "lint": "eslint ./ --ext ts --fix",
"build": "tsc -p ./tsconfig.json && sh ./build.sh", "build": "make",
"lint-find": "eslint ./ --ext ts" "lint-find": "eslint ./ --ext ts"
}, },
"author": "Library of Code sp-us Engineering Team", "author": "Library of Code sp-us Engineering Team",

View File

@ -48,7 +48,7 @@ export default class CreateAccount extends Command {
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: args[1], to: args[1],
from: 'Library of Code sp-us | Cloud Services <support@libraryofcode.org>', from: 'Library of Code sp-us | Cloud Services <help@libraryofcode.org>',
subject: 'Your account has been created', subject: 'Your account has been created',
html: ` html: `
<body> <body>

View File

@ -68,7 +68,7 @@ export default class CWG_Create extends Command {
this.client.getDMChannel(account.userID).then((r) => r.createMessage({ embed })); this.client.getDMChannel(account.userID).then((r) => r.createMessage({ embed }));
await this.client.util.transport.sendMail({ await this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,
from: 'Library of Code sp-us | Support Team <support@libraryofcode.org>', from: 'Library of Code sp-us | Support Team <help@libraryofcode.org>',
subject: 'Your domain has been binded', subject: 'Your domain has been binded',
html: ` html: `
<h1>Library of Code sp-us | Cloud Services</h1> <h1>Library of Code sp-us | Cloud Services</h1>

View File

@ -44,7 +44,7 @@ export default class DeleteAccount extends Command {
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,
from: 'Library of Code sp-us | Cloud Services <support@libraryofcode.org>', from: 'Library of Code sp-us | Cloud Services <help@libraryofcode.org>',
subject: 'Your account has been deleted', subject: 'Your account has been deleted',
html: ` html: `
<h1>Library of Code | Cloud Services</h1> <h1>Library of Code | Cloud Services</h1>

View File

@ -35,7 +35,7 @@ export default class Lock extends Command {
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,
from: 'Library of Code sp-us | Cloud Services <support@libraryofcode.org>', from: 'Library of Code sp-us | Cloud Services <help@libraryofcode.org>',
subject: 'Your account has been locked', subject: 'Your account has been locked',
html: ` html: `
<h1>Library of Code | Cloud Services</h1> <h1>Library of Code | Cloud Services</h1>

View File

@ -34,7 +34,7 @@ export default class Notify extends Command {
this.client.createMessage('580950455581147146', { embed }); this.client.createMessage('580950455581147146', { embed });
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,
from: 'Library of Code sp-us | Cloud Services <support@libraryofcode.org>', from: 'Library of Code sp-us | Cloud Services <help@libraryofcode.org>',
subject: 'Notification', subject: 'Notification',
html: ` html: `
<h1>Library of Code sp-us | Cloud Services</h1> <h1>Library of Code sp-us | Cloud Services</h1>

View File

@ -25,7 +25,7 @@ export default class Warn extends Command {
edit.edit(`***${this.client.stores.emojis.success} Account ${account.username} has been warned by Moderator ${message.author.username}#${message.author.discriminator}.***`); edit.edit(`***${this.client.stores.emojis.success} Account ${account.username} has been warned by Moderator ${message.author.username}#${message.author.discriminator}.***`);
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,
from: 'Library of Code sp-us | Cloud Services <support@libraryofcode.org>', from: 'Library of Code sp-us | Cloud Services <help@libraryofcode.org>',
subject: 'Your account has been warned', subject: 'Your account has been warned',
html: ` html: `
<h1>Library of Code sp-us | Cloud Services</h1> <h1>Library of Code sp-us | Cloud Services</h1>