@@ -2,9 +2,11 @@ import { Effect, Stream, Console } from 'effect';
22import { Command } from '@effect/platform' ;
33
44export const buildPackages = Command . make ( 'pnpm' , 'build' ) . pipe (
5- Command . string ,
6- Effect . flatMap ( ( output ) => Console . log ( output ) ) ,
5+ Command . lines ,
6+ Stream . tap ( ( line ) => Console . log ( `Build: ${ line } ` ) ) ,
7+ Stream . runDrain ,
78) ;
9+
810// Effect to check git status for staged files
911export const checkGitStatus = Command . make ( 'git' , 'status' , '--porcelain' ) . pipe (
1012 Command . string ,
@@ -32,15 +34,15 @@ export const runChangesetsSnapshot = Command.make(
3234 '--snapshot' ,
3335 'beta' ,
3436) . pipe (
35- Command . lines , // Get output line by line
36- Effect . tap ( ( line ) => Console . log ( `Changesets: ${ line } ` ) ) , // Log output
37+ Command . lines ,
38+ Stream . tap ( ( line ) => Console . log ( `Changesets: ${ line } ` ) ) ,
3739 Stream . runDrain , // Consume the stream and wait for completion
3840 Effect . tapBoth ( {
3941 onFailure : ( error ) =>
4042 Effect . fail ( Console . error ( `Changesets snapshot command failed: ${ error } ` ) ) ,
4143 onSuccess : ( ) => Console . log ( 'Changesets snapshot completed successfully.' ) ,
4244 } ) ,
43- Effect . asVoid , // Don't need the final result
45+ Effect . asVoid ,
4446) ;
4547
4648// Effect to start local registry (run in background)
@@ -62,9 +64,10 @@ export const publishPackages = Command.make(
6264 '--tag' ,
6365 'beta' ,
6466 '--registry=http://localhost:4873' ,
67+ '--no-git-checks' ,
6568) . pipe (
66- Command . lines , // Stream output line by line
67- Effect . tap ( ( line ) => Console . log ( `Publish: ${ line } ` ) ) ,
69+ Command . lines ,
70+ Stream . tap ( ( line ) => Console . log ( `Publish: ${ line } ` ) ) ,
6871 Stream . runDrain ,
6972 Effect . tapBoth ( {
7073 onFailure : ( error ) => Effect . fail ( ( ) => Console . error ( `Publishing failed: ${ error } ` ) ) ,
0 commit comments