From bf979924a525376b6b2fd661c3d4e1f3a2b16cf7 Mon Sep 17 00:00:00 2001 From: Lan Date: Sun, 7 Jun 2026 14:43:04 +0800 Subject: [PATCH] refactor: organize upload and file management flows --- package.json | 5 + pnpm-lock.yaml | 733 +++++++++++++++++- scripts/check-architecture.mjs | 2 +- src/components/common/AdminBatchActionBar.vue | 127 +++ src/composables/useAdminFileSelection.test.ts | 42 + src/composables/useAdminFileSelection.ts | 63 ++ src/composables/useAdminFiles.ts | 253 +----- src/composables/usePresignedUpload.test.ts | 150 ++++ src/composables/useSendFlow.ts | 44 +- src/services/upload-strategy.test.ts | 113 +++ src/utils/admin-file-summary.test.ts | 140 ++++ src/utils/admin-file-summary.ts | 110 +++ src/utils/admin-file-view-preset.test.ts | 55 ++ src/utils/admin-file-view-preset.ts | 90 +++ src/utils/content-preview.test.ts | 17 + src/utils/download-action.test.ts | 103 +++ src/utils/download-action.ts | 1 + src/utils/file-type.test.ts | 35 + src/utils/file-type.ts | 48 ++ src/utils/send-record.test.ts | 24 + src/views/RetrievewFileView.vue | 12 + src/views/manage/FileManageView.vue | 97 +-- tsconfig.app.json | 2 +- vitest.config.ts | 18 + 24 files changed, 1925 insertions(+), 359 deletions(-) create mode 100644 src/components/common/AdminBatchActionBar.vue create mode 100644 src/composables/useAdminFileSelection.test.ts create mode 100644 src/composables/useAdminFileSelection.ts create mode 100644 src/composables/usePresignedUpload.test.ts create mode 100644 src/services/upload-strategy.test.ts create mode 100644 src/utils/admin-file-summary.test.ts create mode 100644 src/utils/admin-file-summary.ts create mode 100644 src/utils/admin-file-view-preset.test.ts create mode 100644 src/utils/admin-file-view-preset.ts create mode 100644 src/utils/content-preview.test.ts create mode 100644 src/utils/download-action.test.ts create mode 100644 src/utils/file-type.test.ts create mode 100644 src/utils/file-type.ts create mode 100644 src/utils/send-record.test.ts create mode 100644 vitest.config.ts diff --git a/package.json b/package.json index ea88377..ee8e2cc 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "build-only": "vite build", "type-check": "vue-tsc --build --force", "check:architecture": "node scripts/check-architecture.mjs", + "test": "vitest run", "lint": "eslint . --fix", + "lint:check": "eslint .", "format": "prettier --write src/" }, "dependencies": { @@ -42,11 +44,13 @@ "@vitejs/plugin-vue-jsx": "^5.0.1", "@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-typescript": "^14.6.0", + "@vue/test-utils": "^2.4.6", "@vue/tsconfig": "^0.7.0", "autoprefixer": "^10.4.21", "eslint": "^9.39.2", "eslint-plugin-vue": "^10.4.0", "glob": "^13.0.0", + "jsdom": "^27.2.0", "npm-run-all2": "^8.0.4", "postcss": "^8.5.6", "prettier": "^3.6.2", @@ -54,6 +58,7 @@ "tailwindcss": "^3.4.17", "typescript": "~5.8.3", "vite": "^7.3.0", + "vitest": "^4.0.15", "vue-tsc": "^3.0.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7a6213..81c6cd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,6 +87,9 @@ importers: '@vue/eslint-config-typescript': specifier: ^14.6.0 version: 14.6.0(eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.42.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.8.3))(eslint@9.39.2(jiti@1.21.7))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@1.21.7))))(eslint@9.39.2(jiti@1.21.7))(typescript@5.8.3) + '@vue/test-utils': + specifier: ^2.4.6 + version: 2.4.11(@vue/compiler-dom@3.5.21)(@vue/server-renderer@3.5.21(vue@3.5.21(typescript@5.8.3)))(vue@3.5.21(typescript@5.8.3)) '@vue/tsconfig': specifier: ^0.7.0 version: 0.7.0(typescript@5.8.3)(vue@3.5.21(typescript@5.8.3)) @@ -102,6 +105,9 @@ importers: glob: specifier: ^13.0.0 version: 13.0.0 + jsdom: + specifier: ^27.2.0 + version: 27.4.0 npm-run-all2: specifier: ^8.0.4 version: 8.0.4 @@ -123,12 +129,18 @@ importers: vite: specifier: ^7.3.0 version: 7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1) + vitest: + specifier: ^4.0.15 + version: 4.1.8(@types/node@24.3.0)(jsdom@27.4.0)(vite@7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1)) vue-tsc: specifier: ^3.0.4 version: 3.0.6(typescript@5.8.3) packages: + '@acemir/cssom@0.9.31': + resolution: {integrity: sha512-ZnR3GSaH+/vJ0YlHau21FjfLYjMpYVIzTD8M8vIEQvIGxeOXyXdzCI140rrCY862p/C/BbzWsjc1dgnM9mkoTA==} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -137,6 +149,15 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@asamuzakjp/css-color@4.1.2': + resolution: {integrity: sha512-NfBUvBaYgKIuq6E/RBLY1m0IohzNHAYyaJGuTK79Z23uNwmz2jl1mPsC5ZxCCxylinKhT1Amn5oNTlx1wN8cQg==} + + '@asamuzakjp/dom-selector@6.8.1': + resolution: {integrity: sha512-MvRz1nCqW0fsy8Qz4dnLIvhOlMzqDVBabZx6lH+YywFDdjXhMY37SmpV1XFX3JzG5GWHn63j6HX6QPr3lZXHvQ==} + + '@asamuzakjp/nwsapi@2.3.9': + resolution: {integrity: sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==} + '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -254,6 +275,42 @@ packages: resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} + '@csstools/color-helpers@6.0.2': + resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==} + engines: {node: '>=20.19.0'} + + '@csstools/css-calc@3.2.1': + resolution: {integrity: sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-parser-algorithms': ^4.0.0 + '@csstools/css-tokenizer': ^4.0.0 + + '@csstools/css-color-parser@4.1.1': + resolution: {integrity: sha512-eZ5XOtyhK+mggRafYUWzA0tvaYOFgdY8AkgQiCJF9qNAePnUo/zmsqqYubBBb3sQ8uNUaSKTY9s9klfRaAXL0g==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-parser-algorithms': ^4.0.0 + '@csstools/css-tokenizer': ^4.0.0 + + '@csstools/css-parser-algorithms@4.0.0': + resolution: {integrity: sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-tokenizer': ^4.0.0 + + '@csstools/css-syntax-patches-for-csstree@1.1.5': + resolution: {integrity: sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==} + peerDependencies: + css-tree: ^3.2.1 + peerDependenciesMeta: + css-tree: + optional: true + + '@csstools/css-tokenizer@4.0.0': + resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==} + engines: {node: '>=20.19.0'} + '@esbuild/aix-ppc64@0.27.2': resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} engines: {node: '>=18'} @@ -466,6 +523,15 @@ packages: resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@exodus/bytes@1.15.1': + resolution: {integrity: sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + peerDependencies: + '@noble/hashes': ^1.8.0 || ^2.0.0 + peerDependenciesMeta: + '@noble/hashes': + optional: true + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -531,6 +597,9 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@one-ini/wasm@0.1.1': + resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -579,67 +648,56 @@ packages: resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.54.0': resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.54.0': resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.54.0': resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.54.0': resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.54.0': resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.54.0': resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.54.0': resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.54.0': resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.54.0': resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.54.0': resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openharmony-arm64@4.54.0': resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==} @@ -669,6 +727,9 @@ packages: '@rushstack/eslint-patch@1.12.0': resolution: {integrity: sha512-5EwMtOqvJMMa3HbmxLlF74e+3/HhwBTMcvt3nqVJgGCozO6hzIPOBlwm8mGVNR9SN2IJpxSnlxczyDjcn7qIyw==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@tailwindcss/typography@0.5.16': resolution: {integrity: sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==} peerDependencies: @@ -677,6 +738,12 @@ packages: '@tsconfig/node20@20.1.6': resolution: {integrity: sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} @@ -768,6 +835,35 @@ packages: vite: ^5.0.0 || ^6.0.0 || ^7.0.0 vue: ^3.2.25 + '@vitest/expect@4.1.8': + resolution: {integrity: sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==} + + '@vitest/mocker@4.1.8': + resolution: {integrity: sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.8': + resolution: {integrity: sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==} + + '@vitest/runner@4.1.8': + resolution: {integrity: sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==} + + '@vitest/snapshot@4.1.8': + resolution: {integrity: sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==} + + '@vitest/spy@4.1.8': + resolution: {integrity: sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==} + + '@vitest/utils@4.1.8': + resolution: {integrity: sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==} + '@volar/language-core@2.4.23': resolution: {integrity: sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==} @@ -862,6 +958,16 @@ packages: '@vue/shared@3.5.21': resolution: {integrity: sha512-+2k1EQpnYuVuu3N7atWyG3/xoFWIVJZq4Mz8XNOdScFI0etES75fbny/oU4lKWk/577P1zmg0ioYvpGEDZ3DLw==} + '@vue/test-utils@2.4.11': + resolution: {integrity: sha512-GDqaqZsA6m2E5vNzej0aYiIb6BX8xV9pNSbbbXKOfEYwg7ZNblVX8suyqmUBThq8VIrgAJNxn+z72hVtUeiWHA==} + peerDependencies: + '@vue/compiler-dom': 3.x + '@vue/server-renderer': 3.x + vue: 3.x + peerDependenciesMeta: + '@vue/server-renderer': + optional: true + '@vue/tsconfig@0.7.0': resolution: {integrity: sha512-ku2uNz5MaZ9IerPPUyOHzyjhXoX2kVJaVf7hL315DC17vS6IiZRmmCPfggNbU16QTvM80+uYYy3eYJB59WCtvg==} peerDependencies: @@ -873,6 +979,10 @@ packages: vue: optional: true + abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -883,6 +993,10 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -918,6 +1032,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -934,6 +1052,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + bidi-js@1.0.3: + resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -974,6 +1095,10 @@ packages: caniuse-lite@1.0.30001739: resolution: {integrity: sha512-y+j60d6ulelrNSwpPyrHdl+9mJnQzHBr08xm48Qno0nSk4h3Qojh+ziv2qE6rXf4k3tadF4o1J/1tAbVm1NtnA==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -993,6 +1118,10 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -1000,6 +1129,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -1014,14 +1146,26 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} hasBin: true + cssstyle@5.3.7: + resolution: {integrity: sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==} + engines: {node: '>=20'} + csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + data-urls@6.0.1: + resolution: {integrity: sha512-euIQENZg6x8mj3fO6o9+fOW8MimUI4PpD/fZBhJfeioZVy9TUpM4UY7KjQNVZFlqwJ0UdzRDzkycB997HEq1BQ==} + engines: {node: '>=20'} + de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} @@ -1043,6 +1187,9 @@ packages: supports-color: optional: true + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -1066,6 +1213,11 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + editorconfig@1.0.7: + resolution: {integrity: sha512-e0GOtq/aTQhVdNyDU9e02+wz9oDDM+SIOQxWME2QRjzRX5yyLAuHDE+0aE8vHb9XRC8XD37eO2u57+F09JqFhw==} + engines: {node: '>=14'} + hasBin: true + electron-to-chromium@1.5.213: resolution: {integrity: sha512-xr9eRzSLNa4neDO0xVFrkXu3vyIzG4Ay08dApecw42Z1NbmCt+keEpXdvlYGVe0wtvY5dhW0Ay0lY0IOfsCg0Q==} @@ -1079,6 +1231,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@8.0.0: + resolution: {integrity: sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==} + engines: {node: '>=20.19.0'} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -1087,6 +1243,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@2.1.0: + resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} + es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} @@ -1180,10 +1339,17 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1329,6 +1495,18 @@ packages: hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + html-encoding-sniffer@6.0.0: + resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1351,6 +1529,9 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1375,6 +1556,9 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + is-what@4.1.16: resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} engines: {node: '>=12.13'} @@ -1400,6 +1584,14 @@ packages: resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} hasBin: true + js-beautify@1.15.4: + resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} + engines: {node: '>=14'} + hasBin: true + + js-cookie@3.0.8: + resolution: {integrity: sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1407,6 +1599,15 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true + jsdom@27.4.0: + resolution: {integrity: sha512-mjzqwWRD9Y1J1KUi7W97Gja1bwOOM5Ug0EZ6UDK3xS7j7mndrkwozHtSblfomlzyB4NepioNt+B2sOSzczVgtQ==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + peerDependencies: + canvas: ^3.0.0 + peerDependenciesMeta: + canvas: + optional: true + jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -1470,6 +1671,10 @@ packages: resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} engines: {node: 20 || >=22} + lru-cache@11.5.1: + resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -1481,6 +1686,9 @@ packages: magic-string@0.30.18: resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + marked@16.2.1: resolution: {integrity: sha512-r3UrXED9lMlHF97jJByry90cwrZBBvZmjG1L68oYfuPMW+uDTnuMbyJDymCWwbTE+f+3LhpNDKfpR3a3saFyjA==} engines: {node: '>= 20'} @@ -1490,6 +1698,9 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -1548,6 +1759,11 @@ packages: node-releases@2.0.19: resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + nopt@7.2.1: + resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -1576,6 +1792,10 @@ packages: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} + obug@2.1.2: + resolution: {integrity: sha512-AWGB9WFcRXOQs48Z/udjI5ZcZMHXwX8XPByNpOydgcGsDLIzjGizhoMWJyKAWze7AVW/2W1i+/gPX4YtKe5cyg==} + engines: {node: '>=12.20.0'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -1598,6 +1818,9 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse5@8.0.1: + resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -1624,6 +1847,9 @@ packages: resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==} engines: {node: 20 || >=22} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} @@ -1721,6 +1947,9 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} @@ -1750,6 +1979,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1782,6 +2015,10 @@ packages: safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -1806,6 +2043,9 @@ packages: resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -1821,6 +2061,12 @@ packages: resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} engines: {node: '>=0.10.0'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@4.1.0: + resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -1861,6 +2107,9 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + synckit@0.11.11: resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -1877,14 +2126,40 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} + engines: {node: '>=14.0.0'} + + tldts-core@7.4.2: + resolution: {integrity: sha512-nwEyF4vl4RSJjwSjBUmOSxc3BFPoIFdlRthJ6e+5v9P3bHNsoD06UjuqMUspqp7vsEZ1beaHi1km+optiE17yA==} + + tldts@7.4.2: + resolution: {integrity: sha512-kCwffuaH8ntKtygnWe1b4BJKWiCUH30n5KfoTr6IchcXOwR7chAOFJxFrH3vjANafUYrIA4a7SDL+nn7SiR4Sw==} + hasBin: true + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tough-cookie@6.0.1: + resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==} + engines: {node: '>=16'} + + tr46@6.0.0: + resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==} + engines: {node: '>=20'} + ts-api-utils@2.1.0: resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} engines: {node: '>=18.12'} @@ -1965,9 +2240,53 @@ packages: yaml: optional: true + vitest@4.1.8: + resolution: {integrity: sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.8 + '@vitest/browser-preview': 4.1.8 + '@vitest/browser-webdriverio': 4.1.8 + '@vitest/coverage-istanbul': 4.1.8 + '@vitest/coverage-v8': 4.1.8 + '@vitest/ui': 4.1.8 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vscode-uri@3.1.0: resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} + vue-component-type-helpers@3.3.3: + resolution: {integrity: sha512-x4nsFpy5Pe8fqPzp/5vkTPeTTDBpAx4WVtV47Ejt0+2FQrq4pRRsJs7JmYRqMFzTu/LW+pCWEjQ3YVCkPV7f9g==} + vue-eslint-parser@10.2.0: resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1999,6 +2318,26 @@ packages: typescript: optional: true + w3c-xmlserializer@5.0.0: + resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} + engines: {node: '>=18'} + + webidl-conversions@8.0.1: + resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} + engines: {node: '>=20'} + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + whatwg-mimetype@5.0.0: + resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==} + engines: {node: '>=20'} + + whatwg-url@15.1.0: + resolution: {integrity: sha512-2ytDk0kiEj/yu90JOAp44PVPUkO9+jVhyf+SybKlRHSDlvOOZhdPIrr7xTH64l4WixO2cP+wQIcgujkGBPPz6g==} + engines: {node: '>=20'} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2009,6 +2348,11 @@ packages: engines: {node: ^18.17.0 || >=20.5.0} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -2021,10 +2365,29 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -2039,6 +2402,8 @@ packages: snapshots: + '@acemir/cssom@0.9.31': {} + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -2046,6 +2411,24 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.30 + '@asamuzakjp/css-color@4.1.2': + dependencies: + '@csstools/css-calc': 3.2.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) + '@csstools/css-color-parser': 4.1.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) + '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) + '@csstools/css-tokenizer': 4.0.0 + lru-cache: 11.5.1 + + '@asamuzakjp/dom-selector@6.8.1': + dependencies: + '@asamuzakjp/nwsapi': 2.3.9 + bidi-js: 1.0.3 + css-tree: 3.2.1 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.1 + + '@asamuzakjp/nwsapi@2.3.9': {} + '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.27.1 @@ -2067,7 +2450,7 @@ snapshots: '@babel/traverse': 7.28.3 '@babel/types': 7.28.2 convert-source-map: 2.0.0 - debug: 4.4.1 + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -2204,7 +2587,7 @@ snapshots: '@babel/parser': 7.28.3 '@babel/template': 7.27.2 '@babel/types': 7.28.2 - debug: 4.4.1 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -2213,6 +2596,30 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 + '@csstools/color-helpers@6.0.2': {} + + '@csstools/css-calc@3.2.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)': + dependencies: + '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) + '@csstools/css-tokenizer': 4.0.0 + + '@csstools/css-color-parser@4.1.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)': + dependencies: + '@csstools/color-helpers': 6.0.2 + '@csstools/css-calc': 3.2.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) + '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) + '@csstools/css-tokenizer': 4.0.0 + + '@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0)': + dependencies: + '@csstools/css-tokenizer': 4.0.0 + + '@csstools/css-syntax-patches-for-csstree@1.1.5(css-tree@3.2.1)': + optionalDependencies: + css-tree: 3.2.1 + + '@csstools/css-tokenizer@4.0.0': {} + '@esbuild/aix-ppc64@0.27.2': optional: true @@ -2354,6 +2761,8 @@ snapshots: '@eslint/core': 0.17.0 levn: 0.4.1 + '@exodus/bytes@1.15.1': {} + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.7': @@ -2418,6 +2827,8 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 + '@one-ini/wasm@0.1.1': {} + '@pkgjs/parseargs@0.11.0': optional: true @@ -2495,6 +2906,8 @@ snapshots: '@rushstack/eslint-patch@1.12.0': {} + '@standard-schema/spec@1.1.0': {} + '@tailwindcss/typography@0.5.16(tailwindcss@3.4.17)': dependencies: lodash.castarray: 4.4.0 @@ -2505,6 +2918,13 @@ snapshots: '@tsconfig/node20@20.1.6': {} + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.8': {} '@types/file-saver@2.0.7': {} @@ -2543,7 +2963,7 @@ snapshots: '@typescript-eslint/types': 8.42.0 '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.42.0 - debug: 4.4.1 + debug: 4.4.3 eslint: 9.39.2(jiti@1.21.7) typescript: 5.8.3 transitivePeerDependencies: @@ -2553,7 +2973,7 @@ snapshots: dependencies: '@typescript-eslint/tsconfig-utils': 8.42.0(typescript@5.8.3) '@typescript-eslint/types': 8.42.0 - debug: 4.4.1 + debug: 4.4.3 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -2572,7 +2992,7 @@ snapshots: '@typescript-eslint/types': 8.42.0 '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.8.3) '@typescript-eslint/utils': 8.42.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.8.3) - debug: 4.4.1 + debug: 4.4.3 eslint: 9.39.2(jiti@1.21.7) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 @@ -2587,7 +3007,7 @@ snapshots: '@typescript-eslint/tsconfig-utils': 8.42.0(typescript@5.8.3) '@typescript-eslint/types': 8.42.0 '@typescript-eslint/visitor-keys': 8.42.0 - debug: 4.4.1 + debug: 4.4.3 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 @@ -2631,6 +3051,47 @@ snapshots: vite: 7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1) vue: 3.5.21(typescript@5.8.3) + '@vitest/expect@4.1.8': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.8 + '@vitest/utils': 4.1.8 + chai: 6.2.2 + tinyrainbow: 3.1.0 + + '@vitest/mocker@4.1.8(vite@7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1))': + dependencies: + '@vitest/spy': 4.1.8 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1) + + '@vitest/pretty-format@4.1.8': + dependencies: + tinyrainbow: 3.1.0 + + '@vitest/runner@4.1.8': + dependencies: + '@vitest/utils': 4.1.8 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.8': + dependencies: + '@vitest/pretty-format': 4.1.8 + '@vitest/utils': 4.1.8 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.8': {} + + '@vitest/utils@4.1.8': + dependencies: + '@vitest/pretty-format': 4.1.8 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 + '@volar/language-core@2.4.23': dependencies: '@volar/source-map': 2.4.23 @@ -2786,17 +3247,30 @@ snapshots: '@vue/shared@3.5.21': {} + '@vue/test-utils@2.4.11(@vue/compiler-dom@3.5.21)(@vue/server-renderer@3.5.21(vue@3.5.21(typescript@5.8.3)))(vue@3.5.21(typescript@5.8.3))': + dependencies: + '@vue/compiler-dom': 3.5.21 + js-beautify: 1.15.4 + vue: 3.5.21(typescript@5.8.3) + vue-component-type-helpers: 3.3.3 + optionalDependencies: + '@vue/server-renderer': 3.5.21(vue@3.5.21(typescript@5.8.3)) + '@vue/tsconfig@0.7.0(typescript@5.8.3)(vue@3.5.21(typescript@5.8.3))': optionalDependencies: typescript: 5.8.3 vue: 3.5.21(typescript@5.8.3) + abbrev@2.0.0: {} + acorn-jsx@5.3.2(acorn@8.15.0): dependencies: acorn: 8.15.0 acorn@8.15.0: {} + agent-base@7.1.4: {} + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -2827,6 +3301,8 @@ snapshots: argparse@2.0.1: {} + assertion-error@2.0.1: {} + asynckit@0.4.0: {} autoprefixer@10.4.21(postcss@8.5.6): @@ -2849,6 +3325,10 @@ snapshots: balanced-match@1.0.2: {} + bidi-js@1.0.3: + dependencies: + require-from-string: 2.0.2 + binary-extensions@2.3.0: {} birpc@2.5.0: {} @@ -2886,6 +3366,8 @@ snapshots: caniuse-lite@1.0.30001739: {} + chai@6.2.2: {} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -2913,10 +3395,17 @@ snapshots: dependencies: delayed-stream: 1.0.0 + commander@10.0.1: {} + commander@4.1.1: {} concat-map@0.0.1: {} + config-chain@1.1.13: + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + convert-source-map@2.0.0: {} copy-anything@3.0.5: @@ -2931,10 +3420,27 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + css-tree@3.2.1: + dependencies: + mdn-data: 2.27.1 + source-map-js: 1.2.1 + cssesc@3.0.0: {} + cssstyle@5.3.7: + dependencies: + '@asamuzakjp/css-color': 4.1.2 + '@csstools/css-syntax-patches-for-csstree': 1.1.5(css-tree@3.2.1) + css-tree: 3.2.1 + lru-cache: 11.5.1 + csstype@3.1.3: {} + data-urls@6.0.1: + dependencies: + whatwg-mimetype: 5.0.0 + whatwg-url: 15.1.0 + de-indent@1.0.2: {} debug@4.4.1: @@ -2945,6 +3451,8 @@ snapshots: dependencies: ms: 2.1.3 + decimal.js@10.6.0: {} + deep-is@0.1.4: {} delayed-stream@1.0.0: {} @@ -2965,6 +3473,13 @@ snapshots: eastasianwidth@0.2.0: {} + editorconfig@1.0.7: + dependencies: + '@one-ini/wasm': 0.1.1 + commander: 10.0.1 + minimatch: 9.0.5 + semver: 7.7.2 + electron-to-chromium@1.5.213: {} emoji-regex@8.0.0: {} @@ -2973,10 +3488,14 @@ snapshots: entities@4.5.0: {} + entities@8.0.0: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} + es-module-lexer@2.1.0: {} + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -3115,8 +3634,14 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.8 + esutils@2.0.3: {} + expect-type@1.3.0: {} + fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} @@ -3259,6 +3784,26 @@ snapshots: hookable@5.5.3: {} + html-encoding-sniffer@6.0.0: + dependencies: + '@exodus/bytes': 1.15.1 + transitivePeerDependencies: + - '@noble/hashes' + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + ignore@5.3.2: {} ignore@7.0.5: {} @@ -3274,6 +3819,8 @@ snapshots: inherits@2.0.4: {} + ini@1.3.8: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -3292,6 +3839,8 @@ snapshots: is-number@7.0.0: {} + is-potential-custom-element-name@1.0.1: {} + is-what@4.1.16: {} isarray@1.0.0: {} @@ -3312,12 +3861,50 @@ snapshots: jiti@1.21.7: {} + js-beautify@1.15.4: + dependencies: + config-chain: 1.1.13 + editorconfig: 1.0.7 + glob: 10.5.0 + js-cookie: 3.0.8 + nopt: 7.2.1 + + js-cookie@3.0.8: {} + js-tokens@4.0.0: {} js-yaml@4.1.1: dependencies: argparse: 2.0.1 + jsdom@27.4.0: + dependencies: + '@acemir/cssom': 0.9.31 + '@asamuzakjp/dom-selector': 6.8.1 + '@exodus/bytes': 1.15.1 + cssstyle: 5.3.7 + data-urls: 6.0.1 + decimal.js: 10.6.0 + html-encoding-sniffer: 6.0.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + is-potential-custom-element-name: 1.0.1 + parse5: 8.0.1 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 6.0.1 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 8.0.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 15.1.0 + ws: 8.21.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - '@noble/hashes' + - bufferutil + - supports-color + - utf-8-validate + jsesc@3.1.0: {} json-buffer@3.0.1: {} @@ -3368,6 +3955,8 @@ snapshots: lru-cache@11.1.0: {} + lru-cache@11.5.1: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -3380,10 +3969,16 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + marked@16.2.1: {} math-intrinsics@1.1.0: {} + mdn-data@2.27.1: {} + memorystream@0.3.1: {} merge2@1.4.1: {} @@ -3431,6 +4026,10 @@ snapshots: node-releases@2.0.19: {} + nopt@7.2.1: + dependencies: + abbrev: 2.0.0 + normalize-path@3.0.0: {} normalize-range@0.1.2: {} @@ -3456,6 +4055,8 @@ snapshots: object-hash@3.0.0: {} + obug@2.1.2: {} + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -3481,6 +4082,10 @@ snapshots: dependencies: callsites: 3.1.0 + parse5@8.0.1: + dependencies: + entities: 8.0.0 + path-browserify@1.0.1: {} path-exists@4.0.0: {} @@ -3504,6 +4109,8 @@ snapshots: lru-cache: 11.1.0 minipass: 7.1.2 + pathe@2.0.3: {} + perfect-debounce@1.0.0: {} picocolors@1.1.1: {} @@ -3577,6 +4184,8 @@ snapshots: process-nextick-args@2.0.1: {} + proto-list@1.2.4: {} + proxy-from-env@1.1.0: {} punycode@2.3.1: {} @@ -3610,6 +4219,8 @@ snapshots: dependencies: picomatch: 2.3.1 + require-from-string@2.0.2: {} + resolve-from@4.0.0: {} resolve@1.22.10: @@ -3661,6 +4272,10 @@ snapshots: safe-buffer@5.1.2: {} + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + semver@6.3.1: {} semver@7.7.2: {} @@ -3675,6 +4290,8 @@ snapshots: shell-quote@1.8.3: {} + siginfo@2.0.0: {} + signal-exit@4.1.0: {} source-map-js@1.2.1: {} @@ -3683,6 +4300,10 @@ snapshots: speakingurl@14.0.1: {} + stackback@0.0.2: {} + + std-env@4.1.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -3729,6 +4350,8 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + symbol-tree@3.2.4: {} + synckit@0.11.11: dependencies: '@pkgr/core': 0.2.9 @@ -3768,15 +4391,35 @@ snapshots: dependencies: any-promise: 1.3.0 + tinybench@2.9.0: {} + + tinyexec@1.2.4: {} + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 + tinyrainbow@3.1.0: {} + + tldts-core@7.4.2: {} + + tldts@7.4.2: + dependencies: + tldts-core: 7.4.2 + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 + tough-cookie@6.0.1: + dependencies: + tldts: 7.4.2 + + tr46@6.0.0: + dependencies: + punycode: 2.3.1 + ts-api-utils@2.1.0(typescript@5.8.3): dependencies: typescript: 5.8.3 @@ -3828,8 +4471,38 @@ snapshots: jiti: 1.21.7 yaml: 2.8.1 + vitest@4.1.8(@types/node@24.3.0)(jsdom@27.4.0)(vite@7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1)): + dependencies: + '@vitest/expect': 4.1.8 + '@vitest/mocker': 4.1.8(vite@7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.8 + '@vitest/runner': 4.1.8 + '@vitest/snapshot': 4.1.8 + '@vitest/spy': 4.1.8 + '@vitest/utils': 4.1.8 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.2 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 4.1.0 + tinybench: 2.9.0 + tinyexec: 1.2.4 + tinyglobby: 0.2.15 + tinyrainbow: 3.1.0 + vite: 7.3.0(@types/node@24.3.0)(jiti@1.21.7)(yaml@2.8.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 24.3.0 + jsdom: 27.4.0 + transitivePeerDependencies: + - msw + vscode-uri@3.1.0: {} + vue-component-type-helpers@3.3.3: {} + vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@1.21.7)): dependencies: debug: 4.4.1 @@ -3870,6 +4543,21 @@ snapshots: optionalDependencies: typescript: 5.8.3 + w3c-xmlserializer@5.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@8.0.1: {} + + whatwg-mimetype@4.0.0: {} + + whatwg-mimetype@5.0.0: {} + + whatwg-url@15.1.0: + dependencies: + tr46: 6.0.0 + webidl-conversions: 8.0.1 + which@2.0.2: dependencies: isexe: 2.0.0 @@ -3878,6 +4566,11 @@ snapshots: dependencies: isexe: 3.1.1 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} wrap-ansi@7.0.0: @@ -3892,8 +4585,14 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 + ws@8.21.0: {} + xml-name-validator@4.0.0: {} + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + yallist@3.1.1: {} yaml@2.8.1: {} diff --git a/scripts/check-architecture.mjs b/scripts/check-architecture.mjs index b0eb0d8..78ad588 100644 --- a/scripts/check-architecture.mjs +++ b/scripts/check-architecture.mjs @@ -230,7 +230,7 @@ for (const rule of rules) { cwd: rootDir, absolute: true, nodir: true, - ignore: ['node_modules/**', 'dist/**'], + ignore: ['node_modules/**', 'dist/**', 'src/**/*.test.ts', 'src/**/*.spec.ts', 'src/**/__tests__/**'], }) ) diff --git a/src/components/common/AdminBatchActionBar.vue b/src/components/common/AdminBatchActionBar.vue new file mode 100644 index 0000000..ce7db50 --- /dev/null +++ b/src/components/common/AdminBatchActionBar.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/composables/useAdminFileSelection.test.ts b/src/composables/useAdminFileSelection.test.ts new file mode 100644 index 0000000..8a69338 --- /dev/null +++ b/src/composables/useAdminFileSelection.test.ts @@ -0,0 +1,42 @@ +import { describe, expect, it } from 'vitest' +import { ref } from 'vue' + +import { useAdminFileSelection } from './useAdminFileSelection' + +describe('useAdminFileSelection', () => { + it('tracks selected files and current page selection state', () => { + const files = ref([{ id: 1 }, { id: 2 }, { id: 3 }]) + const selection = useAdminFileSelection(files) + + expect(selection.hasSelectedFiles.value).toBe(false) + expect(selection.isAllCurrentPageSelected.value).toBe(false) + + selection.toggleFileSelection(1) + + expect(selection.selectedFileIds.value).toEqual(new Set([1])) + expect(selection.selectedCount.value).toBe(1) + expect(selection.hasSelectedFiles.value).toBe(true) + expect(selection.isCurrentPagePartiallySelected.value).toBe(true) + + selection.toggleCurrentPageSelection() + + expect(selection.selectedFileIds.value).toEqual(new Set([1, 2, 3])) + expect(selection.isAllCurrentPageSelected.value).toBe(true) + expect(selection.isCurrentPagePartiallySelected.value).toBe(false) + + selection.toggleCurrentPageSelection() + + expect(selection.selectedFileIds.value.size).toBe(0) + }) + + it('removes selected ids that are no longer visible on the current page', () => { + const files = ref([{ id: 1 }, { id: 2 }, { id: 3 }]) + const selection = useAdminFileSelection(files) + + selection.toggleCurrentPageSelection() + files.value = [{ id: 2 }, { id: 4 }] + selection.syncSelectedFilesWithCurrentPage() + + expect(selection.selectedFileIds.value).toEqual(new Set([2])) + }) +}) diff --git a/src/composables/useAdminFileSelection.ts b/src/composables/useAdminFileSelection.ts new file mode 100644 index 0000000..ce0bca6 --- /dev/null +++ b/src/composables/useAdminFileSelection.ts @@ -0,0 +1,63 @@ +import { computed, ref, type Ref } from 'vue' + +type SelectableFile = { + id: number +} + +export function useAdminFileSelection(tableData: Ref) { + const selectedFileIds = ref>(new Set()) + const currentPageSelectedCount = computed( + () => tableData.value.filter((file) => selectedFileIds.value.has(file.id)).length + ) + const selectedCount = computed(() => selectedFileIds.value.size) + const hasSelectedFiles = computed(() => selectedCount.value > 0) + const isAllCurrentPageSelected = computed( + () => tableData.value.length > 0 && currentPageSelectedCount.value === tableData.value.length + ) + const isCurrentPagePartiallySelected = computed( + () => currentPageSelectedCount.value > 0 && !isAllCurrentPageSelected.value + ) + + const syncSelectedFilesWithCurrentPage = () => { + const visibleIds = new Set(tableData.value.map((file) => file.id)) + selectedFileIds.value = new Set( + Array.from(selectedFileIds.value).filter((id) => visibleIds.has(id)) + ) + } + + const clearSelection = () => { + selectedFileIds.value = new Set() + } + + const toggleFileSelection = (id: number) => { + const nextSelectedIds = new Set(selectedFileIds.value) + if (nextSelectedIds.has(id)) { + nextSelectedIds.delete(id) + } else { + nextSelectedIds.add(id) + } + selectedFileIds.value = nextSelectedIds + } + + const toggleCurrentPageSelection = () => { + if (isAllCurrentPageSelected.value) { + clearSelection() + return + } + + selectedFileIds.value = new Set(tableData.value.map((file) => file.id)) + } + + return { + selectedFileIds, + currentPageSelectedCount, + selectedCount, + hasSelectedFiles, + isAllCurrentPageSelected, + isCurrentPagePartiallySelected, + syncSelectedFilesWithCurrentPage, + clearSelection, + toggleFileSelection, + toggleCurrentPageSelection + } +} diff --git a/src/composables/useAdminFiles.ts b/src/composables/useAdminFiles.ts index bb78a1f..4540b15 100644 --- a/src/composables/useAdminFiles.ts +++ b/src/composables/useAdminFiles.ts @@ -37,7 +37,20 @@ import { exportAdminTextFile, getSafeFilename } from '@/utils/download-action' +import { + buildDefaultViewPresetParams, + normalizeViewPresetParams +} from '@/utils/admin-file-view-preset' +import { + getRemainingDownloads, + inferIsChunked, + inferIsExpired, + inferIsText, + normalizeCount, + normalizeSummary +} from '@/utils/admin-file-summary' import { buildRetrieveUrl } from '@/utils/share-url' +import { useAdminFileSelection } from './useAdminFileSelection' const emptySummary = (): AdminFileSummary => ({ totalFiles: 0, @@ -58,14 +71,6 @@ const emptySummary = (): AdminFileSummary => ({ usedCount: 0 }) -const normalizeCount = (value: number | string | null | undefined) => Number(value || 0) - -const isExpiredByDate = (value: string | null | undefined) => { - if (!value) return false - const timestamp = new Date(value).getTime() - return Number.isFinite(timestamp) && timestamp < Date.now() -} - type ErrorWithResponse = { response?: { status?: number @@ -121,87 +126,6 @@ const formatLocalDateTime = (date: Date) => { } const builtInAllViewPresetId = 'built_in_all' -const adminFileStatusFilters: AdminFileStatusFilter[] = ['all', 'active', 'expired'] -const adminFileTypeFilters: AdminFileTypeFilter[] = ['all', 'file', 'text', 'chunked'] -const adminFileHealthFilters: AdminFileHealthFilter[] = [ - 'all', - 'attention', - 'danger', - 'warning', - 'healthy', - 'expired', - 'expiring_soon', - 'storage_issue', - 'never_retrieved', - 'permanent' -] -const adminFileSortFields = [ - 'created_at', - 'expired_at', - 'name', - 'size', - 'used_count', - 'code' -] as const -const adminFileSortOrders = ['asc', 'desc'] as const - -type RawViewPresetParams = Partial< - Record -> - -const normalizePresetChoice = ( - value: unknown, - allowedValues: readonly T[], - fallback: T -): T => { - const normalizedValue = String(value ?? fallback) - .replace('-', '_') - .trim() - .toLowerCase() - return allowedValues.includes(normalizedValue as T) ? (normalizedValue as T) : fallback -} - -const normalizePresetSize = (value: unknown) => { - const normalizedSize = Number(value) - if (!Number.isFinite(normalizedSize)) return 10 - return Math.min(Math.max(Math.trunc(normalizedSize), 1), 100) -} - -const buildDefaultViewPresetParams = (): AdminFileViewPresetParams => ({ - keyword: '', - status: 'all', - type: 'all', - health: 'all', - sortBy: 'created_at', - sortOrder: 'desc', - size: 10 -}) - -const normalizeViewPresetParams = (params: unknown): AdminFileViewPresetParams => { - const defaults = buildDefaultViewPresetParams() - const rawParams = - params && typeof params === 'object' - ? (params as RawViewPresetParams) - : ({} as RawViewPresetParams) - - return { - keyword: String(rawParams.keyword ?? defaults.keyword).trim(), - status: normalizePresetChoice(rawParams.status, adminFileStatusFilters, defaults.status), - type: normalizePresetChoice(rawParams.type, adminFileTypeFilters, defaults.type), - health: normalizePresetChoice(rawParams.health, adminFileHealthFilters, defaults.health), - sortBy: normalizePresetChoice( - rawParams.sortBy ?? rawParams.sort_by, - adminFileSortFields, - defaults.sortBy - ), - sortOrder: normalizePresetChoice( - rawParams.sortOrder ?? rawParams.sort_order, - adminFileSortOrders, - defaults.sortOrder - ), - size: normalizePresetSize(rawParams.size ?? defaults.size) - } -} export function useAdminFiles() { const { t } = useI18n() @@ -248,7 +172,6 @@ export function useAdminFiles() { const isDetailMetadataSaving = ref(false) const detailMetadataForm = ref(emptyDetailMetadataForm()) const downloadingFileId = ref(null) - const selectedFileIds = ref>(new Set()) const isBatchDeleting = ref(false) const isBatchUpdating = ref(false) const isBatchPolicyActionRunning = ref(false) @@ -263,17 +186,17 @@ export function useAdminFiles() { ) const totalPages = computed(() => Math.max(Math.ceil(params.value.total / params.value.size), 1)) const storageUsedText = computed(() => formatFileSize(summary.value.storageUsed)) - const currentPageSelectedCount = computed( - () => tableData.value.filter((file) => selectedFileIds.value.has(file.id)).length - ) - const selectedCount = computed(() => selectedFileIds.value.size) - const hasSelectedFiles = computed(() => selectedCount.value > 0) - const isAllCurrentPageSelected = computed( - () => tableData.value.length > 0 && currentPageSelectedCount.value === tableData.value.length - ) - const isCurrentPagePartiallySelected = computed( - () => currentPageSelectedCount.value > 0 && !isAllCurrentPageSelected.value - ) + const { + selectedFileIds, + selectedCount, + hasSelectedFiles, + isAllCurrentPageSelected, + isCurrentPagePartiallySelected, + syncSelectedFilesWithCurrentPage, + clearSelection, + toggleFileSelection, + toggleCurrentPageSelection + } = useAdminFileSelection(tableData) const requestParams = computed(() => ({ page: params.value.page, @@ -424,104 +347,6 @@ export function useAdminFiles() { () => detailPolicyActionOptions.value ) - const inferIsText = (file: FileListItem) => { - if (typeof file.isText === 'boolean') return file.isText - if (typeof file.is_text === 'boolean') return file.is_text - if (file.type) return file.type === 'text' - return Boolean(file.text) - } - - const inferIsExpired = (file: FileListItem) => { - if (typeof file.isExpired === 'boolean') return file.isExpired - if (typeof file.is_expired === 'boolean') return file.is_expired - if ( - file.expired_count !== null && - file.expired_count !== undefined && - file.expired_count === 0 - ) { - return true - } - return isExpiredByDate(file.expired_at) - } - - const inferIsChunked = (file: FileListItem) => Boolean(file.isChunked ?? file.is_chunked) - - const getRemainingDownloads = (file: FileListItem) => { - if (file.remainingDownloads !== undefined) return file.remainingDownloads - if (file.remaining_downloads !== undefined) return file.remaining_downloads - if ( - file.expired_count !== null && - file.expired_count !== undefined && - file.expired_count >= 0 - ) { - return Math.max(file.expired_count, 0) - } - return null - } - - const buildFallbackSummary = (files: AdminFileViewItem[], total: number): AdminFileSummary => ({ - totalFiles: total, - activeCount: files.filter((file) => !file.isExpiredFile).length, - expiredCount: files.filter((file) => file.isExpiredFile).length, - textCount: files.filter((file) => file.isTextFile).length, - fileCount: files.filter((file) => !file.isTextFile).length, - chunkedCount: files.filter((file) => file.isChunkedFile).length, - healthAttentionCount: files.filter((file) => - ['danger', 'warning'].includes(file.statusInsightSeverity) - ).length, - healthDangerCount: files.filter((file) => file.statusInsightSeverity === 'danger').length, - healthWarningCount: files.filter((file) => file.statusInsightSeverity === 'warning').length, - expiringSoonCount: files.filter((file) => file.statusInsightReasons.includes('expires_soon')) - .length, - storageIssueCount: files.filter((file) => - file.statusInsightReasons.includes('storage_metadata_incomplete') - ).length, - neverRetrievedCount: files.filter((file) => - file.statusInsightReasons.includes('never_retrieved') - ).length, - healthyCount: files.filter((file) => file.statusInsightSeverity === 'success').length, - permanentCount: files.filter((file) => file.statusInsightState === 'permanent').length, - storageUsed: files.reduce((totalSize, file) => totalSize + normalizeCount(file.size), 0), - usedCount: files.reduce( - (totalUsed, file) => totalUsed + normalizeCount(file.usedCount ?? file.used_count), - 0 - ) - }) - - const normalizeSummary = ( - rawSummary: Partial | undefined, - files: AdminFileViewItem[], - total: number - ): AdminFileSummary => { - const fallback = buildFallbackSummary(files, total) - if (!rawSummary) return fallback - - return { - totalFiles: normalizeCount(rawSummary.totalFiles ?? fallback.totalFiles), - activeCount: normalizeCount(rawSummary.activeCount ?? fallback.activeCount), - expiredCount: normalizeCount(rawSummary.expiredCount ?? fallback.expiredCount), - textCount: normalizeCount(rawSummary.textCount ?? fallback.textCount), - fileCount: normalizeCount(rawSummary.fileCount ?? fallback.fileCount), - chunkedCount: normalizeCount(rawSummary.chunkedCount ?? fallback.chunkedCount), - healthAttentionCount: normalizeCount( - rawSummary.healthAttentionCount ?? fallback.healthAttentionCount - ), - healthDangerCount: normalizeCount(rawSummary.healthDangerCount ?? fallback.healthDangerCount), - healthWarningCount: normalizeCount( - rawSummary.healthWarningCount ?? fallback.healthWarningCount - ), - expiringSoonCount: normalizeCount(rawSummary.expiringSoonCount ?? fallback.expiringSoonCount), - storageIssueCount: normalizeCount(rawSummary.storageIssueCount ?? fallback.storageIssueCount), - neverRetrievedCount: normalizeCount( - rawSummary.neverRetrievedCount ?? fallback.neverRetrievedCount - ), - healthyCount: normalizeCount(rawSummary.healthyCount ?? fallback.healthyCount), - permanentCount: normalizeCount(rawSummary.permanentCount ?? fallback.permanentCount), - storageUsed: normalizeCount(rawSummary.storageUsed ?? fallback.storageUsed), - usedCount: normalizeCount(rawSummary.usedCount ?? fallback.usedCount) - } - } - const normalizeInsightSeverity = ( severity: AdminFileInsightSeverity | undefined ): AdminFileInsightSeverity => { @@ -733,36 +558,6 @@ export function useAdminFiles() { syncDetailMetadataForm(nextFile) } - const syncSelectedFilesWithCurrentPage = () => { - const visibleIds = new Set(tableData.value.map((file) => file.id)) - selectedFileIds.value = new Set( - Array.from(selectedFileIds.value).filter((id) => visibleIds.has(id)) - ) - } - - const clearSelection = () => { - selectedFileIds.value = new Set() - } - - const toggleFileSelection = (id: number) => { - const nextSelectedIds = new Set(selectedFileIds.value) - if (nextSelectedIds.has(id)) { - nextSelectedIds.delete(id) - } else { - nextSelectedIds.add(id) - } - selectedFileIds.value = nextSelectedIds - } - - const toggleCurrentPageSelection = () => { - if (isAllCurrentPageSelected.value) { - clearSelection() - return - } - - selectedFileIds.value = new Set(tableData.value.map((file) => file.id)) - } - const resetEditForm = () => { editForm.value = { id: null, diff --git a/src/composables/usePresignedUpload.test.ts b/src/composables/usePresignedUpload.test.ts new file mode 100644 index 0000000..3208b91 --- /dev/null +++ b/src/composables/usePresignedUpload.test.ts @@ -0,0 +1,150 @@ +import { describe, expect, it, vi, beforeEach } from 'vitest' + +import { PresignUploadService } from '@/services' +import { usePresignedUpload } from './usePresignedUpload' + +vi.mock('@/services', () => ({ + PresignUploadService: { + initUpload: vi.fn(), + directUploadToS3: vi.fn(), + confirmUpload: vi.fn(), + proxyUpload: vi.fn(), + cancelUpload: vi.fn(), + getUploadStatus: vi.fn() + } +})) + +const mockedPresignUploadService = vi.mocked(PresignUploadService) + +const createFile = () => + new File(['hello'], 'hello.txt', { + type: 'text/plain', + lastModified: 1 + }) + +describe('usePresignedUpload', () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it('uploads through direct mode and confirms the upload', async () => { + mockedPresignUploadService.initUpload.mockResolvedValue({ + code: 200, + detail: { + upload_id: 'direct-1', + upload_url: 'https://storage.example/upload', + mode: 'direct', + expires_in: 900 + } + }) + mockedPresignUploadService.directUploadToS3.mockImplementation( + async (_uploadUrl, file, onProgress) => { + onProgress?.({ + loaded: file.size, + total: file.size, + percentage: 100 + }) + return true + } + ) + mockedPresignUploadService.confirmUpload.mockResolvedValue({ + code: 200, + detail: { + code: '12345', + name: 'hello.txt' + } + }) + + const notify = vi.fn() + const onProgress = vi.fn() + const upload = usePresignedUpload({ + getMaxFileSize: () => 1024, + notify + }) + + const code = await upload.uploadFile(createFile(), { + expireValue: 2, + expireStyle: 'day', + onProgress + }) + + expect(code).toBe('12345') + expect(mockedPresignUploadService.initUpload).toHaveBeenCalledWith({ + file_name: 'hello.txt', + file_size: 5, + expire_value: 2, + expire_style: 'day' + }) + expect(mockedPresignUploadService.directUploadToS3).toHaveBeenCalledWith( + 'https://storage.example/upload', + expect.any(File), + expect.any(Function) + ) + expect(mockedPresignUploadService.confirmUpload).toHaveBeenCalledWith('direct-1', { + expire_value: 2, + expire_style: 'day' + }) + expect(onProgress).toHaveBeenCalledWith({ + loaded: 5, + total: 5, + percentage: 100 + }) + expect(upload.presignStatus.value).toBe('success') + expect(upload.uploadProgress.value).toEqual({ + loaded: 5, + total: 5, + percentage: 100 + }) + expect(notify).toHaveBeenCalledWith('文件上传成功!', 'success') + }) + + it('uploads through proxy mode using the proxy upload url', async () => { + mockedPresignUploadService.initUpload.mockResolvedValue({ + code: 200, + detail: { + upload_id: 'proxy-1', + upload_url: '/presign/upload/proxy/proxy-1', + proxy_upload_url: '/presign/upload/proxy/proxy-1', + legacy_proxy_upload_url: '/api/presign/upload/proxy/proxy-1', + mode: 'proxy', + expires_in: 900 + } + }) + mockedPresignUploadService.proxyUpload.mockImplementation( + async (_uploadId, file, onProgress) => { + onProgress?.({ + loaded: file.size, + total: file.size, + percentage: 100 + }) + return { + code: 200, + detail: { + code: '54321', + name: 'hello.txt' + } + } + } + ) + + const upload = usePresignedUpload({ + getMaxFileSize: () => 1024, + notify: vi.fn() + }) + + const code = await upload.uploadFile(createFile(), { + expireValue: 1, + expireStyle: 'hour' + }) + + expect(code).toBe('54321') + expect(mockedPresignUploadService.proxyUpload).toHaveBeenCalledWith( + 'proxy-1', + expect.any(File), + expect.any(Function), + '/presign/upload/proxy/proxy-1' + ) + expect(mockedPresignUploadService.confirmUpload).not.toHaveBeenCalled() + expect(upload.presignStatus.value).toBe('success') + }) +}) diff --git a/src/composables/useSendFlow.ts b/src/composables/useSendFlow.ts index f675f95..297eadf 100644 --- a/src/composables/useSendFlow.ts +++ b/src/composables/useSendFlow.ts @@ -8,6 +8,11 @@ import type { SendType, SentFileRecord, UploadProgress } from '@/types' import { getClipboardFile, insertTextAtSelection } from '@/utils/clipboard-paste' import { getErrorMessage } from '@/utils/common' import { getStorageUnit } from '@/utils/convert' +import { + buildAcceptedFileTypes, + isFileTypeAllowed, + normalizeAllowedFileTypes +} from '@/utils/file-type' import { calculateFileHash } from '@/utils/file-processing' import { buildSentRecord, isExpirationWithinLimit } from '@/utils/send-record' import { createSentRecordActions } from '@/utils/sent-record-actions' @@ -43,20 +48,9 @@ export function useSendFlow() { ) const allowedFileTypes = computed(() => { const types = config.value.allowedFileTypes || config.value.allowed_file_types || ['*'] - const normalized = types.map((type) => String(type).trim()).filter(Boolean) - return normalized.length > 0 ? normalized : ['*'] - }) - const acceptedTypes = computed(() => { - if (allowedFileTypes.value.some((type) => type === '*' || type === '*/*')) return '*' - - return allowedFileTypes.value - .map((type) => { - const normalizedType = type.toLowerCase() - if (normalizedType.includes('/')) return normalizedType - return normalizedType.startsWith('.') ? normalizedType : `.${normalizedType}` - }) - .join(',') + return normalizeAllowedFileTypes(types) }) + const acceptedTypes = computed(() => buildAcceptedFileTypes(allowedFileTypes.value)) const expirationOptions = computed(() => config.value.expireStyle.map((value) => ({ value, @@ -130,33 +124,15 @@ export function useSendFlow() { } const checkFileType = (file: File) => { - if (allowedFileTypes.value.some((type) => type === '*' || type === '*/*')) { - return true - } - - const fileName = file.name.toLowerCase() - const mimeType = file.type.toLowerCase() - const isAllowed = allowedFileTypes.value.some((type) => { - const rule = type.toLowerCase() - if (rule.includes('/')) { - if (rule.endsWith('/*')) { - return mimeType.startsWith(rule.slice(0, -1)) - } - return mimeType === rule - } - - const extension = rule.startsWith('.') ? rule : `.${rule}` - return fileName.endsWith(extension) - }) - - if (!isAllowed) { + if (!isFileTypeAllowed(file, allowedFileTypes.value)) { alertStore.showAlert( t('send.messages.fileTypeNotAllowed', { types: allowedFileTypes.value.join(', ') }), 'error' ) + return false } - return isAllowed + return true } const checkExpirationTime = (method: string, value: string): boolean => diff --git a/src/services/upload-strategy.test.ts b/src/services/upload-strategy.test.ts new file mode 100644 index 0000000..a0c0a77 --- /dev/null +++ b/src/services/upload-strategy.test.ts @@ -0,0 +1,113 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest' + +import { uploadChunkedFile } from './upload-strategy' +import { FileService } from './file' + +vi.mock('@/utils/file-processing', () => ({ + calculateFileHash: vi.fn(async () => 'file-hash') +})) + +vi.mock('./file', () => ({ + FileService: { + initChunkUpload: vi.fn(), + uploadChunk: vi.fn(), + completeChunkUpload: vi.fn() + } +})) + +const mockedFileService = vi.mocked(FileService) + +const createLargeFile = () => { + const sixMb = 6 * 1024 * 1024 + return new File([new Uint8Array(sixMb)], 'video.mp4', { + type: 'video/mp4', + lastModified: 1 + }) +} + +describe('uploadChunkedFile', () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it('skips uploaded chunks and reports progress from completed bytes', async () => { + mockedFileService.initChunkUpload.mockResolvedValue({ + code: 200, + detail: { + upload_id: 'upload-1', + uploaded_chunks: [0] + } + }) + mockedFileService.uploadChunk.mockImplementation(async (_uploadId, _index, chunk, onProgress) => { + onProgress?.({ + loaded: chunk.size, + total: chunk.size, + percentage: 100 + }) + return { + code: 200, + detail: null + } + }) + mockedFileService.completeChunkUpload.mockResolvedValue({ + code: 200, + detail: { + code: '12345', + name: 'video.mp4' + } + }) + + const progress = vi.fn() + const result = await uploadChunkedFile(createLargeFile(), { + expireValue: 2, + expireStyle: 'day', + onProgress: progress + }) + + expect(mockedFileService.initChunkUpload).toHaveBeenCalledWith({ + file_name: 'video.mp4', + file_size: 6 * 1024 * 1024, + chunk_size: 5 * 1024 * 1024, + file_hash: 'file-hash' + }) + expect(mockedFileService.uploadChunk).toHaveBeenCalledTimes(1) + expect(mockedFileService.uploadChunk.mock.calls[0][1]).toBe(1) + expect(progress).toHaveBeenCalledWith({ + loaded: 6 * 1024 * 1024, + total: 6 * 1024 * 1024, + percentage: 99 + }) + expect(mockedFileService.completeChunkUpload).toHaveBeenCalledWith('upload-1', { + expire_value: 2, + expire_style: 'day' + }) + expect(result.detail).toEqual({ + code: '12345', + name: 'video.mp4' + }) + }) + + it('returns early when the backend reports an existing uploaded file', async () => { + mockedFileService.initChunkUpload.mockResolvedValue({ + code: 200, + detail: { + existed: true, + code: '54321', + name: 'video.mp4' + } + }) + + const result = await uploadChunkedFile(createLargeFile(), { + expireValue: 1, + expireStyle: 'day' + }) + + expect(mockedFileService.uploadChunk).not.toHaveBeenCalled() + expect(mockedFileService.completeChunkUpload).not.toHaveBeenCalled() + expect(result.detail).toEqual({ + existed: true, + code: '54321', + name: 'video.mp4' + }) + }) +}) diff --git a/src/utils/admin-file-summary.test.ts b/src/utils/admin-file-summary.test.ts new file mode 100644 index 0000000..cb9debe --- /dev/null +++ b/src/utils/admin-file-summary.test.ts @@ -0,0 +1,140 @@ +import { describe, expect, it } from 'vitest' + +import type { AdminFileViewItem, FileListItem } from '@/types' +import { + buildFallbackSummary, + getRemainingDownloads, + inferIsChunked, + inferIsExpired, + inferIsText, + normalizeCount, + normalizeSummary +} from './admin-file-summary' + +const buildFile = (overrides: Partial = {}): FileListItem => ({ + id: 1, + code: '12345', + prefix: 'report', + suffix: '.txt', + size: 100, + expired_at: null, + expired_count: -1, + created_at: '2026-06-06T00:00:00', + ...overrides +}) + +const buildViewItem = (overrides: Partial = {}): AdminFileViewItem => ({ + ...buildFile(overrides), + displayName: 'report.txt', + displaySize: '100 B', + displayExpiredAt: '-', + displayUsage: '0', + displayHealthState: 'healthy', + displayHealthAction: 'monitor', + isTextFile: false, + isExpiredFile: false, + isChunkedFile: false, + remainingDownloadsValue: null, + canPreviewText: false, + statusInsightSeverity: 'success', + statusInsightState: 'available', + statusInsightNextAction: 'monitor', + statusInsightReasons: [], + ...overrides +}) + +describe('admin file summary helpers', () => { + it('normalizes numeric values from mixed input', () => { + expect(normalizeCount('12')).toBe(12) + expect(normalizeCount(null)).toBe(0) + expect(normalizeCount(undefined)).toBe(0) + }) + + it('infers file flags from legacy and current fields', () => { + expect(inferIsText(buildFile({ isText: true }))).toBe(true) + expect(inferIsText(buildFile({ is_text: true }))).toBe(true) + expect(inferIsText(buildFile({ type: 'text' }))).toBe(true) + expect(inferIsText(buildFile({ text: 'hello' }))).toBe(true) + + expect(inferIsExpired(buildFile({ isExpired: true }))).toBe(true) + expect(inferIsExpired(buildFile({ is_expired: true }))).toBe(true) + expect(inferIsExpired(buildFile({ expired_count: 0 }))).toBe(true) + expect(inferIsExpired(buildFile({ expired_at: '2000-01-01T00:00:00Z' }))).toBe(true) + expect(inferIsExpired(buildFile({ expired_at: '2999-01-01T00:00:00Z' }))).toBe(false) + + expect(inferIsChunked(buildFile({ isChunked: true }))).toBe(true) + expect(inferIsChunked(buildFile({ is_chunked: true }))).toBe(true) + }) + + it('normalizes remaining download counts', () => { + expect(getRemainingDownloads(buildFile({ remainingDownloads: 3 }))).toBe(3) + expect(getRemainingDownloads(buildFile({ remaining_downloads: 2 }))).toBe(2) + expect(getRemainingDownloads(buildFile({ expired_count: 4 }))).toBe(4) + expect(getRemainingDownloads(buildFile({ expired_count: -1 }))).toBeNull() + }) + + it('builds fallback summary from current page data', () => { + const files = [ + buildViewItem({ + id: 1, + size: 100, + usedCount: 2, + statusInsightSeverity: 'success', + statusInsightState: 'available' + }), + buildViewItem({ + id: 2, + isExpiredFile: true, + isTextFile: true, + isChunkedFile: true, + size: 200, + used_count: 3, + statusInsightSeverity: 'warning', + statusInsightState: 'permanent', + statusInsightReasons: [ + 'expires_soon', + 'storage_metadata_incomplete', + 'never_retrieved' + ] + }) + ] + + expect(buildFallbackSummary(files, 10)).toMatchObject({ + totalFiles: 10, + activeCount: 1, + expiredCount: 1, + textCount: 1, + fileCount: 1, + chunkedCount: 1, + healthAttentionCount: 1, + healthWarningCount: 1, + expiringSoonCount: 1, + storageIssueCount: 1, + neverRetrievedCount: 1, + healthyCount: 1, + permanentCount: 1, + storageUsed: 300, + usedCount: 5 + }) + }) + + it('uses backend summary fields while falling back for missing values', () => { + const files = [buildViewItem({ size: 100, usedCount: 2 })] + + expect( + normalizeSummary( + { + totalFiles: '8' as unknown as number, + activeCount: 7 + }, + files, + 1 + ) + ).toMatchObject({ + totalFiles: 8, + activeCount: 7, + storageUsed: 100, + usedCount: 2 + }) + }) +}) diff --git a/src/utils/admin-file-summary.ts b/src/utils/admin-file-summary.ts new file mode 100644 index 0000000..f83e065 --- /dev/null +++ b/src/utils/admin-file-summary.ts @@ -0,0 +1,110 @@ +import type { AdminFileSummary, AdminFileViewItem, FileListItem } from '@/types' + +export const normalizeCount = (value: number | string | null | undefined) => Number(value || 0) + +export const isExpiredByDate = (value: string | null | undefined) => { + if (!value) return false + const timestamp = new Date(value).getTime() + return Number.isFinite(timestamp) && timestamp < Date.now() +} + +export const inferIsText = (file: FileListItem) => { + if (typeof file.isText === 'boolean') return file.isText + if (typeof file.is_text === 'boolean') return file.is_text + if (file.type) return file.type === 'text' + return Boolean(file.text) +} + +export const inferIsExpired = (file: FileListItem) => { + if (typeof file.isExpired === 'boolean') return file.isExpired + if (typeof file.is_expired === 'boolean') return file.is_expired + if ( + file.expired_count !== null && + file.expired_count !== undefined && + file.expired_count === 0 + ) { + return true + } + return isExpiredByDate(file.expired_at) +} + +export const inferIsChunked = (file: FileListItem) => Boolean(file.isChunked ?? file.is_chunked) + +export const getRemainingDownloads = (file: FileListItem) => { + if (file.remainingDownloads !== undefined) return file.remainingDownloads + if (file.remaining_downloads !== undefined) return file.remaining_downloads + if ( + file.expired_count !== null && + file.expired_count !== undefined && + file.expired_count >= 0 + ) { + return Math.max(file.expired_count, 0) + } + return null +} + +export const buildFallbackSummary = ( + files: AdminFileViewItem[], + total: number +): AdminFileSummary => ({ + totalFiles: total, + activeCount: files.filter((file) => !file.isExpiredFile).length, + expiredCount: files.filter((file) => file.isExpiredFile).length, + textCount: files.filter((file) => file.isTextFile).length, + fileCount: files.filter((file) => !file.isTextFile).length, + chunkedCount: files.filter((file) => file.isChunkedFile).length, + healthAttentionCount: files.filter((file) => + ['danger', 'warning'].includes(file.statusInsightSeverity) + ).length, + healthDangerCount: files.filter((file) => file.statusInsightSeverity === 'danger').length, + healthWarningCount: files.filter((file) => file.statusInsightSeverity === 'warning').length, + expiringSoonCount: files.filter((file) => file.statusInsightReasons.includes('expires_soon')) + .length, + storageIssueCount: files.filter((file) => + file.statusInsightReasons.includes('storage_metadata_incomplete') + ).length, + neverRetrievedCount: files.filter((file) => + file.statusInsightReasons.includes('never_retrieved') + ).length, + healthyCount: files.filter((file) => file.statusInsightSeverity === 'success').length, + permanentCount: files.filter((file) => file.statusInsightState === 'permanent').length, + storageUsed: files.reduce((totalSize, file) => totalSize + normalizeCount(file.size), 0), + usedCount: files.reduce( + (totalUsed, file) => totalUsed + normalizeCount(file.usedCount ?? file.used_count), + 0 + ) +}) + +export const normalizeSummary = ( + rawSummary: Partial | undefined, + files: AdminFileViewItem[], + total: number +): AdminFileSummary => { + const fallback = buildFallbackSummary(files, total) + if (!rawSummary) return fallback + + return { + totalFiles: normalizeCount(rawSummary.totalFiles ?? fallback.totalFiles), + activeCount: normalizeCount(rawSummary.activeCount ?? fallback.activeCount), + expiredCount: normalizeCount(rawSummary.expiredCount ?? fallback.expiredCount), + textCount: normalizeCount(rawSummary.textCount ?? fallback.textCount), + fileCount: normalizeCount(rawSummary.fileCount ?? fallback.fileCount), + chunkedCount: normalizeCount(rawSummary.chunkedCount ?? fallback.chunkedCount), + healthAttentionCount: normalizeCount( + rawSummary.healthAttentionCount ?? fallback.healthAttentionCount + ), + healthDangerCount: normalizeCount(rawSummary.healthDangerCount ?? fallback.healthDangerCount), + healthWarningCount: normalizeCount( + rawSummary.healthWarningCount ?? fallback.healthWarningCount + ), + expiringSoonCount: normalizeCount(rawSummary.expiringSoonCount ?? fallback.expiringSoonCount), + storageIssueCount: normalizeCount(rawSummary.storageIssueCount ?? fallback.storageIssueCount), + neverRetrievedCount: normalizeCount( + rawSummary.neverRetrievedCount ?? fallback.neverRetrievedCount + ), + healthyCount: normalizeCount(rawSummary.healthyCount ?? fallback.healthyCount), + permanentCount: normalizeCount(rawSummary.permanentCount ?? fallback.permanentCount), + storageUsed: normalizeCount(rawSummary.storageUsed ?? fallback.storageUsed), + usedCount: normalizeCount(rawSummary.usedCount ?? fallback.usedCount) + } +} diff --git a/src/utils/admin-file-view-preset.test.ts b/src/utils/admin-file-view-preset.test.ts new file mode 100644 index 0000000..544bc16 --- /dev/null +++ b/src/utils/admin-file-view-preset.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from 'vitest' + +import { + buildDefaultViewPresetParams, + normalizeViewPresetParams +} from './admin-file-view-preset' + +describe('admin file view preset helpers', () => { + it('builds default params for the all-files view', () => { + expect(buildDefaultViewPresetParams()).toEqual({ + keyword: '', + status: 'all', + type: 'all', + health: 'all', + sortBy: 'created_at', + sortOrder: 'desc', + size: 10 + }) + }) + + it('normalizes legacy and unsafe preset values', () => { + expect( + normalizeViewPresetParams({ + keyword: ' report ', + status: 'ACTIVE', + type: 'chunked', + health: 'storage-issue', + sort_by: 'used_count', + sort_order: 'ASC', + size: 250 + }) + ).toEqual({ + keyword: 'report', + status: 'active', + type: 'chunked', + health: 'storage_issue', + sortBy: 'used_count', + sortOrder: 'asc', + size: 100 + }) + }) + + it('falls back when preset params are invalid', () => { + expect( + normalizeViewPresetParams({ + status: 'deleted', + type: 'folder', + health: 'unknown', + sortBy: 'createdAt', + sortOrder: 'latest', + size: 'bad' + }) + ).toEqual(buildDefaultViewPresetParams()) + }) +}) diff --git a/src/utils/admin-file-view-preset.ts b/src/utils/admin-file-view-preset.ts new file mode 100644 index 0000000..3941a56 --- /dev/null +++ b/src/utils/admin-file-view-preset.ts @@ -0,0 +1,90 @@ +import type { + AdminFileHealthFilter, + AdminFileSortBy, + AdminFileSortOrder, + AdminFileStatusFilter, + AdminFileTypeFilter, + AdminFileViewPresetParams +} from '@/types' + +export const adminFileStatusFilters: AdminFileStatusFilter[] = ['all', 'active', 'expired'] +export const adminFileTypeFilters: AdminFileTypeFilter[] = ['all', 'file', 'text', 'chunked'] +export const adminFileHealthFilters: AdminFileHealthFilter[] = [ + 'all', + 'attention', + 'danger', + 'warning', + 'healthy', + 'expired', + 'expiring_soon', + 'storage_issue', + 'never_retrieved', + 'permanent' +] +export const adminFileSortFields: AdminFileSortBy[] = [ + 'created_at', + 'expired_at', + 'name', + 'size', + 'used_count', + 'code' +] +export const adminFileSortOrders: AdminFileSortOrder[] = ['asc', 'desc'] + +type RawViewPresetParams = Partial< + Record +> + +const normalizePresetChoice = ( + value: unknown, + allowedValues: readonly T[], + fallback: T +): T => { + const normalizedValue = String(value ?? fallback) + .replace('-', '_') + .trim() + .toLowerCase() + return allowedValues.includes(normalizedValue as T) ? (normalizedValue as T) : fallback +} + +const normalizePresetSize = (value: unknown) => { + const normalizedSize = Number(value) + if (!Number.isFinite(normalizedSize)) return 10 + return Math.min(Math.max(Math.trunc(normalizedSize), 1), 100) +} + +export const buildDefaultViewPresetParams = (): AdminFileViewPresetParams => ({ + keyword: '', + status: 'all', + type: 'all', + health: 'all', + sortBy: 'created_at', + sortOrder: 'desc', + size: 10 +}) + +export const normalizeViewPresetParams = (params: unknown): AdminFileViewPresetParams => { + const defaults = buildDefaultViewPresetParams() + const rawParams = + params && typeof params === 'object' + ? (params as RawViewPresetParams) + : ({} as RawViewPresetParams) + + return { + keyword: String(rawParams.keyword ?? defaults.keyword).trim(), + status: normalizePresetChoice(rawParams.status, adminFileStatusFilters, defaults.status), + type: normalizePresetChoice(rawParams.type, adminFileTypeFilters, defaults.type), + health: normalizePresetChoice(rawParams.health, adminFileHealthFilters, defaults.health), + sortBy: normalizePresetChoice( + rawParams.sortBy ?? rawParams.sort_by, + adminFileSortFields, + defaults.sortBy + ), + sortOrder: normalizePresetChoice( + rawParams.sortOrder ?? rawParams.sort_order, + adminFileSortOrders, + defaults.sortOrder + ), + size: normalizePresetSize(rawParams.size ?? defaults.size) + } +} diff --git a/src/utils/content-preview.test.ts b/src/utils/content-preview.test.ts new file mode 100644 index 0000000..9a23181 --- /dev/null +++ b/src/utils/content-preview.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it } from 'vitest' + +import { renderMarkdownPreview } from './content-preview' + +describe('renderMarkdownPreview', () => { + it('renders markdown and removes unsafe html', async () => { + const html = await renderMarkdownPreview( + '# Title\n\n[ok](https://example.com)\n\n' + ) + + expect(html).toContain('

Title

') + expect(html).toContain('href="https://example.com"') + expect(html).toContain('') + expect(html).not.toContain('