Skip to content

Commit 7c1a0b7

Browse files
committed
normalize
1 parent 1fb9b63 commit 7c1a0b7

38 files changed

+211
-147
lines changed

backend/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "unitn-oj-backend",
3-
"private": true,
4-
"version": "0.0.0",
5-
"type": "module",
6-
"scripts": {
7-
"build": "echo \"TODO: backend build\"",
8-
"test": "echo \"TODO: backend test\""
9-
}
10-
}
2+
"name": "unitn-oj-backend",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"build": "echo \"TODO: backend build\"",
8+
"test": "echo \"TODO: backend test\""
9+
}
10+
}

frontend/biome.json renamed to biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"useIgnoreFile": true
77
},
88
"files": {
9-
"includes": ["d1/**/*", "src/**/*", "static/**/*", "tests/**/*"]
9+
"includes": ["backend/**/*", "frontend/**/*", "tests/**/*"]
1010
},
1111
"assist": {
1212
"enabled": true,

frontend/package.json

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,31 @@
11
{
2-
"name": "unitn-oj-frontend",
3-
"private": true,
4-
"version": "0.0.1",
5-
"type": "module",
6-
"scripts": {
7-
"db:apply:local": "wrangler d1 migrations apply DB --local",
8-
"db:seed:local": "wrangler d1 execute DB --local --file d1/seed/dev_seed.sql",
9-
"db:init:local": "pnpm db:apply:local && pnpm db:seed:local",
10-
"db:init": "pnpm db:init:local",
11-
"prepare": "svelte-kit sync",
12-
"build": "vite build",
13-
"preview": "vite preview",
14-
"dev": "pnpm prepare && pnpm build && wrangler pages dev",
15-
"e2e": "pnpm db:init && pnpm dev",
16-
"lint": "biome check",
17-
"fix": "biome check --fix",
18-
"format": "biome check --write",
19-
"test": "vitest --run",
20-
"check:ci": "pnpm lint && pnpm test",
21-
"check": "pnpm format && pnpm check:ci",
22-
"update": "pnpm up --latest && pnpm install"
23-
},
24-
"devDependencies": {
25-
"@biomejs/biome": "^2.2.2",
26-
"@cloudflare/workers-types": "^4.20250904.0",
27-
"@sveltejs/adapter-cloudflare": "^7.2.3",
28-
"@sveltejs/kit": "^2.37.0",
29-
"@sveltejs/vite-plugin-svelte": "^6.1.4",
30-
"@types/node": "^24.3.1",
31-
"sass-embedded": "^1.92.0",
32-
"svelte": "^5.38.6",
33-
"svelte-check": "^4.3.1",
34-
"typescript": "^5.9.2",
35-
"vite": "^7.1.4",
36-
"vitest": "^3.2.4",
37-
"wrangler": "^4.34.0"
38-
},
39-
"packageManager": "[email protected]"
2+
"name": "unitn-oj-frontend",
3+
"private": true,
4+
"version": "0.0.1",
5+
"packageManager": "[email protected]",
6+
"type": "module",
7+
"scripts": {
8+
"db:apply:local": "wrangler d1 migrations apply DB --local",
9+
"db:seed:local": "wrangler d1 execute DB --local --file d1/seed/dev_seed.sql",
10+
"db:init:local": "pnpm db:apply:local && pnpm db:seed:local",
11+
"db:init": "pnpm db:init:local",
12+
"prepare": "svelte-kit sync",
13+
"build": "vite build",
14+
"preview": "vite preview",
15+
"dev": "pnpm prepare && pnpm build && wrangler pages dev",
16+
"e2e": "pnpm db:init && pnpm dev"
17+
},
18+
"devDependencies": {
19+
"@cloudflare/workers-types": "^4.20250904.0",
20+
"@sveltejs/adapter-cloudflare": "^7.2.3",
21+
"@sveltejs/kit": "^2.37.0",
22+
"@sveltejs/vite-plugin-svelte": "^6.1.4",
23+
"@types/node": "^24.3.1",
24+
"sass-embedded": "^1.92.0",
25+
"svelte": "^5.38.6",
26+
"svelte-check": "^4.3.1",
27+
"typescript": "^5.9.2",
28+
"vite": "^7.1.4",
29+
"wrangler": "^4.34.0"
30+
}
4031
}

frontend/src/routes/api/v1/auth/logout/+server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { isProd } from "$lib/api/env";
2+
import { isProd } from "../../../../../lib/api/env";
33

44
export const POST: RequestHandler = async (event) => {
55
const prod = isProd(event.platform.env);

frontend/src/routes/api/v1/auth/requestLink/+server.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { getOptionalNumber, getRequired, isProd } from "$lib/api/env";
3-
import { httpError, httpJson, readJson } from "$lib/api/http";
2+
import {
3+
getOptionalNumber,
4+
getRequired,
5+
isProd,
6+
} from "../../../../../lib/api/env";
7+
import { httpError, httpJson, readJson } from "../../../../../lib/api/http";
48

59
function randomHex(len = 32) {
610
const bytes = new Uint8Array(len);

frontend/src/routes/api/v1/auth/verify/+server.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { signSession, userIdFromEmail } from "$lib/api/auth";
3-
import { getOptionalNumber, getRequired, isProd } from "$lib/api/env";
4-
import { httpError, readJson } from "$lib/api/http";
2+
import { signSession, userIdFromEmail } from "../../../../../lib/api/auth";
3+
import {
4+
getOptionalNumber,
5+
getRequired,
6+
isProd,
7+
} from "../../../../../lib/api/env";
8+
import { httpError, readJson } from "../../../../../lib/api/http";
59

610
const handleVerify: RequestHandler = async (event) => {
711
const { request, platform } = event;

frontend/src/routes/api/v1/courses/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { isProd } from "$lib/api/env";
3-
import { httpError, httpJson } from "$lib/api/http";
2+
import { isProd } from "../../../../lib/api/env";
3+
import { httpError, httpJson } from "../../../../lib/api/http";
44

55
export const GET: RequestHandler = async (event) => {
66
const env = event.platform.env as any;

frontend/src/routes/api/v1/courses/[courseId]/problems/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { isProd } from "$lib/api/env";
3-
import { httpError, httpJson } from "$lib/api/http";
2+
import { isProd } from "../../../../../../lib/api/env";
3+
import { httpError, httpJson } from "../../../../../../lib/api/http";
44

55
export const GET: RequestHandler = async (event) => {
66
const env = event.platform.env as any;

frontend/src/routes/api/v1/courses/[courseId]/problems/[id]/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { isProd } from "$lib/api/env";
3-
import { httpError, httpJson } from "$lib/api/http";
2+
import { isProd } from "../../../../../../../lib/api/env";
3+
import { httpError, httpJson } from "../../../../../../../lib/api/http";
44

55
export const GET: RequestHandler = async (event) => {
66
const env = event.platform.env as any;

frontend/src/routes/api/v1/courses/[id]/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RequestHandler } from "@sveltejs/kit";
2-
import { isProd } from "$lib/api/env";
3-
import { httpError, httpJson } from "$lib/api/http";
2+
import { isProd } from "../../../../../lib/api/env";
3+
import { httpError, httpJson } from "../../../../../lib/api/http";
44

55
export const GET: RequestHandler = async (event) => {
66
const env = event.platform.env as any;

0 commit comments

Comments
 (0)