@@ -39,23 +39,16 @@ interface PendingCloudAuthRequest {
3939}
4040
4141export interface DesktopCloudAuthShape {
42- readonly createRequest : Effect . Effect <
43- string ,
44- DesktopCloudAuthCallbackServerError ,
45- DesktopEnvironment . DesktopEnvironment
46- > ;
42+ readonly createRequest : Effect . Effect < string , DesktopCloudAuthCallbackServerError > ;
4743 readonly configure : Effect . Effect <
4844 void ,
4945 never ,
50- | DesktopEnvironment . DesktopEnvironment
51- | ElectronApp . ElectronApp
52- | ElectronWindow . ElectronWindow
53- | Scope . Scope
46+ ElectronApp . ElectronApp | ElectronWindow . ElectronWindow | Scope . Scope
5447 > ;
5548}
5649
5750export class DesktopCloudAuth extends Context . Service < DesktopCloudAuth , DesktopCloudAuthShape > ( ) (
58- "t3 /desktop/CloudAuth " ,
51+ "@t3tools /desktop/app/DesktopCloudAuth " ,
5952) { }
6053
6154export function resolveCloudAuthCallbackScheme ( input : { readonly isDevelopment : boolean } ) : string {
@@ -196,6 +189,7 @@ function startProtocolCallbackForwardServer(
196189
197190const make = Effect . gen ( function * ( ) {
198191 const crypto = yield * Crypto . Crypto ;
192+ const environment = yield * DesktopEnvironment . DesktopEnvironment ;
199193 let pendingAuthRequest : PendingCloudAuthRequest | null = null ;
200194 let dispatchCloudAuthCallback : ( rawUrl : string ) => void = ignoreCloudAuthCallback ;
201195 const makeCloudAuthRequestState = Effect . gen ( function * ( ) {
@@ -205,7 +199,6 @@ const make = Effect.gen(function* () {
205199
206200 return DesktopCloudAuth . of ( {
207201 createRequest : Effect . gen ( function * ( ) {
208- const environment = yield * DesktopEnvironment . DesktopEnvironment ;
209202 const scheme = resolveCloudAuthCallbackScheme ( {
210203 isDevelopment : environment . isDevelopment ,
211204 } ) ;
@@ -227,7 +220,6 @@ const make = Effect.gen(function* () {
227220 return redirectUrl ;
228221 } ) ,
229222 configure : Effect . gen ( function * ( ) {
230- const environment = yield * DesktopEnvironment . DesktopEnvironment ;
231223 const electronApp = yield * ElectronApp . ElectronApp ;
232224 const electronWindow = yield * ElectronWindow . ElectronWindow ;
233225 const scope = yield * Scope . Scope ;
0 commit comments