diff --git a/cli/commands/setAdminCredentials.ts b/cli/commands/setAdminCredentials.ts index c45da602..84a6c795 100644 --- a/cli/commands/setAdminCredentials.ts +++ b/cli/commands/setAdminCredentials.ts @@ -32,7 +32,7 @@ export const setAdminCredentials: CommandModule<{}, SetAdminCredentialsArgs> = { }, handler: async (argv: { email: string; password: string }) => { try { - let { email, password } = argv; + const { email, password } = argv; email = email.trim().toLowerCase(); const parsed = passwordSchema.safeParse(password); diff --git a/server/lib/remoteProxy.ts b/server/lib/remoteProxy.ts index 2dad9ba8..c9016071 100644 --- a/server/lib/remoteProxy.ts +++ b/server/lib/remoteProxy.ts @@ -70,4 +70,4 @@ export const proxyToRemote = async ( ) ); } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/server/lib/traefikConfig.ts b/server/lib/traefikConfig.ts index 7f4289a4..03656506 100644 --- a/server/lib/traefikConfig.ts +++ b/server/lib/traefikConfig.ts @@ -142,7 +142,7 @@ export class TraefikConfigManager { const lastUpdateExists = await this.fileExists(lastUpdatePath); let lastModified: Date | null = null; - let expiresAt: Date | null = null; + const expiresAt: Date | null = null; if (lastUpdateExists) { try { diff --git a/server/routers/badger/exchangeSession.ts b/server/routers/badger/exchangeSession.ts index b4289281..d6f2c7c7 100644 --- a/server/routers/badger/exchangeSession.ts +++ b/server/routers/badger/exchangeSession.ts @@ -55,7 +55,7 @@ export async function exchangeSession( let cleanHost = host; // if the host ends with :port if (cleanHost.match(/:[0-9]{1,5}$/)) { - let matched = ''+cleanHost.match(/:[0-9]{1,5}$/); + const matched = ''+cleanHost.match(/:[0-9]{1,5}$/); cleanHost = cleanHost.slice(0, -1*matched.length); } diff --git a/server/routers/badger/verifySession.ts b/server/routers/badger/verifySession.ts index 79951cb5..905f748d 100644 --- a/server/routers/badger/verifySession.ts +++ b/server/routers/badger/verifySession.ts @@ -123,7 +123,7 @@ export async function verifyResourceSession( let cleanHost = host; // if the host ends with :port, strip it if (cleanHost.match(/:[0-9]{1,5}$/)) { - let matched = ''+cleanHost.match(/:[0-9]{1,5}$/); + const matched = ''+cleanHost.match(/:[0-9]{1,5}$/); cleanHost = cleanHost.slice(0, -1*matched.length); } diff --git a/server/routers/gerbil/getConfig.ts b/server/routers/gerbil/getConfig.ts index f7663f53..77f7d2e0 100644 --- a/server/routers/gerbil/getConfig.ts +++ b/server/routers/gerbil/getConfig.ts @@ -109,7 +109,7 @@ export async function getConfig( ...req.body, endpoint: exitNode[0].endpoint, listenPort: exitNode[0].listenPort - } + }; return proxyToRemote(req, res, next, "hybrid/gerbil/get-config"); } diff --git a/server/routers/gerbil/updateHolePunch.ts b/server/routers/gerbil/updateHolePunch.ts index 9e2ec8b8..1662e420 100644 --- a/server/routers/gerbil/updateHolePunch.ts +++ b/server/routers/gerbil/updateHolePunch.ts @@ -125,7 +125,7 @@ export async function updateAndGenerateEndpointDestinations( exitNode: ExitNode ) { let currentSiteId: number | undefined; - let destinations: PeerDestination[] = []; + const destinations: PeerDestination[] = []; if (olmId) { logger.debug( diff --git a/server/routers/olm/handleOlmRegisterMessage.ts b/server/routers/olm/handleOlmRegisterMessage.ts index 536cf9c9..11ca8b5e 100644 --- a/server/routers/olm/handleOlmRegisterMessage.ts +++ b/server/routers/olm/handleOlmRegisterMessage.ts @@ -122,7 +122,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => { .where(eq(clientSites.clientId, client.clientId)); // Prepare an array to store site configurations - let siteConfigurations = []; + const siteConfigurations = []; logger.debug( `Found ${sitesData.length} sites for client ${client.clientId}` ); diff --git a/server/routers/traefik/getTraefikConfig.ts b/server/routers/traefik/getTraefikConfig.ts index 452c7228..f9a67432 100644 --- a/server/routers/traefik/getTraefikConfig.ts +++ b/server/routers/traefik/getTraefikConfig.ts @@ -49,7 +49,7 @@ export async function traefikConfigProvider( // Get the current exit node name from config await getCurrentExitNodeId(); - let traefikConfig = await getTraefikConfig( + const traefikConfig = await getTraefikConfig( currentExitNodeId, config.getRawConfig().traefik.site_types ); diff --git a/server/setup/scriptsPg/1.6.0.ts b/server/setup/scriptsPg/1.6.0.ts index 4e23fe4d..72d79e6c 100644 --- a/server/setup/scriptsPg/1.6.0.ts +++ b/server/setup/scriptsPg/1.6.0.ts @@ -37,7 +37,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (rawConfig.server?.trust_proxy) { diff --git a/server/setup/scriptsSqlite/1.0.0-beta10.ts b/server/setup/scriptsSqlite/1.0.0-beta10.ts index cf988f04..96c96f49 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta10.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta10.ts @@ -24,7 +24,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); delete rawConfig.server.secure_cookies; diff --git a/server/setup/scriptsSqlite/1.0.0-beta12.ts b/server/setup/scriptsSqlite/1.0.0-beta12.ts index 2fbc00b6..b3b87b3c 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta12.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta12.ts @@ -26,7 +26,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (!rawConfig.flags) { diff --git a/server/setup/scriptsSqlite/1.0.0-beta15.ts b/server/setup/scriptsSqlite/1.0.0-beta15.ts index ef82d029..bbd9fb6c 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta15.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta15.ts @@ -31,7 +31,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); const baseDomain = rawConfig.app.base_domain; diff --git a/server/setup/scriptsSqlite/1.0.0-beta2.ts b/server/setup/scriptsSqlite/1.0.0-beta2.ts index b2ad8386..2418085a 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta2.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta2.ts @@ -23,7 +23,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); // Validate the structure diff --git a/server/setup/scriptsSqlite/1.0.0-beta3.ts b/server/setup/scriptsSqlite/1.0.0-beta3.ts index 36fab908..83fc6978 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta3.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta3.ts @@ -23,7 +23,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); // Validate the structure diff --git a/server/setup/scriptsSqlite/1.0.0-beta5.ts b/server/setup/scriptsSqlite/1.0.0-beta5.ts index 44412ad0..3e80ad67 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta5.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta5.ts @@ -26,7 +26,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); // Validate the structure diff --git a/server/setup/scriptsSqlite/1.0.0-beta6.ts b/server/setup/scriptsSqlite/1.0.0-beta6.ts index ba927b35..5266010a 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta6.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta6.ts @@ -24,7 +24,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); // Validate the structure diff --git a/server/setup/scriptsSqlite/1.0.0-beta9.ts b/server/setup/scriptsSqlite/1.0.0-beta9.ts index 889f19a0..c5ede2f7 100644 --- a/server/setup/scriptsSqlite/1.0.0-beta9.ts +++ b/server/setup/scriptsSqlite/1.0.0-beta9.ts @@ -59,7 +59,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); rawConfig.server.resource_session_request_param = diff --git a/server/setup/scriptsSqlite/1.2.0.ts b/server/setup/scriptsSqlite/1.2.0.ts index c1c0b0b5..c6874766 100644 --- a/server/setup/scriptsSqlite/1.2.0.ts +++ b/server/setup/scriptsSqlite/1.2.0.ts @@ -44,7 +44,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (!rawConfig.flags) { diff --git a/server/setup/scriptsSqlite/1.3.0.ts b/server/setup/scriptsSqlite/1.3.0.ts index 820ce0ad..a1f8943a 100644 --- a/server/setup/scriptsSqlite/1.3.0.ts +++ b/server/setup/scriptsSqlite/1.3.0.ts @@ -177,7 +177,7 @@ export default async function migration() { } const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (!rawConfig.server.secret) { diff --git a/server/setup/scriptsSqlite/1.5.0.ts b/server/setup/scriptsSqlite/1.5.0.ts index 30dd98e7..f417b46d 100644 --- a/server/setup/scriptsSqlite/1.5.0.ts +++ b/server/setup/scriptsSqlite/1.5.0.ts @@ -45,7 +45,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (rawConfig.cors?.headers) { diff --git a/server/setup/scriptsSqlite/1.6.0.ts b/server/setup/scriptsSqlite/1.6.0.ts index 35915b7d..f38f0574 100644 --- a/server/setup/scriptsSqlite/1.6.0.ts +++ b/server/setup/scriptsSqlite/1.6.0.ts @@ -46,7 +46,7 @@ export default async function migration() { // Read and parse the YAML file const fileContents = fs.readFileSync(filePath, "utf8"); - let rawConfig: any; + const rawConfig: any; rawConfig = yaml.load(fileContents); if (rawConfig.server?.trust_proxy) {