Skip to content

Commit

Permalink
fix: write-sdl.ts linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Oct 31, 2023
1 parent f7b8eec commit 770e5e0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
6 changes: 6 additions & 0 deletions core/api/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load(
"@toolchains//workspace-pnpm:macros.bzl",
"dev_pnpm_task_binary",
"build_node_modules",
"tsc_build",
"prod_tsc_build",
Expand All @@ -10,6 +11,11 @@ load(
"madge_check",
)

dev_pnpm_task_binary(
name = "lint-fix",
command = "eslint-fix",
)

export_file(
name = "package.json",
visibility = ["PUBLIC"],
Expand Down
38 changes: 19 additions & 19 deletions core/api/src/servers/write-sdl.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Initialize mandatory environment variables with dummy values if not set
const envVarsWithDefaults = {
HELMREVISION: 'dummy',
KRATOS_PG_CON: 'dummy',
OATHKEEPER_DECISION_ENDPOINT: 'dummy',
NETWORK: 'dummy',
TWILIO_ACCOUNT_SID: 'dummy',
TWILIO_AUTH_TOKEN: 'dummy',
TWILIO_VERIFY_SERVICE_ID: 'dummy',
KRATOS_PUBLIC_API: 'dummy',
KRATOS_ADMIN_API: 'dummy',
KRATOS_MASTER_USER_PASSWORD: 'dummy',
KRATOS_CALLBACK_API_KEY: 'dummy',
BRIA_HOST: 'dummy',
BRIA_API_KEY: 'dummy',
MONGODB_CON: 'dummy',
REDIS_MASTER_NAME: 'dummy',
REDIS_PASSWORD: 'dummy',
REDIS_0_DNS: 'dummy'
};
HELMREVISION: "dummy",
KRATOS_PG_CON: "pg://dummy",
OATHKEEPER_DECISION_ENDPOINT: "http://dummy",
NETWORK: "regtest",
TWILIO_ACCOUNT_SID: "dummy",
TWILIO_AUTH_TOKEN: "dummy",
TWILIO_VERIFY_SERVICE_ID: "dummy",
KRATOS_PUBLIC_API: "http://dummy",
KRATOS_ADMIN_API: "http://dummy",
KRATOS_MASTER_USER_PASSWORD: "dummy",
KRATOS_CALLBACK_API_KEY: "dummy",
BRIA_HOST: "dummy",
BRIA_API_KEY: "dummy",
MONGODB_CON: "mongodb://dummy",
REDIS_MASTER_NAME: "dummy",
REDIS_PASSWORD: "dummy",
REDIS_0_DNS: "dummy",
}

for (const [envVar, defaultValue] of Object.entries(envVarsWithDefaults)) {
if (!process.env[envVar]) {
process.env[envVar] = defaultValue;
process.env[envVar] = defaultValue
}
}

Expand Down

0 comments on commit 770e5e0

Please sign in to comment.