Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

fix: bound Windows OS credential PowerShell to the same 10s as macOS

fetw22e627039ba4
diff --git a/packages/credential-store-os/src/store.ts b/packages/credential-store-os/src/store.ts
index 805eea41..2f76e98a 100644
--- a/packages/credential-store-os/src/store.ts
+++ b/packages/credential-store-os/src/store.ts
@@ -67,6 +67,8 @@ type WindowsCredentialResult = {
const windowsScript = fileURLToPath(new URL("../runtime/windows-credential.ps1", import.meta.url));
+const windowsCredentialTimeoutMs = 10_000;
+
function windowsCredential(
operation: "read" | "write" | "delete",
service: string,
@@ -84,8 +86,13 @@ function windowsCredential(
const fail = (error: Error): void => {
if (settled) return;
settled = true;
+ clearTimeout(timer);
reject(error);
};
+ const timer = setTimeout(() => {
+ fail(new Error(`Windows credential ${operation} for ${account} timed out`));
+ child.kill("SIGKILL");
+ }, windowsCredentialTimeoutMs);
child.on("error", fail);
child.stdout.on("data", (chunk: Buffer) => {
stdout += chunk.toString("utf8");
@@ -97,6 +104,7 @@ function windowsCredential(
});
child.on("close", (code) => {
if (settled) return;
+ clearTimeout(timer);
if (code !== 0) {
fail(new Error(`Windows credential ${operation} for ${account} failed${stderr.trim().length === 0 ? "" : `: ${stderr.trim()}`}`));
return;