File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 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'
33import { formatText } from './consts'
44import prompt from 'prompt-sync'
55import { CONFIG_VERSION } from './config-version'
6- import path from 'path'
6+ import path , { dirname } from 'path'
77import figlet from 'figlet'
8+ import { fileURLToPath } from 'url'
9+ const __filename = fileURLToPath ( import . meta. url )
10+ const __dirname = dirname ( __filename )
11+
812const deployConfig = path . join ( __dirname , '../bin/config.json' )
913
1014const 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'
22
33interface FormattingOptions {
44 bigHeader ?: boolean
@@ -59,7 +59,7 @@ export const formatText = (
5959 let outputText = ''
6060 const styles : ansi . Style [ ] = [ ]
6161 if ( formatting . bold === true ) {
62- styles . push ( ansi . style . bold as ansi . Style )
62+ styles . push ( ' bold' )
6363 }
6464 if ( formatting . textColor !== undefined ) {
6565 styles . push ( formatting . textColor )
@@ -68,10 +68,10 @@ export const formatText = (
6868 styles . push ( formatting . backgroundColor )
6969 }
7070 if ( formatting . italic === true ) {
71- styles . push ( ansi . style . italic as ansi . Style )
71+ styles . push ( ' italic' )
7272 }
7373 if ( formatting . underline === true ) {
74- styles . push ( ansi . style . underline as ansi . Style )
74+ styles . push ( ' underline' )
7575 }
7676 if ( styles . length > 0 ) {
7777 outputText = ansi . format ( text , styles )
Original file line number Diff line number Diff line change 33 "version" : " 1.2.0" ,
44 "type" : " module" ,
55 "scripts" : {
6- "config" : " node -r ts-node/register ./cli/config.ts" ,
6+ "config" : " tsx ./cli/config.ts" ,
77 "build" : " tsc && npm run codegen && npm run build:appsync && npm run build:ui" ,
88 "build:ui" : " cd lib/user-interface/genai-newsletter-ui/ && vite build" ,
99 "build:appsync" : " tsx ./lib/api/functions/bundle.ts" ,
You can’t perform that action at this time.
0 commit comments