[Web] Fix shared project importing

This commit is contained in:
orosmatthew 2024-03-11 20:29:02 -04:00
parent 753f77659a
commit 0d0d22b730
6 changed files with 11 additions and 7 deletions

6
web/package-lock.json generated
View File

@ -14,6 +14,7 @@
"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",
"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",
@ -49,6 +50,7 @@
"vite": "^5.1.6" "vite": "^5.1.6"
} }
}, },
"../shared/contest-monitor-types": {},
"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",
@ -1728,6 +1730,10 @@
"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",

View File

@ -41,6 +41,7 @@
"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",
"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",

View File

@ -1,5 +1,5 @@
import type { SubmissionState } from '@prisma/client'; import type { SubmissionState } from '@prisma/client';
import type { SubmissionStateForExtension } from '@extensionWeb/contestMonitorTypes.cjs'; import type { SubmissionStateForExtension } from 'contest-monitor-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 '@extensionWeb/contestMonitorTypes.cjs'; } from 'contest-monitor-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 '@extensionWeb/contestMonitorTypes.cjs'; import type { SubmissionForExtension } from 'contest-monitor-types/contestMonitorTypes';
import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils'; import { convertSubmissionStateForExtension } from '$lib/contestMonitor/contestMonitorUtils';
const submitPostData = z.object({ const submitPostData = z.object({

View File

@ -6,10 +6,7 @@ const config = {
preprocess: vitePreprocess(), preprocess: vitePreprocess(),
kit: { kit: {
adapter: adapter(), adapter: adapter()
alias: {
'@extensionWeb/*': '../shared/extensionWeb/*'
}
}, },
vitePlugin: { vitePlugin: {
inspector: true inspector: true