mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-19 08:48:34 +02:00
Fix variables incorrectly changed from let to const - revert to let where variables are reassigned
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
parent
a2526ea244
commit
27ac204bb6
17 changed files with 30 additions and 17 deletions
|
@ -47,7 +47,7 @@ export async function updateHolePunch(
|
|||
|
||||
|
||||
let currentSiteId: number | undefined;
|
||||
const destinations: PeerDestination[] = [];
|
||||
let destinations: PeerDestination[] = [];
|
||||
|
||||
if (olmId) {
|
||||
logger.debug(`Got hole punch with ip: ${ip}, port: ${port} for olmId: ${olmId}`);
|
||||
|
|
|
@ -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
|
||||
const subnets = sitesQuery.map((site) => site.subnet).filter((subnet) => subnet !== null);
|
||||
let 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(
|
||||
|
|
|
@ -62,7 +62,7 @@ const wss: WebSocketServer = new WebSocketServer({ noServer: true });
|
|||
const NODE_ID = uuidv4();
|
||||
|
||||
// Client tracking map (local to this node)
|
||||
const connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
|
||||
let connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
|
||||
// Helper to get map key
|
||||
const getClientMapKey = (clientId: string) => clientId;
|
||||
|
||||
|
|
|
@ -37,7 +37,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (rawConfig.server?.trust_proxy) {
|
||||
rawConfig.server.trust_proxy = 1;
|
||||
|
|
|
@ -24,7 +24,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
delete rawConfig.server.secure_cookies;
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.flags) {
|
||||
rawConfig.flags = {};
|
||||
|
|
|
@ -31,7 +31,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
const baseDomain = rawConfig.app.base_domain;
|
||||
const certResolver = rawConfig.traefik.cert_resolver;
|
||||
|
|
|
@ -23,7 +23,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.app || !rawConfig.app.base_url) {
|
||||
|
|
|
@ -23,7 +23,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.gerbil) {
|
||||
|
|
|
@ -26,7 +26,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.server) {
|
||||
|
|
|
@ -24,7 +24,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.server) {
|
||||
|
|
|
@ -59,7 +59,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
rawConfig.server.resource_session_request_param =
|
||||
"p_session_request";
|
||||
|
|
|
@ -44,7 +44,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.flags) {
|
||||
rawConfig.flags = {};
|
||||
|
|
|
@ -177,7 +177,8 @@ export default async function migration() {
|
|||
}
|
||||
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.server.secret) {
|
||||
rawConfig.server.secret = generateIdFromEntropySize(32);
|
||||
|
|
|
@ -45,7 +45,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (rawConfig.cors?.headers) {
|
||||
const headers = JSON.parse(
|
||||
|
|
|
@ -46,7 +46,8 @@ export default async function migration() {
|
|||
|
||||
// Read and parse the YAML file
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
let rawConfig: any;
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
if (rawConfig.server?.trust_proxy) {
|
||||
rawConfig.server.trust_proxy = 1;
|
||||
|
|
|
@ -34,7 +34,7 @@ export default async function RootLayout({
|
|||
const env = pullEnv();
|
||||
const locale = await getLocale();
|
||||
|
||||
const supporterData = {
|
||||
let supporterData = {
|
||||
visible: true
|
||||
} as any;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue