Skip to content

Commit 3111a05

Browse files
committed
touches, fixes
1 parent 390c9c2 commit 3111a05

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- [2025-09-24] [touches, fixes](https://github.com/RubricLab/cli/commit/8c9981291684c9eaee20842b5cf692b3799178f5)
12
- [2025-09-24] [rm old file](https://github.com/RubricLab/cli/commit/1041d19da0188c9d642cb5937b3084f5f93fe767)
23
- [2025-09-24] [add ui](https://github.com/RubricLab/cli/commit/a809ae0177be8dfd9aa948b860e51a64fdf639db)
34
- [2025-07-01] [run format](https://github.com/RubricLab/cli/commit/7ca23a6d4940452913b3111c1d43b7179638dcf9)

lib/help.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { z } from 'zod/v4'
22
import { format } from './colors'
33
import type { Command } from './types'
4+
import { he } from 'zod/locales'
5+
import { heading } from './ui/heading'
46

57
export function showHelp({
68
commands,
@@ -22,6 +24,8 @@ export function showHelp({
2224
return
2325
}
2426

27+
heading(cliName)
28+
2529
console.log(`\n${format.title('USAGE')}`)
2630
console.log(` ${cliName} [command] [options]`)
2731

lib/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import type { CLI, Command } from './types'
33

44
export { format } from './colors'
55

6+
export * from './ui/heading'
7+
export * from './ui/text'
8+
export * from './ui/loader'
9+
export * from './ui/select'
10+
export * from './ui/multi-select'
11+
export * from './ui/input'
12+
613
import type { z } from 'zod/v4'
714
export type { Command, CLI }
815

lib/parse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { z } from 'zod/v4'
22
import { showHelp } from './help'
33
import type { Command } from './types'
44
import { kebabToCamel } from './utils'
5+
import { format } from './colors'
56

67
export async function parseCommand({
78
commands,

lib/ui/heading.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,4 @@ export function heading(text: string): void {
106106
}
107107
})
108108
process.stdout.write('\n')
109-
}
110-
111-
heading('create rubric app')
109+
}

lib/ui/input.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,35 +78,31 @@ export async function textInput({
7878
defaultValue,
7979
schema = z.string(),
8080
isMasked = false,
81-
placeholder
8281
}: {
8382
label: string
8483
defaultValue: string
8584
schema?: ZodType<string>
8685
isMasked?: boolean
87-
placeholder?: string
8886
}): Promise<string> {
89-
return ask({ defaultValue, isMasked, label, placeholder, schema })
87+
return ask({ defaultValue, isMasked, label, schema, placeholder: defaultValue })
9088
}
9189

9290
export async function passwordInput({
9391
label,
9492
defaultValue,
9593
schema = z.string(),
9694
isMasked = true,
97-
placeholder
9895
}: {
9996
label: string
10097
defaultValue: string
10198
schema?: ZodType<string>
10299
isMasked?: boolean
103-
placeholder?: string
104100
}): Promise<string> {
105101
return ask({
106102
defaultValue,
107103
isMasked,
108104
label,
109-
placeholder: placeholder ?? defaultValue,
105+
placeholder: defaultValue,
110106
schema
111107
})
112108
}

lib/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@ export function kebabToCamel(str: string): string {
44
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase())
55
}
66

7-
type Supported = ZodString /* */ | ZodNumber | ZodEnum /* select */ | ZodBoolean |
8-
9-
export function prompt<Schema extends ZodType>(schema: Schema): Promise<z.infer<Schema>> {
10-
console.log('Prompting for:')
11-
return ''
12-
}
7+
type Supported = ZodString /* */ | ZodNumber | ZodEnum /* select */ | ZodBoolean

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"simple-git-hooks": {
2222
"post-commit": "bun x @rubriclab/package post-commit"
2323
},
24-
"version": "0.0.13"
24+
"version": "0.0.14"
2525
}

0 commit comments

Comments
 (0)