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:
copilot-swe-agent[bot] 2025-07-28 17:43:40 +00:00
parent a2526ea244
commit 27ac204bb6
17 changed files with 30 additions and 17 deletions

View file

@ -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;

View file

@ -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 = {};

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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";

View file

@ -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 = {};

View file

@ -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);

View file

@ -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(

View file

@ -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;