-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated CI pipeline for improved clarity and structure. - Introduced structured command processing for game lobby commands. - Enhanced message handling for client connections and tracking. - **Bug Fixes** - Improved error handling in message processing functions. - **Documentation** - Added configuration files for testing setups across various packages. - **Tests** - Created initial test suites to validate core functionalities. - **Chores** - Updated package configurations for better dependency management. - Enhanced `.gitignore` to exclude unnecessary files from tracking. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
318 changed files
with
42,558 additions
and
16,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version = 1 | ||
|
||
[[analyzers]] | ||
name = "javascript" | ||
|
||
[analyzers.meta] | ||
environment = [ | ||
"nodejs", | ||
"vitest" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"extends": ["eslint:recommended", "plugin:prettier/recommended"], | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"plugins": ["prettier"], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-undef": "error" | ||
} | ||
"extends": ["eslint:recommended", "plugin:prettier/recommended"], | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"plugins": ["prettier"], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-undef": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Node.js CI | ||
name: Node.js | ||
|
||
on: | ||
push: | ||
|
@@ -7,45 +7,53 @@ on: | |
|
||
env: | ||
MCO_LOG_LEVEL: warn | ||
EXTERNAL_HOST: mcouniverse.com | ||
PRIVATE_KEY_FILE: thebeast/data/private_key.pem # These secrets are stored in the repository and are safe to "leak" | ||
CERTIFICATE_FILE: thebeast/data/mcouniverse.crt # These secrets are stored in the repository and are safe to "leak" | ||
PUBLIC_KEY_FILE: thebeast/data/pub.key # These secrets are stored in the repository and are safe to "leak" | ||
|
||
jobs: | ||
build: | ||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 21.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
- name: Use Node.js 22.x | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci install | ||
- name: Test | ||
run: npm run test:only | ||
node-version: 22.x | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
- name: Install and test | ||
run: | | ||
pnpm install | ||
make test | ||
env: | ||
CODECOV_UPLOAD_BUNDLE_TOKEN: ${{ secrets.CODECOV_UPLOAD_BUNDLE_TOKEN }} | ||
- name: Codecov | ||
env: # Or as an environment variable | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
pip install --user pytest | ||
pip install --user codecov-cli | ||
codecovcli --verbose create-commit --fail-on-error | ||
codecovcli --verbose create-report --fail-on-error | ||
codecovcli --verbose create-commit --fail-on-error | ||
codecovcli --verbose create-report --fail-on-error | ||
codecovcli do-upload --report-type test_results --file mcos.junit.xml | ||
codecovcli --verbose do-upload --fail-on-error --flag cli --name cli-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag connection --name connection-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag database --name database-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag gateway --name gateway-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag lobby --name lobby-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag login --name login-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag mcots --name mcots-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag nps --name nps-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag patch --name patch-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag persona --name persona-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shard --name shard-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag transactions --name transactions-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag core --name core-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shared --name shared-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shared-packets --name shared-packets-${{ matrix.node-version }} | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4 | ||
with: | ||
name: coverage_${{ matrix.node-version }} | ||
path: coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,6 @@ dist | |
# Sentry Auth Token | ||
.sentryclirc | ||
*.map | ||
out/* | ||
out/* | ||
*.junit.xml | ||
mcos.junit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node-options="--openssl-legacy-provider" | ||
link-workspace-packages=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v20.5.1 | ||
22.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"extends": ["config:base"], | ||
"statusCheckVerify": true, | ||
"automerge": true, | ||
"automergeType": "branch", | ||
"rangeStrategy": "bump", | ||
"enabledManagers": ["npm"] | ||
"extends": ["config:base"], | ||
"statusCheckVerify": true, | ||
"automerge": true, | ||
"automergeType": "branch", | ||
"rangeStrategy": "bump", | ||
"enabledManagers": ["npm"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-azuretools.vscode-docker", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"ms-vscode.makefile-tools", | ||
"usernamehw.errorlens" | ||
] | ||
} | ||
"recommendations": [ | ||
"ms-azuretools.vscode-docker", | ||
"esbenp.prettier-vscode", | ||
"ms-vscode.makefile-tools", | ||
"usernamehw.errorlens", | ||
"biomejs.biome" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"git.enableCommitSigning": true, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"js/ts.implicitProjectConfig.checkJs": true | ||
"git.enableCommitSigning": true, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"js/ts.implicitProjectConfig.checkJs": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { "enabled": true }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"complexity": { | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noWith": "error", | ||
"useArrowFunction": "off", | ||
"useLiteralKeys":"off" | ||
}, | ||
"correctness": { | ||
"noConstAssign": "error", | ||
"noConstantCondition": "error", | ||
"noEmptyCharacterClassInRegex": "error", | ||
"noEmptyPattern": "error", | ||
"noGlobalObjectCalls": "error", | ||
"noInnerDeclarations": "error", | ||
"noInvalidConstructorSuper": "error", | ||
"noNewSymbol": "error", | ||
"noNonoctalDecimalEscape": "error", | ||
"noPrecisionLoss": "error", | ||
"noSelfAssign": "error", | ||
"noSetterReturn": "error", | ||
"noSwitchDeclarations": "error", | ||
"noUndeclaredVariables": "error", | ||
"noUnreachable": "error", | ||
"noUnreachableSuper": "error", | ||
"noUnsafeFinally": "error", | ||
"noUnsafeOptionalChaining": "error", | ||
"noUnusedLabels": "error", | ||
"noUnusedVariables": "error", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"style": { "useBlockStatements": "off" }, | ||
"suspicious": { | ||
"noAssignInExpressions": "error", | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCompareNegZero": "error", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "error", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noUnsafeNegation": "error", | ||
"useGetterReturn": "error", | ||
"useValidTypeof": "error" | ||
} | ||
}, | ||
"ignore": ["**/*.d.ts", "**/dist", "**/out"] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.