@@ -499,7 +499,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
499499 assert . notInclude ( error . message , secret ) ;
500500 } ) ;
501501
502- it . effect ( "adds passkey entitlements and both renderer protocols to signed macOS builds" , ( ) =>
502+ it . effect ( "adds passkey entitlements and the external protocol to signed macOS builds" , ( ) =>
503503 Effect . gen ( function * ( ) {
504504 const config = yield * createBuildConfig ( "mac" , "dmg" , "1.2.3" , true , false , undefined , {
505505 entitlementsPath : "/tmp/entitlements.mac.plist" ,
@@ -510,9 +510,30 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
510510 assert . equal ( config . appId , "com.t3tools.t3code" ) ;
511511 assert . equal ( mac . entitlements , "/tmp/entitlements.mac.plist" ) ;
512512 assert . equal ( mac . provisioningProfile , "/tmp/t3code.provisionprofile" ) ;
513- assert . deepStrictEqual ( mac . protocols , [
514- { name : "T3 Code" , schemes : [ "t3code" , "t3code-dev" ] } ,
515- ] ) ;
513+ assert . deepStrictEqual ( config . protocols , [ { name : "T3 Code" , schemes : [ "t3code" ] } ] ) ;
514+ assert . notProperty ( mac , "protocols" ) ;
515+ } ) . pipe ( Effect . provide ( ConfigProvider . layer ( ConfigProvider . fromEnv ( { env : { } } ) ) ) ) ,
516+ ) ;
517+
518+ it . effect ( "declares the external protocol for Linux desktop integration" , ( ) =>
519+ Effect . gen ( function * ( ) {
520+ const config = yield * createBuildConfig (
521+ "linux" ,
522+ "AppImage" ,
523+ "1.2.3" ,
524+ false ,
525+ false ,
526+ undefined ,
527+ undefined ,
528+ ) ;
529+
530+ const linux = config . linux as Record < string , unknown > ;
531+ assert . deepStrictEqual ( config . protocols , [ { name : "T3 Code" , schemes : [ "t3code" ] } ] ) ;
532+ assert . notProperty ( linux , "protocols" ) ;
533+ assert . notProperty (
534+ ( linux . desktop as { readonly entry : Record < string , unknown > } ) . entry ,
535+ "MimeType" ,
536+ ) ;
516537 } ) . pipe ( Effect . provide ( ConfigProvider . layer ( ConfigProvider . fromEnv ( { env : { } } ) ) ) ) ,
517538 ) ;
518539
@@ -529,6 +550,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
529550 ) ;
530551
531552 const win = config . win as Record < string , unknown > ;
553+ assert . deepStrictEqual ( config . protocols , [ { name : "T3 Code" , schemes : [ "t3code" ] } ] ) ;
532554 assert . equal ( win . icon , "icon.ico" ) ;
533555 assert . equal ( win . signAndEditExecutable , true ) ;
534556 assert . notProperty ( win , "azureSignOptions" ) ;
0 commit comments