diff --git a/apps/web/app/(app)/connections/requests/[id]/page.tsx b/apps/web/app/(app)/connections/requests/[id]/page.tsx index 508b5b1a..b32dfd22 100644 --- a/apps/web/app/(app)/connections/requests/[id]/page.tsx +++ b/apps/web/app/(app)/connections/requests/[id]/page.tsx @@ -1,4 +1,4 @@ -import Link from "next/link"; +import Link from "@/components/Link"; import { notFound } from "next/navigation"; import { ExternalLink, KeyRound } from "lucide-react"; import { accessRequestForUser, catalogService, connectionsForRequest, type AccessRequestView, type CatalogService, type ConnectionView } from "@peppa/core"; diff --git a/apps/web/app/(app)/dashboard/questions/page.tsx b/apps/web/app/(app)/dashboard/questions/page.tsx index 6bf0f155..12723d9b 100644 --- a/apps/web/app/(app)/dashboard/questions/page.tsx +++ b/apps/web/app/(app)/dashboard/questions/page.tsx @@ -1,4 +1,4 @@ -import Link from "next/link"; +import Link from "@/components/Link"; import { notFound } from "next/navigation"; import { MessageCircleQuestion } from "lucide-react"; import { isSuperadmin } from "@peppa/core"; diff --git a/apps/web/components/AccessRequests.tsx b/apps/web/components/AccessRequests.tsx index 42a4b817..5f81261a 100644 --- a/apps/web/components/AccessRequests.tsx +++ b/apps/web/components/AccessRequests.tsx @@ -1,4 +1,4 @@ -import Link from "next/link"; +import Link from "@/components/Link"; import { KeyRound } from "lucide-react"; import type { AccessRequestView } from "@peppa/core"; import type { Translator } from "@peppa/shared/i18n"; diff --git a/openspec/specs/web-auth/spec.md b/openspec/specs/web-auth/spec.md index e1741127..79d7c7ca 100644 --- a/openspec/specs/web-auth/spec.md +++ b/openspec/specs/web-auth/spec.md @@ -287,6 +287,6 @@ nonce, созданные сервером для этого потока; по | адрес | показ | |---|---| -| http://git.telecom.quest/avatars/1 | https://git.telecom.quest/avatars/1 | -| https://git.telecom.quest/avatars/1 | https://git.telecom.quest/avatars/1 | +| http://git.vibe42.kz/avatars/1 | https://git.vibe42.kz/avatars/1 | +| https://git.vibe42.kz/avatars/1 | https://git.vibe42.kz/avatars/1 | | javascript:alert(1) | нет картинки | diff --git a/packages/core/src/observe.ts b/packages/core/src/observe.ts index b80d2ac5..773cf6ed 100644 --- a/packages/core/src/observe.ts +++ b/packages/core/src/observe.ts @@ -262,6 +262,9 @@ export function observeDb(): DatabaseSync { } /** Tests: forget opened files. */ +/** Index of the migration whose SQL mentions `needle` (the `user_version` right before it); -1 — none. For tests that put a file back before one migration. */ +export const observeMigrationIndex = (needle: string): number => MIGRATIONS.findIndex((m) => m.some((sql) => sql.includes(needle))); + export function closeObserveDb(): void { for (const db of opened.values()) db.close(); opened.clear(); diff --git a/packages/testkit/test/health-anon.test.ts b/packages/testkit/test/health-anon.test.ts index 03694a0c..05d74a68 100644 --- a/packages/testkit/test/health-anon.test.ts +++ b/packages/testkit/test/health-anon.test.ts @@ -88,8 +88,8 @@ describe("PEP-272: ответы веба не раскрывают служеб }); for (const [url, shown] of [ - ["http://git.telecom.quest/avatars/1", "https://git.telecom.quest/avatars/1"], - ["https://git.telecom.quest/avatars/1", "https://git.telecom.quest/avatars/1"], + ["http://git.vibe42.kz/avatars/1", "https://git.vibe42.kz/avatars/1"], + ["https://git.vibe42.kz/avatars/1", "https://git.vibe42.kz/avatars/1"], ["javascript:alert(1)", null], ["", null], ] as const) { @@ -99,7 +99,7 @@ describe("PEP-272: ответы веба не раскрывают служеб } test("Аватар Gitea по http сохраняется как https", async () => { - const u = await core.upsertUserFromGitea(db, { id: 72001, login: "mock-avatar", avatar_url: "http://git.telecom.quest/avatars/7" }, { access_token: "x" }); - assert.equal(u.avatarUrl, "https://git.telecom.quest/avatars/7"); + const u = await core.upsertUserFromGitea(db, { id: 72001, login: "mock-avatar", avatar_url: "http://git.vibe42.kz/avatars/7" }, { access_token: "x" }); + assert.equal(u.avatarUrl, "https://git.vibe42.kz/avatars/7"); }); }); diff --git a/packages/testkit/test/old-git-cleanup.test.ts b/packages/testkit/test/old-git-cleanup.test.ts index 70899e5a..1dedf161 100644 --- a/packages/testkit/test/old-git-cleanup.test.ts +++ b/packages/testkit/test/old-git-cleanup.test.ts @@ -72,7 +72,8 @@ function oldMonitor(hosts: string[]): number { VALUES ('Интернет', 'internet', ?, 60, 5000, 3, 2, 'system', ?, ?, ?) RETURNING id`, ) .get(JSON.stringify({ hosts }), iso, iso, iso) as { id: number }; - raw.exec("PRAGMA user_version = 3"); + // The version right before the PEP-281 migration — other migrations (PEP-217: web_vitals) stay applied. + raw.exec(`PRAGMA user_version = ${core.observeMigrationIndex(OLD_HOST)}`); raw.close(); return row.id; }