colors
This commit is contained in:
parent
84a341ebf9
commit
0f5fd50fec
1
bun.lock
1
bun.lock
|
|
@ -8,6 +8,7 @@
|
||||||
"commander": "^14.0.2",
|
"commander": "^14.0.2",
|
||||||
"forge": "git+https://git.nose.space/defunkt/forge",
|
"forge": "git+https://git.nose.space/defunkt/forge",
|
||||||
"hype": "git+https://git.nose.space/defunkt/hype",
|
"hype": "git+https://git.nose.space/defunkt/hype",
|
||||||
|
"kleur": "^4.1.5",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^14.0.2",
|
"commander": "^14.0.2",
|
||||||
"forge": "git+https://git.nose.space/defunkt/forge",
|
"forge": "git+https://git.nose.space/defunkt/forge",
|
||||||
"hype": "git+https://git.nose.space/defunkt/hype"
|
"hype": "git+https://git.nose.space/defunkt/hype",
|
||||||
|
"kleur": "^4.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
import { program } from 'commander'
|
import { program } from 'commander'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import type { App, LogLine } from '@types'
|
import type { App, LogLine } from '@types'
|
||||||
|
import color from 'kleur'
|
||||||
import { APPS_DIR } from '$apps'
|
import { APPS_DIR } from '$apps'
|
||||||
|
|
||||||
const HOST = `http://localhost:${process.env.PORT ?? 3000}`
|
const HOST = `http://localhost:${process.env.PORT ?? 3000}`
|
||||||
|
|
||||||
const STATE_ICONS: Record<string, string> = {
|
const STATE_ICONS: Record<string, string> = {
|
||||||
running: '●',
|
running: color.green('●'),
|
||||||
starting: '◎',
|
starting: color.yellow('◎'),
|
||||||
stopped: '◯',
|
stopped: color.gray('◯'),
|
||||||
invalid: '◌',
|
invalid: color.red('◌'),
|
||||||
}
|
}
|
||||||
|
|
||||||
async function get<T>(url: string): Promise<T | undefined> {
|
async function get<T>(url: string): Promise<T | undefined> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user