From fe4df079d1561fc09dab2ede095b3ad609d61524 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 9 Mar 2026 13:27:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fixes=20DeepScan=20warning,=20fi?= =?UTF-8?q?xes=20(hopefully)=20Netlify/Vercel=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 2 +- .../Settings/LocalConfigWarning.vue | 3 --- vite.config.mjs | 19 ++++++++++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/netlify.toml b/netlify.toml index 9da589bd..f40d052f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -12,7 +12,7 @@ # Environmental variables for build command [build.environment] NODE_VERSION = "20.11.1" - NODE_OPTIONS = "--openssl-legacy-provider" + YARN_FLAGS = "--ignore-engines" # Redirect the Node endpoints to serverless functions diff --git a/src/components/Settings/LocalConfigWarning.vue b/src/components/Settings/LocalConfigWarning.vue index af38d150..999740e6 100644 --- a/src/components/Settings/LocalConfigWarning.vue +++ b/src/components/Settings/LocalConfigWarning.vue @@ -90,9 +90,6 @@ export default { if (!shouldHide) { window.setTimeout(() => { this.shouldHide = shouldHide; }, this.timeDelay); window.addEventListener('keyup', this.keyPressEvent); - } else { // Meh, component not needed. - // No point wasting valuable bytes of your 32GB Ram, lets kill it - this.$destroy(); } }, }; diff --git a/vite.config.mjs b/vite.config.mjs index 8c570595..a95d77d5 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -4,7 +4,7 @@ import { VitePWA } from 'vite-plugin-pwa'; import svgLoader from 'vite-svg-loader'; import path from 'path'; import { fileURLToPath } from 'url'; -import { readFileSync } from 'fs'; +import { readFileSync, copyFileSync, existsSync, readdirSync } from 'fs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const pkg = JSON.parse(readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8')); @@ -31,11 +31,28 @@ function serveUserData() { }; } +function copyUserDataConfig() { + return { + name: 'copy-user-data-config', + closeBundle() { + const outDir = path.resolve(__dirname, 'dist'); + if (!existsSync(userDataDir)) return; + const ymlFiles = readdirSync(userDataDir).filter(f => f.endsWith('.yml') || f.endsWith('.yaml')); + for (const file of ymlFiles) { + const src = path.join(userDataDir, file); + const dest = path.join(outDir, file); + copyFileSync(src, dest); + } + }, + }; +} + export default defineConfig({ plugins: [ vue(), svgLoader(), serveUserData(), + copyUserDataConfig(), VitePWA({ registerType: 'prompt', manifest: {