Files
api/web/package.json
Pujit Mehrotra 34075e44c5 fix: flaky watch on boot drive's dynamix config (#1753)
On FAT32, `fs.stat()` updates accesstime, which means file reads are
also writes, which means we can't use `usePoll` without degrading users'
flash drives.

To keep file reads lazy without a larger refactor, I override
`getters.dynamix()` as the entrypoint to re-read the boot drive's
dynamix config.

Consecutive calls to `getters.dynamix()` are a common access pattern,
which means we have to memoize to avoid many redundant file reads, so I
used a TTL cache with a 250ms lifetime, hoping to scope config files to
each request.

`getters.dynamix()` is also used synchonously, so bit the bullet and
switched away from async reads for simplicity, considering that most
reads will be occurring from memory, even during cache misses.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added a TTL memoized loader utility with exported types.
  * Added a public function to load Dynamix configuration at startup.

* **Refactor**
* Startup now uses the deterministic, cached config loader; runtime
file-watch for Dynamix config removed.
* Simplified config state handling and load-status reporting for more
predictable startup behavior.

* **Tests**
* Added tests for TTL caching, eviction, keying, and conditional
caching.

* **Chores**
  * Bumped package versions and updated changelog.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-27 11:05:13 -04:00

144 lines
4.8 KiB
JSON

{
"name": "@unraid/web",
"version": "4.25.3",
"private": true,
"type": "module",
"license": "GPL-2.0-or-later",
"scripts": {
"// Development": "",
"predev": "node ./scripts/build-ui-if-needed.js",
"dev": "vite --mode development",
"preview": "vite preview",
"serve": "NODE_ENV=production PORT=${PORT:-4321} vite preview --port ${PORT:-4321}",
"// Build": "",
"prebuild:dev": "pnpm predev",
"build:dev": "pnpm run build && pnpm run deploy-to-unraid:dev",
"build": "NODE_ENV=production vite build && pnpm run manifest-ts",
"prebuild:watch": "pnpm predev",
"build:watch": "vite build --watch && pnpm run manifest-ts",
"manifest-ts": "node ./scripts/add-timestamp-standalone-manifest.js",
"// Deployment": "",
"unraid:deploy": "pnpm build:dev",
"deploy-to-unraid:dev": "./scripts/deploy-dev.sh",
"clean-unraid": "./scripts/clean-unraid.sh",
"copy-to-webgui-repo": "./scripts/copy-to-webgui-repo.sh",
"// Code Quality": "",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"type-check": "vue-tsc --noEmit",
"clean": "rm -rf dist dist-wc",
"// GraphQL Codegen": "",
"codegen": "graphql-codegen --config codegen.ts -r dotenv/config",
"codegen:watch": "graphql-codegen --config codegen.ts --watch -r dotenv/config",
"// Internationalization": "",
"i18n:extract": "node ./scripts/extract-translations.mjs && pnpm run i18n:sort",
"i18n:sort": "node ./scripts/sort-translations.mjs",
"// Testing": "",
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"test:standalone": "pnpm run build && vite --config vite.test.config.ts"
},
"devDependencies": {
"@eslint/js": "9.34.0",
"@graphql-codegen/cli": "6.0.0",
"@graphql-codegen/client-preset": "5.0.0",
"@graphql-codegen/introspection": "5.0.0",
"@graphql-typed-document-node/core": "3.2.0",
"@ianvs/prettier-plugin-sort-imports": "4.6.3",
"@pinia/testing": "1.0.2",
"@rollup/plugin-strip": "3.0.4",
"@tailwindcss/typography": "0.5.16",
"@tailwindcss/vite": "4.1.12",
"@testing-library/vue": "8.1.0",
"@types/crypto-js": "4.2.2",
"@types/eslint-config-prettier": "6.11.3",
"@types/node": "22.18.0",
"@types/semver": "7.7.0",
"@typescript-eslint/eslint-plugin": "8.41.0",
"@unraid/tailwind-rem-to-rem": "2.0.0",
"@vitejs/plugin-vue": "6.0.1",
"@vitest/coverage-v8": "3.2.4",
"@vue/apollo-util": "4.2.2",
"@vue/compiler-sfc": "3.5.20",
"@vue/test-utils": "2.4.6",
"@vueuse/core": "13.8.0",
"eslint": "9.34.0",
"eslint-config-prettier": "10.1.8",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-no-relative-import-paths": "1.6.1",
"eslint-plugin-prettier": "5.5.4",
"eslint-plugin-storybook": "9.1.3",
"eslint-plugin-vue": "10.4.0",
"glob": "11.0.3",
"globals": "16.3.0",
"happy-dom": "18.0.1",
"kebab-case": "2.0.2",
"lodash-es": "4.17.21",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "0.6.14",
"tailwindcss": "4.1.12",
"terser": "5.43.1",
"tw-animate-css": "1.3.7",
"typescript": "5.9.2",
"typescript-eslint": "8.41.0",
"vite": "7.1.3",
"vite-plugin-remove-console": "2.2.0",
"vite-plugin-vue-tracer": "1.0.0",
"vitest": "3.2.4",
"vue": "3.5.20",
"vue-eslint-parser": "10.2.0",
"vue-i18n-extract": "2.0.4",
"vue-tsc": "3.0.6"
},
"dependencies": {
"@apollo/client": "3.14.0",
"@floating-ui/dom": "1.7.4",
"@floating-ui/utils": "0.2.10",
"@floating-ui/vue": "1.1.9",
"@headlessui/vue": "1.7.23",
"@heroicons/vue": "2.2.0",
"@jsonforms/core": "3.6.0",
"@jsonforms/vue": "3.6.0",
"@jsonforms/vue-vanilla": "3.6.0",
"@jsonforms/vue-vuetify": "3.6.0",
"@nuxt/ui": "4.0.0-alpha.0",
"@unraid/shared-callbacks": "1.1.1",
"@unraid/ui": "link:../unraid-ui",
"@vue/apollo-composable": "4.2.2",
"@vueuse/components": "13.8.0",
"@vueuse/integrations": "13.8.0",
"ajv": "8.17.1",
"ansi_up": "6.0.6",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"convert": "5.12.0",
"crypto-js": "4.2.0",
"dayjs": "1.11.14",
"focus-trap": "7.6.5",
"graphql": "16.11.0",
"graphql-tag": "2.12.6",
"graphql-ws": "6.0.6",
"hex-to-rgba": "2.0.1",
"highlight.js": "11.11.1",
"isomorphic-dompurify": "2.26.0",
"lucide-vue-next": "0.542.0",
"marked": "16.2.1",
"marked-base-url": "1.1.7",
"pinia": "3.0.3",
"postcss-import": "16.1.1",
"semver": "7.7.2",
"tailwind-merge": "2.6.0",
"vue-i18n": "11.1.11",
"vue-router": "4.5.1",
"vue-web-component-wrapper": "1.7.7",
"vuetify": "3.9.6",
"wretch": "2.11.0"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.49.0"
},
"packageManager": "pnpm@10.15.0"
}