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 1
1
import { Args , Command , Options } from "@effect/cli"
2
- import { Effect , Schema , pipe } from "effect"
2
+ import { Console , Effect , Schema , pipe } from "effect"
3
3
import { REGISTRY_URL } from "~/consts"
4
4
5
5
import {
8
8
HttpClientResponse ,
9
9
Command as RawCommand ,
10
10
} from "@effect/platform"
11
+ import chalk from "chalk"
11
12
import { Component } from "~/schema/component"
12
13
13
14
export const componentNames = Args . text ( { name : "componentNames" } ) . pipe ( Args . repeated )
@@ -38,10 +39,16 @@ export const addCommand = Command.make(
38
39
) ,
39
40
)
40
41
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
+
41
48
if ( allComponents ) {
42
49
const client = yield * HttpClient . HttpClient . pipe ( )
43
50
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 (
45
52
client . execute ,
46
53
Effect . flatMap ( HttpClientResponse . schemaBodyJson ( Schema . Array ( Component ) ) ) ,
47
54
)
You can’t perform that action at this time.
0 commit comments