@@ -25,6 +25,7 @@ import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/Git
2525import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli" ;
2626import * as GitLabPullRequestCli from "@t3tools/source-control-gitlab/server/GitLabPullRequestCli" ;
2727import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli" ;
28+ import * as GitCafeApi from "@t3tools/source-control-gitcafe/server/GitCafeApi" ;
2829import * as ForgejoSourceControlProvider from "@t3tools/source-control-forgejo/server/ForgejoSourceControlProvider" ;
2930import * as ForgejoPullRequestProvider from "@t3tools/source-control-forgejo/server/ForgejoPullRequestProvider" ;
3031import * as SourceControlDiscovery from "./SourceControlDiscovery.ts" ;
@@ -53,6 +54,7 @@ const layerSourceControlProviderRegistryTest = (input: {
5354 Layer . mock ( GitLabCli . GitLabCli ) ( { } ) ,
5455 Layer . mock ( GitLabPullRequestCli . GitLabPullRequestCli ) ( { } ) ,
5556 Layer . mock ( ForgejoCli . ForgejoCli ) ( { listLogins : ( ) => Effect . succeed ( [ ] ) } ) ,
57+ Layer . mock ( GitCafeApi . GitCafeApi ) ( { } ) ,
5658 Layer . mock ( VcsDriverRegistry . VcsDriverRegistry ) ( { } ) ,
5759 Layer . mock ( VcsProcess . VcsProcess ) ( input . process ) ,
5860 ServerSourceControlHost . layer . pipe (
@@ -203,6 +205,12 @@ it.effect("reports implemented tools separately from locally available executabl
203205 auth : "unknown" ,
204206 account : Option . none ( ) ,
205207 } ,
208+ {
209+ kind : "gitcafe" ,
210+ status : "missing" ,
211+ auth : "unknown" ,
212+ account : Option . none ( ) ,
213+ } ,
206214 ] ,
207215 ) ;
208216 const bitbucket = result . sourceControlProviders . find ( ( item ) => item . kind === "bitbucket" ) ;
@@ -266,6 +274,13 @@ Logged in to gitlab.com as gitlab-user
266274 ) {
267275 return Effect . succeed ( processOutput ( "[email protected] \n" ) ) ; 268276 }
277+ if ( input . command === "cafe" && input . args . slice ( - 3 ) . join ( " " ) === "auth status --json" ) {
278+ return Effect . succeed (
279+ processOutput (
280+ encodeJson ( { schemaVersion : 1 , data : { host : "git.cafe" , username : "cafe-user" } } ) ,
281+ ) ,
282+ ) ;
283+ }
269284 return Effect . fail (
270285 new VcsProcessSpawnError ( {
271286 operation : input . operation ,
@@ -341,6 +356,12 @@ Logged in to gitlab.com as gitlab-user
341356 account : Option . some ( "forgejo-user" ) ,
342357 detail : Option . none ( ) ,
343358 } ,
359+ {
360+ kind : "gitcafe" ,
361+ auth : "authenticated" ,
362+ account : Option . some ( "cafe-user" ) ,
363+ detail : Option . none ( ) ,
364+ } ,
344365 ] ,
345366 ) ;
346367 } ) . pipe ( Effect . provide ( layerTest ) ) ;
0 commit comments