mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 20:50:09 +01:00
remove chalk dep for cloudformation document generator
This commit is contained in:
parent
668a49c826
commit
040e0d3df7
@ -12,13 +12,27 @@ import fs from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
import path, { dirname } from 'path';
|
||||
import { exit } from 'process';
|
||||
import chalk from 'chalk';
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const REPLACEMENT_KEY = '!SUB::USER::CONTENT!'
|
||||
|
||||
const envPath = path.resolve(__dirname, `../../docker/.env`)
|
||||
const envFileExists = fs.existsSync(envPath);
|
||||
|
||||
const chalk = {
|
||||
redBright: function (text) {
|
||||
return `\x1b[31m${text}\x1b[0m`
|
||||
},
|
||||
cyan: function (text) {
|
||||
return `\x1b[36m${text}\x1b[0m`
|
||||
},
|
||||
greenBright: function (text) {
|
||||
return `\x1b[32m${text}\x1b[0m`
|
||||
},
|
||||
blueBright: function (text) {
|
||||
return `\x1b[34m${text}\x1b[0m`
|
||||
}
|
||||
}
|
||||
|
||||
if (!envFileExists) {
|
||||
console.log(chalk.redBright('[ABORT]'), 'You do not have an .env file in your ./docker/ folder. You need to create it first.');
|
||||
console.log('You can start by running', chalk.cyan('cp -n ./docker/.env.example ./docker/.env'))
|
||||
|
@ -18,8 +18,5 @@
|
||||
"prod:frontend": "cd frontend && yarn build",
|
||||
"generate:cloudformation": "node aws/cloudformation/generate.mjs"
|
||||
},
|
||||
"private": false,
|
||||
"devDependencies": {
|
||||
"chalk": "^5.2.0"
|
||||
}
|
||||
"private": false
|
||||
}
|
Loading…
Reference in New Issue
Block a user