This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11import { Args , Command , Options } from "@effect/cli"
2- import { Effect , Schema , pipe } from "effect"
2+ import { Console , Effect , Schema , pipe } from "effect"
33import { REGISTRY_URL } from "~/consts"
44
55import {
88 HttpClientResponse ,
99 Command as RawCommand ,
1010} from "@effect/platform"
11+ import chalk from "chalk"
1112import { Component } from "~/schema/component"
1213
1314export const componentNames = Args . text ( { name : "componentNames" } ) . pipe ( Args . repeated )
@@ -38,10 +39,16 @@ export const addCommand = Command.make(
3839 ) ,
3940 )
4041
42+ if ( ! allComponents && componentPaths . length === 0 ) {
43+ yield * Console . log ( chalk . red ( "No components selected" ) )
44+ yield * Console . log ( chalk . red ( "Please select a component or use --all" ) )
45+ return
46+ }
47+
4148 if ( allComponents ) {
4249 const client = yield * HttpClient . HttpClient . pipe ( )
4350
44- const response = yield * HttpClientRequest . get ( "http ://localhost:3000 /r/index.json" ) . pipe (
51+ const response = yield * HttpClientRequest . get ( "https ://intentui.com /r/index.json" ) . pipe (
4552 client . execute ,
4653 Effect . flatMap ( HttpClientResponse . schemaBodyJson ( Schema . Array ( Component ) ) ) ,
4754 )
You can’t perform that action at this time.
0 commit comments