All files / src workspace.ts

0% Statements 0/3
100% Branches 1/1
100% Functions 1/1
0% Lines 0/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61                                                                                                                         
/**
 * Workspace Session Storage - CLI/Extension only
 *
 * This module contains workspace-scoped session management with keytar integration.
 * It should NOT be imported in web builds as it requires the native keytar module.
 *
 * Usage:
 *   import { storeWorkspaceSession } from "@snapback/auth/workspace";
 *
 * @module workspace
 */
 
// Re-export workspace session types
export type {
	AuthMethod,
	SessionTokens,
	SessionUserInfo,
	WorkspaceSession,
	WorkspaceSessionEntry,
	WorkspaceSessionInfo,
	WorkspaceSessionRegistry,
} from "./workspace-session";
 
export {
	credentialsToWorkspaceSession,
	generateWorkspaceId,
	getExpiresIn,
	isSessionExpired,
	WorkspaceAuthError,
	WorkspaceAuthErrorCode,
	workspaceSessionToCredentials,
} from "./workspace-session";
 
// Re-export workspace session manager
export type { WorkspaceSessionManagerOptions } from "./workspace-session-manager";
export {
	getWorkspaceAuthHeaders,
	getWorkspaceSessionManager,
	getWorkspaceSessionQuick,
	isWorkspaceAuthenticated,
	WorkspaceSessionManager,
} from "./workspace-session-manager";
 
// Re-export workspace storage functions (requires keytar)
export {
	cleanupExpiredSessions,
	clearAllWorkspaceSessions,
	clearGlobalFallback,
	deleteRegistry,
	deleteWorkspaceSession,
	getGlobalFallback,
	getWorkspaceSession,
	listWorkspaceSessions,
	readRegistry,
	storeGlobalFallback,
	storeWorkspaceSession,
	touchWorkspaceSession,
	updateWorkspaceSessionTokens,
	writeRegistry,
} from "./workspace-storage";