Skip to content

Commit

Permalink
🙏 Remove "webSearchEnabled" variable
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed May 30, 2023
1 parent f2a8c5f commit 5ed625c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cli/src/envGenerator.js
Expand Up @@ -8,15 +8,12 @@ export const generateEnv = (envValues) => {
let platformUrl = isDockerCompose
? "http://host.docker.internal:8000"
: "http://localhost:8000";
const websearchEnabled =
envValues.serpApiKey !== null && envValues.serpApiKey !== "";

const envDefinition = getEnvDefinition(
envValues,
isDockerCompose,
dbPort,
platformUrl,
websearchEnabled
);

const envFileContent = generateEnvFileContent(envDefinition);
Expand All @@ -28,7 +25,6 @@ const getEnvDefinition = (
isDockerCompose,
dbPort,
platformUrl,
websearchEnabled
) => {
return {
"Deployment Environment": {
Expand Down Expand Up @@ -86,9 +82,9 @@ const generateEnvFileContent = (config) => {
let configFile = "";

Object.entries(config).forEach(([section, variables]) => {
configFile += `# ${section}:\n`;
configFile += `# ${ section }:\n`;
Object.entries(variables).forEach(([key, value]) => {
configFile += `${key}="${value}"\n`;
configFile += `${ key }="${ value }"\n`;
});
configFile += "\n";
});
Expand Down Expand Up @@ -137,15 +133,15 @@ export const testEnvFile = () => {
if (missingFromFile.length > 0) {
errorMessage += "\nYour ./next/.env is missing the following keys:\n";
missingFromFile.forEach((key) => {
errorMessage += chalk.whiteBright(`- ❌ ${key}\n`);
errorMessage += chalk.whiteBright(`- ❌ ${ key }\n`);
});
errorMessage += "\n";
}

if (missingFromDef.length > 0) {
errorMessage += "Your ./next/.env is missing the following keys:\n";
missingFromDef.forEach((key) => {
errorMessage += chalk.whiteBright(`- ⚠️ ${key}\n`);
errorMessage += chalk.whiteBright(`- ⚠️ ${ key }\n`);
});
errorMessage += "\n";
}
Expand Down

1 comment on commit 5ed625c

@vercel
Copy link

@vercel vercel bot commented on 5ed625c May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-reworkd.vercel.app
docs.reworkd.ai
docs-git-main-reworkd.vercel.app

Please sign in to comment.