diff --git a/.gitignore b/.gitignore index 160fc87..6704566 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,3 @@ -node_modules/ -dist/ -/common/cjs/ -/common/esm/ -.vscode/ -.DS_Store -*.toml -!*.template.toml -/web-* -!/web-svelte - # Logs logs *.log diff --git a/README.md b/README.md index 60c096f..253f795 100644 --- a/README.md +++ b/README.md @@ -1,17 +1 @@ -# Gravwell-Online - -## Development: -Below are the steps required to run the code in development mode: - - 1. Clone the git repository - 2. Go into the common code module: `cd common` - 3. Build the code for commonjs and ES module distribution with: `make` - 4. In a new terminal: `cd web-svelte` - 5. Install the required dependencies: `pnpm install` - - If the `common` module fails to import, link it with `pnpm link ../common/esm` - 6. Run Vite: `pnpm dev` - 7. In a new terminal: `cd server` - 8. Install the required dependencies: `pnpm install` - - If the `common` modules fails to import, link it with `pnpm link ../common/cjs` - 9. Compile the server code with `tsc` - 10. Run the server code with `pnpm start` \ No newline at end of file +# Gravwell-Online \ No newline at end of file diff --git a/common/makefile b/common/makefile deleted file mode 100644 index 060fc7a..0000000 --- a/common/makefile +++ /dev/null @@ -1,31 +0,0 @@ -.PHONY: all esm cjs test watch watch-esm watch-cjs - -ESM_LOCATION=./esm -CJS_LOCATION=./cjs - -all: esm cjs - -esm: - @mkdir $(ESM_LOCATION) --parents - tsc --module es6 --outDir $(ESM_LOCATION) - cp ./package.json $(ESM_LOCATION)/package.json - -cjs: - @mkdir $(CJS_LOCATION) --parents - tsc --module commonjs --outDir $(CJS_LOCATION) - cp ./package.json $(CJS_LOCATION)/package.json - -watch: - @echo To have Typescript auto-rebuild, run the following commands in new terminals - @echo "\tmake watch-esm" - @echo "\tmake watch-cjs" - @echo These processes will not terminate, which is why they cannot be run in the same rule - -watch-esm: esm - tsc --module es6 --outDir $(ESM_LOCATION) --watch - -watch-cjs: cjs - tsc --module commonjs --outDir $(CJS_LOCATION) --watch - -test: - node_modules/mocha/bin/_mocha -r ts-node/register src/**/*.spec.ts \ No newline at end of file diff --git a/common/package.json b/common/package.json deleted file mode 100644 index 9489c61..0000000 --- a/common/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "common", - "version": "1.0.0", - "description": "", - "module": "index.js", - "main": "index.js", - "scripts": { - "test": "echo \"To run the tests use: make test\" && exit 1" - }, - "author": "Oliver Akins", - "license": "UNLICENSED", - "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.1", - "@types/node": "^18.0.6", - "chai": "^4.3.6", - "mocha": "^10.0.0", - "ts-node": "^10.9.1", - "typescript": "^4.7.4" - } -} diff --git a/common/pnpm-lock.yaml b/common/pnpm-lock.yaml deleted file mode 100644 index a36f126..0000000 --- a/common/pnpm-lock.yaml +++ /dev/null @@ -1,705 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@types/chai': ^4.3.1 - '@types/mocha': ^9.1.1 - '@types/node': ^18.0.6 - chai: ^4.3.6 - mocha: ^10.0.0 - ts-node: ^10.9.1 - typescript: ^4.7.4 - -devDependencies: - '@types/chai': 4.3.1 - '@types/mocha': 9.1.1 - '@types/node': 18.0.6 - chai: 4.3.6 - mocha: 10.0.0 - ts-node: 10.9.1_tdn3ypgnfy6bmey2q4hu5jonwi - typescript: 4.7.4 - -packages: - - /@cspotcode/source-map-support/0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: true - - /@jridgewell/resolve-uri/3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec/1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: true - - /@jridgewell/trace-mapping/0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@tsconfig/node10/1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true - - /@tsconfig/node12/1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true - - /@tsconfig/node14/1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true - - /@tsconfig/node16/1.0.3: - resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} - dev: true - - /@types/chai/4.3.1: - resolution: {integrity: sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==} - dev: true - - /@types/mocha/9.1.1: - resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} - dev: true - - /@types/node/18.0.6: - resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==} - dev: true - - /@ungap/promise-all-settled/1.1.2: - resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} - dev: true - - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - - /acorn/8.7.1: - resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /ansi-colors/4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - dev: true - - /ansi-regex/5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /arg/4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true - - /argparse/2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /assertion-error/1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /brace-expansion/2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /browser-stdout/1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true - - /camelcase/6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true - - /chai/4.3.6: - resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} - engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 3.0.1 - get-func-name: 2.0.0 - loupe: 2.3.4 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - - /chalk/4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - - /check-error/1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} - dev: true - - /chokidar/3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /cliui/7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: true - - /create-require/1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true - - /debug/4.3.4_supports-color@8.1.1: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true - - /decamelize/4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - dev: true - - /deep-eql/3.0.1: - resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} - engines: {node: '>=0.12'} - dependencies: - type-detect: 4.0.8 - dev: true - - /diff/4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true - - /diff/5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} - engines: {node: '>=0.3.1'} - dev: true - - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp/4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /find-up/5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /flat/5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true - - /fs.realpath/1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /get-caller-file/2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-func-name/2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - dev: true - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true - - /he/1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: true - - /inflight/1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: true - - /is-extglob/2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-fullwidth-code-point/3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-plain-obj/2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true - - /is-unicode-supported/0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - dev: true - - /js-yaml/4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /locate-path/6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /log-symbols/4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - dev: true - - /loupe/2.3.4: - resolution: {integrity: sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==} - dependencies: - get-func-name: 2.0.0 - dev: true - - /make-error/1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - - /minimatch/3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimatch/5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /mocha/10.0.0: - resolution: {integrity: sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==} - engines: {node: '>= 14.0.0'} - hasBin: true - dependencies: - '@ungap/promise-all-settled': 1.1.2 - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.4_supports-color@8.1.1 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.0.1 - ms: 2.1.3 - nanoid: 3.3.3 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.2.1 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - dev: true - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - - /ms/2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /nanoid/3.3.3: - resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /once/1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /p-limit/3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate/5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /path-exists/4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute/1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /pathval/1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /randombytes/2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /readdirp/3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /require-directory/2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /serialize-javascript/6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - dependencies: - randombytes: 2.1.0 - dev: true - - /string-width/4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - - /strip-ansi/6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-json-comments/3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - - /supports-color/8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: true - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /ts-node/10.9.1_tdn3ypgnfy6bmey2q4hu5jonwi: - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 18.0.6 - acorn: 8.7.1 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 4.7.4 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - - /type-detect/4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true - - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /v8-compile-cache-lib/3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true - - /workerpool/6.2.1: - resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} - dev: true - - /wrap-ansi/7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrappy/1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /y18n/5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yargs-parser/20.2.4: - resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} - engines: {node: '>=10'} - dev: true - - /yargs-unparser/2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - dev: true - - /yargs/16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.4 - dev: true - - /yn/3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - - /yocto-queue/0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true diff --git a/common/src/algorithms/movement.spec.ts b/common/src/algorithms/movement.spec.ts deleted file mode 100644 index 8c01e1f..0000000 --- a/common/src/algorithms/movement.spec.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { Board } from "../types/GameBoard"; -import { expect } from "chai"; -import "mocha"; - -import { countShips, shipLocation } from "./movement"; - -function stringifyBoard(b: Board) { - return ( - b.singularity.join(`\t`) - + ` > ` - + [...b.path].map(x => x != null ? x : `-`).join(`\t`) - + ` > ` - + b.warpgate.join(`\t`) - ); -}; - - -describe("The shipLocation function", () => { - - const tests = [ - { - name: `Should correctly identify the singularity location`, - args: ["a"], - input: { - singularity: ["a"], - path: [], - warpgate: [], - }, - expect: "singularity", - }, - { - name: `Should correctly identify the path location`, - args: ["a"], - input: { - singularity: [], - path: ["a"], - warpgate: [], - }, - expect: "path", - }, - { - name: `Should correctly identify the warpgate location`, - args: ["a"], - input: { - singularity: [], - path: [], - warpgate: ["a"], - }, - expect: "warpgate", - }, - { - name: `Should correctly identify the ship doesn't exist`, - args: ["a"], - input: { - singularity: [], - path: [], - warpgate: [], - }, - expect: null, - }, - ]; - - for (const test of tests) { - it(test.name, () => { - let b = JSON.parse(JSON.stringify(test.input)); - - let location = shipLocation(b, test.args[0]); - expect(location).to.equal(test.expect); - }); - }; -}); - - -describe("The countShips function", () => { - - const tests = [ - { - name: `shouldn't could ships in the singularity or warpgate`, - args: [3], - input: { - singularity: ["a"], - path: [null, null, null, "b", null, null, null], - warpgate: ["c"], - }, - shouldError: false, - expect: { left: 0, right: 0 }, - }, - { - name: `should count the ships in the path correctly when location is in the middle`, - args: [3], - input: { - singularity: ["a"], - path: ["d", null, "c", "b", null, null, "e"], - warpgate: [], - }, - shouldError: false, - expect: { left: 2, right: 1 }, - }, - { - name: `should count the ships in the path correctly when location is on the low edge`, - args: [0], - input: { - singularity: ["a"], - path: ["d", null, "c", "b", null, null, "e"], - warpgate: [], - }, - shouldError: false, - expect: { left: 0, right: 3 }, - }, - { - name: `should count the ships in the path correctly when location is on the high edge`, - args: [6], - input: { - singularity: ["a"], - path: ["d", null, "c", "b", null, null, "e"], - warpgate: [], - }, - shouldError: false, - expect: { left: 3, right: 0 }, - }, - { - name: `should error when location is negative`, - args: [-1], - input: { - singularity: [], - path: ["d", null, "c", "b", null, null, "e"], - warpgate: [], - }, - expect: new Error("location can't be negative"), - }, - { - name: `should error when location is too high`, - args: [100], - input: { - singularity: [], - path: ["d", null, "c", "b", null, null, "e"], - warpgate: [], - }, - expect: new Error("location can't be larger than the path"), - }, - ]; - - for (const test of tests) { - it(test.name, () => { - let b = JSON.parse(JSON.stringify(test.input)); - if (test.expect instanceof Error) { - expect(countShips(b, test.args[0])).to.throw(test.expect); - } else { - - let count = countShips(b, test.args[0]); - expect(count).to.have.all.keys(Object.keys(test.expect)); - expect(count.left).to.equal(test.expect.left); - expect(count.right).to.equal(test.expect.right); - }; - }); - }; -}); \ No newline at end of file diff --git a/common/src/algorithms/movement.ts b/common/src/algorithms/movement.ts deleted file mode 100644 index 68314b5..0000000 --- a/common/src/algorithms/movement.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { FuelCard } from "../index"; -import { GamePiece, Board } from "../index"; - - -/** @internal */ -export function shipLocation(board: Board, ship: GamePiece) { - if (board.path.includes(ship)) { - return "path"; - }; - if (board.singularity.includes(ship)) { - return "singularity"; - }; - if (board.warpgate.includes(ship)) { - return "warpgate"; - }; - return null; -}; - - -/** @internal */ -export function countShips(board: Board, location: number) { - - if (location < 0) { - throw new Error("location can't be negative"); - }; - if (location > board.path.length) { - throw new Error("location can't be larger than the path"); - }; - - let left = 0; - if (location > 0) { - left = board.path.slice(0, location - 1).filter(x => x != null).length; - }; - - return { - left, - right: board.path.slice(location + 1).filter(x => x != null).length, - }; -}; - - -/** @internal */ -export function determineDirection(board: Board, location: number): number { - - /* - Edge-Case check for when the board only has a single ship on it because any - ships that hit the warp gate get removed from the game, and ships in the - singularity don't create gravity wells, not affecting other ships. - */ - let shipCount = 0; - for (const location of board.path) { - if (location != null) { - shipCount++; - if (shipCount >= 2) { - break; - }; - }; - }; - if (shipCount <= 1) { - return 1; - }; - - let delta = 1; - while (true) { - if (location - delta < 0) { - return 1; - } else if (location + delta >= board.path.length) { - return -1; - } else { - let left = board.path[location - delta]; - let right = board.path[location + delta]; - - if (left != null && right != null) { - let sum = countShips(board, location) - return Math.sign(sum.right - sum.left); - } else if (left != null) { - return -1; - } else if (right != null) { - return 1; - }; - - delta++; - }; - }; -}; - - -/** @internal */ -export function tractorBeam(board: Board, ship: GamePiece, card: FuelCard) { - let delta = 0; - - while (true) { - delta++; - - let behind = origin - delta; - let ahead = origin + delta; - - let negativeNewPosition = behind; - let positiveNewPosition = ahead; - let behindShip = board[behind]; - let aheadShip = board[ahead]; - - /* - Check for a ship behind the origin, if there is a ship there then pull - it towards the origin (forwards). If it were to collide with another - ship, then drift until it no longer collides. - */ - if ( - behind >= 0 - && behindShip != null - ) { - let localMagnitude = magnitude; - while (board[behind + localMagnitude] != null) { - localMagnitude++; - }; - negativeNewPosition = behind + localMagnitude; - board[behind] = null; - }; - - /* - Check for a ship ahead of the origin, if there is a ship there then - pull it towards the origin (backwards). If it were to collide with - another ship, then drift until it no longer collides. - */ - if ( - ahead < board.length - && aheadShip - ) { - let localMagnitude = magnitude; - while (board[ahead - localMagnitude] != null) { - localMagnitude++; - }; - positiveNewPosition = ahead - localMagnitude; - board[ahead] = null; - }; - - // Simultaneous movement - if (aheadShip) { - board[positiveNewPosition] = aheadShip; - }; - if (behindShip) { - board[negativeNewPosition] = behindShip; - }; - - - if (behind < 0 && ahead >= board.length) { - break; - }; - }; -}; - - -/** @internal */ -export function moveShip(board: Board, ship: GamePiece, card: FuelCard) { - let locale = shipLocation(board, ship); - if (locale == "singularity") { - let newPos = card.magnitude; - - // Used a purple card for some reason... - if (newPos < 0) { return }; - board.path[card.magnitude] = ship; - } - else if (locale == "path") { - let oldPos = board.path.indexOf(ship); - let direction = determineDirection(board, oldPos) - let newPos = oldPos * direction * card.magnitude; - - if (newPos < 0) { - board.singularity.push(ship); - board.path[oldPos] = null; - } else if (newPos >= board.path.length) { - board.warpgate.push(ship); - board.path[oldPos] = null; - } else { - // Drift the ship - while (board.path[newPos] != null) { - newPos += direction; - }; - board.path[oldPos] = null; - board.path[newPos] = ship; - }; - }; -}; - - -/** - * Applies a card to the board as it was played by the ship. This modifies the - * board in-place, if wanting to not modify the board in place, pass a deep-copy - * of the board into the function. - * - * @param board The game board - * @param ship The ship that is playing the card - * @param card The card that is being played - */ -export function processCard(board: Board, ship: GamePiece, card: FuelCard) { - if (card.type == "movement") { - moveShip(board, ship, card); - } else { - tractorBeam(board, ship, card); - }; -}; \ No newline at end of file diff --git a/common/src/algorithms/movementDirection.spec.ts b/common/src/algorithms/movementDirection.spec.ts deleted file mode 100644 index 13d5aa2..0000000 --- a/common/src/algorithms/movementDirection.spec.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { countShips, determineDirection } from "./movementDirection" -import { expect } from "chai"; -import "mocha"; - -describe("The countShips function", () => { - it("should count the ships correctly when unbalanced", () => { - let r = countShips(["p3", null, "p1", "p2", null, "p4"], 2); - expect(r).to.have.keys(`left`, `right`); - expect(r.left).to.equal(1); - expect(r.right).to.equal(2); - }); - - it("should count the ships correctly when balanced", () => { - let r = countShips(["p3", null, "p1", "p2", null], 2); - expect(r).to.have.keys(`left`, `right`); - expect(r.left).to.equal(1); - expect(r.right).to.equal(1); - }); - - it("should count the ships correctly when shipLocation is at the start of the array", () => { - let r = countShips(["p3", null, "p1", "p2", null], 0); - expect(r).to.have.keys(`left`, `right`); - expect(r.left).to.equal(0); - expect(r.right).to.equal(2); - }); - - it("should count the ships correctly when shipLocation is at the end of the array", () => { - let r = countShips(["p3", null, "p1", "p2", null, "p4"], 5); - expect(r).to.have.keys(`left`, `right`); - expect(r.left).to.equal(3); - expect(r.right).to.equal(0); - }); - - it("should throw an error when shipLocation is larger than length", () => { - try { - countShips(["p3", null, "p1", "p2", null, "p4"], 8); - throw "Function didn't throw an error"; - } catch (_) {} - }); - - it("should throw an error when shipLocation is less than 0", () => { - try { - countShips(["p3", null, "p1", "p2", null, "p4"], -3); - throw "Function didn't throw an error"; - } catch (_) {} - }); -}); - -describe("The determineDirection function", () => { - - it("should return positive when no other ships present (0-index)", () => { - let b = [ - "p1", null, null, null, null, - null, null, null, null, null, - null, null, null, null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when no other ships present (low-index)", () => { - let b = [ - null, null, "p1", null, null, - null, null, null, null, null, - null, null, null, null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when no other ships present (mid-index)", () => { - let b = [ - null, null, null, null, null, - null, null, "p1", null, null, - null, null, null, null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when no other ships present (high-index)", () => { - let b = [ - null, null, null, null, null, - null, null, null, null, null, - null, null, "p1", null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when no other ships present (max-index)", () => { - let b = [ - null, null, null, null, null, - null, null, null, null, null, - null, null, null, null, "p1", - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return negative when the only other ship is at a lower index", () => { - let b = [ - null, "p2", null, null, null, - null, null, "p1", null, null, - null, null, null, null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.lessThan(0); - }); - - it("should return negative when the closest ship is on the 0th index", () => { - let b = [ "p2", null, "p1", null, null, "p3", null ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.lessThan(0); - }); - - it("should return negative when the closest ship is on the highest index", () => { - let b = [ null, "p2", null, null, "p1", null, "p3" ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when the only other ship is at a higher index", () => { - let b = [ - null, null, null, null, null, - null, null, "p1", null, null, - null, null, null, "p2", null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - - it("should return positive when the closest ship is at a higher index", () => { - let b = [ - null, "p3", null, null, null, - null, null, "p1", null, null, - null, null, "p2", null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return negative when the closest ship is at a lower index", () => { - let b = [ - null, null, "p3", null, null, - null, null, "p1", null, null, - null, null, null, "p2", null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.lessThan(0); - }); - - it("should return 0 when there is a tie between the closest ships (no extra ships)", () => { - let b = [ - null, null, "p3", null, null, - null, null, "p1", null, null, - null, null, "p2", null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.equal(0); - }); - - it("should return negative when there is a tie between the closest ships (extra ships in negative direction)", () => { - let b = [ - null, "p4", "p3", null, null, - null, null, "p1", null, null, - null, null, "p2", null, null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.lessThan(0); - }); - - it("should return positive when there is a tie between the closest ships (extra ships in positive direction)", () => { - let b = [ - null, null, "p3", null, null, - null, null, "p1", null, null, - null, null, "p2", "p4", null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.be.greaterThan(0); - }); - - it("should return positive when there is a tie between the closest ships (extra ships tied)", () => { - let b = [ - null, "p5", "p3", null, null, - null, null, "p1", null, null, - null, null, "p2", "p4", null, - ]; - let p = b.findIndex(x => x == "p1"); - expect(determineDirection(b, p)).to.equal(0); - }); -}); \ No newline at end of file diff --git a/common/src/algorithms/movementDirection.ts b/common/src/algorithms/movementDirection.ts deleted file mode 100644 index cc3ca05..0000000 --- a/common/src/algorithms/movementDirection.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @internal - * A helper method for counting how many ships are on each side of a specific - * ship on the board. - * - * @param board The array of spaces that represents the Gravwell board - * @param shipLocation The index of the ship that we are counting the number of - * ships on each side for. - * @returns An object containing the number of ships that are on each side of - * the target ship - */ -export function countShips(board: any[], shipLocation: number) { - if (shipLocation < 0) { - throw new Error("shipLocation must be >= 0"); - }; - - // Ensure that when shipLocation we don't assume all ships are to the left - // of it due to negative indexing in .slice() being supported - let left = 0; - if (shipLocation > 0) { - left = board.slice(0, shipLocation - 1).filter(x => x != null).length; - }; - - return { - left, - right: board.slice(shipLocation + 1).filter(x => x != null).length - }; -}; - -/** - * The algorithm to determine which direction the closest ship is, this uses an - * integer that can be multiplied by the player's fuel card magnitude in order - * to determine the delta for the board index. - * - * --- - * - * Possible Return Values: - * - `-1` = Away from the Warp Gate - * - `0` = Not moving - * - `1` = Towards the Warp Gate - */ -export function determineDirection(board: any[], shipLocation: number) { - - /* - Edge-Case check for when the board only has a single ship on it because any - ships that hit the warp gate get removed from the game, and ships in the - singularity don't create gravity wells, not affecting other ships. - */ - let shipCount = 0; - for (const location of board) { - if (location != null) { - shipCount++; - if (shipCount >= 2) { - break; - }; - }; - }; - if (shipCount <= 1) { - return 1; - }; - - - let delta = 1; - while (true) { - // The left side of the board is out of range, nearest ship is always - // right - if (shipLocation - delta < 0) { - return 1; - } - - // The right side of the board is out of range, nearest ship is always - // left - else if (shipLocation + delta >= board.length) { - return -1; - } - - // Both sides are still in range, continue - else { - - let left = board[shipLocation - delta]; - let right = board[shipLocation + delta]; - - // Nearest ships are equidistant, fallback to sum - if (left != null && right != null) { - let sum = countShips(board, shipLocation); - - // More ships on the left, going backwards - if (sum.left > sum.right) { - return -1; - } - - // more ships on the right, going forward - else if (sum.left < sum.right) { - return 1; - } - - // Equal number of ships, staying still - else { - return 0; - }; - } - - // Left side of ship is closer - else if (left != null) { - return -1; - } - - // Right side of ship is closer - else if (right != null) { - return 1; - }; - delta++; - }; - }; -}; \ No newline at end of file diff --git a/common/src/algorithms/processCard.spec.ts b/common/src/algorithms/processCard.spec.ts deleted file mode 100644 index 37eba34..0000000 --- a/common/src/algorithms/processCard.spec.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { tractorBeam, moveShip } from "./processCard"; -import { Board } from "../types/GameBoard"; -import { expect } from "chai"; -import "mocha"; -import { FuelCard } from "../types/FuelCard"; - -function stringifyBoard(b: Board) { - return [...b].map(x => x != null ? x : `-`).join(`\t`); -}; - -interface BaseTest { - name: string; - input: Board; - expect: Board; -} - -interface tractorTest extends BaseTest { - args: [number, number]; -} - -interface moveTest extends BaseTest { - args: [number, FuelCard] | [number]; -} - -describe("The tractorBeam function", () => { - - const tests: tractorTest[] = [ - { - name: `should move the ships closer when equidistant`, - args: [4, 1], - input: [ null, "p1", null, null, "p2", null, null, "p3", null ], - expect: [ null, null, "p1", null, "p2", null, "p3", null, null ] - }, - { - name: `should move the ships closer when not equidistant`, - args: [4, 1], - input: [ null, "p1", null, null, "p2", null, null, null, "p3" ], - expect: [ null, null, "p1", null, "p2", null, null, "p3", null ] - }, - { - name: `should move the ships closer when only on the left side`, - args: [4, 1], - input: [ null, "p1", null, null, "p2", null, null, null, null ], - expect: [ null, null, "p1", null, "p2", null, null, null, null ] - }, - { - name: `should move the ships closer when only on the right side`, - args: [4, 1], - input: [ null, null, null, null, "p2", null, null, "p3", null ], - expect: [ null, null, null, null, "p2", null, "p3", null, null ] - }, - { - name: `should move the ships closer when pulling the ship from the left edge`, - args: [4, 1], - input: [ "p1", null, null, null, "p2", null, null, null, null ], - expect: [ null, "p1", null, null, "p2", null, null, null, null ] - }, - { - name: `should move the ships closer when pulling the ship from the right edge`, - args: [4, 1], - input: [ null, null, null, null, "p2", null, null, null, "p3" ], - expect: [ null, null, null, null, "p2", null, null, "p3", null ] - }, - { - name: `should move the ship closer when the origin is on the left edge`, - args: [0, 1], - input: [ "p1", null, null, null, "p2", null, null, null, null ], - expect: [ "p1", null, null, "p2", null, null, null, null, null ] - }, - { - name: `should move the ship closer when the origin is on the right edge`, - args: [8, 1], - input: [ null, null, null, null, "p2", null, null, null, "p1" ], - expect: [ null, null, null, null, null, "p2", null, null, "p1" ] - }, - { - name: `should move the ship correctly when it needs to drift (single ship drift)`, - args: [4, 1], - input: [ null, null, null, "p1", "p2", null, null, null, null ], - expect: [ null, null, null, null, "p2", "p1", null, null, null ] - }, - { - name: `should move the ship correctly when it needs to drift (multi-ship drift)`, - args: [4, 1], - input: [ null, null, null, "p1", "p2", null, "p3", null, null ], - expect: [ null, null, null, "p3", "p2", "p1", null, null, null ] - }, - { - name: `should move the ship correctly when it needs to drift (multi-ship drift unbalanced)`, - args: [4, 1], - input: [ null, null, null, "p1", "p2", null, "p3", "p4", null ], - expect: [ null, null, null, "p3", "p2", "p1", "p4", null, null ] - }, - { - name: `should move the ship correctly when it needs to cross-over`, - args: [4, 1], - input: [ null, null, null, "p1", "p2", "p3", null, null, null ], - expect: [ null, null, null, "p3", "p2", "p1", null, null, null ] - }, - ]; - - for (const test of tests) { - it(test.name, () => { - let b = [...test.input]; - tractorBeam(b, ...test.args); - expect(b).to.have.length(test.expect.length); - expect(stringifyBoard(b)).to.equal(stringifyBoard(test.expect)); - }); - }; -}); - - -describe.only("The moveShip function [non-repulsor tests]", () => { - const tests: moveTest[] = [ - { - name: `should move forward when no other ships present`, - args: [2], - input: [ null, null, "p1", null, null, null, null ], - expect: [ null, null, null, "p1", null, null, null ], - }, - { - name: `should move forwards when closest is ahead of the ship`, - args: [0], - input: [ "p1", null, "p2" ], - expect: [ null, "p1", "p2" ], - }, - { - name: `should move backwards when closest is behind the ship`, - args: [2], - input: [ "p2", null, "p1" ], - expect: [ "p2", "p1", null ], - }, - { - name: `should drift forwards over a single ship`, - args: [2], - input: [ null, null, "p1", "p2", null, null, null, ], - expect: [ null, null, null, "p2", "p1", null, null, ], - }, - { - name: `should drift backwards over a single ship`, - args: [4], - input: [ null, null, null, "p2", "p1", null, null, ], - expect: [ null, null, "p1", "p2", null, null, null, ], - }, - { - name: `should drift forwards over multiple ships`, - args: [2], - input: [ null, null, "p1", "p2", "p3", null, null, ], - expect: [ null, null, null, "p2", "p3", "p1", null, ], - }, - { - name: `should drift backwards over multiple ships`, - args: [4], - input: [ null, null, "p3", "p2", "p1", null, null, ], - expect: [ null, "p1", "p3", "p2", null, null, null, ], - }, - { - name: `shouldn't affect other ships`, - args: [4], - expect: [ null, "p2", null, null, "p1", null, "p3" ], - input: [ null, "p2", null, null, null, "p1", "p3" ], - }, - { - name: `should move away from lower the edge going forwards`, - args: [0], - input: [ "p1", null, "p2", null ], - expect: [ null, "p1", "p2", null ], - }, - { - name: `should move away from upper the edge going backwards`, - args: [3], - input: [ null, "p2", null, "p1" ], - expect: [ null, "p2", "p1", null ], - }, - ]; - - for (const test of tests) { - it(test.name, () => { - let b = [...test.input]; - - if (test.args.length == 1) { - moveShip( - b, - test.args[0], - { - "magnitude": 1, - "symbol": "Ar", - "name": "Argon", - "type": "movement" - } - ); - } else { - moveShip(b, ...test.args); - }; - - expect(b).to.have.length(test.expect.length); - expect(stringifyBoard(b)).to.equal(stringifyBoard(test.expect)); - }); - }; -}); - -describe.only("The moveShip function [repulsor tests]", () => { - const tests: moveTest[] = [ - { - name: `should move backwards when no other ships present`, - args: [3], - input: [ null, null, null, "p1", null, null, null ], - expect: [ null, null, "p1", null, null, null, null ], - }, - ]; - - for (const test of tests) { - it(test.name, () => { - let b = [...test.input]; - if (test.args.length == 1) { - moveShip( - b, - test.args[0], - { - "magnitude": -1, - "symbol": "Ol", - "name": "Oliverium", - "type": "movement" - } - ); - } else { - moveShip(b, ...test.args); - }; - expect(b).to.have.length(test.expect.length); - expect(stringifyBoard(b)).to.equal(stringifyBoard(test.expect)); - }); - }; -}) \ No newline at end of file diff --git a/common/src/algorithms/processCard.ts b/common/src/algorithms/processCard.ts deleted file mode 100644 index e608629..0000000 --- a/common/src/algorithms/processCard.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { determineDirection } from "./movementDirection"; -import { Board, GamePiece } from "../types/GameBoard"; -import { FuelCard } from "../types/FuelCard"; - -/** @internal */ -export function tractorBeam(board: Board, origin: number, magnitude: number) { - let delta = 0; - - while (true) { - delta++; - - let behind = origin - delta; - let ahead = origin + delta; - - let negativeNewPosition = behind; - let positiveNewPosition = ahead; - let behindShip = board[behind]; - let aheadShip = board[ahead]; - - /* - Check for a ship behind the origin, if there is a ship there then pull - it towards the origin (forwards). If it were to collide with another - ship, then drift until it no longer collides. - */ - if ( - behind >= 0 - && behindShip != null - ) { - let localMagnitude = magnitude; - while (board[behind + localMagnitude] != null) { - localMagnitude++; - }; - negativeNewPosition = behind + localMagnitude; - board[behind] = null; - }; - - /* - Check for a ship ahead of the origin, if there is a ship there then - pull it towards the origin (backwards). If it were to collide with - another ship, then drift until it no longer collides. - */ - if ( - ahead < board.length - && aheadShip - ) { - let localMagnitude = magnitude; - while (board[ahead - localMagnitude] != null) { - localMagnitude++; - }; - positiveNewPosition = ahead - localMagnitude; - board[ahead] = null; - }; - - // Simultaneous movement - if (aheadShip) { - board[positiveNewPosition] = aheadShip; - }; - if (behindShip) { - board[negativeNewPosition] = behindShip; - }; - - - if (behind < 0 && ahead >= board.length) { - break; - }; - }; -}; - -/** @internal */ -export function moveShip(board: Board, origin: number, fuel: FuelCard) { - let direction = determineDirection(board, origin); - if (direction == 0) { return }; - - let newIndex = origin + ( fuel.magnitude * direction ); - while (board[newIndex] != null) { - newIndex += direction; - }; - - board[newIndex] = board[origin]; - board[origin] = null; -}; - -export function processCard(board: Board, shipLocation: number, fuel: FuelCard) {}; \ No newline at end of file diff --git a/common/src/data/colours.ts b/common/src/data/colours.ts deleted file mode 100644 index 9cd33c8..0000000 --- a/common/src/data/colours.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IColour } from "../types/Colour"; - -/** - * The colours that can be used by the user to make their ship unique. Each - * player is assigned a random, unused, colour when they join the lobby. - */ -export const colours: IColour[] = [ - { name: "Green", hex: "#00aa00" }, - { name: "Blue", hex: "#0077b6" }, - { name: "Red", hex: "#cb0b0a" }, - { name: "Purple", hex: "#7400b8" }, - { name: "Orange", hex: "#faa307" }, - { name: "Light Green", hex: "#9ef01a" }, - { name: "Magenta", hex: "#b7094c" }, - { name: "Pink", hex: "#f72585" }, - { name: "Yellow", hex: "#f9c80e" }, -]; \ No newline at end of file diff --git a/common/src/data/game_options.ts b/common/src/data/game_options.ts deleted file mode 100644 index 84bcd30..0000000 --- a/common/src/data/game_options.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { IGameOption } from "../types/GameOption"; - -/** The options that games can support. */ -export const gameOptions: IGameOption[] = [ - { - name: `No Secrets`, - id: `no-secrets`, - active: false, - hidden: true, - description: `During the mining phase of each round, all cards remain face up, including the piles that are available for choosing from and the cards each player has chosen, stay visible until the Movement Phase begins.`, - }, - { - name: `Warp Gate Activated`, - id: `warp-gate-activated`, - active: false, - hidden: false, - description: `With this option enabled, when a spaceship enters the Warp Gate space (#54), it is immediately removed from the game, but the Warp Gate remains open. This allows more spaceships to enter the gate before the end of the round, any additional spaceships that enter the Warp Gate before the round ends share in the victory because they escaped from the black hole.`, - }, - { - name: `Chaos Theory`, - id: `chaos-theory`, - active: false, - hidden: false, - description: `The first card played during each movement phase is chosen randomly. You still have the opportunity to use your Emergency Stop if you have it available.`, - }, - { - name: `Hardcore`, - id: `hardcore`, - active: false, - hidden: false, - description: `When Hardcore Mode is enabled, you can only use the Emergency Stop one time for the entire game!`, - }, - { - name: `Fate`, - id: `fate`, - active: false, - hidden: true, - description: `Every player must decide on the order that their cards will be played in prior to the first movement happening in the round. Then the cards will be resolved as normal, but with the player not being able to dynamically react. The Emergency Stop is able to be used as normal.`, - }, -]; \ No newline at end of file diff --git a/common/src/data/spaceships.ts b/common/src/data/spaceships.ts deleted file mode 100644 index 6b288db..0000000 --- a/common/src/data/spaceships.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ISpaceship } from "../types/Spaceship"; - -/** - * The spaceships that are supported in the system, the "id" property **must** - * exist in the spaceship.svelte file as an icon. The first icon in this list - * will be used by the server to assign new players' ship icon. - */ -export const spaceships: ISpaceship[] = [ - { - name: "Space Shuttle", - id: "space-shuttle" - }, - { - name: "Rocket", - id: "rocket" - }, - { - name: "Sailboat", - id: "sailboat" - }, -]; \ No newline at end of file diff --git a/common/src/enums/Status.ts b/common/src/enums/Status.ts deleted file mode 100644 index f6918be..0000000 --- a/common/src/enums/Status.ts +++ /dev/null @@ -1,34 +0,0 @@ -export enum Status { - /** The request was successful */ - Success = 200, - - /** - * The request contains malformed data and cannot be processed. - */ - BadRequest = 400, - - /** - * Some data is out of date and needs to be updated before another request - * can be made. Check the "message" for additional information. - */ - OutOfDate = 401, - - /** - * The resource that is being requested cannot be accessed at the current - * point in time for some reason. Check the "message" for additional details. - */ - Forbidden = 403, - - /** - * Something in the request couldn't be found. Check the "message" for - * additional information. - */ - NotFound = 404, - - /** - * Something went wrong in the server that we don't have a more specific - * error for. Check the "message" for additional details. This may be - * fixable by the client who made the request, it may not be. - */ - UnknownError = 500, -} \ No newline at end of file diff --git a/common/src/index.ts b/common/src/index.ts deleted file mode 100644 index 876227f..0000000 --- a/common/src/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Enums - export { Status } from "./enums/Status"; - -// Algorithms - export * from "./algorithms/processCard"; - export * from "./algorithms/movementDirection"; - -// Data - export * from "./data/colours"; - export * from "./data/spaceships"; - export * from "./data/game_options"; - -// Data Structures - export * from "./types/Colour"; - export * from "./types/FuelCard"; - export * from "./types/GameBoard"; - export * from "./types/Spaceship"; - export * from "./types/PlayerData"; - export * from "./types/GameOption"; - -// Server-Client Communications - export * from "./types/ServerResponse"; - export * from "./types/events/server_info"; - - // Lobby events - export * from "./types/events/lobby/info"; - export * from "./types/events/lobby/create"; - export * from "./types/events/lobby/delete"; - export * from "./types/events/lobby/players/join"; - export * from "./types/events/lobby/players/leave"; - export * from "./types/events/lobby/players/update"; \ No newline at end of file diff --git a/common/src/types/Colour.ts b/common/src/types/Colour.ts deleted file mode 100644 index 68d5041..0000000 --- a/common/src/types/Colour.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IColour { - name: string; - hex: string; -} \ No newline at end of file diff --git a/common/src/types/FuelCard.ts b/common/src/types/FuelCard.ts deleted file mode 100644 index dc1f116..0000000 --- a/common/src/types/FuelCard.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface FuelCard { - magnitude: number; - symbol: string; - name: string; - type: "movement" | "stationary"; -} \ No newline at end of file diff --git a/common/src/types/GameBoard.ts b/common/src/types/GameBoard.ts deleted file mode 100644 index 156544a..0000000 --- a/common/src/types/GameBoard.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type GamePiece = string | null; - -export interface Board { - singularity: GamePiece[]; - path: GamePiece[]; - warpgate: GamePiece[]; -} \ No newline at end of file diff --git a/common/src/types/GameOption.ts b/common/src/types/GameOption.ts deleted file mode 100644 index cbd2484..0000000 --- a/common/src/types/GameOption.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * The object structure that represents an option that can be applied to the - * game's logic - */ -export interface IGameOption { - - /** The user-friendly name of the option */ - name: string; - - /** - * The ID that is used in the code to change what options are active in the - * game - */ - id: string; - - /** Whether or not the host has activated this option */ - active: boolean; - - /** - * Whether or not the option should be displayed to the users in the lobby - */ - hidden: boolean; - - /** The description of the option that is put into the info modal. */ - description: string; -} \ No newline at end of file diff --git a/common/src/types/PlayerData.ts b/common/src/types/PlayerData.ts deleted file mode 100644 index 1394c97..0000000 --- a/common/src/types/PlayerData.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { IColour } from "./Colour"; -import { FuelCard } from "./FuelCard"; -import { ISpaceship } from "./Spaceship"; - -/** - * The data structure that represents a Player in the game - */ -export interface PlayerData { - - /** The name the player chose while joining the lobby */ - name: string; - - /** - * The colour that the player's spaceship will be in the game. This must be - * unique among all players, this uniqueness is enforced by the server. - */ - colour: IColour; - - /** The spaceship icon that the player will appear as in-game. */ - ship: ISpaceship; - - /** Whether or not the player is the host of the game. */ - host: boolean; - - /** The unique ID of the player */ - id: string; - - /** The fuel that the player is going to be playing this turn */ - fuel?: FuelCard -} \ No newline at end of file diff --git a/common/src/types/ServerRequest.ts b/common/src/types/ServerRequest.ts deleted file mode 100644 index 457da1b..0000000 --- a/common/src/types/ServerRequest.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** The data that is common to most requests to the server. */ -export interface ServerRequest { - - /** The ID for the game that the action is being taken on. */ - game_code: string; -} \ No newline at end of file diff --git a/common/src/types/ServerResponse.ts b/common/src/types/ServerResponse.ts deleted file mode 100644 index 6f8db1a..0000000 --- a/common/src/types/ServerResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Status } from "../enums/Status"; - -export interface ServerResponse { - - /** The state indicator for responses from the server */ - status: Status; - - /** Additional information that is provided by the server */ - message?: string; -} \ No newline at end of file diff --git a/common/src/types/Spaceship.ts b/common/src/types/Spaceship.ts deleted file mode 100644 index ffb34cb..0000000 --- a/common/src/types/Spaceship.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISpaceship { - name: string; - id: string; -} \ No newline at end of file diff --git a/common/src/types/events/lobby/create.ts b/common/src/types/events/lobby/create.ts deleted file mode 100644 index 5b5233c..0000000 --- a/common/src/types/events/lobby/create.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** The data required for the `lobby.create` event to function correctly. */ -export interface ICreateLobby { - /** The name of the user who is creating the lobby */ - name: string; -} \ No newline at end of file diff --git a/common/src/types/events/lobby/delete.ts b/common/src/types/events/lobby/delete.ts deleted file mode 100644 index ea97df3..0000000 --- a/common/src/types/events/lobby/delete.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ServerRequest } from "../../ServerRequest"; - -/** The data required by the server in order to delete the lobby */ -export interface IDeleteLobby extends ServerRequest {} \ No newline at end of file diff --git a/common/src/types/events/lobby/info.ts b/common/src/types/events/lobby/info.ts deleted file mode 100644 index b2ac872..0000000 --- a/common/src/types/events/lobby/info.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PlayerData } from "../../PlayerData"; -import { ServerResponse } from "../../ServerResponse"; - -/** The data sent as a response to `lobby.info`. */ -export interface ILobbyInfo extends ServerResponse { - /** - * The lobby ID that can be used by clients to connect to the server with. - */ - game_code?: string; - - /** The data associated with each player in the game. */ - players?: PlayerData[]; -} \ No newline at end of file diff --git a/common/src/types/events/lobby/players/join.ts b/common/src/types/events/lobby/players/join.ts deleted file mode 100644 index ad4c736..0000000 --- a/common/src/types/events/lobby/players/join.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ServerRequest } from "../../../ServerRequest"; - -/** The data required for a player to join a game lobby */ -export interface IJoinLobby extends ServerRequest { - - /** The name that the user wants to go by in the game */ - name: string; -} \ No newline at end of file diff --git a/common/src/types/events/lobby/players/leave.ts b/common/src/types/events/lobby/players/leave.ts deleted file mode 100644 index ec36e85..0000000 --- a/common/src/types/events/lobby/players/leave.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ServerRequest } from "../../../ServerRequest"; - -/** The required data for leaving a game, or kicking a player from a game. */ -export interface ILeaveLobby extends ServerRequest { - - /** The name of the player being removed from the lobby */ - name: string; -} \ No newline at end of file diff --git a/common/src/types/events/lobby/players/update.ts b/common/src/types/events/lobby/players/update.ts deleted file mode 100644 index 0d31af8..0000000 --- a/common/src/types/events/lobby/players/update.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IColour } from "../../../Colour"; -import { ServerRequest } from "../../../ServerRequest"; -import { ISpaceship } from "../../../Spaceship"; - -/** The required data for updating a player's information */ -export interface IUpdatePlayer extends ServerRequest { - - /** The name of the player that is being updated. */ - name: string; - - /** The player's spaceship design */ - design: { - /** - * The icon used for the player's space ship. This can be the same for - * multiple players. - */ - ship: ISpaceship; - - /** - * The colour of the user's ship. This is unique across all players, - * meaning all players must have a different colour. - */ - colour: IColour; - }; -} \ No newline at end of file diff --git a/common/src/types/events/server_info.ts b/common/src/types/events/server_info.ts deleted file mode 100644 index a7835af..0000000 --- a/common/src/types/events/server_info.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ServerResponse } from "../ServerResponse"; - -/** The data sent as a response to `server.info`. */ -export interface IServerInfo extends ServerResponse { - /** The version that the server is currently running. */ - version?: string; - - /** The count of how many games are currently stored as active in the Database */ - game_count?: number; -} \ No newline at end of file diff --git a/common/tsconfig.json b/common/tsconfig.json deleted file mode 100644 index 1da33eb..0000000 --- a/common/tsconfig.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./dist", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - - "stripInternal": true - }, - "exclude": [ - "src/**/*.spec.ts", - "esm/**/*", - "cjs/**/*", - "node_modules/**/*" - ] -} diff --git a/docs/events.md b/docs/events.md deleted file mode 100644 index bfbea92..0000000 --- a/docs/events.md +++ /dev/null @@ -1,161 +0,0 @@ -# Events -Every event in this document has two forms, a request and a response, the event -type can be differentiated by the event prefix, `req` is an event going to the -server, and `res` is a response coming from the server to the client. Some events -may only have one of these types, if this is the case, it will be denoted in the -relevant section. - -**Important**: Events with the `Broadcasted` event type, must be listened to -even if you don't send any `Request` events of that type. This is because other -clients connected to the server may trigger the server in such a way that the -event response gets sent to multiple clients. **Broadcasted events will use the** -`res` **event type prefix.** - -Most request payload types inherit from `ServerRequest`, and all response -payloads inherit from the `ServerResponse` type. - ---- - -## `error` -The event that is sent to clients when they cause a significant error to happen -in the server. When this is sent, the status property will never be set to a -value in the success range. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| No | Yes | No - -### Payloads -Request Payload: N/A - -Response Payload: `ServerResponse` ---- - -## `server.info` -Retrieves information about the server that the client is currently connected -to. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No - -### Payloads -Request Payload: N/A - -Response Payload: `IServerInfo` - ---- - -## `lobby.info` -Retrieves information about the lobby. In order for this event to return without -error, the client requesting the information **must** be in the lobby already. -This event is broadcasted to clients who are already in the lobby when the -player list or a player's design gets updated. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | Yes - -### Payloads -Request Payload: `IGetLobbyInfo` - -Response Payload: `ILobbyInfo` - ---- - -## `lobby.create` -Creates a game lobby that allows for online play. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No - -### Payloads -Request Payload: `ICreateLobby` - -Response Payload: `ILobbyInfo` - ---- - -## `lobby.delete` -Deletes the game lobby, clearing all players from the lobby and preventing -others from joining the lobby. This endpoint errors whenever a client that isn't -the host tries to call the endpoint. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | Yes - -### Payloads -Request Payload: `IDeleteLobby` - -Response Payload: `ServerResponse` - ---- - -## `lobby.players.join` -Allows a player to join a lobby based on the lobby identifier. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No, causes `lobby.info` broadcast - -### Payloads -Request Payload: `IJoinLobby` - -Response Payload: `ILobbyInfo` (or `IGameState` if the game is in progress) - ---- - -## `lobby.players.leave` -This allows non-host players to leave the lobby without destroying it entirely. -This endpoint errors when the client that created the lobby attempts to use the -endpoint. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No, causes `lobby.info` broadcast - -### Payloads -Request Payload: `ILeaveLobby` - -Response Payload: `ServerResponse` - ---- - -## `lobby.players.update` -Allows the player to update their own information, this is primarily used for -updating the ship design. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No, causes `lobby.info` broadcast - -### Payloads -Request Payload: `IUpdatePlayer` - -Response Payload: `ServerResponse` - ---- - -## `game.state` -Provides information about the current game state, used to help keep clients in -the correct state. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| No | Yes | Yes - -### Payloads -Request Payload: N/A - -Response Payload: `IGameState` \ No newline at end of file diff --git a/docs/raw_events_list.md b/docs/raw_events_list.md deleted file mode 100644 index 75978cb..0000000 --- a/docs/raw_events_list.md +++ /dev/null @@ -1,27 +0,0 @@ -# Lobby management -Lobby info: `lobby.info` -Create lobby: `lobby.create` -Delete lobby: `lobby.delete` -Join lobby: `lobby.players.join` -leave lobby: `lobby.players.leave` -kick player from lobby: `lobby.players.leave` -change lobby option(s): `lobby.options` -update player data (including ship design): `lobby.players.update` - - -# Informational -server info: `server.info` - - -# In-Game -current game state: `game.state` -alerting the players who's turn it is: `game.turn` -distributing card piles: `game.mining.piles` -picking a card pile: `game.mining.choose` - -asking if player wants to e-stop & response: `game.movement.use-estop` - -telling clients to move a ship: `game.movement.ship` - -round end: `game.round.next` -game finished: `game.finished` (includes what player(s) won) \ No newline at end of file diff --git a/hex.py b/hex.py deleted file mode 100644 index bc0ef9d..0000000 --- a/hex.py +++ /dev/null @@ -1,19 +0,0 @@ -from math import cos, sin, radians - -h = int(input("Total hexagon height allowed: ")) -canvas_size = int(input("SVG size: ")) -move_by = abs(canvas_size - h) / 2 - -m = h // 2 -p = { - "x": 0, - "y": m -} - -print("\nPoints: ") -for _ in range(6): - print(f"{round(p['x'] + m + move_by)},{round(p['y'] + m + move_by)}", end=" ") - x, y = p["x"], p["y"] - p["x"] = round(x*cos(radians(60)) - y*sin(radians(60)), 5) - p["y"] = round(x*sin(radians(60)) + y*cos(radians(60)), 5) -print() \ No newline at end of file diff --git a/server/cards.json b/server/cards.json deleted file mode 100644 index 84a4a18..0000000 --- a/server/cards.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "magnitude": 1, - "symbol": "Ar", - "name": "Argon", - "type": "movement" - }, - { - "magnitude": 2, - "symbol": "B", - "name": "Boron", - "type": "movement" - }, - { - "magnitude": 3, - "symbol": "C", - "name": "Carbon", - "type": "movement" - }, - { - "magnitude": 5, - "symbol": "Dy", - "name": "Dysprosium", - "type": "movement" - }, - { - "magnitude": 2, - "symbol": "Es", - "name": "Einsteinium", - "type": "movement" - }, - { - "magnitude": 6, - "symbol": "F", - "name": "Fluorine", - "type": "movement" - }, - { - "magnitude": 5, - "symbol": "Ga", - "name": "Gallium", - "type": "movement" - }, - { - "magnitude": 4, - "symbol": "H", - "name": "Hydrogen", - "type": "movement" - }, - { - "magnitude": 6, - "symbol": "Ir", - "name": "Iridium", - "type": "movement" - }, - { - "magnitude": 2, - "symbol": "Jo", - "name": "Jodium", - "type": "stationary" - }, - { - "magnitude": -2, - "symbol": "Kr", - "name": "Krypton", - "type": "movement" - }, - { - "magnitude": 4, - "symbol": "Li", - "name": "Lithium", - "type": "movement" - }, - { - "magnitude": 10, - "symbol": "Mg", - "name": "Magnesium", - "type": "movement" - }, - { - "magnitude": -6, - "symbol": "Ne", - "name": "Neon", - "type": "movement" - }, - { - "magnitude": 7, - "symbol": "O", - "name": "Oxygen", - "type": "movement" - }, - { - "magnitude": 5, - "symbol": "Pu", - "name": "Plutonium", - "type": "movement" - }, - { - "magnitude": 3, - "symbol": "Qt", - "name": "Sydnium", - "type": "stationary" - }, - { - "magnitude": 9, - "symbol": "Ra", - "name": "Radium", - "type": "movement" - }, - { - "magnitude": 9, - "symbol": "Si", - "name": "Silicon", - "type": "movement" - }, - { - "magnitude": 2, - "symbol": "Th", - "name": "Thorium", - "type": "movement" - }, - { - "magnitude": -5, - "symbol": "U", - "name": "Uranium", - "type": "movement" - }, - { - "magnitude": 7, - "symbol": "V", - "name": "Vanadium", - "type": "movement" - }, - { - "magnitude": 8, - "symbol": "W", - "name": "Tungsten", - "type": "movement" - }, - { - "magnitude": -3, - "symbol": "Xe", - "name": "Xenon", - "type": "movement" - }, - { - "magnitude": 8, - "symbol": "Y", - "name": "Yttrium", - "type": "movement" - }, - { - "magnitude": 7, - "symbol": "Zr", - "name": "Zirconium", - "type": "movement" - } -] \ No newline at end of file diff --git a/server/events.md b/server/events.md deleted file mode 100644 index c32bf16..0000000 --- a/server/events.md +++ /dev/null @@ -1,50 +0,0 @@ -This is a list of all events that the server must support in order at the bare -minimum for the front-end to work with getting all the data that it needs. - ---- - -`get.game` (incoming) -Get's a game's current information, this includes player list, and options - -`game.info` (outgoing) -The game data that was requested. - ---- - -`delete.game` (incoming) -Deletes a game from the system, kicking all the players from the lobby. - -`game.deleted` (outgoing) -Alert for all the players that the game got deleted and to reset all state. - ---- - -`get.system.colours` (incoming) -Retrieves a list of all colours that are currently supported for players to pick -from for their spaceship. - -`get.system.icons` (incoming) -Retrieves a list of all the supported icons that players can pick from for their -spaceship. - -`system.colours` (outgoing) -The list of all colours that the players can pick from. - -`system.icons` (outgoing) -The list of all the icons that players can pick from. - ---- - -`put.player.design` (incoming) -Updates a player's design that will be used in the game for their spaceship. - -`game.player.update` (outgoing) -Tells everyone in the game that one of the players has updated something about -their data and to refresh the local data to keep it up to date. - ---- - -`put.game.option` (incoming) -Updates the game's options that affect how the game flow works. - ---- \ No newline at end of file diff --git a/server/makefile b/server/makefile deleted file mode 100644 index 454dc93..0000000 --- a/server/makefile +++ /dev/null @@ -1,19 +0,0 @@ -.PHONY: build dev prod test - -build: - tsc - -dev: build - NODE_ENV=development node dist/main.js - -prod: build - NODE_ENV=production node dist/main.js - -rund: - NODE_ENV=development node dist/main.js - -run: - NODE_ENV=production node dist/main.js - -test: - node_modules/mocha/bin/_mocha -r ts-node/register tests/**/*.spec.ts \ No newline at end of file diff --git a/server/package.json b/server/package.json deleted file mode 100644 index 46b6a02..0000000 --- a/server/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "gravwell-online-server", - "version": "1.0.0", - "description": "", - "main": "dist/main.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "tsc", - "start": "node dist/main.js" - }, - "author": "Oliver Akins", - "license": "UNLICENSED", - "dependencies": { - "common": "link:../common", - "glob": "^7.2.0", - "joi": "^17.6.0", - "module-alias": "^2.2.2", - "socket.io": "^4.4.0", - "toml": "^3.0.0", - "tslog": "^3.3.1", - "uuid": "^8.3.2" - }, - "devDependencies": { - "@types/chai": "^4.3.1", - "@types/glob": "^7.2.0", - "@types/mocha": "^9.1.1", - "@types/module-alias": "^2.0.1", - "@types/node": "^18.0.0", - "@types/uuid": "^8.3.4", - "chai": "^4.3.6", - "mocha": "^10.0.0", - "ts-node": "^10.8.1", - "typescript": "^4.7.4" - }, - "_moduleAliases": { - "@": "./dist" - } -} diff --git a/server/pnpm-lock.yaml b/server/pnpm-lock.yaml deleted file mode 100644 index 84b8c0d..0000000 --- a/server/pnpm-lock.yaml +++ /dev/null @@ -1,962 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@types/chai': ^4.3.1 - '@types/glob': ^7.2.0 - '@types/mocha': ^9.1.1 - '@types/module-alias': ^2.0.1 - '@types/node': ^18.0.0 - '@types/uuid': ^8.3.4 - chai: ^4.3.6 - common: link:../common - glob: ^7.2.0 - joi: ^17.6.0 - mocha: ^10.0.0 - module-alias: ^2.2.2 - socket.io: ^4.4.0 - toml: ^3.0.0 - ts-node: ^10.8.1 - tslog: ^3.3.1 - typescript: ^4.7.4 - uuid: ^8.3.2 - -dependencies: - common: link:../common/cjs - glob: 7.2.0 - joi: 17.6.0 - module-alias: 2.2.2 - socket.io: 4.4.0 - toml: 3.0.0 - tslog: 3.3.1 - uuid: 8.3.2 - -devDependencies: - '@types/chai': 4.3.1 - '@types/glob': 7.2.0 - '@types/mocha': 9.1.1 - '@types/module-alias': 2.0.1 - '@types/node': 18.0.0 - '@types/uuid': 8.3.4 - chai: 4.3.6 - mocha: 10.0.0 - ts-node: 10.8.1_qiyc72axg2v44xl4yovan2v55u - typescript: 4.7.4 - -packages: - - /@cspotcode/source-map-support/0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: true - - /@hapi/hoek/9.3.0: - resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} - dev: false - - /@hapi/topo/5.1.0: - resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} - dependencies: - '@hapi/hoek': 9.3.0 - dev: false - - /@jridgewell/resolve-uri/3.0.7: - resolution: {integrity: sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec/1.4.13: - resolution: {integrity: sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==} - dev: true - - /@jridgewell/trace-mapping/0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.0.7 - '@jridgewell/sourcemap-codec': 1.4.13 - dev: true - - /@sideway/address/4.1.4: - resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} - dependencies: - '@hapi/hoek': 9.3.0 - dev: false - - /@sideway/formula/3.0.0: - resolution: {integrity: sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==} - dev: false - - /@sideway/pinpoint/2.0.0: - resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} - dev: false - - /@tsconfig/node10/1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true - - /@tsconfig/node12/1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true - - /@tsconfig/node14/1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true - - /@tsconfig/node16/1.0.3: - resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} - dev: true - - /@types/chai/4.3.1: - resolution: {integrity: sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==} - dev: true - - /@types/component-emitter/1.2.11: - resolution: {integrity: sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==} - dev: false - - /@types/cookie/0.4.1: - resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} - dev: false - - /@types/cors/2.8.12: - resolution: {integrity: sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==} - dev: false - - /@types/glob/7.2.0: - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - dependencies: - '@types/minimatch': 3.0.5 - '@types/node': 18.0.0 - dev: true - - /@types/minimatch/3.0.5: - resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} - dev: true - - /@types/mocha/9.1.1: - resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} - dev: true - - /@types/module-alias/2.0.1: - resolution: {integrity: sha512-DN/CCT1HQG6HquBNJdLkvV+4v5l/oEuwOHUPLxI+Eub0NED+lk0YUfba04WGH90EINiUrNgClkNnwGmbICeWMQ==} - dev: true - - /@types/node/18.0.0: - resolution: {integrity: sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==} - - /@types/uuid/8.3.4: - resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} - dev: true - - /@ungap/promise-all-settled/1.1.2: - resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} - dev: true - - /accepts/1.3.7: - resolution: {integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==} - engines: {node: '>= 0.6'} - dependencies: - mime-types: 2.1.34 - negotiator: 0.6.2 - dev: false - - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - - /acorn/8.7.1: - resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /ansi-colors/4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - dev: true - - /ansi-regex/5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /arg/4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true - - /argparse/2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /assertion-error/1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - /base64-arraybuffer/1.0.1: - resolution: {integrity: sha512-vFIUq7FdLtjZMhATwDul5RZWv2jpXQ09Pd6jcVEOvIsqCWTRFD/ONHNfyOS8dA/Ippi5dsIgpyKWKZaAKZltbA==} - engines: {node: '>= 0.6.0'} - dev: false - - /base64id/2.0.0: - resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} - engines: {node: ^4.5.0 || >= 5.9} - dev: false - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - /brace-expansion/2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /browser-stdout/1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true - - /buffer-from/1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: false - - /camelcase/6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true - - /chai/4.3.6: - resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} - engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 3.0.1 - get-func-name: 2.0.0 - loupe: 2.3.4 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - - /chalk/4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - - /check-error/1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} - dev: true - - /chokidar/3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /cliui/7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - - /component-emitter/1.3.0: - resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} - dev: false - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - - /cookie/0.4.1: - resolution: {integrity: sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==} - engines: {node: '>= 0.6'} - dev: false - - /cors/2.8.5: - resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} - engines: {node: '>= 0.10'} - dependencies: - object-assign: 4.1.1 - vary: 1.1.2 - dev: false - - /create-require/1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true - - /debug/4.3.3: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: false - - /debug/4.3.4_supports-color@8.1.1: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true - - /decamelize/4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - dev: true - - /deep-eql/3.0.1: - resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} - engines: {node: '>=0.12'} - dependencies: - type-detect: 4.0.8 - dev: true - - /diff/4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true - - /diff/5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} - engines: {node: '>=0.3.1'} - dev: true - - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /engine.io-parser/5.0.2: - resolution: {integrity: sha512-wuiO7qO/OEkPJSFueuATIXtrxF7/6GTbAO9QLv7nnbjwZ5tYhLm9zxvLwxstRs0dcT0KUlWTjtIOs1T86jt12g==} - engines: {node: '>=10.0.0'} - dependencies: - base64-arraybuffer: 1.0.1 - dev: false - - /engine.io/6.1.0: - resolution: {integrity: sha512-ErhZOVu2xweCjEfYcTdkCnEYUiZgkAcBBAhW4jbIvNG8SLU3orAqoJCiytZjYF7eTpVmmCrLDjLIEaPlUAs1uw==} - engines: {node: '>=10.0.0'} - dependencies: - '@types/cookie': 0.4.1 - '@types/cors': 2.8.12 - '@types/node': 18.0.0 - accepts: 1.3.7 - base64id: 2.0.0 - cookie: 0.4.1 - cors: 2.8.5 - debug: 4.3.3 - engine.io-parser: 5.0.2 - ws: 8.2.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: false - - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp/4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /find-up/5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /flat/5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true - - /fs.realpath/1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /get-caller-file/2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-func-name/2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - dev: true - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true - - /he/1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: true - - /inflight/1.0.6: - resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: true - - /is-extglob/2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-fullwidth-code-point/3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-plain-obj/2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true - - /is-unicode-supported/0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - dev: true - - /joi/17.6.0: - resolution: {integrity: sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==} - dependencies: - '@hapi/hoek': 9.3.0 - '@hapi/topo': 5.1.0 - '@sideway/address': 4.1.4 - '@sideway/formula': 3.0.0 - '@sideway/pinpoint': 2.0.0 - dev: false - - /js-yaml/4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /locate-path/6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /log-symbols/4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - dev: true - - /loupe/2.3.4: - resolution: {integrity: sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==} - dependencies: - get-func-name: 2.0.0 - dev: true - - /make-error/1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - - /mime-db/1.51.0: - resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==} - engines: {node: '>= 0.6'} - dev: false - - /mime-types/2.1.34: - resolution: {integrity: sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.51.0 - dev: false - - /minimatch/3.0.4: - resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} - dependencies: - brace-expansion: 1.1.11 - - /minimatch/5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /mocha/10.0.0: - resolution: {integrity: sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==} - engines: {node: '>= 14.0.0'} - hasBin: true - dependencies: - '@ungap/promise-all-settled': 1.1.2 - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.4_supports-color@8.1.1 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.0.1 - ms: 2.1.3 - nanoid: 3.3.3 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.2.1 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - dev: true - - /module-alias/2.2.2: - resolution: {integrity: sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==} - dev: false - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - /ms/2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /nanoid/3.3.3: - resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /negotiator/0.6.2: - resolution: {integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==} - engines: {node: '>= 0.6'} - dev: false - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /object-assign/4.1.1: - resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} - engines: {node: '>=0.10.0'} - dev: false - - /once/1.4.0: - resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} - dependencies: - wrappy: 1.0.2 - - /p-limit/3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate/5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /path-exists/4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} - engines: {node: '>=0.10.0'} - - /pathval/1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /randombytes/2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /readdirp/3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /require-directory/2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /serialize-javascript/6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - dependencies: - randombytes: 2.1.0 - dev: true - - /socket.io-adapter/2.3.3: - resolution: {integrity: sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==} - dev: false - - /socket.io-parser/4.0.4: - resolution: {integrity: sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==} - engines: {node: '>=10.0.0'} - dependencies: - '@types/component-emitter': 1.2.11 - component-emitter: 1.3.0 - debug: 4.3.3 - transitivePeerDependencies: - - supports-color - dev: false - - /socket.io/4.4.0: - resolution: {integrity: sha512-bnpJxswR9ov0Bw6ilhCvO38/1WPtE3eA2dtxi2Iq4/sFebiDJQzgKNYA7AuVVdGW09nrESXd90NbZqtDd9dzRQ==} - engines: {node: '>=10.0.0'} - dependencies: - accepts: 1.3.7 - base64id: 2.0.0 - debug: 4.3.3 - engine.io: 6.1.0 - socket.io-adapter: 2.3.3 - socket.io-parser: 4.0.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: false - - /source-map-support/0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: false - - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: false - - /string-width/4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - - /strip-ansi/6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-json-comments/3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - - /supports-color/8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: true - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /toml/3.0.0: - resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} - dev: false - - /ts-node/10.8.1_qiyc72axg2v44xl4yovan2v55u: - resolution: {integrity: sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 18.0.0 - acorn: 8.7.1 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 4.7.4 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - - /tslog/3.3.1: - resolution: {integrity: sha512-An3uyXX95uU/X7v5H6G9OKW6ip/gVOpvsERGJ/nR4Or5TP5GwoI9nUjhNWEc8mJOWC7uhPMg2UzkrVDUtadELg==} - engines: {node: '>=10'} - dependencies: - source-map-support: 0.5.21 - dev: false - - /type-detect/4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true - - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /uuid/8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: false - - /v8-compile-cache-lib/3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true - - /vary/1.1.2: - resolution: {integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=} - engines: {node: '>= 0.8'} - dev: false - - /workerpool/6.2.1: - resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} - dev: true - - /wrap-ansi/7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - - /ws/8.2.3: - resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - - /y18n/5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yargs-parser/20.2.4: - resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} - engines: {node: '>=10'} - dev: true - - /yargs-unparser/2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - dev: true - - /yargs/16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.4 - dev: true - - /yn/3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - - /yocto-queue/0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true diff --git a/server/src/constants.ts b/server/src/constants.ts deleted file mode 100644 index f42b1a6..0000000 --- a/server/src/constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -/** The server's current version */ -export const VERSION = "0.1"; \ No newline at end of file diff --git a/server/src/events/lobby/create.ts b/server/src/events/lobby/create.ts deleted file mode 100644 index 88c7833..0000000 --- a/server/src/events/lobby/create.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Status, ICreateLobby, colours, spaceships } from "common"; -import { WebsocketEvent } from "@/types/WebsocketEvent"; -import { Player } from "@/objects/Player"; -import { Game } from "@/objects/Game"; -import { games } from "@/main"; - -const data: WebsocketEvent = { - name: "req:lobby.create", - handler(_, socket, data: ICreateLobby) { - - // Assert that the user's name conforms to a small subset of unicode to - // help prevent weird errors from occuring due to potentially violating - // strings and running code through the name entry. - if (data.name.match(/[^A-Za-z0-9\_\-]/)) { - socket.emit(`res:lobby.create`, { - success: Status.BadRequest, - message: `Can't use special characters in your name, only A-Z, 0-9, underscores, and dashes are allowed.`, - }); - }; - - // Create the game: - let host = new Player(socket, { - name: data.name, - colour: colours[Math.floor(Math.random() * colours.length)], - ship: spaceships[0], - host: true, - }); - let game = new Game(host); - game.log.info(`New game created by ${data.name}`); - - socket.join(game.id); - socket.emit(`res:lobby.create`, { - status: Status.Success, - game_code: game.id, - players: game.players.map(p => p.json()), - }); - - games.set(game); - games.cleanup(); - }, -}; -export default data; \ No newline at end of file diff --git a/server/src/events/lobby/players/join.ts b/server/src/events/lobby/players/join.ts deleted file mode 100644 index de82ecc..0000000 --- a/server/src/events/lobby/players/join.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { colours, IJoinLobby, spaceships, Status } from "common"; -import { WebsocketEvent } from "@/types/WebsocketEvent"; -import { Player } from "@/objects/Player"; -import { games, log } from "@/main"; - -const data: WebsocketEvent = { - name: "req:lobby.players.join", - handler(_, socket, data: IJoinLobby) { - try { - log.debug(`Attempting to join a game`); - - let gID = data.game_code; - let name = data.name; - - let game = games.get(gID); - - - // Make sure the lobby exists that the player is attempting to connect to - if (!game) { - socket.emit(`res:lobby.players.join`, { - status: Status.NotFound, - message: `Game could not be found with that game code`, - }); - return; - }; - - // Player name unique-ness check - let sameName = game.players.find(p => p.name == name); - if (sameName) { - socket.emit(`res:lobby.players.join`, { - status: Status.Forbidden, - message: `That name is already taken in the lobby, choose another name!`, - }); - return; - }; - - // Make sure the player isn't trying to join a game part-way through - if (game.status !== `lobby`) { - socket.emit(`res:lobby.players.join`, { - status: Status.Forbidden, - message: `Can't join a game that is in-progress.`, - }); - return; - }; - - // Lobby is full already - if (game.players.length >= 4) { - socket.emit(`res:lobby.players.join`, { - status: Status.Forbidden, - message: `Can't join a game that has all 4 spots taken already.`, - }); - return; - }; - - let usedColours = game.players.map(p => p.colour); - let newPlayerColour = null; - do { - newPlayerColour = colours[Math.floor(Math.random() * colours.length)]; - } while (usedColours.includes(newPlayerColour)); - - let player = new Player(socket, { - name, - colour: newPlayerColour, - ship: spaceships[0], - host: false, - }); - - game.players.push(player); - game.log.info(`${name} joined the game`); - socket.join(game.id); - - let playerData = game.players.map(p => p.json()); - socket.emit(`res:lobby.players.join`, { - status: Status.Success, - game_code: game.id, - players: playerData, - }); - socket.to(game.id).emit(`res:lobby.info`, { - status: Status.Success, - players: playerData, - }); - - } catch (err) { - socket.emit(`res:error`, { - status: Status.UnknownError, - message: err.message, - }); - }; - }, -}; -export default data; \ No newline at end of file diff --git a/server/src/events/ping.ts b/server/src/events/ping.ts deleted file mode 100644 index 70f3fad..0000000 --- a/server/src/events/ping.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { WebsocketEvent } from "@/types/WebsocketEvent"; -import { log } from "@/main"; - -const data: WebsocketEvent = { - name: "req:ping", - handler(_, socket) { - log.debug(`Server is being pinged`); - socket.emit(`res:ping`); - }, -}; -export default data; \ No newline at end of file diff --git a/server/src/events/server_info.ts b/server/src/events/server_info.ts deleted file mode 100644 index dff12dc..0000000 --- a/server/src/events/server_info.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { WebsocketEvent } from "@/types/WebsocketEvent"; -import { VERSION } from "@/constants"; -import { games, log } from "@/main"; -import { Status } from "common"; - -const data: WebsocketEvent = { - name: "req:server.info", - handler(_, socket) { - log.debug(`Getting server information`) - - socket.emit( - `res:server.info`, - { - status: Status.Success, - version: VERSION, - game_count: games.count, - } - ); - }, -}; -export default data; \ No newline at end of file diff --git a/server/src/main.ts b/server/src/main.ts deleted file mode 100644 index 3c2ddd3..0000000 --- a/server/src/main.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Filepath alias resolution -import "module-alias/register"; - -import startWebsocketServer from "./websocket"; -import { loadConfig } from "./utils/config"; -import { GameDB } from "./objects/GameDB"; -import { Logger } from "tslog"; - -export const config: IConfig = loadConfig(); - -// Define the logger -export const log = new Logger({ - displayFilePath: "hidden", - displayFunctionName: false, - displayDateTime: true, - displayLoggerName: false, - displayLogLevel: true, - minLevel: config.log.level, -}); - -export const games = new GameDB(); - -startWebsocketServer(); \ No newline at end of file diff --git a/server/src/objects/Deck.ts b/server/src/objects/Deck.ts deleted file mode 100644 index b905ed8..0000000 --- a/server/src/objects/Deck.ts +++ /dev/null @@ -1,72 +0,0 @@ -export class Deck { - private _discard: T[]; - private _unknown: T[]; - private _deck: T[]; - - - constructor(cards: T[]) { - this._deck = cards; - this._discard = []; - this._unknown = []; - }; - - - get size(): number { return this._deck.length; } - - - /** - * Draws X cards from the deck - * - * @param quantity The number of cards to draw - * @throws Error If quantity is <= 0 - * @throws Error If quantity > size - */ - public draw(quantity: number): T[] { - if (quantity <= 0) { - throw new Error(`Cannot get ${quantity} cards.`); - } else if (quantity > this.size) { - throw new Error(`Cannot draw more cards than there are in the deck.`); - }; - - let cards: T[] = []; - - // Draw the cards for the player and move them into the unknown group - for (var i = 0; i < quantity; i++) { - - // Determine the card for the player(s) - let index = Math.floor(Math.random() * this.size); - let card = this._deck[index]; - - // Move it from the arrays - cards.push(card); - this._deck.splice(index, 1); - this._unknown.push(card); - }; - - return cards; - }; - - - /** - * Adds the specific card to the discard pile - * - * @param card The card to add to the discard pile - */ - public discard(card: T) { - if (!this._unknown.includes(card)) { - throw new Error("Cannot discard a card that doesn't exist in the deck"); - }; - this._unknown = this._unknown.filter(x => x != card); - this._discard.push(card); - }; - - - /** - * Resets all of the cards in the deck and puts them back in the draw pile - */ - public reset() { - this._deck.push(...this._discard, ...this._unknown); - this._discard = []; - this._unknown = []; - }; -}; \ No newline at end of file diff --git a/server/src/objects/Game.ts b/server/src/objects/Game.ts deleted file mode 100644 index f98b52a..0000000 --- a/server/src/objects/Game.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { determineDirection, FuelCard } from "common"; -import { config, games, log } from "@/main"; -import { promises as fs } from "fs"; -import { Player } from "./Player"; -import { Logger } from "tslog"; -import { Deck } from "./Deck"; -import path from "path"; - -export class Game { - readonly id: string; - readonly host: Player; - - readonly log: Logger; - - private _status: string; - private _players: Player[]; - private _deck: Deck; - private board: (Player|null)[]; - - - constructor(host: Player) { - - this._status = `lobby`; - - // Setup the board - this.board = new Array(55).fill(null); - this.board[26] = null; - this.board[36] = null; - - // Init the player data - this.host = host; - this._players = [ host ]; - - // Instantiate the deck - this.loadDeck(); - - this.id = Game.generateID(config.game.code_length); - - this.log = log.getChildLogger({ - name: this.id, - displayLoggerName: true, - }); - }; - - /** - * Loads the deck from the data file which contains an array of card - * definitions. - */ - private async loadDeck() { - if (config.game.fuel_deck.type == "file:json") { - let cards = JSON.parse( - await fs.readFile( - path.join(process.cwd(), config.game.fuel_deck.location), - `utf-8` - ) - ); - this._deck = new Deck(cards); - } else { - throw new Error(`Unsupported data format for the cards: "${config.game.fuel_deck.type}"`) - } - }; - - - /** The current status of the game */ - get status() { return this._status; } - - /** The deck of the fuel cards */ - get deck() { return this._deck; }; - - /** A list players of in the game */ - get players() { return this._players; }; - - /** - * The algorithm to determine which direction the closest ship is, this - * uses an integer that can be multiplied by the player's fuel card - * magnitude in order to determine the delta for the board index. - * - * --- - * - * Possible Return Values: - * - `-1` = Away from the Warp Gate (towards the black hole) - * - `0` = Not moving - * - `1` = Towards the Warp Gate (away from the black hole) - */ - public movementDirection(player: Player): number { - let location = this.board.indexOf(player); - this.log.debug(`Calculating movement direction for ${player.name}`); - return determineDirection(this.board, location); - }; - - /** - * Generates a game code with the given length - * - * @param length The length of the code to generate - */ - public static generateID(length: number): string { - let code: string; - - // Prevent erroneous codes from being generated - if (length <= 0) { - throw new Error("Can't code have a length <= 0"); - }; - - // Generate a new code until we find one that isn't taken already. - do { - code = ``; - - for (var i = 0; i < length; i++) { - code += Math.floor(Math.random() * 9); - }; - } while (games.has(code)); - - return code; - } -}; \ No newline at end of file diff --git a/server/src/objects/GameDB.ts b/server/src/objects/GameDB.ts deleted file mode 100644 index 67b00fb..0000000 --- a/server/src/objects/GameDB.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Game } from "./Game"; - -export class GameDB { - private games: {[index: string]: Game}; - - constructor () { - this.games = {}; - }; - - /** Determines if a game exists with the provided ID */ - public has(id: string): boolean { - return this.games[id] != null; - }; - - /** Get's the Game object associated with the provided ID */ - public get(id: string): Game|undefined { - return this.games[id]; - }; - - /** Adds a Game object into the database */ - public set(game: Game): void { - this.games[game.id] = game; - }; - - /** - * This removes all inactive games from the system, this includes any games - * that do not have any currently connected players and are in the lobby - * state. This will not remove any games that are currently in-progress so - * that players can resume the game later if they happened to all get - * disconnected for some reason. - */ - public cleanup(): void {}; - - /** Returns a count of how many games currently exist in the database */ - public get count() { - return Object.keys(this.games).length; - }; -} \ No newline at end of file diff --git a/server/src/objects/Player.ts b/server/src/objects/Player.ts deleted file mode 100644 index 0ef2148..0000000 --- a/server/src/objects/Player.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { PlayerData, IColour, ISpaceship } from "common"; -import { Socket } from "socket.io"; - -export class Player { - readonly name: string; - - // The player's design - public ship: ISpaceship; - public colour: IColour; - - public readonly host: boolean; - - constructor(socket: Socket, data: PlayerData) { - this.name = data.name; - this._socket = socket - this.ship = data.ship; - this.colour = data.colour; - this.host = data.host; - }; - - - // The player's socket data - private _socket: Socket; - - /** The socket that can be used to communicate directly with the player */ - get socket() { return this._socket }; - set socket(value: Socket) { - if (!this._socket?.connected) { - this._socket = value; - } else { - throw Error("Cannot overwrite a player's socket that is connected."); - }; - }; - - /** The properties of the Player object without any of the methods. */ - public json() { - return { - name: this.name, - ship: this.ship, - colour: this.colour, - host: this.host, - }; - }; -}; \ No newline at end of file diff --git a/server/src/types/Config.d.ts b/server/src/types/Config.d.ts deleted file mode 100644 index ca9946f..0000000 --- a/server/src/types/Config.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -interface IConfig { - game: { - code_length: number; - fuel_deck: { - type: "file:json" /* | "file:csv" | "web:json" | "web:csv" */; - location: string; - }; - }; - server: { - port: number; - cors: { - origins: string[]; - }; - }; - log: { - level: "silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"; - }; -} \ No newline at end of file diff --git a/server/src/types/WebsocketEvent.d.ts b/server/src/types/WebsocketEvent.d.ts deleted file mode 100644 index c1fce20..0000000 --- a/server/src/types/WebsocketEvent.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Server, Socket } from "socket.io"; - -export interface WebsocketEvent { - name: string; - handler: (io: Server, socket: Socket, data: any) => any; -} \ No newline at end of file diff --git a/server/src/utils/config.ts b/server/src/utils/config.ts deleted file mode 100644 index 4250dd8..0000000 --- a/server/src/utils/config.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { readFileSync } from "fs"; -import toml from "toml"; -import Joi from "joi"; - -const schema = Joi.object({ - game: Joi.object({ - code_length: Joi.number().integer().positive(), - fuel_deck: Joi.object({ - type: Joi - .string() - .allow( - `file:json`, - // `file:csv`, - // `web:json`, - // `web:csv` - ) - .required(), - location: Joi - .string() - .required(), - }), - }), - server: Joi.object({ - port: Joi - .number() - .port() - .required(), - cors: Joi.object({ - origins: Joi - .array() - .items(Joi.string()), - }), - }), - log: Joi.object({ - level: Joi - .string() - .allow( - `silly`, - `trace`, - `debug`, - `info`, - `warn`, - `error`, - `fatal` - ) - .optional() - .default(`info`), - }), -}); - -export function loadConfig(): IConfig { - const data = toml.parse(readFileSync("config.toml", "utf-8")); - const { value, error } = schema.validate(data, { - abortEarly: false, - }); - - if (error) { - console.error(error); - process.exit(1); - }; - return value; -}; \ No newline at end of file diff --git a/server/src/websocket.ts b/server/src/websocket.ts deleted file mode 100644 index 485c470..0000000 --- a/server/src/websocket.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { log, config } from "./main"; -import { Server } from "socket.io"; - -// Event imports -import Ping from "./events/ping"; -import ServerInfo from "./events/server_info"; -import CreateLobby from "./events/lobby/create"; -import JoinLobby from "./events/lobby/players/join"; - -export default async function() { - log.info("Starting socket.io server..."); - - const io = new Server(); - - io.on("connection", (socket) => { - log.silly(`Socket connected with ID: ${socket.id}`); - - // Metadata Events - socket.on(Ping.name, (data) => Ping.handler(io, socket, data)); - socket.on(ServerInfo.name, (data) => ServerInfo.handler(io, socket, data)); - - // Lobby Management Events - socket.on(CreateLobby.name, (data) => CreateLobby.handler(io, socket, data)); - socket.on(JoinLobby.name, (data) => JoinLobby.handler(io, socket, data)); - }); - - io.listen(config.server.port, { - cors: { - origin: config.server.cors.origins, - credentials: true, - } - }); -}; \ No newline at end of file diff --git a/server/tests/objects/Deck.spec.ts b/server/tests/objects/Deck.spec.ts deleted file mode 100644 index 0ae0230..0000000 --- a/server/tests/objects/Deck.spec.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { expect } from "chai"; -import "mocha"; - -import { Deck } from "../../src/objects/Deck"; - -describe("The Deck object", () => { - var drawSuccess = false; - - - it("should construct properly with strings", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - expect(d.size).to.equal(5); - }); - - it("should construct properly with objects", () => { - let d = new Deck([ - {}, {}, {}, {}, {} - ]); - expect(d.size).to.equal(5); - }); - - it("should draw a single card from the deck properly", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - let c = d.draw(1); - expect(d.size).to.equal(4); - expect(c).to.have.length(1); - expect(c[0]).to.be.a("string"); - expect(c[0]).to.be.oneOf(["1", "2", "3", "4", "5"]); - drawSuccess = true; - }); - - it("should draw multiple cards from the deck properly", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - let draws = 2; - let c = d.draw(draws); - expect(d.size).to.equal(3); - expect(c).to.have.length(draws); - for (var i = 0; i < draws; i++) { - expect(c[i]).to.be.a("string"); - expect(c[i]).to.be.oneOf(["1", "2", "3", "4", "5"]); - }; - }); - - it("should draw all of the cards from the deck properly", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - let draws = 5; - let c = d.draw(draws); - expect(d.size).to.equal(0); - expect(c).to.have.length(draws); - for (var i = 0; i < draws; i++) { - expect(c[i]).to.be.a("string"); - expect(c[i]).to.be.oneOf(["1", "2", "3", "4", "5"]); - }; - }); - - it("should throw an error when -1 cards are drawn", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - try { - d.draw(-1); - throw "draw() didn't error with -1 given"; - } catch (e) {}; - }); - - it("should throw an error when -5 cards are drawn", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - try { - d.draw(-5); - throw "draw() didn't error with -5 given"; - } catch (e) {}; - }); - - it("should throw an error when n+1 cards were requested", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - try { - d.draw(6); - throw "Draw didn't error with 6 given"; - } catch (e) {}; - }); - - it("should throw an error when n+5 cards were requested", () => { - let d = new Deck(["1", "2", "3", "4", "5"]); - try { - d.draw(10); - throw "Draw didn't error with 10 given"; - } catch (e) {}; - }); - - it("should error when discarding something that isn't a card in the deck", function (this: Mocha.Context) { - if (!drawSuccess) { this.skip() }; - - let d = new Deck(["1", "2", "3", "4", "5"]); - d.draw(1); - - try { - d.discard("potato"); - throw "Didn't error when discarding an invalid card" - } catch (_) {}; - }); - - it("shouldn't error when discarding a valid card", function (this: Mocha.Context) { - if (!drawSuccess) { this.skip() }; - - const d = new Deck(["1", "2", "3", "4", "5"]); - const c = d.draw(1)[0]; - d.discard(c); - }); - - it("should reset count when card is in unknown domain", function (this: Mocha.Context) { - if (!drawSuccess) { this.skip() }; - - const d = new Deck(["1", "2", "3", "4", "5"]); - d.draw(1); - d.reset(); - expect(d.size).to.equal(5); - }); - - it("should reset count when card is in discard", function (this: Mocha.Context) { - if (!drawSuccess) { this.skip() }; - - const d = new Deck(["1", "2", "3", "4", "5"]); - const c = d.draw(1)[0]; - d.discard(c); - d.reset(); - expect(d.size).to.equal(5); - }); -}); \ No newline at end of file diff --git a/server/tests/objects/Player.spec.ts b/server/tests/objects/Player.spec.ts deleted file mode 100644 index 1d8fc52..0000000 --- a/server/tests/objects/Player.spec.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Socket } from "socket.io"; -import { expect } from "chai"; -import "mocha"; - -import { Player } from "../../src/objects/Player"; -import { colours, spaceships } from "common"; - -describe("The player object", () => { - it("should construct properly", () => { - const data = { - name: "Oliver", - ship: spaceships[0], - colour: colours[0], - host: false, - } - const p = new Player( - { connected: true } as Socket, - data - ); - - expect(p.socket.connected).to.be.true; - expect(p.colour).to.equal(data.colour); - expect(p.ship).to.equal(data.ship); - expect(p.name).to.equal(data.name); - expect(p.host).to.equal(data.host); - }); - - it("shouldn't let socket be assigned when connected", () => { - const p = new Player( - { connected: true } as Socket, - { - name: "Oliver", - ship: spaceships[0], - colour: colours[0], - host: false, - } - ); - - try { - p.socket = { connected : true } as Socket; - throw "Assigned socket when it was connected" - } catch (e) {}; - }); - - it("should let socket be assigned when not connected", () => { - const p = new Player( - { connected: false } as Socket, - { - name: "Oliver", - ship: spaceships[0], - colour: colours[0], - host: false, - } - ); - - try { - p.socket = { connected : true } as Socket; - } catch (e) { - throw "Didn't let socket be set when it wasn't connected" - }; - }); - - it("should construct the data object correctly", () => { - let data = { - name: "Oliver", - ship: spaceships[0], - colour: colours[0], - host: false, - }; - const p = new Player( - { connected: false } as Socket, - data - ); - - let j = p.json(); - expect(j).to.have.keys(`name`, `ship`, `colour`, `host`); - expect(j.colour).to.equal(data.colour); - expect(j.ship).to.equal(data.ship); - expect(j.name).to.equal(data.name); - expect(j.host).to.equal(data.host); - }); -}); \ No newline at end of file diff --git a/server/tsconfig.json b/server/tsconfig.json deleted file mode 100644 index fd8ba4a..0000000 --- a/server/tsconfig.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./dist", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - // "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - "strictNullChecks": true, /* Enable strict null checks. */ - "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - "paths": { - "@/*": ["./src/*"] - }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - - "stripInternal": true - }, - "exclude": [ - "**/*.spec.ts" - ] -} diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 22b1e2d..0000000 --- a/setup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Build the common module that both subsystems depend on -cd common -make - - -# Setup the server side of the system -cd ../server -pnpm install -pnpm build -#pnpm link file:../common/cjs -# add command to copy the systemd service file to the right location - - -# Setup the website for the system -cd ../web-svelte -pnpm install -#pnpm link file:../common/cjs -pnpm build -# add command to help setup nginx to serve the built files \ No newline at end of file diff --git a/web-svelte/attributions.md b/web-svelte/attributions.md deleted file mode 100644 index 26f6ea8..0000000 --- a/web-svelte/attributions.md +++ /dev/null @@ -1,4 +0,0 @@ -Space Shuttle Icon: - https://fontawesome.com/v5.15/icons/space-shuttle - License: https://fontawesome.com/license - Changes: Recolouring \ No newline at end of file diff --git a/web-svelte/index.html b/web-svelte/index.html deleted file mode 100644 index be50ec7..0000000 --- a/web-svelte/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Gravwell Online - - - - - - - - diff --git a/web-svelte/package.json b/web-svelte/package.json deleted file mode 100644 index 0823bfb..0000000 --- a/web-svelte/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "web-svelte", - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-check --tsconfig ./tsconfig.json" - }, - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.0-next.30", - "@tsconfig/svelte": "^2.0.1", - "svelte": "^3.49.0", - "svelte-check": "^2.2.7", - "svelte-preprocess": "^4.9.8", - "tslib": "^2.3.1", - "typescript": "^4.4.4", - "vite": "^3.0.2" - }, - "dependencies": { - "sass": "^1.45.0", - "socket.io-client": "^4.4.0", - "svelte-particles": "^2.1.3", - "tsparticles": "^2.1.3" - } -} \ No newline at end of file diff --git a/web-svelte/pnpm-lock.yaml b/web-svelte/pnpm-lock.yaml deleted file mode 100644 index eac0143..0000000 --- a/web-svelte/pnpm-lock.yaml +++ /dev/null @@ -1,1232 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@sveltejs/vite-plugin-svelte': ^1.0.0-next.30 - '@tsconfig/svelte': ^2.0.1 - sass: ^1.45.0 - socket.io-client: ^4.4.0 - svelte: ^3.49.0 - svelte-check: ^2.2.7 - svelte-particles: ^2.1.3 - svelte-preprocess: ^4.9.8 - tslib: ^2.3.1 - tsparticles: ^2.1.3 - typescript: ^4.4.4 - vite: ^3.0.2 - -dependencies: - sass: 1.53.0 - socket.io-client: 4.5.1 - svelte-particles: 2.1.3_svelte@3.49.0 - tsparticles: 2.1.3 - -devDependencies: - '@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.2 - '@tsconfig/svelte': 2.0.1 - svelte: 3.49.0 - svelte-check: 2.8.0_sass@1.53.0+svelte@3.49.0 - svelte-preprocess: 4.10.7_ti5n7ksfdoivvzciqy5qn6uyye - tslib: 2.4.0 - typescript: 4.7.4 - vite: 3.0.2_sass@1.53.0 - -packages: - - /@jridgewell/resolve-uri/3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec/1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: true - - /@jridgewell/trace-mapping/0.3.14: - resolution: {integrity: sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@nodelib/fs.scandir/2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - dev: true - - /@nodelib/fs.stat/2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: true - - /@nodelib/fs.walk/1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.13.0 - dev: true - - /@rollup/pluginutils/4.2.1: - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: true - - /@socket.io/component-emitter/3.1.0: - resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} - dev: false - - /@sveltejs/vite-plugin-svelte/1.0.1_svelte@3.49.0+vite@3.0.2: - resolution: {integrity: sha512-PorCgUounn0VXcpeJu+hOweZODKmGuLHsLomwqSj+p26IwjjGffmYQfVHtiTWq+NqaUuuHWWG7vPge6UFw4Aeg==} - engines: {node: ^14.18.0 || >= 16} - peerDependencies: - diff-match-patch: ^1.0.5 - svelte: ^3.44.0 - vite: ^3.0.0 - peerDependenciesMeta: - diff-match-patch: - optional: true - dependencies: - '@rollup/pluginutils': 4.2.1 - debug: 4.3.4 - deepmerge: 4.2.2 - kleur: 4.1.5 - magic-string: 0.26.2 - svelte: 3.49.0 - svelte-hmr: 0.14.12_svelte@3.49.0 - vite: 3.0.2_sass@1.53.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@tsconfig/svelte/2.0.1: - resolution: {integrity: sha512-aqkICXbM1oX5FfgZd2qSSAGdyo/NRxjWCamxoyi3T8iVQnzGge19HhDYzZ6NrVOW7bhcWNSq9XexWFtMzbB24A==} - dev: true - - /@types/node/18.0.6: - resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==} - dev: true - - /@types/pug/2.0.6: - resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} - dev: true - - /@types/sass/1.43.1: - resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} - dependencies: - '@types/node': 18.0.6 - dev: true - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - - /buffer-crc32/0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} - dev: true - - /callsites/3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /chokidar/3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: true - - /debug/4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: true - - /detect-indent/6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - - /engine.io-client/6.2.2: - resolution: {integrity: sha512-8ZQmx0LQGRTYkHuogVZuGSpDqYZtCM/nv8zQ68VZ+JkOpazJ7ICdsSpaO6iXwvaU30oFg5QJOJWj8zWqhbKjkQ==} - dependencies: - '@socket.io/component-emitter': 3.1.0 - debug: 4.3.4 - engine.io-parser: 5.0.4 - ws: 8.2.3 - xmlhttprequest-ssl: 2.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: false - - /engine.io-parser/5.0.4: - resolution: {integrity: sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==} - engines: {node: '>=10.0.0'} - dev: false - - /es6-promise/3.3.1: - resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} - dev: true - - /esbuild-android-64/0.14.49: - resolution: {integrity: sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64/0.14.49: - resolution: {integrity: sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64/0.14.49: - resolution: {integrity: sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64/0.14.49: - resolution: {integrity: sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64/0.14.49: - resolution: {integrity: sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64/0.14.49: - resolution: {integrity: sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32/0.14.49: - resolution: {integrity: sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64/0.14.49: - resolution: {integrity: sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm/0.14.49: - resolution: {integrity: sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64/0.14.49: - resolution: {integrity: sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le/0.14.49: - resolution: {integrity: sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le/0.14.49: - resolution: {integrity: sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-riscv64/0.14.49: - resolution: {integrity: sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-s390x/0.14.49: - resolution: {integrity: sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64/0.14.49: - resolution: {integrity: sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64/0.14.49: - resolution: {integrity: sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-sunos-64/0.14.49: - resolution: {integrity: sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32/0.14.49: - resolution: {integrity: sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64/0.14.49: - resolution: {integrity: sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64/0.14.49: - resolution: {integrity: sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild/0.14.49: - resolution: {integrity: sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - esbuild-android-64: 0.14.49 - esbuild-android-arm64: 0.14.49 - esbuild-darwin-64: 0.14.49 - esbuild-darwin-arm64: 0.14.49 - esbuild-freebsd-64: 0.14.49 - esbuild-freebsd-arm64: 0.14.49 - esbuild-linux-32: 0.14.49 - esbuild-linux-64: 0.14.49 - esbuild-linux-arm: 0.14.49 - esbuild-linux-arm64: 0.14.49 - esbuild-linux-mips64le: 0.14.49 - esbuild-linux-ppc64le: 0.14.49 - esbuild-linux-riscv64: 0.14.49 - esbuild-linux-s390x: 0.14.49 - esbuild-netbsd-64: 0.14.49 - esbuild-openbsd-64: 0.14.49 - esbuild-sunos-64: 0.14.49 - esbuild-windows-32: 0.14.49 - esbuild-windows-64: 0.14.49 - esbuild-windows-arm64: 0.14.49 - dev: true - - /estree-walker/2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - - /fast-glob/3.2.11: - resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - dev: true - - /fastq/1.13.0: - resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} - dependencies: - reusify: 1.0.4 - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - - /fs.realpath/1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - optional: true - - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - - /glob/7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /graceful-fs/4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - dev: true - - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /immutable/4.1.0: - resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==} - - /import-fresh/3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true - - /inflight/1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - - /is-core-module/2.9.0: - resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} - dependencies: - has: 1.0.3 - dev: true - - /is-extglob/2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - /kleur/4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: true - - /magic-string/0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - - /magic-string/0.26.2: - resolution: {integrity: sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==} - engines: {node: '>=12'} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - - /merge2/1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - dev: true - - /micromatch/4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - dev: true - - /min-indent/1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - - /minimatch/3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimist/1.2.6: - resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} - dev: true - - /mkdirp/0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - dependencies: - minimist: 1.2.6 - dev: true - - /mri/1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - dev: true - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - /nanoid/3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - - /once/1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /parent-module/1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - dependencies: - callsites: 3.1.0 - dev: true - - /path-is-absolute/1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-parse/1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /picocolors/1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - /postcss/8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.4 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /queue-microtask/1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true - - /readdirp/3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - - /resolve-from/4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true - - /resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.9.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /reusify/1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true - - /rimraf/2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - - /rollup/2.77.0: - resolution: {integrity: sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /run-parallel/1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - dev: true - - /sade/1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - dependencies: - mri: 1.2.0 - dev: true - - /sander/0.5.1: - resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} - dependencies: - es6-promise: 3.3.1 - graceful-fs: 4.2.10 - mkdirp: 0.5.6 - rimraf: 2.7.1 - dev: true - - /sass/1.53.0: - resolution: {integrity: sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==} - engines: {node: '>=12.0.0'} - hasBin: true - dependencies: - chokidar: 3.5.3 - immutable: 4.1.0 - source-map-js: 1.0.2 - - /socket.io-client/4.5.1: - resolution: {integrity: sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA==} - engines: {node: '>=10.0.0'} - dependencies: - '@socket.io/component-emitter': 3.1.0 - debug: 4.3.4 - engine.io-client: 6.2.2 - socket.io-parser: 4.2.1 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: false - - /socket.io-parser/4.2.1: - resolution: {integrity: sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==} - engines: {node: '>=10.0.0'} - dependencies: - '@socket.io/component-emitter': 3.1.0 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - - /sorcery/0.10.0: - resolution: {integrity: sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==} - hasBin: true - dependencies: - buffer-crc32: 0.2.13 - minimist: 1.2.6 - sander: 0.5.1 - sourcemap-codec: 1.4.8 - dev: true - - /source-map-js/1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - - /sourcemap-codec/1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - dev: true - - /strip-indent/3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true - - /supports-preserve-symlinks-flag/1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /svelte-check/2.8.0_sass@1.53.0+svelte@3.49.0: - resolution: {integrity: sha512-HRL66BxffMAZusqe5I5k26mRWQ+BobGd9Rxm3onh7ZVu0nTk8YTKJ9vu3LVPjUGLU9IX7zS+jmwPVhJYdXJ8vg==} - hasBin: true - peerDependencies: - svelte: ^3.24.0 - dependencies: - '@jridgewell/trace-mapping': 0.3.14 - chokidar: 3.5.3 - fast-glob: 3.2.11 - import-fresh: 3.3.0 - picocolors: 1.0.0 - sade: 1.8.1 - svelte: 3.49.0 - svelte-preprocess: 4.10.7_ti5n7ksfdoivvzciqy5qn6uyye - typescript: 4.7.4 - transitivePeerDependencies: - - '@babel/core' - - coffeescript - - less - - node-sass - - postcss - - postcss-load-config - - pug - - sass - - stylus - - sugarss - dev: true - - /svelte-hmr/0.14.12_svelte@3.49.0: - resolution: {integrity: sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: '>=3.19.0' - dependencies: - svelte: 3.49.0 - dev: true - - /svelte-particles/2.1.3_svelte@3.49.0: - resolution: {integrity: sha512-YFNR/Dq+fCuKc1xNopUGFdVfzlE5HcVpfuLg28daZirIsOoPycwwRsZ1FdRs+4j3kFlHa1bXHa3Lcnvnm3g67w==} - peerDependencies: - svelte: '>=3' - dependencies: - svelte: 3.49.0 - tsparticles-engine: 2.1.3 - dev: false - - /svelte-preprocess/4.10.7_ti5n7ksfdoivvzciqy5qn6uyye: - resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==} - engines: {node: '>= 9.11.2'} - requiresBuild: true - peerDependencies: - '@babel/core': ^7.10.2 - coffeescript: ^2.5.1 - less: ^3.11.3 || ^4.0.0 - node-sass: '*' - postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 - pug: ^3.0.0 - sass: ^1.26.8 - stylus: ^0.55.0 - sugarss: ^2.0.0 - svelte: ^3.23.0 - typescript: ^3.9.5 || ^4.0.0 - peerDependenciesMeta: - '@babel/core': - optional: true - coffeescript: - optional: true - less: - optional: true - node-sass: - optional: true - postcss: - optional: true - postcss-load-config: - optional: true - pug: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - typescript: - optional: true - dependencies: - '@types/pug': 2.0.6 - '@types/sass': 1.43.1 - detect-indent: 6.1.0 - magic-string: 0.25.9 - sass: 1.53.0 - sorcery: 0.10.0 - strip-indent: 3.0.0 - svelte: 3.49.0 - typescript: 4.7.4 - dev: true - - /svelte/3.49.0: - resolution: {integrity: sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==} - engines: {node: '>= 8'} - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - - /tslib/2.4.0: - resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - dev: true - - /tsparticles-engine/2.1.3: - resolution: {integrity: sha512-BmCo534tF5yRQofUczGSfCFrdeMYO6e7FXHv6AdRxL+j9NNPH3zF4HX6k24tbO4kmTH8tGX/+F9mugEQVo9AEg==} - requiresBuild: true - dev: false - - /tsparticles-interaction-external-attract/2.1.3: - resolution: {integrity: sha512-r9DDDlmzA47j0hrmur/2ITip4Qwki3fM1yNgmro048CPamF5pnrhCZBG8zq8hy6BO8KASe55OU5KCAJ9Zt3T2w==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-bounce/2.1.3: - resolution: {integrity: sha512-ueRHeuQhXMgWGhxFd3REK2/L4QJjhAuQxGZxIM6Tl80EmYNsCXSyQJ3RG/A839eLpGHDg5fLIytcilfu9o3XvA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-bubble/2.1.3: - resolution: {integrity: sha512-0ov4Glx0xfANPX7Tw09vOGC4MjrMoQkA8dqaRuPl8Q2SPGIMpWUWrBK9LzaZdfgtCixSeI+D/c7sgwEU5NovJg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-connect/2.1.3: - resolution: {integrity: sha512-dHbVmYboa8bCEjkCn6QA81Lam6h+2nEORwL/ALee1gAsgyHU+cHWZ9umrL5dhYVbW3uxIn03zwZEwO+tSbISLw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-grab/2.1.3: - resolution: {integrity: sha512-Q/wbjf24YozYJJ73r2ISEQ5ixjgBXEe2s0fAW+7r+p3D4MGTYUPLmFdapislO9AW9mRLif60k4T2cWzbXxmx+w==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-pause/2.1.3: - resolution: {integrity: sha512-M1OMqN1pkpUcPdXdZoqjSJNfXUZy1qCTu+Yuy6O2trQUL2fMmnqWYUxqvcOLVgGSuacC1PCnoypBXt0BIjKyhw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-push/2.1.3: - resolution: {integrity: sha512-tRzQy8DgxPy3iQkDCARKbRy1OFST4f+WOvzzMEyphddbFZq5cllvT4s61sVrzH4gWO+6ryT/e9PQH1Q0sYG9Mw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-remove/2.1.3: - resolution: {integrity: sha512-9jWds7NcQmrptg+RcRAKYy/vTtwAMz5DbIu4W1WjJ13NmoGuL0opv58bADEaY3rCEXLDPk2L8YU2792rWkp5Rg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-repulse/2.1.3: - resolution: {integrity: sha512-MuZ1yCCxcL9h87oKtqgf+/m8kSFlo3L0J/hMK5dfGFKVhF3TR9kFb/4gCZngtCUUZh5ciWHpvnUwZ9Wk/SakEg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-external-trail/2.1.3: - resolution: {integrity: sha512-IhrCgksvwP1JvZ31U/G5Hypp2WQ4ID8foB4IbOVD/mOvemUQW3G8o/cohSDwKXB5jQFclGgQOizMK/k/0wVMAg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-particles-attract/2.1.3: - resolution: {integrity: sha512-AG1HtpquRE5qTR2V3lnQ5fcCjlBa9RzxiiVeOX5dJDhvLrBA2NUPNRkGTMyl6PJZSnFnjMDKFQ/d24/A+ILWxQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-particles-collisions/2.1.3: - resolution: {integrity: sha512-V4x6EzjmkWZBuUfVvCBelBbxYx+eiHYTf18ebLE73atfaSKnMHo9UentU18W47Zw0Z5aur+4/V0hS2uUFmSq1Q==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-interaction-particles-links/2.1.3: - resolution: {integrity: sha512-/gh3MAwQUfufkXcOggw0UwFJBXgs0hm0cvCNRFLx54qmzGFNjy7efkOFxl3YeqyQanqLiKYZmHdZEkNEYMnWIQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-move-base/2.1.3: - resolution: {integrity: sha512-aq9k3682zaKxe6R8MwdldoYnizCTntUj7VbJ0kXQ2QV+F/Fk8y50okbYslxbpKASP6yIGE9wXK3m9QqH5VQAXQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-move-parallax/2.1.3: - resolution: {integrity: sha512-Miy/eMYTc+dO4n9wtd6PpONDpAy1Ta0+4tSY6K+QBse+Fp5bjokBSpnwDyAmIbgAcbj5XMlMp8yzCcE7ptlIhg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-particles.js/2.1.3: - resolution: {integrity: sha512-V1NZ3b8rUrRzaFixq9pUDw2OxAIYp6b8/CSmt/3SR7UZnC0q/lSAw9HDQzqhsCNOpFc0PzQa0ogB6sMY3eaEgA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-plugin-absorbers/2.1.3: - resolution: {integrity: sha512-MRkP05QVNYwA4rV0nWTKOc+dANJ+dzw+t55qI7Xh9nmUineRJc784fjgZHk+/NDjgcfNb6RN05BSDkLzlANy3g==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-plugin-emitters/2.1.3: - resolution: {integrity: sha512-G5IB+06AQR066Ss9XeszXsPbikEJjmdal/IzIwALaslQUIlGgJQhlPYY3R1aUAgtY7Oit0O6gFDqURs3dj9d8Q==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-plugin-polygon-mask/2.1.3: - resolution: {integrity: sha512-D8uuPZ+MpO2nBjeoYThePty3G3MGmBNIlQE92anrfUTEEKYjTlczY+nHlORfdNBL9fFwMiMnr/FgJwD0D68BdQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-circle/2.1.3: - resolution: {integrity: sha512-OA6C67QEB3lL+GWOMOAmINYkHDO9LO929OTtkce6YDtrvm44zND5VhgevVYhriPvkxE5/n85F13cWNo2rO8LRw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-image/2.1.3: - resolution: {integrity: sha512-aV9JFnM4FjVIB0fNSf3agkiXPySdiM1f+9JyUaKSfMxYZPoY7hj6Mva3hQJQ+2GLDQE5fTjj+/IH9qQuSm5eiA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-line/2.1.3: - resolution: {integrity: sha512-22A3VvZvTN5g1iql8hNIU6NLcT72WKBtOPwKEFBTom7Foo7xrOH/xvjbTVN/TDUDKD86dMnsKVn0xF2NHk634A==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-polygon/2.1.3: - resolution: {integrity: sha512-VEMD1K+uvPY7dq8JBYQn6zsuRlDiRyMGnxTy6XKTQhVp3Zs6zwZ/789WnepUc42QAYvKzofg8G/POsevhOWOvA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-square/2.1.3: - resolution: {integrity: sha512-/q7aOUM5Kz+SRhpyICAvyBRmZy1Xt9Z545GHy6tqmxNn4RmiWNoqUda1V2DmMBD+rRb5jan7cQb37HQvltdrPQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-star/2.1.3: - resolution: {integrity: sha512-aKsWgK1iGJSBOpWJ9u5JW9X0zAWz9G1jMYSScCbLEVAQ98WV7xSEYsNOSdanedOsXfH2PNssk4KKxb5Cwz8qcg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-shape-text/2.1.3: - resolution: {integrity: sha512-bsuHXHECRpl9Ty/70pEv1JHgdEjdq8GI2TrNCN7lyANuIFBka5gvmHqOIdKtuebqJb6OlNQB5E58EOiHvLObfw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-slim/2.1.3: - resolution: {integrity: sha512-8FYaJt0oEWyKzLevi6dslFah5fIPAuxuqW25aJJxZJT0fu83HtHqgLinieFdoNS13afu+qKp+XlwYrkkczjStg==} - dependencies: - tsparticles-engine: 2.1.3 - tsparticles-interaction-external-attract: 2.1.3 - tsparticles-interaction-external-bounce: 2.1.3 - tsparticles-interaction-external-bubble: 2.1.3 - tsparticles-interaction-external-connect: 2.1.3 - tsparticles-interaction-external-grab: 2.1.3 - tsparticles-interaction-external-pause: 2.1.3 - tsparticles-interaction-external-push: 2.1.3 - tsparticles-interaction-external-remove: 2.1.3 - tsparticles-interaction-external-repulse: 2.1.3 - tsparticles-interaction-particles-attract: 2.1.3 - tsparticles-interaction-particles-collisions: 2.1.3 - tsparticles-interaction-particles-links: 2.1.3 - tsparticles-move-base: 2.1.3 - tsparticles-move-parallax: 2.1.3 - tsparticles-particles.js: 2.1.3 - tsparticles-shape-circle: 2.1.3 - tsparticles-shape-image: 2.1.3 - tsparticles-shape-line: 2.1.3 - tsparticles-shape-polygon: 2.1.3 - tsparticles-shape-square: 2.1.3 - tsparticles-shape-star: 2.1.3 - tsparticles-shape-text: 2.1.3 - tsparticles-updater-angle: 2.1.3 - tsparticles-updater-color: 2.1.3 - tsparticles-updater-life: 2.1.3 - tsparticles-updater-opacity: 2.1.3 - tsparticles-updater-out-modes: 2.1.3 - tsparticles-updater-size: 2.1.3 - tsparticles-updater-stroke-color: 2.1.3 - dev: false - - /tsparticles-updater-angle/2.1.3: - resolution: {integrity: sha512-9yiCS8iZYexSyLAaTOkge2WM5ZUDZv6B4lWpgoUQANNScnrDkCkPHOb7ZYq4fbHYA+GElppAjamDsg2WBT5bsg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-color/2.1.3: - resolution: {integrity: sha512-gsCLmwJsPauVyExRMUu0IA9R5HbEKgZ4/wndLLFxpdz/+b8PElL+SMxywEUf4WWWMC8o/1JQxlQmuW0Q+EWwyQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-life/2.1.3: - resolution: {integrity: sha512-de9kkz6PFDq8OSrhNdmD24SpUC92Oz15QCiu4Sxbg98ngUun6ejE/3SZku9CX0lXgDK8k9IcH1SrIT4RzM2JKA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-opacity/2.1.3: - resolution: {integrity: sha512-WQEFM4KyLCE87LWUn8Wxh/Wmwlg/GLXvTJkFYRGjD1AjW85CJO9DM0t3O+xjKq3hR4LaMFRHF4Fki/PhmnUF+Q==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-out-modes/2.1.3: - resolution: {integrity: sha512-u7JtAKyvKCq7gwuN+NlzVJNYwvVBMx3wPCyJNZvaK9umM51lQHJCRsNj57lJ7jSJlaWsEYspw3rPXRvaw/+dVA==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-roll/2.1.3: - resolution: {integrity: sha512-0T9wEuclcV1nfNlmJH4zDco+7xB/tBFzCYVbZ1qnfwT29J66gz7/9iBYk7iRr91uhxckHXO4VcyJCk+e0vVb1w==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-size/2.1.3: - resolution: {integrity: sha512-uPpSvi73saaytTSfEtiLdlaJU81uLhDWwMe8UoVEsIggJ5nUQzGU9/WP97iSYR10zr9Xzof1Zweksj4hWvf3mQ==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-stroke-color/2.1.3: - resolution: {integrity: sha512-TSZcbhtt92710fBzF19OqwDu6ZN0LccLHFNgmWPy1EFT5oULe9ZrH6aWqEJ7q4HCdbxZytW+7rv5YRsRL15M0Q==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-tilt/2.1.3: - resolution: {integrity: sha512-avSUIc6QOp/caaWUNodCQhNwLdvuC8fhDn7JiUcq2Z95YwcJTfM1JsvD2J6UeNQL5Jj2+cxjtECCQ1JzK0Sutg==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-twinkle/2.1.3: - resolution: {integrity: sha512-89WwhJRCIKWNUdK56pq8DuXuDriO/1gfddEImTeFGmA/q1my1W3nGX8LvHIR0/d9kS6tuL6sQIGolXOLwgp5Yw==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles-updater-wobble/2.1.3: - resolution: {integrity: sha512-UpucA4hBIn/bLYZeJgCb/JPHmSfHIUpjbEenyHm7u1BK+PuiiNDVZ13o9ClIXKDiOK6ebgIMy8afxmPIHGmG1Q==} - dependencies: - tsparticles-engine: 2.1.3 - dev: false - - /tsparticles/2.1.3: - resolution: {integrity: sha512-7fKNV+6B9CcKQbFVFre2Rx2BAkW86/1jXjZGh9B0u+l6EARZSwS2aMOYWP1lJuzvHSmupoG0cGmZfKTr7/AIZw==} - dependencies: - tsparticles-engine: 2.1.3 - tsparticles-interaction-external-trail: 2.1.3 - tsparticles-plugin-absorbers: 2.1.3 - tsparticles-plugin-emitters: 2.1.3 - tsparticles-plugin-polygon-mask: 2.1.3 - tsparticles-slim: 2.1.3 - tsparticles-updater-roll: 2.1.3 - tsparticles-updater-tilt: 2.1.3 - tsparticles-updater-twinkle: 2.1.3 - tsparticles-updater-wobble: 2.1.3 - dev: false - - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /vite/3.0.2_sass@1.53.0: - resolution: {integrity: sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - less: '*' - sass: '*' - stylus: '*' - terser: ^5.4.0 - peerDependenciesMeta: - less: - optional: true - sass: - optional: true - stylus: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.14.49 - postcss: 8.4.14 - resolve: 1.22.1 - rollup: 2.77.0 - sass: 1.53.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /wrappy/1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /ws/8.2.3: - resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - - /xmlhttprequest-ssl/2.0.0: - resolution: {integrity: sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==} - engines: {node: '>=0.4.0'} - dev: false diff --git a/web-svelte/public/assets/black-hole.svg b/web-svelte/public/assets/black-hole.svg deleted file mode 100644 index 02069e2..0000000 --- a/web-svelte/public/assets/black-hole.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/circle.svg b/web-svelte/public/assets/circle.svg deleted file mode 100644 index 5b99b0f..0000000 --- a/web-svelte/public/assets/circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/web-svelte/public/assets/hexagon.svg b/web-svelte/public/assets/hexagon.svg deleted file mode 100644 index 88c282f..0000000 --- a/web-svelte/public/assets/hexagon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/web-svelte/public/assets/icons/change_colour.svg b/web-svelte/public/assets/icons/change_colour.svg deleted file mode 100644 index 6c12858..0000000 --- a/web-svelte/public/assets/icons/change_colour.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/icons/expand.svg b/web-svelte/public/assets/icons/expand.svg deleted file mode 100644 index d17e3c8..0000000 --- a/web-svelte/public/assets/icons/expand.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/icons/kick_person.svg b/web-svelte/public/assets/icons/kick_person.svg deleted file mode 100644 index 2b70d46..0000000 --- a/web-svelte/public/assets/icons/kick_person.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/icons/space-shuttle-solid.svg b/web-svelte/public/assets/icons/space-shuttle-solid.svg deleted file mode 100644 index 3b00a1d..0000000 --- a/web-svelte/public/assets/icons/space-shuttle-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/warp-gate-center.svg b/web-svelte/public/assets/warp-gate-center.svg deleted file mode 100644 index 5c4f58e..0000000 --- a/web-svelte/public/assets/warp-gate-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/assets/warp-gate-shell.svg b/web-svelte/public/assets/warp-gate-shell.svg deleted file mode 100644 index 0c7d98c..0000000 --- a/web-svelte/public/assets/warp-gate-shell.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web-svelte/public/global.css b/web-svelte/public/global.css deleted file mode 100644 index eafe06c..0000000 --- a/web-svelte/public/global.css +++ /dev/null @@ -1,22 +0,0 @@ -:root { - --dark-but-not-black: #2c2f33; - --not-quite-black: #23272a; -} - -.clickable { - cursor: pointer; -} - -.material-icons { - user-select: none; -} - -.error { - padding: 10px; - background: #ff000033; - border-radius: 10px; - border-style: solid; - border-color: red; - border-width: 2px; - text-align: center; -} \ No newline at end of file diff --git a/web-svelte/public/particlesConfig.json b/web-svelte/public/particlesConfig.json deleted file mode 100644 index 54806b7..0000000 --- a/web-svelte/public/particlesConfig.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "particles": { - "number": { - "value": 100, - "density": { - "enable": true, - "value_area": 800 - } - }, - "color": { - "value": "#ffffff" - }, - "shape": { - "type": "circle", - "stroke": { - "width": 0, - "color": "#000000" - }, - "polygon": { - "nb_sides": 5 - }, - "image": { - "src": "img/github.svg", - "width": 100, - "height": 100 - } - }, - "opacity": { - "value": 0.5, - "random": false, - "anim": { - "enable": false, - "speed": 1, - "opacity_min": 0.1, - "sync": false - } - }, - "size": { - "value": 2, - "random": true, - "anim": { - "enable": true, - "speed": 4, - "size_min": 0.1, - "sync": false - } - }, - "line_linked": { - "enable": true, - "distance": 75, - "color": "#ffffff", - "opacity": 0.4, - "width": 1 - }, - "move": { - "enable": true, - "speed": 0.25, - "direction": "none", - "random": true, - "straight": false, - "out_mode": "bounce", - "bounce": false, - "attract": { - "enable": false, - "rotateX": 600, - "rotateY": 1200 - } - } - }, - "interactivity": { - "detect_on": "canvas", - "events": { - "onhover": { - "enable": false, - "mode": "grab" - }, - "onclick": { - "enable": false, - "mode": "push" - }, - "resize": true - }, - "modes": { - "grab": { - "distance": 100, - "line_linked": { - "opacity": 1 - } - }, - "bubble": { - "distance": 400, - "size": 40, - "duration": 2, - "opacity": 8, - "speed": 3 - }, - "repulse": { - "distance": 200, - "duration": 0.4 - }, - "push": { - "particles_nb": 4 - }, - "remove": { - "particles_nb": 2 - } - } - }, - "retina_detect": true -} \ No newline at end of file diff --git a/web-svelte/src/App.svelte b/web-svelte/src/App.svelte deleted file mode 100644 index d6c0624..0000000 --- a/web-svelte/src/App.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - -{#if $state == "main-menu"} - -{:else if $state == "multiplayer-lobby"} - -{:else if $state == "game-movement"} - -{/if} - - \ No newline at end of file diff --git a/web-svelte/src/components/Board.svelte b/web-svelte/src/components/Board.svelte deleted file mode 100644 index cbf64ce..0000000 --- a/web-svelte/src/components/Board.svelte +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - {#if board[10] != null} - - - - {/if} - - - - - {#if board[21] != null} - - - - {/if} - - - - - {#if board[32] != null} - - - - {/if} - - - - - {#if board[43] != null} - - - - {/if} - - - - - - {#each Array(5) as _, row} - - {#each Array(10) as _, col} - {@const boardIndex = col + (( row * 10 ) + (1 * row))} - - - {#if board[boardIndex] != null} - - - - {/if} - - - {/each} - - {/each} - - - - \ No newline at end of file diff --git a/web-svelte/src/components/Card.svelte b/web-svelte/src/components/Card.svelte deleted file mode 100644 index baef3fe..0000000 --- a/web-svelte/src/components/Card.svelte +++ /dev/null @@ -1,138 +0,0 @@ - - - - - {#if !hidden} - - {Math.abs(card.magnitude)} - - - {card.symbol} - {card.name} - - {#if button && !half} - - - {buttonText} - - - {/if} - {/if} - - - - \ No newline at end of file diff --git a/web-svelte/src/components/Hexagon.svelte b/web-svelte/src/components/Hexagon.svelte deleted file mode 100644 index e743e2d..0000000 --- a/web-svelte/src/components/Hexagon.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/web-svelte/src/components/Player.svelte b/web-svelte/src/components/Player.svelte deleted file mode 100644 index 944f0d2..0000000 --- a/web-svelte/src/components/Player.svelte +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - {#if $myName == name} - - - - - - - - {:else} - - {/if} - - - - - {name} - - {#if $myName == name} - - You - - {/if} - - - - - {#if canLeave} - - - - - - {/if} - - - \ No newline at end of file diff --git a/web-svelte/src/components/PlayerHand.svelte b/web-svelte/src/components/PlayerHand.svelte deleted file mode 100644 index dad6e1f..0000000 --- a/web-svelte/src/components/PlayerHand.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - - - - {#each $hand as card (card.symbol)} - - {/each} - - - - \ No newline at end of file diff --git a/web-svelte/src/components/SciFi-Button.svelte b/web-svelte/src/components/SciFi-Button.svelte deleted file mode 100644 index c9000f3..0000000 --- a/web-svelte/src/components/SciFi-Button.svelte +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/web-svelte/src/components/SciFi-Checkbox.svelte b/web-svelte/src/components/SciFi-Checkbox.svelte deleted file mode 100644 index 730df0e..0000000 --- a/web-svelte/src/components/SciFi-Checkbox.svelte +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/web-svelte/src/components/ShipsMoving.svelte b/web-svelte/src/components/ShipsMoving.svelte deleted file mode 100644 index 4ff66ee..0000000 --- a/web-svelte/src/components/ShipsMoving.svelte +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - {#each sortedPlayers as player (player.id)} - - - - - - - - - - {player.name} - - - - {/each} - - - - - Emergency Stop! - - Pressing this will stop you from moving - - - - STOP{#if stopped}PED{/if} - - - - - - - - \ No newline at end of file diff --git a/web-svelte/src/components/icons/spaceship.svelte b/web-svelte/src/components/icons/spaceship.svelte deleted file mode 100644 index fef37cc..0000000 --- a/web-svelte/src/components/icons/spaceship.svelte +++ /dev/null @@ -1,52 +0,0 @@ - - - -{#if spaceship == "rocket"} - - - -{:else if spaceship == "space-shuttle"} - - - -{:else if spaceship == "sailboat"} - - - -{/if} - - \ No newline at end of file diff --git a/web-svelte/src/components/icons/warpgate.svelte b/web-svelte/src/components/icons/warpgate.svelte deleted file mode 100644 index b463b71..0000000 --- a/web-svelte/src/components/icons/warpgate.svelte +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/web-svelte/src/components/modals/BaseModal.svelte b/web-svelte/src/components/modals/BaseModal.svelte deleted file mode 100644 index 6fa58a1..0000000 --- a/web-svelte/src/components/modals/BaseModal.svelte +++ /dev/null @@ -1,98 +0,0 @@ - - -{#if open} - - - - - - - close - - - - - - -{/if} - - \ No newline at end of file diff --git a/web-svelte/src/components/modals/JoinLobby.svelte b/web-svelte/src/components/modals/JoinLobby.svelte deleted file mode 100644 index dc24ecd..0000000 --- a/web-svelte/src/components/modals/JoinLobby.svelte +++ /dev/null @@ -1,124 +0,0 @@ - - - - - {joining ? "Join Game" : "Create Lobby"} - - - Username: - - {#if joining} - - Game Code: - - {/if} - - - - {joining ? "Join Game" : "Create Lobby"} - - {#if errorMessage} - - {errorMessage} - - {/if} - - - - \ No newline at end of file diff --git a/web-svelte/src/components/modals/OptionInfo.svelte b/web-svelte/src/components/modals/OptionInfo.svelte deleted file mode 100644 index 761c893..0000000 --- a/web-svelte/src/components/modals/OptionInfo.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Option Info - - {#each visibleOptions as opt} - {#if !opt.hidden} - {opt.name} - - {opt.description} - - {/if} - {/each} - - \ No newline at end of file diff --git a/web-svelte/src/components/modals/ShipDesigner.svelte b/web-svelte/src/components/modals/ShipDesigner.svelte deleted file mode 100644 index 795a3cd..0000000 --- a/web-svelte/src/components/modals/ShipDesigner.svelte +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - Spaceship Designer - - - - - Colour: - - - - - {#each colours as c} - - {c.name} - - {/each} - - - - Spaceship - - - - {#each spaceships as ship} - {ship.name} - {/each} - - - - - Preview: - - - - - - - Save Design - - - - {#if error} - - {error} - - {/if} - - - - \ No newline at end of file diff --git a/web-svelte/src/main.ts b/web-svelte/src/main.ts deleted file mode 100644 index 82caf73..0000000 --- a/web-svelte/src/main.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { IServerInfo } from "common"; -import io from "socket.io-client"; -import App from "./App.svelte"; - -let url = "/"; -if (import.meta.env.DEV) { - url = "http://localhost:3001/"; -}; - -export const socket = io(url); - - -socket.on(`res:error`, (data) => { - console.error(data); -}); - -socket.on("connect", () => { - console.log("Connected to websocket server. Server info below:"); - socket.once("res:server.info", (data: IServerInfo) => { - console.table(data); - }); - socket.emit("req:server.info"); -}); - -const app = new App({ - target: document.getElementById('app') -}) - -export default app diff --git a/web-svelte/src/stores.ts b/web-svelte/src/stores.ts deleted file mode 100644 index 91a483f..0000000 --- a/web-svelte/src/stores.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { Board, FuelCard, PlayerData } from "common"; -import { writable } from "svelte/store"; - -export const gameCode = writable(""); -export const state = writable("game-movement"); -export const myName = writable(""); -export const isHost = writable(false); -export const players = writable<{[index: string]: PlayerData}>({ - a: { - id: `a`, - name: `Player 1`, - host: true, - colour: { name: `green`, hex: `#00aa00` }, - ship: { name: `shuttle`, id: `space-shuttle` }, - fuel: { - "magnitude": 2, - "symbol": "Jo", - "name": "Jodium", - "type": "stationary" - } - }, - b: { - id: `b`, - name: `Player 4`, - host: false, - colour: { name: `green`, hex: `#00a` }, - ship: { name: `shuttle`, id: `rocket` }, - fuel: { - "magnitude": 1, - "symbol": "Ar", - "name": "Argon", - "type": "movement" - } - }, - c: { - id: `c`, - name: `Player 3`, - host: false, - colour: { name: "Magenta", hex: "#b7094c" }, - ship: { name: `shuttle`, id: `rocket` }, - fuel: { - "magnitude": 10, - "symbol": "Mg", - "name": "Magnesium", - "type": "movement" - } - }, - d: { - id: `d`, - name: `Player 2`, - host: false, - colour: { name: "Purple", hex: "#7400b8" }, - ship: { name: `shuttle`, id: `rocket` }, - fuel: { - "magnitude": -2, - "symbol": "Kr", - "name": "Krypton", - "type": "movement" - } - }, -}); -export const board = writable(new Array(54).fill(null)); -export const hand = writable([]); \ No newline at end of file diff --git a/web-svelte/src/styles/mixins.scss b/web-svelte/src/styles/mixins.scss deleted file mode 100644 index c36180b..0000000 --- a/web-svelte/src/styles/mixins.scss +++ /dev/null @@ -1,23 +0,0 @@ -@mixin small { - @media (min-width: 576px) { - @content; - } -} - -@mixin medium { - @media (min-width: 768px) { - @content; - } -} - -@mixin large { - @media (min-width: 992px) { - @content; - } -} - -@mixin x-large { - @media (min-width: 1200px) { - @content; - } -} \ No newline at end of file diff --git a/web-svelte/src/views/home.svelte b/web-svelte/src/views/home.svelte deleted file mode 100644 index 2e4f37b..0000000 --- a/web-svelte/src/views/home.svelte +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - Gravwell - - Multiplayer - - - Join Game - - - Host Game - - - - - - Singleplayer - - Coming Soon - - - - Start Game - - - - - - - diff --git a/web-svelte/src/views/lobby/multiplayer.svelte b/web-svelte/src/views/lobby/multiplayer.svelte deleted file mode 100644 index c27e242..0000000 --- a/web-svelte/src/views/lobby/multiplayer.svelte +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - Gravwell - - Copy Game Link - - - Players - - {#each Object.entries($players) as [id, p], i (id)} - - {#if i == 1} - - {/if} - {/each} - - - - - modal.options = true} - height="60px" - width="60px" - > - - help_outline - - - - Options - - {#each visibleOptions as option} - - - {option.name} - - - {/each} - - - - - Start Game - - - Delete Game - - - - - - diff --git a/web-svelte/src/views/movement.svelte b/web-svelte/src/views/movement.svelte deleted file mode 100644 index deb56f3..0000000 --- a/web-svelte/src/views/movement.svelte +++ /dev/null @@ -1,122 +0,0 @@ - - - - - {#if !preview.visible || !preview.board} - - - - {:else} - - - - {/if} - {#if notice.visible} - - - {notice.message} - - - {/if} - {#if controlsState == "player-hand"} - - - - {:else if controlsState == "player-order"} - - - - {/if} - - - - \ No newline at end of file diff --git a/web-svelte/src/vite-env.d.ts b/web-svelte/src/vite-env.d.ts deleted file mode 100644 index 4078e74..0000000 --- a/web-svelte/src/vite-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/web-svelte/svelte.config.js b/web-svelte/svelte.config.js deleted file mode 100644 index 4d0c296..0000000 --- a/web-svelte/svelte.config.js +++ /dev/null @@ -1,13 +0,0 @@ -import sveltePreprocess from "svelte-preprocess"; -import * as sass from "sass"; - -export default { - // Consult https://github.com/sveltejs/svelte-preprocess - // for more information about preprocessors - preprocess: sveltePreprocess({ - sass: { - sync: true, - implementation: sass - } - }) -} diff --git a/web-svelte/tsconfig.json b/web-svelte/tsconfig.json deleted file mode 100644 index f9039a5..0000000 --- a/web-svelte/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "@tsconfig/svelte/tsconfig.json", - "compilerOptions": { - "target": "esnext", - "useDefineForClassFields": true, - "module": "esnext", - "resolveJsonModule": true, - "baseUrl": ".", - /** - * Typecheck JS in `.svelte` and `.js` files by default. - * Disable checkJs if you'd like to use dynamic types in JS. - * Note that setting allowJs false does not prevent the use - * of JS in `.svelte` files. - */ - "allowJs": true, - "checkJs": true - }, - "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] -} diff --git a/web-svelte/vite.config.js b/web-svelte/vite.config.js deleted file mode 100644 index 401b4d4..0000000 --- a/web-svelte/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import { svelte } from '@sveltejs/vite-plugin-svelte' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [svelte()] -}) diff --git a/web-svelte/z-indexes.txt b/web-svelte/z-indexes.txt deleted file mode 100644 index 31c9689..0000000 --- a/web-svelte/z-indexes.txt +++ /dev/null @@ -1,4 +0,0 @@ --100000 = Star Particle Layer - -100 = Main Modal Layer -101 = Modal Content Layer \ No newline at end of file
- Pressing this will stop you from moving -
- {opt.description} -
- Coming Soon -