diff --git a/web/package-lock.json b/web/package-lock.json index 12a5b7f..896fd3f 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -14,6 +14,7 @@ "bcrypt": "^5.1.1", "bootstrap": "^5.3.3", "bootstrap-icons": "^1.11.3", + "contest-monitor-types": "file:../shared/contest-monitor-types", "diff": "^5.2.0", "diff2html": "^3.4.47", "eslint-plugin-svelte": "^2.35.1", @@ -49,6 +50,7 @@ "vite": "^5.1.6" } }, + "../shared/contest-monitor-types": {}, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -1728,6 +1730,10 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, + "node_modules/contest-monitor-types": { + "resolved": "../shared/contest-monitor-types", + "link": true + }, "node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", diff --git a/web/package.json b/web/package.json index 0251e33..a5c8359 100644 --- a/web/package.json +++ b/web/package.json @@ -41,6 +41,7 @@ "bcrypt": "^5.1.1", "bootstrap": "^5.3.3", "bootstrap-icons": "^1.11.3", + "contest-monitor-types": "file:../shared/contest-monitor-types", "diff": "^5.2.0", "diff2html": "^3.4.47", "eslint-plugin-svelte": "^2.35.1", diff --git a/web/src/lib/contestMonitor/contestMonitorUtils.ts b/web/src/lib/contestMonitor/contestMonitorUtils.ts index 1cd0172..4984a8e 100644 --- a/web/src/lib/contestMonitor/contestMonitorUtils.ts +++ b/web/src/lib/contestMonitor/contestMonitorUtils.ts @@ -1,5 +1,5 @@ import type { SubmissionState } from '@prisma/client'; -import type { SubmissionStateForExtension } from '@extensionWeb/contestMonitorTypes.cjs'; +import type { SubmissionStateForExtension } from 'contest-monitor-types/contestMonitorTypes'; export function convertSubmissionStateForExtension( state: SubmissionState diff --git a/web/src/routes/api/team/[session]/contestState/+server.ts b/web/src/routes/api/team/[session]/contestState/+server.ts index f6ef2a5..6219b7a 100644 --- a/web/src/routes/api/team/[session]/contestState/+server.ts +++ b/web/src/routes/api/team/[session]/contestState/+server.ts @@ -5,7 +5,7 @@ import type { ContestStateForExtension, FullStateForExtension, SubmissionForExtension -} from '@extensionWeb/contestMonitorTypes.cjs'; +} from 'contest-monitor-types/contestMonitorTypes'; import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils'; export const GET = (async ({ params }) => { diff --git a/web/src/routes/api/team/[session]/submit/+server.ts b/web/src/routes/api/team/[session]/submit/+server.ts index 8858243..8ef9269 100644 --- a/web/src/routes/api/team/[session]/submit/+server.ts +++ b/web/src/routes/api/team/[session]/submit/+server.ts @@ -3,7 +3,7 @@ import { error, json } from '@sveltejs/kit'; import type { RequestHandler } from './$types'; import { z } from 'zod'; import { SubmissionState } from '@prisma/client'; -import type { SubmissionForExtension } from '@extensionWeb/contestMonitorTypes.cjs'; +import type { SubmissionForExtension } from 'contest-monitor-types/contestMonitorTypes'; import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils'; const submitPostData = z.object({ diff --git a/web/svelte.config.js b/web/svelte.config.js index bb17a10..e1d94e7 100644 --- a/web/svelte.config.js +++ b/web/svelte.config.js @@ -6,10 +6,7 @@ const config = { preprocess: vitePreprocess(), kit: { - adapter: adapter(), - alias: { - '@extensionWeb/*': '../shared/extensionWeb/*' - } + adapter: adapter() }, vitePlugin: { inspector: true