summary refs log tree commit diff
diff options
context:
space:
mode:
authordevelopomp <developomp@gmail.com>2021-10-20 08:45:42 +0900
committerdevelopomp <developomp@gmail.com>2021-10-20 08:45:42 +0900
commit782d52793efb65c8b73d079a062652da76a5ff5a (patch)
tree626432e82f81530ebdfbb36536d89e53935eeb40
parentMerge pull request #485 from fosscord/translation (diff)
downloadserver-782d52793efb65c8b73d079a062652da76a5ff5a.tar.xz
prettier formatted and simplified README links
-rw-r--r--.dockerignore2
-rw-r--r--.github/FUNDING.yml2
-rw-r--r--.github/workflows/docker-publish-api.yml78
-rw-r--r--.github/workflows/docker-publish-cdn.yml78
-rw-r--r--.github/workflows/docker-publish-gateway.yml78
-rw-r--r--.github/workflows/release.yml182
-rw-r--r--.gitignore2
-rw-r--r--.prettierrc4
-rw-r--r--README.md16
-rw-r--r--crowdin.yml4
-rw-r--r--docker-compose.yml2
-rw-r--r--fosscord-server.code-workspace2
12 files changed, 218 insertions, 232 deletions
diff --git a/.dockerignore b/.dockerignore
index 61b7ef66..7ee311a4 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,2 +1,2 @@
 node_modules/
-db/
\ No newline at end of file
+db/
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index f76b9015..43f3b63b 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1 @@
-open_collective: fosscord
\ No newline at end of file
+open_collective: fosscord
diff --git a/.github/workflows/docker-publish-api.yml b/.github/workflows/docker-publish-api.yml
index 405faae4..cc35562a 100644
--- a/.github/workflows/docker-publish-api.yml
+++ b/.github/workflows/docker-publish-api.yml
@@ -1,47 +1,41 @@
 name: docker-publish-api
 
 on:
-  push:
-    paths:
-      - 'api/**'
+    push:
+        paths:
+            - "api/**"
 
 jobs:
-  docker-api:
-    runs-on: ubuntu-latest
-    steps:
-      -
-        name: Checkout
-        uses: actions/checkout@v2
-      -
-        name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
-      -
-        name: Cache Docker layers
-        uses: actions/cache@v2
-        with:
-          path: /tmp/.buildx-cache/api
-          key: ${{ runner.os }}-buildx-api-${{ github.sha }}
-          restore-keys: |
-            ${{ runner.os }}-buildx-api-
-      -
-        name: Login to DockerHub
-        uses: docker/login-action@v1
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      -
-        name: Build and push
-        uses: docker/build-push-action@v2
-        with:
-          context: ./api
-          push: true
-          tags: ${{ secrets.DOCKERHUB_TAGS_API }}
-          cache-from: type=local,src=/tmp/.buildx-cache/api
-          cache-to: type=local,dest=/tmp/.buildx-cache-new/api
-      -
-        # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
-        # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
-        name: Move cache fix
-        run: |
-          rm -rf /tmp/.buildx-cache/api
-          mv /tmp/.buildx-cache-new/api /tmp/.buildx-cache/api
\ No newline at end of file
+    docker-api:
+        runs-on: ubuntu-latest
+        steps:
+            - name: Checkout
+              uses: actions/checkout@v2
+            - name: Set up Docker Buildx
+              uses: docker/setup-buildx-action@v1
+            - name: Cache Docker layers
+              uses: actions/cache@v2
+              with:
+                  path: /tmp/.buildx-cache/api
+                  key: ${{ runner.os }}-buildx-api-${{ github.sha }}
+                  restore-keys: |
+                      ${{ runner.os }}-buildx-api-
+            - name: Login to DockerHub
+              uses: docker/login-action@v1
+              with:
+                  username: ${{ secrets.DOCKERHUB_USERNAME }}
+                  password: ${{ secrets.DOCKERHUB_TOKEN }}
+            - name: Build and push
+              uses: docker/build-push-action@v2
+              with:
+                  context: ./api
+                  push: true
+                  tags: ${{ secrets.DOCKERHUB_TAGS_API }}
+                  cache-from: type=local,src=/tmp/.buildx-cache/api
+                  cache-to: type=local,dest=/tmp/.buildx-cache-new/api
+            - # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
+              # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
+              name: Move cache fix
+              run: |
+                  rm -rf /tmp/.buildx-cache/api
+                  mv /tmp/.buildx-cache-new/api /tmp/.buildx-cache/api
diff --git a/.github/workflows/docker-publish-cdn.yml b/.github/workflows/docker-publish-cdn.yml
index 9b3f6a64..86eae9d6 100644
--- a/.github/workflows/docker-publish-cdn.yml
+++ b/.github/workflows/docker-publish-cdn.yml
@@ -1,47 +1,41 @@
 name: docker-publish-cdn
 
 on:
-  push:
-    paths:
-      - 'cdn/**'
+    push:
+        paths:
+            - "cdn/**"
 
 jobs:
-  docker-cdn:
-    runs-on: ubuntu-latest
-    steps:
-      -
-        name: Checkout
-        uses: actions/checkout@v2
-      -
-        name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
-      -
-        name: Cache Docker layers
-        uses: actions/cache@v2
-        with:
-          path: /tmp/.buildx-cache/cdn
-          key: ${{ runner.os }}-buildx-cdn-${{ github.sha }}
-          restore-keys: |
-            ${{ runner.os }}-buildx-cdn-
-      -
-        name: Login to DockerHub
-        uses: docker/login-action@v1
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      -
-        name: Build and push
-        uses: docker/build-push-action@v2
-        with:
-          context: ./cdn
-          push: true
-          tags: ${{ secrets.DOCKERHUB_TAGS_CDN }}
-          cache-from: type=local,src=/tmp/.buildx-cache/cdn
-          cache-to: type=local,dest=/tmp/.buildx-cache-new/cdn
-      -
-        # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
-        # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
-        name: Move cache fix
-        run: |
-          rm -rf /tmp/.buildx-cache/cdn
-          mv /tmp/.buildx-cache-new/cdn /tmp/.buildx-cache/cdn
\ No newline at end of file
+    docker-cdn:
+        runs-on: ubuntu-latest
+        steps:
+            - name: Checkout
+              uses: actions/checkout@v2
+            - name: Set up Docker Buildx
+              uses: docker/setup-buildx-action@v1
+            - name: Cache Docker layers
+              uses: actions/cache@v2
+              with:
+                  path: /tmp/.buildx-cache/cdn
+                  key: ${{ runner.os }}-buildx-cdn-${{ github.sha }}
+                  restore-keys: |
+                      ${{ runner.os }}-buildx-cdn-
+            - name: Login to DockerHub
+              uses: docker/login-action@v1
+              with:
+                  username: ${{ secrets.DOCKERHUB_USERNAME }}
+                  password: ${{ secrets.DOCKERHUB_TOKEN }}
+            - name: Build and push
+              uses: docker/build-push-action@v2
+              with:
+                  context: ./cdn
+                  push: true
+                  tags: ${{ secrets.DOCKERHUB_TAGS_CDN }}
+                  cache-from: type=local,src=/tmp/.buildx-cache/cdn
+                  cache-to: type=local,dest=/tmp/.buildx-cache-new/cdn
+            - # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
+              # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
+              name: Move cache fix
+              run: |
+                  rm -rf /tmp/.buildx-cache/cdn
+                  mv /tmp/.buildx-cache-new/cdn /tmp/.buildx-cache/cdn
diff --git a/.github/workflows/docker-publish-gateway.yml b/.github/workflows/docker-publish-gateway.yml
index eac1052b..21c3333e 100644
--- a/.github/workflows/docker-publish-gateway.yml
+++ b/.github/workflows/docker-publish-gateway.yml
@@ -1,47 +1,41 @@
 name: docker-publish-gw
 
 on:
-  push:
-    paths:
-      - 'gateway/**'
+    push:
+        paths:
+            - "gateway/**"
 
 jobs:
-  docker-gw:
-    runs-on: ubuntu-latest
-    steps:
-      -
-        name: Checkout
-        uses: actions/checkout@v2
-      -
-        name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
-      -
-        name: Cache Docker layers
-        uses: actions/cache@v2
-        with:
-          path: /tmp/.buildx-cache/gw
-          key: ${{ runner.os }}-buildx-gw-${{ github.sha }}
-          restore-keys: |
-            ${{ runner.os }}-buildx-gw-
-      -
-        name: Login to DockerHub
-        uses: docker/login-action@v1
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      -
-        name: Build and push
-        uses: docker/build-push-action@v2
-        with:
-          context: ./gateway
-          push: true
-          tags: ${{ secrets.DOCKERHUB_TAGS_GW }}
-          cache-from: type=local,src=/tmp/.buildx-cache/gw
-          cache-to: type=local,dest=/tmp/.buildx-cache-new/gw
-      -
-        # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
-        # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
-        name: Move cache fix
-        run: |
-          rm -rf /tmp/.buildx-cache/gw
-          mv /tmp/.buildx-cache-new/gw /tmp/.buildx-cache/gw
\ No newline at end of file
+    docker-gw:
+        runs-on: ubuntu-latest
+        steps:
+            - name: Checkout
+              uses: actions/checkout@v2
+            - name: Set up Docker Buildx
+              uses: docker/setup-buildx-action@v1
+            - name: Cache Docker layers
+              uses: actions/cache@v2
+              with:
+                  path: /tmp/.buildx-cache/gw
+                  key: ${{ runner.os }}-buildx-gw-${{ github.sha }}
+                  restore-keys: |
+                      ${{ runner.os }}-buildx-gw-
+            - name: Login to DockerHub
+              uses: docker/login-action@v1
+              with:
+                  username: ${{ secrets.DOCKERHUB_USERNAME }}
+                  password: ${{ secrets.DOCKERHUB_TOKEN }}
+            - name: Build and push
+              uses: docker/build-push-action@v2
+              with:
+                  context: ./gateway
+                  push: true
+                  tags: ${{ secrets.DOCKERHUB_TAGS_GW }}
+                  cache-from: type=local,src=/tmp/.buildx-cache/gw
+                  cache-to: type=local,dest=/tmp/.buildx-cache-new/gw
+            - # Hackfix to cleanup cache; replace after buildx 0.6 and BuildKit 0.9 are GA
+              # https://github.com/docker/build-push-action/pull/406#issuecomment-879184394
+              name: Move cache fix
+              run: |
+                  rm -rf /tmp/.buildx-cache/gw
+                  mv /tmp/.buildx-cache-new/gw /tmp/.buildx-cache/gw
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f9e87d53..6bd8f535 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,101 +1,101 @@
 on:
-  workflow_dispatch:
-  push:
-    # Sequence of patterns matched against refs/tags
-    tags:
-      - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
+    workflow_dispatch:
+    push:
+        # Sequence of patterns matched against refs/tags
+        tags:
+            - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
 
 name: Publish Release
 
 jobs:
-  insiders-build:
-    strategy:
-      matrix:
-        os: [windows, macos, ubuntu]
-        include:
-          - os: windows
-            file: fosscord-server-windows.exe
-            package: ""
-            artifact: fosscord-server-windows.exe
-          - os: macos
-            file: fosscord-server.app
-            package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
-            artifact: fosscord-server-macos.app.tgz
-          - os: ubuntu
-            file: fosscord
-            package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
-            artifact: fosscord-server-linux.tgz
-    runs-on: ${{ matrix.os }}-latest
-    steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-node@v2
-        env:
-          MONGOMS_VERSION: 4.4.3
-        with:
-          node-version: 14
-      - run: |
-          cd bundle
-          npm run setup
-          npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/bundle/src/start.js'
-          ${{ matrix.package }}
-      - uses: actions/upload-artifact@v2
-        with:
-          name: ${{ matrix.artifact }}
-          path: bundle/${{ matrix.artifact }}
+    insiders-build:
+        strategy:
+            matrix:
+                os: [windows, macos, ubuntu]
+                include:
+                    - os: windows
+                      file: fosscord-server-windows.exe
+                      package: ""
+                      artifact: fosscord-server-windows.exe
+                    - os: macos
+                      file: fosscord-server.app
+                      package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
+                      artifact: fosscord-server-macos.app.tgz
+                    - os: ubuntu
+                      file: fosscord
+                      package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
+                      artifact: fosscord-server-linux.tgz
+        runs-on: ${{ matrix.os }}-latest
+        steps:
+            - uses: actions/checkout@v2
+            - uses: actions/setup-node@v2
+              env:
+                  MONGOMS_VERSION: 4.4.3
+              with:
+                  node-version: 14
+            - run: |
+                  cd bundle
+                  npm run setup
+                  npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/bundle/src/start.js'
+                  ${{ matrix.package }}
+            - uses: actions/upload-artifact@v2
+              with:
+                  name: ${{ matrix.artifact }}
+                  path: bundle/${{ matrix.artifact }}
 
-  release:
-    needs: [insiders-build]
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
-      - uses: actions/download-artifact@v2
-        with:
-          name: fosscord-server-windows.exe
-      - uses: actions/download-artifact@v2
-        with:
-          name: fosscord-server-macos.app.tgz
-      - uses: actions/download-artifact@v2
-        with:
-          name: fosscord-server-linux.tgz
-      - uses: actions/create-release@v1
-        id: create-release
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          tag_name: v${{ secrets.RELEASE_VERSION }}
-          release_name: Server v${{ secrets.RELEASE_VERSION }}
-          draft: false
-          prerelease: true # TODO: change this to false
-          body: >
-            ## Download
+    release:
+        needs: [insiders-build]
+        runs-on: ubuntu-latest
+        steps:
+            - uses: actions/checkout@v2
+            - uses: actions/download-artifact@v2
+              with:
+                  name: fosscord-server-windows.exe
+            - uses: actions/download-artifact@v2
+              with:
+                  name: fosscord-server-macos.app.tgz
+            - uses: actions/download-artifact@v2
+              with:
+                  name: fosscord-server-linux.tgz
+            - uses: actions/create-release@v1
+              id: create-release
+              env:
+                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+              with:
+                  tag_name: v${{ secrets.RELEASE_VERSION }}
+                  release_name: Server v${{ secrets.RELEASE_VERSION }}
+                  draft: false
+                  prerelease: true # TODO: change this to false
+                  body: >
+                      ## Download
 
-            - [Windows](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-windows.exe)
+                      - [Windows](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-windows.exe)
 
-            - [MacOS](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-macos.app.tgz)
+                      - [MacOS](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-macos.app.tgz)
 
-            - [Linux](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-linux.tgz)
+                      - [Linux](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-linux.tgz)
 
-      - uses: actions/upload-release-asset@v1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          upload_url: ${{ steps.create-release.outputs.upload_url }}
-          asset_path: fosscord-server-windows.exe
-          asset_name: fosscord-server-windows.exe
-          asset_content_type: application/vnd.microsoft.portable-executable
-      - uses: actions/upload-release-asset@v1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          upload_url: ${{ steps.create-release.outputs.upload_url }}
-          asset_path: fosscord-server-macos.app.tgz
-          asset_name: fosscord-server-macos.app.tgz
-          asset_content_type: application/gzip
-      - uses: actions/upload-release-asset@v1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          upload_url: ${{ steps.create-release.outputs.upload_url }}
-          asset_path: fosscord-server-linux.tgz
-          asset_name: fosscord-server-linux.tgz
-          asset_content_type: application/gzip
+            - uses: actions/upload-release-asset@v1
+              env:
+                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+              with:
+                  upload_url: ${{ steps.create-release.outputs.upload_url }}
+                  asset_path: fosscord-server-windows.exe
+                  asset_name: fosscord-server-windows.exe
+                  asset_content_type: application/vnd.microsoft.portable-executable
+            - uses: actions/upload-release-asset@v1
+              env:
+                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+              with:
+                  upload_url: ${{ steps.create-release.outputs.upload_url }}
+                  asset_path: fosscord-server-macos.app.tgz
+                  asset_name: fosscord-server-macos.app.tgz
+                  asset_content_type: application/gzip
+            - uses: actions/upload-release-asset@v1
+              env:
+                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+              with:
+                  upload_url: ${{ steps.create-release.outputs.upload_url }}
+                  asset_path: fosscord-server-linux.tgz
+                  asset_name: fosscord-server-linux.tgz
+                  asset_content_type: application/gzip
diff --git a/.gitignore b/.gitignore
index bd301f07..6e6de8d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,4 @@ database.db
 tsconfig.tsbuildinfo
 files/
 .env
-config.json
\ No newline at end of file
+config.json
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..e56ca031
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,4 @@
+{
+    "tabWidth": 4,
+    "useTabs": true
+}
diff --git a/README.md b/README.md
index b8e2e573..cc831e62 100644
--- a/README.md
+++ b/README.md
@@ -18,13 +18,13 @@
 
 This repository contains:
 
--   [Fosscord HTTP API Server](https://github.com/fosscord/fosscord-server/tree/master/api)
--   [WebSocket Gateway Server](https://github.com/fosscord/fosscord-server/tree/master/gateway)
--   [HTTP CDN Server](https://github.com/fosscord/fosscord-server/tree/master/cdn)
--   [Utility and Database Models](https://github.com/fosscord/fosscord-server/tree/master/util)
--   [RTC Server](https://github.com/fosscord/fosscord-server/tree/master/rtc)
--   [WebRTC Server](https://github.com/fosscord/fosscord-server/tree/master/webrtc)
--   [Admin Dashboard](https://github.com/fosscord/fosscord-server/tree/master/dashboard)
+-   [Fosscord HTTP API Server](/api)
+-   [WebSocket Gateway Server](/gateway)
+-   [HTTP CDN Server](/cdn)
+-   [Utility and Database Models](/util)
+-   [RTC Server](/rtc)
+-   [WebRTC Server](/webrtc)
+-   [Admin Dashboard](/dashboard)
 
 ## [Resources](https://docs.fosscord.com/resources/)
 
@@ -32,4 +32,4 @@ This repository contains:
 
 ## [Setup](https://docs.fosscord.com/setup/server/)
 
-- [Download](https://github.com/fosscord/fosscord-server/releases)
+-   [Download](https://github.com/fosscord/fosscord-server/releases)
diff --git a/crowdin.yml b/crowdin.yml
index c2943832..a6330566 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
 files:
-  - source: /api/locales/en/*.json
-    translation: /api/locales/%two_letters_code%/%original_file_name%
+    - source: /api/locales/en/*.json
+      translation: /api/locales/%two_letters_code%/%original_file_name%
diff --git a/docker-compose.yml b/docker-compose.yml
index 5861e12f..9fe41e15 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -21,4 +21,4 @@ services:
             - db
         ports:
             - 3002:3002
-        env_file: ./.docker/env
\ No newline at end of file
+        env_file: ./.docker/env
diff --git a/fosscord-server.code-workspace b/fosscord-server.code-workspace
index 645dcd76..e618b7f0 100644
--- a/fosscord-server.code-workspace
+++ b/fosscord-server.code-workspace
@@ -26,4 +26,4 @@
 		}
 	],
 	"settings": {}
-}
\ No newline at end of file
+}