Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Dougley committed Jul 3, 2021
1 parent 26bd9b0 commit a27a34f
Show file tree
Hide file tree
Showing 98 changed files with 4,555 additions and 9,820 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.env
wildbeast.sqlite
node_modules/*
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/**
node_modules/
dist/
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
extends: [
'standard-with-typescript'
],
parserOptions: {
project: './tsconfig.json'
},
rules: {
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false
}
],
'@typescript-eslint/no-non-null-assertion': 'off'
}
}
7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* text=auto
*.js text eol=crlf
*.ts text eol=lf
2 changes: 0 additions & 2 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
with:
upload_sources: true
download_translations: false
# for now we don't want to download and sync translations
# we might want to do this in the future
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sentry

on:
push:
branches: [ master ]

jobs:
create-sentry-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 16
- run: npm i && npx tsc
- name: Create Sentry release
uses: getsentry/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
sourcemaps: ./dist
68 changes: 56 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
Expand All @@ -16,11 +20,12 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand All @@ -36,15 +41,24 @@ build/Release
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

Expand All @@ -56,18 +70,48 @@ typings/

# dotenv environment variables file
.env
.env.test

# next.js build output
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# idea files
.idea
# TernJS port file
.tern-port

# sqlite database
wildbeast.sqlite
wildbeast.sqlite-journal
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

.vscode
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# knex config
knexfile.js
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program - TSC Compiled",
"program": "${workspaceFolder}/dist/index.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"runtimeArgs": [
"-r",
"dotenv/config"
],
"preLaunchTask": "tsc: build - tsconfig.json",
"type": "pwa-node"
},
{
"name": "Launch Program - ts-node with Debugger",
"type": "pwa-node",
"request": "launch",
"runtimeArgs": [
"-r",
"ts-node/register",
"-r",
"dotenv/config"
],
"args": [
"${workspaceFolder}/src/index.ts"
]
}
]
}
6 changes: 3 additions & 3 deletions COPYRIGHT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ WildBeast - a Discord bot made for maximum personalisation and ease of use.
Copyright (C) 2015-present Remco Jongschaap

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
it under the terms of the Mozilla Public License as
published by the Mozilla Foundation, either version 2 of the
License, or (at your option) any later version, with regard to any addendums specific to this program.

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.
Mozilla Public License for more details.

For full license conditions, including applicable addendums specific to this program, see the LICENSE.md file, which you should have received along with this notice. If not, see https://github.com/TheSharks/WildBeast/blob/master/LICENSE.md.
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM node:current
FROM node:lts-alpine

ARG buildno
ARG commitsha
WORKDIR /usr/wildbeast

LABEL maintainer="Remco Jongschaap <[email protected]>" \
repository="https://github.com/TheSharks/WildBeast"
COPY tsconfig.json ./
COPY package*.json ./

RUN mkdir /opt/wildbeast
# Copy files and install modules
COPY . /opt/wildbeast
WORKDIR /opt/wildbeast
RUN npm ci --production
# Install optional native modules
# TODO: swap out UWS whenever a better module is available
RUN npm i zlib-sync [email protected] https://github.com/discordapp/erlpack.git bufferutil pg
CMD ["node", "index.js"]
COPY src ./src

RUN npm install
RUN npm run compile
RUN npm prune --production

CMD ["npm", "start"]
Loading

0 comments on commit a27a34f

Please sign in to comment.