This commit is contained in:
Owen 2025-08-10 10:14:45 -07:00
parent c3723d0fce
commit ea27075bab
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
8 changed files with 10 additions and 10 deletions

View file

@ -63,7 +63,7 @@ export async function getAllRelays(
}
// Initialize mappings object for multi-peer support
let mappings: { [key: string]: ProxyMapping } = {};
const mappings: { [key: string]: ProxyMapping } = {};
// Process each site
for (const site of sitesRes) {

View file

@ -238,7 +238,7 @@ export async function validateOidcCallback(
const defaultRoleMapping = existingIdp.idp.defaultRoleMapping;
const defaultOrgMapping = existingIdp.idp.defaultOrgMapping;
let userOrgInfo: { orgId: string; roleId: number }[] = [];
const userOrgInfo: { orgId: string; roleId: number }[] = [];
for (const org of allOrgs) {
const [idpOrgRes] = await db
.select()
@ -314,7 +314,7 @@ export async function validateOidcCallback(
let existingUserId = existingUser?.userId;
let orgUserCounts: { orgId: string; userCount: number }[] = [];
const orgUserCounts: { orgId: string; userCount: number }[] = [];
// sync the user with the orgs and roles
await db.transaction(async (trx) => {

View file

@ -102,7 +102,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}`);
if (sitesData.length === 0) {

View file

@ -86,7 +86,7 @@ export async function pickSiteDefaults(
.where(eq(sites.exitNodeId, exitNode.exitNodeId));
// TODO: we need to lock this subnet for some time so someone else does not take it
let subnets = sitesQuery.map((site) => site.subnet).filter((subnet) => subnet !== null);
const subnets = sitesQuery.map((site) => site.subnet).filter((subnet) => subnet !== null);
// exclude the exit node address by replacing after the / with a site block size
subnets.push(
exitNode.address.replace(

View file

@ -15,8 +15,8 @@ export async function pickPort(siteId: number): Promise<{
// TODO: is this all inefficient?
// Fetch targets for all resources of this site
let targetIps: string[] = [];
let targetInternalPorts: number[] = [];
const targetIps: string[] = [];
const targetInternalPorts: number[] = [];
await Promise.all(
resourcesRes.map(async (resource) => {
const targetsRes = await db

View file

@ -62,7 +62,7 @@ const wss: WebSocketServer = new WebSocketServer({ noServer: true });
const NODE_ID = uuidv4();
// Client tracking map (local to this node)
let connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
const connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
// Helper to get map key
const getClientMapKey = (clientId: string) => clientId;

View file

@ -280,7 +280,7 @@ export default function Page() {
return;
}
let payload: CreateClientBody = {
const payload: CreateClientBody = {
name: data.name,
type: data.method as "olm",
siteIds: data.siteIds.map((site) => parseInt(site.id)),

View file

@ -34,7 +34,7 @@ export default async function RootLayout({
const env = pullEnv();
const locale = await getLocale();
let supporterData = {
const supporterData = {
visible: true
} as any;