mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-03 21:02:05 +08:00
- Updated package versions for '@supabase/*' libraries to 2.99.2 and '@supabase/ssr' to 0.9.0. - Added new devDependencies for 'rimraf' and 'framer-motion' in the pnpm-lock file. - Modified Next.js configuration to conditionally omit 'X-Frame-Options' in development mode for better integration with Stack Auth dev tools. - Refactored component exports in the template package to include tracking for dev tools. - Introduced new dev tool components and context for improved logging and state management. - Added styles for the dev tool indicator and panel, ensuring a consistent dark theme. - Implemented fetch interception to log API calls and user authentication events in the dev tool. <!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added comprehensive Developer Tools interface with tabs for Overview, Components, AI Chat, Console, Dashboard, and Support. * Integrated AI Chat assistant within Developer Tools for enhanced debugging. * Added component version tracking and update notifications. * Implemented API request logging and event monitoring. * Enhanced feedback system with support for bug reports and feature requests. * **Bug Fixes** * Fixed Content Security Policy headers for local development environments. * **Dependencies** * Added AI SDK integration packages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
import { describe } from "vitest";
|
|
import { it } from "../../../../../helpers";
|
|
import { niceBackendFetch } from "../../../../backend-helpers";
|
|
|
|
describe("GET /api/v1/internal/component-versions", () => {
|
|
it("should return page versions and changelogs", async ({ expect }) => {
|
|
const response = await niceBackendFetch("/api/v1/internal/component-versions", {
|
|
method: "GET",
|
|
});
|
|
|
|
expect(response.status).toBe(200);
|
|
|
|
const body = response.body;
|
|
expect(body).toHaveProperty("versions");
|
|
expect(typeof body.versions).toBe("object");
|
|
|
|
const expectedPages = [
|
|
"signIn",
|
|
"signUp",
|
|
"signOut",
|
|
"emailVerification",
|
|
"passwordReset",
|
|
"forgotPassword",
|
|
"oauthCallback",
|
|
"magicLinkCallback",
|
|
"accountSettings",
|
|
"teamInvitation",
|
|
"mfa",
|
|
"error",
|
|
"onboarding",
|
|
];
|
|
|
|
for (const page of expectedPages) {
|
|
expect(body.versions).toHaveProperty(page);
|
|
expect(body.versions[page]).toHaveProperty("version");
|
|
expect(typeof body.versions[page].version).toBe("number");
|
|
expect(body.versions[page]).toHaveProperty("changelogs");
|
|
expect(typeof body.versions[page].changelogs).toBe("object");
|
|
}
|
|
});
|
|
|
|
it("should reject non-GET methods", async ({ expect }) => {
|
|
const response = await niceBackendFetch("/api/v1/internal/component-versions", {
|
|
method: "POST",
|
|
body: {},
|
|
});
|
|
|
|
expect(response.status).toBe(405);
|
|
});
|
|
});
|