@yawlabs/mcp 0.67.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -407,6 +407,11 @@ function getCachedCookie(home = homedir2()) {
|
|
|
407
407
|
const s = cachedState?.state ?? null;
|
|
408
408
|
return s ? s.cookie : null;
|
|
409
409
|
}
|
|
410
|
+
async function getSessionWithCookie(opts = {}) {
|
|
411
|
+
const filePath = opts.filePath ?? sessionStatePath(opts.home);
|
|
412
|
+
const state = await loadStoredState(filePath);
|
|
413
|
+
return state ? { cookie: state.cookie, session: state.session } : null;
|
|
414
|
+
}
|
|
410
415
|
function _resetForTests() {
|
|
411
416
|
invalidateState();
|
|
412
417
|
}
|
|
@@ -432,5 +437,6 @@ export {
|
|
|
432
437
|
postAnalyticsEvent,
|
|
433
438
|
listAnalyticsEvents,
|
|
434
439
|
getCachedCookie,
|
|
440
|
+
getSessionWithCookie,
|
|
435
441
|
_resetForTests
|
|
436
442
|
};
|