Files
api/unraid-ui/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

131 lines
4.0 KiB
JSON

{
"name": "@unraid/ui",
"version": "4.25.3",
"private": true,
"license": "GPL-2.0-or-later",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"// Development": "",
"dev": "vite",
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage",
"// Build": "",
"build": "vite build",
"build:watch": "concurrently \"pnpm build:wc --watch\" \"pnpm build --watch\"",
"build:watch:main": "vite build --watch",
"build:wc": "vite build -c vite.web-component.ts --mode production",
"build:all": "vite build && vite build -c vite.web-component.ts --mode production",
"clean": "rimraf dist",
"type-check": "vue-tsc --noEmit",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"// Deploy to Unraid Server": "",
"preunraid:deploy": "pnpm build:wc",
"unraid:deploy": "just deploy",
"// Storybook": "",
"storybook": "pnpm tailwind:watch & pnpm storybook:dev",
"storybook:dev": "storybook dev -p 6006",
"build-storybook": "pnpm tailwind:build && storybook build",
"tailwind:build": "tailwindcss -i ./src/styles/index.css -o ./.storybook/static/index.css",
"tailwind:watch": "pnpm tailwind:build --watch",
"// Cloudflare Workers Deployment": "",
"deploy:storybook": "pnpm build-storybook && wrangler deploy",
"deploy:storybook:staging": "pnpm build-storybook && wrangler deploy --env staging"
},
"peerDependencies": {
"ajv": "8.17.1",
"tailwindcss": "4.1.12",
"vue": "3.5.20"
},
"dependencies": {
"@headlessui/vue": "1.7.23",
"@heroicons/vue": "2.2.0",
"@internationalized/number": "3.6.5",
"@jsonforms/core": "3.6.0",
"@jsonforms/vue": "3.6.0",
"@jsonforms/vue-vanilla": "3.6.0",
"@tailwindcss/cli": "4.1.12",
"@vueuse/core": "13.8.0",
"ajv-errors": "3.0.0",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"dompurify": "3.2.6",
"kebab-case": "2.0.2",
"lucide-vue-next": "0.542.0",
"marked": "16.2.1",
"reka-ui": "2.5.0",
"shadcn-vue": "2.2.0",
"tailwind-merge": "2.6.0",
"tw-animate-css": "1.3.7",
"vue-sonner": "2.0.8"
},
"devDependencies": {
"@eslint/js": "9.34.0",
"@ianvs/prettier-plugin-sort-imports": "4.6.3",
"@storybook/addon-docs": "9.1.3",
"@storybook/addon-links": "9.1.3",
"@storybook/builder-vite": "9.1.3",
"@storybook/vue3-vite": "9.1.3",
"@tailwindcss/vite": "4.1.12",
"@testing-library/vue": "8.1.0",
"@types/jsdom": "21.1.7",
"@types/node": "22.18.0",
"@types/testing-library__vue": "5.3.0",
"@typescript-eslint/eslint-plugin": "8.41.0",
"@vitejs/plugin-vue": "6.0.1",
"@vitest/coverage-v8": "3.2.4",
"@vitest/ui": "3.2.4",
"@vue/test-utils": "2.4.6",
"@vue/tsconfig": "0.8.1",
"ajv": "8.17.1",
"concurrently": "9.2.1",
"eslint": "9.34.0",
"eslint-config-prettier": "10.1.8",
"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",
"happy-dom": "18.0.1",
"jiti": "2.5.1",
"postcss": "8.5.6",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "0.6.14",
"rimraf": "6.0.1",
"storybook": "9.1.3",
"tailwindcss": "4.1.12",
"typescript": "5.9.2",
"typescript-eslint": "8.41.0",
"vite": "7.1.3",
"vite-plugin-dts": "3.9.1",
"vite-plugin-vue-devtools": "8.0.1",
"vitest": "3.2.4",
"vue": "3.5.20",
"vue-eslint-parser": "10.2.0",
"vue-tsc": "3.0.6",
"wrangler": "4.33.0"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.49.0"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./styles": "./dist/style.css",
"./styles/*": "./src/styles/*"
},
"packageManager": "pnpm@10.15.0"
}