Skip to content

Commit

Permalink
refactor: use ansicolor instead of ansi-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Sep 30, 2024
1 parent dd7ad7b commit 76ea2c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@isdk/detect-text-language": "^0.1.1",
"@oclif/core": "^4",
"@offline-ai/cli-common": "workspace:*",
"ansi-colors": "^4.1.3",
"ansicolor": "^2.0.3",
"color-json": "^3.0.5",
"enquirer": "^2.4.1",
"lodash-es": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/prompt.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs'
import path from 'path'
import enquier from 'enquirer'
import colors from 'ansi-colors'
import colors from 'ansicolor'
// Input extends StringPrompt
const Input = (enquier as any).Input

Expand Down
6 changes: 3 additions & 3 deletions src/lib/run-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ux } from '@oclif/core'
import util from 'util'
import fs from 'fs'
import path from 'path'
import colors from 'ansi-colors'
import colors from 'ansicolor'
// import cliSpinners from 'cli-spinners'
import _logUpdate from 'log-update'
import { get as getByPath, omitBy } from 'lodash-es'
Expand Down Expand Up @@ -368,7 +368,7 @@ export async function runScript(filename: string, options: IRunScriptOptions) {
} finally {
if (!isSilence) {logUpdate.clear(options.consoleClear)}
if (lastError) {
console.log(colors.magentaBright(`<${lastError}>`))
console.log(colors.lightMagenta(`<${lastError}>`))
lastError = undefined
}
}
Expand Down Expand Up @@ -460,7 +460,7 @@ export async function runScript(filename: string, options: IRunScriptOptions) {
} finally {
if (!isSilence) {logUpdate.clear(options.consoleClear)}
if (lastError) {
input.write(colors.magentaBright(`<${lastError}>\n`))
input.write(colors.lightMagenta(`<${lastError}>\n`))
lastError = undefined
}
}
Expand Down

0 comments on commit 76ea2c7

Please sign in to comment.