mirror of
https://github.com/upstash/context7.git
synced 2026-09-14 19:09:34 +08:00
18b3292d01
* fix(cli): add token refresh support and centralize auth constants Expired OAuth tokens are now automatically refreshed via getValidAccessToken() instead of silently failing. CLI_CLIENT_ID moved to constants.ts to avoid duplication across auth.ts and setup.ts. * refactor(cli): internalize baseUrl and clientId in refreshAccessToken Make refreshAccessToken a private function that resolves getBaseUrl() and CLI_CLIENT_ID internally instead of requiring them as parameters. * test(cli): add unit tests for auth utilities and commands Add comprehensive vitest test suite covering OAuth PKCE flow, token persistence, token refresh, and CLI auth commands (login/logout/whoami). * chore: add changeset for CLI auth improvements * refactor: move CLI auth tests to src/__tests__/ Move auth test files from colocated __tests__ directories to a centralized src/__tests__/ directory, adjusting mock import paths accordingly.
10 lines
175 B
TypeScript
10 lines
175 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: "node",
|
|
include: ["src/**/*.test.ts"],
|
|
},
|
|
});
|