File tree 3 files changed +10
-6
lines changed
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ import { type DeployConfig } from '../lib/shared/common/deploy-config'
3
3
import { formatText } from './consts'
4
4
import prompt from 'prompt-sync'
5
5
import { CONFIG_VERSION } from './config-version'
6
- import path from 'path'
6
+ import path , { dirname } from 'path'
7
7
import figlet from 'figlet'
8
+ import { fileURLToPath } from 'url'
9
+ const __filename = fileURLToPath ( import . meta. url )
10
+ const __dirname = dirname ( __filename )
11
+
8
12
const deployConfig = path . join ( __dirname , '../bin/config.json' )
9
13
10
14
const prompter = prompt ( { sigint : true } )
Original file line number Diff line number Diff line change 1
- import * as ansi from 'ansi-escape-sequences'
1
+ import ansi from 'ansi-escape-sequences'
2
2
3
3
interface FormattingOptions {
4
4
bigHeader ?: boolean
@@ -59,7 +59,7 @@ export const formatText = (
59
59
let outputText = ''
60
60
const styles : ansi . Style [ ] = [ ]
61
61
if ( formatting . bold === true ) {
62
- styles . push ( ansi . style . bold as ansi . Style )
62
+ styles . push ( ' bold' )
63
63
}
64
64
if ( formatting . textColor !== undefined ) {
65
65
styles . push ( formatting . textColor )
@@ -68,10 +68,10 @@ export const formatText = (
68
68
styles . push ( formatting . backgroundColor )
69
69
}
70
70
if ( formatting . italic === true ) {
71
- styles . push ( ansi . style . italic as ansi . Style )
71
+ styles . push ( ' italic' )
72
72
}
73
73
if ( formatting . underline === true ) {
74
- styles . push ( ansi . style . underline as ansi . Style )
74
+ styles . push ( ' underline' )
75
75
}
76
76
if ( styles . length > 0 ) {
77
77
outputText = ansi . format ( text , styles )
Original file line number Diff line number Diff line change 3
3
"version" : " 1.2.0" ,
4
4
"type" : " module" ,
5
5
"scripts" : {
6
- "config" : " node -r ts-node/register ./cli/config.ts" ,
6
+ "config" : " tsx ./cli/config.ts" ,
7
7
"build" : " tsc && npm run codegen && npm run build:appsync && npm run build:ui" ,
8
8
"build:ui" : " cd lib/user-interface/genai-newsletter-ui/ && vite build" ,
9
9
"build:appsync" : " tsx ./lib/api/functions/bundle.ts" ,
You can’t perform that action at this time.
0 commit comments