@mkterswingman/5mghost-yonder 0.0.22 → 0.0.24
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.
package/dist/cli/setupCookies.js
CHANGED
|
@@ -375,6 +375,7 @@ export async function runManualCookieSetup(chromium, deps) {
|
|
|
375
375
|
export function parseSetupCookiesArgs(argv) {
|
|
376
376
|
return {
|
|
377
377
|
importOnly: argv.includes("--import-only"),
|
|
378
|
+
headed: argv.includes("--headed"),
|
|
378
379
|
};
|
|
379
380
|
}
|
|
380
381
|
export async function runSetupCookies(overrides = {}, options = {}) {
|
|
@@ -388,11 +389,13 @@ export async function runSetupCookies(overrides = {}, options = {}) {
|
|
|
388
389
|
catch {
|
|
389
390
|
throw new Error("Playwright runtime is not installed.\nRun: yt-mcp runtime install");
|
|
390
391
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
if (!options.headed) {
|
|
393
|
+
const imported = await deps.tryImportBrowserCookies(chromium, deps);
|
|
394
|
+
if (imported) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
394
397
|
}
|
|
395
|
-
if (options.importOnly) {
|
|
398
|
+
if (options.importOnly && !options.headed) {
|
|
396
399
|
throw new Error("No reusable YouTube session found in local Chrome/Edge profiles");
|
|
397
400
|
}
|
|
398
401
|
await deps.runManualCookieSetup(chromium, deps);
|