~chrono/boiler

2f5989182631ad95cf679c6f92ef18baeedde78a — Chrono 1 year, 1 month ago a898bd9 + 7de5b2d
Merge remote-tracking branch 'origin/master'

7 files changed, 67 insertions(+), 133 deletions(-)

A .github/workflows/deno.yml
M .pnp.cjs
M .yarn/install-state.gz
M README.md
M package.json
M src/server.ts
M yarn.lock
A .github/workflows/deno.yml => .github/workflows/deno.yml +41 -0
@@ 0,0 1,41 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Setup repo
        uses: actions/checkout@v3

      - name: Setup Deno
        uses: denoland/setup-deno@v1.1.2
        with:
          deno-version: v1.x

      # Uncomment this step to verify the use of 'deno fmt' on each commit.
      # - name: Verify formatting
      #   run: deno fmt --check

      - name: Run linter
        run: deno lint

      - name: Run tests
        run: deno test -A

M .pnp.cjs => .pnp.cjs +14 -66
@@ 36,7 36,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
            ["@types/uuid", "npm:9.0.1"],\
            ["@types/ws", "npm:8.5.4"],\
            ["@typescript-eslint/eslint-plugin", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["bcrypt", "npm:5.1.0"],\
            ["cors", "npm:2.8.5"],\
            ["dotenv", "npm:16.0.3"],\


@@ 517,7 517,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
            ["@types/eslint", null],\
            ["@types/typescript", null],\
            ["@types/typescript-eslint__parser", null],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["@typescript-eslint/scope-manager", "npm:5.59.5"],\
            ["@typescript-eslint/type-utils", "virtual:90f131bba9568dd257d549afe7cad9270814dbd6e0ab382c2a15c6557792f3b2813cf594bd2cff85c6eb8751bc01aec5f22f07d0f4ece08bdf8d29c96cf423d9#npm:5.59.5"],\
            ["@typescript-eslint/utils", "virtual:90f131bba9568dd257d549afe7cad9270814dbd6e0ab382c2a15c6557792f3b2813cf594bd2cff85c6eb8751bc01aec5f22f07d0f4ece08bdf8d29c96cf423d9#npm:5.59.5"],\


@@ 542,22 542,22 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
        }]\
      ]],\
      ["@typescript-eslint/parser", [\
        ["npm:5.59.0", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-parser-npm-5.59.0-64b7b6d67e-1a442d6b77.zip/node_modules/@typescript-eslint/parser/",\
        ["npm:5.59.5", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-parser-npm-5.59.5-7638450aaa-ef4122074f.zip/node_modules/@typescript-eslint/parser/",\
          "packageDependencies": [\
            ["@typescript-eslint/parser", "npm:5.59.0"]\
            ["@typescript-eslint/parser", "npm:5.59.5"]\
          ],\
          "linkType": "SOFT"\
        }],\
        ["virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0", {\
          "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-068d5967a7/0/cache/@typescript-eslint-parser-npm-5.59.0-64b7b6d67e-1a442d6b77.zip/node_modules/@typescript-eslint/parser/",\
        ["virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5", {\
          "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-81da12469f/0/cache/@typescript-eslint-parser-npm-5.59.5-7638450aaa-ef4122074f.zip/node_modules/@typescript-eslint/parser/",\
          "packageDependencies": [\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["@types/eslint", null],\
            ["@types/typescript", null],\
            ["@typescript-eslint/scope-manager", "npm:5.59.0"],\
            ["@typescript-eslint/types", "npm:5.59.0"],\
            ["@typescript-eslint/typescript-estree", "virtual:068d5967a7bf55d5c07b9182f1aed200a19c15408fccffc8fe5f4d7202701a32eba20a6b40e7d748e2d84d8692568ae33a086e59fbf1ab56d83ec096cb981a27#npm:5.59.0"],\
            ["@typescript-eslint/scope-manager", "npm:5.59.5"],\
            ["@typescript-eslint/types", "npm:5.59.5"],\
            ["@typescript-eslint/typescript-estree", "virtual:03b16bb3a57254462b2cc7c3f035352118e90e8a1bc12c676047ad17e9df600676a3992da581aa92a5a78b16d323d4cdee2a08a2bac82644058827851a6feafa#npm:5.59.5"],\
            ["debug", "virtual:428f325a939c2653ad822eb3d75efb02ac311523dd0d4f9645afc39ea00bd86eceac35a9d59c9b6977d76b670a4ef0ae057ea572338a44729aa592711a8c05a3#npm:4.3.4"],\
            ["eslint", "npm:8.40.0"],\
            ["typescript", "patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=85af82"]\


@@ 572,15 572,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
        }]\
      ]],\
      ["@typescript-eslint/scope-manager", [\
        ["npm:5.59.0", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-scope-manager-npm-5.59.0-f34ddb3f95-dd89cd3429.zip/node_modules/@typescript-eslint/scope-manager/",\
          "packageDependencies": [\
            ["@typescript-eslint/scope-manager", "npm:5.59.0"],\
            ["@typescript-eslint/types", "npm:5.59.0"],\
            ["@typescript-eslint/visitor-keys", "npm:5.59.0"]\
          ],\
          "linkType": "HARD"\
        }],\
        ["npm:5.59.5", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-scope-manager-npm-5.59.5-c3752f14cf-b3d8a5b70e.zip/node_modules/@typescript-eslint/scope-manager/",\
          "packageDependencies": [\


@@ 622,13 613,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
        }]\
      ]],\
      ["@typescript-eslint/types", [\
        ["npm:5.59.0", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-types-npm-5.59.0-647f08f5b8-5dc608a867.zip/node_modules/@typescript-eslint/types/",\
          "packageDependencies": [\
            ["@typescript-eslint/types", "npm:5.59.0"]\
          ],\
          "linkType": "HARD"\
        }],\
        ["npm:5.59.5", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-types-npm-5.59.5-0df27a0abe-98c93d354d.zip/node_modules/@typescript-eslint/types/",\
          "packageDependencies": [\


@@ 638,13 622,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
        }]\
      ]],\
      ["@typescript-eslint/typescript-estree", [\
        ["npm:5.59.0", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-typescript-estree-npm-5.59.0-b3f5cb0a3b-d80f2766e2.zip/node_modules/@typescript-eslint/typescript-estree/",\
          "packageDependencies": [\
            ["@typescript-eslint/typescript-estree", "npm:5.59.0"]\
          ],\
          "linkType": "SOFT"\
        }],\
        ["npm:5.59.5", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-typescript-estree-npm-5.59.5-31e6a58f45-10a8c01ad5.zip/node_modules/@typescript-eslint/typescript-estree/",\
          "packageDependencies": [\


@@ 672,26 649,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
          ],\
          "linkType": "HARD"\
        }],\
        ["virtual:068d5967a7bf55d5c07b9182f1aed200a19c15408fccffc8fe5f4d7202701a32eba20a6b40e7d748e2d84d8692568ae33a086e59fbf1ab56d83ec096cb981a27#npm:5.59.0", {\
          "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-0144fedaa0/0/cache/@typescript-eslint-typescript-estree-npm-5.59.0-b3f5cb0a3b-d80f2766e2.zip/node_modules/@typescript-eslint/typescript-estree/",\
          "packageDependencies": [\
            ["@typescript-eslint/typescript-estree", "virtual:068d5967a7bf55d5c07b9182f1aed200a19c15408fccffc8fe5f4d7202701a32eba20a6b40e7d748e2d84d8692568ae33a086e59fbf1ab56d83ec096cb981a27#npm:5.59.0"],\
            ["@types/typescript", null],\
            ["@typescript-eslint/types", "npm:5.59.0"],\
            ["@typescript-eslint/visitor-keys", "npm:5.59.0"],\
            ["debug", "virtual:428f325a939c2653ad822eb3d75efb02ac311523dd0d4f9645afc39ea00bd86eceac35a9d59c9b6977d76b670a4ef0ae057ea572338a44729aa592711a8c05a3#npm:4.3.4"],\
            ["globby", "npm:11.1.0"],\
            ["is-glob", "npm:4.0.3"],\
            ["semver", "npm:7.5.0"],\
            ["tsutils", "virtual:90f131bba9568dd257d549afe7cad9270814dbd6e0ab382c2a15c6557792f3b2813cf594bd2cff85c6eb8751bc01aec5f22f07d0f4ece08bdf8d29c96cf423d9#npm:3.21.0"],\
            ["typescript", "patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=85af82"]\
          ],\
          "packagePeers": [\
            "@types/typescript",\
            "typescript"\
          ],\
          "linkType": "HARD"\
        }],\
        ["virtual:3d438376a8354674c1ba8c50df69f5f4f2863265bc297870e007c28c2b1297a2043e7d795799808da61bb0f7a55d3fa0fbda09b0eadf70c74e1fa2f3c195b211#npm:5.59.5", {\
          "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-92f6008fa3/0/cache/@typescript-eslint-typescript-estree-npm-5.59.5-31e6a58f45-10a8c01ad5.zip/node_modules/@typescript-eslint/typescript-estree/",\
          "packageDependencies": [\


@@ 744,15 701,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
        }]\
      ]],\
      ["@typescript-eslint/visitor-keys", [\
        ["npm:5.59.0", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-visitor-keys-npm-5.59.0-4445cc37d0-e21656de02.zip/node_modules/@typescript-eslint/visitor-keys/",\
          "packageDependencies": [\
            ["@typescript-eslint/visitor-keys", "npm:5.59.0"],\
            ["@typescript-eslint/types", "npm:5.59.0"],\
            ["eslint-visitor-keys", "npm:3.4.0"]\
          ],\
          "linkType": "HARD"\
        }],\
        ["npm:5.59.5", {\
          "packageLocation": "./.yarn/cache/@typescript-eslint-visitor-keys-npm-5.59.5-3893515073-94db281ec8.zip/node_modules/@typescript-eslint/visitor-keys/",\
          "packageDependencies": [\


@@ 1067,7 1015,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
            ["@types/uuid", "npm:9.0.1"],\
            ["@types/ws", "npm:8.5.4"],\
            ["@typescript-eslint/eslint-plugin", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["bcrypt", "npm:5.1.0"],\
            ["cors", "npm:2.8.5"],\
            ["dotenv", "npm:16.0.3"],\


@@ 1837,7 1785,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
            ["@types/eslint-import-resolver-typescript", null],\
            ["@types/eslint-import-resolver-webpack", null],\
            ["@types/typescript-eslint__parser", null],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["debug", "virtual:220870497d8f4e11bae4239a4c66d6b4664b664e91579ad086fbff8ac9b0dd6abf345193c67e47305cb88bd705fc77535c2fc19c1df27afb4cf12e601dd1c239#npm:3.2.7"],\
            ["eslint", "npm:8.40.0"],\
            ["eslint-import-resolver-node", "npm:0.3.7"],\


@@ 1873,7 1821,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
            ["eslint-plugin-import", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:2.27.5"],\
            ["@types/eslint", null],\
            ["@types/typescript-eslint__parser", null],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.0"],\
            ["@typescript-eslint/parser", "virtual:94c097482eb202cbd720b43a6817294c9ab8f973f179a848d86bd0fa09795bad50696bcd15cd360705405d5bc0308557ecbbfe8af43a9347fe1e375869b90dbe#npm:5.59.5"],\
            ["array-includes", "npm:3.1.6"],\
            ["array.prototype.flat", "npm:1.3.1"],\
            ["array.prototype.flatmap", "npm:1.3.1"],\

M .yarn/install-state.gz => .yarn/install-state.gz +0 -0
M README.md => README.md +0 -4
@@ 7,7 7,3 @@ Boiler is a chat server written in TypeScript. It is designed to be easy to use 
## Installation

Note: Hammer is currently in development, do not touch.

## Contributing

no ;)

M package.json => package.json +1 -1
@@ 33,7 33,7 @@
		"@types/uuid": "^9.0.1",
		"@types/ws": "^8.5.4",
		"@typescript-eslint/eslint-plugin": "^5.59.5",
		"@typescript-eslint/parser": "^5.59.0",
		"@typescript-eslint/parser": "^5.59.5",
		"eslint": "^8.40.0",
		"eslint-config-prettier": "^8.8.0",
		"eslint-import-resolver-typescript": "^3.5.5",

M src/server.ts => src/server.ts +3 -9
@@ 158,19 158,13 @@ wss.on(
			console.log(`${username} has left the server.`);

			// Remove the user's socket, if it exists
			if (user.socket) {
				user.socket = null;
			}
			user.socket = null;

			// Remove the user's token, if it exists
			if (user.token) {
				user.token = null;
			}
			user.token = null;

			// Remove the user handshake complete variable
			if (user.handshakeComplete == true) {
				user.handshakeComplete = false;
			}
			user.handshakeComplete = false;
		});
	}
);

M yarn.lock => yarn.lock +8 -53
@@ 402,30 402,20 @@ __metadata:
  languageName: node
  linkType: hard

"@typescript-eslint/parser@npm:^5.59.0":
  version: 5.59.0
  resolution: "@typescript-eslint/parser@npm:5.59.0"
"@typescript-eslint/parser@npm:^5.59.5":
  version: 5.59.5
  resolution: "@typescript-eslint/parser@npm:5.59.5"
  dependencies:
    "@typescript-eslint/scope-manager": 5.59.0
    "@typescript-eslint/types": 5.59.0
    "@typescript-eslint/typescript-estree": 5.59.0
    "@typescript-eslint/scope-manager": 5.59.5
    "@typescript-eslint/types": 5.59.5
    "@typescript-eslint/typescript-estree": 5.59.5
    debug: ^4.3.4
  peerDependencies:
    eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
  peerDependenciesMeta:
    typescript:
      optional: true
  checksum: 1a442d6b776fc1dca4fe104bac77eae0a59b807ba11cef00dec8f5dbbc0fb4e5fc10519eac03dd94d52e4dd6d814800d0e5c0a3bd43eefce80d829c65ba47ad0
  languageName: node
  linkType: hard

"@typescript-eslint/scope-manager@npm:5.59.0":
  version: 5.59.0
  resolution: "@typescript-eslint/scope-manager@npm:5.59.0"
  dependencies:
    "@typescript-eslint/types": 5.59.0
    "@typescript-eslint/visitor-keys": 5.59.0
  checksum: dd89cd34291f7674edcbe9628748faa61dbf7199f9776586167e81fd91b93ba3a7f0ddd493c559c0dbb805b58629858fae648d56550e8ac5330b2ed1802b0178
  checksum: ef4122074f2c00be1dabbb3fb5534280f81b45f8de6c1a696092af5175684fea65bc002814546d06f880ea5beff2006589e2633662e92d65035437c8e2d9134c
  languageName: node
  linkType: hard



@@ 456,13 446,6 @@ __metadata:
  languageName: node
  linkType: hard

"@typescript-eslint/types@npm:5.59.0":
  version: 5.59.0
  resolution: "@typescript-eslint/types@npm:5.59.0"
  checksum: 5dc608a867b07b4262a236a264a65e894f841388b3aba461c4c1a30d76a2c3aed0c6a1e3d1ea2f64cce55e783091bafb826bf01a0ef83258820af63da860addf
  languageName: node
  linkType: hard

"@typescript-eslint/types@npm:5.59.5":
  version: 5.59.5
  resolution: "@typescript-eslint/types@npm:5.59.5"


@@ 470,24 453,6 @@ __metadata:
  languageName: node
  linkType: hard

"@typescript-eslint/typescript-estree@npm:5.59.0":
  version: 5.59.0
  resolution: "@typescript-eslint/typescript-estree@npm:5.59.0"
  dependencies:
    "@typescript-eslint/types": 5.59.0
    "@typescript-eslint/visitor-keys": 5.59.0
    debug: ^4.3.4
    globby: ^11.1.0
    is-glob: ^4.0.3
    semver: ^7.3.7
    tsutils: ^3.21.0
  peerDependenciesMeta:
    typescript:
      optional: true
  checksum: d80f2766e2830dc830b9f4f1b9e744e1e7a285ebe72babdf0970f75bfe26cb832c6623bb836a53c48f1e707069d1e407ac1ea095bd583807007f713ba6e2e0e1
  languageName: node
  linkType: hard

"@typescript-eslint/typescript-estree@npm:5.59.5":
  version: 5.59.5
  resolution: "@typescript-eslint/typescript-estree@npm:5.59.5"


@@ 524,16 489,6 @@ __metadata:
  languageName: node
  linkType: hard

"@typescript-eslint/visitor-keys@npm:5.59.0":
  version: 5.59.0
  resolution: "@typescript-eslint/visitor-keys@npm:5.59.0"
  dependencies:
    "@typescript-eslint/types": 5.59.0
    eslint-visitor-keys: ^3.3.0
  checksum: e21656de02e221a27a5fe9f7fd34a1ca28530e47675134425f84fd0d1f276695fe39e35120837a491b02255d49aa2fd871e2c858ecccc66c687db972d057bd1c
  languageName: node
  linkType: hard

"@typescript-eslint/visitor-keys@npm:5.59.5":
  version: 5.59.5
  resolution: "@typescript-eslint/visitor-keys@npm:5.59.5"


@@ 802,7 757,7 @@ __metadata:
    "@types/uuid": ^9.0.1
    "@types/ws": ^8.5.4
    "@typescript-eslint/eslint-plugin": ^5.59.5
    "@typescript-eslint/parser": ^5.59.0
    "@typescript-eslint/parser": ^5.59.5
    bcrypt: ^5.1.0
    cors: ^2.8.5
    dotenv: ^16.0.3