Skip to content

Commit

Permalink
Merge pull request #277 from Kaetram/develop
Browse files Browse the repository at this point in the history
Kaetram Alpha
  • Loading branch information
lemueldls authored May 25, 2023
2 parents 8c29a0b + e9a3021 commit 118063b
Show file tree
Hide file tree
Showing 1,653 changed files with 44,482 additions and 28,546 deletions.
24 changes: 24 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [
2,
"always",
[
"add",
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"remove",
"revert",
"style",
"test"
]
]
}
}
38 changes: 28 additions & 10 deletions .env.defaults
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# === Connectivity/Hosting ===

NAME='Kaetram'

HOST='localhost'
PORT=9001

# Use HTTPS
SSL=false

# Server ports, make sure this matches the client's config.
SOCKETIO_PORT=9001
WEBSOCKET_PORT=9002

# API Configuration
API_ENABLED=false
API_PORT=9003

# Server ID (increment with each server hosted)
SERVER_ID=1
ACCESS_TOKEN=''
Expand All @@ -21,12 +20,14 @@ ACCESS_TOKEN=''
HUB_ENABLED=false
# Defaults to `HOST` if empty
HUB_HOST=''
HUB_WS_HOST=''
HUB_PORT=9526
# Ping every 15 seconds
HUB_PING=15000
HUB_WS_PORT=9527
# The host sent to the hub, if empty string, hub will try to find the IP.
# Not recommended to have as empty string for production environments.
REMOTE_SERVER_HOST=''
# Remote API host, if empty string, hub will use `REMOTE_SERVER_HOST`
REMOTE_API_HOST=''
# Make sure it matches with the hub.
# Note that if you take the hub-server approach, you should NEVER
# rely solely on `HUB_ACCESS_TOKEN`. This is just a minimal safety feature.
Expand All @@ -37,7 +38,7 @@ HUB_ACCESS_TOKEN=''
# Overrides where the client connects to
# Defaults to `HOST` for the client if empty
CLIENT_REMOTE_HOST=''
# Defaults to `SOCKETIO_PORT` for the client if empty
# Defaults to `PORT` for the client if empty
CLIENT_REMOTE_PORT=

# Server List Configs
Expand All @@ -60,6 +61,10 @@ MONGODB_DATABASE='kaetram_devlopment'
MONGODB_TLS=false
# Use the `mongodb+srv` syntax
MONGODB_SRV=false
# If you need to authenticate against a different database
MONGODB_AUTH_SOURCE=''
# When we're allowed to aggregate new data.
AGGREGATE_THRESHOLD=60000

# === World Configurations ===

Expand All @@ -70,12 +75,25 @@ OVERWRITE_AUTH=false
DEVELOPMENT=false
# Maximum number of players allowed on the server.
MAX_PLAYERS=200
# 20 updates (ticks) per second.
UPDATE_TIME=20
# Update time to parse packets in milliseconds (update every 300ms)
UPDATE_TIME=300
# Game version
GVER='alpha-2.3.0'
GVER='alpha-2.5.1'
# Used for hotfixes and minor updates that do not require a full update.
MINOR=''
# If to load regions from cache.
REGION_CACHE=true
# How often to save the world.
SAVE_INTERVAL=60000
# How many messages per second are allowed
MESSAGE_LIMIT=300

# === Sentry ===

SENTRY_ORG=''
SENTRY_PROJECT=''
SENTRY_AUTH_TOKEN=''
SENTRY_DSN=''

# === Discord ===

Expand Down
9 changes: 4 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"@typescript-eslint/no-redundant-type-constituents": "warn",
// REVIEW: Consider if we need certain undefined/null checks
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],

"import/no-unresolved": "off",
Expand All @@ -60,12 +60,12 @@
{
"groups": [
"builtin",
"sibling",
"parent",
"index",
"external",
"internal",
"unknown",
"parent",
"sibling",
"index",
"object",
"type"
],
Expand All @@ -82,7 +82,6 @@
"unicorn/prefer-number-properties": "off",
"unicorn/prevent-abbreviations": "off",

"unicorn/prefer-at": "warn",
// TODO: Enable on ES2022
"unicorn/prefer-string-replace-all": "off",

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn install

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Kaetram
on:
push:
branches: [game-content]

jobs:
build:
runs-on: ubuntu-latest
environment: development

steps:
- name: Deploy to the development server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEV_SERVER_HOST }}
username: ${{ secrets.DEV_SERVER_USERNAME }}
key: ${{ secrets.DEV_SERVER_KEY }}
port: 22
script: |
${{ secrets.DEV_SERVER_SCRIPT }}
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ jobs:
node-version: 18.5.0
cache: 'yarn'

- name: Enable Corepack
run: corepack enable

- name: Run Cypress
uses: cypress-io/github-action@v4
with:
command: yarn workspace @kaetram/e2e test:run:record
command: yarn workspace @kaetram/e2e test:record
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit ${1}
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

14 changes: 0 additions & 14 deletions .yarn/plugins/@yarnpkg/plugin-stage.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

Loading

0 comments on commit 118063b

Please sign in to comment.