Skip to content

Commit

Permalink
Fixed setup script (PalisadoesFoundation#2512)
Browse files Browse the repository at this point in the history
* Fixed setup script

* Update package-lock.json

* Fixed linting error
  • Loading branch information
ARYANSHAH1567 authored Sep 9, 2024
1 parent 69f027c commit 6093752
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export async function wipeExistingData(url: string): Promise<void> {
}
console.log("All existing data has been deleted.");
}
} catch (error) {
} catch {
console.error("Could not connect to database to check for data");
}
client.close();
Expand All @@ -246,7 +246,7 @@ export async function checkDb(url: string): Promise<boolean> {
} else {
dbEmpty = true;
}
} catch (error) {
} catch {
console.error("Could not connect to database to check for data");
}
client.close();
Expand Down Expand Up @@ -706,7 +706,7 @@ async function main(): Promise<void> {
const { shouldGenerateAccessToken } = await inquirer.prompt({
type: "confirm",
name: "shouldGenerateAccessToken",
message: "Would you like to generate a new access token secret?",
message: "Would you like us to auto-generate a new access token secret?",
default: process.env.ACCESS_TOKEN_SECRET ? false : true,
});

Expand All @@ -722,7 +722,8 @@ async function main(): Promise<void> {
const { shouldGenerateRefreshToken } = await inquirer.prompt({
type: "confirm",
name: "shouldGenerateRefreshToken",
message: "Would you like to generate a new refresh token secret?",
message:
"Would you like to us to auto-generate a new refresh token secret?",
default: process.env.REFRESH_TOKEN_SECRET ? false : true,
});

Expand Down Expand Up @@ -859,7 +860,7 @@ async function main(): Promise<void> {
{
type: "input",
name: "serverPort",
message: "Enter the server port:",
message: "Enter the Talawa-API server port:",
default: process.env.SERVER_PORT || 4000,
},
]);
Expand Down Expand Up @@ -972,7 +973,8 @@ async function main(): Promise<void> {
const { overwriteDefaultData } = await inquirer.prompt({
type: "confirm",
name: "overwriteDefaultData",
message: "Do you want to import default data?",
message:
"Do you want to import the required default data to start using Talawa in a production environment?",
default: false,
});
if (overwriteDefaultData) {
Expand All @@ -982,7 +984,8 @@ async function main(): Promise<void> {
const { overwriteSampleData } = await inquirer.prompt({
type: "confirm",
name: "overwriteSampleData",
message: "Do you want to import sample data?",
message:
"Do you want to import Talawa sample data for testing and evaluation purposes?",
default: false,
});
if (overwriteSampleData) {
Expand All @@ -995,7 +998,8 @@ async function main(): Promise<void> {
const { shouldImportSampleData } = await inquirer.prompt({
type: "confirm",
name: "shouldImportSampleData",
message: "Do you want to import Sample data?",
message:
"Do you want to import Talawa sample data for testing and evaluation purposes?",
default: false,
});
if (shouldImportSampleData) {
Expand Down

0 comments on commit 6093752

Please sign in to comment.