Adjust const one more time

This commit is contained in:
Owen 2025-08-23 15:36:19 -07:00
parent 8bcb2b3b0f
commit 5d34bd82c0
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
13 changed files with 13 additions and 26 deletions

View file

@ -37,8 +37,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (rawConfig.server?.trust_proxy) { if (rawConfig.server?.trust_proxy) {
rawConfig.server.trust_proxy = 1; rawConfig.server.trust_proxy = 1;

View file

@ -24,8 +24,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
delete rawConfig.server.secure_cookies; delete rawConfig.server.secure_cookies;

View file

@ -26,8 +26,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (!rawConfig.flags) { if (!rawConfig.flags) {
rawConfig.flags = {}; rawConfig.flags = {};

View file

@ -31,8 +31,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
const baseDomain = rawConfig.app.base_domain; const baseDomain = rawConfig.app.base_domain;
const certResolver = rawConfig.traefik.cert_resolver; const certResolver = rawConfig.traefik.cert_resolver;

View file

@ -23,8 +23,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
// Validate the structure // Validate the structure
if (!rawConfig.app || !rawConfig.app.base_url) { if (!rawConfig.app || !rawConfig.app.base_url) {

View file

@ -23,8 +23,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
// Validate the structure // Validate the structure
if (!rawConfig.gerbil) { if (!rawConfig.gerbil) {

View file

@ -26,8 +26,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
// Validate the structure // Validate the structure
if (!rawConfig.server) { if (!rawConfig.server) {

View file

@ -24,8 +24,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
// Validate the structure // Validate the structure
if (!rawConfig.server) { if (!rawConfig.server) {

View file

@ -59,8 +59,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
rawConfig.server.resource_session_request_param = rawConfig.server.resource_session_request_param =
"p_session_request"; "p_session_request";

View file

@ -44,8 +44,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (!rawConfig.flags) { if (!rawConfig.flags) {
rawConfig.flags = {}; rawConfig.flags = {};

View file

@ -177,8 +177,7 @@ export default async function migration() {
} }
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (!rawConfig.server.secret) { if (!rawConfig.server.secret) {
rawConfig.server.secret = generateIdFromEntropySize(32); rawConfig.server.secret = generateIdFromEntropySize(32);

View file

@ -45,8 +45,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (rawConfig.cors?.headers) { if (rawConfig.cors?.headers) {
const headers = JSON.parse( const headers = JSON.parse(

View file

@ -46,8 +46,7 @@ export default async function migration() {
// Read and parse the YAML file // Read and parse the YAML file
const fileContents = fs.readFileSync(filePath, "utf8"); const fileContents = fs.readFileSync(filePath, "utf8");
const rawConfig: any; const rawConfig = yaml.load(fileContents) as any;
rawConfig = yaml.load(fileContents);
if (rawConfig.server?.trust_proxy) { if (rawConfig.server?.trust_proxy) {
rawConfig.server.trust_proxy = 1; rawConfig.server.trust_proxy = 1;