File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ name: Publish to npm
22
33on :
44 workflow_dispatch :
5+ release :
6+ types : [published]
57
68jobs :
79 publish :
Original file line number Diff line number Diff line change @@ -64,13 +64,11 @@ export async function browserLogin(): Promise<{
6464 throw new Error ( "No cookies found — login may not have completed." ) ;
6565 }
6666
67- // Find the earliest expiry among cookies that actually expire.
68- // Playwright uses -1 or 0 for session cookies (no expiry).
69- const expiries = playwrightCookies
70- . map ( ( c ) => c . expires )
71- . filter ( ( e ) => e > 0 ) ;
72- const expiresAt = expiries . length > 0
73- ? new Date ( Math . min ( ...expiries ) * 1000 ) . toISOString ( )
67+ // Find the auth token cookie expiry. Short-lived analytics cookies are
68+ // ignored — we care about when the actual auth session expires.
69+ const authCookie = playwrightCookies . find ( ( c ) => c . name === "__Host-auth-token" ) ;
70+ const expiresAt = authCookie && authCookie . expires > 0
71+ ? new Date ( authCookie . expires * 1000 ) . toISOString ( )
7472 : null ;
7573
7674 // Try to extract the commit hash from the app JS bundle filename.
You can’t perform that action at this time.
0 commit comments