This commit is contained in:
orosmatthew 2024-03-12 15:16:28 -04:00
commit 95bca6b82e
64 changed files with 2927 additions and 1374 deletions

View File

@ -8,12 +8,11 @@
"name": "bwcontest", "name": "bwcontest",
"version": "0.0.1", "version": "0.0.1",
"dependencies": { "dependencies": {
"@vscode/vsce": "^2.22.0", "@vscode/vsce": "^2.24.0",
"axios": "^1.6.5", "axios": "^1.6.7",
"contest-monitor-types": "file:../../shared/contest-monitor-types", "bwcontest-shared": "file:../../shared",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"isomorphic-git": "^1.25.3", "isomorphic-git": "^1.25.6",
"submission-runner": "file:../../shared/submission-runner",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"url-join": "^5.0.0", "url-join": "^5.0.0",
"zod": "^3.22.4" "zod": "^3.22.4"
@ -28,34 +27,53 @@
"@types/glob": "^8.1.0", "@types/glob": "^8.1.0",
"@types/mocha": "^10.0.6", "@types/mocha": "^10.0.6",
"@types/node": "20.x", "@types/node": "20.x",
"@types/vscode": "^1.85.0", "@types/vscode": "^1.87.0",
"@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^6.19.0", "@typescript-eslint/parser": "^7.2.0",
"@vscode/test-electron": "^2.3.8", "@vscode/test-electron": "^2.3.9",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"esbuild": "^0.19.11", "esbuild": "^0.20.1",
"eslint": "^8.56.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
"glob": "^10.3.10", "glob": "^10.3.10",
"mocha": "^10.2.0", "mocha": "^10.3.0",
"postcss": "^8.4.33", "postcss": "^8.4.35",
"prettier": "^3.2.2", "prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.1.2", "prettier-plugin-svelte": "^3.2.2",
"rollup-plugin-css-only": "^4.5.2", "rollup-plugin-css-only": "^4.5.2",
"rollup-plugin-postcss": "^4.0.2", "rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-svelte": "^7.1.6", "rollup-plugin-svelte": "^7.2.0",
"svelte": "^4.2.8", "svelte": "^4.2.12",
"svelte-check": "^3.6.3", "svelte-check": "^3.6.7",
"svelte-preprocess": "^5.1.3", "svelte-preprocess": "^5.1.3",
"typescript": "^5.3.3" "typescript": "^5.4.2"
}, },
"engines": { "engines": {
"vscode": "^1.85.0" "vscode": "^1.85.0"
} }
}, },
"../../shared/contest-monitor-types": {}, "../../shared": {
"name": "bwcontest-shared",
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "20.x",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"fs-extra": "^11.2.0",
"prettier": "^3.2.5",
"tree-kill": "^1.2.2",
"typescript": "^5.4.2",
"zod": "^3.22.4"
}
},
"../../shared/contest-monitor-types": {
"extraneous": true
},
"../../shared/submission-runner": { "../../shared/submission-runner": {
"extraneous": true,
"dependencies": { "dependencies": {
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
@ -115,9 +133,9 @@
} }
}, },
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz",
"integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -131,9 +149,9 @@
} }
}, },
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz",
"integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -147,9 +165,9 @@
} }
}, },
"node_modules/@esbuild/android-arm64": { "node_modules/@esbuild/android-arm64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz",
"integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -163,9 +181,9 @@
} }
}, },
"node_modules/@esbuild/android-x64": { "node_modules/@esbuild/android-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz",
"integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -179,9 +197,9 @@
} }
}, },
"node_modules/@esbuild/darwin-arm64": { "node_modules/@esbuild/darwin-arm64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz",
"integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -195,9 +213,9 @@
} }
}, },
"node_modules/@esbuild/darwin-x64": { "node_modules/@esbuild/darwin-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz",
"integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -211,9 +229,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-arm64": { "node_modules/@esbuild/freebsd-arm64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz",
"integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -227,9 +245,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-x64": { "node_modules/@esbuild/freebsd-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz",
"integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -243,9 +261,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm": { "node_modules/@esbuild/linux-arm": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz",
"integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -259,9 +277,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz",
"integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -275,9 +293,9 @@
} }
}, },
"node_modules/@esbuild/linux-ia32": { "node_modules/@esbuild/linux-ia32": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz",
"integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -291,9 +309,9 @@
} }
}, },
"node_modules/@esbuild/linux-loong64": { "node_modules/@esbuild/linux-loong64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz",
"integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@ -307,9 +325,9 @@
} }
}, },
"node_modules/@esbuild/linux-mips64el": { "node_modules/@esbuild/linux-mips64el": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz",
"integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==",
"cpu": [ "cpu": [
"mips64el" "mips64el"
], ],
@ -323,9 +341,9 @@
} }
}, },
"node_modules/@esbuild/linux-ppc64": { "node_modules/@esbuild/linux-ppc64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz",
"integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -339,9 +357,9 @@
} }
}, },
"node_modules/@esbuild/linux-riscv64": { "node_modules/@esbuild/linux-riscv64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz",
"integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@ -355,9 +373,9 @@
} }
}, },
"node_modules/@esbuild/linux-s390x": { "node_modules/@esbuild/linux-s390x": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz",
"integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@ -371,9 +389,9 @@
} }
}, },
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz",
"integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -387,9 +405,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-x64": { "node_modules/@esbuild/netbsd-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz",
"integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -403,9 +421,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-x64": { "node_modules/@esbuild/openbsd-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz",
"integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -419,9 +437,9 @@
} }
}, },
"node_modules/@esbuild/sunos-x64": { "node_modules/@esbuild/sunos-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz",
"integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -435,9 +453,9 @@
} }
}, },
"node_modules/@esbuild/win32-arm64": { "node_modules/@esbuild/win32-arm64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz",
"integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -451,9 +469,9 @@
} }
}, },
"node_modules/@esbuild/win32-ia32": { "node_modules/@esbuild/win32-ia32": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz",
"integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -467,9 +485,9 @@
} }
}, },
"node_modules/@esbuild/win32-x64": { "node_modules/@esbuild/win32-x64": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz",
"integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -530,22 +548,22 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "8.56.0", "version": "8.57.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
"integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
} }
}, },
"node_modules/@humanwhocodes/config-array": { "node_modules/@humanwhocodes/config-array": {
"version": "0.11.13", "version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@humanwhocodes/object-schema": "^2.0.1", "@humanwhocodes/object-schema": "^2.0.2",
"debug": "^4.1.1", "debug": "^4.3.1",
"minimatch": "^3.0.5" "minimatch": "^3.0.5"
}, },
"engines": { "engines": {
@ -566,9 +584,9 @@
} }
}, },
"node_modules/@humanwhocodes/object-schema": { "node_modules/@humanwhocodes/object-schema": {
"version": "2.0.1", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"dev": true "dev": true
}, },
"node_modules/@isaacs/cliui": { "node_modules/@isaacs/cliui": {
@ -1041,28 +1059,28 @@
"dev": true "dev": true
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
"version": "7.5.6", "version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
"dev": true "dev": true
}, },
"node_modules/@types/vscode": { "node_modules/@types/vscode": {
"version": "1.85.0", "version": "1.87.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.85.0.tgz", "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.87.0.tgz",
"integrity": "sha512-CF/RBon/GXwdfmnjZj0WTUMZN5H6YITOfBCP4iEZlOtVQXuzw6t7Le7+cR+7JzdMrnlm7Mfp49Oj2TuSXIWo3g==", "integrity": "sha512-y3yYJV2esWr8LNjp3VNbSMWG7Y43jC8pCldG8YwiHGAQbsymkkMMt0aDT1xZIOFM2eFcNiUc+dJMx1+Z0UT8fg==",
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz",
"integrity": "sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==", "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.5.1", "@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.19.0", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/type-utils": "6.19.0", "@typescript-eslint/type-utils": "7.2.0",
"@typescript-eslint/utils": "6.19.0", "@typescript-eslint/utils": "7.2.0",
"@typescript-eslint/visitor-keys": "6.19.0", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.2.4", "ignore": "^5.2.4",
@ -1078,8 +1096,8 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", "@typescript-eslint/parser": "^7.0.0",
"eslint": "^7.0.0 || ^8.0.0" "eslint": "^8.56.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"typescript": { "typescript": {
@ -1088,15 +1106,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz",
"integrity": "sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==", "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "6.19.0", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/types": "6.19.0", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/typescript-estree": "6.19.0", "@typescript-eslint/typescript-estree": "7.2.0",
"@typescript-eslint/visitor-keys": "6.19.0", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -1107,7 +1125,7 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0" "eslint": "^8.56.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"typescript": { "typescript": {
@ -1116,13 +1134,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz",
"integrity": "sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==", "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.19.0", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/visitor-keys": "6.19.0" "@typescript-eslint/visitor-keys": "7.2.0"
}, },
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -1133,13 +1151,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz",
"integrity": "sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==", "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "6.19.0", "@typescript-eslint/typescript-estree": "7.2.0",
"@typescript-eslint/utils": "6.19.0", "@typescript-eslint/utils": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.0.1" "ts-api-utils": "^1.0.1"
}, },
@ -1151,7 +1169,7 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0" "eslint": "^8.56.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"typescript": { "typescript": {
@ -1160,9 +1178,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz",
"integrity": "sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==", "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -1173,13 +1191,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz",
"integrity": "sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==", "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.19.0", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/visitor-keys": "6.19.0", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1225,17 +1243,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz",
"integrity": "sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==", "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12", "@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0", "@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.19.0", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/types": "6.19.0", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/typescript-estree": "6.19.0", "@typescript-eslint/typescript-estree": "7.2.0",
"semver": "^7.5.4" "semver": "^7.5.4"
}, },
"engines": { "engines": {
@ -1246,16 +1264,16 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0" "eslint": "^8.56.0"
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "6.19.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz",
"integrity": "sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==", "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.19.0", "@typescript-eslint/types": "7.2.0",
"eslint-visitor-keys": "^3.4.1" "eslint-visitor-keys": "^3.4.1"
}, },
"engines": { "engines": {
@ -1273,9 +1291,9 @@
"dev": true "dev": true
}, },
"node_modules/@vscode/test-electron": { "node_modules/@vscode/test-electron": {
"version": "2.3.8", "version": "2.3.9",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.9.tgz",
"integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "integrity": "sha512-z3eiChaCQXMqBnk2aHHSEkobmC2VRalFQN0ApOAtydL172zXGxTwGrRtviT5HnUB+Q+G3vtEYFtuQkYqBzYgMA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"http-proxy-agent": "^4.0.1", "http-proxy-agent": "^4.0.1",
@ -1288,9 +1306,9 @@
} }
}, },
"node_modules/@vscode/vsce": { "node_modules/@vscode/vsce": {
"version": "2.22.0", "version": "2.24.0",
"resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.22.0.tgz", "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.24.0.tgz",
"integrity": "sha512-8df4uJiM3C6GZ2Sx/KilSKVxsetrTBBIUb3c0W4B1EWHcddioVs5mkyDKtMNP0khP/xBILVSzlXxhV+nm2rC9A==", "integrity": "sha512-p6CIXpH5HXDqmUkgFXvIKTjZpZxy/uDx4d/UsfhS9vQUun43KDNUbYeZocyAHgqcJlPEurgArHz9te1PPiqPyA==",
"dependencies": { "dependencies": {
"azure-devops-node-api": "^11.0.1", "azure-devops-node-api": "^11.0.1",
"chalk": "^2.4.2", "chalk": "^2.4.2",
@ -1548,9 +1566,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.6.5", "version": "1.6.7",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
"integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.4", "follow-redirects": "^1.15.4",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@ -1558,9 +1576,9 @@
} }
}, },
"node_modules/axobject-query": { "node_modules/axobject-query": {
"version": "3.2.1", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz",
"integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"dequal": "^2.0.3" "dequal": "^2.0.3"
@ -1744,6 +1762,10 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/bwcontest-shared": {
"resolved": "../../shared",
"link": true
},
"node_modules/call-bind": { "node_modules/call-bind": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
@ -2205,10 +2227,6 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/contest-monitor-types": {
"resolved": "../../shared/contest-monitor-types",
"link": true
},
"node_modules/core-util-is": { "node_modules/core-util-is": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
@ -2645,9 +2663,9 @@
"dev": true "dev": true
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.19.11", "version": "0.20.1",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz",
"integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
@ -2657,29 +2675,29 @@
"node": ">=12" "node": ">=12"
}, },
"optionalDependencies": { "optionalDependencies": {
"@esbuild/aix-ppc64": "0.19.11", "@esbuild/aix-ppc64": "0.20.1",
"@esbuild/android-arm": "0.19.11", "@esbuild/android-arm": "0.20.1",
"@esbuild/android-arm64": "0.19.11", "@esbuild/android-arm64": "0.20.1",
"@esbuild/android-x64": "0.19.11", "@esbuild/android-x64": "0.20.1",
"@esbuild/darwin-arm64": "0.19.11", "@esbuild/darwin-arm64": "0.20.1",
"@esbuild/darwin-x64": "0.19.11", "@esbuild/darwin-x64": "0.20.1",
"@esbuild/freebsd-arm64": "0.19.11", "@esbuild/freebsd-arm64": "0.20.1",
"@esbuild/freebsd-x64": "0.19.11", "@esbuild/freebsd-x64": "0.20.1",
"@esbuild/linux-arm": "0.19.11", "@esbuild/linux-arm": "0.20.1",
"@esbuild/linux-arm64": "0.19.11", "@esbuild/linux-arm64": "0.20.1",
"@esbuild/linux-ia32": "0.19.11", "@esbuild/linux-ia32": "0.20.1",
"@esbuild/linux-loong64": "0.19.11", "@esbuild/linux-loong64": "0.20.1",
"@esbuild/linux-mips64el": "0.19.11", "@esbuild/linux-mips64el": "0.20.1",
"@esbuild/linux-ppc64": "0.19.11", "@esbuild/linux-ppc64": "0.20.1",
"@esbuild/linux-riscv64": "0.19.11", "@esbuild/linux-riscv64": "0.20.1",
"@esbuild/linux-s390x": "0.19.11", "@esbuild/linux-s390x": "0.20.1",
"@esbuild/linux-x64": "0.19.11", "@esbuild/linux-x64": "0.20.1",
"@esbuild/netbsd-x64": "0.19.11", "@esbuild/netbsd-x64": "0.20.1",
"@esbuild/openbsd-x64": "0.19.11", "@esbuild/openbsd-x64": "0.20.1",
"@esbuild/sunos-x64": "0.19.11", "@esbuild/sunos-x64": "0.20.1",
"@esbuild/win32-arm64": "0.19.11", "@esbuild/win32-arm64": "0.20.1",
"@esbuild/win32-ia32": "0.19.11", "@esbuild/win32-ia32": "0.20.1",
"@esbuild/win32-x64": "0.19.11" "@esbuild/win32-x64": "0.20.1"
} }
}, },
"node_modules/escalade": { "node_modules/escalade": {
@ -2704,16 +2722,16 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.56.0", "version": "8.57.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1", "@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.4", "@eslint/eslintrc": "^2.1.4",
"@eslint/js": "8.56.0", "@eslint/js": "8.57.0",
"@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/config-array": "^0.11.14",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8", "@nodelib/fs.walk": "^1.2.8",
"@ungap/structured-clone": "^1.2.0", "@ungap/structured-clone": "^1.2.0",
@ -3713,9 +3731,9 @@
"dev": true "dev": true
}, },
"node_modules/isomorphic-git": { "node_modules/isomorphic-git": {
"version": "1.25.3", "version": "1.25.6",
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.3.tgz", "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.6.tgz",
"integrity": "sha512-iUaDB5kObupWpwjQ+EGkDQmaYQzbq1XaPqo+xJCCfbPViGZL94rU2RvK4EDJKpYbyiwbq5OSLEjkXHa8r5I1aw==", "integrity": "sha512-zA3k3QOO7doqOnBgwsaXJwHKSIIl5saEdH4xxalu082WHVES4KghsG6RE2SDwjXMCIlNa1bWocbitH6bRIrmLQ==",
"dependencies": { "dependencies": {
"async-lock": "^1.1.0", "async-lock": "^1.1.0",
"clean-git-ref": "^2.0.1", "clean-git-ref": "^2.0.1",
@ -4151,9 +4169,9 @@
"optional": true "optional": true
}, },
"node_modules/mocha": { "node_modules/mocha": {
"version": "10.2.0", "version": "10.3.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz",
"integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ansi-colors": "4.1.1", "ansi-colors": "4.1.1",
@ -4163,13 +4181,12 @@
"diff": "5.0.0", "diff": "5.0.0",
"escape-string-regexp": "4.0.0", "escape-string-regexp": "4.0.0",
"find-up": "5.0.0", "find-up": "5.0.0",
"glob": "7.2.0", "glob": "8.1.0",
"he": "1.2.0", "he": "1.2.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"log-symbols": "4.1.0", "log-symbols": "4.1.0",
"minimatch": "5.0.1", "minimatch": "5.0.1",
"ms": "2.1.3", "ms": "2.1.3",
"nanoid": "3.3.3",
"serialize-javascript": "6.0.0", "serialize-javascript": "6.0.0",
"strip-json-comments": "3.1.1", "strip-json-comments": "3.1.1",
"supports-color": "8.1.1", "supports-color": "8.1.1",
@ -4184,44 +4201,27 @@
}, },
"engines": { "engines": {
"node": ">= 14.0.0" "node": ">= 14.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mochajs"
} }
}, },
"node_modules/mocha/node_modules/glob": { "node_modules/mocha/node_modules/glob": {
"version": "7.2.0", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
"inflight": "^1.0.4", "inflight": "^1.0.4",
"inherits": "2", "inherits": "2",
"minimatch": "^3.0.4", "minimatch": "^5.0.1",
"once": "^1.3.0", "once": "^1.3.0"
"path-is-absolute": "^1.0.0"
}, },
"engines": { "engines": {
"node": "*" "node": ">=12"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/mocha/node_modules/glob/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/mocha/node_modules/minimatch": { "node_modules/mocha/node_modules/minimatch": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
@ -4284,18 +4284,6 @@
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
}, },
"node_modules/nanoid": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
"integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
"dev": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/napi-build-utils": { "node_modules/napi-build-utils": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
@ -4676,9 +4664,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.4.33", "version": "8.4.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
"integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -5330,9 +5318,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.2.2", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.2.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A==", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true, "dev": true,
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
@ -5345,9 +5333,9 @@
} }
}, },
"node_modules/prettier-plugin-svelte": { "node_modules/prettier-plugin-svelte": {
"version": "3.1.2", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.1.2.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.2.tgz",
"integrity": "sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==", "integrity": "sha512-ZzzE/wMuf48/1+Lf2Ffko0uDa6pyCfgHV6+uAhtg2U0AAXGrhCSW88vEJNAkAxW5qyrFY1y1zZ4J8TgHrjW++Q==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"prettier": "^3.0.0", "prettier": "^3.0.0",
@ -5650,9 +5638,9 @@
} }
}, },
"node_modules/rollup-plugin-svelte": { "node_modules/rollup-plugin-svelte": {
"version": "7.1.6", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.1.6.tgz", "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.2.0.tgz",
"integrity": "sha512-nVFRBpGWI2qUY1OcSiEEA/kjCY2+vAjO9BI8SzA7NRrh2GTunLd6w2EYmnMt/atgdg8GvcNjLsmZmbQs/u4SQA==", "integrity": "sha512-Qvo5VNFQZtaI+sHSjcCIFDP+olfKVyslAoJIkL3DxuhUpNY5Ys0+hhxUY3kuEKt9BXFgkFJiiic/XRb07zdSbg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@rollup/pluginutils": "^4.1.0", "@rollup/pluginutils": "^4.1.0",
@ -6128,10 +6116,6 @@
"postcss": "^8.2.15" "postcss": "^8.2.15"
} }
}, },
"node_modules/submission-runner": {
"resolved": "../../shared/submission-runner",
"link": true
},
"node_modules/supports-color": { "node_modules/supports-color": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
@ -6157,17 +6141,18 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "4.2.8", "version": "4.2.12",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.8.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.12.tgz",
"integrity": "sha512-hU6dh1MPl8gh6klQZwK/n73GiAHiR95IkFsesLPbMeEZi36ydaXL/ZAb4g9sayT0MXzpxyZjR28yderJHxcmYA==", "integrity": "sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.2.1", "@ampproject/remapping": "^2.2.1",
"@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/sourcemap-codec": "^1.4.15",
"@jridgewell/trace-mapping": "^0.3.18", "@jridgewell/trace-mapping": "^0.3.18",
"@types/estree": "^1.0.1",
"acorn": "^8.9.0", "acorn": "^8.9.0",
"aria-query": "^5.3.0", "aria-query": "^5.3.0",
"axobject-query": "^3.2.1", "axobject-query": "^4.0.0",
"code-red": "^1.0.3", "code-red": "^1.0.3",
"css-tree": "^2.3.1", "css-tree": "^2.3.1",
"estree-walker": "^3.0.3", "estree-walker": "^3.0.3",
@ -6181,9 +6166,9 @@
} }
}, },
"node_modules/svelte-check": { "node_modules/svelte-check": {
"version": "3.6.3", "version": "3.6.7",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.3.tgz", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.7.tgz",
"integrity": "sha512-Q2nGnoysxUnB9KjnjpQLZwdjK62DHyW6nuH/gm2qteFnDk0lCehe/6z8TsIvYeKjC6luKaWxiNGyOcWiLLPSwA==", "integrity": "sha512-tKEjemK9FYCySAseCaIt+ps5o0XRvLC7ECjyJXXtO7vOQhR9E6JavgoUbGP1PCulD2OTcB/fi9RjV3nyF1AROw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.17", "@jridgewell/trace-mapping": "^0.3.17",
@ -6192,7 +6177,7 @@
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"sade": "^1.7.4", "sade": "^1.7.4",
"svelte-preprocess": "^5.1.0", "svelte-preprocess": "^5.1.3",
"typescript": "^5.0.3" "typescript": "^5.0.3"
}, },
"bin": { "bin": {
@ -6457,12 +6442,12 @@
} }
}, },
"node_modules/ts-api-utils": { "node_modules/ts-api-utils": {
"version": "1.0.2", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
"integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==", "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=16.13.0" "node": ">=16"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": ">=4.2.0" "typescript": ">=4.2.0"
@ -6531,9 +6516,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.3.3", "version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",

View File

@ -4,7 +4,7 @@
"description": "The student extension for BW's HSPC", "description": "The student extension for BW's HSPC",
"version": "0.0.1", "version": "0.0.1",
"engines": { "engines": {
"vscode": "^1.85.0" "vscode": "^1.87.0"
}, },
"categories": [ "categories": [
"Other" "Other"
@ -91,35 +91,34 @@
"@types/glob": "^8.1.0", "@types/glob": "^8.1.0",
"@types/mocha": "^10.0.6", "@types/mocha": "^10.0.6",
"@types/node": "20.x", "@types/node": "20.x",
"@types/vscode": "^1.85.0", "@types/vscode": "^1.87.0",
"@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^6.19.0", "@typescript-eslint/parser": "^7.2.0",
"@vscode/test-electron": "^2.3.8", "@vscode/test-electron": "^2.3.9",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"esbuild": "^0.19.11", "esbuild": "^0.20.1",
"eslint": "^8.56.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
"glob": "^10.3.10", "glob": "^10.3.10",
"mocha": "^10.2.0", "mocha": "^10.3.0",
"postcss": "^8.4.33", "postcss": "^8.4.35",
"prettier": "^3.2.2", "prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.1.2", "prettier-plugin-svelte": "^3.2.2",
"rollup-plugin-css-only": "^4.5.2", "rollup-plugin-css-only": "^4.5.2",
"rollup-plugin-postcss": "^4.0.2", "rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-svelte": "^7.1.6", "rollup-plugin-svelte": "^7.2.0",
"svelte": "^4.2.8", "svelte": "^4.2.12",
"svelte-check": "^3.6.3", "svelte-check": "^3.6.7",
"svelte-preprocess": "^5.1.3", "svelte-preprocess": "^5.1.3",
"typescript": "^5.3.3" "typescript": "^5.4.2"
}, },
"dependencies": { "dependencies": {
"@vscode/vsce": "^2.22.0", "@vscode/vsce": "^2.24.0",
"axios": "^1.6.5", "axios": "^1.6.7",
"contest-monitor-types": "file:../../shared/contest-monitor-types", "bwcontest-shared": "file:../../shared",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"isomorphic-git": "^1.25.3", "isomorphic-git": "^1.25.6",
"submission-runner": "file:../../shared/submission-runner",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"url-join": "^5.0.0", "url-join": "^5.0.0",
"zod": "^3.22.4" "zod": "^3.22.4"

View File

@ -9,7 +9,7 @@ import type {
ProblemNameForExtension, ProblemNameForExtension,
SubmissionForExtension, SubmissionForExtension,
SubmissionStateForExtension SubmissionStateForExtension
} from 'contest-monitor-types/contestMonitorTypes'; } from 'bwcontest-shared/types/contestMonitorTypes';
import { TeamData } from './sharedTypes'; import { TeamData } from './sharedTypes';
import { import {
ContestTeamState, ContestTeamState,

View File

@ -7,7 +7,7 @@ import type {
ProblemNameForExtension, ProblemNameForExtension,
FullStateForExtension, FullStateForExtension,
SubmissionForExtension SubmissionForExtension
} from 'contest-monitor-types/contestMonitorTypes'; } from 'bwcontest-shared/types/contestMonitorTypes';
import { LiteEvent } from '../utilities/LiteEvent'; import { LiteEvent } from '../utilities/LiteEvent';
export type ContestTeamState = { export type ContestTeamState = {

View File

@ -2,11 +2,11 @@ import * as vscode from 'vscode';
import { getNonce } from './getNonce'; import { getNonce } from './getNonce';
import urlJoin from 'url-join'; import urlJoin from 'url-join';
import { extensionSettings } from './extension'; import { extensionSettings } from './extension';
import { runJava } from 'submission-runner/java.cjs'; import { runJava } from 'bwcontest-shared/submission-runner/java.cjs';
import { join } from 'path'; import { join } from 'path';
import { submitProblem } from './submit'; import { submitProblem } from './submit';
import { runCSharp } from 'submission-runner/csharp.cjs'; import { runCSharp } from 'bwcontest-shared/submission-runner/csharp.cjs';
import { runCpp } from 'submission-runner/cpp.cjs'; import { runCpp } from 'bwcontest-shared/submission-runner/cpp.cjs';
import { TeamData } from './sharedTypes'; import { TeamData } from './sharedTypes';
import outputPanelLog from './outputPanelLog'; import outputPanelLog from './outputPanelLog';
import { recordInitialSubmission } from './contestMonitor/contestStateSyncManager'; import { recordInitialSubmission } from './contestMonitor/contestStateSyncManager';

View File

@ -5,7 +5,7 @@ import path = require('path');
import http from 'isomorphic-git/http/node'; import http from 'isomorphic-git/http/node';
import urlJoin from 'url-join'; import urlJoin from 'url-join';
import outputPanelLog from './outputPanelLog'; import outputPanelLog from './outputPanelLog';
import type { SubmissionForExtension } from 'contest-monitor-types/contestMonitorTypes'; import type { SubmissionForExtension } from 'bwcontest-shared/types/contestMonitorTypes';
export async function submitProblem( export async function submitProblem(
sessionToken: string, sessionToken: string,

2
sandbox/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/node_modules
/build

3
sandbox/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cSpell.words": ["bwcontest"]
}

View File

@ -2,9 +2,6 @@ FROM ubuntu:22.04
# Setup # Setup
RUN mkdir sandbox
WORKDIR /app/sandbox
RUN apt-get update RUN apt-get update
RUN apt-get install curl -y RUN apt-get install curl -y
@ -23,24 +20,23 @@ ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
RUN git config --global user.name "Admin" RUN git config --global user.name "Admin"
RUN git config --global user.email noemail@example.com RUN git config --global user.email noemail@example.com
# Prep Sandbox # Prep Shared
WORKDIR /app/sandbox
COPY ./sandbox/package*.json ./
RUN npm install
COPY ./sandbox/ .
# Prep SubmissionRunner
WORKDIR /app WORKDIR /app
RUN mkdir shared RUN mkdir shared
RUN mkdir shared/submissionRunner WORKDIR /app/shared
WORKDIR /app/shared/submissionRunner COPY ./shared/package*.json ./
RUN npm ci
COPY ./shared .
# Prep Sandbox
RUN mkdir sandbox
WORKDIR /app/sandbox
COPY ./sandbox/package*.json ./
RUN npm ci
COPY ./sandbox/ .
COPY ./shared/submissionRunner/package*.json .
RUN npm install
COPY ./shared/submissionRunner/ .
# Build/Run # Build/Run

View File

@ -9,11 +9,11 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"bwcontest-shared": "file:../shared",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"rollup": "^4.12.1", "rollup": "^4.12.1",
"simple-git": "^3.22.0", "simple-git": "^3.22.0",
"submission-runner": "file:../shared/submission-runner",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"url-join": "^5.0.0", "url-join": "^5.0.0",
"zod": "^3.22.4" "zod": "^3.22.4"
@ -33,7 +33,24 @@
"typescript": "^5.4.2" "typescript": "^5.4.2"
} }
}, },
"../shared": {
"name": "bwcontest-shared",
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "20.x",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"fs-extra": "^11.2.0",
"prettier": "^3.2.5",
"tree-kill": "^1.2.2",
"typescript": "^5.4.2",
"zod": "^3.22.4"
}
},
"../shared/submission-runner": { "../shared/submission-runner": {
"extraneous": true,
"dependencies": { "dependencies": {
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
@ -1336,6 +1353,10 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/bwcontest-shared": {
"resolved": "../shared",
"link": true
},
"node_modules/callsites": { "node_modules/callsites": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -2693,10 +2714,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/submission-runner": {
"resolved": "../shared/submission-runner",
"link": true
},
"node_modules/supports-color": { "node_modules/supports-color": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",

View File

@ -28,11 +28,11 @@
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"dependencies": { "dependencies": {
"bwcontest-shared": "file:../shared",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"rollup": "^4.12.1", "rollup": "^4.12.1",
"simple-git": "^3.22.0", "simple-git": "^3.22.0",
"submission-runner": "file:../shared/submission-runner",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"url-join": "^5.0.0", "url-join": "^5.0.0",
"zod": "^3.22.4" "zod": "^3.22.4"

View File

@ -4,10 +4,10 @@ import urlJoin from 'url-join';
import os, { EOL } from 'os'; import os, { EOL } from 'os';
import { join } from 'path'; import { join } from 'path';
import { simpleGit, SimpleGit } from 'simple-git'; import { simpleGit, SimpleGit } from 'simple-git';
import { runJava } from 'submission-runner/java.cjs'; import { runJava } from 'bwcontest-shared/submission-runner/java.cjs';
import { runCSharp } from 'submission-runner/csharp.cjs'; import { runCSharp } from 'bwcontest-shared/submission-runner/csharp.cjs';
import { runCpp } from 'submission-runner/cpp.cjs'; import { runCpp } from 'bwcontest-shared/submission-runner/cpp.cjs';
import { RunResult, RunResultZod } from 'submission-runner/types.cjs'; import { RunResult, RunResultZod } from 'bwcontest-shared/submission-runner/types.cjs';
import { z } from 'zod'; import { z } from 'zod';
const submissionPostData = z const submissionPostData = z

View File

@ -4,7 +4,7 @@
"sourceMap": true, "sourceMap": true,
"outDir": "./build", "outDir": "./build",
"esModuleInterop": true, "esModuleInterop": true,
"strict": true, "strict": true
}, },
"include": ["src/**/*.ts"] "include": ["src/**/*.ts"]
} }

2
shared/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/node_modules
/build

14
shared/.eslintignore Normal file
View File

@ -0,0 +1,14 @@
.DS_Store
node_modules
/build
/.svelte-kit
/dist
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

26
shared/.eslintrc.js Normal file
View File

@ -0,0 +1,26 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {}
};

View File

@ -1 +1,2 @@
node_modules node_modules
/build

2
shared/.prettierignore Normal file
View File

@ -0,0 +1,2 @@
/node_modules
/dist

7
shared/.prettierrc Normal file
View File

@ -0,0 +1,7 @@
{
"tabWidth": 2,
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}

View File

@ -1,10 +0,0 @@
{
"name": "extensionWeb",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {}
}
}
}

View File

@ -1,3 +0,0 @@
{
"name": "contest-monitor-types"
}

View File

@ -1,12 +0,0 @@
{
"compilerOptions": {
"declaration": true,
"composite": true,
"emitDeclarationOnly": true,
"outDir": "./build",
"strict": true,
"target": "ESNext",
"moduleResolution": "Node"
},
"include": ["*.ts"]
}

2172
shared/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
shared/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "bwcontest-shared",
"scripts": {
"build": "esbuild submission-runner/*.cts --bundle --outdir=build/submission-runner --format=cjs --platform=node --sourcemap",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"check": "tsc -noEmit"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "20.x",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"fs-extra": "^11.2.0",
"prettier": "^3.2.5",
"tree-kill": "^1.2.2",
"typescript": "^5.4.2",
"zod": "^3.22.4"
}
}

View File

@ -1,148 +1,139 @@
import { join } from "path"; import { join } from 'path';
import { exec, spawn } from "child_process"; import { exec, spawn } from 'child_process';
import * as util from "util"; import * as util from 'util';
import type { import type { IRunner, IRunnerParams, IRunnerReturn, RunResult } from './types.cjs';
IRunner, import { timeoutSeconds } from './settings.cjs';
IRunnerParams, import kill from 'tree-kill';
IRunnerReturn, import * as os from 'os';
RunResult, import * as fs from 'fs-extra';
} from "./types.cjs";
import { timeoutSeconds } from "./settings.cjs";
import kill from "tree-kill";
import * as os from "os";
import * as fs from "fs-extra";
const execPromise = util.promisify(exec); const execPromise = util.promisify(exec);
export type CppPlatform = "VisualStudio" | "GCC"; export type CppPlatform = 'VisualStudio' | 'GCC';
interface IRunnerParamsCpp extends IRunnerParams { interface IRunnerParamsCpp extends IRunnerParams {
srcDir: string; srcDir: string;
problemName: string; problemName: string;
input: string; input: string;
cppPlatform: CppPlatform; cppPlatform: CppPlatform;
outputCallback?: (data: string) => void; outputCallback?: (data: string) => void;
} }
export const runCpp: IRunner<IRunnerParamsCpp> = async function ( export const runCpp: IRunner<IRunnerParamsCpp> = async function (
params: IRunnerParamsCpp params: IRunnerParamsCpp
): Promise<IRunnerReturn> { ): Promise<IRunnerReturn> {
const tmpDir = os.tmpdir(); const tmpDir = os.tmpdir();
const buildDir = join(tmpDir, "bwcontest-cpp"); const buildDir = join(tmpDir, 'bwcontest-cpp');
if (fs.existsSync(buildDir)) { if (fs.existsSync(buildDir)) {
fs.removeSync(buildDir); fs.removeSync(buildDir);
} }
fs.mkdirSync(buildDir); fs.mkdirSync(buildDir);
console.log(`- BUILD: ${params.problemName}`); console.log(`- BUILD: ${params.problemName}`);
const configureCommand = `cmake -S ${params.srcDir} -B ${buildDir}`; const configureCommand = `cmake -S ${params.srcDir} -B ${buildDir}`;
try { try {
await execPromise(configureCommand); await execPromise(configureCommand);
} catch (e) { } catch (e) {
const buildErrorText = e?.toString() ?? "Unknown build errors."; const buildErrorText = e?.toString() ?? 'Unknown build errors.';
console.log("Build errors: " + buildErrorText); console.log('Build errors: ' + buildErrorText);
return { return {
success: false, success: false,
runResult: { kind: "CompileFailed", resultKindReason: buildErrorText }, runResult: { kind: 'CompileFailed', resultKindReason: buildErrorText }
}; };
} }
const compileCommand = `cmake --build ${buildDir} --target ${params.problemName}`; const compileCommand = `cmake --build ${buildDir} --target ${params.problemName}`;
try { try {
await execPromise(compileCommand); await execPromise(compileCommand);
} catch (e) { } catch (e) {
const buildErrorText = e?.toString() ?? "Unknown build errors."; const buildErrorText = e?.toString() ?? 'Unknown build errors.';
console.log("Build errors: " + buildErrorText); console.log('Build errors: ' + buildErrorText);
return { return {
success: false, success: false,
runResult: { kind: "CompileFailed", resultKindReason: buildErrorText }, runResult: { kind: 'CompileFailed', resultKindReason: buildErrorText }
}; };
} }
console.log(`- RUN: ${params.problemName}`); console.log(`- RUN: ${params.problemName}`);
let runCommand = ""; let runCommand = '';
if (params.cppPlatform === "VisualStudio") { if (params.cppPlatform === 'VisualStudio') {
runCommand = `${join(buildDir, "Debug", `${params.problemName}.exe`)}`; runCommand = `${join(buildDir, 'Debug', `${params.problemName}.exe`)}`;
} else { } else {
runCommand = `${join(buildDir, params.problemName)}`; runCommand = `${join(buildDir, params.problemName)}`;
} }
try { try {
let outputBuffer = ""; let outputBuffer = '';
const child = spawn(runCommand, { shell: true }); const child = spawn(runCommand, { shell: true });
child.stdout.setEncoding("utf8"); child.stdout.setEncoding('utf8');
child.stdout.on("data", (data) => { child.stdout.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
}); });
child.stderr.setEncoding("utf8"); child.stderr.setEncoding('utf8');
child.stderr.on("data", (data) => { child.stderr.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
}); });
const runStartTime = performance.now(); const runStartTime = performance.now();
child.stdin.write(params.input); child.stdin.write(params.input);
child.stdin.end(); child.stdin.end();
let timeLimitExceeded = false; let timeLimitExceeded = false;
let completedNormally = false; let completedNormally = false;
return { return {
success: true, success: true,
runResult: new Promise<RunResult>((resolve) => { runResult: new Promise<RunResult>((resolve) => {
child.on("close", () => { child.on('close', () => {
completedNormally = !timeLimitExceeded; completedNormally = !timeLimitExceeded;
const runEndTime = performance.now(); const runEndTime = performance.now();
const runtimeMilliseconds = Math.floor(runEndTime - runStartTime); const runtimeMilliseconds = Math.floor(runEndTime - runStartTime);
if (completedNormally) { if (completedNormally) {
clearTimeout(timeoutHandle); clearTimeout(timeoutHandle);
resolve({ resolve({
kind: "Completed", kind: 'Completed',
output: outputBuffer, output: outputBuffer,
exitCode: child.exitCode!, exitCode: child.exitCode!,
runtimeMilliseconds, runtimeMilliseconds
}); });
} else { } else {
console.log( console.log(`Process terminated, total sandbox time: ${runtimeMilliseconds}ms`);
`Process terminated, total sandbox time: ${runtimeMilliseconds}ms` resolve({
); kind: 'TimeLimitExceeded',
resolve({ output: outputBuffer,
kind: "TimeLimitExceeded", resultKindReason: `Timeout after ${timeoutSeconds} seconds`
output: outputBuffer, });
resultKindReason: `Timeout after ${timeoutSeconds} seconds`, }
}); });
}
});
const timeoutHandle = setTimeout(() => { const timeoutHandle = setTimeout(() => {
if (completedNormally) { if (completedNormally) {
return; return;
} }
console.log( console.log(`Run timed out after ${timeoutSeconds} seconds, killing process...`);
`Run timed out after ${timeoutSeconds} seconds, killing process...` timeLimitExceeded = true;
);
timeLimitExceeded = true;
child.stdin.end(); child.stdin.end();
child.stdin.destroy(); child.stdin.destroy();
child.stdout.destroy(); child.stdout.destroy();
child.stderr.destroy(); child.stderr.destroy();
child.kill("SIGKILL"); child.kill('SIGKILL');
}, timeoutSeconds * 1000); }, timeoutSeconds * 1000);
}), }),
killFunc() { killFunc() {
if (child.pid !== undefined) { if (child.pid !== undefined) {
if (!completedNormally && !timeLimitExceeded) { if (!completedNormally && !timeLimitExceeded) {
kill(child.pid); kill(child.pid);
params.outputCallback?.("\n[Manually stopped]"); params.outputCallback?.('\n[Manually stopped]');
} }
} }
}, }
}; };
} catch (error) { } catch (error) {
return { success: false, runResult: { kind: "RunError" } }; return { success: false, runResult: { kind: 'RunError' } };
} }
}; };

View File

@ -1,94 +1,90 @@
import { spawn } from "child_process"; import { spawn } from 'child_process';
import kill from "tree-kill"; import kill from 'tree-kill';
import type { IRunner, IRunnerReturn, RunResult } from "./types.cjs"; import type { IRunner, IRunnerReturn, RunResult } from './types.cjs';
import { timeoutSeconds } from "./settings.cjs"; import { timeoutSeconds } from './settings.cjs';
export const runCSharp: IRunner = async function (params: { export const runCSharp: IRunner = async function (params: {
srcDir: string; srcDir: string;
input: string; input: string;
outputCallback?: (data: string) => void; outputCallback?: (data: string) => void;
}): Promise<IRunnerReturn> { }): Promise<IRunnerReturn> {
console.log(`- RUN: ${params.srcDir}`); console.log(`- RUN: ${params.srcDir}`);
const child = spawn("dotnet run", { shell: true, cwd: params.srcDir }); const child = spawn('dotnet run', { shell: true, cwd: params.srcDir });
try { try {
let outputBuffer = ""; let outputBuffer = '';
child.stdout.setEncoding("utf8"); child.stdout.setEncoding('utf8');
child.stdout.on("data", (data) => { child.stdout.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
params.outputCallback?.(data.toString()); params.outputCallback?.(data.toString());
}); });
child.stderr.setEncoding("utf8"); child.stderr.setEncoding('utf8');
child.stderr.on("data", (data) => { child.stderr.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
params.outputCallback?.(data.toString()); params.outputCallback?.(data.toString());
}); });
const runStartTime = performance.now(); const runStartTime = performance.now();
child.stdin.write(params.input); child.stdin.write(params.input);
child.stdin.end(); child.stdin.end();
let timeLimitExceeded = false; let timeLimitExceeded = false;
let completedNormally = false; let completedNormally = false;
return { return {
success: true, success: true,
runResult: new Promise<RunResult>((resolve) => { runResult: new Promise<RunResult>((resolve) => {
child.on("close", () => { child.on('close', () => {
completedNormally = !timeLimitExceeded; completedNormally = !timeLimitExceeded;
const runEndTime = performance.now(); const runEndTime = performance.now();
const runtimeMilliseconds = Math.floor(runEndTime - runStartTime); const runtimeMilliseconds = Math.floor(runEndTime - runStartTime);
if (completedNormally) { if (completedNormally) {
clearTimeout(timeoutHandle); clearTimeout(timeoutHandle);
resolve({ resolve({
kind: "Completed", kind: 'Completed',
output: outputBuffer, output: outputBuffer,
exitCode: child.exitCode!, exitCode: child.exitCode!,
runtimeMilliseconds, runtimeMilliseconds
}); });
} else { } else {
console.log( console.log(`Process terminated, total sandbox time: ${runtimeMilliseconds}ms`);
`Process terminated, total sandbox time: ${runtimeMilliseconds}ms` resolve({
); kind: 'TimeLimitExceeded',
resolve({ output: outputBuffer,
kind: "TimeLimitExceeded", resultKindReason: `Timeout after ${timeoutSeconds} seconds`
output: outputBuffer, });
resultKindReason: `Timeout after ${timeoutSeconds} seconds`, }
}); });
}
});
const timeoutHandle = setTimeout(() => { const timeoutHandle = setTimeout(() => {
if (completedNormally) { if (completedNormally) {
return; return;
} }
console.log( console.log(`Run timed out after ${timeoutSeconds} seconds, killing process...`);
`Run timed out after ${timeoutSeconds} seconds, killing process...` timeLimitExceeded = true;
);
timeLimitExceeded = true;
child.stdin.end(); child.stdin.end();
child.stdin.destroy(); child.stdin.destroy();
child.stdout.destroy(); child.stdout.destroy();
child.stderr.destroy(); child.stderr.destroy();
if (child.pid !== undefined) { if (child.pid !== undefined) {
kill(child.pid); kill(child.pid);
} }
}, timeoutSeconds * 1000); }, timeoutSeconds * 1000);
}), }),
killFunc() { killFunc() {
if (child.pid !== undefined) { if (child.pid !== undefined) {
if (!completedNormally && !timeLimitExceeded) { if (!completedNormally && !timeLimitExceeded) {
kill(child.pid); kill(child.pid);
params.outputCallback?.("\n[Manually stopped]"); params.outputCallback?.('\n[Manually stopped]');
} }
} }
}, }
}; };
} catch (error) { } catch (error) {
return { success: false, runResult: { kind: "RunError" } }; return { success: false, runResult: { kind: 'RunError' } };
} }
}; };

View File

@ -1,157 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCpp = void 0;
const path_1 = require("path");
const child_process_1 = require("child_process");
const util = __importStar(require("util"));
const settings_cjs_1 = require("./settings.cjs");
const kill = __importStar(require("kill"));
const os = __importStar(require("os"));
const fs = __importStar(require("fs-extra"));
const execPromise = util.promisify(child_process_1.exec);
const runCpp = function (params) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b;
const tmpDir = os.tmpdir();
const buildDir = (0, path_1.join)(tmpDir, "bwcontest-cpp");
if (fs.existsSync(buildDir)) {
fs.removeSync(buildDir);
}
fs.mkdirSync(buildDir);
console.log(`- BUILD: ${params.problemName}`);
const configureCommand = `cmake -S ${params.srcDir} -B ${buildDir}`;
try {
yield execPromise(configureCommand);
}
catch (e) {
const buildErrorText = (_a = e === null || e === void 0 ? void 0 : e.toString()) !== null && _a !== void 0 ? _a : "Unknown build errors.";
console.log("Build errors: " + buildErrorText);
return {
success: false,
runResult: { kind: "CompileFailed", resultKindReason: buildErrorText },
};
}
const compileCommand = `cmake --build ${buildDir} --target ${params.problemName}`;
try {
yield execPromise(compileCommand);
}
catch (e) {
const buildErrorText = (_b = e === null || e === void 0 ? void 0 : e.toString()) !== null && _b !== void 0 ? _b : "Unknown build errors.";
console.log("Build errors: " + buildErrorText);
return {
success: false,
runResult: { kind: "CompileFailed", resultKindReason: buildErrorText },
};
}
console.log(`- RUN: ${params.problemName}`);
let runCommand = "";
if (params.cppPlatform === "VisualStudio") {
runCommand = `${(0, path_1.join)(buildDir, "Debug", `${params.problemName}.exe`)}`;
}
else {
runCommand = `${(0, path_1.join)(buildDir, params.problemName)}`;
}
try {
let outputBuffer = "";
const child = (0, child_process_1.spawn)(runCommand, { shell: true });
child.stdout.setEncoding("utf8");
child.stdout.on("data", (data) => {
outputBuffer += data.toString();
});
child.stderr.setEncoding("utf8");
child.stderr.on("data", (data) => {
outputBuffer += data.toString();
});
const runStartTime = performance.now();
child.stdin.write(params.input);
child.stdin.end();
let timeLimitExceeded = false;
let completedNormally = false;
return {
success: true,
runResult: new Promise((resolve) => {
child.on("close", () => {
completedNormally = !timeLimitExceeded;
const runEndTime = performance.now();
const runtimeMilliseconds = Math.floor(runEndTime - runStartTime);
if (completedNormally) {
clearTimeout(timeoutHandle);
resolve({
kind: "Completed",
output: outputBuffer,
exitCode: child.exitCode,
runtimeMilliseconds,
});
}
else {
console.log(`Process terminated, total sandbox time: ${runtimeMilliseconds}ms`);
resolve({
kind: "TimeLimitExceeded",
output: outputBuffer,
resultKindReason: `Timeout after ${settings_cjs_1.timeoutSeconds} seconds`,
});
}
});
const timeoutHandle = setTimeout(() => {
if (completedNormally) {
return;
}
console.log(`Run timed out after ${settings_cjs_1.timeoutSeconds} seconds, killing process...`);
timeLimitExceeded = true;
child.stdin.end();
child.stdin.destroy();
child.stdout.destroy();
child.stderr.destroy();
child.kill("SIGKILL");
}, settings_cjs_1.timeoutSeconds * 1000);
}),
killFunc() {
var _a;
if (child.pid !== undefined) {
if (!completedNormally && !timeLimitExceeded) {
kill(child.pid);
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, "\n[Manually stopped]");
}
}
},
};
}
catch (error) {
return { success: false, runResult: { kind: "RunError" } };
}
});
};
exports.runCpp = runCpp;
//# sourceMappingURL=cpp.cjs.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cpp.cjs","sourceRoot":"","sources":["../cpp.cts"],"names":[],"mappings":"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"}

View File

@ -1,12 +0,0 @@
import type { IRunner, IRunnerParams } from "./types.cjs";
export type CppPlatform = "VisualStudio" | "GCC";
interface IRunnerParamsCpp extends IRunnerParams {
srcDir: string;
problemName: string;
input: string;
cppPlatform: CppPlatform;
outputCallback?: (data: string) => void;
}
export declare const runCpp: IRunner<IRunnerParamsCpp>;
export {};
//# sourceMappingURL=cpp.d.cts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cpp.d.cts","sourceRoot":"","sources":["../cpp.cts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EAGd,MAAM,aAAa,CAAC;AAQrB,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,KAAK,CAAC;AAEjD,UAAU,gBAAiB,SAAQ,aAAa;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAyH5C,CAAC"}

View File

@ -1,119 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCSharp = void 0;
const child_process_1 = require("child_process");
const kill = __importStar(require("tree-kill"));
const settings_cjs_1 = require("./settings.cjs");
const runCSharp = function (params) {
return __awaiter(this, void 0, void 0, function* () {
console.log(`- RUN: ${params.srcDir}`);
const child = (0, child_process_1.spawn)("dotnet run", { shell: true, cwd: params.srcDir });
try {
let outputBuffer = "";
child.stdout.setEncoding("utf8");
child.stdout.on("data", (data) => {
var _a;
outputBuffer += data.toString();
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, data.toString());
});
child.stderr.setEncoding("utf8");
child.stderr.on("data", (data) => {
var _a;
outputBuffer += data.toString();
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, data.toString());
});
const runStartTime = performance.now();
child.stdin.write(params.input);
child.stdin.end();
let timeLimitExceeded = false;
let completedNormally = false;
return {
success: true,
runResult: new Promise((resolve) => {
child.on("close", () => {
completedNormally = !timeLimitExceeded;
const runEndTime = performance.now();
const runtimeMilliseconds = Math.floor(runEndTime - runStartTime);
if (completedNormally) {
clearTimeout(timeoutHandle);
resolve({
kind: "Completed",
output: outputBuffer,
exitCode: child.exitCode,
runtimeMilliseconds,
});
}
else {
console.log(`Process terminated, total sandbox time: ${runtimeMilliseconds}ms`);
resolve({
kind: "TimeLimitExceeded",
output: outputBuffer,
resultKindReason: `Timeout after ${settings_cjs_1.timeoutSeconds} seconds`,
});
}
});
const timeoutHandle = setTimeout(() => {
if (completedNormally) {
return;
}
console.log(`Run timed out after ${settings_cjs_1.timeoutSeconds} seconds, killing process...`);
timeLimitExceeded = true;
child.stdin.end();
child.stdin.destroy();
child.stdout.destroy();
child.stderr.destroy();
if (child.pid !== undefined) {
kill(child.pid);
}
}, settings_cjs_1.timeoutSeconds * 1000);
}),
killFunc() {
var _a;
if (child.pid !== undefined) {
if (!completedNormally && !timeLimitExceeded) {
kill(child.pid);
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, "\n[Manually stopped]");
}
}
},
};
}
catch (error) {
return { success: false, runResult: { kind: "RunError" } };
}
});
};
exports.runCSharp = runCSharp;
//# sourceMappingURL=csharp.cjs.map

View File

@ -1 +0,0 @@
{"version":3,"file":"csharp.cjs","sourceRoot":"","sources":["../csharp.cts"],"names":[],"mappings":"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"}

View File

@ -1,3 +0,0 @@
import type { IRunner } from "./types.cjs";
export declare const runCSharp: IRunner;
//# sourceMappingURL=csharp.d.cts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"csharp.d.cts","sourceRoot":"","sources":["../csharp.cts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAA4B,MAAM,aAAa,CAAC;AAGrE,eAAO,MAAM,SAAS,EAAE,OAwFvB,CAAC"}

View File

@ -1,135 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runJava = void 0;
const path_1 = require("path");
const child_process_1 = require("child_process");
const util = __importStar(require("util"));
const settings_cjs_1 = require("./settings.cjs");
const kill = require("tree-kill");
const execPromise = util.promisify(child_process_1.exec);
const runJava = function (params) {
return __awaiter(this, void 0, void 0, function* () {
var _a;
console.log(`- BUILD: ${params.mainFile}`);
const compileCommand = `javac -cp ${(0, path_1.join)(params.srcDir, 'src')} ${params.mainFile} -d ${(0, path_1.join)(params.srcDir, 'build')}`;
try {
yield execPromise(compileCommand);
}
catch (e) {
const buildErrorText = (_a = e === null || e === void 0 ? void 0 : e.toString()) !== null && _a !== void 0 ? _a : 'Unknown build errors.';
console.log('Build errors: ' + buildErrorText);
return {
success: false,
runResult: { kind: 'CompileFailed', resultKindReason: buildErrorText }
};
}
console.log(`- RUN: ${params.mainClass}`);
const runCommand = `java -cp "${(0, path_1.join)(params.srcDir, 'build')}" ${params.mainClass}`;
try {
let outputBuffer = '';
const child = (0, child_process_1.spawn)(runCommand, { shell: true });
child.stdout.setEncoding('utf8');
child.stdout.on('data', (data) => {
var _a;
outputBuffer += data.toString();
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, data.toString());
});
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
var _a;
outputBuffer += data.toString();
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, data.toString());
});
const runStartTime = performance.now();
child.stdin.write(params.input);
child.stdin.end();
let timeLimitExceeded = false;
let completedNormally = false;
return {
success: true,
runResult: new Promise((resolve) => {
child.on('close', () => {
completedNormally = !timeLimitExceeded;
const runEndTime = performance.now();
const runtimeMilliseconds = Math.floor(runEndTime - runStartTime);
if (completedNormally) {
clearTimeout(timeoutHandle);
resolve({
kind: 'Completed',
output: outputBuffer,
exitCode: child.exitCode,
runtimeMilliseconds
});
}
else {
console.log(`Process terminated, total sandbox time: ${runtimeMilliseconds}ms`);
resolve({
kind: 'TimeLimitExceeded',
output: outputBuffer,
resultKindReason: `Timeout after ${settings_cjs_1.timeoutSeconds} seconds`
});
}
});
const timeoutHandle = setTimeout(() => {
if (completedNormally) {
return;
}
console.log(`Run timed out after ${settings_cjs_1.timeoutSeconds} seconds, killing process...`);
timeLimitExceeded = true;
child.stdin.end();
child.stdin.destroy();
child.stdout.destroy();
child.stderr.destroy();
child.kill('SIGKILL');
}, settings_cjs_1.timeoutSeconds * 1000);
}),
killFunc() {
var _a;
if (child.pid !== undefined) {
if (!completedNormally && !timeLimitExceeded) {
kill(child.pid);
(_a = params.outputCallback) === null || _a === void 0 ? void 0 : _a.call(params, '\n[Manually stopped]');
}
}
}
};
}
catch (error) {
return { success: false, runResult: { kind: 'RunError' } };
}
});
};
exports.runJava = runJava;
//# sourceMappingURL=java.cjs.map

View File

@ -1 +0,0 @@
{"version":3,"file":"java.cjs","sourceRoot":"","sources":["../java.cts"],"names":[],"mappings":"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"}

View File

@ -1,11 +0,0 @@
import type { IRunner, IRunnerParams } from './types.cjs';
interface IRunnerParamsJava extends IRunnerParams {
srcDir: string;
mainFile: string;
mainClass: string;
input: string;
outputCallback?: (data: string) => void;
}
export declare const runJava: IRunner<IRunnerParamsJava>;
export {};
//# sourceMappingURL=java.d.cts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"java.d.cts","sourceRoot":"","sources":["../java.cts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAA4B,MAAM,aAAa,CAAC;AAOpF,UAAU,iBAAkB,SAAQ,aAAa;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,iBAAiB,CA+F9C,CAAC"}

View File

@ -1,5 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.timeoutSeconds = void 0;
exports.timeoutSeconds = 30;
//# sourceMappingURL=settings.cjs.map

View File

@ -1 +0,0 @@
{"version":3,"file":"settings.cjs","sourceRoot":"","sources":["../settings.cts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,EAAE,CAAC"}

View File

@ -1,2 +0,0 @@
export declare const timeoutSeconds = 30;
//# sourceMappingURL=settings.d.cts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"settings.d.cts","sourceRoot":"","sources":["../settings.cts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,KAAK,CAAC"}

File diff suppressed because one or more lines are too long

View File

@ -1,21 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunResultZod = void 0;
const zod_1 = require("zod");
const RunResultKind = zod_1.z.enum([
'CompileFailed',
'TimeLimitExceeded',
'Completed',
'SandboxError',
'RunError'
]);
exports.RunResultZod = zod_1.z
.object({
kind: RunResultKind,
output: zod_1.z.string().optional(),
exitCode: zod_1.z.number().optional(),
runtimeMilliseconds: zod_1.z.number().optional(),
resultKindReason: zod_1.z.string().optional()
})
.strict();
//# sourceMappingURL=types.cjs.map

View File

@ -1 +0,0 @@
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../types.cts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,aAAa,GAAG,OAAC,CAAC,IAAI,CAAC;IAC5B,eAAe;IACf,mBAAmB;IACnB,WAAW;IACX,cAAc;IACd,UAAU;CACV,CAAC,CAAC;AAIU,QAAA,YAAY,GAAG,OAAC;KAC3B,MAAM,CAAC;IACP,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}

View File

@ -1,39 +0,0 @@
import { z } from 'zod';
declare const RunResultKind: z.ZodEnum<["CompileFailed", "TimeLimitExceeded", "Completed", "SandboxError", "RunError"]>;
export type RunResultKind = z.infer<typeof RunResultKind>;
export declare const RunResultZod: z.ZodObject<{
kind: z.ZodEnum<["CompileFailed", "TimeLimitExceeded", "Completed", "SandboxError", "RunError"]>;
output: z.ZodOptional<z.ZodString>;
exitCode: z.ZodOptional<z.ZodNumber>;
runtimeMilliseconds: z.ZodOptional<z.ZodNumber>;
resultKindReason: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
kind: "CompileFailed" | "TimeLimitExceeded" | "Completed" | "SandboxError" | "RunError";
output?: string | undefined;
exitCode?: number | undefined;
runtimeMilliseconds?: number | undefined;
resultKindReason?: string | undefined;
}, {
kind: "CompileFailed" | "TimeLimitExceeded" | "Completed" | "SandboxError" | "RunError";
output?: string | undefined;
exitCode?: number | undefined;
runtimeMilliseconds?: number | undefined;
resultKindReason?: string | undefined;
}>;
export type RunResult = z.infer<typeof RunResultZod>;
export interface IRunnerParams {
srcDir: string;
input: string;
outputCallback?: (data: string) => void;
}
export type IRunnerReturn = {
success: true;
killFunc: () => void;
runResult: Promise<RunResult>;
} | {
success: false;
runResult: RunResult;
};
export type IRunner<T extends IRunnerParams = IRunnerParams> = (params: T) => Promise<IRunnerReturn>;
export {};
//# sourceMappingURL=types.d.cts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../types.cts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,aAAa,4FAMjB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;EAQf,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD,MAAM,WAAW,aAAa;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,MAAM,aAAa,GACxB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAAE,GACtE;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAE1C,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAC1D,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC"}

View File

@ -3,8 +3,7 @@ import { exec, spawn } from 'child_process';
import * as util from 'util'; import * as util from 'util';
import type { IRunner, IRunnerParams, IRunnerReturn, RunResult } from './types.cjs'; import type { IRunner, IRunnerParams, IRunnerReturn, RunResult } from './types.cjs';
import { timeoutSeconds } from './settings.cjs'; import { timeoutSeconds } from './settings.cjs';
import kill from 'tree-kill';
import kill = require('tree-kill');
const execPromise = util.promisify(exec); const execPromise = util.promisify(exec);

View File

@ -1,118 +0,0 @@
{
"name": "submissionRunner",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"fs-extra": "^11.2.0",
"tree-kill": "^1.2.2",
"typescript": "^5.4.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "20.x"
}
},
"node_modules/@types/fs-extra": {
"version": "11.0.4",
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
"dev": true,
"dependencies": {
"@types/jsonfile": "*",
"@types/node": "*"
}
},
"node_modules/@types/jsonfile": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz",
"integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "20.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/fs-extra": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=14.14"
}
},
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"node_modules/jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/tree-kill": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
"bin": {
"tree-kill": "cli.js"
}
},
"node_modules/typescript": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/zod": {
"version": "3.22.4",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",
"integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

View File

@ -1,13 +0,0 @@
{
"name": "submission-runner",
"scripts": {
"build": "tsc"
},
"devDependencies": {
"@types/node": "20.x",
"@types/fs-extra": "^11.0.4",
"zod": "^3.22.4",
"tree-kill": "^1.2.2",
"fs-extra": "^11.2.0"
}
}

View File

@ -1 +1 @@
export const timeoutSeconds = 30; export const timeoutSeconds = 30;

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"composite": true,
"target": "es2016",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"esModuleInterop": true,
"strict": true,
},
"include": ["*.cts"]
}

View File

@ -29,8 +29,9 @@ export interface IRunnerParams {
} }
export type IRunnerReturn = export type IRunnerReturn =
{ success: true; killFunc: () => void; runResult: Promise<RunResult> } | | { success: true; killFunc: () => void; runResult: Promise<RunResult> }
{ success: false; runResult: RunResult }; | { success: false; runResult: RunResult };
export type IRunner<T extends IRunnerParams = IRunnerParams> = export type IRunner<T extends IRunnerParams = IRunnerParams> = (
(params: T) => Promise<IRunnerReturn>; params: T
) => Promise<IRunnerReturn>;

14
shared/tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"composite": true,
"target": "es2016",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./build",
"esModuleInterop": true,
"strict": true
},
"include": ["**/*.cts", "**/*.ts"]
}

3
web/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cSpell.words": ["bwcontest"]
}

View File

@ -2,9 +2,6 @@ FROM ubuntu:22.04
# Setup # Setup
RUN mkdir web
WORKDIR /app/web
RUN apt-get update RUN apt-get update
RUN apt-get install curl -y RUN apt-get install curl -y
@ -14,27 +11,26 @@ RUN apt-get install nodejs git -y
RUN git config --global user.name "Admin" RUN git config --global user.name "Admin"
RUN git config --global user.email noemail@example.com RUN git config --global user.email noemail@example.com
# Prep Web # Prep Shared
COPY ./web/package*.json ./
RUN npm install
COPY ./web/ .
# Prep extensionWeb
WORKDIR /app WORKDIR /app
RUN mkdir shared RUN mkdir shared
RUN mkdir shared/extensionWeb WORKDIR /app/shared
WORKDIR /app/shared/extensionWeb COPY ./shared/package*.json ./
RUN npm ci
COPY ./shared/ .
RUN npm run build
COPY ./shared/extensionWeb/package*.json . # Prep Web
RUN npm install
COPY ./shared/extensionWeb/ . RUN mkdir web
WORKDIR /app/web
COPY ./web/package*.json ./
RUN npm ci
COPY ./web/ .
# Env/Build/Run # Env/Build/Run
WORKDIR /app/web
ENV PORT=3000 ENV PORT=3000
EXPOSE 3000 EXPOSE 3000
EXPOSE 7006 EXPOSE 7006

View File

@ -30,36 +30,6 @@ node --version
# You should get back 20.x.x # You should get back 20.x.x
``` ```
You will need a database to work with so you need to install Postgres.
```bash
sudo apt install postgresql
```
Then start and enable it
```bash
sudo service postgresql start
sudo service postgresql enable
```
We will now create a database and user to work with
```bash
sudo -u postgres psql
```
This will open the postgres terminal, run these commands
```postgres
CREATE ROLE bwcontest WITH LOGIN PASSWORD 'pass123';
CREATE DATABASE bwcontest;
ALTER DATABASE bwcontest OWNER TO bwcontest;
GRANT ALL PRIVILEGES ON DATABASE bwcontest TO bwcontest;
```
Then type `\q` to exit. Feel free to change the role name, database name, and password to whatever you want. Just make sure to remember them. This is only for local development so it doesn't need to be very secure.
Now we can clone the repo. Remember, all development must be in WSL so we will clone the repo in WSL. So inside of WSL, I like to create a folder called `dev` inside my home folder, but feel free to clone it anywhere else inside of WSL. Ensure git is installed in WSL with `sudo apt install git -y` Now we can clone the repo. Remember, all development must be in WSL so we will clone the repo in WSL. So inside of WSL, I like to create a folder called `dev` inside my home folder, but feel free to clone it anywhere else inside of WSL. Ensure git is installed in WSL with `sudo apt install git -y`
```bash ```bash
@ -76,10 +46,12 @@ Make sure you have the WSL extension installed. You can then connect WSL by open
npm install npm install
``` ```
You will need a database to work with. There is a provided `docker-compose.yml` file to spin up a Postgres database for development. Navigate to the `web/docker/dev-postgres` directory and run `docker compose up -d`. This will spin up the database. You can stop it by running `docker compose down` in the same directory. To check running docker containers you can run `docker ps`.
Now you need to fill out an environment file for local development. Create a `.env` file in `web/.env`. Add this information or changed with the relevant details related to how you set up your database. Now you need to fill out an environment file for local development. Create a `.env` file in `web/.env`. Add this information or changed with the relevant details related to how you set up your database.
```env ```env
DATABASE_URL=postgresql://bwcontest:pass123@127.0.0.1:5432/bwcontest DATABASE_URL=postgresql://bwcontest:pass123@127.0.0.1:5433/bwcontest
``` ```
You now need to push the schema generated via the Prisma ORM to set up the tables in the database. This can be done by running... You now need to push the schema generated via the Prisma ORM to set up the tables in the database. This can be done by running...

198
web/package-lock.json generated
View File

@ -8,13 +8,13 @@
"name": "bw-hspc-contest-web", "name": "bw-hspc-contest-web",
"version": "0.0.1", "version": "0.0.1",
"dependencies": { "dependencies": {
"@prisma/client": "^5.10.2", "@prisma/client": "^5.11.0",
"@sveltejs/adapter-node": "^5.0.1", "@sveltejs/adapter-node": "^5.0.1",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3", "bootstrap-icons": "^1.11.3",
"contest-monitor-types": "file:../shared/contest-monitor-types", "bwcontest-shared": "file:../shared",
"diff": "^5.2.0", "diff": "^5.2.0",
"diff2html": "^3.4.47", "diff2html": "^3.4.47",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
@ -23,7 +23,7 @@
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"memfs": "^4.7.7", "memfs": "^4.7.7",
"node-git-server": "^1.0.0", "node-git-server": "^1.0.0",
"prisma": "^5.10.2", "prisma": "^5.11.0",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
@ -34,23 +34,41 @@
"@types/bootstrap": "^5.2.10", "@types/bootstrap": "^5.2.10",
"@types/diff": "^5.0.9", "@types/diff": "^5.0.9",
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/node": "^20.11.25", "@types/node": "^20.11.26",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.1.1", "@typescript-eslint/parser": "^7.2.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.2", "prettier-plugin-svelte": "^3.2.2",
"sass": "^1.71.1", "sass": "^1.71.1",
"svelte": "^4.2.12", "svelte": "^4.2.12",
"svelte-check": "^3.6.6", "svelte-check": "^3.6.7",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"typescript": "^5.4.2", "typescript": "^5.4.2",
"vite": "^5.1.6" "vite": "^5.1.6"
} }
}, },
"../shared/contest-monitor-types": {}, "../shared": {
"name": "bwcontest-shared",
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "20.x",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"fs-extra": "^11.2.0",
"prettier": "^3.2.5",
"tree-kill": "^1.2.2",
"typescript": "^5.4.2",
"zod": "^3.22.4"
}
},
"../shared/contest-monitor-types": {
"extraneous": true
},
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
"version": "1.2.6", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
@ -626,9 +644,9 @@
} }
}, },
"node_modules/@prisma/client": { "node_modules/@prisma/client": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.10.2.tgz", "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.11.0.tgz",
"integrity": "sha512-ef49hzB2yJZCvM5gFHMxSFL9KYrIP9udpT5rYo0CsHD4P9IKj473MbhU1gjKKftiwWBTIyrt9jukprzZXazyag==", "integrity": "sha512-SWshvS5FDXvgJKM/a0y9nDC1rqd7KG0Q6ZVzd+U7ZXK5soe73DJxJJgbNBt2GNXOa+ysWB4suTpdK5zfFPhwiw==",
"hasInstallScript": true, "hasInstallScript": true,
"engines": { "engines": {
"node": ">=16.13" "node": ">=16.13"
@ -643,43 +661,43 @@
} }
}, },
"node_modules/@prisma/debug": { "node_modules/@prisma/debug": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.10.2.tgz", "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.11.0.tgz",
"integrity": "sha512-bkBOmH9dpEBbMKFJj8V+Zp8IZHIBjy3fSyhLhxj4FmKGb/UBSt9doyfA6k1UeUREsMJft7xgPYBbHSOYBr8XCA==" "integrity": "sha512-N6yYr3AbQqaiUg+OgjkdPp3KPW1vMTAgtKX6+BiB/qB2i1TjLYCrweKcUjzOoRM5BriA4idrkTej9A9QqTfl3A=="
}, },
"node_modules/@prisma/engines": { "node_modules/@prisma/engines": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.10.2.tgz", "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.11.0.tgz",
"integrity": "sha512-HkSJvix6PW8YqEEt3zHfCYYJY69CXsNdhU+wna+4Y7EZ+AwzeupMnUThmvaDA7uqswiHkgm5/SZ6/4CStjaGmw==", "integrity": "sha512-gbrpQoBTYWXDRqD+iTYMirDlF9MMlQdxskQXbhARhG6A/uFQjB7DZMYocMQLoiZXO/IskfDOZpPoZE8TBQKtEw==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@prisma/debug": "5.10.2", "@prisma/debug": "5.11.0",
"@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", "@prisma/engines-version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",
"@prisma/fetch-engine": "5.10.2", "@prisma/fetch-engine": "5.11.0",
"@prisma/get-platform": "5.10.2" "@prisma/get-platform": "5.11.0"
} }
}, },
"node_modules/@prisma/engines-version": { "node_modules/@prisma/engines-version": {
"version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", "version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9.tgz", "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102.tgz",
"integrity": "sha512-uCy/++3Jx/O3ufM+qv2H1L4tOemTNqcP/gyEVOlZqTpBvYJUe0tWtW0y3o2Ueq04mll4aM5X3f6ugQftOSLdFQ==" "integrity": "sha512-WXCuyoymvrS4zLz4wQagSsc3/nE6CHy8znyiMv8RKazKymOMd5o9FP5RGwGHAtgoxd+aB/BWqxuP/Ckfu7/3MA=="
}, },
"node_modules/@prisma/fetch-engine": { "node_modules/@prisma/fetch-engine": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.10.2.tgz", "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.11.0.tgz",
"integrity": "sha512-dSmXcqSt6DpTmMaLQ9K8ZKzVAMH3qwGCmYEZr/uVnzVhxRJ1EbT/w2MMwIdBNq1zT69Rvh0h75WMIi0mrIw7Hg==", "integrity": "sha512-994viazmHTJ1ymzvWugXod7dZ42T2ROeFuH6zHPcUfp/69+6cl5r9u3NFb6bW8lLdNjwLYEVPeu3hWzxpZeC0w==",
"dependencies": { "dependencies": {
"@prisma/debug": "5.10.2", "@prisma/debug": "5.11.0",
"@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", "@prisma/engines-version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",
"@prisma/get-platform": "5.10.2" "@prisma/get-platform": "5.11.0"
} }
}, },
"node_modules/@prisma/get-platform": { "node_modules/@prisma/get-platform": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.10.2.tgz", "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.11.0.tgz",
"integrity": "sha512-nqXP6vHiY2PIsebBAuDeWiUYg8h8mfjBckHh6Jezuwej0QJNnjDiOq30uesmg+JXxGk99nqyG3B7wpcOODzXvg==", "integrity": "sha512-rxtHpMLxNTHxqWuGOLzR2QOyQi79rK1u1XYAVLZxDGTLz/A+uoDnjz9veBFlicrpWjwuieM4N6jcnjj/DDoidw==",
"dependencies": { "dependencies": {
"@prisma/debug": "5.10.2" "@prisma/debug": "5.11.0"
} }
}, },
"node_modules/@rollup/plugin-commonjs": { "node_modules/@rollup/plugin-commonjs": {
@ -1109,9 +1127,9 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.25", "version": "20.11.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.26.tgz",
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "integrity": "sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
@ -1140,16 +1158,16 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz",
"integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.5.1", "@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "7.1.1", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/type-utils": "7.1.1", "@typescript-eslint/type-utils": "7.2.0",
"@typescript-eslint/utils": "7.1.1", "@typescript-eslint/utils": "7.2.0",
"@typescript-eslint/visitor-keys": "7.1.1", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.2.4", "ignore": "^5.2.4",
@ -1175,15 +1193,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz",
"integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "7.1.1", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/types": "7.1.1", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/typescript-estree": "7.1.1", "@typescript-eslint/typescript-estree": "7.2.0",
"@typescript-eslint/visitor-keys": "7.1.1", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -1203,13 +1221,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz",
"integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.1.1", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/visitor-keys": "7.1.1" "@typescript-eslint/visitor-keys": "7.2.0"
}, },
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -1220,13 +1238,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz",
"integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "7.1.1", "@typescript-eslint/typescript-estree": "7.2.0",
"@typescript-eslint/utils": "7.1.1", "@typescript-eslint/utils": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.0.1" "ts-api-utils": "^1.0.1"
}, },
@ -1247,9 +1265,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz",
"integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -1260,13 +1278,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz",
"integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.1.1", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/visitor-keys": "7.1.1", "@typescript-eslint/visitor-keys": "7.2.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1312,17 +1330,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz",
"integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12", "@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0", "@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "7.1.1", "@typescript-eslint/scope-manager": "7.2.0",
"@typescript-eslint/types": "7.1.1", "@typescript-eslint/types": "7.2.0",
"@typescript-eslint/typescript-estree": "7.1.1", "@typescript-eslint/typescript-estree": "7.2.0",
"semver": "^7.5.4" "semver": "^7.5.4"
}, },
"engines": { "engines": {
@ -1337,12 +1355,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz",
"integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.1.1", "@typescript-eslint/types": "7.2.0",
"eslint-visitor-keys": "^3.4.1" "eslint-visitor-keys": "^3.4.1"
}, },
"engines": { "engines": {
@ -1596,6 +1614,10 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/bwcontest-shared": {
"resolved": "../shared",
"link": true
},
"node_modules/callsites": { "node_modules/callsites": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -1730,10 +1752,6 @@
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
}, },
"node_modules/contest-monitor-types": {
"resolved": "../shared/contest-monitor-types",
"link": true
},
"node_modules/cookie": { "node_modules/cookie": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
@ -3393,12 +3411,12 @@
} }
}, },
"node_modules/prisma": { "node_modules/prisma": {
"version": "5.10.2", "version": "5.11.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-5.10.2.tgz", "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.11.0.tgz",
"integrity": "sha512-hqb/JMz9/kymRE25pMWCxkdyhbnIWrq+h7S6WysJpdnCvhstbJSNP/S6mScEcqiB8Qv2F+0R3yG+osRaWqZacQ==", "integrity": "sha512-KCLiug2cs0Je7kGkQBN9jDWoZ90ogE/kvZTUTgz2h94FEo8pczCkPH7fPNXkD1sGU7Yh65risGGD1HQ5DF3r3g==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@prisma/engines": "5.10.2" "@prisma/engines": "5.11.0"
}, },
"bin": { "bin": {
"prisma": "build/index.js" "prisma": "build/index.js"
@ -3880,9 +3898,9 @@
} }
}, },
"node_modules/svelte-check": { "node_modules/svelte-check": {
"version": "3.6.6", "version": "3.6.7",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.6.tgz", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.7.tgz",
"integrity": "sha512-b9q9rOHOMYF3U8XllK7LmXTq1LeWQ98waGfEJzrFutViadkNl1tgdEtxIQ8yuPx+VQ4l7YrknYol+0lfZocaZw==", "integrity": "sha512-tKEjemK9FYCySAseCaIt+ps5o0XRvLC7ECjyJXXtO7vOQhR9E6JavgoUbGP1PCulD2OTcB/fi9RjV3nyF1AROw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.17", "@jridgewell/trace-mapping": "^0.3.17",

View File

@ -18,30 +18,30 @@
"@types/bootstrap": "^5.2.10", "@types/bootstrap": "^5.2.10",
"@types/diff": "^5.0.9", "@types/diff": "^5.0.9",
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/node": "^20.11.25", "@types/node": "^20.11.26",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.1.1", "@typescript-eslint/parser": "^7.2.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.2", "prettier-plugin-svelte": "^3.2.2",
"sass": "^1.71.1", "sass": "^1.71.1",
"svelte": "^4.2.12", "svelte": "^4.2.12",
"svelte-check": "^3.6.6", "svelte-check": "^3.6.7",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"typescript": "^5.4.2", "typescript": "^5.4.2",
"vite": "^5.1.6" "vite": "^5.1.6"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@prisma/client": "^5.10.2", "@prisma/client": "^5.11.0",
"@sveltejs/adapter-node": "^5.0.1", "@sveltejs/adapter-node": "^5.0.1",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3", "bootstrap-icons": "^1.11.3",
"contest-monitor-types": "file:../shared/contest-monitor-types", "bwcontest-shared": "file:../shared",
"diff": "^5.2.0", "diff": "^5.2.0",
"diff2html": "^3.4.47", "diff2html": "^3.4.47",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
@ -50,7 +50,7 @@
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"memfs": "^4.7.7", "memfs": "^4.7.7",
"node-git-server": "^1.0.0", "node-git-server": "^1.0.0",
"prisma": "^5.10.2", "prisma": "^5.11.0",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"zod": "^3.22.4" "zod": "^3.22.4"
} }

View File

@ -1,5 +1,5 @@
import type { SubmissionState } from '@prisma/client'; import type { SubmissionState } from '@prisma/client';
import type { SubmissionStateForExtension } from 'contest-monitor-types/contestMonitorTypes'; import type { SubmissionStateForExtension } from 'bwcontest-shared/types/contestMonitorTypes';
export function convertSubmissionStateForExtension( export function convertSubmissionStateForExtension(
state: SubmissionState state: SubmissionState

View File

@ -5,7 +5,7 @@ import type {
ContestStateForExtension, ContestStateForExtension,
FullStateForExtension, FullStateForExtension,
SubmissionForExtension SubmissionForExtension
} from 'contest-monitor-types/contestMonitorTypes'; } from 'bwcontest-shared/types/contestMonitorTypes';
import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils'; import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils';
export const GET = (async ({ params }) => { export const GET = (async ({ params }) => {

View File

@ -3,7 +3,7 @@ import { error, json } from '@sveltejs/kit';
import type { RequestHandler } from './$types'; import type { RequestHandler } from './$types';
import { z } from 'zod'; import { z } from 'zod';
import { SubmissionState } from '@prisma/client'; import { SubmissionState } from '@prisma/client';
import type { SubmissionForExtension } from 'contest-monitor-types/contestMonitorTypes'; import type { SubmissionForExtension } from 'bwcontest-shared/types/contestMonitorTypes';
import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils'; import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils';
const submitPostData = z.object({ const submitPostData = z.object({