Merge branch 'master' into ts-attempt-over-9000

pull/62/head
tycrek 4 years ago
commit 590a5f1fe8
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -167,7 +167,7 @@ Easy! Just pull the changes & run this one-liner:
git pull
# Rebuild the container with the new changes (uncomment the 2nd part if the update requires refreshing the config)
docker-compose up --force-recreate --build -d && docker image prune -f # docker-compose exec ass npm run setup && docker-compose restart
docker-compose up --force-recreate --build -d && docker image prune -f # && docker-compose exec ass npm run setup && docker-compose restart
```
- `--force-recreate` will force the container to rebuild

@ -0,0 +1,3 @@
# Need extra support?
Join the **[Official Support Discord](https://discord.gg/wGZYt5fasY)!**

@ -0,0 +1,5 @@
from_owner:
- tycrek
required_labels:
- tycrek
apply_labels: []

@ -1 +0,0 @@
@tycrek:registry=https://npm.pkg.github.com

@ -2,7 +2,7 @@
IMAGEPATH="$HOME/Pictures/" # Where to store screenshots before they're deleted
IMAGENAME="ass" # Not really important, tells Flameshot what file to send and delete
KEY="" # Your ass upload token
DOMAIN="" # Your upload domain
DOMAIN="" # Your upload domain (without http:// or https://)
flameshot config -f "$IMAGENAME" # Make sure that Flameshot names the file correctly
flameshot gui -r -p "$IMAGEPATH" # Prompt the screenshot GUI
@ -14,6 +14,7 @@ URL=$(curl -X POST \
-H "User-Agent: ShareX/13.4.0" \
-H "Authorization: $KEY" \
-F "file=@$IMAGEPATH$IMAGENAME.png" "https://$DOMAIN/" | grep -Po '(?<="resource":")[^"]+')
echo "$URL" | xclip -sel clip
# printf instead of echo as echo appends a newline
printf "%s" "$URL" | xclip -sel clip
rm "$IMAGEPATH$IMAGENAME.png" # Delete the image locally

40
package-lock.json generated

@ -10,9 +10,9 @@
"license": "ISC",
"dependencies": {
"@tsconfig/node14": "^1.0.1",
"@tycrek/express-nofavicon": "^1.0.2",
"@tycrek/express-nofavicon": "^1.0.3",
"@tycrek/isprod": "^2.0.2",
"@tycrek/log": ">=0.5.x",
"@tycrek/log": "^0.5.9",
"@tycrek/papito": "^0.3.4",
"any-shell-escape": "^0.1.1",
"aws-sdk": "^2.930.0",
@ -669,9 +669,9 @@
}
},
"node_modules/@tycrek/log": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@tycrek/log/-/log-0.5.6.tgz",
"integrity": "sha512-DQTIHK+mUYnE+xXc4LKpbncUFGvcRQSeTdSPI5tOA8ewltM1JH75KK/PYX3ciA8neVIUle/1+pGTCyvZ+O0QQA==",
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/@tycrek/log/-/log-0.5.9.tgz",
"integrity": "sha512-D4UFyt03JJH/ECnaVc8e3aP70gGSE6rw/p8FZAH8J/rRml6ZHtRnlXbPCCAJK5n80KwGHD7UKqH9lQBcoEknvw==",
"dependencies": {
"chalk": "^4.1.1",
"deepmerge": "^4.2.2",
@ -1145,9 +1145,9 @@
}
},
"node_modules/aws-sdk": {
"version": "2.998.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.998.0.tgz",
"integrity": "sha512-jenbMcGxOg9AeH6p1m0vbsJYNaeJXBnOM58GXsaKecPgRnCm/IykTPlB6aQKfNDk0WQnw5BHDcy7iQPnEjEkUQ==",
"version": "2.999.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.999.0.tgz",
"integrity": "sha512-OcnD7m+HCZv2qDzmS7TgABGf26mVPfIyah0Dgz7hHAxBtx78qFWi/s9U6BDxVBKWLg7OKWVHf0opiMG4ujteqg==",
"hasInstallScript": true,
"dependencies": {
"buffer": "4.9.2",
@ -1995,9 +1995,9 @@
}
},
"node_modules/express-rate-limit": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.3.0.tgz",
"integrity": "sha512-qJhfEgCnmteSeZAeuOKQ2WEIFTX5ajrzE0xS6gCOBCoRQcU+xEzQmgYQQTpzCcqUAAzTEtu4YEih4pnLfvNtew=="
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.4.0.tgz",
"integrity": "sha512-sT+rk1wvj06+0MpEiij7y3kGdB4hoMyQ+a5zcESUpDMLhbLXoYIQI6JfsvLBz1wOhmfF//ALG/Q59FKMI0x2Eg=="
},
"node_modules/eyes": {
"version": "0.1.8",
@ -5080,9 +5080,9 @@
"integrity": "sha512-JKTrwCgdmnUhBOl8OLYAK+B79ZOPJGpQ2yEdsbcGup+TrCjA5vO1bEcpAjlNgHrgYlUwkw0lMxY6SCuPlwZXLw=="
},
"@tycrek/log": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@tycrek/log/-/log-0.5.6.tgz",
"integrity": "sha512-DQTIHK+mUYnE+xXc4LKpbncUFGvcRQSeTdSPI5tOA8ewltM1JH75KK/PYX3ciA8neVIUle/1+pGTCyvZ+O0QQA==",
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/@tycrek/log/-/log-0.5.9.tgz",
"integrity": "sha512-D4UFyt03JJH/ECnaVc8e3aP70gGSE6rw/p8FZAH8J/rRml6ZHtRnlXbPCCAJK5n80KwGHD7UKqH9lQBcoEknvw==",
"requires": {
"chalk": "^4.1.1",
"deepmerge": "^4.2.2",
@ -5493,9 +5493,9 @@
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
},
"aws-sdk": {
"version": "2.998.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.998.0.tgz",
"integrity": "sha512-jenbMcGxOg9AeH6p1m0vbsJYNaeJXBnOM58GXsaKecPgRnCm/IykTPlB6aQKfNDk0WQnw5BHDcy7iQPnEjEkUQ==",
"version": "2.999.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.999.0.tgz",
"integrity": "sha512-OcnD7m+HCZv2qDzmS7TgABGf26mVPfIyah0Dgz7hHAxBtx78qFWi/s9U6BDxVBKWLg7OKWVHf0opiMG4ujteqg==",
"requires": {
"buffer": "4.9.2",
"events": "1.1.1",
@ -6159,9 +6159,9 @@
}
},
"express-rate-limit": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.3.0.tgz",
"integrity": "sha512-qJhfEgCnmteSeZAeuOKQ2WEIFTX5ajrzE0xS6gCOBCoRQcU+xEzQmgYQQTpzCcqUAAzTEtu4YEih4pnLfvNtew=="
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.4.0.tgz",
"integrity": "sha512-sT+rk1wvj06+0MpEiij7y3kGdB4hoMyQ+a5zcESUpDMLhbLXoYIQI6JfsvLBz1wOhmfF//ALG/Q59FKMI0x2Eg=="
},
"eyes": {
"version": "0.1.8",

@ -37,9 +37,9 @@
},
"dependencies": {
"@tsconfig/node14": "^1.0.1",
"@tycrek/express-nofavicon": "^1.0.2",
"@tycrek/express-nofavicon": "^1.0.3",
"@tycrek/isprod": "^2.0.2",
"@tycrek/log": ">=0.5.x",
"@tycrek/log": "^0.5.9",
"@tycrek/papito": "^0.3.4",
"any-shell-escape": "^0.1.1",
"aws-sdk": "^2.930.0",

@ -10,5 +10,7 @@
"Body": "MultipartFormData",
"FileFormName": "file",
"URL": "$json:.resource$",
"DeletionURL": "$json:.delete$"
"ThumbnailURL": "$json:.thumbnail$",
"DeletionURL": "$json:.delete$",
"ErrorMessage": "$response$"
}

@ -69,7 +69,7 @@ useSsl && app.use(helmet.hsts({ preload: true })); // skipcq: JS-0093
app.use(nofavicon);
// Use custom index, otherwise render README.md
const ASS_INDEX = indexFile !== '' && fs.existsSync(`../${indexFile}`) && require(`../${indexFile}`);
const ASS_INDEX = indexFile !== '' && fs.existsSync(`../${indexFile}`) && (typeof require(`../${indexFile}`) === typeof Function);
app.get('/', (req, res, next) => ASS_INDEX // skipcq: JS-0229
? ASS_INDEX(req, res, next)
: fs.readFile(path('README.md'))

Loading…
Cancel
Save