chore: remove retired native login paths
This commit is contained in:
1 parent
ea92a1a92b
commit
a36723a325
6 files changed
+18
-775
No files matched your search
@@ -1,28 +0,0 @@
|
||||
export interface NativeLoginHandoff {
|
||||
request(): void;
|
||||
}
|
||||
|
||||
export interface ProcessNativeLoginHandoffOptions {
|
||||
exitCode?: number;
|
||||
delayMs?: number;
|
||||
exit?: (code: number) => void;
|
||||
}
|
||||
|
||||
export class ProcessNativeLoginHandoff implements NativeLoginHandoff {
|
||||
private requested = false;
|
||||
private readonly exitCode: number;
|
||||
private readonly delayMs: number;
|
||||
private readonly exit: (code: number) => void;
|
||||
|
||||
constructor(options: ProcessNativeLoginHandoffOptions = {}) {
|
||||
this.exitCode = options.exitCode ?? 75;
|
||||
this.delayMs = options.delayMs ?? 250;
|
||||
this.exit = options.exit ?? ((code) => process.exit(code));
|
||||
}
|
||||
|
||||
request(): void {
|
||||
if (this.requested) return;
|
||||
this.requested = true;
|
||||
setTimeout(() => this.exit(this.exitCode), this.delayMs).unref();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user